diff --git a/DEPS b/DEPS
index 8e937bc..cf32886 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': '8e9f5e39d774198a5a5d9345bc9f863e855c593b',
+  'skia_revision': '3eed7ddb25408cdd1c437e65728bac115aeacbd1',
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling V8
   # and whatever else without interference from each other.
@@ -87,7 +87,7 @@
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling NaCl
   # and whatever else without interference from each other.
-  'nacl_revision': '6c6f5e2b5863b83e6ba079970fcd20d72957c0c6',
+  'nacl_revision': 'f6afd51ac7ea08a2291a076036da8b6cf076f566',
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling dEQP
   # and whatever else without interference from each other.
@@ -275,7 +275,7 @@
 
   'src/third_party/catapult':
     Var('chromium_git') + '/external/github.com/catapult-project/catapult.git' + '@' +
-    '89c5cbe52157736332fd2ae17dbeab372f09e818',
+    'fd95c1a82c71969a24fd911ecfa814c909e20d08',
 
   'src/third_party/openh264/src':
     Var('chromium_git') + '/external/github.com/cisco/openh264' + '@' + 'b37cda248234162033e3e11b0335f3131cdfe488',
diff --git a/ash/accelerators/accelerator_controller_unittest.cc b/ash/accelerators/accelerator_controller_unittest.cc
index b2eb9ca..7965068 100644
--- a/ash/accelerators/accelerator_controller_unittest.cc
+++ b/ash/accelerators/accelerator_controller_unittest.cc
@@ -1519,7 +1519,8 @@
   }
 
   void RemoveAllNotifications() const {
-    message_center()->RemoveAllNotifications(false);
+    message_center()->RemoveAllNotifications(
+        false /* by_user */, message_center::MessageCenter::RemoveType::ALL);
   }
 
   message_center::MessageCenter* message_center() const {
diff --git a/ash/content/display/screen_orientation_controller_chromeos_unittest.cc b/ash/content/display/screen_orientation_controller_chromeos_unittest.cc
index 6ce5086..5a5b8ab 100644
--- a/ash/content/display/screen_orientation_controller_chromeos_unittest.cc
+++ b/ash/content/display/screen_orientation_controller_chromeos_unittest.cc
@@ -437,7 +437,8 @@
   EXPECT_TRUE(message_center->HasPopupNotifications());
 
   // Clear all notifications
-  message_center->RemoveAllNotifications(false);
+  message_center->RemoveAllNotifications(
+      false /* by_user */, message_center::MessageCenter::RemoveType::ALL);
   EXPECT_EQ(0u, message_center->NotificationCount());
   EXPECT_FALSE(message_center->HasPopupNotifications());
 
@@ -456,7 +457,8 @@
   // Reset the screen rotation.
   SetInternalDisplayRotation(gfx::Display::ROTATE_0);
   // Clear all notifications
-  message_center->RemoveAllNotifications(false);
+  message_center->RemoveAllNotifications(
+      false /* by_user */, message_center::MessageCenter::RemoveType::ALL);
   ASSERT_NE(gfx::Display::ROTATE_180, GetCurrentInternalDisplayRotation());
   ASSERT_EQ(0u, message_center->NotificationCount());
   ASSERT_FALSE(message_center->HasPopupNotifications());
diff --git a/ash/system/web_notification/web_notification_tray_unittest.cc b/ash/system/web_notification/web_notification_tray_unittest.cc
index 55cd0ac..24243df 100644
--- a/ash/system/web_notification/web_notification_tray_unittest.cc
+++ b/ash/system/web_notification/web_notification_tray_unittest.cc
@@ -94,7 +94,8 @@
   ~WebNotificationTrayTest() override {}
 
   void TearDown() override {
-    GetMessageCenter()->RemoveAllNotifications(false);
+    GetMessageCenter()->RemoveAllNotifications(
+        false /* by_user */, message_center::MessageCenter::RemoveType::ALL);
     test::AshTestBase::TearDown();
   }
 
diff --git a/base/memory/scoped_ptr.h b/base/memory/scoped_ptr.h
index 896674123..e5d5e224 100644
--- a/base/memory/scoped_ptr.h
+++ b/base/memory/scoped_ptr.h
@@ -90,7 +90,6 @@
 // This is an implementation designed to match the anticipated future TR2
 // implementation of the scoped_ptr class.
 
-#include <assert.h>
 #include <stddef.h>
 #include <stdlib.h>
 
@@ -100,6 +99,7 @@
 #include <utility>
 
 #include "base/compiler_specific.h"
+#include "base/logging.h"
 #include "base/macros.h"
 #include "base/move.h"
 #include "base/template_util.h"
@@ -359,13 +359,13 @@
   void reset(element_type* p = nullptr) { impl_.reset(p); }
 
   // Accessors to get the owned object.
-  // operator* and operator-> will assert() if there is no current object.
+  // operator* and operator-> will DCHECK() if there is no current object.
   element_type& operator*() const {
-    assert(impl_.get() != nullptr);
+    DCHECK(impl_.get() != nullptr);
     return *impl_.get();
   }
   element_type* operator->() const  {
-    assert(impl_.get() != nullptr);
+    DCHECK(impl_.get() != nullptr);
     return impl_.get();
   }
   element_type* get() const { return impl_.get(); }
@@ -472,7 +472,7 @@
 
   // Accessors to get the owned array.
   element_type& operator[](size_t i) const {
-    assert(impl_.get() != nullptr);
+    DCHECK(impl_.get() != nullptr);
     return impl_.get()[i];
   }
   element_type* get() const { return impl_.get(); }
diff --git a/base/threading/platform_thread_android.cc b/base/threading/platform_thread_android.cc
index 802ab994..fd5e54d 100644
--- a/base/threading/platform_thread_android.cc
+++ b/base/threading/platform_thread_android.cc
@@ -24,14 +24,13 @@
 
 namespace internal {
 
-// - BACKGROUND is 9 due to it being the nicest value we can use that's still
-// above an Android system threshold that enables heavy throttling starting at
-// 10; we want to be lower-priority than Chrome's other threads without
-// incurring this behavior.
+// - BACKGROUND corresponds to Android's PRIORITY_BACKGROUND = 10 value and can
+// result in heavy throttling and force the thread onto a little core on
+// big.LITTLE devices.
 // - DISPLAY corresponds to Android's PRIORITY_DISPLAY = -4 value.
-// - REALTIME_AUDIO corresponds to Android's THREAD_PRIORITY_AUDIO = -16 value.
+// - REALTIME_AUDIO corresponds to Android's PRIORITY_AUDIO = -16 value.
 const ThreadPriorityToNiceValuePair kThreadPriorityToNiceValueMap[4] = {
-    {ThreadPriority::BACKGROUND, 9},
+    {ThreadPriority::BACKGROUND, 10},
     {ThreadPriority::NORMAL, 0},
     {ThreadPriority::DISPLAY, -4},
     {ThreadPriority::REALTIME_AUDIO, -16},
diff --git a/blimp/engine/common/blimp_browser_context.cc b/blimp/engine/common/blimp_browser_context.cc
index a316d9396..4e01d777b 100644
--- a/blimp/engine/common/blimp_browser_context.cc
+++ b/blimp/engine/common/blimp_browser_context.cc
@@ -109,12 +109,10 @@
   resource_context_->set_url_request_context_getter(
       new BlimpURLRequestContextGetter(
           ignore_certificate_errors_, GetPath(),
-          content::BrowserThread::UnsafeGetMessageLoopForThread(
-              content::BrowserThread::IO)
-              ->task_runner(),
-          content::BrowserThread::UnsafeGetMessageLoopForThread(
-              content::BrowserThread::FILE)
-              ->task_runner(),
+          content::BrowserThread::GetMessageLoopProxyForThread(
+              content::BrowserThread::IO),
+          content::BrowserThread::GetMessageLoopProxyForThread(
+              content::BrowserThread::FILE),
           protocol_handlers, std::move(request_interceptors), net_log_));
   return resource_context_->url_request_context_getter();
 }
diff --git a/cc/BUILD.gn b/cc/BUILD.gn
index 5d0bd0d..ce1a7c5 100644
--- a/cc/BUILD.gn
+++ b/cc/BUILD.gn
@@ -34,6 +34,8 @@
     "animation/layer_animation_value_provider.h",
     "animation/scroll_offset_animation_curve.cc",
     "animation/scroll_offset_animation_curve.h",
+    "animation/target_property.cc",
+    "animation/target_property.h",
     "animation/timing_function.cc",
     "animation/timing_function.h",
     "animation/transform_operation.cc",
diff --git a/cc/animation/animation.cc b/cc/animation/animation.cc
index dfdaeb70..5c6fcd0f 100644
--- a/cc/animation/animation.cc
+++ b/cc/animation/animation.cc
@@ -27,27 +27,14 @@
               "RunStateEnumSize should equal the number of elements in "
               "s_runStateNames");
 
-// This should match the TargetProperty enum.
-static const char* const s_targetPropertyNames[] = {"TRANSFORM",
-                                                    "OPACITY",
-                                                    "FILTER",
-                                                    "SCROLL_OFFSET",
-                                                    "BACKGROUND_COLOR"};
-
-static_assert(static_cast<int>(cc::Animation::LAST_TARGET_PROPERTY) + 1 ==
-                  arraysize(s_targetPropertyNames),
-              "TargetPropertyEnumSize should equal the number of elements in "
-              "s_targetPropertyNames");
-
 }  // namespace
 
 namespace cc {
 
-scoped_ptr<Animation> Animation::Create(
-    scoped_ptr<AnimationCurve> curve,
-    int animation_id,
-    int group_id,
-    TargetProperty target_property) {
+scoped_ptr<Animation> Animation::Create(scoped_ptr<AnimationCurve> curve,
+                                        int animation_id,
+                                        int group_id,
+                                        TargetProperty::Type target_property) {
   return make_scoped_ptr(
       new Animation(std::move(curve), animation_id, group_id, target_property));
 }
@@ -55,7 +42,7 @@
 Animation::Animation(scoped_ptr<AnimationCurve> curve,
                      int animation_id,
                      int group_id,
-                     TargetProperty target_property)
+                     TargetProperty::Type target_property)
     : curve_(std::move(curve)),
       id_(animation_id),
       group_(group_id),
@@ -85,11 +72,8 @@
     return;
 
   char name_buffer[256];
-  base::snprintf(name_buffer,
-                 sizeof(name_buffer),
-                 "%s-%d",
-                 s_targetPropertyNames[target_property_],
-                 group_);
+  base::snprintf(name_buffer, sizeof(name_buffer), "%s-%d",
+                 TargetProperty::GetName(target_property_), group_);
 
   bool is_waiting_to_start =
       run_state_ == WAITING_FOR_TARGET_AVAILABILITY || run_state_ == STARTING;
diff --git a/cc/animation/animation.h b/cc/animation/animation.h
index fb8f8d82..645b71f 100644
--- a/cc/animation/animation.h
+++ b/cc/animation/animation.h
@@ -8,6 +8,7 @@
 #include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/time/time.h"
+#include "cc/animation/target_property.h"
 #include "cc/base/cc_export.h"
 
 namespace cc {
@@ -39,16 +40,6 @@
     LAST_RUN_STATE = ABORTED
   };
 
-  enum TargetProperty {
-    TRANSFORM = 0,
-    OPACITY,
-    FILTER,
-    SCROLL_OFFSET,
-    BACKGROUND_COLOR,
-    // This sentinel must be last.
-    LAST_TARGET_PROPERTY = BACKGROUND_COLOR
-  };
-
   enum Direction {
     DIRECTION_NORMAL,
     DIRECTION_REVERSE,
@@ -66,13 +57,13 @@
   static scoped_ptr<Animation> Create(scoped_ptr<AnimationCurve> curve,
                                       int animation_id,
                                       int group_id,
-                                      TargetProperty target_property);
+                                      TargetProperty::Type target_property);
 
   virtual ~Animation();
 
   int id() const { return id_; }
   int group() const { return group_; }
-  TargetProperty target_property() const { return target_property_; }
+  TargetProperty::Type target_property() const { return target_property_; }
 
   RunState run_state() const { return run_state_; }
   void SetRunState(RunState run_state, base::TimeTicks monotonic_time);
@@ -175,7 +166,7 @@
   Animation(scoped_ptr<AnimationCurve> curve,
             int animation_id,
             int group_id,
-            TargetProperty target_property);
+            TargetProperty::Type target_property);
 
   base::TimeDelta ConvertToActiveTime(base::TimeTicks monotonic_time) const;
 
@@ -190,7 +181,7 @@
   // all animations in the group have finished animating.
   int group_;
 
-  TargetProperty target_property_;
+  TargetProperty::Type target_property_;
   RunState run_state_;
   double iterations_;
   double iteration_start_;
diff --git a/cc/animation/animation_delegate.h b/cc/animation/animation_delegate.h
index 6064c7e..732e693 100644
--- a/cc/animation/animation_delegate.h
+++ b/cc/animation/animation_delegate.h
@@ -13,15 +13,14 @@
 class CC_EXPORT AnimationDelegate {
  public:
   virtual void NotifyAnimationStarted(base::TimeTicks monotonic_time,
-                                      Animation::TargetProperty target_property,
+                                      TargetProperty::Type target_property,
                                       int group) = 0;
-  virtual void NotifyAnimationFinished(
-      base::TimeTicks monotonic_time,
-      Animation::TargetProperty target_property,
-      int group) = 0;
+  virtual void NotifyAnimationFinished(base::TimeTicks monotonic_time,
+                                       TargetProperty::Type target_property,
+                                       int group) = 0;
 
   virtual void NotifyAnimationAborted(base::TimeTicks monotonic_time,
-                                      Animation::TargetProperty target_property,
+                                      TargetProperty::Type target_property,
                                       int group) = 0;
 
  protected:
diff --git a/cc/animation/animation_events.cc b/cc/animation/animation_events.cc
index bdf6592..edd435b7 100644
--- a/cc/animation/animation_events.cc
+++ b/cc/animation/animation_events.cc
@@ -9,7 +9,7 @@
 AnimationEvent::AnimationEvent(AnimationEvent::Type type,
                                int layer_id,
                                int group_id,
-                               Animation::TargetProperty target_property,
+                               TargetProperty::Type target_property,
                                base::TimeTicks monotonic_time)
     : type(type),
       layer_id(layer_id),
@@ -17,8 +17,7 @@
       target_property(target_property),
       monotonic_time(monotonic_time),
       is_impl_only(false),
-      opacity(0.f) {
-}
+      opacity(0.f) {}
 
 AnimationEvent::AnimationEvent(const AnimationEvent& other) = default;
 
diff --git a/cc/animation/animation_events.h b/cc/animation/animation_events.h
index b65a678b..650b9b5 100644
--- a/cc/animation/animation_events.h
+++ b/cc/animation/animation_events.h
@@ -20,14 +20,14 @@
   AnimationEvent(Type type,
                  int layer_id,
                  int group_id,
-                 Animation::TargetProperty target_property,
+                 TargetProperty::Type target_property,
                  base::TimeTicks monotonic_time);
   AnimationEvent(const AnimationEvent& other);
 
   Type type;
   int layer_id;
   int group_id;
-  Animation::TargetProperty target_property;
+  TargetProperty::Type target_property;
   base::TimeTicks monotonic_time;
   bool is_impl_only;
   float opacity;
diff --git a/cc/animation/animation_host.cc b/cc/animation/animation_host.cc
index cf34e38..2165fe0c 100644
--- a/cc/animation/animation_host.cc
+++ b/cc/animation/animation_host.cc
@@ -54,7 +54,7 @@
 
     scoped_ptr<Animation> animation = Animation::Create(
         std::move(curve), AnimationIdProvider::NextAnimationId(),
-        AnimationIdProvider::NextGroupId(), Animation::SCROLL_OFFSET);
+        AnimationIdProvider::NextGroupId(), TargetProperty::SCROLL_OFFSET);
     animation->set_is_impl_only(true);
 
     DCHECK(scroll_offset_animation_player_);
@@ -77,7 +77,7 @@
 
     Animation* animation = scroll_offset_animation_player_->element_animations()
                                ->layer_animation_controller()
-                               ->GetAnimation(Animation::SCROLL_OFFSET);
+                               ->GetAnimation(TargetProperty::SCROLL_OFFSET);
     if (!animation) {
       scroll_offset_animation_player_->DetachLayer();
       return false;
@@ -100,22 +100,23 @@
 
   void ScrollAnimationAbort() {
     DCHECK(scroll_offset_animation_player_);
-    scroll_offset_animation_player_->AbortAnimations(Animation::SCROLL_OFFSET);
+    scroll_offset_animation_player_->AbortAnimations(
+        TargetProperty::SCROLL_OFFSET);
   }
 
   // AnimationDelegate implementation.
   void NotifyAnimationStarted(base::TimeTicks monotonic_time,
-                              Animation::TargetProperty target_property,
+                              TargetProperty::Type target_property,
                               int group) override {}
   void NotifyAnimationFinished(base::TimeTicks monotonic_time,
-                               Animation::TargetProperty target_property,
+                               TargetProperty::Type target_property,
                                int group) override {
-    DCHECK_EQ(target_property, Animation::SCROLL_OFFSET);
+    DCHECK_EQ(target_property, TargetProperty::SCROLL_OFFSET);
     DCHECK(animation_host_->mutator_host_client());
     animation_host_->mutator_host_client()->ScrollOffsetAnimationFinished();
   }
   void NotifyAnimationAborted(base::TimeTicks monotonic_time,
-                              Animation::TargetProperty target_property,
+                              TargetProperty::Type target_property,
                               int group) override {}
 
  private:
@@ -392,7 +393,7 @@
   LayerAnimationController* controller = GetControllerForLayerId(layer_id);
   return controller
              ? controller->IsCurrentlyAnimatingProperty(
-                   Animation::FILTER, ObserverTypeFromTreeType(tree_type))
+                   TargetProperty::FILTER, ObserverTypeFromTreeType(tree_type))
              : false;
 }
 
@@ -401,7 +402,7 @@
   LayerAnimationController* controller = GetControllerForLayerId(layer_id);
   return controller
              ? controller->IsCurrentlyAnimatingProperty(
-                   Animation::OPACITY, ObserverTypeFromTreeType(tree_type))
+                   TargetProperty::OPACITY, ObserverTypeFromTreeType(tree_type))
              : false;
 }
 
@@ -411,7 +412,8 @@
   LayerAnimationController* controller = GetControllerForLayerId(layer_id);
   return controller
              ? controller->IsCurrentlyAnimatingProperty(
-                   Animation::TRANSFORM, ObserverTypeFromTreeType(tree_type))
+                   TargetProperty::TRANSFORM,
+                   ObserverTypeFromTreeType(tree_type))
              : false;
 }
 
@@ -421,7 +423,7 @@
   LayerAnimationController* controller = GetControllerForLayerId(layer_id);
   return controller
              ? controller->IsPotentiallyAnimatingProperty(
-                   Animation::FILTER, ObserverTypeFromTreeType(tree_type))
+                   TargetProperty::FILTER, ObserverTypeFromTreeType(tree_type))
              : false;
 }
 
@@ -431,7 +433,7 @@
   LayerAnimationController* controller = GetControllerForLayerId(layer_id);
   return controller
              ? controller->IsPotentiallyAnimatingProperty(
-                   Animation::OPACITY, ObserverTypeFromTreeType(tree_type))
+                   TargetProperty::OPACITY, ObserverTypeFromTreeType(tree_type))
              : false;
 }
 
@@ -441,13 +443,14 @@
   LayerAnimationController* controller = GetControllerForLayerId(layer_id);
   return controller
              ? controller->IsPotentiallyAnimatingProperty(
-                   Animation::TRANSFORM, ObserverTypeFromTreeType(tree_type))
+                   TargetProperty::TRANSFORM,
+                   ObserverTypeFromTreeType(tree_type))
              : false;
 }
 
 bool AnimationHost::HasAnyAnimationTargetingProperty(
     int layer_id,
-    Animation::TargetProperty property) const {
+    TargetProperty::Type property) const {
   LayerAnimationController* controller = GetControllerForLayerId(layer_id);
   if (!controller)
     return false;
@@ -460,7 +463,7 @@
   if (!controller)
     return false;
 
-  Animation* animation = controller->GetAnimation(Animation::FILTER);
+  Animation* animation = controller->GetAnimation(TargetProperty::FILTER);
   return animation && animation->is_impl_only();
 }
 
@@ -469,7 +472,7 @@
   if (!controller)
     return false;
 
-  Animation* animation = controller->GetAnimation(Animation::OPACITY);
+  Animation* animation = controller->GetAnimation(TargetProperty::OPACITY);
   return animation && animation->is_impl_only();
 }
 
@@ -478,7 +481,7 @@
   if (!controller)
     return false;
 
-  Animation* animation = controller->GetAnimation(Animation::TRANSFORM);
+  Animation* animation = controller->GetAnimation(TargetProperty::TRANSFORM);
   return animation && animation->is_impl_only();
 }
 
diff --git a/cc/animation/animation_host.h b/cc/animation/animation_host.h
index 2cddf6a0..445209f 100644
--- a/cc/animation/animation_host.h
+++ b/cc/animation/animation_host.h
@@ -110,9 +110,8 @@
   bool HasPotentiallyRunningTransformAnimation(int layer_id,
                                                LayerTreeType tree_type) const;
 
-  bool HasAnyAnimationTargetingProperty(
-      int layer_id,
-      Animation::TargetProperty property) const;
+  bool HasAnyAnimationTargetingProperty(int layer_id,
+                                        TargetProperty::Type property) const;
 
   bool FilterIsAnimatingOnImplOnly(int layer_id) const;
   bool OpacityIsAnimatingOnImplOnly(int layer_id) const;
diff --git a/cc/animation/animation_player.cc b/cc/animation/animation_player.cc
index 52fa9a8..0c8ad3cb 100644
--- a/cc/animation/animation_player.cc
+++ b/cc/animation/animation_player.cc
@@ -119,7 +119,7 @@
 }
 
 void AnimationPlayer::AddAnimation(scoped_ptr<Animation> animation) {
-  DCHECK(animation->target_property() != Animation::SCROLL_OFFSET ||
+  DCHECK(animation->target_property() != TargetProperty::SCROLL_OFFSET ||
          (animation_host_ && animation_host_->SupportsScrollAnimations()));
 
   if (element_animations_) {
@@ -160,8 +160,7 @@
   SetNeedsCommit();
 }
 
-void AnimationPlayer::AbortAnimations(
-    Animation::TargetProperty target_property) {
+void AnimationPlayer::AbortAnimations(TargetProperty::Type target_property) {
   if (element_animations_) {
     element_animations_->layer_animation_controller()->AbortAnimations(
         target_property);
@@ -187,7 +186,7 @@
 
 void AnimationPlayer::NotifyAnimationStarted(
     base::TimeTicks monotonic_time,
-    Animation::TargetProperty target_property,
+    TargetProperty::Type target_property,
     int group) {
   if (layer_animation_delegate_)
     layer_animation_delegate_->NotifyAnimationStarted(monotonic_time,
@@ -196,7 +195,7 @@
 
 void AnimationPlayer::NotifyAnimationFinished(
     base::TimeTicks monotonic_time,
-    Animation::TargetProperty target_property,
+    TargetProperty::Type target_property,
     int group) {
   if (layer_animation_delegate_)
     layer_animation_delegate_->NotifyAnimationFinished(monotonic_time,
@@ -205,7 +204,7 @@
 
 void AnimationPlayer::NotifyAnimationAborted(
     base::TimeTicks monotonic_time,
-    Animation::TargetProperty target_property,
+    TargetProperty::Type target_property,
     int group) {
   if (layer_animation_delegate_)
     layer_animation_delegate_->NotifyAnimationAborted(monotonic_time,
diff --git a/cc/animation/animation_player.h b/cc/animation/animation_player.h
index 7d04c56..97883acd 100644
--- a/cc/animation/animation_player.h
+++ b/cc/animation/animation_player.h
@@ -69,19 +69,19 @@
   void PauseAnimation(int animation_id, double time_offset);
   void RemoveAnimation(int animation_id);
   void AbortAnimation(int animation_id);
-  void AbortAnimations(Animation::TargetProperty target_property);
+  void AbortAnimations(TargetProperty::Type target_property);
 
   void PushPropertiesTo(AnimationPlayer* player_impl);
 
   // AnimationDelegate routing.
   void NotifyAnimationStarted(base::TimeTicks monotonic_time,
-                              Animation::TargetProperty target_property,
+                              TargetProperty::Type target_property,
                               int group);
   void NotifyAnimationFinished(base::TimeTicks monotonic_time,
-                               Animation::TargetProperty target_property,
+                               TargetProperty::Type target_property,
                                int group);
   void NotifyAnimationAborted(base::TimeTicks monotonic_time,
-                              Animation::TargetProperty target_property,
+                              TargetProperty::Type target_property,
                               int group);
 
   // Whether this player has animations waiting to get sent to LAC.
diff --git a/cc/animation/animation_player_unittest.cc b/cc/animation/animation_player_unittest.cc
index d8030b3..6e165fd 100644
--- a/cc/animation/animation_player_unittest.cc
+++ b/cc/animation/animation_player_unittest.cc
@@ -123,18 +123,18 @@
   host_->PushPropertiesTo(host_impl_);
 
   EXPECT_FALSE(client_.IsPropertyMutated(layer_id_, LayerTreeType::ACTIVE,
-                                         Animation::OPACITY));
+                                         TargetProperty::OPACITY));
   EXPECT_FALSE(client_.IsPropertyMutated(layer_id_, LayerTreeType::ACTIVE,
-                                         Animation::TRANSFORM));
+                                         TargetProperty::TRANSFORM));
   EXPECT_FALSE(client_.IsPropertyMutated(layer_id_, LayerTreeType::ACTIVE,
-                                         Animation::FILTER));
+                                         TargetProperty::FILTER));
 
   EXPECT_FALSE(client_impl_.IsPropertyMutated(layer_id_, LayerTreeType::ACTIVE,
-                                              Animation::OPACITY));
+                                              TargetProperty::OPACITY));
   EXPECT_FALSE(client_impl_.IsPropertyMutated(layer_id_, LayerTreeType::ACTIVE,
-                                              Animation::TRANSFORM));
+                                              TargetProperty::TRANSFORM));
   EXPECT_FALSE(client_impl_.IsPropertyMutated(layer_id_, LayerTreeType::ACTIVE,
-                                              Animation::FILTER));
+                                              TargetProperty::FILTER));
 
   host_impl_->animation_registrar()->ActivateAnimations();
 
@@ -278,14 +278,14 @@
   host_->PushPropertiesTo(host_impl_);
 
   EXPECT_FALSE(client_.IsPropertyMutated(layer_id_, LayerTreeType::ACTIVE,
-                                         Animation::OPACITY));
+                                         TargetProperty::OPACITY));
   EXPECT_FALSE(client_impl_.IsPropertyMutated(layer_id_, LayerTreeType::ACTIVE,
-                                              Animation::OPACITY));
+                                              TargetProperty::OPACITY));
 
   EXPECT_FALSE(client_.IsPropertyMutated(layer_id_, LayerTreeType::ACTIVE,
-                                         Animation::FILTER));
+                                         TargetProperty::FILTER));
   EXPECT_FALSE(client_impl_.IsPropertyMutated(layer_id_, LayerTreeType::ACTIVE,
-                                              Animation::FILTER));
+                                              TargetProperty::FILTER));
 
   host_impl_->animation_registrar()->ActivateAnimations();
 
@@ -304,9 +304,9 @@
                                             end_opacity);
 
   EXPECT_FALSE(client_.IsPropertyMutated(layer_id_, LayerTreeType::ACTIVE,
-                                         Animation::FILTER));
+                                         TargetProperty::FILTER));
   EXPECT_FALSE(client_impl_.IsPropertyMutated(layer_id_, LayerTreeType::ACTIVE,
-                                              Animation::FILTER));
+                                              TargetProperty::FILTER));
 }
 
 TEST_F(AnimationPlayerTest, AddRemoveAnimationCausesSetNeedsCommit) {
diff --git a/cc/animation/animation_unittest.cc b/cc/animation/animation_unittest.cc
index 5a08912..3bb984a 100644
--- a/cc/animation/animation_unittest.cc
+++ b/cc/animation/animation_unittest.cc
@@ -23,7 +23,7 @@
                                       double playback_rate) {
   scoped_ptr<Animation> to_return(
       Animation::Create(make_scoped_ptr(new FakeFloatAnimationCurve(duration)),
-                        0, 1, Animation::OPACITY));
+                        0, 1, TargetProperty::OPACITY));
   to_return->set_iterations(iterations);
   to_return->set_playback_rate(playback_rate);
   return to_return;
diff --git a/cc/animation/element_animations.cc b/cc/animation/element_animations.cc
index cd3a736..e3c2224 100644
--- a/cc/animation/element_animations.cc
+++ b/cc/animation/element_animations.cc
@@ -239,7 +239,7 @@
 
 void ElementAnimations::NotifyAnimationStarted(
     base::TimeTicks monotonic_time,
-    Animation::TargetProperty target_property,
+    TargetProperty::Type target_property,
     int group) {
   for (PlayersListNode* node = players_list_->head();
        node != players_list_->end(); node = node->next()) {
@@ -250,7 +250,7 @@
 
 void ElementAnimations::NotifyAnimationFinished(
     base::TimeTicks monotonic_time,
-    Animation::TargetProperty target_property,
+    TargetProperty::Type target_property,
     int group) {
   for (PlayersListNode* node = players_list_->head();
        node != players_list_->end(); node = node->next()) {
@@ -261,7 +261,7 @@
 
 void ElementAnimations::NotifyAnimationAborted(
     base::TimeTicks monotonic_time,
-    Animation::TargetProperty target_property,
+    TargetProperty::Type target_property,
     int group) {
   for (PlayersListNode* node = players_list_->head();
        node != players_list_->end(); node = node->next()) {
diff --git a/cc/animation/element_animations.h b/cc/animation/element_animations.h
index 90090cfe..1c5ecc39 100644
--- a/cc/animation/element_animations.h
+++ b/cc/animation/element_animations.h
@@ -95,13 +95,13 @@
 
   // AnimationDelegate implementation
   void NotifyAnimationStarted(base::TimeTicks monotonic_time,
-                              Animation::TargetProperty target_property,
+                              TargetProperty::Type target_property,
                               int group) override;
   void NotifyAnimationFinished(base::TimeTicks monotonic_time,
-                               Animation::TargetProperty target_property,
+                               TargetProperty::Type target_property,
                                int group) override;
   void NotifyAnimationAborted(base::TimeTicks monotonic_time,
-                              Animation::TargetProperty target_property,
+                              TargetProperty::Type target_property,
                               int group) override;
 
   // LayerAnimationValueProvider implementation.
diff --git a/cc/animation/layer_animation_controller.cc b/cc/animation/layer_animation_controller.cc
index 6aa254c..1e8aa02ea 100644
--- a/cc/animation/layer_animation_controller.cc
+++ b/cc/animation/layer_animation_controller.cc
@@ -66,7 +66,7 @@
 
   for (const auto& animation : animations_) {
     if (!animation->is_finished() &&
-        animation->target_property() == Animation::TRANSFORM) {
+        animation->target_property() == TargetProperty::TRANSFORM) {
       potentially_animating_transform_for_active_observers_ |=
           animation->affects_active_observers();
       potentially_animating_transform_for_pending_observers_ |=
@@ -99,9 +99,9 @@
         return animation->id() != animation_id;
       });
   for (auto it = animations_to_remove; it != animations_.end(); ++it) {
-    if ((*it)->target_property() == Animation::SCROLL_OFFSET) {
+    if ((*it)->target_property() == TargetProperty::SCROLL_OFFSET) {
       scroll_offset_animation_was_interrupted_ = true;
-    } else if ((*it)->target_property() == Animation::TRANSFORM &&
+    } else if ((*it)->target_property() == TargetProperty::TRANSFORM &&
                !(*it)->is_finished()) {
       removed_transform_animation = true;
     }
@@ -118,7 +118,7 @@
   if (Animation* animation = GetAnimationById(animation_id)) {
     if (!animation->is_finished()) {
       animation->SetRunState(Animation::ABORTED, last_tick_time_);
-      if (animation->target_property() == Animation::TRANSFORM)
+      if (animation->target_property() == TargetProperty::TRANSFORM)
         aborted_transform_animation = true;
     }
   }
@@ -127,13 +127,13 @@
 }
 
 void LayerAnimationController::AbortAnimations(
-    Animation::TargetProperty target_property) {
+    TargetProperty::Type target_property) {
   bool aborted_transform_animation = false;
   for (size_t i = 0; i < animations_.size(); ++i) {
     if (animations_[i]->target_property() == target_property &&
         !animations_[i]->is_finished()) {
       animations_[i]->SetRunState(Animation::ABORTED, last_tick_time_);
-      if (target_property == Animation::TRANSFORM)
+      if (target_property == TargetProperty::TRANSFORM)
         aborted_transform_animation = true;
     }
   }
@@ -190,9 +190,9 @@
     base::TimeDelta trimmed =
         animation->TrimTimeToCurrentIteration(monotonic_time);
     switch (animation->target_property()) {
-      case Animation::OPACITY: {
+      case TargetProperty::OPACITY: {
         AnimationEvent event(AnimationEvent::PROPERTY_UPDATE, id_,
-                             animation->group(), Animation::OPACITY,
+                             animation->group(), TargetProperty::OPACITY,
                              monotonic_time);
         const FloatAnimationCurve* float_animation_curve =
             animation->curve()->ToFloatAnimationCurve();
@@ -202,9 +202,9 @@
         break;
       }
 
-      case Animation::TRANSFORM: {
+      case TargetProperty::TRANSFORM: {
         AnimationEvent event(AnimationEvent::PROPERTY_UPDATE, id_,
-                             animation->group(), Animation::TRANSFORM,
+                             animation->group(), TargetProperty::TRANSFORM,
                              monotonic_time);
         const TransformAnimationCurve* transform_animation_curve =
             animation->curve()->ToTransformAnimationCurve();
@@ -214,9 +214,9 @@
         break;
       }
 
-      case Animation::FILTER: {
+      case TargetProperty::FILTER: {
         AnimationEvent event(AnimationEvent::PROPERTY_UPDATE, id_,
-                             animation->group(), Animation::FILTER,
+                             animation->group(), TargetProperty::FILTER,
                              monotonic_time);
         const FilterAnimationCurve* filter_animation_curve =
             animation->curve()->ToFilterAnimationCurve();
@@ -226,11 +226,11 @@
         break;
       }
 
-      case Animation::BACKGROUND_COLOR: {
+      case TargetProperty::BACKGROUND_COLOR: {
         break;
       }
 
-      case Animation::SCROLL_OFFSET: {
+      case TargetProperty::SCROLL_OFFSET: {
         // Impl-side changes to scroll offset are already sent back to the
         // main thread (e.g. for user-driven scrolling), so a PROPERTY_UPDATE
         // isn't needed.
@@ -271,7 +271,7 @@
   for (size_t i = 0; i < animations_.size(); ++i) {
     if (animations_[i]->affects_active_observers() !=
             animations_[i]->affects_pending_observers() &&
-        animations_[i]->target_property() == Animation::TRANSFORM)
+        animations_[i]->target_property() == TargetProperty::TRANSFORM)
       changed_transform_animation = true;
     animations_[i]->set_affects_active_observers(
         animations_[i]->affects_pending_observers());
@@ -291,7 +291,7 @@
 
 void LayerAnimationController::AddAnimation(scoped_ptr<Animation> animation) {
   bool added_transform_animation =
-      animation->target_property() == Animation::TRANSFORM;
+      animation->target_property() == TargetProperty::TRANSFORM;
   animations_.push_back(std::move(animation));
   needs_to_start_animations_ = true;
   UpdateActivation(NORMAL_ACTIVATION);
@@ -300,7 +300,7 @@
 }
 
 Animation* LayerAnimationController::GetAnimation(
-    Animation::TargetProperty target_property) const {
+    TargetProperty::Type target_property) const {
   for (size_t i = 0; i < animations_.size(); ++i) {
     size_t index = animations_.size() - i - 1;
     if (animations_[index]->target_property() == target_property)
@@ -325,7 +325,7 @@
 }
 
 bool LayerAnimationController::IsPotentiallyAnimatingProperty(
-    Animation::TargetProperty target_property,
+    TargetProperty::Type target_property,
     ObserverType observer_type) const {
   for (size_t i = 0; i < animations_.size(); ++i) {
     if (!animations_[i]->is_finished() &&
@@ -341,7 +341,7 @@
 }
 
 bool LayerAnimationController::IsCurrentlyAnimatingProperty(
-    Animation::TargetProperty target_property,
+    TargetProperty::Type target_property,
     ObserverType observer_type) const {
   for (size_t i = 0; i < animations_.size(); ++i) {
     if (!animations_[i]->is_finished() &&
@@ -435,7 +435,7 @@
       if (layer_animation_delegate_)
         layer_animation_delegate_->NotifyAnimationAborted(
             event.monotonic_time, event.target_property, event.group_id);
-      if (event.target_property == Animation::TRANSFORM)
+      if (event.target_property == TargetProperty::TRANSFORM)
         aborted_transform_animation = true;
     }
   }
@@ -448,11 +448,11 @@
   bool notify_active_observers = true;
   bool notify_pending_observers = true;
   switch (event.target_property) {
-    case Animation::OPACITY:
+    case TargetProperty::OPACITY:
       NotifyObserversOpacityAnimated(
           event.opacity, notify_active_observers, notify_pending_observers);
       break;
-    case Animation::TRANSFORM:
+    case TargetProperty::TRANSFORM:
       NotifyObserversTransformAnimated(
           event.transform, notify_active_observers, notify_pending_observers);
       break;
@@ -486,7 +486,7 @@
 bool LayerAnimationController::HasFilterAnimationThatInflatesBounds() const {
   for (size_t i = 0; i < animations_.size(); ++i) {
     if (!animations_[i]->is_finished() &&
-        animations_[i]->target_property() == Animation::FILTER &&
+        animations_[i]->target_property() == TargetProperty::FILTER &&
         animations_[i]
             ->curve()
             ->ToFilterAnimationCurve()
@@ -498,9 +498,9 @@
 }
 
 bool LayerAnimationController::HasTransformAnimationThatInflatesBounds() const {
-  return IsCurrentlyAnimatingProperty(Animation::TRANSFORM,
+  return IsCurrentlyAnimatingProperty(TargetProperty::TRANSFORM,
                                       ObserverType::ACTIVE) ||
-         IsCurrentlyAnimatingProperty(Animation::TRANSFORM,
+         IsCurrentlyAnimatingProperty(TargetProperty::TRANSFORM,
                                       ObserverType::PENDING);
 }
 
@@ -525,7 +525,7 @@
   *bounds = gfx::BoxF();
   for (size_t i = 0; i < animations_.size(); ++i) {
     if (animations_[i]->is_finished() ||
-        animations_[i]->target_property() != Animation::TRANSFORM)
+        animations_[i]->target_property() != TargetProperty::TRANSFORM)
       continue;
 
     const TransformAnimationCurve* transform_animation_curve =
@@ -544,7 +544,7 @@
 bool LayerAnimationController::HasAnimationThatAffectsScale() const {
   for (size_t i = 0; i < animations_.size(); ++i) {
     if (animations_[i]->is_finished() ||
-        animations_[i]->target_property() != Animation::TRANSFORM)
+        animations_[i]->target_property() != TargetProperty::TRANSFORM)
       continue;
 
     const TransformAnimationCurve* transform_animation_curve =
@@ -560,7 +560,7 @@
     ObserverType observer_type) const {
   for (size_t i = 0; i < animations_.size(); ++i) {
     if (animations_[i]->is_finished() ||
-        animations_[i]->target_property() != Animation::TRANSFORM)
+        animations_[i]->target_property() != TargetProperty::TRANSFORM)
       continue;
 
     if ((observer_type == ObserverType::ACTIVE &&
@@ -581,7 +581,7 @@
 bool LayerAnimationController::AnimationsPreserveAxisAlignment() const {
   for (size_t i = 0; i < animations_.size(); ++i) {
     if (animations_[i]->is_finished() ||
-        animations_[i]->target_property() != Animation::TRANSFORM)
+        animations_[i]->target_property() != TargetProperty::TRANSFORM)
       continue;
 
     const TransformAnimationCurve* transform_animation_curve =
@@ -598,7 +598,7 @@
   *start_scale = 0.f;
   for (size_t i = 0; i < animations_.size(); ++i) {
     if (animations_[i]->is_finished() ||
-        animations_[i]->target_property() != Animation::TRANSFORM)
+        animations_[i]->target_property() != TargetProperty::TRANSFORM)
       continue;
 
     if ((observer_type == ObserverType::ACTIVE &&
@@ -635,7 +635,7 @@
   *max_scale = 0.f;
   for (size_t i = 0; i < animations_.size(); ++i) {
     if (animations_[i]->is_finished() ||
-        animations_[i]->target_property() != Animation::TRANSFORM)
+        animations_[i]->target_property() != TargetProperty::TRANSFORM)
       continue;
 
     if ((observer_type == ObserverType::ACTIVE &&
@@ -678,7 +678,7 @@
     if (controller_impl->GetAnimationById(animations_[i]->id()))
       continue;
 
-    if (animations_[i]->target_property() == Animation::SCROLL_OFFSET &&
+    if (animations_[i]->target_property() == TargetProperty::SCROLL_OFFSET &&
         !animations_[i]
              ->curve()
              ->ToScrollOffsetAnimationCurve()
@@ -728,7 +728,7 @@
   for (const auto& animation : animations) {
     if (IsCompleted(animation.get(), this)) {
       animation->set_affects_pending_observers(false);
-      if (animation->target_property() == Animation::TRANSFORM)
+      if (animation->target_property() == TargetProperty::TRANSFORM)
         removed_transform_animation = true;
     }
   }
@@ -884,7 +884,7 @@
     if (!animations_[i]->is_finished() &&
         animations_[i]->IsFinishedAt(monotonic_time)) {
       animations_[i]->SetRunState(Animation::FINISHED, monotonic_time);
-      if (animations_[i]->target_property() == Animation::TRANSFORM) {
+      if (animations_[i]->target_property() == TargetProperty::TRANSFORM) {
         finished_transform_animation = true;
       }
     }
@@ -1006,7 +1006,7 @@
                                     controller_impl->last_tick_time_);
         animation->SetRunState(Animation::WAITING_FOR_DELETION,
                                last_tick_time_);
-        if (animation_impl->target_property() == Animation::TRANSFORM) {
+        if (animation_impl->target_property() == TargetProperty::TRANSFORM) {
           aborted_transform_animation = true;
         }
       }
@@ -1038,7 +1038,7 @@
           animations_[i]->TrimTimeToCurrentIteration(monotonic_time);
 
       switch (animations_[i]->target_property()) {
-        case Animation::TRANSFORM: {
+        case TargetProperty::TRANSFORM: {
           const TransformAnimationCurve* transform_animation_curve =
               animations_[i]->curve()->ToTransformAnimationCurve();
           const gfx::Transform transform =
@@ -1050,7 +1050,7 @@
           break;
         }
 
-        case Animation::OPACITY: {
+        case TargetProperty::OPACITY: {
           const FloatAnimationCurve* float_animation_curve =
               animations_[i]->curve()->ToFloatAnimationCurve();
           const float opacity = std::max(
@@ -1062,7 +1062,7 @@
           break;
         }
 
-        case Animation::FILTER: {
+        case TargetProperty::FILTER: {
           const FilterAnimationCurve* filter_animation_curve =
               animations_[i]->curve()->ToFilterAnimationCurve();
           const FilterOperations filter =
@@ -1074,12 +1074,12 @@
           break;
         }
 
-        case Animation::BACKGROUND_COLOR: {
+        case TargetProperty::BACKGROUND_COLOR: {
           // Not yet implemented.
           break;
         }
 
-        case Animation::SCROLL_OFFSET: {
+        case TargetProperty::SCROLL_OFFSET: {
           const ScrollOffsetAnimationCurve* scroll_offset_animation_curve =
               animations_[i]->curve()->ToScrollOffsetAnimationCurve();
           const gfx::ScrollOffset scroll_offset =
diff --git a/cc/animation/layer_animation_controller.h b/cc/animation/layer_animation_controller.h
index 70c76d10..a364172c 100644
--- a/cc/animation/layer_animation_controller.h
+++ b/cc/animation/layer_animation_controller.h
@@ -47,7 +47,7 @@
   void PauseAnimation(int animation_id, base::TimeDelta time_offset);
   void RemoveAnimation(int animation_id);
   void AbortAnimation(int animation_id);
-  void AbortAnimations(Animation::TargetProperty target_property);
+  void AbortAnimations(TargetProperty::Type target_property);
 
   // Ensures that the list of active animations on the main thread and the impl
   // thread are kept in sync. This function does not take ownership of the impl
@@ -68,7 +68,7 @@
 
   // Returns the active animation animating the given property that is either
   // running, or is next to run, if such an animation exists.
-  Animation* GetAnimation(Animation::TargetProperty target_property) const;
+  Animation* GetAnimation(TargetProperty::Type target_property) const;
 
   // Returns the active animation for the given unique animation id.
   Animation* GetAnimationById(int animation_id) const;
@@ -83,12 +83,12 @@
   // Returns true if there is an animation that is either currently animating
   // the given property or scheduled to animate this property in the future, and
   // that affects the given observer type.
-  bool IsPotentiallyAnimatingProperty(Animation::TargetProperty target_property,
+  bool IsPotentiallyAnimatingProperty(TargetProperty::Type target_property,
                                       ObserverType observer_type) const;
 
   // Returns true if there is an animation that is currently animating the given
   // property and that affects the given observer type.
-  bool IsCurrentlyAnimatingProperty(Animation::TargetProperty target_property,
+  bool IsCurrentlyAnimatingProperty(TargetProperty::Type target_property,
                                     ObserverType observer_type) const;
 
   void SetAnimationRegistrar(AnimationRegistrar* registrar);
diff --git a/cc/animation/layer_animation_controller_unittest.cc b/cc/animation/layer_animation_controller_unittest.cc
index 2f5f37e..764b4709 100644
--- a/cc/animation/layer_animation_controller_unittest.cc
+++ b/cc/animation/layer_animation_controller_unittest.cc
@@ -38,7 +38,7 @@
 
 scoped_ptr<Animation> CreateAnimation(scoped_ptr<AnimationCurve> curve,
                                       int group_id,
-                                      Animation::TargetProperty property) {
+                                      TargetProperty::Type property) {
   return Animation::Create(std::move(curve), 0, group_id, property);
 }
 
@@ -52,7 +52,7 @@
       LayerAnimationController::Create(0));
   controller->AddValueObserver(&dummy);
 
-  EXPECT_FALSE(controller_impl->GetAnimation(Animation::OPACITY));
+  EXPECT_FALSE(controller_impl->GetAnimation(TargetProperty::OPACITY));
 
   EXPECT_FALSE(controller->needs_to_start_animations_for_testing());
   EXPECT_FALSE(controller_impl->needs_to_start_animations_for_testing());
@@ -85,7 +85,7 @@
   controller->AddValueObserver(&dummy);
   controller->set_value_provider(&dummy_provider);
 
-  EXPECT_FALSE(controller_impl->GetAnimation(Animation::SCROLL_OFFSET));
+  EXPECT_FALSE(controller_impl->GetAnimation(TargetProperty::SCROLL_OFFSET));
 
   EXPECT_FALSE(controller->needs_to_start_animations_for_testing());
   EXPECT_FALSE(controller_impl->needs_to_start_animations_for_testing());
@@ -103,7 +103,7 @@
   curve_fixed->SetInitialValue(initial_value);
   scoped_ptr<Animation> animation_fixed(
       Animation::Create(std::move(curve_fixed), 1 /* animation_id */, 0,
-                        Animation::SCROLL_OFFSET));
+                        TargetProperty::SCROLL_OFFSET));
   controller->AddAnimation(std::move(animation_fixed));
   controller->PushAnimationUpdatesTo(controller_impl.get());
   EXPECT_VECTOR2DF_EQ(initial_value, controller_impl->GetAnimationById(1)
@@ -115,8 +115,9 @@
   scoped_ptr<ScrollOffsetAnimationCurve> curve(
       ScrollOffsetAnimationCurve::Create(target_value,
                                          EaseInOutTimingFunction::Create()));
-  scoped_ptr<Animation> animation(Animation::Create(
-      std::move(curve), 2 /* animation id */, 0, Animation::SCROLL_OFFSET));
+  scoped_ptr<Animation> animation(
+      Animation::Create(std::move(curve), 2 /* animation id */, 0,
+                        TargetProperty::SCROLL_OFFSET));
   controller->AddAnimation(std::move(animation));
   controller->PushAnimationUpdatesTo(controller_impl.get());
   EXPECT_VECTOR2DF_EQ(provider_initial_value,
@@ -138,7 +139,7 @@
       LayerAnimationController::Create(0));
   controller->AddValueObserver(&dummy);
 
-  EXPECT_FALSE(controller_impl->GetAnimation(Animation::OPACITY));
+  EXPECT_FALSE(controller_impl->GetAnimation(TargetProperty::OPACITY));
 
   int animation_id =
       AddOpacityTransitionToController(controller.get(), 1, 0, 1, false);
@@ -181,7 +182,7 @@
       AddOpacityTransitionToController(controller.get(), 1, 0, 1, false);
 
   const TimeTicks start_time = TicksFromSecondsF(123);
-  controller->GetAnimation(Animation::OPACITY)->set_start_time(start_time);
+  controller->GetAnimation(TargetProperty::OPACITY)->set_start_time(start_time);
 
   controller->PushAnimationUpdatesTo(controller_impl.get());
   controller_impl->ActivateAnimations();
@@ -264,7 +265,7 @@
   controller->Animate(kInitialTickTime + TimeDelta::FromMilliseconds(1000));
   controller->UpdateState(true, nullptr);
   EXPECT_EQ(Animation::FINISHED,
-            controller->GetAnimation(Animation::OPACITY)->run_state());
+            controller->GetAnimation(TargetProperty::OPACITY)->run_state());
   EXPECT_EQ(1u, registrar->active_animation_controllers_for_testing().size());
 
   events.reset(new AnimationEvents);
@@ -272,8 +273,9 @@
                            TimeDelta::FromMilliseconds(1500));
   controller_impl->UpdateState(true, events.get());
 
-  EXPECT_EQ(Animation::WAITING_FOR_DELETION,
-            controller_impl->GetAnimation(Animation::OPACITY)->run_state());
+  EXPECT_EQ(
+      Animation::WAITING_FOR_DELETION,
+      controller_impl->GetAnimation(TargetProperty::OPACITY)->run_state());
   // The impl thread controller should have de-activated.
   EXPECT_EQ(0u,
             registrar_impl->active_animation_controllers_for_testing().size());
@@ -284,7 +286,7 @@
   controller->UpdateState(true, nullptr);
 
   EXPECT_EQ(Animation::WAITING_FOR_DELETION,
-            controller->GetAnimation(Animation::OPACITY)->run_state());
+            controller->GetAnimation(TargetProperty::OPACITY)->run_state());
   // The main thread controller should have de-activated.
   EXPECT_EQ(0u, registrar->active_animation_controllers_for_testing().size());
 
@@ -310,7 +312,7 @@
       LayerAnimationController::Create(0));
   controller->AddValueObserver(&dummy);
 
-  EXPECT_FALSE(controller_impl->GetAnimation(Animation::OPACITY));
+  EXPECT_FALSE(controller_impl->GetAnimation(TargetProperty::OPACITY));
 
   // Two steps, three ranges: [0-1) -> 0.2, [1-2) -> 0.3, [2-3] -> 0.4.
   const double duration = 3.0;
@@ -387,7 +389,7 @@
   controller->AddValueObserver(&dummy);
   scoped_ptr<AnimationEvents> events(make_scoped_ptr(new AnimationEvents));
 
-  EXPECT_FALSE(controller_impl->GetAnimation(Animation::OPACITY));
+  EXPECT_FALSE(controller_impl->GetAnimation(TargetProperty::OPACITY));
 
   int animation_id =
       AddOpacityTransitionToController(controller.get(), 1, 0, 1, false);
@@ -471,8 +473,8 @@
   EXPECT_EQ(AnimationEvent::FINISHED, events->events_[0].type);
 
   // Neither controller should have deleted the animation yet.
-  EXPECT_TRUE(controller->GetAnimation(Animation::OPACITY));
-  EXPECT_TRUE(controller_impl->GetAnimation(Animation::OPACITY));
+  EXPECT_TRUE(controller->GetAnimation(TargetProperty::OPACITY));
+  EXPECT_TRUE(controller_impl->GetAnimation(TargetProperty::OPACITY));
 
   controller->NotifyAnimationFinished(events->events_[0]);
 
@@ -511,7 +513,7 @@
 
   scoped_ptr<Animation> to_add(CreateAnimation(
       scoped_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 0.f, 1.f)), 1,
-      Animation::OPACITY));
+      TargetProperty::OPACITY));
 
   EXPECT_FALSE(controller->needs_to_start_animations_for_testing());
   controller->AddAnimation(std::move(to_add));
@@ -541,7 +543,7 @@
 
   scoped_ptr<Animation> to_add(CreateAnimation(
       scoped_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 0.f, 1.f)), 1,
-      Animation::OPACITY));
+      TargetProperty::OPACITY));
   to_add->set_is_impl_only(true);
 
   controller_impl->AddAnimation(std::move(to_add));
@@ -589,7 +591,7 @@
       base::TimeDelta::FromSecondsD(1.0), operations, nullptr));
 
   scoped_ptr<Animation> animation(
-      Animation::Create(std::move(curve), 1, 0, Animation::TRANSFORM));
+      Animation::Create(std::move(curve), 1, 0, TargetProperty::TRANSFORM));
   animation->set_is_impl_only(true);
   controller_impl->AddAnimation(std::move(animation));
 
@@ -640,7 +642,7 @@
                                             end_filters, nullptr));
 
   scoped_ptr<Animation> animation(
-      Animation::Create(std::move(curve), 1, 0, Animation::FILTER));
+      Animation::Create(std::move(curve), 1, 0, TargetProperty::FILTER));
   controller->AddAnimation(std::move(animation));
 
   controller->Animate(kInitialTickTime);
@@ -688,7 +690,7 @@
                                             end_filters, nullptr));
 
   scoped_ptr<Animation> animation(
-      Animation::Create(std::move(curve), 1, 0, Animation::FILTER));
+      Animation::Create(std::move(curve), 1, 0, TargetProperty::FILTER));
   animation->set_is_impl_only(true);
   controller_impl->AddAnimation(std::move(animation));
 
@@ -739,20 +741,21 @@
                                          EaseInOutTimingFunction::Create()));
 
   scoped_ptr<Animation> animation(
-      Animation::Create(std::move(curve), 1, 0, Animation::SCROLL_OFFSET));
+      Animation::Create(std::move(curve), 1, 0, TargetProperty::SCROLL_OFFSET));
   animation->set_needs_synchronized_start_time(true);
   controller->AddAnimation(std::move(animation));
 
   dummy_provider_impl.set_scroll_offset(initial_value);
   controller->PushAnimationUpdatesTo(controller_impl.get());
   controller_impl->ActivateAnimations();
-  EXPECT_TRUE(controller_impl->GetAnimation(Animation::SCROLL_OFFSET));
-  TimeDelta duration = controller_impl->GetAnimation(Animation::SCROLL_OFFSET)
-                           ->curve()
-                           ->Duration();
-  EXPECT_EQ(
-      duration,
-      controller->GetAnimation(Animation::SCROLL_OFFSET)->curve()->Duration());
+  EXPECT_TRUE(controller_impl->GetAnimation(TargetProperty::SCROLL_OFFSET));
+  TimeDelta duration =
+      controller_impl->GetAnimation(TargetProperty::SCROLL_OFFSET)
+          ->curve()
+          ->Duration();
+  EXPECT_EQ(duration, controller->GetAnimation(TargetProperty::SCROLL_OFFSET)
+                          ->curve()
+                          ->Duration());
 
   controller->Animate(kInitialTickTime);
   controller->UpdateState(true, nullptr);
@@ -816,20 +819,21 @@
                                          EaseInOutTimingFunction::Create()));
 
   scoped_ptr<Animation> animation(
-      Animation::Create(std::move(curve), 1, 0, Animation::SCROLL_OFFSET));
+      Animation::Create(std::move(curve), 1, 0, TargetProperty::SCROLL_OFFSET));
   animation->set_needs_synchronized_start_time(true);
   controller->AddAnimation(std::move(animation));
 
   dummy_provider.set_scroll_offset(initial_value);
   controller->PushAnimationUpdatesTo(controller_impl.get());
   controller_impl->ActivateAnimations();
-  EXPECT_TRUE(controller_impl->GetAnimation(Animation::SCROLL_OFFSET));
-  TimeDelta duration = controller_impl->GetAnimation(Animation::SCROLL_OFFSET)
-                           ->curve()
-                           ->Duration();
-  EXPECT_EQ(
-      duration,
-      controller->GetAnimation(Animation::SCROLL_OFFSET)->curve()->Duration());
+  EXPECT_TRUE(controller_impl->GetAnimation(TargetProperty::SCROLL_OFFSET));
+  TimeDelta duration =
+      controller_impl->GetAnimation(TargetProperty::SCROLL_OFFSET)
+          ->curve()
+          ->Duration();
+  EXPECT_EQ(duration, controller->GetAnimation(TargetProperty::SCROLL_OFFSET)
+                          ->curve()
+                          ->Duration());
 
   controller->Animate(kInitialTickTime);
   controller->UpdateState(true, nullptr);
@@ -886,7 +890,7 @@
   double duration_in_seconds = curve->Duration().InSecondsF();
 
   scoped_ptr<Animation> animation(
-      Animation::Create(std::move(curve), 1, 0, Animation::SCROLL_OFFSET));
+      Animation::Create(std::move(curve), 1, 0, TargetProperty::SCROLL_OFFSET));
   animation->set_is_impl_only(true);
   controller_impl->AddAnimation(std::move(animation));
 
@@ -939,7 +943,7 @@
 
   int animation_id = 1;
   scoped_ptr<Animation> animation(Animation::Create(
-      std::move(curve), animation_id, 0, Animation::SCROLL_OFFSET));
+      std::move(curve), animation_id, 0, TargetProperty::SCROLL_OFFSET));
   animation->set_needs_synchronized_start_time(true);
   controller->AddAnimation(std::move(animation));
   controller->PushAnimationUpdatesTo(controller_impl.get());
@@ -961,7 +965,7 @@
   curve = ScrollOffsetAnimationCurve::Create(target_value,
                                              EaseInOutTimingFunction::Create());
   animation = Animation::Create(std::move(curve), animation_id, 0,
-                                Animation::SCROLL_OFFSET);
+                                TargetProperty::SCROLL_OFFSET);
   animation->set_needs_synchronized_start_time(true);
   controller->AddAnimation(std::move(animation));
   controller->PushAnimationUpdatesTo(controller_impl.get());
@@ -1024,20 +1028,20 @@
         start_time_(base::TimeTicks()) {}
 
   void NotifyAnimationStarted(TimeTicks monotonic_time,
-                              Animation::TargetProperty target_property,
+                              TargetProperty::Type target_property,
                               int group) override {
     started_ = true;
     start_time_ = monotonic_time;
   }
 
   void NotifyAnimationFinished(TimeTicks monotonic_time,
-                               Animation::TargetProperty target_property,
+                               TargetProperty::Type target_property,
                                int group) override {
     finished_ = true;
   }
 
   void NotifyAnimationAborted(TimeTicks monotonic_time,
-                              Animation::TargetProperty target_property,
+                              TargetProperty::Type target_property,
                               int group) override {
     aborted_ = true;
   }
@@ -1071,7 +1075,7 @@
 
   scoped_ptr<Animation> to_add(CreateAnimation(
       scoped_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 0.f, 1.f)), 1,
-      Animation::OPACITY));
+      TargetProperty::OPACITY));
   to_add->set_is_impl_only(true);
   controller_impl->AddAnimation(std::move(to_add));
 
@@ -1111,7 +1115,7 @@
       AddOpacityTransitionToController(controller.get(), 1, 0, 1, false);
 
   const TimeTicks start_time = TicksFromSecondsF(123);
-  controller->GetAnimation(Animation::OPACITY)->set_start_time(start_time);
+  controller->GetAnimation(TargetProperty::OPACITY)->set_start_time(start_time);
 
   controller->PushAnimationUpdatesTo(controller_impl.get());
   controller_impl->ActivateAnimations();
@@ -1163,7 +1167,7 @@
       AddOpacityTransitionToController(controller.get(), 1, 0, 1, false);
 
   const TimeTicks start_time = TicksFromSecondsF(123);
-  controller->GetAnimation(Animation::OPACITY)->set_start_time(start_time);
+  controller->GetAnimation(TargetProperty::OPACITY)->set_start_time(start_time);
 
   controller->PushAnimationUpdatesTo(controller_impl.get());
   controller_impl->ActivateAnimations();
@@ -1196,7 +1200,7 @@
 
   scoped_ptr<Animation> to_add(CreateAnimation(
       scoped_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 0.f, 1.f)), 1,
-      Animation::OPACITY));
+      TargetProperty::OPACITY));
   to_add->set_needs_synchronized_start_time(true);
 
   // We should pause at the first keyframe indefinitely waiting for that
@@ -1217,7 +1221,7 @@
 
   // Send the synchronized start time.
   controller->NotifyAnimationStarted(
-      AnimationEvent(AnimationEvent::STARTED, 0, 1, Animation::OPACITY,
+      AnimationEvent(AnimationEvent::STARTED, 0, 1, TargetProperty::OPACITY,
                      kInitialTickTime + TimeDelta::FromMilliseconds(2000)));
   controller->Animate(kInitialTickTime + TimeDelta::FromMilliseconds(5000));
   controller->UpdateState(true, events.get());
@@ -1237,10 +1241,10 @@
 
   controller->AddAnimation(CreateAnimation(
       scoped_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 0.f, 1.f)), 1,
-      Animation::OPACITY));
+      TargetProperty::OPACITY));
   controller->AddAnimation(CreateAnimation(
       scoped_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 1.f, 0.5f)), 2,
-      Animation::OPACITY));
+      TargetProperty::OPACITY));
 
   EXPECT_TRUE(controller->needs_to_start_animations_for_testing());
 
@@ -1275,7 +1279,7 @@
   controller->AddValueObserver(&dummy);
   controller->AddAnimation(CreateAnimation(
       scoped_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 0.f, 1.f)), 1,
-      Animation::OPACITY));
+      TargetProperty::OPACITY));
   controller->Animate(kInitialTickTime);
   controller->UpdateState(true, events.get());
   EXPECT_TRUE(controller->HasActiveAnimation());
@@ -1283,8 +1287,8 @@
 
   scoped_ptr<Animation> to_add(CreateAnimation(
       scoped_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 1.f, 0.5f)), 2,
-      Animation::OPACITY));
-  controller->AbortAnimations(Animation::OPACITY);
+      TargetProperty::OPACITY));
+  controller->AbortAnimations(TargetProperty::OPACITY);
   controller->AddAnimation(std::move(to_add));
 
   // Since the previous animation was aborted, the new animation should start
@@ -1310,13 +1314,13 @@
 
   controller->AddAnimation(CreateAnimation(
       scoped_ptr<AnimationCurve>(new FakeTransformTransition(1)), 1,
-      Animation::TRANSFORM));
+      TargetProperty::TRANSFORM));
   controller->AddAnimation(CreateAnimation(
       scoped_ptr<AnimationCurve>(new FakeTransformTransition(1)), 2,
-      Animation::TRANSFORM));
+      TargetProperty::TRANSFORM));
   controller->AddAnimation(CreateAnimation(
       scoped_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 0.f, 1.f)), 2,
-      Animation::OPACITY));
+      TargetProperty::OPACITY));
 
   controller->Animate(kInitialTickTime);
   controller->UpdateState(true, events.get());
@@ -1346,13 +1350,13 @@
 
   controller->AddAnimation(CreateAnimation(
       scoped_ptr<AnimationCurve>(new FakeTransformTransition(2)), 1,
-      Animation::TRANSFORM));
+      TargetProperty::TRANSFORM));
   controller->AddAnimation(CreateAnimation(
       scoped_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 0.f, 1.f)), 1,
-      Animation::OPACITY));
+      TargetProperty::OPACITY));
   controller->AddAnimation(CreateAnimation(
       scoped_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 1.f, 0.5f)), 2,
-      Animation::OPACITY));
+      TargetProperty::OPACITY));
 
   // Animations with id 1 should both start now.
   controller->Animate(kInitialTickTime);
@@ -1386,7 +1390,7 @@
 
   scoped_ptr<Animation> to_add(CreateAnimation(
       scoped_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 0.f, 1.f)), 1,
-      Animation::OPACITY));
+      TargetProperty::OPACITY));
   to_add->set_iterations(3);
   controller->AddAnimation(std::move(to_add));
 
@@ -1431,7 +1435,7 @@
 
   scoped_ptr<Animation> to_add(CreateAnimation(
       scoped_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 0.f, 1.f)), 1,
-      Animation::OPACITY));
+      TargetProperty::OPACITY));
   to_add->set_iterations(-1);
   controller->AddAnimation(std::move(to_add));
 
@@ -1459,8 +1463,8 @@
   EXPECT_TRUE(controller->HasActiveAnimation());
   EXPECT_EQ(0.75f, dummy.opacity());
 
-  EXPECT_TRUE(controller->GetAnimation(Animation::OPACITY));
-  controller->GetAnimation(Animation::OPACITY)
+  EXPECT_TRUE(controller->GetAnimation(TargetProperty::OPACITY));
+  controller->GetAnimation(TargetProperty::OPACITY)
       ->SetRunState(Animation::ABORTED,
                     kInitialTickTime + TimeDelta::FromMilliseconds(750));
   EXPECT_FALSE(controller->HasActiveAnimation());
@@ -1477,7 +1481,7 @@
 
   controller->AddAnimation(CreateAnimation(
       scoped_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 0.f, 1.f)), 1,
-      Animation::OPACITY));
+      TargetProperty::OPACITY));
 
   controller->Animate(kInitialTickTime);
   controller->UpdateState(true, events.get());
@@ -1488,8 +1492,8 @@
   EXPECT_TRUE(controller->HasActiveAnimation());
   EXPECT_EQ(0.5f, dummy.opacity());
 
-  EXPECT_TRUE(controller->GetAnimation(Animation::OPACITY));
-  controller->GetAnimation(Animation::OPACITY)
+  EXPECT_TRUE(controller->GetAnimation(TargetProperty::OPACITY));
+  controller->GetAnimation(TargetProperty::OPACITY)
       ->SetRunState(Animation::PAUSED,
                     kInitialTickTime + TimeDelta::FromMilliseconds(500));
 
@@ -1498,8 +1502,8 @@
   EXPECT_TRUE(controller->HasActiveAnimation());
   EXPECT_EQ(0.5f, dummy.opacity());
 
-  EXPECT_TRUE(controller->GetAnimation(Animation::OPACITY));
-  controller->GetAnimation(Animation::OPACITY)
+  EXPECT_TRUE(controller->GetAnimation(TargetProperty::OPACITY));
+  controller->GetAnimation(TargetProperty::OPACITY)
       ->SetRunState(Animation::RUNNING,
                     kInitialTickTime + TimeDelta::FromMilliseconds(1024000));
   controller->Animate(kInitialTickTime + TimeDelta::FromMilliseconds(1024250));
@@ -1523,13 +1527,13 @@
   const int animation_id = 2;
   controller->AddAnimation(Animation::Create(
       scoped_ptr<AnimationCurve>(new FakeTransformTransition(1)), 1, 1,
-      Animation::TRANSFORM));
+      TargetProperty::TRANSFORM));
   controller->AddAnimation(Animation::Create(
       scoped_ptr<AnimationCurve>(new FakeFloatTransition(2.0, 0.f, 1.f)),
-      animation_id, 1, Animation::OPACITY));
+      animation_id, 1, TargetProperty::OPACITY));
   controller->AddAnimation(Animation::Create(
       scoped_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 1.f, 0.75f)), 3,
-      2, Animation::OPACITY));
+      2, TargetProperty::OPACITY));
 
   controller->Animate(kInitialTickTime);
   controller->UpdateState(true, events.get());
@@ -1567,21 +1571,22 @@
 
   scoped_ptr<Animation> to_add(CreateAnimation(
       scoped_ptr<AnimationCurve>(new FakeFloatTransition(2.0, 0.f, 1.f)), 0,
-      Animation::OPACITY));
+      TargetProperty::OPACITY));
   to_add->set_needs_synchronized_start_time(true);
   controller->AddAnimation(std::move(to_add));
 
   controller->Animate(kInitialTickTime);
   controller->UpdateState(true, events.get());
   EXPECT_TRUE(controller->HasActiveAnimation());
-  Animation* active_animation = controller->GetAnimation(Animation::OPACITY);
+  Animation* active_animation =
+      controller->GetAnimation(TargetProperty::OPACITY);
   EXPECT_TRUE(active_animation);
   EXPECT_TRUE(active_animation->needs_synchronized_start_time());
 
   controller->PushAnimationUpdatesTo(controller_impl.get());
   controller_impl->ActivateAnimations();
 
-  active_animation = controller_impl->GetAnimation(Animation::OPACITY);
+  active_animation = controller_impl->GetAnimation(TargetProperty::OPACITY);
   EXPECT_TRUE(active_animation);
   EXPECT_EQ(Animation::WAITING_FOR_TARGET_AVAILABILITY,
             active_animation->run_state());
@@ -1597,7 +1602,7 @@
 
   scoped_ptr<Animation> first_animation(CreateAnimation(
       scoped_ptr<AnimationCurve>(new FakeTransformTransition(1)), 1,
-      Animation::TRANSFORM));
+      TargetProperty::TRANSFORM));
   first_animation->set_is_controlling_instance_for_test(true);
   controller->AddAnimation(std::move(first_animation));
 
@@ -1606,7 +1611,7 @@
 
   scoped_ptr<Animation> second_animation(CreateAnimation(
       scoped_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 0.f, 1.f)), 2,
-      Animation::OPACITY));
+      TargetProperty::OPACITY));
   second_animation->set_is_controlling_instance_for_test(true);
   controller->AddAnimation(std::move(second_animation));
 
@@ -1645,7 +1650,7 @@
   const int id = 1;
   controller->AddAnimation(CreateAnimation(
       scoped_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 0.5f, 1.f)), id,
-      Animation::OPACITY));
+      TargetProperty::OPACITY));
 
   // Without an observer, the animation shouldn't progress to the STARTING
   // state.
@@ -1653,7 +1658,7 @@
   controller->UpdateState(true, events.get());
   EXPECT_EQ(0u, events->events_.size());
   EXPECT_EQ(Animation::WAITING_FOR_TARGET_AVAILABILITY,
-            controller->GetAnimation(Animation::OPACITY)->run_state());
+            controller->GetAnimation(TargetProperty::OPACITY)->run_state());
 
   controller->AddValueObserver(&pending_dummy);
 
@@ -1664,7 +1669,7 @@
   controller->UpdateState(true, events.get());
   EXPECT_EQ(0u, events->events_.size());
   EXPECT_EQ(Animation::STARTING,
-            controller->GetAnimation(Animation::OPACITY)->run_state());
+            controller->GetAnimation(TargetProperty::OPACITY)->run_state());
   EXPECT_EQ(0.5f, pending_dummy.opacity());
 
   // Even when already in the STARTING state, the animation should stay
@@ -1673,7 +1678,7 @@
   controller->UpdateState(true, events.get());
   EXPECT_EQ(0u, events->events_.size());
   EXPECT_EQ(Animation::STARTING,
-            controller->GetAnimation(Animation::OPACITY)->run_state());
+            controller->GetAnimation(TargetProperty::OPACITY)->run_state());
   EXPECT_EQ(0.5f, pending_dummy.opacity());
 
   controller->AddValueObserver(&dummy);
@@ -1684,7 +1689,7 @@
   controller->UpdateState(true, events.get());
   EXPECT_EQ(1u, events->events_.size());
   EXPECT_EQ(Animation::RUNNING,
-            controller->GetAnimation(Animation::OPACITY)->run_state());
+            controller->GetAnimation(TargetProperty::OPACITY)->run_state());
   EXPECT_EQ(0.5f, pending_dummy.opacity());
   EXPECT_EQ(0.5f, dummy.opacity());
 
@@ -1709,7 +1714,7 @@
       base::TimeDelta::FromSecondsD(1.0), operations1, nullptr));
 
   scoped_ptr<Animation> animation(
-      Animation::Create(std::move(curve1), 1, 1, Animation::TRANSFORM));
+      Animation::Create(std::move(curve1), 1, 1, TargetProperty::TRANSFORM));
   controller_impl->AddAnimation(std::move(animation));
 
   scoped_ptr<KeyframedTransformAnimationCurve> curve2(
@@ -1722,7 +1727,8 @@
   curve2->AddKeyframe(TransformKeyframe::Create(
       base::TimeDelta::FromSecondsD(1.0), operations2, nullptr));
 
-  animation = Animation::Create(std::move(curve2), 2, 2, Animation::TRANSFORM);
+  animation =
+      Animation::Create(std::move(curve2), 2, 2, TargetProperty::TRANSFORM);
   controller_impl->AddAnimation(std::move(animation));
 
   gfx::BoxF box(1.f, 2.f, -1.f, 3.f, 4.f, 5.f);
@@ -1757,7 +1763,8 @@
   operations3.AppendMatrix(transform3);
   curve3->AddKeyframe(TransformKeyframe::Create(
       base::TimeDelta::FromSecondsD(1.0), operations3, nullptr));
-  animation = Animation::Create(std::move(curve3), 3, 3, Animation::TRANSFORM);
+  animation =
+      Animation::Create(std::move(curve3), 3, 3, TargetProperty::TRANSFORM);
   controller_impl->AddAnimation(std::move(animation));
   EXPECT_FALSE(controller_impl->TransformAnimationBoundsForBox(box, &bounds));
 }
@@ -1774,19 +1781,19 @@
   // state.
   controller->AddAnimation(Animation::Create(
       scoped_ptr<AnimationCurve>(new FakeTransformTransition(1.0)), 1, 1,
-      Animation::TRANSFORM));
+      TargetProperty::TRANSFORM));
   controller->AddAnimation(Animation::Create(
       scoped_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 0.f, 1.f)), 2, 2,
-      Animation::OPACITY));
+      TargetProperty::OPACITY));
   controller->AddAnimation(Animation::Create(
       scoped_ptr<AnimationCurve>(new FakeTransformTransition(1.0)), 3, 3,
-      Animation::TRANSFORM));
+      TargetProperty::TRANSFORM));
   controller->AddAnimation(Animation::Create(
       scoped_ptr<AnimationCurve>(new FakeTransformTransition(2.0)), 4, 4,
-      Animation::TRANSFORM));
+      TargetProperty::TRANSFORM));
   controller->AddAnimation(Animation::Create(
       scoped_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 0.f, 1.f)), 5, 5,
-      Animation::OPACITY));
+      TargetProperty::OPACITY));
 
   controller->Animate(kInitialTickTime);
   controller->UpdateState(true, nullptr);
@@ -1800,7 +1807,7 @@
             controller->GetAnimationById(4)->run_state());
   EXPECT_EQ(Animation::RUNNING, controller->GetAnimationById(5)->run_state());
 
-  controller->AbortAnimations(Animation::TRANSFORM);
+  controller->AbortAnimations(TargetProperty::TRANSFORM);
 
   // Only un-finished TRANSFORM animations should have been aborted.
   EXPECT_EQ(Animation::FINISHED, controller->GetAnimationById(1)->run_state());
@@ -1828,9 +1835,9 @@
   controller_impl->ActivateAnimations();
   EXPECT_TRUE(controller_impl->GetAnimationById(animation_id));
 
-  controller->AbortAnimations(Animation::OPACITY);
+  controller->AbortAnimations(TargetProperty::OPACITY);
   EXPECT_EQ(Animation::ABORTED,
-            controller->GetAnimation(Animation::OPACITY)->run_state());
+            controller->GetAnimation(TargetProperty::OPACITY)->run_state());
   EXPECT_FALSE(dummy.animation_waiting_for_deletion());
   EXPECT_FALSE(dummy_impl.animation_waiting_for_deletion());
 
@@ -1838,7 +1845,7 @@
   controller->UpdateState(true, nullptr);
   EXPECT_FALSE(dummy.animation_waiting_for_deletion());
   EXPECT_EQ(Animation::ABORTED,
-            controller->GetAnimation(Animation::OPACITY)->run_state());
+            controller->GetAnimation(TargetProperty::OPACITY)->run_state());
 
   controller->PushAnimationUpdatesTo(controller_impl.get());
   EXPECT_FALSE(controller->GetAnimationById(animation_id));
@@ -1865,9 +1872,10 @@
   controller_impl->ActivateAnimations();
   EXPECT_TRUE(controller_impl->GetAnimationById(animation_id));
 
-  controller_impl->AbortAnimations(Animation::OPACITY);
-  EXPECT_EQ(Animation::ABORTED,
-            controller_impl->GetAnimation(Animation::OPACITY)->run_state());
+  controller_impl->AbortAnimations(TargetProperty::OPACITY);
+  EXPECT_EQ(
+      Animation::ABORTED,
+      controller_impl->GetAnimation(TargetProperty::OPACITY)->run_state());
   EXPECT_FALSE(dummy.animation_waiting_for_deletion());
   EXPECT_FALSE(dummy_impl.animation_waiting_for_deletion());
 
@@ -1877,19 +1885,20 @@
   EXPECT_TRUE(dummy_impl.animation_waiting_for_deletion());
   EXPECT_EQ(1u, events.events_.size());
   EXPECT_EQ(AnimationEvent::ABORTED, events.events_[0].type);
-  EXPECT_EQ(Animation::WAITING_FOR_DELETION,
-            controller_impl->GetAnimation(Animation::OPACITY)->run_state());
+  EXPECT_EQ(
+      Animation::WAITING_FOR_DELETION,
+      controller_impl->GetAnimation(TargetProperty::OPACITY)->run_state());
 
   controller->NotifyAnimationAborted(events.events_[0]);
   EXPECT_EQ(Animation::ABORTED,
-            controller->GetAnimation(Animation::OPACITY)->run_state());
+            controller->GetAnimation(TargetProperty::OPACITY)->run_state());
   EXPECT_TRUE(delegate.aborted());
 
   controller->Animate(kInitialTickTime + TimeDelta::FromMilliseconds(500));
   controller->UpdateState(true, nullptr);
   EXPECT_TRUE(dummy.animation_waiting_for_deletion());
   EXPECT_EQ(Animation::WAITING_FOR_DELETION,
-            controller->GetAnimation(Animation::OPACITY)->run_state());
+            controller->GetAnimation(TargetProperty::OPACITY)->run_state());
 
   controller->PushAnimationUpdatesTo(controller_impl.get());
   controller_impl->ActivateAnimations();
@@ -1911,13 +1920,13 @@
   // Add two animations with the same group id but different durations.
   scoped_ptr<Animation> first_animation(Animation::Create(
       scoped_ptr<AnimationCurve>(new FakeTransformTransition(2.0)), 1, group_id,
-      Animation::TRANSFORM));
+      TargetProperty::TRANSFORM));
   first_animation->set_is_controlling_instance_for_test(true);
   controller_impl->AddAnimation(std::move(first_animation));
 
   scoped_ptr<Animation> second_animation(Animation::Create(
       scoped_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 0.f, 1.f)), 2,
-      group_id, Animation::OPACITY));
+      group_id, TargetProperty::OPACITY));
   second_animation->set_is_controlling_instance_for_test(true);
   controller_impl->AddAnimation(std::move(second_animation));
 
@@ -1965,13 +1974,13 @@
   // Add two animations with the same group id.
   scoped_ptr<Animation> first_animation(CreateAnimation(
       scoped_ptr<AnimationCurve>(new FakeTransformTransition(1.0)), 1,
-      Animation::TRANSFORM));
+      TargetProperty::TRANSFORM));
   first_animation->set_is_controlling_instance_for_test(true);
   controller_impl->AddAnimation(std::move(first_animation));
 
   scoped_ptr<Animation> second_animation(CreateAnimation(
       scoped_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 0.f, 1.f)), 1,
-      Animation::OPACITY));
+      TargetProperty::OPACITY));
   second_animation->set_is_controlling_instance_for_test(true);
   controller_impl->AddAnimation(std::move(second_animation));
 
@@ -1983,7 +1992,7 @@
   EXPECT_EQ(AnimationEvent::STARTED, events->events_[0].type);
   EXPECT_EQ(AnimationEvent::STARTED, events->events_[1].type);
 
-  controller_impl->AbortAnimations(Animation::OPACITY);
+  controller_impl->AbortAnimations(TargetProperty::OPACITY);
 
   events.reset(new AnimationEvents);
   controller_impl->Animate(kInitialTickTime +
@@ -1994,9 +2003,9 @@
   // animation, and an ABORTED event for the opacity animation.
   EXPECT_EQ(2u, events->events_.size());
   EXPECT_EQ(AnimationEvent::FINISHED, events->events_[0].type);
-  EXPECT_EQ(Animation::TRANSFORM, events->events_[0].target_property);
+  EXPECT_EQ(TargetProperty::TRANSFORM, events->events_[0].target_property);
   EXPECT_EQ(AnimationEvent::ABORTED, events->events_[1].type);
-  EXPECT_EQ(Animation::OPACITY, events->events_[1].target_property);
+  EXPECT_EQ(TargetProperty::OPACITY, events->events_[1].target_property);
 }
 
 TEST(LayerAnimationControllerTest, HasAnimationThatAffectsScale) {
@@ -2007,7 +2016,7 @@
 
   controller_impl->AddAnimation(CreateAnimation(
       scoped_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 0.f, 1.f)), 1,
-      Animation::OPACITY));
+      TargetProperty::OPACITY));
 
   // Opacity animations don't affect scale.
   EXPECT_FALSE(controller_impl->HasAnimationThatAffectsScale());
@@ -2023,7 +2032,7 @@
       base::TimeDelta::FromSecondsD(1.0), operations1, nullptr));
 
   scoped_ptr<Animation> animation(
-      Animation::Create(std::move(curve1), 2, 2, Animation::TRANSFORM));
+      Animation::Create(std::move(curve1), 2, 2, TargetProperty::TRANSFORM));
   controller_impl->AddAnimation(std::move(animation));
 
   // Translations don't affect scale.
@@ -2039,7 +2048,8 @@
   curve2->AddKeyframe(TransformKeyframe::Create(
       base::TimeDelta::FromSecondsD(1.0), operations2, nullptr));
 
-  animation = Animation::Create(std::move(curve2), 3, 3, Animation::TRANSFORM);
+  animation =
+      Animation::Create(std::move(curve2), 3, 3, TargetProperty::TRANSFORM);
   controller_impl->AddAnimation(std::move(animation));
 
   EXPECT_TRUE(controller_impl->HasAnimationThatAffectsScale());
@@ -2063,7 +2073,7 @@
 
   controller_impl->AddAnimation(CreateAnimation(
       scoped_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 0.f, 1.f)), 1,
-      Animation::OPACITY));
+      TargetProperty::OPACITY));
 
   // Opacity animations aren't non-translation transforms.
   EXPECT_TRUE(controller_impl->HasOnlyTranslationTransforms(
@@ -2082,7 +2092,7 @@
       base::TimeDelta::FromSecondsD(1.0), operations1, nullptr));
 
   scoped_ptr<Animation> animation(
-      Animation::Create(std::move(curve1), 2, 2, Animation::TRANSFORM));
+      Animation::Create(std::move(curve1), 2, 2, TargetProperty::TRANSFORM));
   controller_impl->AddAnimation(std::move(animation));
 
   // The only transform animation we've added is a translation.
@@ -2101,7 +2111,8 @@
   curve2->AddKeyframe(TransformKeyframe::Create(
       base::TimeDelta::FromSecondsD(1.0), operations2, nullptr));
 
-  animation = Animation::Create(std::move(curve2), 3, 3, Animation::TRANSFORM);
+  animation =
+      Animation::Create(std::move(curve2), 3, 3, TargetProperty::TRANSFORM);
   animation->set_affects_active_observers(false);
   controller_impl->AddAnimation(std::move(animation));
 
@@ -2148,7 +2159,7 @@
   curve1->AddKeyframe(TransformKeyframe::Create(
       base::TimeDelta::FromSecondsD(1.0), operations2, nullptr));
   scoped_ptr<Animation> animation(
-      Animation::Create(std::move(curve1), 1, 1, Animation::TRANSFORM));
+      Animation::Create(std::move(curve1), 1, 1, TargetProperty::TRANSFORM));
   animation->set_affects_active_observers(false);
   controller_impl->AddAnimation(std::move(animation));
 
@@ -2179,7 +2190,8 @@
       base::TimeDelta::FromSecondsD(1.0), operations3, nullptr));
 
   controller_impl->RemoveAnimation(1);
-  animation = Animation::Create(std::move(curve2), 2, 2, Animation::TRANSFORM);
+  animation =
+      Animation::Create(std::move(curve2), 2, 2, TargetProperty::TRANSFORM);
 
   // Reverse Direction
   animation->set_direction(Animation::DIRECTION_REVERSE);
@@ -2197,7 +2209,8 @@
   curve3->AddKeyframe(TransformKeyframe::Create(
       base::TimeDelta::FromSecondsD(1.0), operations5, nullptr));
 
-  animation = Animation::Create(std::move(curve3), 3, 3, Animation::TRANSFORM);
+  animation =
+      Animation::Create(std::move(curve3), 3, 3, TargetProperty::TRANSFORM);
   animation->set_affects_active_observers(false);
   controller_impl->AddAnimation(std::move(animation));
 
@@ -2252,7 +2265,7 @@
       base::TimeDelta::FromSecondsD(1.0), operations1, nullptr));
 
   scoped_ptr<Animation> animation(
-      Animation::Create(std::move(curve1), 1, 1, Animation::TRANSFORM));
+      Animation::Create(std::move(curve1), 1, 1, TargetProperty::TRANSFORM));
   animation->set_affects_active_observers(false);
   controller_impl->AddAnimation(std::move(animation));
 
@@ -2281,7 +2294,8 @@
   curve2->AddKeyframe(TransformKeyframe::Create(
       base::TimeDelta::FromSecondsD(1.0), operations2, nullptr));
 
-  animation = Animation::Create(std::move(curve2), 2, 2, Animation::TRANSFORM);
+  animation =
+      Animation::Create(std::move(curve2), 2, 2, TargetProperty::TRANSFORM);
   animation->set_affects_active_observers(false);
   controller_impl->AddAnimation(std::move(animation));
 
@@ -2310,7 +2324,8 @@
   curve3->AddKeyframe(TransformKeyframe::Create(
       base::TimeDelta::FromSecondsD(1.0), operations3, nullptr));
 
-  animation = Animation::Create(std::move(curve3), 3, 3, Animation::TRANSFORM);
+  animation =
+      Animation::Create(std::move(curve3), 3, 3, TargetProperty::TRANSFORM);
   animation->set_affects_active_observers(false);
   controller_impl->AddAnimation(std::move(animation));
 
@@ -2357,7 +2372,7 @@
       base::TimeDelta::FromSecondsD(1.0), operations2, nullptr));
 
   scoped_ptr<Animation> animation_owned(
-      Animation::Create(std::move(curve1), 1, 1, Animation::TRANSFORM));
+      Animation::Create(std::move(curve1), 1, 1, TargetProperty::TRANSFORM));
   Animation* animation = animation_owned.get();
   controller_impl->AddAnimation(std::move(animation_owned));
 
@@ -2661,7 +2676,7 @@
   controller->NotifyAnimationStarted(events.events_[0]);
   events.events_.clear();
 
-  controller_impl->AbortAnimations(Animation::TRANSFORM);
+  controller_impl->AbortAnimations(TargetProperty::TRANSFORM);
   EXPECT_FALSE(pending_dummy_impl.transform_is_animating());
   EXPECT_FALSE(active_dummy_impl.transform_is_animating());
 
@@ -2737,7 +2752,7 @@
 
   // Delete the animation on the main-thread controller.
   controller->RemoveAnimation(
-      controller->GetAnimation(Animation::OPACITY)->id());
+      controller->GetAnimation(TargetProperty::OPACITY)->id());
   controller->PushAnimationUpdatesTo(controller_impl.get());
 
   // The animation should no longer affect pending observers.
@@ -2785,7 +2800,7 @@
   // Remove the first animation from the main-thread controller, and add a
   // new animation affecting the same property.
   controller->RemoveAnimation(
-      controller->GetAnimation(Animation::OPACITY)->id());
+      controller->GetAnimation(TargetProperty::OPACITY)->id());
   int second_animation_id =
       AddOpacityTransitionToController(controller.get(), 1, 1.f, 0.5f, true);
   controller->PushAnimationUpdatesTo(controller_impl.get());
@@ -2849,49 +2864,53 @@
   // Create an animation that initially affects only pending observers.
   scoped_ptr<Animation> animation(CreateAnimation(
       scoped_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 0.f, 1.f)), 1,
-      Animation::OPACITY));
+      TargetProperty::OPACITY));
   animation->set_affects_active_observers(false);
 
   controller->AddAnimation(std::move(animation));
   controller->Animate(kInitialTickTime);
   EXPECT_TRUE(controller->IsCurrentlyAnimatingProperty(
-      Animation::OPACITY, LayerAnimationController::ObserverType::PENDING));
+      TargetProperty::OPACITY,
+      LayerAnimationController::ObserverType::PENDING));
   EXPECT_FALSE(controller->IsCurrentlyAnimatingProperty(
-      Animation::OPACITY, LayerAnimationController::ObserverType::ACTIVE));
+      TargetProperty::OPACITY, LayerAnimationController::ObserverType::ACTIVE));
   controller->UpdateState(true, nullptr);
   EXPECT_TRUE(controller->HasActiveAnimation());
 
   EXPECT_TRUE(controller->IsCurrentlyAnimatingProperty(
-      Animation::OPACITY, LayerAnimationController::ObserverType::PENDING));
+      TargetProperty::OPACITY,
+      LayerAnimationController::ObserverType::PENDING));
   EXPECT_FALSE(controller->IsCurrentlyAnimatingProperty(
-      Animation::OPACITY, LayerAnimationController::ObserverType::ACTIVE));
+      TargetProperty::OPACITY, LayerAnimationController::ObserverType::ACTIVE));
   EXPECT_FALSE(controller->IsCurrentlyAnimatingProperty(
-      Animation::FILTER, LayerAnimationController::ObserverType::PENDING));
+      TargetProperty::FILTER, LayerAnimationController::ObserverType::PENDING));
   EXPECT_FALSE(controller->IsCurrentlyAnimatingProperty(
-      Animation::FILTER, LayerAnimationController::ObserverType::ACTIVE));
+      TargetProperty::FILTER, LayerAnimationController::ObserverType::ACTIVE));
 
   controller->ActivateAnimations();
 
   EXPECT_TRUE(controller->IsCurrentlyAnimatingProperty(
-      Animation::OPACITY, LayerAnimationController::ObserverType::PENDING));
+      TargetProperty::OPACITY,
+      LayerAnimationController::ObserverType::PENDING));
   EXPECT_TRUE(controller->IsCurrentlyAnimatingProperty(
-      Animation::OPACITY, LayerAnimationController::ObserverType::ACTIVE));
+      TargetProperty::OPACITY, LayerAnimationController::ObserverType::ACTIVE));
   EXPECT_FALSE(controller->IsCurrentlyAnimatingProperty(
-      Animation::FILTER, LayerAnimationController::ObserverType::PENDING));
+      TargetProperty::FILTER, LayerAnimationController::ObserverType::PENDING));
   EXPECT_FALSE(controller->IsCurrentlyAnimatingProperty(
-      Animation::FILTER, LayerAnimationController::ObserverType::ACTIVE));
+      TargetProperty::FILTER, LayerAnimationController::ObserverType::ACTIVE));
 
   controller->Animate(kInitialTickTime + TimeDelta::FromMilliseconds(10));
   controller->UpdateState(true, nullptr);
 
   EXPECT_TRUE(controller->IsCurrentlyAnimatingProperty(
-      Animation::OPACITY, LayerAnimationController::ObserverType::PENDING));
+      TargetProperty::OPACITY,
+      LayerAnimationController::ObserverType::PENDING));
   EXPECT_TRUE(controller->IsCurrentlyAnimatingProperty(
-      Animation::OPACITY, LayerAnimationController::ObserverType::ACTIVE));
+      TargetProperty::OPACITY, LayerAnimationController::ObserverType::ACTIVE));
   EXPECT_FALSE(controller->IsCurrentlyAnimatingProperty(
-      Animation::FILTER, LayerAnimationController::ObserverType::PENDING));
+      TargetProperty::FILTER, LayerAnimationController::ObserverType::PENDING));
   EXPECT_FALSE(controller->IsCurrentlyAnimatingProperty(
-      Animation::FILTER, LayerAnimationController::ObserverType::ACTIVE));
+      TargetProperty::FILTER, LayerAnimationController::ObserverType::ACTIVE));
 
   EXPECT_EQ(0.f, dummy.opacity());
 
@@ -2900,13 +2919,14 @@
   controller->UpdateState(true, nullptr);
 
   EXPECT_FALSE(controller->IsCurrentlyAnimatingProperty(
-      Animation::OPACITY, LayerAnimationController::ObserverType::PENDING));
+      TargetProperty::OPACITY,
+      LayerAnimationController::ObserverType::PENDING));
   EXPECT_FALSE(controller->IsCurrentlyAnimatingProperty(
-      Animation::OPACITY, LayerAnimationController::ObserverType::ACTIVE));
+      TargetProperty::OPACITY, LayerAnimationController::ObserverType::ACTIVE));
   EXPECT_FALSE(controller->IsCurrentlyAnimatingProperty(
-      Animation::FILTER, LayerAnimationController::ObserverType::PENDING));
+      TargetProperty::FILTER, LayerAnimationController::ObserverType::PENDING));
   EXPECT_FALSE(controller->IsCurrentlyAnimatingProperty(
-      Animation::FILTER, LayerAnimationController::ObserverType::ACTIVE));
+      TargetProperty::FILTER, LayerAnimationController::ObserverType::ACTIVE));
 
   EXPECT_EQ(1.f, dummy.opacity());
 }
@@ -2921,7 +2941,7 @@
   // a start delay of 2 seconds.
   scoped_ptr<Animation> animation(CreateAnimation(
       scoped_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 0.f, 1.f)), 1,
-      Animation::OPACITY));
+      TargetProperty::OPACITY));
   animation->set_fill_mode(Animation::FILL_MODE_NONE);
   animation->set_time_offset(TimeDelta::FromMilliseconds(-2000));
   animation->set_affects_active_observers(false);
@@ -2934,34 +2954,38 @@
   // potentially running transform animation but aren't currently animating
   // transform.
   EXPECT_TRUE(controller->IsPotentiallyAnimatingProperty(
-      Animation::OPACITY, LayerAnimationController::ObserverType::PENDING));
+      TargetProperty::OPACITY,
+      LayerAnimationController::ObserverType::PENDING));
   EXPECT_FALSE(controller->IsPotentiallyAnimatingProperty(
-      Animation::OPACITY, LayerAnimationController::ObserverType::ACTIVE));
+      TargetProperty::OPACITY, LayerAnimationController::ObserverType::ACTIVE));
   EXPECT_FALSE(controller->IsCurrentlyAnimatingProperty(
-      Animation::OPACITY, LayerAnimationController::ObserverType::PENDING));
+      TargetProperty::OPACITY,
+      LayerAnimationController::ObserverType::PENDING));
   EXPECT_FALSE(controller->IsCurrentlyAnimatingProperty(
-      Animation::OPACITY, LayerAnimationController::ObserverType::ACTIVE));
+      TargetProperty::OPACITY, LayerAnimationController::ObserverType::ACTIVE));
   EXPECT_TRUE(controller->HasActiveAnimation());
   EXPECT_FALSE(controller->IsPotentiallyAnimatingProperty(
-      Animation::FILTER, LayerAnimationController::ObserverType::PENDING));
+      TargetProperty::FILTER, LayerAnimationController::ObserverType::PENDING));
   EXPECT_FALSE(controller->IsPotentiallyAnimatingProperty(
-      Animation::FILTER, LayerAnimationController::ObserverType::ACTIVE));
+      TargetProperty::FILTER, LayerAnimationController::ObserverType::ACTIVE));
 
   controller->ActivateAnimations();
 
   EXPECT_TRUE(controller->IsPotentiallyAnimatingProperty(
-      Animation::OPACITY, LayerAnimationController::ObserverType::PENDING));
+      TargetProperty::OPACITY,
+      LayerAnimationController::ObserverType::PENDING));
   EXPECT_TRUE(controller->IsPotentiallyAnimatingProperty(
-      Animation::OPACITY, LayerAnimationController::ObserverType::ACTIVE));
+      TargetProperty::OPACITY, LayerAnimationController::ObserverType::ACTIVE));
   EXPECT_FALSE(controller->IsCurrentlyAnimatingProperty(
-      Animation::OPACITY, LayerAnimationController::ObserverType::PENDING));
+      TargetProperty::OPACITY,
+      LayerAnimationController::ObserverType::PENDING));
   EXPECT_FALSE(controller->IsCurrentlyAnimatingProperty(
-      Animation::OPACITY, LayerAnimationController::ObserverType::ACTIVE));
+      TargetProperty::OPACITY, LayerAnimationController::ObserverType::ACTIVE));
   EXPECT_TRUE(controller->HasActiveAnimation());
   EXPECT_FALSE(controller->IsPotentiallyAnimatingProperty(
-      Animation::FILTER, LayerAnimationController::ObserverType::PENDING));
+      TargetProperty::FILTER, LayerAnimationController::ObserverType::PENDING));
   EXPECT_FALSE(controller->IsPotentiallyAnimatingProperty(
-      Animation::FILTER, LayerAnimationController::ObserverType::ACTIVE));
+      TargetProperty::FILTER, LayerAnimationController::ObserverType::ACTIVE));
 
   controller->UpdateState(true, nullptr);
 
@@ -2969,13 +2993,15 @@
   controller->Animate(kInitialTickTime + TimeDelta::FromMilliseconds(2000));
   controller->UpdateState(true, nullptr);
   EXPECT_TRUE(controller->IsPotentiallyAnimatingProperty(
-      Animation::OPACITY, LayerAnimationController::ObserverType::PENDING));
+      TargetProperty::OPACITY,
+      LayerAnimationController::ObserverType::PENDING));
   EXPECT_TRUE(controller->IsPotentiallyAnimatingProperty(
-      Animation::OPACITY, LayerAnimationController::ObserverType::ACTIVE));
+      TargetProperty::OPACITY, LayerAnimationController::ObserverType::ACTIVE));
   EXPECT_TRUE(controller->IsCurrentlyAnimatingProperty(
-      Animation::OPACITY, LayerAnimationController::ObserverType::PENDING));
+      TargetProperty::OPACITY,
+      LayerAnimationController::ObserverType::PENDING));
   EXPECT_TRUE(controller->IsCurrentlyAnimatingProperty(
-      Animation::OPACITY, LayerAnimationController::ObserverType::ACTIVE));
+      TargetProperty::OPACITY, LayerAnimationController::ObserverType::ACTIVE));
 
   // After the animaton finishes, the observers it affects have neither a
   // potentially running transform animation nor a currently running transform
@@ -2983,13 +3009,15 @@
   controller->Animate(kInitialTickTime + TimeDelta::FromMilliseconds(4000));
   controller->UpdateState(true, nullptr);
   EXPECT_FALSE(controller->IsPotentiallyAnimatingProperty(
-      Animation::OPACITY, LayerAnimationController::ObserverType::PENDING));
+      TargetProperty::OPACITY,
+      LayerAnimationController::ObserverType::PENDING));
   EXPECT_FALSE(controller->IsPotentiallyAnimatingProperty(
-      Animation::OPACITY, LayerAnimationController::ObserverType::ACTIVE));
+      TargetProperty::OPACITY, LayerAnimationController::ObserverType::ACTIVE));
   EXPECT_FALSE(controller->IsCurrentlyAnimatingProperty(
-      Animation::OPACITY, LayerAnimationController::ObserverType::PENDING));
+      TargetProperty::OPACITY,
+      LayerAnimationController::ObserverType::PENDING));
   EXPECT_FALSE(controller->IsCurrentlyAnimatingProperty(
-      Animation::OPACITY, LayerAnimationController::ObserverType::ACTIVE));
+      TargetProperty::OPACITY, LayerAnimationController::ObserverType::ACTIVE));
 }
 
 }  // namespace
diff --git a/cc/animation/target_property.cc b/cc/animation/target_property.cc
new file mode 100644
index 0000000..15144a7c
--- /dev/null
+++ b/cc/animation/target_property.cc
@@ -0,0 +1,28 @@
+// 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 "cc/animation/target_property.h"
+
+#include "base/macros.h"
+
+namespace cc {
+
+namespace {
+
+// This should match the TargetProperty enum.
+static const char* const s_targetPropertyNames[] = {
+    "TRANSFORM", "OPACITY", "FILTER", "SCROLL_OFFSET", "BACKGROUND_COLOR"};
+
+static_assert(static_cast<int>(TargetProperty::LAST_TARGET_PROPERTY) + 1 ==
+                  arraysize(s_targetPropertyNames),
+              "TargetPropertyEnumSize should equal the number of elements in "
+              "s_targetPropertyNames");
+
+}  // namespace
+
+const char* TargetProperty::GetName(TargetProperty::Type property) {
+  return s_targetPropertyNames[property];
+}
+
+}  // namespace cc
diff --git a/cc/animation/target_property.h b/cc/animation/target_property.h
new file mode 100644
index 0000000..e4658e1
--- /dev/null
+++ b/cc/animation/target_property.h
@@ -0,0 +1,28 @@
+// 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 CC_ANIMATION_TARGET_PROPERTY_H_
+#define CC_ANIMATION_TARGET_PROPERTY_H_
+
+namespace cc {
+
+namespace TargetProperty {
+
+enum Type {
+  TRANSFORM = 0,
+  OPACITY,
+  FILTER,
+  SCROLL_OFFSET,
+  BACKGROUND_COLOR,
+  // This sentinel must be last.
+  LAST_TARGET_PROPERTY = BACKGROUND_COLOR
+};
+
+const char* GetName(TargetProperty::Type property);
+
+}  // namespace TargetProperty
+
+}  // namespace cc
+
+#endif  // CC_ANIMATION_TARGET_PROPERTY_H_
diff --git a/cc/blink/web_to_cc_animation_delegate_adapter.cc b/cc/blink/web_to_cc_animation_delegate_adapter.cc
index 97bc0b9..2ad069d4 100644
--- a/cc/blink/web_to_cc_animation_delegate_adapter.cc
+++ b/cc/blink/web_to_cc_animation_delegate_adapter.cc
@@ -14,7 +14,7 @@
 
 void WebToCCAnimationDelegateAdapter::NotifyAnimationStarted(
     base::TimeTicks monotonic_time,
-    cc::Animation::TargetProperty target_property,
+    cc::TargetProperty::Type target_property,
     int group) {
   delegate_->notifyAnimationStarted(
       (monotonic_time - base::TimeTicks()).InSecondsF(), group);
@@ -22,7 +22,7 @@
 
 void WebToCCAnimationDelegateAdapter::NotifyAnimationFinished(
     base::TimeTicks monotonic_time,
-    cc::Animation::TargetProperty target_property,
+    cc::TargetProperty::Type target_property,
     int group) {
   delegate_->notifyAnimationFinished(
       (monotonic_time - base::TimeTicks()).InSecondsF(), group);
@@ -30,7 +30,7 @@
 
 void WebToCCAnimationDelegateAdapter::NotifyAnimationAborted(
     base::TimeTicks monotonic_time,
-    cc::Animation::TargetProperty target_property,
+    cc::TargetProperty::Type target_property,
     int group) {
   delegate_->notifyAnimationAborted(
       (monotonic_time - base::TimeTicks()).InSecondsF(), group);
diff --git a/cc/blink/web_to_cc_animation_delegate_adapter.h b/cc/blink/web_to_cc_animation_delegate_adapter.h
index 343afa5..0978736 100644
--- a/cc/blink/web_to_cc_animation_delegate_adapter.h
+++ b/cc/blink/web_to_cc_animation_delegate_adapter.h
@@ -22,13 +22,13 @@
 
  private:
   void NotifyAnimationStarted(base::TimeTicks monotonic_time,
-                              cc::Animation::TargetProperty target_property,
+                              cc::TargetProperty::Type target_property,
                               int group) override;
   void NotifyAnimationFinished(base::TimeTicks monotonic_time,
-                               cc::Animation::TargetProperty target_property,
+                               cc::TargetProperty::Type target_property,
                                int group) override;
   void NotifyAnimationAborted(base::TimeTicks monotonic_time,
-                              cc::Animation::TargetProperty target_property,
+                              cc::TargetProperty::Type target_property,
                               int group) override;
 
   blink::WebCompositorAnimationDelegate* delegate_;
diff --git a/cc/cc.gyp b/cc/cc.gyp
index 22c01e23..62afc299 100644
--- a/cc/cc.gyp
+++ b/cc/cc.gyp
@@ -63,6 +63,8 @@
         'animation/layer_animation_value_provider.h',
         'animation/scroll_offset_animation_curve.cc',
         'animation/scroll_offset_animation_curve.h',
+        'animation/target_property.cc',
+        'animation/target_property.h',
         'animation/timing_function.cc',
         'animation/timing_function.h',
         'animation/transform_operation.cc',
diff --git a/cc/layers/layer.cc b/cc/layers/layer.cc
index e7053a8..5a7796c8 100644
--- a/cc/layers/layer.cc
+++ b/cc/layers/layer.cc
@@ -507,7 +507,7 @@
   DCHECK(layer_tree_host_);
   return layer_animation_controller_
              ? layer_animation_controller_->IsCurrentlyAnimatingProperty(
-                   Animation::FILTER,
+                   TargetProperty::FILTER,
                    LayerAnimationController::ObserverType::ACTIVE)
              : layer_tree_host_->IsAnimatingFilterProperty(this);
 }
@@ -515,7 +515,7 @@
 bool Layer::HasPotentiallyRunningFilterAnimation() const {
   if (layer_animation_controller_) {
     return layer_animation_controller_->IsPotentiallyAnimatingProperty(
-        Animation::FILTER, LayerAnimationController::ObserverType::ACTIVE);
+        TargetProperty::FILTER, LayerAnimationController::ObserverType::ACTIVE);
   }
   return layer_tree_host_->HasPotentiallyRunningFilterAnimation(this);
 }
@@ -544,7 +544,7 @@
   DCHECK(layer_tree_host_);
   return layer_animation_controller_
              ? layer_animation_controller_->IsCurrentlyAnimatingProperty(
-                   Animation::OPACITY,
+                   TargetProperty::OPACITY,
                    LayerAnimationController::ObserverType::ACTIVE)
              : layer_tree_host_->IsAnimatingOpacityProperty(this);
 }
@@ -552,7 +552,8 @@
 bool Layer::HasPotentiallyRunningOpacityAnimation() const {
   if (layer_animation_controller_) {
     return layer_animation_controller_->IsPotentiallyAnimatingProperty(
-        Animation::OPACITY, LayerAnimationController::ObserverType::ACTIVE);
+        TargetProperty::OPACITY,
+        LayerAnimationController::ObserverType::ACTIVE);
   }
   return layer_tree_host_->HasPotentiallyRunningOpacityAnimation(this);
 }
@@ -756,7 +757,7 @@
   DCHECK(layer_tree_host_);
   return layer_animation_controller_
              ? layer_animation_controller_->IsCurrentlyAnimatingProperty(
-                   Animation::TRANSFORM,
+                   TargetProperty::TRANSFORM,
                    LayerAnimationController::ObserverType::ACTIVE)
              : layer_tree_host_->IsAnimatingTransformProperty(this);
 }
@@ -764,7 +765,8 @@
 bool Layer::HasPotentiallyRunningTransformAnimation() const {
   if (layer_animation_controller_) {
     return layer_animation_controller_->IsPotentiallyAnimatingProperty(
-        Animation::TRANSFORM, LayerAnimationController::ObserverType::ACTIVE);
+        TargetProperty::TRANSFORM,
+        LayerAnimationController::ObserverType::ACTIVE);
   }
   return layer_tree_host_->HasPotentiallyRunningTransformAnimation(this);
 }
@@ -794,7 +796,7 @@
 }
 
 bool Layer::HasAnyAnimationTargetingProperty(
-    Animation::TargetProperty property) const {
+    TargetProperty::Type property) const {
   if (layer_animation_controller_)
     return !!layer_animation_controller_->GetAnimation(property);
 
@@ -1879,7 +1881,7 @@
   if (!layer_animation_controller_->animation_registrar())
     return false;
 
-  if (animation->target_property() == Animation::SCROLL_OFFSET &&
+  if (animation->target_property() == TargetProperty::SCROLL_OFFSET &&
       !layer_animation_controller_->animation_registrar()
            ->supports_scroll_animations())
     return false;
diff --git a/cc/layers/layer.h b/cc/layers/layer.h
index cdc0feee..afb5356 100644
--- a/cc/layers/layer.h
+++ b/cc/layers/layer.h
@@ -217,8 +217,7 @@
   void SetTransformOrigin(const gfx::Point3F&);
   gfx::Point3F transform_origin() const { return transform_origin_; }
 
-  bool HasAnyAnimationTargetingProperty(
-      Animation::TargetProperty property) const;
+  bool HasAnyAnimationTargetingProperty(TargetProperty::Type property) const;
 
   bool ScrollOffsetAnimationWasInterrupted() const;
 
diff --git a/cc/layers/layer_impl.cc b/cc/layers/layer_impl.cc
index b0515b0d..aa34a8d3 100644
--- a/cc/layers/layer_impl.cc
+++ b/cc/layers/layer_impl.cc
@@ -862,10 +862,10 @@
   if (scrollable())
     UpdatePropertyTreeScrollOffset();
 
-  if (HasAnyAnimationTargetingProperty(Animation::OPACITY))
+  if (HasAnyAnimationTargetingProperty(TargetProperty::OPACITY))
     UpdatePropertyTreeOpacity();
 
-  if (HasAnyAnimationTargetingProperty(Animation::TRANSFORM)) {
+  if (HasAnyAnimationTargetingProperty(TargetProperty::TRANSFORM)) {
     UpdatePropertyTreeTransform();
     UpdatePropertyTreeTransformIsAnimated(
         HasPotentiallyRunningTransformAnimation());
@@ -1081,7 +1081,7 @@
                  : LayerAnimationController::ObserverType::PENDING;
   return layer_animation_controller_
              ? layer_animation_controller_->IsCurrentlyAnimatingProperty(
-                   Animation::FILTER, observer_type)
+                   TargetProperty::FILTER, observer_type)
              : layer_tree_impl_->IsAnimatingFilterProperty(this);
 }
 
@@ -1091,7 +1091,7 @@
                  : LayerAnimationController::ObserverType::PENDING;
   return layer_animation_controller_
              ? layer_animation_controller_->IsPotentiallyAnimatingProperty(
-                   Animation::FILTER, observer_type)
+                   TargetProperty::FILTER, observer_type)
              : layer_tree_impl_->HasPotentiallyRunningFilterAnimation(this);
 }
 
@@ -1100,7 +1100,7 @@
     return layer_tree_impl_->FilterIsAnimatingOnImplOnly(this);
 
   Animation* filter_animation =
-      layer_animation_controller_->GetAnimation(Animation::FILTER);
+      layer_animation_controller_->GetAnimation(TargetProperty::FILTER);
   return filter_animation && filter_animation->is_impl_only();
 }
 
@@ -1145,7 +1145,7 @@
                  : LayerAnimationController::ObserverType::PENDING;
   return layer_animation_controller_
              ? layer_animation_controller_->IsCurrentlyAnimatingProperty(
-                   Animation::OPACITY, observer_type)
+                   TargetProperty::OPACITY, observer_type)
              : layer_tree_impl_->IsAnimatingOpacityProperty(this);
 }
 
@@ -1155,7 +1155,7 @@
                  : LayerAnimationController::ObserverType::PENDING;
   return layer_animation_controller_
              ? layer_animation_controller_->IsPotentiallyAnimatingProperty(
-                   Animation::OPACITY, observer_type)
+                   TargetProperty::OPACITY, observer_type)
              : layer_tree_impl_->HasPotentiallyRunningOpacityAnimation(this);
 }
 
@@ -1164,7 +1164,7 @@
     return layer_tree_impl_->OpacityIsAnimatingOnImplOnly(this);
 
   Animation* opacity_animation =
-      layer_animation_controller_->GetAnimation(Animation::OPACITY);
+      layer_animation_controller_->GetAnimation(TargetProperty::OPACITY);
   return opacity_animation && opacity_animation->is_impl_only();
 }
 
@@ -1267,7 +1267,7 @@
                  : LayerAnimationController::ObserverType::PENDING;
   return layer_animation_controller_
              ? layer_animation_controller_->IsCurrentlyAnimatingProperty(
-                   Animation::TRANSFORM, observer_type)
+                   TargetProperty::TRANSFORM, observer_type)
              : layer_tree_impl_->IsAnimatingTransformProperty(this);
 }
 
@@ -1277,7 +1277,7 @@
                  : LayerAnimationController::ObserverType::PENDING;
   return layer_animation_controller_
              ? layer_animation_controller_->IsPotentiallyAnimatingProperty(
-                   Animation::TRANSFORM, observer_type)
+                   TargetProperty::TRANSFORM, observer_type)
              : layer_tree_impl_->HasPotentiallyRunningTransformAnimation(this);
 }
 
@@ -1286,7 +1286,7 @@
     return layer_tree_impl_->TransformIsAnimatingOnImplOnly(this);
 
   Animation* transform_animation =
-      layer_animation_controller_->GetAnimation(Animation::TRANSFORM);
+      layer_animation_controller_->GetAnimation(TargetProperty::TRANSFORM);
   return transform_animation && transform_animation->is_impl_only();
 }
 
@@ -1330,7 +1330,7 @@
 }
 
 bool LayerImpl::HasAnyAnimationTargetingProperty(
-    Animation::TargetProperty property) const {
+    TargetProperty::Type property) const {
   if (!layer_animation_controller_)
     return layer_tree_impl_->HasAnyAnimationTargetingProperty(this, property);
 
@@ -1691,11 +1691,10 @@
   return num_descendants_that_draw_content_;
 }
 
-void LayerImpl::NotifyAnimationFinished(
-    base::TimeTicks monotonic_time,
-    Animation::TargetProperty target_property,
-    int group) {
-  if (target_property == Animation::SCROLL_OFFSET)
+void LayerImpl::NotifyAnimationFinished(base::TimeTicks monotonic_time,
+                                        TargetProperty::Type target_property,
+                                        int group) {
+  if (target_property == TargetProperty::SCROLL_OFFSET)
     layer_tree_impl_->InputScrollAnimationFinished();
 }
 
diff --git a/cc/layers/layer_impl.h b/cc/layers/layer_impl.h
index d4bf384..b5f2ee25 100644
--- a/cc/layers/layer_impl.h
+++ b/cc/layers/layer_impl.h
@@ -119,13 +119,13 @@
 
   // AnimationDelegate implementation.
   void NotifyAnimationStarted(base::TimeTicks monotonic_time,
-                              Animation::TargetProperty target_property,
+                              TargetProperty::Type target_property,
                               int group) override{};
   void NotifyAnimationFinished(base::TimeTicks monotonic_time,
-                               Animation::TargetProperty target_property,
+                               TargetProperty::Type target_property,
                                int group) override;
   void NotifyAnimationAborted(base::TimeTicks monotonic_time,
-                              Animation::TargetProperty target_property,
+                              TargetProperty::Type target_property,
                               int group) override{};
 
   // Tree structure.
@@ -548,8 +548,7 @@
 
   // This includes all animations, even those that are finished but haven't yet
   // been deleted.
-  bool HasAnyAnimationTargetingProperty(
-      Animation::TargetProperty property) const;
+  bool HasAnyAnimationTargetingProperty(TargetProperty::Type property) const;
 
   bool HasFilterAnimationThatInflatesBounds() const;
   bool HasTransformAnimationThatInflatesBounds() const;
diff --git a/cc/layers/layer_unittest.cc b/cc/layers/layer_unittest.cc
index 1b10a914..b393af3f 100644
--- a/cc/layers/layer_unittest.cc
+++ b/cc/layers/layer_unittest.cc
@@ -1759,7 +1759,7 @@
     AddOpacityTransitionToController(impl_layer->layer_animation_controller(),
                                      1.0, 0.3f, 0.7f, false);
     impl_layer->layer_animation_controller()
-        ->GetAnimation(Animation::OPACITY)
+        ->GetAnimation(TargetProperty::OPACITY)
         ->set_is_impl_only(true);
   }
   EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetOpacity(0.75f));
@@ -1810,7 +1810,7 @@
     AddAnimatedFilterToController(impl_layer->layer_animation_controller(), 1.0,
                                   1.f, 2.f);
     impl_layer->layer_animation_controller()
-        ->GetAnimation(Animation::FILTER)
+        ->GetAnimation(TargetProperty::FILTER)
         ->set_is_impl_only(true);
   }
   filters.Append(FilterOperation::CreateSepiaFilter(0.5f));
@@ -2144,7 +2144,7 @@
   curve->AddKeyframe(
       FloatKeyframe::Create(base::TimeDelta::FromSecondsD(1.0), 0.7f, nullptr));
   scoped_ptr<Animation> animation =
-      Animation::Create(std::move(curve), 0, 0, Animation::OPACITY);
+      Animation::Create(std::move(curve), 0, 0, TargetProperty::OPACITY);
 
   return layer->AddAnimation(std::move(animation));
 }
diff --git a/cc/output/output_surface.h b/cc/output/output_surface.h
index 0b068004..88139df 100644
--- a/cc/output/output_surface.h
+++ b/cc/output/output_surface.h
@@ -137,10 +137,6 @@
   virtual void SwapBuffers(CompositorFrame* frame) = 0;
   virtual void OnSwapBuffersComplete();
 
-  // Notifies frame-rate smoothness preference. If true, all non-critical
-  // processing should be stopped, or lowered in priority.
-  virtual void UpdateSmoothnessTakesPriority(bool prefer_smoothness) {}
-
   bool HasClient() { return !!client_; }
 
   // Get the class capable of informing cc of hardware overlay capability.
diff --git a/cc/test/animation_test_common.cc b/cc/test/animation_test_common.cc
index f61e9bb..cc02e633 100644
--- a/cc/test/animation_test_common.cc
+++ b/cc/test/animation_test_common.cc
@@ -47,7 +47,7 @@
 
   scoped_ptr<Animation> animation(Animation::Create(
       std::move(curve), id, AnimationIdProvider::NextGroupId(),
-      Animation::OPACITY));
+      TargetProperty::OPACITY));
   animation->set_needs_synchronized_start_time(true);
 
   target->AddAnimation(std::move(animation));
@@ -74,7 +74,7 @@
 
   scoped_ptr<Animation> animation(Animation::Create(
       std::move(curve), id, AnimationIdProvider::NextGroupId(),
-      Animation::TRANSFORM));
+      TargetProperty::TRANSFORM));
   animation->set_needs_synchronized_start_time(true);
 
   target->AddAnimation(std::move(animation));
@@ -119,9 +119,9 @@
 
   int id = AnimationIdProvider::NextAnimationId();
 
-  scoped_ptr<Animation> animation(
-      Animation::Create(std::move(curve), id,
-                        AnimationIdProvider::NextGroupId(), Animation::FILTER));
+  scoped_ptr<Animation> animation(Animation::Create(
+      std::move(curve), id, AnimationIdProvider::NextGroupId(),
+      TargetProperty::FILTER));
   animation->set_needs_synchronized_start_time(true);
 
   target->AddAnimation(std::move(animation));
@@ -417,7 +417,7 @@
 
   scoped_ptr<Animation> animation(Animation::Create(
       std::move(curve), id, AnimationIdProvider::NextGroupId(),
-      Animation::OPACITY));
+      TargetProperty::OPACITY));
   animation->set_needs_synchronized_start_time(true);
 
   target->AddAnimation(std::move(animation));
@@ -525,10 +525,9 @@
                                       end_opacity, use_timing_function);
 }
 
-void AbortAnimationsOnLayerWithPlayer(
-    int layer_id,
-    scoped_refptr<AnimationTimeline> timeline,
-    Animation::TargetProperty target_property) {
+void AbortAnimationsOnLayerWithPlayer(int layer_id,
+                                      scoped_refptr<AnimationTimeline> timeline,
+                                      TargetProperty::Type target_property) {
   LayerAnimationController* controller =
       timeline->animation_host()->GetControllerForLayerId(layer_id);
   DCHECK(controller);
diff --git a/cc/test/animation_test_common.h b/cc/test/animation_test_common.h
index 19e7a7c..7a6fe0d8 100644
--- a/cc/test/animation_test_common.h
+++ b/cc/test/animation_test_common.h
@@ -260,10 +260,9 @@
     float end_opacity,
     bool use_timing_function);
 
-void AbortAnimationsOnLayerWithPlayer(
-    int layer_id,
-    scoped_refptr<AnimationTimeline> timeline,
-    Animation::TargetProperty target_property);
+void AbortAnimationsOnLayerWithPlayer(int layer_id,
+                                      scoped_refptr<AnimationTimeline> timeline,
+                                      TargetProperty::Type target_property);
 
 }  // namespace cc
 
diff --git a/cc/test/animation_timelines_test_common.cc b/cc/test/animation_timelines_test_common.cc
index d3b80f60..f9417360 100644
--- a/cc/test/animation_timelines_test_common.cc
+++ b/cc/test/animation_timelines_test_common.cc
@@ -31,7 +31,7 @@
   opacity_ = 0;
   brightness_ = 0;
 
-  for (int i = 0; i <= Animation::LAST_TARGET_PROPERTY; ++i)
+  for (int i = 0; i <= TargetProperty::LAST_TARGET_PROPERTY; ++i)
     mutated_properties_[i] = false;
 }
 
@@ -129,10 +129,9 @@
   layers_in_tree.erase(kv);
 }
 
-bool TestHostClient::IsPropertyMutated(
-    int layer_id,
-    LayerTreeType tree_type,
-    Animation::TargetProperty property) const {
+bool TestHostClient::IsPropertyMutated(int layer_id,
+                                       LayerTreeType tree_type,
+                                       TargetProperty::Type property) const {
   TestLayer* layer = FindTestLayer(layer_id, tree_type);
   return layer->is_property_mutated(property);
 }
@@ -141,7 +140,7 @@
                                                  LayerTreeType tree_type,
                                                  float brightness) const {
   TestLayer* layer = FindTestLayer(layer_id, tree_type);
-  EXPECT_TRUE(layer->is_property_mutated(Animation::OPACITY));
+  EXPECT_TRUE(layer->is_property_mutated(TargetProperty::OPACITY));
   EXPECT_EQ(brightness, layer->brightness());
 }
 
@@ -149,7 +148,7 @@
                                                   LayerTreeType tree_type,
                                                   float opacity) const {
   TestLayer* layer = FindTestLayer(layer_id, tree_type);
-  EXPECT_TRUE(layer->is_property_mutated(Animation::OPACITY));
+  EXPECT_TRUE(layer->is_property_mutated(TargetProperty::OPACITY));
   EXPECT_EQ(opacity, layer->opacity());
 }
 
@@ -158,7 +157,7 @@
                                                     int transform_x,
                                                     int transform_y) const {
   TestLayer* layer = FindTestLayer(layer_id, tree_type);
-  EXPECT_TRUE(layer->is_property_mutated(Animation::OPACITY));
+  EXPECT_TRUE(layer->is_property_mutated(TargetProperty::OPACITY));
   EXPECT_EQ(transform_x, layer->transform_x());
   EXPECT_EQ(transform_y, layer->transform_y());
 }
@@ -180,13 +179,13 @@
 
 void TestAnimationDelegate::NotifyAnimationStarted(
     base::TimeTicks monotonic_time,
-    Animation::TargetProperty target_property,
+    TargetProperty::Type target_property,
     int group) {
   started_ = true;
 }
 void TestAnimationDelegate::NotifyAnimationFinished(
     base::TimeTicks monotonic_time,
-    Animation::TargetProperty target_property,
+    TargetProperty::Type target_property,
     int group) {
   finished_ = true;
 }
diff --git a/cc/test/animation_timelines_test_common.h b/cc/test/animation_timelines_test_common.h
index 2f1388e..0d041b5 100644
--- a/cc/test/animation_timelines_test_common.h
+++ b/cc/test/animation_timelines_test_common.h
@@ -29,28 +29,28 @@
   void set_transform(int transform_x, int transform_y) {
     transform_x_ = transform_x;
     transform_y_ = transform_y;
-    mutated_properties_[Animation::TRANSFORM] = true;
+    mutated_properties_[TargetProperty::TRANSFORM] = true;
   }
 
   float opacity() const { return opacity_; }
   void set_opacity(float opacity) {
     opacity_ = opacity;
-    mutated_properties_[Animation::OPACITY] = true;
+    mutated_properties_[TargetProperty::OPACITY] = true;
   }
 
   float brightness() const { return brightness_; }
   void set_brightness(float brightness) {
     brightness_ = brightness;
-    mutated_properties_[Animation::FILTER] = true;
+    mutated_properties_[TargetProperty::FILTER] = true;
   }
 
   gfx::ScrollOffset scroll_offset() const { return scroll_offset_; }
   void set_scroll_offset(const gfx::ScrollOffset& scroll_offset) {
     scroll_offset_ = scroll_offset;
-    mutated_properties_[Animation::SCROLL_OFFSET] = true;
+    mutated_properties_[TargetProperty::SCROLL_OFFSET] = true;
   }
 
-  bool is_property_mutated(Animation::TargetProperty property) const {
+  bool is_property_mutated(TargetProperty::Type property) const {
     return mutated_properties_[property];
   }
 
@@ -64,7 +64,7 @@
   float brightness_;
   gfx::ScrollOffset scroll_offset_;
 
-  bool mutated_properties_[Animation::LAST_TARGET_PROPERTY + 1];
+  bool mutated_properties_[TargetProperty::LAST_TARGET_PROPERTY + 1];
 };
 
 class TestHostClient : public MutatorHostClient {
@@ -117,7 +117,7 @@
 
   bool IsPropertyMutated(int layer_id,
                          LayerTreeType tree_type,
-                         Animation::TargetProperty property) const;
+                         TargetProperty::Type property) const;
 
   void ExpectFilterPropertyMutated(int layer_id,
                                    LayerTreeType tree_type,
@@ -147,13 +147,13 @@
   TestAnimationDelegate();
 
   void NotifyAnimationStarted(base::TimeTicks monotonic_time,
-                              Animation::TargetProperty target_property,
+                              TargetProperty::Type target_property,
                               int group) override;
   void NotifyAnimationFinished(base::TimeTicks monotonic_time,
-                               Animation::TargetProperty target_property,
+                               TargetProperty::Type target_property,
                                int group) override;
   void NotifyAnimationAborted(base::TimeTicks monotonic_time,
-                              Animation::TargetProperty target_property,
+                              TargetProperty::Type target_property,
                               int group) override {}
   bool started_;
   bool finished_;
diff --git a/cc/test/test_hooks.h b/cc/test/test_hooks.h
index 30ebece..a00233dc 100644
--- a/cc/test/test_hooks.h
+++ b/cc/test/test_hooks.h
@@ -129,13 +129,13 @@
 
   // Implementation of AnimationDelegate:
   void NotifyAnimationStarted(base::TimeTicks monotonic_time,
-                              Animation::TargetProperty target_property,
+                              TargetProperty::Type target_property,
                               int group) override {}
   void NotifyAnimationFinished(base::TimeTicks monotonic_time,
-                               Animation::TargetProperty target_property,
+                               TargetProperty::Type target_property,
                                int group) override {}
   void NotifyAnimationAborted(base::TimeTicks monotonic_time,
-                              Animation::TargetProperty target_property,
+                              TargetProperty::Type target_property,
                               int group) override {}
 
   virtual void RequestNewOutputSurface() = 0;
diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc
index 42a97ea..2dff375 100644
--- a/cc/trees/layer_tree_host.cc
+++ b/cc/trees/layer_tree_host.cc
@@ -1388,7 +1388,7 @@
 
 bool LayerTreeHost::HasAnyAnimationTargetingProperty(
     const Layer* layer,
-    Animation::TargetProperty property) const {
+    TargetProperty::Type property) const {
   return animation_host_
              ? animation_host_->HasAnyAnimationTargetingProperty(layer->id(),
                                                                  property)
diff --git a/cc/trees/layer_tree_host.h b/cc/trees/layer_tree_host.h
index 453c75f..c9850023 100644
--- a/cc/trees/layer_tree_host.h
+++ b/cc/trees/layer_tree_host.h
@@ -397,9 +397,8 @@
   bool HasOnlyTranslationTransforms(const Layer* layer) const;
   bool MaximumTargetScale(const Layer* layer, float* max_scale) const;
   bool AnimationStartScale(const Layer* layer, float* start_scale) const;
-  bool HasAnyAnimationTargetingProperty(
-      const Layer* layer,
-      Animation::TargetProperty property) const;
+  bool HasAnyAnimationTargetingProperty(const Layer* layer,
+                                        TargetProperty::Type property) const;
   bool AnimationsPreserveAxisAlignment(const Layer* layer) const;
   bool HasAnyAnimation(const Layer* layer) const;
   bool HasActiveAnimation(const Layer* layer) const;
diff --git a/cc/trees/layer_tree_host_common_unittest.cc b/cc/trees/layer_tree_host_common_unittest.cc
index b80902a6..69a8ce7 100644
--- a/cc/trees/layer_tree_host_common_unittest.cc
+++ b/cc/trees/layer_tree_host_common_unittest.cc
@@ -2626,7 +2626,7 @@
   // Add a transform animation with a start delay to |grand_child|.
   scoped_ptr<Animation> animation = Animation::Create(
       scoped_ptr<AnimationCurve>(new FakeTransformTransition(1.0)), 0, 1,
-      Animation::TRANSFORM);
+      TargetProperty::TRANSFORM);
   animation->set_fill_mode(Animation::FILL_MODE_NONE);
   animation->set_time_offset(base::TimeDelta::FromMilliseconds(-1000));
   if (layer_settings().use_compositor_animation_timelines) {
@@ -7553,18 +7553,18 @@
 
   if (layer_settings().use_compositor_animation_timelines) {
     AbortAnimationsOnLayerWithPlayer(grand_parent->id(), timeline,
-                                     Animation::TRANSFORM);
+                                     TargetProperty::TRANSFORM);
     AbortAnimationsOnLayerWithPlayer(parent_raw->id(), timeline,
-                                     Animation::TRANSFORM);
+                                     TargetProperty::TRANSFORM);
     AbortAnimationsOnLayerWithPlayer(child_raw->id(), timeline,
-                                     Animation::TRANSFORM);
+                                     TargetProperty::TRANSFORM);
   } else {
     grand_parent->layer_animation_controller()->AbortAnimations(
-        Animation::TRANSFORM);
+        TargetProperty::TRANSFORM);
     parent_raw->layer_animation_controller()->AbortAnimations(
-        Animation::TRANSFORM);
+        TargetProperty::TRANSFORM);
     child_raw->layer_animation_controller()->AbortAnimations(
-        Animation::TRANSFORM);
+        TargetProperty::TRANSFORM);
   }
 
   TransformOperations perspective;
@@ -7602,10 +7602,10 @@
 
   if (layer_settings().use_compositor_animation_timelines) {
     AbortAnimationsOnLayerWithPlayer(child_raw->id(), timeline,
-                                     Animation::TRANSFORM);
+                                     TargetProperty::TRANSFORM);
   } else {
     child_raw->layer_animation_controller()->AbortAnimations(
-        Animation::TRANSFORM);
+        TargetProperty::TRANSFORM);
   }
   gfx::Transform scale_matrix;
   scale_matrix.Scale(1.f, 2.f);
@@ -8522,7 +8522,7 @@
   curve->AddKeyframe(FilterKeyframe::Create(
       base::TimeDelta::FromMilliseconds(100), end_filters, nullptr));
   scoped_ptr<Animation> animation =
-      Animation::Create(std::move(curve), 0, 1, Animation::FILTER);
+      Animation::Create(std::move(curve), 0, 1, TargetProperty::FILTER);
   animation->set_fill_mode(Animation::FILL_MODE_NONE);
   animation->set_time_offset(base::TimeDelta::FromMilliseconds(-1000));
 
@@ -9003,7 +9003,7 @@
   int animation_id = 0;
   scoped_ptr<Animation> animation = Animation::Create(
       scoped_ptr<AnimationCurve>(new FakeTransformTransition(1.0)),
-      animation_id, 1, Animation::TRANSFORM);
+      animation_id, 1, TargetProperty::TRANSFORM);
   animation->set_fill_mode(Animation::FILL_MODE_NONE);
   animation->set_time_offset(base::TimeDelta::FromMilliseconds(-1000));
   if (layer_settings().use_compositor_animation_timelines) {
@@ -9040,7 +9040,7 @@
   animation_id = 1;
   animation = Animation::Create(
       scoped_ptr<AnimationCurve>(new FakeFloatTransition(1.0, 0.f, 1.f)),
-      animation_id, 1, Animation::OPACITY);
+      animation_id, 1, TargetProperty::OPACITY);
   animation->set_fill_mode(Animation::FILL_MODE_NONE);
   animation->set_time_offset(base::TimeDelta::FromMilliseconds(-1000));
   if (layer_settings().use_compositor_animation_timelines) {
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index 0ffe578..8b12272 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -3750,7 +3750,7 @@
     return animation_host_->ScrollAnimationAbort();
 
   layer_impl->layer_animation_controller()->AbortAnimations(
-      Animation::SCROLL_OFFSET);
+      TargetProperty::SCROLL_OFFSET);
 }
 
 void LayerTreeHostImpl::ScrollAnimationCreate(
@@ -3771,7 +3771,7 @@
 
   scoped_ptr<Animation> animation = Animation::Create(
       std::move(curve), AnimationIdProvider::NextAnimationId(),
-      AnimationIdProvider::NextGroupId(), Animation::SCROLL_OFFSET);
+      AnimationIdProvider::NextGroupId(), TargetProperty::SCROLL_OFFSET);
   animation->set_is_impl_only(true);
 
   layer_impl->layer_animation_controller()->AddAnimation(std::move(animation));
@@ -3792,7 +3792,7 @@
   Animation* animation =
       layer_impl->layer_animation_controller()
           ? layer_impl->layer_animation_controller()->GetAnimation(
-                Animation::SCROLL_OFFSET)
+                TargetProperty::SCROLL_OFFSET)
           : nullptr;
   if (!animation)
     return false;
diff --git a/cc/trees/layer_tree_host_impl_unittest.cc b/cc/trees/layer_tree_host_impl_unittest.cc
index d7fc121..d155c5b0 100644
--- a/cc/trees/layer_tree_host_impl_unittest.cc
+++ b/cc/trees/layer_tree_host_impl_unittest.cc
@@ -9403,7 +9403,7 @@
   host_impl_->UpdateAnimationState(true);
 
   EXPECT_TRUE(host_impl_->animation_host()->HasAnyAnimationTargetingProperty(
-      scrolling_layer->id(), Animation::SCROLL_OFFSET));
+      scrolling_layer->id(), TargetProperty::SCROLL_OFFSET));
 
   EXPECT_EQ(gfx::ScrollOffset(), scrolling_layer->CurrentScrollOffset());
   host_impl_->DidFinishImplFrame();
diff --git a/cc/trees/layer_tree_host_unittest_animation.cc b/cc/trees/layer_tree_host_unittest_animation.cc
index 3e269c3..bc68df8 100644
--- a/cc/trees/layer_tree_host_unittest_animation.cc
+++ b/cc/trees/layer_tree_host_unittest_animation.cc
@@ -136,13 +136,13 @@
   }
 
   void NotifyAnimationStarted(base::TimeTicks monotonic_time,
-                              Animation::TargetProperty target_property,
+                              TargetProperty::Type target_property,
                               int group) override {
     EXPECT_LT(base::TimeTicks(), monotonic_time);
 
     LayerAnimationController* controller =
         layer_tree_host()->root_layer()->layer_animation_controller();
-    Animation* animation = controller->GetAnimation(Animation::OPACITY);
+    Animation* animation = controller->GetAnimation(TargetProperty::OPACITY);
     if (animation)
       controller->RemoveAnimation(animation->id());
 
@@ -220,7 +220,7 @@
   }
 
   void NotifyAnimationFinished(base::TimeTicks monotonic_time,
-                               Animation::TargetProperty target_property,
+                               TargetProperty::Type target_property,
                                int group) override {
     // Animations on the impl-side controller only get deleted during a commit,
     // so we need to schedule a commit.
@@ -258,7 +258,8 @@
     LayerAnimationController* controller_impl =
         host_impl->active_tree()->root_layer()->children()[0]->
         layer_animation_controller();
-    Animation* animation = controller_impl->GetAnimation(Animation::OPACITY);
+    Animation* animation =
+        controller_impl->GetAnimation(TargetProperty::OPACITY);
     if (!animation)
       return;
 
@@ -303,12 +304,12 @@
   void BeginTest() override { PostAddAnimationToMainThread(picture_.get()); }
 
   void NotifyAnimationStarted(base::TimeTicks monotonic_time,
-                              Animation::TargetProperty target_property,
+                              TargetProperty::Type target_property,
                               int group) override {
     LayerAnimationController* controller =
         layer_tree_host()->root_layer()->children()[0]->
         layer_animation_controller();
-    Animation* animation = controller->GetAnimation(Animation::OPACITY);
+    Animation* animation = controller->GetAnimation(TargetProperty::OPACITY);
     main_start_time_ = animation->start_time();
     controller->RemoveAnimation(animation->id());
     EndTest();
@@ -319,7 +320,7 @@
     LayerAnimationController* controller =
         impl_host->active_tree()->root_layer()->children()[0]->
         layer_animation_controller();
-    Animation* animation = controller->GetAnimation(Animation::OPACITY);
+    Animation* animation = controller->GetAnimation(TargetProperty::OPACITY);
     if (!animation)
       return;
 
@@ -350,11 +351,11 @@
   }
 
   void NotifyAnimationFinished(base::TimeTicks monotonic_time,
-                               Animation::TargetProperty target_property,
+                               TargetProperty::Type target_property,
                                int group) override {
     LayerAnimationController* controller =
         layer_tree_host()->root_layer()->layer_animation_controller();
-    Animation* animation = controller->GetAnimation(Animation::OPACITY);
+    Animation* animation = controller->GetAnimation(TargetProperty::OPACITY);
     if (animation)
       controller->RemoveAnimation(animation->id());
     EndTest();
@@ -390,7 +391,7 @@
     LayerAnimationController* controller_impl =
         host_impl->active_tree()->root_layer()->layer_animation_controller();
     Animation* animation_impl =
-        controller_impl->GetAnimation(Animation::OPACITY);
+        controller_impl->GetAnimation(TargetProperty::OPACITY);
     controller_impl->RemoveAnimation(animation_impl->id());
     EndTest();
   }
@@ -427,7 +428,7 @@
       // Any valid AnimationCurve will do here.
       scoped_ptr<AnimationCurve> curve(new FakeFloatAnimationCurve());
       scoped_ptr<Animation> animation(
-          Animation::Create(std::move(curve), 1, 1, Animation::OPACITY));
+          Animation::Create(std::move(curve), 1, 1, TargetProperty::OPACITY));
       layer->layer_animation_controller()->AddAnimation(std::move(animation));
 
       // We add the animation *before* attaching the layer to the tree.
@@ -616,7 +617,7 @@
   }
 
   void NotifyAnimationStarted(base::TimeTicks monotonic_time,
-                              Animation::TargetProperty target_property,
+                              TargetProperty::Type target_property,
                               int group) override {
     if (TestEnded())
       return;
@@ -667,7 +668,7 @@
                 gfx::ScrollOffset(500.f, 550.f),
                 EaseInOutTimingFunction::Create()));
         scoped_ptr<Animation> animation(Animation::Create(
-            std::move(curve), 1, 0, Animation::SCROLL_OFFSET));
+            std::move(curve), 1, 0, TargetProperty::SCROLL_OFFSET));
         animation->set_needs_synchronized_start_time(true);
         bool animation_added =
             scroll_layer_->AddAnimation(std::move(animation));
@@ -718,8 +719,8 @@
     scoped_ptr<ScrollOffsetAnimationCurve> curve(
         ScrollOffsetAnimationCurve::Create(gfx::ScrollOffset(6500.f, 7500.f),
                                            EaseInOutTimingFunction::Create()));
-    scoped_ptr<Animation> animation(
-        Animation::Create(std::move(curve), 1, 0, Animation::SCROLL_OFFSET));
+    scoped_ptr<Animation> animation(Animation::Create(
+        std::move(curve), 1, 0, TargetProperty::SCROLL_OFFSET));
     animation->set_needs_synchronized_start_time(true);
     scroll_layer_->AddAnimation(std::move(animation));
   }
@@ -733,7 +734,7 @@
       case 1: {
         Animation* animation =
             scroll_layer_->layer_animation_controller()->GetAnimation(
-                Animation::SCROLL_OFFSET);
+                TargetProperty::SCROLL_OFFSET);
         scroll_layer_->layer_animation_controller()->RemoveAnimation(
             animation->id());
         scroll_layer_->SetScrollOffset(final_postion_);
@@ -762,7 +763,7 @@
         host_impl->active_tree()->root_layer()->children()[0].get();
     Animation* animation =
         scroll_layer_impl->layer_animation_controller()->GetAnimation(
-            Animation::SCROLL_OFFSET);
+            TargetProperty::SCROLL_OFFSET);
 
     if (!animation || animation->run_state() != Animation::RUNNING) {
       host_impl->BlockNotifyReadyToActivateForTesting(false);
@@ -864,7 +865,7 @@
     LayerAnimationController* root_controller_impl =
         host_impl->active_tree()->root_layer()->layer_animation_controller();
     Animation* root_animation =
-        root_controller_impl->GetAnimation(Animation::OPACITY);
+        root_controller_impl->GetAnimation(TargetProperty::OPACITY);
     if (!root_animation || root_animation->run_state() != Animation::RUNNING)
       return;
 
@@ -872,12 +873,12 @@
         host_impl->active_tree()->root_layer()->children()
             [0]->layer_animation_controller();
     Animation* child_animation =
-        child_controller_impl->GetAnimation(Animation::OPACITY);
+        child_controller_impl->GetAnimation(TargetProperty::OPACITY);
     EXPECT_EQ(Animation::RUNNING, child_animation->run_state());
     EXPECT_EQ(root_animation->start_time(), child_animation->start_time());
-    root_controller_impl->AbortAnimations(Animation::OPACITY);
-    root_controller_impl->AbortAnimations(Animation::TRANSFORM);
-    child_controller_impl->AbortAnimations(Animation::OPACITY);
+    root_controller_impl->AbortAnimations(TargetProperty::OPACITY);
+    root_controller_impl->AbortAnimations(TargetProperty::TRANSFORM);
+    child_controller_impl->AbortAnimations(TargetProperty::OPACITY);
     EndTest();
   }
 
@@ -932,7 +933,8 @@
     LayerImpl* child = root->children()[0].get();
     LayerAnimationController* controller_impl =
         child->layer_animation_controller();
-    Animation* animation = controller_impl->GetAnimation(Animation::TRANSFORM);
+    Animation* animation =
+        controller_impl->GetAnimation(TargetProperty::TRANSFORM);
 
     // The animation should be starting for the first frame.
     EXPECT_EQ(Animation::STARTING, animation->run_state());
@@ -945,7 +947,7 @@
     // And the sync tree layer should know it is animating.
     EXPECT_TRUE(child->screen_space_transform_is_animating());
 
-    controller_impl->AbortAnimations(Animation::TRANSFORM);
+    controller_impl->AbortAnimations(TargetProperty::TRANSFORM);
     EndTest();
   }
 
@@ -1046,10 +1048,10 @@
     for (auto& it : controllers_copy) {
       int id = it.first;
       if (id == host_impl->RootLayer()->id()) {
-        Animation* anim = it.second->GetAnimation(Animation::TRANSFORM);
+        Animation* anim = it.second->GetAnimation(TargetProperty::TRANSFORM);
         EXPECT_GT((anim->start_time() - base::TimeTicks()).InSecondsF(), 0);
       } else if (id == host_impl->RootLayer()->children()[0]->id()) {
-        Animation* anim = it.second->GetAnimation(Animation::OPACITY);
+        Animation* anim = it.second->GetAnimation(TargetProperty::OPACITY);
         EXPECT_GT((anim->start_time() - base::TimeTicks()).InSecondsF(), 0);
       }
       EndTest();
@@ -1086,7 +1088,8 @@
       case 2:
         LayerAnimationController* controller =
             layer_->layer_animation_controller();
-        Animation* animation = controller->GetAnimation(Animation::TRANSFORM);
+        Animation* animation =
+            controller->GetAnimation(TargetProperty::TRANSFORM);
         layer_->RemoveAnimation(animation->id());
         gfx::Transform transform;
         transform.Translate(10.f, 10.f);
@@ -1162,7 +1165,8 @@
       case 2:
         LayerAnimationController* controller =
             layer_->layer_animation_controller();
-        Animation* animation = controller->GetAnimation(Animation::TRANSFORM);
+        Animation* animation =
+            controller->GetAnimation(TargetProperty::TRANSFORM);
         layer_->RemoveAnimation(animation->id());
         break;
     }
@@ -1310,7 +1314,7 @@
   }
 
   void NotifyAnimationStarted(base::TimeTicks monotonic_time,
-                              Animation::TargetProperty target_property,
+                              TargetProperty::Type target_property,
                               int group) override {
     called_animation_started_ = true;
     layer_tree_host()->AnimateLayers(base::TimeTicks::FromInternalValue(
@@ -1319,7 +1323,7 @@
   }
 
   void NotifyAnimationFinished(base::TimeTicks monotonic_time,
-                               Animation::TargetProperty target_property,
+                               TargetProperty::Type target_property,
                                int group) override {
     called_animation_finished_ = true;
     EndTest();
diff --git a/cc/trees/layer_tree_host_unittest_animation_timelines.cc b/cc/trees/layer_tree_host_unittest_animation_timelines.cc
index 1c62e37..aade4bd 100644
--- a/cc/trees/layer_tree_host_unittest_animation_timelines.cc
+++ b/cc/trees/layer_tree_host_unittest_animation_timelines.cc
@@ -87,13 +87,13 @@
   }
 
   void NotifyAnimationStarted(base::TimeTicks monotonic_time,
-                              Animation::TargetProperty target_property,
+                              TargetProperty::Type target_property,
                               int group) override {
     EXPECT_LT(base::TimeTicks(), monotonic_time);
 
     LayerAnimationController* controller =
         player_->element_animations()->layer_animation_controller();
-    Animation* animation = controller->GetAnimation(Animation::OPACITY);
+    Animation* animation = controller->GetAnimation(TargetProperty::OPACITY);
     if (animation)
       player_->RemoveAnimation(animation->id());
 
@@ -178,7 +178,7 @@
   }
 
   void NotifyAnimationFinished(base::TimeTicks monotonic_time,
-                               Animation::TargetProperty target_property,
+                               TargetProperty::Type target_property,
                                int group) override {
     // Animations on the impl-side controller only get deleted during a commit,
     // so we need to schedule a commit.
@@ -228,7 +228,8 @@
 
     LayerAnimationController* controller_impl =
         player_child_impl->element_animations()->layer_animation_controller();
-    Animation* animation = controller_impl->GetAnimation(Animation::OPACITY);
+    Animation* animation =
+        controller_impl->GetAnimation(TargetProperty::OPACITY);
 
     const FloatAnimationCurve* curve =
         animation->curve()->ToFloatAnimationCurve();
@@ -280,11 +281,11 @@
   }
 
   void NotifyAnimationStarted(base::TimeTicks monotonic_time,
-                              Animation::TargetProperty target_property,
+                              TargetProperty::Type target_property,
                               int group) override {
     LayerAnimationController* controller =
         player_child_->element_animations()->layer_animation_controller();
-    Animation* animation = controller->GetAnimation(Animation::OPACITY);
+    Animation* animation = controller->GetAnimation(TargetProperty::OPACITY);
     main_start_time_ = animation->start_time();
     controller->RemoveAnimation(animation->id());
     EndTest();
@@ -299,7 +300,7 @@
 
     LayerAnimationController* controller =
         player_child_impl->element_animations()->layer_animation_controller();
-    Animation* animation = controller->GetAnimation(Animation::OPACITY);
+    Animation* animation = controller->GetAnimation(TargetProperty::OPACITY);
     if (!animation)
       return;
 
@@ -335,11 +336,11 @@
   }
 
   void NotifyAnimationFinished(base::TimeTicks monotonic_time,
-                               Animation::TargetProperty target_property,
+                               TargetProperty::Type target_property,
                                int group) override {
     LayerAnimationController* controller =
         player_->element_animations()->layer_animation_controller();
-    Animation* animation = controller->GetAnimation(Animation::OPACITY);
+    Animation* animation = controller->GetAnimation(TargetProperty::OPACITY);
     if (animation)
       controller->RemoveAnimation(animation->id());
     EndTest();
@@ -384,7 +385,7 @@
     LayerAnimationController* controller_impl =
         player_impl->element_animations()->layer_animation_controller();
     Animation* animation_impl =
-        controller_impl->GetAnimation(Animation::OPACITY);
+        controller_impl->GetAnimation(TargetProperty::OPACITY);
     controller_impl->RemoveAnimation(animation_impl->id());
     EndTest();
   }
@@ -427,7 +428,7 @@
       // Any valid AnimationCurve will do here.
       scoped_ptr<AnimationCurve> curve(new FakeFloatAnimationCurve());
       scoped_ptr<Animation> animation(
-          Animation::Create(std::move(curve), 1, 1, Animation::OPACITY));
+          Animation::Create(std::move(curve), 1, 1, TargetProperty::OPACITY));
       player_->AddAnimation(std::move(animation));
 
       // We add the animation *before* attaching the layer to the tree.
@@ -507,7 +508,7 @@
   }
 
   void NotifyAnimationStarted(base::TimeTicks monotonic_time,
-                              Animation::TargetProperty target_property,
+                              TargetProperty::Type target_property,
                               int group) override {
     if (TestEnded())
       return;
@@ -564,7 +565,7 @@
                 gfx::ScrollOffset(500.f, 550.f),
                 EaseInOutTimingFunction::Create()));
         scoped_ptr<Animation> animation(Animation::Create(
-            std::move(curve), 1, 0, Animation::SCROLL_OFFSET));
+            std::move(curve), 1, 0, TargetProperty::SCROLL_OFFSET));
         animation->set_needs_synchronized_start_time(true);
         bool impl_scrolling_supported =
             layer_tree_host()->proxy()->SupportsImplScrolling();
@@ -615,8 +616,8 @@
     scoped_ptr<ScrollOffsetAnimationCurve> curve(
         ScrollOffsetAnimationCurve::Create(gfx::ScrollOffset(6500.f, 7500.f),
                                            EaseInOutTimingFunction::Create()));
-    scoped_ptr<Animation> animation(
-        Animation::Create(std::move(curve), 1, 0, Animation::SCROLL_OFFSET));
+    scoped_ptr<Animation> animation(Animation::Create(
+        std::move(curve), 1, 0, TargetProperty::SCROLL_OFFSET));
     animation->set_needs_synchronized_start_time(true);
 
     AttachPlayersToTimeline();
@@ -631,9 +632,10 @@
       case 0:
         break;
       case 1: {
-        Animation* animation = player_child_->element_animations()
-                                   ->layer_animation_controller()
-                                   ->GetAnimation(Animation::SCROLL_OFFSET);
+        Animation* animation =
+            player_child_->element_animations()
+                ->layer_animation_controller()
+                ->GetAnimation(TargetProperty::SCROLL_OFFSET);
         player_child_->RemoveAnimation(animation->id());
         scroll_layer_->SetScrollOffset(final_postion_);
         break;
@@ -666,7 +668,7 @@
         host_impl->active_tree()->root_layer()->children()[0].get();
     Animation* animation = player_impl->element_animations()
                                ->layer_animation_controller()
-                               ->GetAnimation(Animation::SCROLL_OFFSET);
+                               ->GetAnimation(TargetProperty::SCROLL_OFFSET);
 
     if (!animation || animation->run_state() != Animation::RUNNING) {
       host_impl->BlockNotifyReadyToActivateForTesting(false);
@@ -785,19 +787,19 @@
     LayerAnimationController* root_controller_impl =
         player_impl->element_animations()->layer_animation_controller();
     Animation* root_animation =
-        root_controller_impl->GetAnimation(Animation::OPACITY);
+        root_controller_impl->GetAnimation(TargetProperty::OPACITY);
     if (!root_animation || root_animation->run_state() != Animation::RUNNING)
       return;
 
     LayerAnimationController* child_controller_impl =
         player_child_impl->element_animations()->layer_animation_controller();
     Animation* child_animation =
-        child_controller_impl->GetAnimation(Animation::OPACITY);
+        child_controller_impl->GetAnimation(TargetProperty::OPACITY);
     EXPECT_EQ(Animation::RUNNING, child_animation->run_state());
     EXPECT_EQ(root_animation->start_time(), child_animation->start_time());
-    root_controller_impl->AbortAnimations(Animation::OPACITY);
-    root_controller_impl->AbortAnimations(Animation::TRANSFORM);
-    child_controller_impl->AbortAnimations(Animation::OPACITY);
+    root_controller_impl->AbortAnimations(TargetProperty::OPACITY);
+    root_controller_impl->AbortAnimations(TargetProperty::TRANSFORM);
+    child_controller_impl->AbortAnimations(TargetProperty::OPACITY);
     EndTest();
   }
 
@@ -856,10 +858,10 @@
     for (auto& it : controllers_copy) {
       int id = it.first;
       if (id == host_impl->RootLayer()->id()) {
-        Animation* anim = it.second->GetAnimation(Animation::TRANSFORM);
+        Animation* anim = it.second->GetAnimation(TargetProperty::TRANSFORM);
         EXPECT_GT((anim->start_time() - base::TimeTicks()).InSecondsF(), 0);
       } else if (id == host_impl->RootLayer()->children()[0]->id()) {
-        Animation* anim = it.second->GetAnimation(Animation::OPACITY);
+        Animation* anim = it.second->GetAnimation(TargetProperty::OPACITY);
         EXPECT_GT((anim->start_time() - base::TimeTicks()).InSecondsF(), 0);
       }
       EndTest();
@@ -901,7 +903,8 @@
       case 2:
         LayerAnimationController* controller =
             player_child_->element_animations()->layer_animation_controller();
-        Animation* animation = controller->GetAnimation(Animation::TRANSFORM);
+        Animation* animation =
+            controller->GetAnimation(TargetProperty::TRANSFORM);
         player_child_->RemoveAnimation(animation->id());
         gfx::Transform transform;
         transform.Translate(10.f, 10.f);
diff --git a/cc/trees/layer_tree_impl.cc b/cc/trees/layer_tree_impl.cc
index 268d01b..254f253b 100644
--- a/cc/trees/layer_tree_impl.cc
+++ b/cc/trees/layer_tree_impl.cc
@@ -1923,7 +1923,7 @@
 
 bool LayerTreeImpl::HasAnyAnimationTargetingProperty(
     const LayerImpl* layer,
-    Animation::TargetProperty property) const {
+    TargetProperty::Type property) const {
   return layer_tree_host_impl_->animation_host()
              ? layer_tree_host_impl_->animation_host()
                    ->HasAnyAnimationTargetingProperty(layer->id(), property)
diff --git a/cc/trees/layer_tree_impl.h b/cc/trees/layer_tree_impl.h
index bafbed1..f9f1ba1d 100644
--- a/cc/trees/layer_tree_impl.h
+++ b/cc/trees/layer_tree_impl.h
@@ -412,9 +412,8 @@
   bool HasPotentiallyRunningOpacityAnimation(const LayerImpl* layer) const;
   bool HasPotentiallyRunningTransformAnimation(const LayerImpl* layer) const;
 
-  bool HasAnyAnimationTargetingProperty(
-      const LayerImpl* layer,
-      Animation::TargetProperty property) const;
+  bool HasAnyAnimationTargetingProperty(const LayerImpl* layer,
+                                        TargetProperty::Type property) const;
 
   bool FilterIsAnimatingOnImplOnly(const LayerImpl* layer) const;
   bool OpacityIsAnimatingOnImplOnly(const LayerImpl* layer) const;
diff --git a/cc/trees/property_tree_builder.cc b/cc/trees/property_tree_builder.cc
index c159aaa..551c911 100644
--- a/cc/trees/property_tree_builder.cc
+++ b/cc/trees/property_tree_builder.cc
@@ -241,7 +241,7 @@
   // in the Finished state at tree-building time on the main thread is still in
   // the Running state right after commit on the compositor thread.
   const bool has_any_transform_animation =
-      layer->HasAnyAnimationTargetingProperty(Animation::TRANSFORM);
+      layer->HasAnyAnimationTargetingProperty(TargetProperty::TRANSFORM);
 
   const bool has_surface = created_render_surface;
 
diff --git a/cc/trees/proxy_impl.cc b/cc/trees/proxy_impl.cc
index aefd84770..46df9ecb 100644
--- a/cc/trees/proxy_impl.cc
+++ b/cc/trees/proxy_impl.cc
@@ -412,14 +412,6 @@
           : ScrollHandlerState::SCROLL_DOES_NOT_AFFECT_SCROLL_HANDLER;
   scheduler_->SetTreePrioritiesAndScrollState(tree_priority,
                                               scroll_handler_state);
-
-  // Notify the the client of this compositor via the output surface.
-  // TODO(epenner): Route this to compositor-thread instead of output-surface
-  // after GTFO refactor of compositor-thread (http://crbug/170828).
-  if (layer_tree_host_impl_->output_surface()) {
-    layer_tree_host_impl_->output_surface()->UpdateSmoothnessTakesPriority(
-        tree_priority == SMOOTHNESS_TAKES_PRIORITY);
-  }
 }
 
 void ProxyImpl::PostDelayedAnimationTaskOnImplThread(const base::Closure& task,
diff --git a/chrome/VERSION b/chrome/VERSION
index 3d797d6..490241d5 100644
--- a/chrome/VERSION
+++ b/chrome/VERSION
@@ -1,4 +1,4 @@
 MAJOR=50
 MINOR=0
-BUILD=2659
+BUILD=2660
 PATCH=0
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/ListUrlsActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/ListUrlsActivity.java
index 8eb0dc7..6a120de 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/ListUrlsActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/ListUrlsActivity.java
@@ -69,7 +69,6 @@
     private boolean mIsInitialDisplayRecorded;
     private boolean mIsRefreshing;
     private boolean mIsRefreshUserInitiated;
-    private PhysicalWebBleClient mPhysicalWebBleClient;
 
     @Override
     protected void onCreate(Bundle savedInstanceState) {
@@ -120,8 +119,6 @@
         mIsInitialDisplayRecorded = false;
         mIsRefreshing = false;
         mIsRefreshUserInitiated = false;
-        mPhysicalWebBleClient =
-            PhysicalWebBleClient.getInstance((ChromeApplication) getApplicationContext());
     }
 
     @Override
@@ -155,14 +152,6 @@
         return true;
     }
 
-    private void foregroundSubscribe() {
-        mPhysicalWebBleClient.foregroundSubscribe(this);
-    }
-
-    private void foregroundUnsubscribe() {
-        mPhysicalWebBleClient.foregroundUnsubscribe();
-    }
-
     @Override
     protected void onStart() {
         super.onStart();
@@ -172,7 +161,6 @@
     @Override
     protected void onResume() {
         super.onResume();
-        foregroundSubscribe();
         startRefresh(false, false);
 
         int bottomBarDisplayCount = getBottomBarDisplayCount();
@@ -183,12 +171,6 @@
     }
 
     @Override
-    protected void onPause() {
-        foregroundUnsubscribe();
-        super.onPause();
-    }
-
-    @Override
     public void onRefresh() {
         startRefresh(true, true);
     }
@@ -286,6 +268,9 @@
 
             resolve(urls);
         }
+
+        // Clear stored URLs and resubscribe to Nearby.
+        PhysicalWeb.startPhysicalWeb((ChromeApplication) getApplicationContext());
     }
 
     private void finishRefresh() {
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..230d7959 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
@@ -73,7 +73,7 @@
      */
     public static void startPhysicalWeb(ChromeApplication application) {
         PhysicalWebBleClient physicalWebBleClient = PhysicalWebBleClient.getInstance(application);
-        physicalWebBleClient.backgroundSubscribe();
+        physicalWebBleClient.subscribe();
         clearUrlsAsync(application);
     }
 
@@ -84,7 +84,7 @@
      */
     public static void stopPhysicalWeb(ChromeApplication application) {
         PhysicalWebBleClient physicalWebBleClient = PhysicalWebBleClient.getInstance(application);
-        physicalWebBleClient.backgroundUnsubscribe();
+        physicalWebBleClient.unsubscribe();
         clearUrlsAsync(application);
     }
 
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWebBleClient.java b/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWebBleClient.java
index b1caf76..a0b68c0 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWebBleClient.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWebBleClient.java
@@ -4,8 +4,6 @@
 
 package org.chromium.chrome.browser.physicalweb;
 
-import android.app.Activity;
-
 import org.chromium.base.Log;
 import org.chromium.chrome.browser.ChromeApplication;
 
@@ -34,35 +32,18 @@
     }
 
     /**
-     * Begin a background subscription to URLs broadcasted from BLE beacons.
+     * Begin subscribing to URLs broadcasted from BLE beacons.
      * This currently does nothing and should be overridden by a subclass.
      */
-    void backgroundSubscribe() {
-        Log.d(TAG, "background subscribing in empty client");
+    void subscribe() {
+        Log.d(TAG, "subscribing in empty client");
     }
 
     /**
-     * Cancel a background subscription to URLs broadcasted from BLE beacons.
+     * Cancel subscription to URLs broadcasted from BLE beacons.
      * This currently does nothing and should be overridden by a subclass.
      */
-    void backgroundUnsubscribe() {
-        Log.d(TAG, "background unsubscribing in empty client");
-    }
-
-    /**
-     * Begin a foreground subscription to URLs broadcasted from BLE beacons.
-     * This currently does nothing and should be overridden by a subclass.
-     * @param activity The Activity that is performing the scan.
-     */
-    void foregroundSubscribe(Activity activity) {
-        Log.d(TAG, "foreground subscribing in empty client");
-    }
-
-    /**
-     * Cancel a foreground subscription to URLs broadcasted from BLE beacons.
-     * This currently does nothing and should be overridden by a subclass.
-     */
-    void foregroundUnsubscribe() {
-        Log.d(TAG, "foreground unsubscribing in empty client");
+    void unsubscribe() {
+        Log.d(TAG, "unsubscribing in empty client");
     }
 }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/SignInPreference.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/SignInPreference.java
index 832cded..7b422ee3 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/SignInPreference.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/SignInPreference.java
@@ -21,6 +21,7 @@
 import org.chromium.chrome.browser.signin.AccountManagementFragment;
 import org.chromium.chrome.browser.signin.SigninManager;
 import org.chromium.chrome.browser.signin.SigninManager.SignInAllowedObserver;
+import org.chromium.sync.AndroidSyncSettings;
 import org.chromium.sync.signin.ChromeSigninController;
 
 /**
@@ -75,8 +76,7 @@
             summary = getContext().getString(R.string.sign_in_to_chrome_summary);
             fragment = null;
         } else {
-            summary = String.format(
-                    getContext().getString(R.string.account_management_sync_summary), account.name);
+            summary = getSyncSummaryString(getContext(), account.name);
             fragment = AccountManagementFragment.class.getName();
             title = AccountManagementFragment.getCachedUserName(account.name);
             if (title == null) {
@@ -114,6 +114,16 @@
         }
     }
 
+    private static String getSyncSummaryString(Context context, String accountName) {
+        boolean syncEnabled = AndroidSyncSettings.isSyncEnabled(context);
+        if (syncEnabled) {
+            return String.format(
+                context.getString(R.string.account_management_sync_summary), accountName);
+        }
+
+        return context.getString(R.string.sync_is_disabled);
+    }
+
     @Override
     protected void onBindView(View view) {
         super.onBindView(view);
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/SyncPreference.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/SyncPreference.java
index 1e1c282..1f6eb1d 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/SyncPreference.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/SyncPreference.java
@@ -58,7 +58,9 @@
         // TODO(crbug/557784): Surface IDS_SYNC_UPGRADE_CLIENT string when we require the user
         // to upgrade
 
-        if (AndroidSyncSettings.isSyncEnabled(context)) {
+        boolean syncEnabled = AndroidSyncSettings.isSyncEnabled(context);
+
+        if (syncEnabled) {
             if (!profileSyncService.isBackendInitialized()) {
                 return res.getString(R.string.sync_setup_progress);
             }
@@ -66,16 +68,12 @@
             if (profileSyncService.isPassphraseRequiredForDecryption()) {
                 return res.getString(R.string.sync_need_passphrase);
             }
-        }
 
-        boolean syncEnabled = AndroidSyncSettings.isSyncEnabled(context);
-
-        if (syncEnabled) {
             Account account = ChromeSigninController.get(context).getSignedInUser();
             return String.format(
                     context.getString(R.string.account_management_sync_summary), account.name);
-        } else {
-            return context.getString(R.string.sync_is_disabled);
         }
+
+        return context.getString(R.string.sync_is_disabled);
     }
 }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/sync/ui/SyncCustomizationFragment.java b/chrome/android/java/src/org/chromium/chrome/browser/sync/ui/SyncCustomizationFragment.java
index ad7b3bd..c19c7c9 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/sync/ui/SyncCustomizationFragment.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/sync/ui/SyncCustomizationFragment.java
@@ -4,6 +4,7 @@
 
 package org.chromium.chrome.browser.sync.ui;
 
+import android.accounts.Account;
 import android.app.DialogFragment;
 import android.app.FragmentManager;
 import android.app.FragmentTransaction;
@@ -39,6 +40,7 @@
 import org.chromium.sync.ModelType;
 import org.chromium.sync.PassphraseType;
 import org.chromium.sync.StopSource;
+import org.chromium.sync.signin.AccountManagerHelper;
 
 import java.util.HashSet;
 import java.util.Set;
@@ -290,7 +292,17 @@
     private void updateSyncAccountsListState() {
         SyncedAccountPreference accountList =
                 (SyncedAccountPreference) findPreference(PREFERENCE_SYNC_ACCOUNT_LIST);
-        accountList.setEnabled(mSyncSwitchPreference.isChecked());
+
+        // We remove the the SyncedAccountPreference if there's only 1 account on the device, so
+        // it's possible for accountList to be null
+        if (accountList != null) {
+            Account[] accounts = AccountManagerHelper.get(getActivity()).getGoogleAccounts();
+            if (accounts.length <= 1) {
+                getPreferenceScreen().removePreference(accountList);
+            } else {
+                accountList.setEnabled(mSyncSwitchPreference.isChecked());
+            }
+        }
     }
 
     /**
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd
index 82e068a..e0d7556 100644
--- a/chrome/app/generated_resources.grd
+++ b/chrome/app/generated_resources.grd
@@ -5951,14 +5951,12 @@
         This is to be used in conjunction with the trace-upload-url flag.
         WARNING: When enabled, Chrome will record performance data for every navigation and upload it to the URL specified by the trace-upload-url flag. The trace may include personally identifiable information (PII) such as the titles and URLs of websites you visit.
       </message>
-      <if expr="is_android">
-        <message name="IDS_FLAGS_ENABLE_NON_VALIDATING_RELOAD_ON_REFRESH_CONTENT_NAME" desc="Name of the flag to enable non-validating reload on pull-to-refresh">
-          Enable non-validating reload on pull-to-refresh
-        </message>
-        <message name="IDS_FLAGS_ENABLE_NON_VALIDATING_RELOAD_ON_REFRESH_CONTENT_DESCRIPTION" desc="Description of the flag to enable non-validating reload on pull-to-refresh">
-          Forces pull-to-refresh trigger non-validating reload (while it usually means regular, cache-validating reload when the flag is disabled).
-        </message>
-      </if>
+      <message name="IDS_FLAGS_ENABLE_NON_VALIDATING_RELOAD_ON_REFRESH_CONTENT_NAME" desc="Name of the flag to enable non-validating reload on pull-to-refresh">
+        Enable non-validating reload on pull-to-refresh
+      </message>
+      <message name="IDS_FLAGS_ENABLE_NON_VALIDATING_RELOAD_ON_REFRESH_CONTENT_DESCRIPTION" desc="Description of the flag to enable non-validating reload on pull-to-refresh">
+        Forces pull-to-refresh trigger non-validating reload (while it usually means regular, cache-validating reload when the flag is disabled).
+      </message>
       <message name="IDS_FLAGS_TRACE_UPLOAD_URL" desc="Name of the flag to set the trace upload url">
         Trace label for navigation tracing
       </message>
diff --git a/chrome/app/mash/BUILD.gn b/chrome/app/mash/BUILD.gn
index 654b512..604c8e0d 100644
--- a/chrome/app/mash/BUILD.gn
+++ b/chrome/app/mash/BUILD.gn
@@ -10,6 +10,7 @@
     "mash_runner.h",
   ]
   deps = [
+    ":chrome_manifest",
     ":manifest",
     "//ash/mus:lib",
     "//ash/resources",
@@ -62,3 +63,9 @@
     packaged_applications += [ "font_service" ]
   }
 }
+
+mojo_application_manifest("chrome_manifest") {
+  type = "exe"
+  application_name = "chrome"
+  source = "chrome_manifest.json"
+}
diff --git a/chrome/app/mash/chrome_manifest.json b/chrome/app/mash/chrome_manifest.json
new file mode 100644
index 0000000..90642be
--- /dev/null
+++ b/chrome/app/mash/chrome_manifest.json
@@ -0,0 +1,5 @@
+{
+  "url": "exe://chrome/",
+  "name": "Chrome",
+  "capabilities": { "*": [ "*" ] }
+}
diff --git a/chrome/app/mash/mash_runner.cc b/chrome/app/mash/mash_runner.cc
index c49780cd..c8804d3 100644
--- a/chrome/app/mash/mash_runner.cc
+++ b/chrome/app/mash/mash_runner.cc
@@ -20,7 +20,7 @@
 #include "mash/shell/shell_application_delegate.h"
 #include "mash/wm/window_manager_application.h"
 #include "mojo/common/mojo_scheme_register.h"
-#include "mojo/public/cpp/bindings/weak_binding_set.h"
+#include "mojo/public/cpp/bindings/binding_set.h"
 #include "mojo/shell/background/background_shell.h"
 #include "mojo/shell/identity.h"
 #include "mojo/shell/native_runner_delegate.h"
@@ -105,7 +105,7 @@
     return nullptr;
   }
 
-  mojo::WeakBindingSet<ShellClientFactory> shell_client_factory_bindings_;
+  mojo::BindingSet<ShellClientFactory> shell_client_factory_bindings_;
   scoped_ptr<mojo::ShellClient> shell_client_;
   scoped_ptr<mojo::ShellConnection> shell_connection_;
 
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index b1dbcce..192be1f2 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -970,13 +970,11 @@
     {"enable-navigation-tracing", IDS_FLAGS_ENABLE_NAVIGATION_TRACING,
      IDS_FLAGS_ENABLE_NAVIGATION_TRACING_DESCRIPTION, kOsAll,
      SINGLE_VALUE_TYPE(switches::kEnableNavigationTracing)},
-#if defined(OS_ANDROID)
     {"enable-non-validating-reload-on-refresh-content",
      IDS_FLAGS_ENABLE_NON_VALIDATING_RELOAD_ON_REFRESH_CONTENT_NAME,
      IDS_FLAGS_ENABLE_NON_VALIDATING_RELOAD_ON_REFRESH_CONTENT_DESCRIPTION,
      kOsAndroid,
-     SINGLE_VALUE_TYPE(switches::kEnableNonValidatingReloadOnRefreshContent)},
-#endif
+     FEATURE_VALUE_TYPE(features::kNonValidatingReloadOnRefreshContent)},
     {"trace-upload-url", IDS_FLAGS_TRACE_UPLOAD_URL,
      IDS_FLAGS_TRACE_UPLOAD_URL_DESCRIPTION, kOsAll,
      MULTI_VALUE_TYPE(kTraceUploadURL)},
diff --git a/chrome/browser/apps/app_browsertest.cc b/chrome/browser/apps/app_browsertest.cc
index ebe77d91..5dc839e 100644
--- a/chrome/browser/apps/app_browsertest.cc
+++ b/chrome/browser/apps/app_browsertest.cc
@@ -259,6 +259,7 @@
   }
 };
 
+const char kChromiumURL[] = "http://chromium.org";
 #if !defined(OS_CHROMEOS)
 const char kTestFilePath[] = "platform_apps/launch_files/test.txt";
 #endif
@@ -432,17 +433,27 @@
 }
 
 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, DisallowNavigation) {
-  TabsAddedNotificationObserver observer(2);
+  TabsAddedNotificationObserver observer(1);
 
   ASSERT_TRUE(StartEmbeddedTestServer());
   ASSERT_TRUE(RunPlatformAppTest("platform_apps/navigation")) << message_;
 
   observer.Wait();
+  ASSERT_EQ(1U, observer.tabs().size());
+  EXPECT_EQ(GURL(kChromiumURL), observer.tabs()[0]->GetURL());
+}
+
+IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest,
+                       DisallowBackgroundPageNavigation) {
+  // The test will try to open in app urls and external urls via clicking links
+  // and window.open(). Only the external urls should succeed in opening tabs.
+  TabsAddedNotificationObserver observer(2);
+  ASSERT_TRUE(RunPlatformAppTest("platform_apps/background_page_navigation")) <<
+      message_;
+  observer.Wait();
   ASSERT_EQ(2U, observer.tabs().size());
-  EXPECT_EQ(std::string(chrome::kExtensionInvalidRequestURL),
-            observer.tabs()[0]->GetURL().spec());
-  EXPECT_EQ("http://chromium.org/",
-            observer.tabs()[1]->GetURL().spec());
+  EXPECT_EQ(GURL(kChromiumURL), observer.tabs()[0]->GetURL());
+  EXPECT_EQ(GURL(kChromiumURL), observer.tabs()[1]->GetURL());
 }
 
 // Failing on some Win and Linux buildbots.  See crbug.com/354425.
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index 0f05ef87..b85bffd 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -2191,8 +2191,25 @@
 
 #if defined(ENABLE_EXTENSIONS)
   if (extensions::WebViewRendererState::GetInstance()->IsGuest(
-      render_process_id))
+      render_process_id)) {
     return true;
+  }
+
+  if (target_url.SchemeIs(extensions::kExtensionScheme) ||
+      target_url.SchemeIs(extensions::kExtensionResourceScheme)) {
+    // Intentionally duplicating |io_data| and |map| code from above because we
+    // want to reduce calls to retrieve them as this function is a SYNC IPC
+    // handler.
+    ProfileIOData* io_data = ProfileIOData::FromResourceContext(context);
+    InfoMap* map = io_data->GetExtensionInfoMap();
+    const Extension* extension =
+        map->extensions().GetExtensionOrAppByURL(opener_url);
+    // Platform apps and their background pages should not be able to call
+    // window.open() to load v2 apps in regular tab.
+    // Simply disallow window.open() calls in this case.
+    if (extension && extension->is_platform_app())
+      return false;
+  }
 #endif
 
   HostContentSettingsMap* content_settings =
diff --git a/chrome/browser/chrome_service_worker_browsertest.cc b/chrome/browser/chrome_service_worker_browsertest.cc
index fca0447..e6c32fd 100644
--- a/chrome/browser/chrome_service_worker_browsertest.cc
+++ b/chrome/browser/chrome_service_worker_browsertest.cc
@@ -6,28 +6,21 @@
 // embedder.
 
 #include "base/bind.h"
-#include "base/command_line.h"
 #include "base/files/scoped_temp_dir.h"
 #include "base/numerics/safe_conversions.h"
 #include "base/run_loop.h"
-#include "base/strings/stringprintf.h"
-#include "base/strings/utf_string_conversions.h"
 #include "chrome/browser/chrome_notification_types.h"
 #include "chrome/browser/profiles/profile.h"
 #include "chrome/browser/ui/browser.h"
 #include "chrome/browser/ui/browser_window.h"
 #include "chrome/browser/ui/tabs/tab_strip_model.h"
-#include "chrome/common/chrome_switches.h"
 #include "chrome/test/base/in_process_browser_test.h"
 #include "chrome/test/base/ui_test_utils.h"
 #include "content/public/browser/browser_context.h"
-#include "content/public/browser/render_frame_host.h"
 #include "content/public/browser/service_worker_context.h"
 #include "content/public/browser/storage_partition.h"
 #include "content/public/browser/web_contents.h"
-#include "content/public/test/browser_test_utils.h"
 #include "net/test/embedded_test_server/embedded_test_server.h"
-#include "ppapi/shared_impl/ppapi_switches.h"
 
 namespace {
 
@@ -36,7 +29,6 @@
   ChromeServiceWorkerTest() {
     EXPECT_TRUE(service_worker_dir_.CreateUniqueTempDir());
   }
-  ~ChromeServiceWorkerTest() override {}
 
   void WriteFile(const base::FilePath::StringType& filename,
                  base::StringPiece contents) {
@@ -47,9 +39,6 @@
   }
 
   base::ScopedTempDir service_worker_dir_;
-
- private:
-  DISALLOW_COPY_AND_ASSIGN(ChromeServiceWorkerTest);
 };
 
 static void ExpectResultAndRun(bool expected,
@@ -120,382 +109,4 @@
   // Test passes if we don't crash.
 }
 
-class ChromeServiceWorkerFetchTest : public ChromeServiceWorkerTest {
- protected:
-  ChromeServiceWorkerFetchTest() {}
-  ~ChromeServiceWorkerFetchTest() override {}
-
-  void SetUpOnMainThread() override {
-    WriteServiceWorkerFetchTestFiles();
-    embedded_test_server()->ServeFilesFromDirectory(service_worker_dir_.path());
-    ASSERT_TRUE(embedded_test_server()->Start());
-    InitializeServiceWorkerFetchTestPage();
-  }
-
-  std::string ExecuteScriptAndExtractString(const std::string& js) {
-    std::string result;
-    EXPECT_TRUE(content::ExecuteScriptAndExtractString(
-        browser()->tab_strip_model()->GetActiveWebContents(), js, &result));
-    return result;
-  }
-
-  std::string RequestString(const std::string& url,
-                            const std::string& mode,
-                            const std::string& credentials) const {
-    return base::StringPrintf("url:%s, mode:%s, credentials:%s\n", url.c_str(),
-                              mode.c_str(), credentials.c_str());
-  }
-
-  std::string GetURL(const std::string& relative_url) const {
-    return embedded_test_server()->GetURL(relative_url).spec();
-  }
-
- private:
-  void WriteServiceWorkerFetchTestFiles() {
-    WriteFile(FILE_PATH_LITERAL("sw.js"),
-              "this.onactivate = function(event) {"
-              "  event.waitUntil(self.clients.claim());"
-              "};"
-              "this.onfetch = function(event) {"
-              "  event.respondWith("
-              "      self.clients.matchAll().then(function(clients) {"
-              "          clients.forEach(function(client) {"
-              "              client.postMessage("
-              "                'url:' + event.request.url + ', ' +"
-              "                'mode:' + event.request.mode + ', ' +"
-              "                'credentials:' + event.request.credentials"
-              "              );"
-              "            });"
-              "          return fetch(event.request);"
-              "        }));"
-              "};");
-    WriteFile(FILE_PATH_LITERAL("test.html"),
-              "<script>"
-              "navigator.serviceWorker.register('./sw.js', {scope: './'})"
-              "  .then(function(reg) {"
-              "      reg.addEventListener('updatefound', function() {"
-              "          var worker = reg.installing;"
-              "          worker.addEventListener('statechange', function() {"
-              "              if (worker.state == 'activated')"
-              "                document.title = 'READY';"
-              "            });"
-              "        });"
-              "    });"
-              "var reportOnFetch = true;"
-              "var issuedRequests = [];"
-              "function reportRequests() {"
-              "  var str = '';"
-              "  issuedRequests.forEach(function(data) {"
-              "      str += data + '\\n';"
-              "    });"
-              "  window.domAutomationController.setAutomationId(0);"
-              "  window.domAutomationController.send(str);"
-              "}"
-              "navigator.serviceWorker.addEventListener("
-              "    'message',"
-              "    function(event) {"
-              "      issuedRequests.push(event.data);"
-              "      if (reportOnFetch) {"
-              "        reportRequests();"
-              "      }"
-              "    }, false);"
-              "</script>");
-  }
-
-  void InitializeServiceWorkerFetchTestPage() {
-    // The message "READY" will be sent when the service worker is activated.
-    const base::string16 expected_title = base::ASCIIToUTF16("READY");
-    content::TitleWatcher title_watcher(
-        browser()->tab_strip_model()->GetActiveWebContents(), expected_title);
-    ui_test_utils::NavigateToURL(browser(),
-                                 embedded_test_server()->GetURL("/test.html"));
-    EXPECT_EQ(expected_title, title_watcher.WaitAndGetTitle());
-  }
-
-  DISALLOW_COPY_AND_ASSIGN(ChromeServiceWorkerFetchTest);
-};
-
-IN_PROC_BROWSER_TEST_F(ChromeServiceWorkerFetchTest, EmbedPdfSameOrigin) {
-  // <embed src="test.pdf">
-  const std::string result(ExecuteScriptAndExtractString(
-      "var embed = document.createElement('embed');"
-      "embed.src = 'test.pdf';"
-      "document.body.appendChild(embed);"));
-  EXPECT_EQ(RequestString(GetURL("/test.pdf"), "no-cors", "include"), result);
-}
-
-IN_PROC_BROWSER_TEST_F(ChromeServiceWorkerFetchTest, EmbedPdfOtherOrigin) {
-  // <embed src="https://www.example.com/test.pdf">
-  const std::string result(ExecuteScriptAndExtractString(
-      "var embed = document.createElement('embed');"
-      "embed.src = 'https://www.example.com/test.pdf';"
-      "document.body.appendChild(embed);"));
-  EXPECT_EQ(
-      RequestString("https://www.example.com/test.pdf", "no-cors", "include"),
-      result);
-}
-
-class ChromeServiceWorkerManifestFetchTest
-    : public ChromeServiceWorkerFetchTest {
- protected:
-  ChromeServiceWorkerManifestFetchTest() {}
-  ~ChromeServiceWorkerManifestFetchTest() override {}
-
-  void SetUpCommandLine(base::CommandLine* command_line) override {
-    ChromeServiceWorkerFetchTest::SetUpCommandLine(command_line);
-    command_line->AppendSwitch(switches::kEnableAddToShelf);
-  }
-
-  std::string ExecuteManifestFetchTest(const std::string& url,
-                                       const std::string& cross_origin) {
-    std::string js(
-        base::StringPrintf("reportOnFetch = false;"
-                           "var link = document.createElement('link');"
-                           "link.rel = 'manifest';"
-                           "link.href = '%s';",
-                           url.c_str()));
-    if (!cross_origin.empty()) {
-      js +=
-          base::StringPrintf("link.crossOrigin = '%s';", cross_origin.c_str());
-    }
-    js += "document.head.appendChild(link);";
-    ExecuteJavaScriptForTests(js);
-    return RequestAppBannerAndGetIssuedRequests();
-  }
-
- private:
-  void ExecuteJavaScriptForTests(const std::string& js) {
-    browser()
-        ->tab_strip_model()
-        ->GetActiveWebContents()
-        ->GetMainFrame()
-        ->ExecuteJavaScriptForTests(base::ASCIIToUTF16(js));
-  }
-
-  std::string RequestAppBannerAndGetIssuedRequests() {
-    EXPECT_TRUE(browser()->RequestAppBanner(
-        browser()->tab_strip_model()->GetActiveWebContents()));
-    return ExecuteScriptAndExtractString(
-        "if (issuedRequests.length != 0) reportRequests();"
-        "else reportOnFetch = true;");
-  }
-  DISALLOW_COPY_AND_ASSIGN(ChromeServiceWorkerManifestFetchTest);
-};
-
-IN_PROC_BROWSER_TEST_F(ChromeServiceWorkerManifestFetchTest, SameOrigin) {
-  // <link rel="manifest" href="manifest.json">
-  EXPECT_EQ(RequestString(GetURL("/manifest.json"), "cors", "same-origin"),
-            ExecuteManifestFetchTest("manifest.json", ""));
-}
-
-IN_PROC_BROWSER_TEST_F(ChromeServiceWorkerManifestFetchTest,
-                       SameOriginUseCredentials) {
-  // <link rel="manifest" href="manifest.json" crossorigin="use-credentials">
-  EXPECT_EQ(RequestString(GetURL("/manifest.json"), "cors", "include"),
-            ExecuteManifestFetchTest("manifest.json", "use-credentials"));
-}
-
-IN_PROC_BROWSER_TEST_F(ChromeServiceWorkerManifestFetchTest, OtherOrigin) {
-  // <link rel="manifest" href="https://www.example.com/manifest.json">
-  EXPECT_EQ(
-      RequestString("https://www.example.com/manifest.json", "cors",
-                    "same-origin"),
-      ExecuteManifestFetchTest("https://www.example.com/manifest.json", ""));
-}
-
-IN_PROC_BROWSER_TEST_F(ChromeServiceWorkerManifestFetchTest,
-                       OtherOriginUseCredentials) {
-  // <link rel="manifest" href="https://www.example.com/manifest.json"
-  //  crossorigin="use-credentials">
-  EXPECT_EQ(
-      RequestString("https://www.example.com/manifest.json", "cors", "include"),
-      ExecuteManifestFetchTest("https://www.example.com/manifest.json",
-                               "use-credentials"));
-}
-
-class ChromeServiceWorkerFetchPPAPITest : public ChromeServiceWorkerFetchTest {
- protected:
-  ChromeServiceWorkerFetchPPAPITest() {}
-  ~ChromeServiceWorkerFetchPPAPITest() override {}
-
-  void SetUpOnMainThread() override {
-    base::FilePath document_root;
-    ASSERT_TRUE(ui_test_utils::GetRelativeBuildDirectory(&document_root));
-    embedded_test_server()->AddDefaultHandlers(
-        document_root.Append(FILE_PATH_LITERAL("nacl_test_data"))
-            .Append(FILE_PATH_LITERAL("pnacl")));
-    ChromeServiceWorkerFetchTest::SetUpOnMainThread();
-    test_page_url_ = GetURL("/pnacl_url_loader.html");
-  }
-
-  std::string GetRequestStringForPNACL() const {
-    return RequestString(test_page_url_, "navigate", "include") +
-           RequestString(GetURL("/pnacl_url_loader.nmf"), "same-origin",
-                         "include") +
-           RequestString(GetURL("/pnacl_url_loader_newlib_pnacl.pexe"),
-                         "same-origin", "include");
-  }
-
-  std::string ExecutePNACLUrlLoaderTest(const std::string& mode) {
-    std::string result(ExecuteScriptAndExtractString(
-        base::StringPrintf("reportOnFetch = false;"
-                           "var iframe = document.createElement('iframe');"
-                           "iframe.src='%s#%s';"
-                           "document.body.appendChild(iframe);",
-                           test_page_url_.c_str(), mode.c_str())));
-    EXPECT_EQ(base::StringPrintf("OnOpen%s", mode.c_str()), result);
-    return ExecuteScriptAndExtractString("reportRequests();");
-  }
-
- private:
-  std::string test_page_url_;
-
-  DISALLOW_COPY_AND_ASSIGN(ChromeServiceWorkerFetchPPAPITest);
-};
-
-IN_PROC_BROWSER_TEST_F(ChromeServiceWorkerFetchPPAPITest, SameOrigin) {
-  // In pnacl_url_loader.cc:
-  //   request.SetMethod("GET");
-  //   request.SetURL("/echo");
-  EXPECT_EQ(GetRequestStringForPNACL() +
-                RequestString(GetURL("/echo"), "same-origin", "include"),
-            ExecutePNACLUrlLoaderTest("Same"));
-}
-
-IN_PROC_BROWSER_TEST_F(ChromeServiceWorkerFetchPPAPITest, SameOriginCORS) {
-  // In pnacl_url_loader.cc:
-  //   request.SetMethod("GET");
-  //   request.SetURL("/echo");
-  //   request.SetAllowCrossOriginRequests(true);
-  EXPECT_EQ(GetRequestStringForPNACL() +
-                RequestString(GetURL("/echo"), "cors", "same-origin"),
-            ExecutePNACLUrlLoaderTest("SameCORS"));
-}
-
-IN_PROC_BROWSER_TEST_F(ChromeServiceWorkerFetchPPAPITest,
-                       SameOriginCredentials) {
-  // In pnacl_url_loader.cc:
-  //   request.SetMethod("GET");
-  //   request.SetURL("/echo");
-  //   request.SetAllowCredentials(true);
-  EXPECT_EQ(GetRequestStringForPNACL() +
-                RequestString(GetURL("/echo"), "same-origin", "include"),
-            ExecutePNACLUrlLoaderTest("SameCredentials"));
-}
-
-IN_PROC_BROWSER_TEST_F(ChromeServiceWorkerFetchPPAPITest,
-                       SameOriginCORSCredentials) {
-  // In pnacl_url_loader.cc:
-  //   request.SetMethod("GET");
-  //   request.SetURL("/echo");
-  //   request.SetAllowCrossOriginRequests(true);
-  //   request.SetAllowCredentials(true);
-  EXPECT_EQ(GetRequestStringForPNACL() +
-                RequestString(GetURL("/echo"), "cors", "include"),
-            ExecutePNACLUrlLoaderTest("SameCORSCredentials"));
-}
-
-IN_PROC_BROWSER_TEST_F(ChromeServiceWorkerFetchPPAPITest, OtherOrigin) {
-  // In pnacl_url_loader.cc:
-  //   request.SetMethod("GET");
-  //   request.SetURL("https://www.example.com/echo");
-  // This request fails because AllowCrossOriginRequests is not set.
-  EXPECT_EQ(GetRequestStringForPNACL(), ExecutePNACLUrlLoaderTest("Other"));
-}
-
-IN_PROC_BROWSER_TEST_F(ChromeServiceWorkerFetchPPAPITest, OtherOriginCORS) {
-  // In pnacl_url_loader.cc:
-  //   request.SetMethod("GET");
-  //   request.SetURL("https://www.example.com/echo");
-  //   request.SetAllowCrossOriginRequests(true);
-  EXPECT_EQ(
-      GetRequestStringForPNACL() +
-          RequestString("https://www.example.com/echo", "cors", "same-origin"),
-      ExecutePNACLUrlLoaderTest("OtherCORS"));
-}
-
-IN_PROC_BROWSER_TEST_F(ChromeServiceWorkerFetchPPAPITest,
-                       OtherOriginCredentials) {
-  // In pnacl_url_loader.cc:
-  //   request.SetMethod("GET");
-  //   request.SetURL("https://www.example.com/echo");
-  //   request.SetAllowCredentials(true);
-  // This request fails because AllowCrossOriginRequests is not set.
-  EXPECT_EQ(GetRequestStringForPNACL(),
-            ExecutePNACLUrlLoaderTest("OtherCredentials"));
-}
-
-IN_PROC_BROWSER_TEST_F(ChromeServiceWorkerFetchPPAPITest,
-                       OtherOriginCORSCredentials) {
-  // In pnacl_url_loader.cc:
-  //   request.SetMethod("GET");
-  //   request.SetURL("https://www.example.com/echo");
-  //   request.SetAllowCrossOriginRequests(true);
-  //   request.SetAllowCredentials(true);
-  EXPECT_EQ(
-      GetRequestStringForPNACL() +
-          RequestString("https://www.example.com/echo", "cors", "include"),
-      ExecutePNACLUrlLoaderTest("OtherCORSCredentials"));
-}
-
-class ChromeServiceWorkerFetchPPAPIPrivateTest
-    : public ChromeServiceWorkerFetchPPAPITest {
- protected:
-  ChromeServiceWorkerFetchPPAPIPrivateTest() {}
-  ~ChromeServiceWorkerFetchPPAPIPrivateTest() override {}
-
-  void SetUpCommandLine(base::CommandLine* command_line) override {
-    ChromeServiceWorkerFetchPPAPITest::SetUpCommandLine(command_line);
-    // Sets this flag to test that the fetch request from the plugins with
-    // private permission (PERMISSION_PRIVATE) should not go to the service
-    // worker.
-    command_line->AppendSwitch(switches::kEnablePepperTesting);
-  }
-
- private:
-  DISALLOW_COPY_AND_ASSIGN(ChromeServiceWorkerFetchPPAPIPrivateTest);
-};
-
-IN_PROC_BROWSER_TEST_F(ChromeServiceWorkerFetchPPAPIPrivateTest, SameOrigin) {
-  EXPECT_EQ(GetRequestStringForPNACL(), ExecutePNACLUrlLoaderTest("Same"));
-}
-
-IN_PROC_BROWSER_TEST_F(ChromeServiceWorkerFetchPPAPIPrivateTest,
-                       SameOriginCORS) {
-  EXPECT_EQ(GetRequestStringForPNACL(), ExecutePNACLUrlLoaderTest("SameCORS"));
-}
-
-IN_PROC_BROWSER_TEST_F(ChromeServiceWorkerFetchPPAPIPrivateTest,
-                       SameOriginCredentials) {
-  EXPECT_EQ(GetRequestStringForPNACL(),
-            ExecutePNACLUrlLoaderTest("SameCredentials"));
-}
-
-IN_PROC_BROWSER_TEST_F(ChromeServiceWorkerFetchPPAPIPrivateTest,
-                       SameOriginCORSCredentials) {
-  EXPECT_EQ(GetRequestStringForPNACL(),
-            ExecutePNACLUrlLoaderTest("SameCORSCredentials"));
-}
-
-IN_PROC_BROWSER_TEST_F(ChromeServiceWorkerFetchPPAPIPrivateTest, OtherOrigin) {
-  EXPECT_EQ(GetRequestStringForPNACL(), ExecutePNACLUrlLoaderTest("Other"));
-}
-
-IN_PROC_BROWSER_TEST_F(ChromeServiceWorkerFetchPPAPIPrivateTest,
-                       OtherOriginCORS) {
-  EXPECT_EQ(GetRequestStringForPNACL(), ExecutePNACLUrlLoaderTest("OtherCORS"));
-}
-
-IN_PROC_BROWSER_TEST_F(ChromeServiceWorkerFetchPPAPIPrivateTest,
-                       OtherOriginCredentials) {
-  EXPECT_EQ(GetRequestStringForPNACL(),
-            ExecutePNACLUrlLoaderTest("OtherCredentials"));
-}
-
-IN_PROC_BROWSER_TEST_F(ChromeServiceWorkerFetchPPAPIPrivateTest,
-                       OtherOriginCORSCredentials) {
-  EXPECT_EQ(GetRequestStringForPNACL(),
-            ExecutePNACLUrlLoaderTest("OtherCORSCredentials"));
-}
-
 }  // namespace
diff --git a/chrome/browser/chromeos/chrome_interface_factory.h b/chrome/browser/chromeos/chrome_interface_factory.h
index 5b2da45..3a8f8f1 100644
--- a/chrome/browser/chromeos/chrome_interface_factory.h
+++ b/chrome/browser/chromeos/chrome_interface_factory.h
@@ -6,7 +6,7 @@
 #define CHROME_BROWSER_CHROMEOS_CHROME_INTERFACE_FACTORY_H_
 
 #include "content/public/common/mojo_shell_connection.h"
-#include "mojo/public/cpp/bindings/weak_binding_set.h"
+#include "mojo/public/cpp/bindings/binding_set.h"
 #include "mojo/shell/public/cpp/interface_factory.h"
 #include "ui/keyboard/keyboard.mojom.h"
 
@@ -32,7 +32,7 @@
       mojo::InterfaceRequest<keyboard::mojom::Keyboard> request) override;
 
   scoped_ptr<KeyboardUIService> keyboard_ui_service_;
-  mojo::WeakBindingSet<keyboard::mojom::Keyboard> keyboard_bindings_;
+  mojo::BindingSet<keyboard::mojom::Keyboard> keyboard_bindings_;
 
   DISALLOW_COPY_AND_ASSIGN(ChromeInterfaceFactory);
 };
diff --git a/chrome/browser/chromeos/login/chrome_restart_request.cc b/chrome/browser/chromeos/login/chrome_restart_request.cc
index 2cb3458..c3b0ef36 100644
--- a/chrome/browser/chromeos/login/chrome_restart_request.cc
+++ b/chrome/browser/chromeos/login/chrome_restart_request.cc
@@ -156,7 +156,6 @@
     ::switches::kUseCras,
 #endif
     ::switches::kUseGL,
-    ::switches::kUseNormalPriorityForTileTaskWorkerThreads,
     ::switches::kUserDataDir,
     ::switches::kV,
     ::switches::kVModule,
diff --git a/chrome/browser/extensions/api/input_ime/input_ime_api_nonchromeos.cc b/chrome/browser/extensions/api/input_ime/input_ime_api_nonchromeos.cc
index ec026e4..f6f3fb5 100644
--- a/chrome/browser/extensions/api/input_ime/input_ime_api_nonchromeos.cc
+++ b/chrome/browser/extensions/api/input_ime/input_ime_api_nonchromeos.cc
@@ -13,7 +13,6 @@
 #include "base/command_line.h"
 #include "base/macros.h"
 #include "base/memory/linked_ptr.h"
-#include "chrome/browser/ui/ime/ime_window.h"
 #include "chrome/browser/ui/input_method/input_method_engine.h"
 #include "chrome/common/chrome_switches.h"
 #include "chrome/common/extensions/api/input_ime.h"
@@ -33,6 +32,7 @@
 
 const char kErrorAPIDisabled[] =
     "The chrome.input.ime API is not supported on the current platform";
+const char kErrorNoActiveEngine[] = "The extension has not been activated.";
 
 bool IsInputImeEnabled() {
   return base::CommandLine::ForCurrentProcess()->HasSwitch(
@@ -97,6 +97,17 @@
 
 namespace extensions {
 
+InputMethodEngine* GetActiveEngine(content::BrowserContext* browser_context,
+                                   const std::string& extension_id) {
+  Profile* profile = Profile::FromBrowserContext(browser_context);
+  InputImeEventRouter* event_router = GetInputImeEventRouter(profile);
+  InputMethodEngine* engine =
+      event_router ? static_cast<InputMethodEngine*>(
+                         event_router->GetActiveEngine(extension_id))
+                   : nullptr;
+  return engine;
+}
+
 void InputImeAPI::OnExtensionLoaded(content::BrowserContext* browser_context,
                                     const Extension* extension) {
   // No-op if called multiple times.
@@ -134,6 +145,7 @@
 void InputImeEventRouter::SetActiveEngine(const std::string& extension_id) {
   if (active_engine_) {
     if (active_engine_->GetExtensionId() == extension_id) {
+      active_engine_->Enable(std::string());
       ui::IMEBridge::Get()->SetCurrentEngineHandler(active_engine_);
       return;
     }
@@ -145,7 +157,7 @@
   scoped_ptr<InputMethodEngineBase::Observer> observer(
       new ImeObserverNonChromeOS(extension_id, profile()));
   engine->Initialize(std::move(observer), extension_id.c_str(), profile());
-  engine->Enable("");
+  engine->Enable(std::string());
   active_engine_ = engine.release();
   ui::IMEBridge::Get()->SetCurrentEngineHandler(active_engine_);
 }
@@ -153,6 +165,7 @@
 void InputImeEventRouter::DeleteInputMethodEngine(
     const std::string& extension_id) {
   if (active_engine_ && active_engine_->GetExtensionId() == extension_id) {
+    active_engine_->Disable();
     ui::IMEBridge::Get()->SetCurrentEngineHandler(nullptr);
     delete active_engine_;
     active_engine_ = nullptr;
@@ -174,7 +187,11 @@
   if (!IsInputImeEnabled())
     return RespondNow(Error(kErrorAPIDisabled));
 
+  InputMethodEngine* engine =
+      GetActiveEngine(browser_context(), extension_id());
   ui::IMEBridge::Get()->SetCurrentEngineHandler(nullptr);
+  if (engine)
+    engine->CloseImeWindows();
   return RespondNow(NoArguments());
 }
 
@@ -182,9 +199,6 @@
   if (!IsInputImeEnabled())
     return RespondNow(Error(kErrorAPIDisabled));
 
-  // TODO(shuchen): Only create the IME window when the extension is
-  // activated through the input.ime.activate() API.
-
   // Using input_ime::CreateWindow::Params::Create() causes the link errors on
   // Windows, only if the method name is 'createWindow'.
   // So doing the by-hand parameter unpacking here.
@@ -204,17 +218,22 @@
     bounds.set_height(options.bounds->height);
   }
 
-  // The ImeWindow is self-owned, so no need to hold its instance here.
-  ui::ImeWindow* ime_window = new ui::ImeWindow(
-      Profile::FromBrowserContext(browser_context()), extension(),
-      options.url.get() ? *options.url : url::kAboutBlankURL,
-      options.window_type == input_ime::WINDOW_TYPE_FOLLOWCURSOR ?
-          ui::ImeWindow::FOLLOW_CURSOR : ui::ImeWindow::NORMAL,
-      bounds);
-  ime_window->Show();
+  InputMethodEngine* engine =
+      GetActiveEngine(browser_context(), extension_id());
+  if (!engine)
+    return RespondNow(Error(kErrorNoActiveEngine));
+
+  int frame_id = engine->CreateImeWindow(
+      extension(), options.url.get() ? *options.url : url::kAboutBlankURL,
+      options.window_type == input_ime::WINDOW_TYPE_FOLLOWCURSOR
+          ? ui::ImeWindow::FOLLOW_CURSOR
+          : ui::ImeWindow::NORMAL,
+      bounds, &error_);
+  if (!frame_id)
+    return RespondNow(Error(error_));
 
   scoped_ptr<base::DictionaryValue> result(new base::DictionaryValue());
-  result->Set("frameId", new base::FundamentalValue(ime_window->GetFrameId()));
+  result->Set("frameId", new base::FundamentalValue(frame_id));
 
   return RespondNow(OneArgument(std::move(result)));
 }
diff --git a/chrome/browser/extensions/api/input_ime/input_ime_apitest_nonchromeos.cc b/chrome/browser/extensions/api/input_ime/input_ime_apitest_nonchromeos.cc
deleted file mode 100644
index ce4c16f..0000000
--- a/chrome/browser/extensions/api/input_ime/input_ime_apitest_nonchromeos.cc
+++ /dev/null
@@ -1,28 +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 "chrome/browser/extensions/extension_apitest.h"
-#include "chrome/common/chrome_switches.h"
-
-namespace extensions {
-
-class InputImeApiTest : public ExtensionApiTest {
- public:
-  InputImeApiTest() {}
-
- protected:
-  void SetUpCommandLine(base::CommandLine* command_line) override {
-    ExtensionApiTest::SetUpCommandLine(command_line);
-    command_line->AppendSwitch(switches::kEnableInputImeAPI);
-  }
-
- private:
-  DISALLOW_COPY_AND_ASSIGN(InputImeApiTest);
-};
-
-IN_PROC_BROWSER_TEST_F(InputImeApiTest, CreateWindowTest) {
-  ASSERT_TRUE(RunExtensionTest("input_ime_nonchromeos")) << message_;
-}
-
-}  // namespace extensions
diff --git a/chrome/browser/extensions/api/notifications/notifications_apitest.cc b/chrome/browser/extensions/api/notifications/notifications_apitest.cc
index d53dfb3..ee6eef5 100644
--- a/chrome/browser/extensions/api/notifications/notifications_apitest.cc
+++ b/chrome/browser/extensions/api/notifications/notifications_apitest.cc
@@ -146,12 +146,14 @@
 
   {
     ResultCatcher catcher;
-    g_browser_process->message_center()->RemoveAllNotifications(false);
+    g_browser_process->message_center()->RemoveAllNotifications(
+        false /* by_user */, message_center::MessageCenter::RemoveType::ALL);
     EXPECT_TRUE(catcher.GetNextResult()) << catcher.message();
   }
   {
     ResultCatcher catcher;
-    g_browser_process->message_center()->RemoveAllNotifications(true);
+    g_browser_process->message_center()->RemoveAllNotifications(
+        true /* by_user */, message_center::MessageCenter::RemoveType::ALL);
     EXPECT_TRUE(catcher.GetNextResult()) << catcher.message();
   }
 }
diff --git a/chrome/browser/notifications/message_center_notification_manager.cc b/chrome/browser/notifications/message_center_notification_manager.cc
index 06ed30bc..da307bb 100644
--- a/chrome/browser/notifications/message_center_notification_manager.cc
+++ b/chrome/browser/notifications/message_center_notification_manager.cc
@@ -278,7 +278,8 @@
 }
 
 void MessageCenterNotificationManager::CancelAll() {
-  message_center_->RemoveAllNotifications(/* by_user */ false);
+  message_center_->RemoveAllNotifications(
+      false /* by_user */, message_center::MessageCenter::RemoveType::ALL);
 }
 
 ////////////////////////////////////////////////////////////////////////////////
diff --git a/chrome/browser/password_manager/save_password_infobar_delegate.cc b/chrome/browser/password_manager/save_password_infobar_delegate.cc
index 92c4282..dfb8dc0 100644
--- a/chrome/browser/password_manager/save_password_infobar_delegate.cc
+++ b/chrome/browser/password_manager/save_password_infobar_delegate.cc
@@ -31,7 +31,8 @@
   sync_driver::SyncService* sync_service =
       ProfileSyncServiceFactory::GetForProfile(profile);
   bool is_smartlock_branding_enabled =
-      password_bubble_experiment::IsSmartLockBrandingEnabled(sync_service);
+      password_bubble_experiment::IsSmartLockBrandingSavePromptEnabled(
+          sync_service);
   bool should_show_first_run_experience =
       password_bubble_experiment::ShouldShowSavePromptFirstRunExperience(
           sync_service, profile->GetPrefs());
diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js b/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js
index 4a3d70f..c691083e 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js
@@ -135,6 +135,9 @@
   /** @type {number} @private */
   this.passThroughKeyUpCount_ = 0;
 
+  /** @type {boolean} @private */
+  this.inExcursion_ = false;
+
   if (!chrome.accessibilityPrivate.setKeyboardListener)
     chrome.accessibilityPrivate.setKeyboardListener = function() {};
 };
@@ -273,11 +276,7 @@
     if (!newRange)
       return;
 
-    // Exclude saving ranges inside of the Panel and any parenting webviews.
-    var panelUrl = chrome.extension.getURL('cvox2/background/panel.html');
-    var testNode = newRange.start.node;
-    if (newRange.start.node.root.docUrl.indexOf(panelUrl) != 0 &&
-        newRange.start.node.role != RoleType.webView)
+    if (!this.inExcursion_)
       this.savedRange_ = new cursors.Range(newRange.start, newRange.end);
 
     this.currentRange_ = newRange;
@@ -548,6 +547,7 @@
             Msgs.getMsg('pass_through_key'), cvox.QueueMode.QUEUE);
         return true;
       case 'openChromeVoxMenus':
+        this.startExcursion();
         (new PanelCommand(PanelCommandType.OPEN_MENUS)).send();
         return false;
       case 'showKbExplorerPage':
@@ -920,8 +920,9 @@
   /**
    * Restore the range to the last range that was *not* in the ChromeVox
    * panel. This is used when the ChromeVox Panel closes.
+   * @private
    */
-  restoreCurrentRange: function() {
+  restoreCurrentRange_: function() {
     if (this.savedRange_) {
       var containingWebView = this.savedRange_.start.node;
       while (containingWebView && containingWebView.role != RoleType.webView)
@@ -933,6 +934,21 @@
       this.savedRange_ = null;
     }
   },
+
+  /**
+   * Move ChromeVox without saving any ranges.
+   */
+  startExcursion: function() {
+    this.inExcursion_ = true;
+  },
+
+  /**
+   * Move ChromeVox back to the last saved range.
+   */
+  endExcursion: function() {
+    this.inExcursion_ = false;
+    this.restoreCurrentRange_();
+  },
 };
 
 /**
diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/base_automation_handler.js b/chrome/browser/resources/chromeos/chromevox/cvox2/background/base_automation_handler.js
index 0081ae3..3a522e1 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/base_automation_handler.js
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/base_automation_handler.js
@@ -34,8 +34,8 @@
     hover: this.onEventDefault,
     loadComplete: this.onLoadComplete,
     menuListItemSelected: this.onEventDefault,
-    menuStart: this.onEventDefault,
-    menuEnd: this.onEventDefault,
+    menuStart: this.onMenuStart,
+    menuEnd: this.onMenuEnd,
     selection: this.onEventDefault,
     scrollPositionChanged: this.onScrollPositionChanged,
     textChanged: this.onTextChanged,
@@ -126,6 +126,16 @@
   /**
    * @param {!AutomationEvent} evt
    */
+  onMenuStart: function(evt) {},
+
+  /**
+   * @param {!AutomationEvent} evt
+   */
+  onMenuEnd: function(evt) {},
+
+  /**
+   * @param {!AutomationEvent} evt
+   */
   onScrollPositionChanged: function(evt) {},
 
   /**
diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/desktop_automation_handler.js b/chrome/browser/resources/chromeos/chromevox/cvox2/background/desktop_automation_handler.js
index fae9129..3ef4c40 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/desktop_automation_handler.js
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/desktop_automation_handler.js
@@ -267,6 +267,18 @@
       new Output().withLocation(currentRange, null, evt.type).go();
   },
 
+  /** @override */
+  onMenuStart: function(evt) {
+    global.backgroundObj.startExcursion();
+    this.onEventDefault(evt);
+  },
+
+  /** @override */
+  onMenuEnd: function(evt) {
+    this.onEventDefault(evt);
+    global.backgroundObj.endExcursion();
+  },
+
   /**
    * Create an editable text handler for the given node if needed.
    * @param {!AutomationNode} node
diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/panel.js b/chrome/browser/resources/chromeos/chromevox/cvox2/background/panel.js
index 149f353..1bf909b 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/panel.js
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/panel.js
@@ -485,7 +485,7 @@
 
   var bkgnd =
       chrome.extension.getBackgroundPage()['global']['backgroundObj'];
-  bkgnd['restoreCurrentRange']();
+  bkgnd['endExcursion']();
   if (Panel.pendingCallback_)
     Panel.pendingCallback_();
 };
diff --git a/chrome/browser/search/instant_service.cc b/chrome/browser/search/instant_service.cc
index d5f6292..fd75e1d 100644
--- a/chrome/browser/search/instant_service.cc
+++ b/chrome/browser/search/instant_service.cc
@@ -7,6 +7,7 @@
 #include <stddef.h>
 
 #include "base/metrics/field_trial.h"
+#include "base/metrics/histogram_macros.h"
 #include "base/strings/string_util.h"
 #include "base/strings/utf_string_conversions.h"
 #include "build/build_config.h"
@@ -39,11 +40,13 @@
 #include "components/search/search.h"
 #include "components/search_engines/template_url_service.h"
 #include "content/public/browser/browser_thread.h"
+#include "content/public/browser/child_process_security_policy.h"
 #include "content/public/browser/notification_service.h"
 #include "content/public/browser/notification_types.h"
 #include "content/public/browser/render_process_host.h"
 #include "content/public/browser/url_data_source.h"
 #include "content/public/common/url_constants.h"
+#include "extensions/common/constants.h"
 #include "grit/theme_resources.h"
 #include "third_party/skia/include/core/SkColor.h"
 #include "ui/gfx/color_utils.h"
@@ -62,6 +65,22 @@
 
 namespace {
 
+// Used in a histogram; don't reorder, insert new values only at the end, and
+// keep in sync with "NtpMostVisitedScheme" in histograms.xml.
+enum class HistogramScheme {
+  OTHER,
+  OTHER_WEBSAFE,
+  HTTP,
+  HTTPS,
+  FTP,
+  FILE,
+  CHROME,
+  EXTENSION,
+  JAVASCRIPT,
+  // Insert new values here.
+  COUNT
+};
+
 const char kLocalNTPSuggestionService[] = "LocalNTPSuggestionsService";
 const char kLocalNTPSuggestionServiceEnabled[] = "Enabled";
 
@@ -304,6 +323,29 @@
 }
 
 bool InstantService::IsValidURLForNavigation(const GURL& url) const {
+  HistogramScheme scheme = HistogramScheme::OTHER;
+  if (url.SchemeIs(url::kHttpScheme)) {
+    scheme = HistogramScheme::HTTP;
+  } else if (url.SchemeIs(url::kHttpsScheme)) {
+    scheme = HistogramScheme::HTTPS;
+  } else if (url.SchemeIs(url::kFtpScheme)) {
+    scheme = HistogramScheme::FTP;
+  } else if (url.SchemeIsFile()) {
+    scheme = HistogramScheme::FILE;
+  } else if (url.SchemeIs(content::kChromeUIScheme)) {
+    scheme = HistogramScheme::CHROME;
+  } else if (url.SchemeIs(extensions::kExtensionScheme)) {
+    scheme = HistogramScheme::EXTENSION;
+  } else if (url.SchemeIs(url::kJavaScriptScheme)) {
+    scheme = HistogramScheme::JAVASCRIPT;
+  } else if (content::ChildProcessSecurityPolicy::GetInstance()
+                 ->IsWebSafeScheme(url.scheme())) {
+    scheme = HistogramScheme::OTHER_WEBSAFE;
+  }
+  UMA_HISTOGRAM_ENUMERATION("NewTabPage.MostVisitedScheme",
+                            static_cast<int32_t>(scheme),
+                            static_cast<int32_t>(HistogramScheme::COUNT));
+
   // Certain URLs are privileged and should never be considered valid
   // navigation targets.
   // TODO(treib): Ideally this should deny by default and only allow if the
diff --git a/chrome/browser/ui/cocoa/apps/quit_with_apps_controller_mac_interactive_uitest.mm b/chrome/browser/ui/cocoa/apps/quit_with_apps_controller_mac_interactive_uitest.mm
index 8ea62f27..03d1be75 100644
--- a/chrome/browser/ui/cocoa/apps/quit_with_apps_controller_mac_interactive_uitest.mm
+++ b/chrome/browser/ui/cocoa/apps/quit_with_apps_controller_mac_interactive_uitest.mm
@@ -95,7 +95,8 @@
 
   // If notification was dismissed by click, show again on next quit.
   notification->delegate()->Click();
-  message_center->RemoveAllNotifications(false);
+  message_center->RemoveAllNotifications(
+      false /* by_user */, message_center::MessageCenter::RemoveType::ALL);
   EXPECT_FALSE(controller->ShouldQuit());
   EXPECT_TRUE(AppWindowRegistryUtil::IsAppWindowVisibleInAnyProfile(0));
   notification = g_browser_process->notification_ui_manager()->FindById(
@@ -108,7 +109,8 @@
 
   // If notification is closed by user, don't show it next time.
   notification->delegate()->Close(true);
-  message_center->RemoveAllNotifications(false);
+  message_center->RemoveAllNotifications(
+      false /* by_user */, message_center::MessageCenter::RemoveType::ALL);
   EXPECT_FALSE(controller->ShouldQuit());
   EXPECT_TRUE(AppWindowRegistryUtil::IsAppWindowVisibleInAnyProfile(0));
   notification = g_browser_process->notification_ui_manager()->FindById(
@@ -150,7 +152,8 @@
       app_window->web_contents());
   notification->delegate()->ButtonClick(0);
   destroyed_watcher.Wait();
-  message_center->RemoveAllNotifications(false);
+  message_center->RemoveAllNotifications(
+      false /* by_user */, message_center::MessageCenter::RemoveType::ALL);
   EXPECT_FALSE(AppWindowRegistryUtil::IsAppWindowVisibleInAnyProfile(0));
   quit_observer.Wait();
 }
diff --git a/chrome/browser/ui/exclusive_access/exclusive_access_bubble.cc b/chrome/browser/ui/exclusive_access/exclusive_access_bubble.cc
index 69a0ad0..142e304 100644
--- a/chrome/browser/ui/exclusive_access/exclusive_access_bubble.cc
+++ b/chrome/browser/ui/exclusive_access/exclusive_access_bubble.cc
@@ -57,6 +57,8 @@
 
   // If the notification suppression timer has elapsed, re-show it.
   if (!suppress_notify_timeout_.IsRunning()) {
+    manager_->RecordBubbleReshownUMA(bubble_type_);
+
     ShowAndStartTimers();
     return;
   }
diff --git a/chrome/browser/ui/exclusive_access/exclusive_access_controller_base.cc b/chrome/browser/ui/exclusive_access/exclusive_access_controller_base.cc
index 3559f37..37c9dae5 100644
--- a/chrome/browser/ui/exclusive_access/exclusive_access_controller_base.cc
+++ b/chrome/browser/ui/exclusive_access/exclusive_access_controller_base.cc
@@ -16,8 +16,7 @@
 
 ExclusiveAccessControllerBase::ExclusiveAccessControllerBase(
     ExclusiveAccessManager* manager)
-    : manager_(manager), tab_with_exclusive_access_(nullptr) {
-}
+    : manager_(manager) {}
 
 ExclusiveAccessControllerBase::~ExclusiveAccessControllerBase() {
 }
@@ -66,6 +65,19 @@
     ExitExclusiveAccessIfNecessary();
 }
 
+void ExclusiveAccessControllerBase::RecordBubbleReshownUMA() {
+  ++bubble_reshow_count_;
+}
+
+void ExclusiveAccessControllerBase::RecordExitingUMA() {
+  // Record the number of bubble reshows during this session. Only if simplified
+  // fullscreen is enabled.
+  if (ExclusiveAccessManager::IsSimplifiedFullscreenUIEnabled())
+    RecordBubbleReshowsHistogram(bubble_reshow_count_);
+
+  bubble_reshow_count_ = 0;
+}
+
 void ExclusiveAccessControllerBase::SetTabWithExclusiveAccess(
     WebContents* tab) {
   // Tab should never be replaced with another tab, or
diff --git a/chrome/browser/ui/exclusive_access/exclusive_access_controller_base.h b/chrome/browser/ui/exclusive_access/exclusive_access_controller_base.h
index 11e8e0d..975c8c6 100644
--- a/chrome/browser/ui/exclusive_access/exclusive_access_controller_base.h
+++ b/chrome/browser/ui/exclusive_access/exclusive_access_controller_base.h
@@ -65,6 +65,11 @@
                const content::NotificationSource& source,
                const content::NotificationDetails& details) override;
 
+  // For recording UMA.
+  void RecordBubbleReshownUMA();
+  // Called when the exclusive access session ends.
+  void RecordExitingUMA();
+
  protected:
   void SetTabWithExclusiveAccess(content::WebContents* tab);
 
@@ -77,6 +82,10 @@
   // if necessary.
   virtual void NotifyTabExclusiveAccessLost() = 0;
 
+  // Records the BubbleReshowsPerSession data to the appropriate histogram for
+  // this controller.
+  virtual void RecordBubbleReshowsHistogram(int bubble_reshow_count) = 0;
+
  private:
   void UpdateNotificationRegistrations();
 
@@ -84,7 +93,10 @@
 
   content::NotificationRegistrar registrar_;
 
-  content::WebContents* tab_with_exclusive_access_;
+  content::WebContents* tab_with_exclusive_access_ = nullptr;
+
+  // The number of bubble re-shows for the current session (reset upon exiting).
+  int bubble_reshow_count_ = 0;
 
   DISALLOW_COPY_AND_ASSIGN(ExclusiveAccessControllerBase);
 };
diff --git a/chrome/browser/ui/exclusive_access/exclusive_access_manager.cc b/chrome/browser/ui/exclusive_access/exclusive_access_manager.cc
index 52251a5..ff772c36 100644
--- a/chrome/browser/ui/exclusive_access/exclusive_access_manager.cc
+++ b/chrome/browser/ui/exclusive_access/exclusive_access_manager.cc
@@ -154,3 +154,38 @@
   fullscreen_controller_.ExitExclusiveAccessToPreviousState();
   mouse_lock_controller_.LostMouseLock();
 }
+
+void ExclusiveAccessManager::RecordBubbleReshownUMA(
+    ExclusiveAccessBubbleType type) {
+  // Figure out whether each of fullscreen, mouselock is in effect.
+  bool fullscreen = false;
+  bool mouselock = false;
+  switch (type) {
+    case EXCLUSIVE_ACCESS_BUBBLE_TYPE_NONE:
+    case EXCLUSIVE_ACCESS_BUBBLE_TYPE_MOUSELOCK_BUTTONS:
+      // None in effect.
+      break;
+    case EXCLUSIVE_ACCESS_BUBBLE_TYPE_FULLSCREEN_BUTTONS:
+    case EXCLUSIVE_ACCESS_BUBBLE_TYPE_FULLSCREEN_EXIT_INSTRUCTION:
+    case EXCLUSIVE_ACCESS_BUBBLE_TYPE_BROWSER_FULLSCREEN_EXIT_INSTRUCTION:
+    case EXCLUSIVE_ACCESS_BUBBLE_TYPE_EXTENSION_FULLSCREEN_EXIT_INSTRUCTION:
+      // Only fullscreen in effect.
+      fullscreen = true;
+      break;
+    case EXCLUSIVE_ACCESS_BUBBLE_TYPE_MOUSELOCK_EXIT_INSTRUCTION:
+      // Only mouselock in effect.
+      mouselock = true;
+      break;
+    case EXCLUSIVE_ACCESS_BUBBLE_TYPE_FULLSCREEN_MOUSELOCK_BUTTONS:
+    case EXCLUSIVE_ACCESS_BUBBLE_TYPE_FULLSCREEN_MOUSELOCK_EXIT_INSTRUCTION:
+      // Both in effect.
+      fullscreen = true;
+      mouselock = true;
+      break;
+  }
+
+  if (fullscreen)
+    fullscreen_controller_.RecordBubbleReshownUMA();
+  if (mouselock)
+    mouse_lock_controller_.RecordBubbleReshownUMA();
+}
diff --git a/chrome/browser/ui/exclusive_access/exclusive_access_manager.h b/chrome/browser/ui/exclusive_access/exclusive_access_manager.h
index 712a1c1..af0191fb 100644
--- a/chrome/browser/ui/exclusive_access/exclusive_access_manager.h
+++ b/chrome/browser/ui/exclusive_access/exclusive_access_manager.h
@@ -73,6 +73,7 @@
   void OnAcceptExclusiveAccessPermission();
   void OnDenyExclusiveAccessPermission();
   void ExitExclusiveAccess();
+  void RecordBubbleReshownUMA(ExclusiveAccessBubbleType type);
 
  private:
   ExclusiveAccessContext* const exclusive_access_context_;
diff --git a/chrome/browser/ui/exclusive_access/fullscreen_controller.cc b/chrome/browser/ui/exclusive_access/fullscreen_controller.cc
index 95f0d40e..1f223d7a 100644
--- a/chrome/browser/ui/exclusive_access/fullscreen_controller.cc
+++ b/chrome/browser/ui/exclusive_access/fullscreen_controller.cc
@@ -7,6 +7,7 @@
 #include "base/bind.h"
 #include "base/command_line.h"
 #include "base/location.h"
+#include "base/metrics/histogram_macros.h"
 #include "base/single_thread_task_runner.h"
 #include "base/thread_task_runner_handle.h"
 #include "build/build_config.h"
@@ -40,6 +41,13 @@
 using content::RenderViewHost;
 using content::WebContents;
 
+namespace {
+
+const char kBubbleReshowsHistogramName[] =
+    "ExclusiveAccess.BubbleReshowsPerSession.Fullscreen";
+
+}  // namespace
+
 FullscreenController::FullscreenController(ExclusiveAccessManager* manager)
     : ExclusiveAccessControllerBase(manager),
       state_prior_to_tab_fullscreen_(STATE_INVALID),
@@ -420,6 +428,11 @@
   }
 }
 
+void FullscreenController::RecordBubbleReshowsHistogram(
+    int bubble_reshow_count) {
+  UMA_HISTOGRAM_COUNTS_100(kBubbleReshowsHistogramName, bubble_reshow_count);
+}
+
 void FullscreenController::ToggleFullscreenModeInternal(
     FullscreenInternalOption option) {
 #if defined(OS_WIN)
@@ -499,6 +512,7 @@
 }
 
 void FullscreenController::ExitFullscreenModeInternal() {
+  RecordExitingUMA();
   toggled_into_fullscreen_ = false;
 #if defined(OS_MACOSX)
   // Mac windows report a state change instantly, and so we must also clear
diff --git a/chrome/browser/ui/exclusive_access/fullscreen_controller.h b/chrome/browser/ui/exclusive_access/fullscreen_controller.h
index 930e76a..e61d891 100644
--- a/chrome/browser/ui/exclusive_access/fullscreen_controller.h
+++ b/chrome/browser/ui/exclusive_access/fullscreen_controller.h
@@ -159,6 +159,8 @@
   // necessary.
   void NotifyTabExclusiveAccessLost() override;
 
+  void RecordBubbleReshowsHistogram(int bubble_reshow_count) override;
+
   void ToggleFullscreenModeInternal(FullscreenInternalOption option);
   void EnterFullscreenModeInternal(FullscreenInternalOption option);
   void ExitFullscreenModeInternal();
diff --git a/chrome/browser/ui/exclusive_access/fullscreen_controller_state_unittest.cc b/chrome/browser/ui/exclusive_access/fullscreen_controller_state_unittest.cc
index 9bd0d34..21bd59b 100644
--- a/chrome/browser/ui/exclusive_access/fullscreen_controller_state_unittest.cc
+++ b/chrome/browser/ui/exclusive_access/fullscreen_controller_state_unittest.cc
@@ -3,10 +3,12 @@
 // found in the LICENSE file.
 
 #include "base/command_line.h"
+#include "base/test/histogram_tester.h"
 #include "build/build_config.h"
 #include "chrome/browser/ui/browser.h"
 #include "chrome/browser/ui/browser_tabstrip.h"
 #include "chrome/browser/ui/exclusive_access/exclusive_access_context.h"
+#include "chrome/browser/ui/exclusive_access/exclusive_access_manager.h"
 #include "chrome/browser/ui/exclusive_access/fullscreen_controller.h"
 #include "chrome/browser/ui/exclusive_access/fullscreen_controller_state_test.h"
 #include "chrome/browser/ui/tabs/tab_strip_model.h"
@@ -20,6 +22,10 @@
 // the FullscreenController through all permutations of events. The behavior
 // of the BrowserWindow is mocked via FullscreenControllerTestWindow.
 
+namespace {
+
+const char kFullscreenReshowHistogramName[] =
+    "ExclusiveAccess.BubbleReshowsPerSession.Fullscreen";
 
 // FullscreenControllerTestWindow ----------------------------------------------
 
@@ -246,6 +252,8 @@
 
 void FullscreenControllerTestWindow::OnExclusiveAccessUserInput() {}
 
+}  // namespace
+
 // FullscreenControllerStateUnitTest -------------------------------------------
 
 // Unit test fixture testing Fullscreen Controller through its states. Most of
@@ -474,15 +482,25 @@
 
 // Test that switching tabs takes the browser out of tab fullscreen.
 TEST_F(FullscreenControllerStateUnitTest, ExitTabFullscreenViaSwitchingTab) {
+  base::HistogramTester histogram_tester;
+
   AddTab(browser(), GURL(url::kAboutBlankURL));
   AddTab(browser(), GURL(url::kAboutBlankURL));
   ASSERT_TRUE(InvokeEvent(TAB_FULLSCREEN_TRUE));
   ASSERT_TRUE(InvokeEvent(WINDOW_CHANGE));
   ASSERT_TRUE(browser()->window()->IsFullscreen());
+  histogram_tester.ExpectTotalCount(kFullscreenReshowHistogramName, 0);
 
   browser()->tab_strip_model()->SelectNextTab();
   ChangeWindowFullscreenState();
   EXPECT_FALSE(browser()->window()->IsFullscreen());
+
+  // Do a simple test that histograms are being recorded upon exiting the
+  // fullscreen session (when simplified-fullscreen-ui is enabled).
+  if (ExclusiveAccessManager::IsSimplifiedFullscreenUIEnabled())
+    histogram_tester.ExpectUniqueSample(kFullscreenReshowHistogramName, 0, 1);
+  else
+    histogram_tester.ExpectTotalCount(kFullscreenReshowHistogramName, 0);
 }
 
 // Test that switching tabs via detaching the active tab (which is in tab
diff --git a/chrome/browser/ui/exclusive_access/mouse_lock_controller.cc b/chrome/browser/ui/exclusive_access/mouse_lock_controller.cc
index a22df90e..7607f7c9 100644
--- a/chrome/browser/ui/exclusive_access/mouse_lock_controller.cc
+++ b/chrome/browser/ui/exclusive_access/mouse_lock_controller.cc
@@ -4,6 +4,7 @@
 
 #include "chrome/browser/ui/exclusive_access/mouse_lock_controller.h"
 
+#include "base/metrics/histogram_macros.h"
 #include "chrome/browser/chrome_notification_types.h"
 #include "chrome/browser/content_settings/host_content_settings_map_factory.h"
 #include "chrome/browser/profiles/profile.h"
@@ -21,6 +22,13 @@
 using content::RenderViewHost;
 using content::WebContents;
 
+namespace {
+
+const char kBubbleReshowsHistogramName[] =
+    "ExclusiveAccess.BubbleReshowsPerSession.MouseLock";
+
+}  // namespace
+
 MouseLockController::MouseLockController(ExclusiveAccessManager* manager)
     : ExclusiveAccessControllerBase(manager),
       mouse_lock_state_(MOUSELOCK_NOT_REQUESTED),
@@ -116,6 +124,11 @@
   }
 }
 
+void MouseLockController::RecordBubbleReshowsHistogram(
+    int bubble_reshow_count) {
+  UMA_HISTOGRAM_COUNTS_100(kBubbleReshowsHistogramName, bubble_reshow_count);
+}
+
 bool MouseLockController::HandleUserPressedEscape() {
   if (IsMouseLocked() || IsMouseLockRequested()) {
     ExitExclusiveAccessIfNecessary();
@@ -188,6 +201,7 @@
 }
 
 void MouseLockController::LostMouseLock() {
+  RecordExitingUMA();
   mouse_lock_state_ = MOUSELOCK_NOT_REQUESTED;
   SetTabWithExclusiveAccess(nullptr);
   NotifyMouseLockChange();
diff --git a/chrome/browser/ui/exclusive_access/mouse_lock_controller.h b/chrome/browser/ui/exclusive_access/mouse_lock_controller.h
index e451f6bc..9a3bd46 100644
--- a/chrome/browser/ui/exclusive_access/mouse_lock_controller.h
+++ b/chrome/browser/ui/exclusive_access/mouse_lock_controller.h
@@ -59,6 +59,7 @@
 
   void ExitExclusiveAccessIfNecessary() override;
   void NotifyTabExclusiveAccessLost() override;
+  void RecordBubbleReshowsHistogram(int bubble_reshow_count) override;
 
   ContentSetting GetMouseLockSetting(const GURL& url) const;
 
diff --git a/chrome/browser/ui/ime/ime_native_window.h b/chrome/browser/ui/ime/ime_native_window.h
index 3ea237c4..6b9d919 100644
--- a/chrome/browser/ui/ime/ime_native_window.h
+++ b/chrome/browser/ui/ime/ime_native_window.h
@@ -34,12 +34,14 @@
   // Sets the bounds of the native window.
   virtual void SetBounds(const gfx::Rect& bounds) = 0;
 
+  // Gets the bounds of the native window.
+  virtual gfx::Rect GetBounds() const = 0;
+
   // Updates the window's titie icon.
   virtual void UpdateWindowIcon() = 0;
 
   // For testing.
   virtual bool IsVisible() const = 0;
-  virtual gfx::Rect GetBounds() const = 0;
 
  protected:
   virtual ~ImeNativeWindow() {}
diff --git a/chrome/browser/ui/ime/ime_window.cc b/chrome/browser/ui/ime/ime_window.cc
index 26501ad..a8d1a75 100644
--- a/chrome/browser/ui/ime/ime_window.cc
+++ b/chrome/browser/ui/ime/ime_window.cc
@@ -15,6 +15,14 @@
 #include "extensions/common/extension.h"
 #include "extensions/common/manifest_handlers/icons_handler.h"
 #include "ui/gfx/image/image.h"
+#include "ui/gfx/screen.h"
+
+namespace {
+
+// The vertical margin between the cursor and the follow-cursor window.
+const int kFollowCursorMargin = 3;
+
+}  // namespace
 
 namespace ui {
 
@@ -66,6 +74,34 @@
   native_window_->SetBounds(bounds);
 }
 
+void ImeWindow::FollowCursor(const gfx::Rect& cursor_bounds) {
+  if (mode_ != FOLLOW_CURSOR)
+    return;
+
+  gfx::Rect screen_bounds =
+      gfx::Screen::GetScreen()->GetPrimaryDisplay().bounds();
+  gfx::Rect window_bounds = native_window_->GetBounds();
+  int screen_width = screen_bounds.width();
+  int screen_height = screen_bounds.height();
+  int width = window_bounds.width();
+  int height = window_bounds.height();
+  // By default, aligns the left of the window to the left of the cursor, and
+  // aligns the top of the window to the bottom of the cursor.
+  // If the right of the window would go beyond the screen bounds, aligns the
+  // right of the window to the screen bounds.
+  // If the bottom of the window would go beyond the screen bounds, aligns the
+  // bottom of the window to the cursor top.
+  int x = cursor_bounds.x();
+  int y = cursor_bounds.y() + cursor_bounds.height() + kFollowCursorMargin;
+  if (width < screen_width && x + width > screen_width)
+    x = screen_width - width;
+  if (height < screen_height && y + height > screen_height)
+    y = cursor_bounds.y() - height - kFollowCursorMargin;
+  window_bounds.set_x(x);
+  window_bounds.set_y(y);
+  SetBounds(window_bounds);
+}
+
 int ImeWindow::GetFrameId() const {
   return web_contents_->GetMainFrame()->GetRoutingID();
 }
diff --git a/chrome/browser/ui/ime/ime_window.h b/chrome/browser/ui/ime/ime_window.h
index 51d0142..77ffd24d 100644
--- a/chrome/browser/ui/ime/ime_window.h
+++ b/chrome/browser/ui/ime/ime_window.h
@@ -69,6 +69,9 @@
   void Hide();
   void Close();
   void SetBounds(const gfx::Rect& bounds);
+  // Aligns the follow-cursor window to the given cursor bounds.
+  // If no follow-cursor window is at present, this method does nothing.
+  void FollowCursor(const gfx::Rect& cursor_bounds);
 
   // Gets the web contents' frame ID, which is used to get the JS 'window'
   // object in the custom bindings.
diff --git a/chrome/browser/ui/input_method/input_method_engine.cc b/chrome/browser/ui/input_method/input_method_engine.cc
index f1c5e8e..6966f31 100644
--- a/chrome/browser/ui/input_method/input_method_engine.cc
+++ b/chrome/browser/ui/input_method/input_method_engine.cc
@@ -8,11 +8,26 @@
 #include "ui/base/ime/ime_bridge.h"
 #include "ui/base/ime/ime_input_context_handler_interface.h"
 
+namespace {
+
+const char kErrorFollowCursorWindowExists[] =
+    "A follow cursor IME window exists.";
+const char kErrorNoInputFocus[] =
+    "The follow cursor IME window cannot be created without an input focus.";
+const char kErrorReachMaxWindowCount[] =
+    "Cannot create more than 5 normal IME windows.";
+
+const int kMaxNormalWindowCount = 5;
+
+}  // namespace
+
 namespace input_method {
 
-InputMethodEngine::InputMethodEngine() {}
+InputMethodEngine::InputMethodEngine() : follow_cursor_window_(nullptr) {}
 
-InputMethodEngine::~InputMethodEngine() {}
+InputMethodEngine::~InputMethodEngine() {
+  CloseImeWindows();
+}
 
 bool InputMethodEngine::SendKeyEvents(
     int context_id,
@@ -29,6 +44,74 @@
   return extension_id_;
 }
 
+int InputMethodEngine::CreateImeWindow(const extensions::Extension* extension,
+                                       const std::string& url,
+                                       ui::ImeWindow::Mode mode,
+                                       const gfx::Rect& bounds,
+                                       std::string* error) {
+  if (mode == ui::ImeWindow::FOLLOW_CURSOR) {
+    if (follow_cursor_window_) {
+      *error = kErrorFollowCursorWindowExists;
+      return 0;
+    }
+    if (current_input_type_ == ui::TEXT_INPUT_TYPE_NONE) {
+      *error = kErrorNoInputFocus;
+      return 0;
+    }
+  }
+
+  if (mode == ui::ImeWindow::NORMAL &&
+      normal_windows_.size() >= kMaxNormalWindowCount) {
+    *error = kErrorReachMaxWindowCount;
+    return 0;
+  }
+
+  // ui::ImeWindow manages its own lifetime.
+  ui::ImeWindow* ime_window =
+      new ui::ImeWindow(profile_, extension, url, mode, bounds);
+  ime_window->AddObserver(this);
+  ime_window->Show();
+  if (mode == ui::ImeWindow::FOLLOW_CURSOR) {
+    follow_cursor_window_ = ime_window;
+    ime_window->FollowCursor(current_cursor_bounds_);
+  } else {
+    normal_windows_.push_back(ime_window);
+  }
+
+  return ime_window->GetFrameId();
+}
+
+void InputMethodEngine::CloseImeWindows() {
+  if (follow_cursor_window_)
+    follow_cursor_window_->Close();
+  for (auto window : normal_windows_)
+    window->Close();
+  normal_windows_.clear();
+}
+
+void InputMethodEngine::FocusIn(
+    const ui::IMEEngineHandlerInterface::InputContext& input_context) {
+  InputMethodEngineBase::FocusIn(input_context);
+  if (follow_cursor_window_)
+    follow_cursor_window_->Show();
+}
+
+void InputMethodEngine::FocusOut() {
+  InputMethodEngineBase::FocusOut();
+  if (follow_cursor_window_)
+    follow_cursor_window_->Hide();
+}
+
+void InputMethodEngine::SetCompositionBounds(
+    const std::vector<gfx::Rect>& bounds) {
+  InputMethodEngineBase::SetCompositionBounds(bounds);
+  if (!bounds.empty()) {
+    current_cursor_bounds_ = bounds[0];
+    if (follow_cursor_window_)
+      follow_cursor_window_->FollowCursor(current_cursor_bounds_);
+  }
+}
+
 void InputMethodEngine::UpdateComposition(
     const ui::CompositionText& composition_text,
     uint32_t cursor_pos,
@@ -69,4 +152,15 @@
   }
 }
 
+void InputMethodEngine::OnWindowDestroyed(ui::ImeWindow* ime_window) {
+  if (ime_window == follow_cursor_window_) {
+    follow_cursor_window_ = nullptr;
+  } else {
+    auto it = std::find(
+        normal_windows_.begin(), normal_windows_.end(), ime_window);
+    if (it != normal_windows_.end())
+      normal_windows_.erase(it);
+  }
+}
+
 }  // namespace input_method
diff --git a/chrome/browser/ui/input_method/input_method_engine.h b/chrome/browser/ui/input_method/input_method_engine.h
index 5ae98bd..05586d9d 100644
--- a/chrome/browser/ui/input_method/input_method_engine.h
+++ b/chrome/browser/ui/input_method/input_method_engine.h
@@ -8,10 +8,14 @@
 #include <string>
 #include <vector>
 
+#include "chrome/browser/ui/ime/ime_window.h"
+#include "chrome/browser/ui/ime/ime_window_observer.h"
 #include "chrome/browser/ui/input_method/input_method_engine_base.h"
 
 namespace input_method {
-class InputMethodEngine : public InputMethodEngineBase {
+
+class InputMethodEngine : public InputMethodEngineBase,
+                          public ui::ImeWindowObserver {
  public:
   InputMethodEngine();
 
@@ -23,14 +27,41 @@
   bool IsActive() const override;
   std::string GetExtensionId() const override;
 
+  // Creates and shows the IME window.
+  // Returns 0 for errors and |error| will contains the error message.
+  int CreateImeWindow(const extensions::Extension* extension,
+                      const std::string& url,
+                      ui::ImeWindow::Mode mode,
+                      const gfx::Rect& bounds,
+                      std::string* error);
+
+  void CloseImeWindows();
+
  private:
   // input_method::InputMethodEngineBase:
+  void FocusIn(const ui::IMEEngineHandlerInterface::InputContext& input_context)
+      override;
+  void FocusOut() override;
+  void SetCompositionBounds(const std::vector<gfx::Rect>& bounds) override;
   void UpdateComposition(const ui::CompositionText& composition_text,
                          uint32_t cursor_pos,
                          bool is_visible) override;
   void CommitTextToInputContext(int context_id,
                                 const std::string& text) override;
 
+  // ui::ImeWindowObserver:
+  void OnWindowDestroyed(ui::ImeWindow* ime_window) override;
+
+  // Holds the IME window instances for properly closing in the destructor.
+  // The follow-cursor window is singleton.
+  // The normal windows cannot exceed the max count.
+  ui::ImeWindow* follow_cursor_window_;         // Weak.
+  std::vector<ui::ImeWindow*> normal_windows_;  // Weak.
+
+  // Tracks the current cursor bounds so that the new follow cursor window can
+  // be aligned with cursor once it being created.
+  gfx::Rect current_cursor_bounds_;
+
   DISALLOW_COPY_AND_ASSIGN(InputMethodEngine);
 };
 
diff --git a/chrome/browser/ui/input_method/input_method_engine_base.cc b/chrome/browser/ui/input_method/input_method_engine_base.cc
index a5af0046..6764d7d2 100644
--- a/chrome/browser/ui/input_method/input_method_engine_base.cc
+++ b/chrome/browser/ui/input_method/input_method_engine_base.cc
@@ -322,7 +322,6 @@
 }
 
 void InputMethodEngineBase::Enable(const std::string& component_id) {
-  DCHECK(!component_id.empty());
   active_component_id_ = component_id;
   observer_->OnActivate(component_id);
   const ui::IMEEngineHandlerInterface::InputContext& input_context =
diff --git a/chrome/browser/ui/views/bar_control_button.cc b/chrome/browser/ui/views/bar_control_button.cc
index 0d356ae..9d472bf1 100644
--- a/chrome/browser/ui/views/bar_control_button.cc
+++ b/chrome/browser/ui/views/bar_control_button.cc
@@ -47,6 +47,7 @@
   SetImage(views::CustomButton::STATE_NORMAL, &image);
   image = gfx::CreateVectorIcon(id_, 16, SkColorSetA(icon_color, 0xff / 2));
   SetImage(views::CustomButton::STATE_DISABLED, &image);
+  set_ink_drop_base_color(icon_color);
 }
 
 void BarControlButton::OnNativeThemeChanged(const ui::NativeTheme* theme) {
diff --git a/chrome/browser/ui/views/ime/ime_window_browsertest.cc b/chrome/browser/ui/views/ime/ime_window_browsertest.cc
index 6d2d14fd..2b8bbf7 100644
--- a/chrome/browser/ui/views/ime/ime_window_browsertest.cc
+++ b/chrome/browser/ui/views/ime/ime_window_browsertest.cc
@@ -73,5 +73,14 @@
   VerifyImeWindow(expected_bounds);
 }
 
+IN_PROC_BROWSER_TEST_F(ImeWindowBrowserTest, FollowCursor) {
+  gfx::Rect expected_bounds(100, 200, 100, 100);
+  CreateImeWindow(expected_bounds, true);
+  ime_window_->FollowCursor(gfx::Rect(10, 20, 1, 10));
+  expected_bounds.set_x(10);  // cursor left.
+  expected_bounds.set_y(33);  // cursor top + cursor height + margin(3).
+  VerifyImeWindow(expected_bounds);
+}
+
 }  // namespace test
 }  // namespace ui
diff --git a/chrome/browser/ui/views/ime/ime_window_view.cc b/chrome/browser/ui/views/ime/ime_window_view.cc
index f1608cb..85582b86 100644
--- a/chrome/browser/ui/views/ime/ime_window_view.cc
+++ b/chrome/browser/ui/views/ime/ime_window_view.cc
@@ -78,6 +78,10 @@
   window_->SetBounds(bounds);
 }
 
+gfx::Rect ImeWindowView::GetBounds() const {
+  return GetWidget()->GetWindowBoundsInScreen();
+}
+
 void ImeWindowView::UpdateWindowIcon() {
   window_->UpdateWindowIcon();
 }
@@ -86,10 +90,6 @@
   return GetWidget()->IsVisible();
 }
 
-gfx::Rect ImeWindowView::GetBounds() const {
-  return GetWidget()->GetWindowBoundsInScreen();
-}
-
 bool ImeWindowView::OnTitlebarPointerPressed(
     const gfx::Point& pointer_location, PointerType pointer_type) {
   if (dragging_state_ != DragState::NO_DRAG &&
diff --git a/chrome/browser/ui/views/ime/ime_window_view.h b/chrome/browser/ui/views/ime/ime_window_view.h
index a0e332a..b33d2a0 100644
--- a/chrome/browser/ui/views/ime/ime_window_view.h
+++ b/chrome/browser/ui/views/ime/ime_window_view.h
@@ -60,9 +60,9 @@
   void Hide() override;
   void Close() override;
   void SetBounds(const gfx::Rect& bounds) override;
+  gfx::Rect GetBounds() const override;
   void UpdateWindowIcon() override;
   bool IsVisible() const override;
-  gfx::Rect GetBounds() const override;
 
   // views::WidgetDelegate:
   views::View* GetContentsView() override;
diff --git a/chrome/browser/ui/views/ime/input_ime_apitest_nonchromeos.cc b/chrome/browser/ui/views/ime/input_ime_apitest_nonchromeos.cc
new file mode 100644
index 0000000..31de3d9
--- /dev/null
+++ b/chrome/browser/ui/views/ime/input_ime_apitest_nonchromeos.cc
@@ -0,0 +1,44 @@
+// 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/extensions/extension_apitest.h"
+#include "chrome/browser/ui/views/frame/browser_view.h"
+#include "chrome/common/chrome_switches.h"
+#include "ui/aura/window.h"
+#include "ui/aura/window_tree_host.h"
+#include "ui/base/ime/dummy_text_input_client.h"
+#include "ui/base/ime/input_method.h"
+
+namespace extensions {
+
+class InputImeApiTest : public ExtensionApiTest {
+ public:
+  InputImeApiTest() {}
+
+ protected:
+  void SetUpCommandLine(base::CommandLine* command_line) override {
+    ExtensionApiTest::SetUpCommandLine(command_line);
+    command_line->AppendSwitch(switches::kEnableInputImeAPI);
+  }
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(InputImeApiTest);
+};
+
+IN_PROC_BROWSER_TEST_F(InputImeApiTest, CreateWindowTest) {
+  // Manipulates the focused text input client because the follow cursor
+  // window requires the text input focus.
+  BrowserView* browser_view = BrowserView::GetBrowserViewForBrowser(browser());
+  ui::InputMethod* input_method =
+      browser_view->GetNativeWindow()->GetHost()->GetInputMethod();
+  scoped_ptr<ui::DummyTextInputClient> client(
+      new ui::DummyTextInputClient(ui::TEXT_INPUT_TYPE_TEXT));
+  input_method->SetFocusedTextInputClient(client.get());
+
+  ASSERT_TRUE(RunExtensionTest("input_ime_nonchromeos")) << message_;
+
+  input_method->DetachTextInputClient(client.get());
+}
+
+}  // namespace extensions
diff --git a/chrome/browser/ui/views/location_bar/bubble_icon_view.cc b/chrome/browser/ui/views/location_bar/bubble_icon_view.cc
index fd0d0f4..2e97656 100644
--- a/chrome/browser/ui/views/location_bar/bubble_icon_view.cc
+++ b/chrome/browser/ui/views/location_bar/bubble_icon_view.cc
@@ -114,6 +114,10 @@
     UpdateIcon();
 }
 
+void BubbleIconView::OnNativeThemeChanged(const ui::NativeTheme* theme) {
+  UpdateIcon();
+}
+
 void BubbleIconView::AddInkDropLayer(ui::Layer* ink_drop_layer) {
   image_->SetPaintToLayer(true);
   image_->SetFillsBoundsOpaquely(false);
@@ -122,7 +126,6 @@
 
 void BubbleIconView::RemoveInkDropLayer(ui::Layer* ink_drop_layer) {
   views::InkDropHostView::RemoveInkDropLayer(ink_drop_layer);
-  image_->SetFillsBoundsOpaquely(true);
   image_->SetPaintToLayer(false);
 }
 
@@ -131,8 +134,9 @@
   return nullptr;
 }
 
-void BubbleIconView::OnNativeThemeChanged(const ui::NativeTheme* theme) {
-  UpdateIcon();
+SkColor BubbleIconView::GetInkDropBaseColor() const {
+  return color_utils::DeriveDefaultIconColor(GetNativeTheme()->GetSystemColor(
+      ui::NativeTheme::kColorId_TextfieldDefaultColor));
 }
 
 void BubbleIconView::OnGestureEvent(ui::GestureEvent* event) {
@@ -184,8 +188,7 @@
   SkColor icon_color =
       active_
           ? theme->GetSystemColor(ui::NativeTheme::kColorId_CallToActionColor)
-          : color_utils::DeriveDefaultIconColor(theme->GetSystemColor(
-                ui::NativeTheme::kColorId_TextfieldDefaultColor));
+          : GetInkDropBaseColor();
   image_->SetImage(
       gfx::CreateVectorIcon(GetVectorIcon(), icon_size, icon_color));
 }
diff --git a/chrome/browser/ui/views/location_bar/bubble_icon_view.h b/chrome/browser/ui/views/location_bar/bubble_icon_view.h
index 0115321..c0941f8 100644
--- a/chrome/browser/ui/views/location_bar/bubble_icon_view.h
+++ b/chrome/browser/ui/views/location_bar/bubble_icon_view.h
@@ -64,10 +64,11 @@
   bool OnKeyPressed(const ui::KeyEvent& event) override;
   void ViewHierarchyChanged(
       const ViewHierarchyChangedDetails& details) override;
+  void OnNativeThemeChanged(const ui::NativeTheme* theme) override;
   void AddInkDropLayer(ui::Layer* ink_drop_layer) override;
   void RemoveInkDropLayer(ui::Layer* ink_drop_layer) override;
   scoped_ptr<views::InkDropHover> CreateInkDropHover() const override;
-  void OnNativeThemeChanged(const ui::NativeTheme* theme) override;
+  SkColor GetInkDropBaseColor() const override;
 
   // ui::EventHandler:
   void OnGestureEvent(ui::GestureEvent* event) override;
diff --git a/chrome/browser/ui/views/location_bar/content_setting_image_view.cc b/chrome/browser/ui/views/location_bar/content_setting_image_view.cc
index fb5165c..24a8b4a5 100644
--- a/chrome/browser/ui/views/location_bar/content_setting_image_view.cc
+++ b/chrome/browser/ui/views/location_bar/content_setting_image_view.cc
@@ -211,24 +211,6 @@
     event->SetHandled();
 }
 
-void ContentSettingImageView::AddInkDropLayer(ui::Layer* ink_drop_layer) {
-  image()->SetPaintToLayer(true);
-  image()->SetFillsBoundsOpaquely(false);
-  IconLabelBubbleView::AddInkDropLayer(ink_drop_layer);
-}
-
-void ContentSettingImageView::RemoveInkDropLayer(ui::Layer* ink_drop_layer) {
-  IconLabelBubbleView::RemoveInkDropLayer(ink_drop_layer);
-  image()->SetFillsBoundsOpaquely(true);
-  image()->SetPaintToLayer(false);
-}
-
-scoped_ptr<views::InkDropHover> ContentSettingImageView::CreateInkDropHover()
-    const {
-  // Location bar views don't show hover effect.
-  return nullptr;
-}
-
 void ContentSettingImageView::OnNativeThemeChanged(
     const ui::NativeTheme* native_theme) {
   if (ui::MaterialDesignController::IsModeMaterial())
diff --git a/chrome/browser/ui/views/location_bar/content_setting_image_view.h b/chrome/browser/ui/views/location_bar/content_setting_image_view.h
index 31213eff..a6beed4 100644
--- a/chrome/browser/ui/views/location_bar/content_setting_image_view.h
+++ b/chrome/browser/ui/views/location_bar/content_setting_image_view.h
@@ -78,9 +78,6 @@
   void OnMouseReleased(const ui::MouseEvent& event) override;
   bool OnKeyPressed(const ui::KeyEvent& event) override;
   void OnGestureEvent(ui::GestureEvent* event) override;
-  void AddInkDropLayer(ui::Layer* ink_drop_layer) override;
-  void RemoveInkDropLayer(ui::Layer* ink_drop_layer) override;
-  scoped_ptr<views::InkDropHover> CreateInkDropHover() const override;
   void OnNativeThemeChanged(const ui::NativeTheme* native_theme) override;
 
   // views::WidgetObserver:
diff --git a/chrome/browser/ui/views/location_bar/icon_label_bubble_view.cc b/chrome/browser/ui/views/location_bar/icon_label_bubble_view.cc
index 54d1334f..f58d846 100644
--- a/chrome/browser/ui/views/location_bar/icon_label_bubble_view.cc
+++ b/chrome/browser/ui/views/location_bar/icon_label_bubble_view.cc
@@ -12,6 +12,7 @@
 #include "ui/gfx/canvas.h"
 #include "ui/gfx/color_utils.h"
 #include "ui/native_theme/native_theme.h"
+#include "ui/views/animation/ink_drop_hover.h"
 #include "ui/views/border.h"
 #include "ui/views/controls/image_view.h"
 #include "ui/views/painter.h"
@@ -148,6 +149,27 @@
   SetLabelBackgroundColor(background_color);
 }
 
+void IconLabelBubbleView::AddInkDropLayer(ui::Layer* ink_drop_layer) {
+  image()->SetPaintToLayer(true);
+  image()->SetFillsBoundsOpaquely(false);
+  InkDropHostView::AddInkDropLayer(ink_drop_layer);
+}
+
+void IconLabelBubbleView::RemoveInkDropLayer(ui::Layer* ink_drop_layer) {
+  InkDropHostView::RemoveInkDropLayer(ink_drop_layer);
+  image()->SetPaintToLayer(false);
+}
+
+scoped_ptr<views::InkDropHover> IconLabelBubbleView::CreateInkDropHover()
+    const {
+  // Location bar views don't show hover effect.
+  return nullptr;
+}
+
+SkColor IconLabelBubbleView::GetInkDropBaseColor() const {
+  return color_utils::DeriveDefaultIconColor(GetTextColor());
+}
+
 SkColor IconLabelBubbleView::GetParentBackgroundColor() const {
   return ui::MaterialDesignController::IsModeMaterial()
              ? GetNativeTheme()->GetSystemColor(
diff --git a/chrome/browser/ui/views/location_bar/icon_label_bubble_view.h b/chrome/browser/ui/views/location_bar/icon_label_bubble_view.h
index c5a9b30c..f1a58d69 100644
--- a/chrome/browser/ui/views/location_bar/icon_label_bubble_view.h
+++ b/chrome/browser/ui/views/location_bar/icon_label_bubble_view.h
@@ -78,6 +78,10 @@
   gfx::Size GetPreferredSize() const override;
   void Layout() override;
   void OnNativeThemeChanged(const ui::NativeTheme* native_theme) override;
+  void AddInkDropLayer(ui::Layer* ink_drop_layer) override;
+  void RemoveInkDropLayer(ui::Layer* ink_drop_layer) override;
+  scoped_ptr<views::InkDropHover> CreateInkDropHover() const override;
+  SkColor GetInkDropBaseColor() const override;
 
   const gfx::FontList& font_list() const { return label_->font_list(); }
 
diff --git a/chrome/browser/ui/views/toolbar/app_menu_button.cc b/chrome/browser/ui/views/toolbar/app_menu_button.cc
index f30ceec7..48e20fc 100644
--- a/chrome/browser/ui/views/toolbar/app_menu_button.cc
+++ b/chrome/browser/ui/views/toolbar/app_menu_button.cc
@@ -196,7 +196,6 @@
 
 void AppMenuButton::RemoveInkDropLayer(ui::Layer* ink_drop_layer) {
   views::MenuButton::RemoveInkDropLayer(ink_drop_layer);
-  image()->SetFillsBoundsOpaquely(true);
   image()->SetPaintToLayer(false);
 }
 
diff --git a/chrome/browser/ui/views/toolbar/reload_button.cc b/chrome/browser/ui/views/toolbar/reload_button.cc
index 46852c2..fbacf1e 100644
--- a/chrome/browser/ui/views/toolbar/reload_button.cc
+++ b/chrome/browser/ui/views/toolbar/reload_button.cc
@@ -244,6 +244,7 @@
                gfx::CreateVectorIcon(icon_id, kButtonSize, normal_color));
       SetImage(views::Button::STATE_DISABLED,
                gfx::CreateVectorIcon(icon_id, kButtonSize, disabled_color));
+      set_ink_drop_base_color(normal_color);
     } else {
       SetImage(views::Button::STATE_NORMAL,
                *(tp->GetImageSkiaNamed((mode == MODE_RELOAD) ? IDR_RELOAD
diff --git a/chrome/browser/ui/views/toolbar/toolbar_action_view.cc b/chrome/browser/ui/views/toolbar/toolbar_action_view.cc
index bff4184..40e9ee8 100644
--- a/chrome/browser/ui/views/toolbar/toolbar_action_view.cc
+++ b/chrome/browser/ui/views/toolbar/toolbar_action_view.cc
@@ -10,6 +10,7 @@
 #include "base/bind.h"
 #include "chrome/browser/chrome_notification_types.h"
 #include "chrome/browser/sessions/session_tab_helper.h"
+#include "chrome/browser/themes/theme_properties.h"
 #include "chrome/browser/ui/toolbar/toolbar_action_view_controller.h"
 #include "chrome/browser/ui/toolbar/toolbar_actions_bar.h"
 #include "chrome/browser/ui/view_ids.h"
@@ -18,6 +19,7 @@
 #include "grit/theme_resources.h"
 #include "ui/accessibility/ax_view_state.h"
 #include "ui/base/resource/resource_bundle.h"
+#include "ui/base/theme_provider.h"
 #include "ui/compositor/paint_recorder.h"
 #include "ui/events/event.h"
 #include "ui/gfx/image/image_skia.h"
@@ -116,10 +118,14 @@
 
 void ToolbarActionView::RemoveInkDropLayer(ui::Layer* ink_drop_layer) {
   views::MenuButton::RemoveInkDropLayer(ink_drop_layer);
-  image()->SetFillsBoundsOpaquely(true);
   image()->SetPaintToLayer(false);
 }
 
+SkColor ToolbarActionView::GetInkDropBaseColor() const {
+  return GetThemeProvider()->GetColor(
+      ThemeProperties::COLOR_TOOLBAR_BUTTON_ICON);
+}
+
 content::WebContents* ToolbarActionView::GetCurrentWebContents() const {
   return delegate_->GetCurrentWebContents();
 }
diff --git a/chrome/browser/ui/views/toolbar/toolbar_action_view.h b/chrome/browser/ui/views/toolbar/toolbar_action_view.h
index 399ea3d4..0524dec 100644
--- a/chrome/browser/ui/views/toolbar/toolbar_action_view.h
+++ b/chrome/browser/ui/views/toolbar/toolbar_action_view.h
@@ -78,6 +78,7 @@
   bool IsTriggerableEvent(const ui::Event& event) override;
   void AddInkDropLayer(ui::Layer* ink_drop_layer) override;
   void RemoveInkDropLayer(ui::Layer* ink_drop_layer) override;
+  SkColor GetInkDropBaseColor() const override;
 
   // ToolbarActionViewDelegateViews:
   content::WebContents* GetCurrentWebContents() const override;
diff --git a/chrome/browser/ui/views/toolbar/toolbar_button.cc b/chrome/browser/ui/views/toolbar/toolbar_button.cc
index 38731ca8..60359f6 100644
--- a/chrome/browser/ui/views/toolbar/toolbar_button.cc
+++ b/chrome/browser/ui/views/toolbar/toolbar_button.cc
@@ -174,7 +174,6 @@
 
 void ToolbarButton::RemoveInkDropLayer(ui::Layer* ink_drop_layer) {
   views::LabelButton::RemoveInkDropLayer(ink_drop_layer);
-  image()->SetFillsBoundsOpaquely(true);
   image()->SetPaintToLayer(false);
 }
 
diff --git a/chrome/browser/ui/views/toolbar/toolbar_view.cc b/chrome/browser/ui/views/toolbar/toolbar_view.cc
index b1465e9..7792c46 100644
--- a/chrome/browser/ui/views/toolbar/toolbar_view.cc
+++ b/chrome/browser/ui/views/toolbar/toolbar_view.cc
@@ -761,6 +761,11 @@
                     gfx::CreateVectorIcon(gfx::VectorIconId::NAVIGATE_HOME,
                                           kButtonSize, normal_color));
     app_menu_button_->UpdateIcon();
+
+    back_->set_ink_drop_base_color(normal_color);
+    forward_->set_ink_drop_base_color(normal_color);
+    home_->set_ink_drop_base_color(normal_color);
+    app_menu_button_->set_ink_drop_base_color(normal_color);
   } else {
     back_->SetImage(views::Button::STATE_NORMAL,
                     *(tp->GetImageSkiaNamed(IDR_BACK)));
diff --git a/chrome/browser/ui/webui/options/content_settings_handler.cc b/chrome/browser/ui/webui/options/content_settings_handler.cc
index 4d1e47e..c8889df3 100644
--- a/chrome/browser/ui/webui/options/content_settings_handler.cc
+++ b/chrome/browser/ui/webui/options/content_settings_handler.cc
@@ -1673,6 +1673,7 @@
                                     type,
                                     std::string(),
                                     setting_type);
+    WebSiteSettingsUmaUtil::LogPermissionChange(type, setting_type);
   }
 }
 
diff --git a/chrome/browser/usb/web_usb_permission_bubble.h b/chrome/browser/usb/web_usb_permission_bubble.h
index 687f2c0..d55ffc6 100644
--- a/chrome/browser/usb/web_usb_permission_bubble.h
+++ b/chrome/browser/usb/web_usb_permission_bubble.h
@@ -11,8 +11,8 @@
 #include "components/bubble/bubble_reference.h"
 #include "components/webusb/public/interfaces/webusb_permission_bubble.mojom.h"
 #include "mojo/public/cpp/bindings/array.h"
+#include "mojo/public/cpp/bindings/binding_set.h"
 #include "mojo/public/cpp/bindings/interface_request.h"
-#include "mojo/public/cpp/bindings/weak_binding_set.h"
 
 namespace content {
 class RenderFrameHost;
@@ -39,7 +39,7 @@
 
  private:
   content::RenderFrameHost* const render_frame_host_;
-  mojo::WeakBindingSet<webusb::WebUsbPermissionBubble> bindings_;
+  mojo::BindingSet<webusb::WebUsbPermissionBubble> bindings_;
   std::vector<BubbleReference> bubbles_;
 
   DISALLOW_COPY_AND_ASSIGN(ChromeWebUsbPermissionBubble);
diff --git a/chrome/browser/usb/web_usb_permission_provider.h b/chrome/browser/usb/web_usb_permission_provider.h
index a85d16a..19b6f30 100644
--- a/chrome/browser/usb/web_usb_permission_provider.h
+++ b/chrome/browser/usb/web_usb_permission_provider.h
@@ -9,8 +9,8 @@
 
 #include "device/usb/public/interfaces/permission_provider.mojom.h"
 #include "mojo/public/cpp/bindings/array.h"
+#include "mojo/public/cpp/bindings/binding_set.h"
 #include "mojo/public/cpp/bindings/interface_request.h"
-#include "mojo/public/cpp/bindings/weak_binding_set.h"
 
 namespace content {
 class RenderFrameHost;
@@ -44,7 +44,7 @@
       mojo::InterfaceRequest<device::usb::PermissionProvider> request) override;
 
  private:
-  mojo::WeakBindingSet<PermissionProvider> bindings_;
+  mojo::BindingSet<PermissionProvider> bindings_;
   content::RenderFrameHost* const render_frame_host_;
 };
 
diff --git a/chrome/chrome_tests.gypi b/chrome/chrome_tests.gypi
index c67fd7c..64fabe1 100644
--- a/chrome/chrome_tests.gypi
+++ b/chrome/chrome_tests.gypi
@@ -2283,9 +2283,6 @@
             'browser/extensions/extension_nacl_browsertest.cc',
             'browser/nacl_host/test/gdb_debug_stub_browsertest.cc',
           ],
-          'dependencies': [
-            'test/data/nacl/nacl_test_data.gyp:pnacl_url_loader_test',
-          ],
           'conditions': [
             ['disable_nacl_untrusted==0', {
               'sources': [
@@ -2415,7 +2412,7 @@
           'conditions': [
             ['OS=="linux" or OS=="win"', {
               'sources': [
-                'browser/extensions/api/input_ime/input_ime_apitest_nonchromeos.cc',
+                'browser/ui/views/ime/input_ime_apitest_nonchromeos.cc',
               ]
             }],
           ]
diff --git a/chrome/test/data/extensions/api_test/input_ime_nonchromeos/background.js b/chrome/test/data/extensions/api_test/input_ime_nonchromeos/background.js
index 98c7f8e..3cb752d 100644
--- a/chrome/test/data/extensions/api_test/input_ime_nonchromeos/background.js
+++ b/chrome/test/data/extensions/api_test/input_ime_nonchromeos/background.js
@@ -3,10 +3,32 @@
 // found in the LICENSE file.
 
 chrome.test.runTests([
+  function testActivate() {
+    var focused = false;
+    var activated = false;
+    chrome.input.ime.onFocus.addListener(function(context) {
+      if (context.type == 'none') {
+        chrome.test.fail();
+        return;
+      }
+      focused = true;
+      if (activated)
+        chrome.test.succeed();
+    });
+    chrome.input.ime.activate(function() {
+      if (chrome.runtime.lastError) {
+        chrome.test.fail();
+        return;
+      }
+      activated = true;
+      if (focused)
+        chrome.test.succeed();
+    });
+  },
   function testNormalCreateWindow() {
     var options = { windowType: 'normal' };
     chrome.input.ime.createWindow(options, function(win) {
-      chrome.test.assertTrue(!chrome.runtime.lastError);
+      chrome.test.assertNoLastError()
       chrome.test.assertTrue(!!win);
       chrome.test.assertTrue(win instanceof Window);
       chrome.test.assertFalse(win.document.webkitHidden);
@@ -16,7 +38,7 @@
   function testFollowCursorCreateWindow() {
     var options = { windowType: 'followCursor' };
     chrome.input.ime.createWindow(options, function(win) {
-      chrome.test.assertTrue(!chrome.runtime.lastError);
+      chrome.test.assertNoLastError()
       chrome.test.assertTrue(!!win);
       chrome.test.assertFalse(win.document.webkitHidden);
       chrome.test.succeed();
diff --git a/chrome/test/data/extensions/platform_apps/background_page_navigation/manifest.json b/chrome/test/data/extensions/platform_apps/background_page_navigation/manifest.json
new file mode 100644
index 0000000..84ec22b
--- /dev/null
+++ b/chrome/test/data/extensions/platform_apps/background_page_navigation/manifest.json
@@ -0,0 +1,9 @@
+{
+  "name": "Platform App Test: window.open() to local resource is disallowed",
+  "version": "1",
+  "app": {
+    "background": {
+      "scripts": ["test.js"]
+    }
+  }
+}
diff --git a/chrome/test/data/extensions/platform_apps/background_page_navigation/nav-target.html b/chrome/test/data/extensions/platform_apps/background_page_navigation/nav-target.html
new file mode 100644
index 0000000..34dd9bb
--- /dev/null
+++ b/chrome/test/data/extensions/platform_apps/background_page_navigation/nav-target.html
@@ -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.
+-->
+<html>
+<body>
+<script src="nav-target.js"></script>
+This page should never be reached.
+</body>
+</html>
diff --git a/chrome/test/data/extensions/platform_apps/background_page_navigation/nav-target.js b/chrome/test/data/extensions/platform_apps/background_page_navigation/nav-target.js
new file mode 100644
index 0000000..e6e186b
--- /dev/null
+++ b/chrome/test/data/extensions/platform_apps/background_page_navigation/nav-target.js
@@ -0,0 +1,7 @@
+// 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.
+
+// We should never reach this page; if we have then it's a signal that we've
+// navigated away from the app page, and we should have the test fail.
+chrome.test.notifyFail('Navigated to ' + window.location.href);
diff --git a/chrome/test/data/extensions/platform_apps/background_page_navigation/test.js b/chrome/test/data/extensions/platform_apps/background_page_navigation/test.js
new file mode 100644
index 0000000..f2060db
--- /dev/null
+++ b/chrome/test/data/extensions/platform_apps/background_page_navigation/test.js
@@ -0,0 +1,68 @@
+// 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() {
+  var IN_APP_RELATIVE_URL = 'nav-target.html';
+  var IN_APP_ABSOLUTE_URL = chrome.runtime.getURL(IN_APP_RELATIVE_URL);
+  var WEB_URL = 'http://chromium.org';
+
+  var testLink = document.createElement('a');
+  document.body.appendChild(testLink);
+
+  function clickTestLink() {
+    var clickEvent = document.createEvent('MouseEvents');
+    clickEvent.initMouseEvent('click', true, true, window,
+                              0, 0, 0, 0, 0, false, false,
+                              false, false, 0, null);
+
+    return testLink.dispatchEvent(clickEvent);
+  }
+
+  // Tests are verified in C++ at the end of the run, by looking at the tabs
+  // these tests create.
+  var tests = [
+    // Trying to open a local resource in a new window will fail.
+    function windowOpenInAppRelativeURL() {
+      var w = window.open(IN_APP_RELATIVE_URL);
+      chrome.test.assertTrue(!w);
+      chrome.test.succeed();
+    },
+    // Trying to open a local resource in a new window will fail.
+    function openLinkToInAppRelativeURL() {
+      testLink.target = '_blank';
+      testLink.href = IN_APP_RELATIVE_URL;
+      clickTestLink();
+      chrome.test.succeed();
+    },
+    // Similar to windowOpenInAppRelativeURL().
+    function windowOpenInAppAbsoluteURL() {
+      var w = window.open(IN_APP_ABSOLUTE_URL);
+      chrome.test.assertTrue(!w);
+      chrome.test.succeed();
+    },
+    // Similar to openLinkToInAppRelativeURL().
+    function openLinkToInAppAbsoluteURL() {
+      testLink.target = '_blank';
+      testLink.href = IN_APP_ABSOLUTE_URL;
+      clickTestLink();
+      chrome.test.succeed();
+    },
+    // Opening web links in new window will pass.
+    // The opened tab will be verified in C++.
+    function windowOpenWebURL() {
+      var w = window.open(WEB_URL);
+      chrome.test.assertTrue(!!w);
+      chrome.test.succeed();
+    },
+    // Opening web links in new window will pass.
+    // The opened tab will be verified in C++.
+    function openLinkToWebURL() {
+      testLink.target = '_blank';
+      testLink.href = WEB_URL;
+      clickTestLink();
+      chrome.test.succeed();
+    }
+  ];
+  chrome.test.runTests(tests);
+});
diff --git a/chrome/test/data/extensions/platform_apps/navigation/main.js b/chrome/test/data/extensions/platform_apps/navigation/main.js
index e69d5d33..1cb0c19 100644
--- a/chrome/test/data/extensions/platform_apps/navigation/main.js
+++ b/chrome/test/data/extensions/platform_apps/navigation/main.js
@@ -56,15 +56,13 @@
     function() { testLink.href = IN_APP_URL; clickTestLink(); },
     function() { testLink.href = REMOTE_URL; clickTestLink(); },
 
-    // Links with target blank and a remote URL open a new tab in the browser
+    // Link with target blank and a remote URL opens a new tab in the browser
     // (verified in C++).
     function() {
       testLink.target = '_blank';
-      testLink.href = IN_APP_URL;
+      testLink.href = 'http://chromium.org';
       clickTestLink();
     },
-    function() { testLink.href = 'http://chromium.org'; clickTestLink(); },
-
     // If we manage to execute this test case, then we haven't navigated away.
     function() { chrome.test.notifyPass(); }
   ];
diff --git a/chrome/test/data/nacl/BUILD.gn b/chrome/test/data/nacl/BUILD.gn
index 11946e4..29cd5cb 100644
--- a/chrome/test/data/nacl/BUILD.gn
+++ b/chrome/test/data/nacl/BUILD.gn
@@ -27,7 +27,6 @@
     ":pnacl_mime_type_test($newlib)",
     ":pnacl_mime_type_test($pnacl)",
     ":pnacl_options_test($pnacl)",
-    ":pnacl_url_loader_test($pnacl)",
     ":ppapi_bad_get_ppp_instance_crash($newlib)",
     ":ppapi_bad_no_ppp_instance($newlib)",
     ":ppapi_bad_ppp_initialize($newlib)",
@@ -435,19 +434,6 @@
     ]
   }
 
-  nacl_test_data("pnacl_url_loader_test") {
-    output_name = "pnacl_url_loader"
-    sources = [
-      "pnacl_url_loader/pnacl_url_loader.cc",
-    ]
-    deps = [
-      "//ppapi:ppapi_cpp_lib",
-    ]
-    generate_nmf = true
-    destination_dir = "nacl_test_data"
-    test_files = [ "pnacl_url_loader/pnacl_url_loader.html" ]
-  }
-
   nacl_test_data("pnacl_dyncode_syscall_disabled_test") {
     output_name = "pnacl_dyncode_syscall_disabled"
     sources = [
diff --git a/chrome/test/data/nacl/nacl_test_data.gyp b/chrome/test/data/nacl/nacl_test_data.gyp
index 47da251..b68e381 100644
--- a/chrome/test/data/nacl/nacl_test_data.gyp
+++ b/chrome/test/data/nacl/nacl_test_data.gyp
@@ -701,25 +701,6 @@
       },
     },
     {
-      'target_name': 'pnacl_url_loader_test',
-      'type': 'none',
-      'variables': {
-        'nexe_target': 'pnacl_url_loader',
-        'build_pnacl_newlib': 1,
-        'nexe_destination_dir': 'nacl_test_data',
-        'generate_nmf': 1,
-        'link_flags': [
-          '-lppapi',
-        ],
-        'sources': [
-          'pnacl_url_loader/pnacl_url_loader.cc',
-        ],
-        'test_files': [
-          'pnacl_url_loader/pnacl_url_loader.html',
-        ],
-      },
-    },
-    {
       'target_name': 'pnacl_dyncode_syscall_disabled_test',
       'type': 'none',
       'variables': {
diff --git a/chrome/test/data/nacl/pnacl_url_loader/pnacl_url_loader.cc b/chrome/test/data/nacl/pnacl_url_loader/pnacl_url_loader.cc
deleted file mode 100644
index 9ef656b..0000000
--- a/chrome/test/data/nacl/pnacl_url_loader/pnacl_url_loader.cc
+++ /dev/null
@@ -1,60 +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 <string>
-
-#include "ppapi/cpp/instance.h"
-#include "ppapi/cpp/module.h"
-#include "ppapi/cpp/url_loader.h"
-#include "ppapi/cpp/url_request_info.h"
-#include "ppapi/cpp/url_response_info.h"
-#include "ppapi/cpp/var.h"
-#include "ppapi/utility/completion_callback_factory.h"
-
-class PnaclUrlLoaderInstance : public pp::Instance {
- public:
-  explicit PnaclUrlLoaderInstance(PP_Instance instance)
-      : pp::Instance(instance), loader_(this), factory_(this) {}
-
-  void HandleMessage(const pp::Var& var_message) override {
-    if (var_message.is_string()) {
-      command_ = var_message.AsString();
-      pp::URLRequestInfo request(this);
-      request.SetMethod("GET");
-      if (command_.find("Other") != std::string::npos)
-        request.SetURL("https://www.example.com/echo");
-      else
-        request.SetURL("/echo");
-      if (command_.find("CORS") != std::string::npos)
-        request.SetAllowCrossOriginRequests(true);
-      if (command_.find("Credentials") != std::string::npos)
-        request.SetAllowCredentials(true);
-      loader_.Open(request,
-                   factory_.NewCallback(&PnaclUrlLoaderInstance::OnOpen));
-      return;
-    }
-  }
-
- private:
-  void OnOpen(int32_t result) { PostMessage(pp::Var("OnOpen" + command_)); }
-
-  pp::URLLoader loader_;
-  pp::CompletionCallbackFactory<PnaclUrlLoaderInstance> factory_;
-  std::string command_;
-};
-
-class PnaclUrlLoaderModule : public pp::Module {
- public:
-  virtual pp::Instance* CreateInstance(PP_Instance instance) {
-    return new PnaclUrlLoaderInstance(instance);
-  }
-};
-
-namespace pp {
-
-__attribute__((visibility("default"))) Module* CreateModule() {
-  return new PnaclUrlLoaderModule();
-}
-
-}  // namespace pp
diff --git a/chrome/test/data/nacl/pnacl_url_loader/pnacl_url_loader.html b/chrome/test/data/nacl/pnacl_url_loader/pnacl_url_loader.html
deleted file mode 100644
index 6f186ec..0000000
--- a/chrome/test/data/nacl/pnacl_url_loader/pnacl_url_loader.html
+++ /dev/null
@@ -1,19 +0,0 @@
-<script>
-window.addEventListener('load', function() {
-    init();
-  }, false);
-
-function init() {
-  var embed = document.createElement('embed');
-  embed.addEventListener('message', function(message) {
-      window.domAutomationController.setAutomationId(0);
-      window.domAutomationController.send(message.data);
-    }, false);
-  embed.addEventListener('load', function() {
-      embed.postMessage(location.hash.substr(1));
-    }, false);
-  embed.src = 'pnacl_url_loader.nmf';
-  embed.type = 'application/x-pnacl';
-  document.body.appendChild(embed);
-}
-</script>
diff --git a/chromecast/browser/cast_browser_main_parts.cc b/chromecast/browser/cast_browser_main_parts.cc
index 98d4955..b420289 100644
--- a/chromecast/browser/cast_browser_main_parts.cc
+++ b/chromecast/browser/cast_browser_main_parts.cc
@@ -213,11 +213,6 @@
 #endif
 #endif
 #endif  // defined(OS_LINUX)
-  // Enable prefixed EME until all Cast partner apps are moved off of it.
-  { switches::kEnablePrefixedEncryptedMedia, "" },
-  // Needed to fix a bug where the raster thread doesn't get scheduled for a
-  // substantial time (~5 seconds).  See https://crbug.com/441895.
-  { switches::kUseNormalPriorityForTileTaskWorkerThreads, "" },
   // Needed so that our call to GpuDataManager::SetGLStrings doesn't race
   // against GPU process creation (which is otherwise triggered from
   // BrowserThreadsStarted).  The GPU process will be created as soon as a
diff --git a/chromecast/public/media/decoder_config.h b/chromecast/public/media/decoder_config.h
index e2cf78d..261b3f1 100644
--- a/chromecast/public/media/decoder_config.h
+++ b/chromecast/public/media/decoder_config.h
@@ -61,9 +61,11 @@
   kCodecVP8,
   kCodecVP9,
   kCodecHEVC,
+  kCodecDolbyVisionH264,
+  kCodecDolbyVisionHEVC,
 
   kVideoCodecMin = kVideoCodecUnknown,
-  kVideoCodecMax = kCodecHEVC,
+  kVideoCodecMax = kCodecDolbyVisionHEVC,
 };
 
 // Profile for Video codec.
@@ -82,9 +84,13 @@
   kH264MultiviewHigh,
   kVP8ProfileAny,
   kVP9ProfileAny,
+  kDolbyVisionCompatible_EL_MD,
+  kDolbyVisionCompatible_BL_EL_MD,
+  kDolbyVisionNonCompatible_BL_MD,
+  kDolbyVisionNonCompatible_BL_EL_MD,
 
   kVideoProfileMin = kVideoProfileUnknown,
-  kVideoProfileMax = kVP9ProfileAny,
+  kVideoProfileMax = kDolbyVisionNonCompatible_BL_EL_MD,
 };
 
 // TODO(erickung): Remove constructor once CMA backend implementation does't
diff --git a/chromecast/renderer/media/cma_renderer.cc b/chromecast/renderer/media/cma_renderer.cc
index 41ef271..cbb24c9 100644
--- a/chromecast/renderer/media/cma_renderer.cc
+++ b/chromecast/renderer/media/cma_renderer.cc
@@ -4,7 +4,9 @@
 
 #include "chromecast/renderer/media/cma_renderer.h"
 
+#include <algorithm>
 #include <utility>
+#include <vector>
 
 #include "base/bind.h"
 #include "base/callback_helpers.h"
diff --git a/chromeos/CHROMEOS_LKGM b/chromeos/CHROMEOS_LKGM
index 11d9f18e..954fff2a 100644
--- a/chromeos/CHROMEOS_LKGM
+++ b/chromeos/CHROMEOS_LKGM
@@ -1 +1 @@
-7955.0.0
\ No newline at end of file
+7959.0.0
\ No newline at end of file
diff --git a/chromeos/third_party/android_bionic_libc/NOTICE b/chromeos/third_party/android_bionic_libc/NOTICE
new file mode 100644
index 0000000..81e9943
--- /dev/null
+++ b/chromeos/third_party/android_bionic_libc/NOTICE
@@ -0,0 +1,5074 @@
+   Copyright (c) 2014, Linaro Limited
+   All rights reserved.
+
+   Redistribution and use in source and binary forms, with or without
+   modification, are permitted provided that the following conditions are met:
+       * Redistributions of source code must retain the above copyright
+         notice, this list of conditions and the following disclaimer.
+       * Redistributions in binary form must reproduce the above copyright
+         notice, this list of conditions and the following disclaimer in the
+         documentation and/or other materials provided with the distribution.
+       * Neither the name of the Linaro nor the
+         names of its contributors may be used to endorse or promote products
+         derived from this software without specific prior written permission.
+
+   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+   HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+   strchr - find a character in a string
+
+   Copyright (c) 2014, ARM Limited
+   All rights Reserved.
+   Copyright (c) 2014, Linaro Ltd.
+
+   Redistribution and use in source and binary forms, with or without
+   modification, are permitted provided that the following conditions are met:
+       * Redistributions of source code must retain the above copyright
+         notice, this list of conditions and the following disclaimer.
+       * Redistributions in binary form must reproduce the above copyright
+         notice, this list of conditions and the following disclaimer in the
+         documentation and/or other materials provided with the distribution.
+       * Neither the name of the company nor the names of its contributors
+         may be used to endorse or promote products derived from this
+         software without specific prior written permission.
+
+   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+   HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+ Copyright (c) 1993 John Brezak
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ 1. Redistributions of source code must retain the above copyright
+    notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in the
+    documentation and/or other materials provided with the distribution.
+ 3. The name of the author may be used to endorse or promote products
+    derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR `AS IS'' AND ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+====================================================
+Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+
+Developed at SunPro, a Sun Microsystems, Inc. business.
+Permission to use, copy, modify, and distribute this
+software is freely granted, provided that this notice
+is preserved.
+
+-------------------------------------------------------------------
+
+Based on the UCB version with the ID appearing below.
+This is ANSIish only when "multibyte character == plain character".
+
+Copyright (c) 1989, 1993
+   The Regents of the University of California.  All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. Neither the name of the project nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (C) 2004, 2005, 2008  Internet Systems Consortium, Inc. ("ISC")
+Copyright (C) 1995-1999, 2001, 2003  Internet Software Consortium.
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
+
+-------------------------------------------------------------------
+
+Copyright (C) 2004, 2005, 2008  Internet Systems Consortium, Inc. ("ISC")
+Copyright (C) 1997-2001  Internet Software Consortium.
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
+
+-------------------------------------------------------------------
+
+Copyright (C) 2006 The Android Open Source Project
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-------------------------------------------------------------------
+
+Copyright (C) 2006 The Android Open Source Project
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+ * Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in
+   the documentation and/or other materials provided with the
+   distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (C) 2008 The Android Open Source Project
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-------------------------------------------------------------------
+
+Copyright (C) 2008 The Android Open Source Project
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+ * Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in
+   the documentation and/or other materials provided with the
+   distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (C) 2008 The Android Open Source Project
+All rights reserved.
+Copyright (c) 2013-2014, NVIDIA Corporation.  All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+ * Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in
+   the documentation and/or other materials provided with the
+   distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (C) 2009 The Android Open Source Project
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+ * Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in
+   the documentation and/or other materials provided with the
+   distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (C) 2010 The Android Open Source Project
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-------------------------------------------------------------------
+
+Copyright (C) 2010 The Android Open Source Project
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+ * Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in
+   the documentation and/or other materials provided with the
+   distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (C) 2010 The Android Open Source Project
+Copyright (c) 2008 ARM Ltd
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. The name of the company may not be used to endorse or promote
+   products derived from this software without specific prior written
+   permission.
+
+THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Android adaptation and tweak by Jim Huang <jserv@0xlab.org>.
+
+-------------------------------------------------------------------
+
+Copyright (C) 2011 The Android Open Source Project
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+ * Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in
+   the documentation and/or other materials provided with the
+   distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (C) 2012 The Android Open Source Project
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-------------------------------------------------------------------
+
+Copyright (C) 2012 The Android Open Source Project
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+ * Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in
+   the documentation and/or other materials provided with the
+   distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (C) 2013 The Android Open Source Project
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-------------------------------------------------------------------
+
+Copyright (C) 2013 The Android Open Source Project
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+ * Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in
+   the documentation and/or other materials provided with the
+   distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (C) 2013 The Android Open Source Project
+All rights reserved.
+Copyright (c) 2013-2014 NVIDIA Corporation.  All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+ * Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in
+   the documentation and/or other materials provided with the
+   distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (C) 2013 The Android Open Source Project
+Copyright (c) 2014, NVIDIA CORPORATION.  All rights reserved.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+ * Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in
+   the documentation and/or other materials provided with the
+   distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (C) 2014 The Android Open Source Project
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-------------------------------------------------------------------
+
+Copyright (C) 2014 The Android Open Source Project
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+ * Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in
+   the documentation and/or other materials provided with the
+   distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (C) 2015 The Android Open Source Project
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-------------------------------------------------------------------
+
+Copyright (C) 2015 The Android Open Source Project
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+ * Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in
+   the documentation and/or other materials provided with the
+   distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1980, 1983, 1988, 1993
+   The Regents of the University of California.  All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. All advertising materials mentioning features or use of this software
+   must display the following acknowledgement:
+   This product includes software developed by the University of
+   California, Berkeley and its contributors.
+4. Neither the name of the University nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+
+Portions Copyright (c) 1993 by Digital Equipment Corporation.
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies, and that
+the name of Digital Equipment Corporation not be used in advertising or
+publicity pertaining to distribution of the document or software without
+specific, written prior permission.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
+WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS.   IN NO EVENT SHALL DIGITAL EQUIPMENT
+CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1982, 1986, 1993
+   The Regents of the University of California.  All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1982, 1986, 1993
+   The Regents of the University of California.  All rights reserved.
+(c) UNIX System Laboratories, Inc.
+All or some portions of this file are derived from material licensed
+to the University of California by American Telephone and Telegraph
+Co. or Unix System Laboratories, Inc. and are reproduced herein with
+the permission of UNIX System Laboratories, Inc.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1983, 1987, 1989
+   The Regents of the University of California.  All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1983, 1989
+   The Regents of the University of California.  All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. All advertising materials mentioning features or use of this software
+   must display the following acknowledgement:
+    This product includes software developed by the University of
+    California, Berkeley and its contributors.
+4. Neither the name of the University nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1983, 1989, 1993
+   The Regents of the University of California.  All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1983, 1990, 1993
+   The Regents of the University of California.  All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+Portions Copyright (c) 1993 by Digital Equipment Corporation.
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies, and that
+the name of Digital Equipment Corporation not be used in advertising or
+publicity pertaining to distribution of the document or software without
+specific, written prior permission.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
+WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS.   IN NO EVENT SHALL DIGITAL EQUIPMENT
+CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1983, 1993
+   The Regents of the University of California.  All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1983, 1993
+   The Regents of the University of California.  All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+4. Neither the name of the University nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1985
+   The Regents of the University of California.  All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. All advertising materials mentioning features or use of this software
+   must display the following acknowledgement:
+    This product includes software developed by the University of
+    California, Berkeley and its contributors.
+4. Neither the name of the University nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1985 Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1985, 1988, 1993
+   The Regents of the University of California.  All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+Portions Copyright (c) 1993 by Digital Equipment Corporation.
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies, and that
+the name of Digital Equipment Corporation not be used in advertising or
+publicity pertaining to distribution of the document or software without
+specific, written prior permission.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
+WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS.   IN NO EVENT SHALL DIGITAL EQUIPMENT
+CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1985, 1989, 1993
+   The Regents of the University of California.  All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. All advertising materials mentioning features or use of this software
+   must display the following acknowledgement:
+    This product includes software developed by the University of
+    California, Berkeley and its contributors.
+4. Neither the name of the University nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1985, 1993
+   The Regents of the University of California.  All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. All advertising materials mentioning features or use of this software
+   must display the following acknowledgement:
+    This product includes software developed by the University of
+    California, Berkeley and its contributors.
+4. Neither the name of the University nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1985, 1993
+   The Regents of the University of California.  All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1987 Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1987, 1993
+   The Regents of the University of California.  All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. All advertising materials mentioning features or use of this software
+   must display the following acknowledgement:
+    This product includes software developed by the University of
+    California, Berkeley and its contributors.
+4. Neither the name of the University nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1987, 1993
+   The Regents of the University of California.  All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1988 Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1988 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1988, 1993
+   The Regents of the University of California.  All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. All advertising materials mentioning features or use of this software
+   must display the following acknowledgement:
+    This product includes software developed by the University of
+    California, Berkeley and its contributors.
+4. Neither the name of the University nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1988, 1993
+   The Regents of the University of California.  All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1988, 1993
+   The Regents of the University of California.  All rights reserved.
+
+This code is derived from software written by Ken Arnold and
+published in UNIX Review, Vol. 6, No. 8.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1989 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms are permitted
+provided that the above copyright notice and this paragraph are
+duplicated in all such forms and that any documentation,
+advertising materials, and other materials related to such
+distribution and use acknowledge that the software was developed
+by the University of California, Berkeley. The name of the
+University may not be used to endorse or promote products derived
+from this software without specific prior written permission.
+THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1989 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1989 The Regents of the University of California.
+All rights reserved.
+(c) UNIX System Laboratories, Inc.
+All or some portions of this file are derived from material licensed
+to the University of California by American Telephone and Telegraph
+Co. or Unix System Laboratories, Inc. and are reproduced herein with
+the permission of UNIX System Laboratories, Inc.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1989, 1993
+   The Regents of the University of California.  All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1989, 1993
+   The Regents of the University of California.  All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+4. Neither the name of the University nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1989, 1993
+   The Regents of the University of California.  All rights reserved.
+
+This code is derived from software contributed to Berkeley by
+Roger L. Snyder.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1989, 1993
+   The Regents of the University of California.  All rights reserved.
+(c) UNIX System Laboratories, Inc.
+All or some portions of this file are derived from material licensed
+to the University of California by American Telephone and Telegraph
+Co. or Unix System Laboratories, Inc. and are reproduced herein with
+the permission of UNIX System Laboratories, Inc.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1989, 1993, 1994
+   The Regents of the University of California.  All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1990 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1990 The Regents of the University of California.
+All rights reserved.
+
+This code is derived from locore.s.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1990 The Regents of the University of California.
+All rights reserved.
+
+This code is derived from software contributed to Berkeley by
+Chris Torek.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1990 The Regents of the University of California.
+All rights reserved.
+
+This code is derived from software contributed to Berkeley by
+William Jolitz.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1990, 1993
+   The Regents of the University of California.  All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1990, 1993
+   The Regents of the University of California.  All rights reserved.
+
+This code is derived from software contributed to Berkeley by
+Chris Torek.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1990, 1993
+   The Regents of the University of California.  All rights reserved.
+
+This code is derived from software contributed to Berkeley by
+Donn Seeley at UUNET Technologies, Inc.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1990, 1993
+   The Regents of the University of California.  All rights reserved.
+
+This code is derived from software contributed to Berkeley by
+Donn Seeley at UUNET Technologies, Inc.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+4. Neither the name of the University nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1990, 1993
+   The Regents of the University of California.  All rights reserved.
+(c) UNIX System Laboratories, Inc.
+All or some portions of this file are derived from material licensed
+to the University of California by American Telephone and Telegraph
+Co. or Unix System Laboratories, Inc. and are reproduced herein with
+the permission of UNIX System Laboratories, Inc.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1990, 1993, 1994
+   The Regents of the University of California.  All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1990, 1993, 1994
+   The Regents of the University of California.  All rights reserved.
+
+This code is derived from software contributed to Berkeley by
+Chris Torek.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1991 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1991, 1993
+   The Regents of the University of California.  All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1991, 1993
+   The Regents of the University of California.  All rights reserved.
+
+This code is derived from software contributed to Berkeley by
+Berkeley Software Design, Inc.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1991, 1993
+   The Regents of the University of California.  All rights reserved.
+(c) UNIX System Laboratories, Inc.
+All or some portions of this file are derived from material licensed
+to the University of California by American Telephone and Telegraph
+Co. or Unix System Laboratories, Inc. and are reproduced herein with
+the permission of UNIX System Laboratories, Inc.
+
+This code is derived from software contributed to Berkeley by
+Hugh Smith at The University of Guelph.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1991, 1993, 1995,
+   The Regents of the University of California.  All rights reserved.
+
+This code is derived from software contributed to Berkeley by
+Havard Eidnes.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1992 Henry Spencer.
+Copyright (c) 1992, 1993
+   The Regents of the University of California.  All rights reserved.
+
+This code is derived from software contributed to Berkeley by
+Henry Spencer of the University of Toronto.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1992 The Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1992, 1993
+   The Regents of the University of California.  All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1992, 1993
+   The Regents of the University of California.  All rights reserved.
+
+This code is derived from software contributed to Berkeley by
+Ralph Campbell.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1992, 1993
+   The Regents of the University of California.  All rights reserved.
+
+This code is derived from software contributed to Berkeley by
+Ralph Campbell. This file is derived from the MIPS RISC
+Architecture book by Gerry Kane.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1992, 1993
+   The Regents of the University of California.  All rights reserved.
+
+This software was developed by the Computer Systems Engineering group
+at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
+contributed to Berkeley.
+
+All advertising materials mentioning features or use of this software
+must display the following acknowledgement:
+   This product includes software developed by the University of
+   California, Lawrence Berkeley Laboratory.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. All advertising materials mentioning features or use of this software
+   must display the following acknowledgement:
+   This product includes software developed by the University of
+   California, Berkeley and its contributors.
+4. Neither the name of the University nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1992, 1993
+   The Regents of the University of California.  All rights reserved.
+(c) UNIX System Laboratories, Inc.
+All or some portions of this file are derived from material licensed
+to the University of California by American Telephone and Telegraph
+Co. or Unix System Laboratories, Inc. and are reproduced herein with
+the permission of UNIX System Laboratories, Inc.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1992, 1993, 1994
+   The Regents of the University of California.  All rights reserved.
+
+This code is derived from software contributed to Berkeley by
+Henry Spencer.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1992, 1993, 1994 Henry Spencer.
+
+This code is derived from software contributed to Berkeley by
+Henry Spencer.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. All advertising materials mentioning features or use of this software
+   must display the following acknowledgement:
+   This product includes software developed by the University of
+   California, Berkeley and its contributors.
+4. Neither the name of the University nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1993
+   The Regents of the University of California.  All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1993 Martin Birgmeier
+All rights reserved.
+
+You may redistribute unmodified or modified versions of this source
+code provided that the above copyright notice and this and the
+following conditions are retained.
+
+This software is provided ``as is'', and comes with no warranties
+of any kind. I shall in no event be liable for anything that happens
+to anyone/anything when using this software.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1994 SigmaSoft, Th. Lockert <tholo@sigmasoft.com>
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. The name of the author may not be used to endorse or promote products
+   derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1996 by Internet Software Consortium.
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
+ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
+CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1996, David Mazieres <dm@uun.org>
+Copyright (c) 2008, Damien Miller <djm@openbsd.org>
+Copyright (c) 2013, Markus Friedl <markus@openbsd.org>
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1996-1998, 2008 Theo de Raadt
+Copyright (c) 1997, 2008-2009 Todd C. Miller
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1997 Mark Brinicombe
+Copyright (c) 2010 Android Open Source Project.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. All advertising materials mentioning features or use of this software
+   must display the following acknowledgement:
+   This product includes software developed by Mark Brinicombe
+4. Neither the name of the University nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1997 Niklas Hallqvist.  All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1997 Todd C. Miller <Todd.Miller@courtesan.com>
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1997 Todd C. Miller <Todd.Miller@courtesan.com>
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. The name of the author may not be used to endorse or promote products
+   derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL
+THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
+All rights reserved.
+
+This code was contributed to The NetBSD Foundation by Klaus Klein.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. All advertising materials mentioning features or use of this software
+   must display the following acknowledgement:
+       This product includes software developed by the NetBSD
+       Foundation, Inc. and its contributors.
+4. Neither the name of The NetBSD Foundation nor the names of its
+   contributors may be used to endorse or promote products derived
+   from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1997, 1998, 1999, 2004 The NetBSD Foundation, Inc.
+All rights reserved.
+
+This code is derived from software contributed to The NetBSD Foundation
+by Luke Mewburn.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1997, 1998, 1999, 2004 The NetBSD Foundation, Inc.
+All rights reserved.
+
+This code is derived from software contributed to The NetBSD Foundation
+by Luke Mewburn; and by Jason R. Thorpe.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. All advertising materials mentioning features or use of this software
+   must display the following acknowledgement:
+       This product includes software developed by the NetBSD
+       Foundation, Inc. and its contributors.
+4. Neither the name of The NetBSD Foundation nor the names of its
+   contributors may be used to endorse or promote products derived
+   from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1997, 2005 Todd C. Miller <Todd.Miller@courtesan.com>
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1998 Softweyr LLC.  All rights reserved.
+
+strtok_r, from Berkeley strtok
+Oct 13, 1998 by Wes Peters <wes@softweyr.com>
+
+Copyright (c) 1988, 1993
+   The Regents of the University of California.  All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notices, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notices, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY SOFTWEYR LLC, THE REGENTS AND CONTRIBUTORS
+``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL SOFTWEYR LLC, THE
+REGENTS, OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1998 The NetBSD Foundation, Inc.
+All rights reserved.
+
+This code is derived from software contributed to The NetBSD Foundation
+by Klaus Klein.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. All advertising materials mentioning features or use of this software
+   must display the following acknowledgement:
+       This product includes software developed by the NetBSD
+       Foundation, Inc. and its contributors.
+4. Neither the name of The NetBSD Foundation nor the names of its
+   contributors may be used to endorse or promote products derived
+   from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com>
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com>
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. The name of the author may not be used to endorse or promote products
+   derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL
+THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 1999
+   David E. O'Brien
+Copyright (c) 1988, 1993
+   The Regents of the University of California.  All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. Neither the name of the University nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2000 Ben Harris.
+Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. Neither the name of the project nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2000 The NetBSD Foundation, Inc.
+All rights reserved.
+
+This code is derived from software contributed to The NetBSD Foundation
+by Atsushi Onoe.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. All advertising materials mentioning features or use of this software
+   must display the following acknowledgement:
+   This product includes software developed by the NetBSD
+   Foundation, Inc. and its contributors.
+4. Neither the name of The NetBSD Foundation nor the names of its
+   contributors may be used to endorse or promote products derived
+   from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2000 The NetBSD Foundation, Inc.
+All rights reserved.
+
+This code is derived from software contributed to The NetBSD Foundation
+by Dieter Baron and Thomas Klausner.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2001 Mike Barcroft <mike@FreeBSD.org>
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2001 Wasabi Systems, Inc.
+All rights reserved.
+
+Written by Frank van der Linden for Wasabi Systems, Inc.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. All advertising materials mentioning features or use of this software
+   must display the following acknowledgement:
+     This product includes software developed for the NetBSD Project by
+     Wasabi Systems, Inc.
+4. The name of Wasabi Systems, Inc. may not be used to endorse
+   or promote products derived from this software without specific prior
+   written permission.
+
+THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL WASABI SYSTEMS, INC
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2001-2002 Opsycon AB  (www.opsycon.se / www.opsycon.com)
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
+OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2001-2002 Opsycon AB  (www.opsycon.se / www.opsycon.com)
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. Neither the name of Opsycon AB nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
+OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2002 Daniel Hartmeier
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+   - Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the following disclaimer.
+   - Redistributions in binary form must reproduce the above
+     copyright notice, this list of conditions and the following
+     disclaimer in the documentation and/or other materials provided
+     with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2002 Marc Espie.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE OPENBSD PROJECT AND CONTRIBUTORS
+``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OPENBSD
+PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2002 The NetBSD Foundation, Inc.
+All rights reserved.
+
+This code is derived from software contributed to The NetBSD Foundation
+by Christos Zoulas.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2002 Tim J. Robbins
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2002 Tim J. Robbins.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2002 Todd C. Miller <Todd.Miller@courtesan.com>
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+Sponsored in part by the Defense Advanced Research Projects
+Agency (DARPA) and Air Force Research Laboratory, Air Force
+Materiel Command, USAF, under agreement number F39502-99-1-0512.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2002, 2003 Tim J. Robbins.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2002-2004 Tim J. Robbins
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2002-2004 Tim J. Robbins.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2003 Constantin S. Svintsoff <kostik@iclub.nsu.ru>
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. The names of the authors may not be used to endorse or promote
+   products derived from this software without specific prior written
+   permission.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2003 David Schultz <das@FreeBSD.ORG>
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2003 Networks Associates Technology, Inc.
+All rights reserved.
+
+Portions of this software were developed for the FreeBSD Project by
+Jacques A. Vidrine, Safeport Network Services, and Network
+Associates Laboratories, the Security Research Division of Network
+Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035
+("CBOSS"), as part of the DARPA CHATS research program.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2003 Todd C. Miller <Todd.Miller@courtesan.com>
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+Sponsored in part by the Defense Advanced Research Projects
+Agency (DARPA) and Air Force Research Laboratory, Air Force
+Materiel Command, USAF, under agreement number F39502-99-1-0512.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2004 The NetBSD Foundation, Inc.
+All rights reserved.
+
+This code is derived from software contributed to The NetBSD Foundation
+by Christos Zoulas.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. All advertising materials mentioning features or use of this software
+   must display the following acknowledgement:
+       This product includes software developed by the NetBSD
+       Foundation, Inc. and its contributors.
+4. Neither the name of The NetBSD Foundation nor the names of its
+   contributors may be used to endorse or promote products derived
+   from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+Copyright (c) 1995,1999 by Internet Software Consortium.
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+Copyright (c) 1995-1999 by Internet Software Consortium
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+Copyright (c) 1995-1999 by Internet Software Consortium.
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+Copyright (c) 1996,1999 by Internet Software Consortium.
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+Copyright (c) 1996-1999 by Internet Software Consortium
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+Copyright (c) 1996-1999 by Internet Software Consortium.
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+Copyright (c) 1997,1999 by Internet Software Consortium.
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+Copyright (c) 1999 by Internet Software Consortium.
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+Portions Copyright (c) 1996-1999 by Internet Software Consortium.
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2004, 2005 David Schultz <das@FreeBSD.ORG>
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2005 Tim J. Robbins.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2005 by Internet Systems Consortium, Inc. ("ISC")
+Copyright (c) 1995-1999 by Internet Software Consortium
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2007 Todd C. Miller <Todd.Miller@courtesan.com>
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2007-2008  Michael G Schwern
+
+This software originally derived from Paul Sheer's pivotal_gmtime_r.c.
+
+The MIT License:
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2007-2008  Michael G Schwern
+
+This software originally derived from Paul Sheer's pivotal_gmtime_r.c.
+
+The MIT License:
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+Origin: http://code.google.com/p/y2038
+Modified for Bionic by the Android Open Source Project
+
+-------------------------------------------------------------------
+
+Copyright (c) 2008  Android Open Source Project (query id randomization)
+Copyright (c) 1985, 1993
+   The Regents of the University of California.  All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. All advertising materials mentioning features or use of this software
+   must display the following acknowledgement:
+    This product includes software developed by the University of
+    California, Berkeley and its contributors.
+4. Neither the name of the University nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2008 Otto Moerbeek <otto@drijf.net>
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2008 Todd C. Miller <millert@openbsd.org>
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2008, Damien Miller <djm@openbsd.org>
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2009 David Schultz <das@FreeBSD.org>
+All rights reserved.
+
+Copyright (c) 2011 The FreeBSD Foundation
+All rights reserved.
+Portions of this software were developed by David Chisnall
+under sponsorship from the FreeBSD Foundation.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2009 David Schultz <das@FreeBSD.org>
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2009 The NetBSD Foundation, Inc.
+
+This code is derived from software contributed to The NetBSD Foundation
+by Roy Marples.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2010 MIPS Technologies, Inc.
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+     * Redistributions of source code must retain the above copyright
+       notice, this list of conditions and the following disclaimer.
+     * Redistributions in binary form must reproduce the above copyright
+       notice, this list of conditions and the following disclaimer
+       in the documentation and/or other materials provided with
+       the distribution.
+     * Neither the name of MIPS Technologies Inc. nor the names of its
+       contributors may be used to endorse or promote products derived
+       from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2010 Todd C. Miller <Todd.Miller@courtesan.com>
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2010, 2011, 2012, 2013 Intel Corporation
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+    * this list of conditions and the following disclaimer.
+
+    * Redistributions in binary form must reproduce the above copyright notice,
+    * this list of conditions and the following disclaimer in the documentation
+    * and/or other materials provided with the distribution.
+
+    * Neither the name of Intel Corporation nor the names of its contributors
+    * may be used to endorse or promote products derived from this software
+    * without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2010, Intel Corporation
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+    * this list of conditions and the following disclaimer.
+
+    * Redistributions in binary form must reproduce the above copyright notice,
+    * this list of conditions and the following disclaimer in the documentation
+    * and/or other materials provided with the distribution.
+
+    * Neither the name of Intel Corporation nor the names of its contributors
+    * may be used to endorse or promote products derived from this software
+    * without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2011 David Chisnall
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2011 Ed Schouten <ed@FreeBSD.org>
+                   David Chisnall <theraven@FreeBSD.org>
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2011 Intel Corporation
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+    * this list of conditions and the following disclaimer.
+
+    * Redistributions in binary form must reproduce the above copyright notice,
+    * this list of conditions and the following disclaimer in the documentation
+    * and/or other materials provided with the distribution.
+
+    * Neither the name of Intel Corporation nor the names of its contributors
+    * may be used to endorse or promote products derived from this software
+    * without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2011 Martin Pieuchot <mpi@openbsd.org>
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2011 Martin Pieuchot <mpi@openbsd.org>
+Copyright (c) 2009 Ted Unangst
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2011 The Android Open Source Project
+Copyright (c) 2008 ARM Ltd
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. The name of the company may not be used to endorse or promote
+   products derived from this software without specific prior written
+   permission.
+
+THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2011, 2012, 2013 Intel Corporation
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+    * this list of conditions and the following disclaimer.
+
+    * Redistributions in binary form must reproduce the above copyright notice,
+    * this list of conditions and the following disclaimer in the documentation
+    * and/or other materials provided with the distribution.
+
+    * Neither the name of Intel Corporation nor the names of its contributors
+    * may be used to endorse or promote products derived from this software
+    * without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2011, Intel Corporation
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+    * this list of conditions and the following disclaimer.
+
+    * Redistributions in binary form must reproduce the above copyright notice,
+    * this list of conditions and the following disclaimer in the documentation
+    * and/or other materials provided with the distribution.
+
+    * Neither the name of Intel Corporation nor the names of its contributors
+    * may be used to endorse or promote products derived from this software
+    * without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2011, VMware, Inc.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+    * Redistributions of source code must retain the above copyright
+      notice, this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+    * Neither the name of the VMware, Inc. nor the names of its contributors
+      may be used to endorse or promote products derived from this software
+      without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL VMWARE, INC. OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2012, Linaro Limited
+   All rights reserved.
+
+   Redistribution and use in source and binary forms, with or without
+   modification, are permitted provided that the following conditions are met:
+       * Redistributions of source code must retain the above copyright
+         notice, this list of conditions and the following disclaimer.
+       * Redistributions in binary form must reproduce the above copyright
+         notice, this list of conditions and the following disclaimer in the
+         documentation and/or other materials provided with the distribution.
+       * Neither the name of the Linaro nor the
+         names of its contributors may be used to endorse or promote products
+         derived from this software without specific prior written permission.
+
+   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+   HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2012, Linaro Limited
+   All rights reserved.
+   Copyright (c) 2014, NVIDIA Corporation.  All rights reserved.
+
+   Redistribution and use in source and binary forms, with or without
+   modification, are permitted provided that the following conditions are met:
+       * Redistributions of source code must retain the above copyright
+         notice, this list of conditions and the following disclaimer.
+       * Redistributions in binary form must reproduce the above copyright
+         notice, this list of conditions and the following disclaimer in the
+         documentation and/or other materials provided with the distribution.
+       * Neither the name of the Linaro nor the
+         names of its contributors may be used to endorse or promote products
+         derived from this software without specific prior written permission.
+
+   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+   HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2012-2015
+     MIPS Technologies, Inc., California.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. Neither the name of the MIPS Technologies, Inc., nor the names of its
+   contributors may be used to endorse or promote products derived from
+   this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE MIPS TECHNOLOGIES, INC. ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE MIPS TECHNOLOGIES, INC. BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2013
+     MIPS Technologies, Inc., California.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. Neither the name of the MIPS Technologies, Inc., nor the names of its
+   contributors may be used to endorse or promote products derived from
+   this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE MIPS TECHNOLOGIES, INC. ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE MIPS TECHNOLOGIES, INC. BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2013 ARM Ltd
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. The name of the company may not be used to endorse or promote
+   products derived from this software without specific prior written
+   permission.
+
+THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2013 Antoine Jacoutot <ajacoutot@openbsd.org>
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2013 The NetBSD Foundation, Inc.
+All rights reserved.
+
+This code is derived from software contributed to The NetBSD Foundation
+by Christos Zoulas.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2014
+     Imagination Technologies Limited.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. Neither the name of the MIPS Technologies, Inc., nor the names of its
+   contributors may be used to endorse or promote products derived from
+   this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY IMAGINATION TECHNOLOGIES LIMITED ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL IMAGINATION TECHNOLOGIES LIMITED BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2014 Theo de Raadt <deraadt@openbsd.org>
+Copyright (c) 2014 Bob Beck <beck@obtuse.com>
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+Emulation of getentropy(2) as documented at:
+http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man2/getentropy.2
+
+-------------------------------------------------------------------
+
+Copyright (c) 2014, Intel Corporation
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+    * this list of conditions and the following disclaimer.
+
+    * Redistributions in binary form must reproduce the above copyright notice,
+    * this list of conditions and the following disclaimer in the documentation
+    * and/or other materials provided with the distribution.
+
+    * Neither the name of Intel Corporation nor the names of its contributors
+    * may be used to endorse or promote products derived from this software
+    * without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c) 2014, Linaro Limited
+   All rights reserved.
+
+   Redistribution and use in source and binary forms, with or without
+   modification, are permitted provided that the following conditions are met:
+       * Redistributions of source code must retain the above copyright
+         notice, this list of conditions and the following disclaimer.
+       * Redistributions in binary form must reproduce the above copyright
+         notice, this list of conditions and the following disclaimer in the
+         documentation and/or other materials provided with the distribution.
+       * Neither the name of the Linaro nor the
+         names of its contributors may be used to endorse or promote products
+         derived from this software without specific prior written permission.
+
+   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+   HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c)1999 Citrus Project,
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c)1999, 2000, 2001 Citrus Project,
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c)2001 Citrus Project,
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright (c)2003 Citrus Project,
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright 1997 Niels Provos <provos@physnet.uni-hamburg.de>
+Copyright 2008 Damien Miller <djm@openbsd.org>
+All rights reserved.
+
+Theo de Raadt <deraadt@openbsd.org> came up with the idea of using
+such a mathematical system to generate more random (yet non-repeating)
+ids to solve the resolver/named problem.  But Niels designed the
+actual system based on the constraints.
+
+Later modified by Damien Miller to wrap the LCG output in a 15-bit
+permutation generator based on a Luby-Rackoff block cipher. This
+ensures the output is non-repeating and preserves the MSB twiddle
+trick, but makes it more resistant to LCG prediction.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Copyright 2008  Android Open Source Project (source port randomization)
+Copyright (c) 1985, 1989, 1993
+   The Regents of the University of California.  All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. All advertising materials mentioning features or use of this software
+   must display the following acknowledgement:
+    This product includes software developed by the University of
+    California, Berkeley and its contributors.
+4. Neither the name of the University nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+Portions Copyright (C) 2004, 2005, 2008, 2009  Internet Systems Consortium, Inc. ("ISC")
+Portions Copyright (C) 1996-2003  Internet Software Consortium.
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
+
+-------------------------------------------------------------------
+
+Portions Copyright (c) 1993 by Digital Equipment Corporation.
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies, and that
+the name of Digital Equipment Corporation not be used in advertising or
+publicity pertaining to distribution of the document or software without
+specific, written prior permission.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
+WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS.   IN NO EVENT SHALL DIGITAL EQUIPMENT
+CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+-------------------------------------------------------------------
+
+Portions Copyright (c) 1995 by International Business Machines, Inc.
+
+International Business Machines, Inc. (hereinafter called IBM) grants
+permission under its copyrights to use, copy, modify, and distribute this
+Software with or without fee, provided that the above copyright notice and
+all paragraphs of this notice appear in all copies, and that the name of IBM
+not be used in connection with the marketing of any product incorporating
+the Software or modifications thereof, without specific, written prior
+permission.
+
+To the extent it has a right to do so, IBM grants an immunity from suit
+under its patents, if any, for the use, sale or manufacture of products to
+the extent that such products are used for performing Domain Name System
+dynamic updates in TCP/IP networks by means of the Software.  No immunity is
+granted for any product per se or for any other function of any product.
+
+THE SOFTWARE IS PROVIDED "AS IS", AND IBM DISCLAIMS ALL WARRANTIES,
+INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE.  IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL,
+DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ARISING
+OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE, EVEN
+IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+-------------------------------------------------------------------
+
+Portions Copyright(C) 1995, Jason Downs.  All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS
+OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
+The author of this software is David M. Gay.
+
+Copyright (C) 1998 by Lucent Technologies
+All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and
+its documentation for any purpose and without fee is hereby
+granted, provided that the above copyright notice appear in all
+copies and that both that the copyright notice and this
+permission notice and warranty disclaimer appear in supporting
+documentation, and that the name of Lucent or any of its entities
+not be used in advertising or publicity pertaining to
+distribution of the software without specific, written prior
+permission.
+
+LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
+IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY
+SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
+IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
+THIS SOFTWARE.
+
+-------------------------------------------------------------------
+
+The author of this software is David M. Gay.
+
+Copyright (C) 1998, 1999 by Lucent Technologies
+All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and
+its documentation for any purpose and without fee is hereby
+granted, provided that the above copyright notice appear in all
+copies and that both that the copyright notice and this
+permission notice and warranty disclaimer appear in supporting
+documentation, and that the name of Lucent or any of its entities
+not be used in advertising or publicity pertaining to
+distribution of the software without specific, written prior
+permission.
+
+LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
+IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY
+SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
+IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
+THIS SOFTWARE.
+
+-------------------------------------------------------------------
+
+The author of this software is David M. Gay.
+
+Copyright (C) 1998, 2000 by Lucent Technologies
+All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and
+its documentation for any purpose and without fee is hereby
+granted, provided that the above copyright notice appear in all
+copies and that both that the copyright notice and this
+permission notice and warranty disclaimer appear in supporting
+documentation, and that the name of Lucent or any of its entities
+not be used in advertising or publicity pertaining to
+distribution of the software without specific, written prior
+permission.
+
+LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
+IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY
+SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
+IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
+THIS SOFTWARE.
+
+-------------------------------------------------------------------
+
+The author of this software is David M. Gay.
+
+Copyright (C) 1998-2000 by Lucent Technologies
+All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and
+its documentation for any purpose and without fee is hereby
+granted, provided that the above copyright notice appear in all
+copies and that both that the copyright notice and this
+permission notice and warranty disclaimer appear in supporting
+documentation, and that the name of Lucent or any of its entities
+not be used in advertising or publicity pertaining to
+distribution of the software without specific, written prior
+permission.
+
+LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
+IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY
+SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
+IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
+THIS SOFTWARE.
+
+-------------------------------------------------------------------
+
+The author of this software is David M. Gay.
+
+Copyright (C) 1998-2001 by Lucent Technologies
+All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and
+its documentation for any purpose and without fee is hereby
+granted, provided that the above copyright notice appear in all
+copies and that both that the copyright notice and this
+permission notice and warranty disclaimer appear in supporting
+documentation, and that the name of Lucent or any of its entities
+not be used in advertising or publicity pertaining to
+distribution of the software without specific, written prior
+permission.
+
+LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
+IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY
+SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
+IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
+THIS SOFTWARE.
+
+-------------------------------------------------------------------
+
+The author of this software is David M. Gay.
+
+Copyright (C) 2000 by Lucent Technologies
+All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and
+its documentation for any purpose and without fee is hereby
+granted, provided that the above copyright notice appear in all
+copies and that both that the copyright notice and this
+permission notice and warranty disclaimer appear in supporting
+documentation, and that the name of Lucent or any of its entities
+not be used in advertising or publicity pertaining to
+distribution of the software without specific, written prior
+permission.
+
+LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
+IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY
+SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
+IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
+THIS SOFTWARE.
+
+-------------------------------------------------------------------
+
+memchr - find a character in a memory zone
+
+Copyright (c) 2014, ARM Limited
+All rights Reserved.
+Copyright (c) 2014, Linaro Ltd.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+    * Redistributions of source code must retain the above copyright
+      notice, this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+    * Neither the name of the company nor the names of its contributors
+      may be used to endorse or promote products derived from this
+      software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+-------------------------------------------------------------------
+
diff --git a/chromeos/third_party/android_bionic_libc/README.chromium b/chromeos/third_party/android_bionic_libc/README.chromium
new file mode 100644
index 0000000..a1883bde
--- /dev/null
+++ b/chromeos/third_party/android_bionic_libc/README.chromium
@@ -0,0 +1,14 @@
+Name: Android bionic libc
+Short Name: libc_bionic
+URL: https://android.googlesource.com/platform/bionic/+/master/libc/
+Version: 0
+Revision: 299798fe02cd43c21e62352f11d7be30d85e0f96
+License: BSD
+License File: NOTICE
+Security Critical: yes
+
+Description:
+Contains binder.h header file which is needed to let the chrome on Chrome OS talk with binder services.
+
+Local Modifications:
+NOTICE and kernel/uapi/linux/binder.h were copied from the repository to this directory without any modifications.
\ No newline at end of file
diff --git a/chromeos/third_party/android_bionic_libc/kernel/uapi/linux/binder.h b/chromeos/third_party/android_bionic_libc/kernel/uapi/linux/binder.h
new file mode 100644
index 0000000..af3cea9
--- /dev/null
+++ b/chromeos/third_party/android_bionic_libc/kernel/uapi/linux/binder.h
@@ -0,0 +1,190 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ ***   This header was automatically generated from a Linux kernel header
+ ***   of the same name, to make information necessary for userspace to
+ ***   call into the kernel available to libc.  It contains only constants,
+ ***   structures, and macros generated from the original header, and thus,
+ ***   contains no copyrightable information.
+ ***
+ ***   To edit the content of this header, modify the corresponding
+ ***   source file (e.g. under external/kernel-headers/original/) then
+ ***   run bionic/libc/kernel/tools/update_all.py
+ ***
+ ***   Any manual change here will be lost the next time this script will
+ ***   be run. You've been warned!
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef _UAPI_LINUX_BINDER_H
+#define _UAPI_LINUX_BINDER_H
+#include <linux/ioctl.h>
+#define B_PACK_CHARS(c1,c2,c3,c4) ((((c1) << 24)) | (((c2) << 16)) | (((c3) << 8)) | (c4))
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+#define B_TYPE_LARGE 0x85
+enum {
+  BINDER_TYPE_BINDER = B_PACK_CHARS('s', 'b', '*', B_TYPE_LARGE),
+  BINDER_TYPE_WEAK_BINDER = B_PACK_CHARS('w', 'b', '*', B_TYPE_LARGE),
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+  BINDER_TYPE_HANDLE = B_PACK_CHARS('s', 'h', '*', B_TYPE_LARGE),
+  BINDER_TYPE_WEAK_HANDLE = B_PACK_CHARS('w', 'h', '*', B_TYPE_LARGE),
+  BINDER_TYPE_FD = B_PACK_CHARS('f', 'd', '*', B_TYPE_LARGE),
+};
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+enum {
+  FLAT_BINDER_FLAG_PRIORITY_MASK = 0xff,
+  FLAT_BINDER_FLAG_ACCEPTS_FDS = 0x100,
+};
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+#ifdef BINDER_IPC_32BIT
+typedef __u32 binder_size_t;
+typedef __u32 binder_uintptr_t;
+#else
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+typedef __u64 binder_size_t;
+typedef __u64 binder_uintptr_t;
+#endif
+struct flat_binder_object {
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+  __u32 type;
+  __u32 flags;
+  union {
+    binder_uintptr_t binder;
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+    __u32 handle;
+  };
+  binder_uintptr_t cookie;
+};
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+struct binder_write_read {
+  binder_size_t write_size;
+  binder_size_t write_consumed;
+  binder_uintptr_t write_buffer;
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+  binder_size_t read_size;
+  binder_size_t read_consumed;
+  binder_uintptr_t read_buffer;
+};
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+struct binder_version {
+  __s32 protocol_version;
+};
+#ifdef BINDER_IPC_32BIT
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+#define BINDER_CURRENT_PROTOCOL_VERSION 7
+#else
+#define BINDER_CURRENT_PROTOCOL_VERSION 8
+#endif
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+#define BINDER_WRITE_READ _IOWR('b', 1, struct binder_write_read)
+#define BINDER_SET_IDLE_TIMEOUT _IOW('b', 3, __s64)
+#define BINDER_SET_MAX_THREADS _IOW('b', 5, __u32)
+#define BINDER_SET_IDLE_PRIORITY _IOW('b', 6, __s32)
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+#define BINDER_SET_CONTEXT_MGR _IOW('b', 7, __s32)
+#define BINDER_THREAD_EXIT _IOW('b', 8, __s32)
+#define BINDER_VERSION _IOWR('b', 9, struct binder_version)
+enum transaction_flags {
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+  TF_ONE_WAY = 0x01,
+  TF_ROOT_OBJECT = 0x04,
+  TF_STATUS_CODE = 0x08,
+  TF_ACCEPT_FDS = 0x10,
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+};
+struct binder_transaction_data {
+  union {
+    __u32 handle;
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+    binder_uintptr_t ptr;
+  } target;
+  binder_uintptr_t cookie;
+  __u32 code;
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+  __u32 flags;
+  pid_t sender_pid;
+  uid_t sender_euid;
+  binder_size_t data_size;
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+  binder_size_t offsets_size;
+  union {
+    struct {
+      binder_uintptr_t buffer;
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+      binder_uintptr_t offsets;
+    } ptr;
+    __u8 buf[8];
+  } data;
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+};
+struct binder_ptr_cookie {
+  binder_uintptr_t ptr;
+  binder_uintptr_t cookie;
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+};
+struct binder_handle_cookie {
+  __u32 handle;
+  binder_uintptr_t cookie;
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+} __packed;
+struct binder_pri_desc {
+  __s32 priority;
+  __u32 desc;
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+};
+struct binder_pri_ptr_cookie {
+  __s32 priority;
+  binder_uintptr_t ptr;
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+  binder_uintptr_t cookie;
+};
+enum binder_driver_return_protocol {
+  BR_ERROR = _IOR('r', 0, __s32),
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+  BR_OK = _IO('r', 1),
+  BR_TRANSACTION = _IOR('r', 2, struct binder_transaction_data),
+  BR_REPLY = _IOR('r', 3, struct binder_transaction_data),
+  BR_ACQUIRE_RESULT = _IOR('r', 4, __s32),
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+  BR_DEAD_REPLY = _IO('r', 5),
+  BR_TRANSACTION_COMPLETE = _IO('r', 6),
+  BR_INCREFS = _IOR('r', 7, struct binder_ptr_cookie),
+  BR_ACQUIRE = _IOR('r', 8, struct binder_ptr_cookie),
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+  BR_RELEASE = _IOR('r', 9, struct binder_ptr_cookie),
+  BR_DECREFS = _IOR('r', 10, struct binder_ptr_cookie),
+  BR_ATTEMPT_ACQUIRE = _IOR('r', 11, struct binder_pri_ptr_cookie),
+  BR_NOOP = _IO('r', 12),
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+  BR_SPAWN_LOOPER = _IO('r', 13),
+  BR_FINISHED = _IO('r', 14),
+  BR_DEAD_BINDER = _IOR('r', 15, binder_uintptr_t),
+  BR_CLEAR_DEATH_NOTIFICATION_DONE = _IOR('r', 16, binder_uintptr_t),
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+  BR_FAILED_REPLY = _IO('r', 17),
+};
+enum binder_driver_command_protocol {
+  BC_TRANSACTION = _IOW('c', 0, struct binder_transaction_data),
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+  BC_REPLY = _IOW('c', 1, struct binder_transaction_data),
+  BC_ACQUIRE_RESULT = _IOW('c', 2, __s32),
+  BC_FREE_BUFFER = _IOW('c', 3, binder_uintptr_t),
+  BC_INCREFS = _IOW('c', 4, __u32),
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+  BC_ACQUIRE = _IOW('c', 5, __u32),
+  BC_RELEASE = _IOW('c', 6, __u32),
+  BC_DECREFS = _IOW('c', 7, __u32),
+  BC_INCREFS_DONE = _IOW('c', 8, struct binder_ptr_cookie),
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+  BC_ACQUIRE_DONE = _IOW('c', 9, struct binder_ptr_cookie),
+  BC_ATTEMPT_ACQUIRE = _IOW('c', 10, struct binder_pri_desc),
+  BC_REGISTER_LOOPER = _IO('c', 11),
+  BC_ENTER_LOOPER = _IO('c', 12),
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+  BC_EXIT_LOOPER = _IO('c', 13),
+  BC_REQUEST_DEATH_NOTIFICATION = _IOW('c', 14, struct binder_handle_cookie),
+  BC_CLEAR_DEATH_NOTIFICATION = _IOW('c', 15, struct binder_handle_cookie),
+  BC_DEAD_BINDER_DONE = _IOW('c', 16, binder_uintptr_t),
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+};
+#endif
diff --git a/components/font_service/font_service_app.h b/components/font_service/font_service_app.h
index 35fb0356..29637203 100644
--- a/components/font_service/font_service_app.h
+++ b/components/font_service/font_service_app.h
@@ -10,7 +10,7 @@
 
 #include "base/macros.h"
 #include "components/font_service/public/interfaces/font_service.mojom.h"
-#include "mojo/public/cpp/bindings/weak_binding_set.h"
+#include "mojo/public/cpp/bindings/binding_set.h"
 #include "mojo/services/tracing/public/cpp/tracing_impl.h"
 #include "mojo/shell/public/cpp/interface_factory.h"
 #include "mojo/shell/public/cpp/shell_client.h"
@@ -44,7 +44,7 @@
 
   int FindOrAddPath(const SkString& path);
 
-  mojo::WeakBindingSet<FontService> bindings_;
+  mojo::BindingSet<FontService> bindings_;
 
   mojo::TracingImpl tracing_;
 
diff --git a/components/leveldb/leveldb_app.h b/components/leveldb/leveldb_app.h
index 4de6486b..d1cd684 100644
--- a/components/leveldb/leveldb_app.h
+++ b/components/leveldb/leveldb_app.h
@@ -6,7 +6,7 @@
 #define COMPONENTS_LEVELDB_LEVELDB_APP_H_
 
 #include "components/leveldb/public/interfaces/leveldb.mojom.h"
-#include "mojo/public/cpp/bindings/weak_binding_set.h"
+#include "mojo/public/cpp/bindings/binding_set.h"
 #include "mojo/services/tracing/public/cpp/tracing_impl.h"
 #include "mojo/shell/public/cpp/interface_factory.h"
 #include "mojo/shell/public/cpp/shell_client.h"
@@ -36,7 +36,7 @@
 
   mojo::TracingImpl tracing_;
   scoped_ptr<LevelDBService> service_;
-  mojo::WeakBindingSet<LevelDBService> bindings_;
+  mojo::BindingSet<LevelDBService> bindings_;
 
   DISALLOW_COPY_AND_ASSIGN(LevelDBApp);
 };
diff --git a/components/leveldb/leveldb_apptest.cc b/components/leveldb/leveldb_apptest.cc
index d9e443c..076e9f7 100644
--- a/components/leveldb/leveldb_apptest.cc
+++ b/components/leveldb/leveldb_apptest.cc
@@ -8,7 +8,7 @@
 #include "components/filesystem/public/interfaces/types.mojom.h"
 #include "components/leveldb/public/interfaces/leveldb.mojom.h"
 #include "mojo/common/common_type_converters.h"
-#include "mojo/public/cpp/bindings/weak_binding_set.h"
+#include "mojo/public/cpp/bindings/binding_set.h"
 #include "mojo/shell/public/cpp/application_test_base.h"
 #include "mojo/shell/public/cpp/shell_connection.h"
 #include "mojo/util/capture_util.h"
diff --git a/components/mus/mus_app.h b/components/mus/mus_app.h
index c058c5f..5a349c5 100644
--- a/components/mus/mus_app.h
+++ b/components/mus/mus_app.h
@@ -18,7 +18,7 @@
 #include "components/mus/public/interfaces/window_tree.mojom.h"
 #include "components/mus/public/interfaces/window_tree_host.mojom.h"
 #include "components/mus/ws/connection_manager_delegate.h"
-#include "mojo/public/cpp/bindings/weak_binding_set.h"
+#include "mojo/public/cpp/bindings/binding_set.h"
 #include "mojo/services/tracing/public/cpp/tracing_impl.h"
 #include "mojo/shell/public/cpp/interface_factory.h"
 #include "mojo/shell/public/cpp/shell_client.h"
@@ -104,7 +104,7 @@
   void CreateWindowTreeHost(mojo::InterfaceRequest<mojom::WindowTreeHost> host,
                             mojom::WindowTreeClientPtr tree_client) override;
 
-  mojo::WeakBindingSet<mojom::WindowTreeHostFactory> factory_bindings_;
+  mojo::BindingSet<mojom::WindowTreeHostFactory> factory_bindings_;
   mojo::Shell* shell_;
   scoped_ptr<ws::ConnectionManager> connection_manager_;
   scoped_refptr<GpuState> gpu_state_;
diff --git a/components/mus/ws/connection_manager.h b/components/mus/ws/connection_manager.h
index 7266aa1f0f..94b4afd 100644
--- a/components/mus/ws/connection_manager.h
+++ b/components/mus/ws/connection_manager.h
@@ -27,8 +27,8 @@
 #include "mojo/converters/surfaces/custom_surface_converter.h"
 #include "mojo/public/cpp/bindings/array.h"
 #include "mojo/public/cpp/bindings/binding.h"
-#include "mojo/public/cpp/bindings/weak_binding_set.h"
-#include "mojo/public/cpp/bindings/weak_interface_ptr_set.h"
+#include "mojo/public/cpp/bindings/binding_set.h"
+#include "mojo/public/cpp/bindings/interface_ptr_set.h"
 
 namespace mus {
 namespace ws {
@@ -319,10 +319,10 @@
   // Next id supplied to the window manager.
   uint32_t next_wm_change_id_;
 
-  mojo::WeakBindingSet<mojom::DisplayManager> display_manager_bindings_;
+  mojo::BindingSet<mojom::DisplayManager> display_manager_bindings_;
   // WARNING: only use these once |got_valid_frame_decorations_| is true.
   // TODO(sky): refactor this out into its own class.
-  mojo::WeakInterfacePtrSet<mojom::DisplayManagerObserver>
+  mojo::InterfacePtrSet<mojom::DisplayManagerObserver>
       display_manager_observers_;
 
   bool got_valid_frame_decorations_;
diff --git a/components/mus/ws/window_tree_factory.h b/components/mus/ws/window_tree_factory.h
index 859a810..e0569c0 100644
--- a/components/mus/ws/window_tree_factory.h
+++ b/components/mus/ws/window_tree_factory.h
@@ -7,7 +7,7 @@
 
 #include "base/macros.h"
 #include "components/mus/public/interfaces/window_tree.mojom.h"
-#include "mojo/public/cpp/bindings/weak_binding_set.h"
+#include "mojo/public/cpp/bindings/binding_set.h"
 
 namespace mus {
 namespace ws {
@@ -29,7 +29,7 @@
  private:
   ConnectionManager* connection_manager_;
 
-  mojo::WeakBindingSet<mus::mojom::WindowTreeFactory> binding_;
+  mojo::BindingSet<mus::mojom::WindowTreeFactory> binding_;
 
   DISALLOW_COPY_AND_ASSIGN(WindowTreeFactory);
 };
diff --git a/components/offline_pages/offline_page_metadata_store_impl.cc b/components/offline_pages/offline_page_metadata_store_impl.cc
index 5262063..9bf836d 100644
--- a/components/offline_pages/offline_page_metadata_store_impl.cc
+++ b/components/offline_pages/offline_page_metadata_store_impl.cc
@@ -145,18 +145,23 @@
   if (success) {
     for (const auto& entry : *entries) {
       OfflinePageItem item;
+      // We don't want to fail the entire database if one item is corrupt,
+      // so log error and keep going.
       if (!OfflinePageItemFromEntry(entry, &item)) {
-        status = DATA_PARSING_FAILED;
-        result.clear();
-        break;
+        LOG(ERROR) << "failed to parse entry: " << entry.url() << " skipping.";
+        continue;
       }
       result.push_back(item);
     }
-
   } else {
     status = STORE_LOAD_FAILED;
   }
 
+  // If we couldn't load _anything_ report a parse failure.
+  if (entries->size() > 0 && result.size() == 0) {
+    status = DATA_PARSING_FAILED;
+  }
+
   NotifyLoadResult(callback, status, result);
 }
 
diff --git a/components/offline_pages/offline_page_metadata_store_impl.h b/components/offline_pages/offline_page_metadata_store_impl.h
index f5476f7..f9248c6 100644
--- a/components/offline_pages/offline_page_metadata_store_impl.h
+++ b/components/offline_pages/offline_page_metadata_store_impl.h
@@ -10,6 +10,7 @@
 #include <vector>
 
 #include "base/files/file_path.h"
+#include "base/gtest_prod_util.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/weak_ptr.h"
@@ -24,7 +25,7 @@
 
 class OfflinePageEntry;
 
-// Implements OfflinePageMetadataStore using leveldb_proto::ProtoDatabase
+// Implements OfflinePageMetadataStore using leveldb_proto::Protoatabase
 // component. Stores metadata of offline pages as serialized protobufs in a
 // LevelDB key/value pairs.
 // Underlying implementation guarantees that all of the method calls will be
@@ -60,6 +61,7 @@
           entries_to_save,
       scoped_ptr<std::vector<std::string>> keys_to_remove,
       const UpdateCallback& callback);
+
   void UpdateDone(const OfflinePageMetadataStore::UpdateCallback& callback,
                   bool success);
 
@@ -71,6 +73,11 @@
 
   base::WeakPtrFactory<OfflinePageMetadataStoreImpl> weak_ptr_factory_;
 
+  FRIEND_TEST_ALL_PREFIXES(OfflinePageMetadataStoreImplTest,
+                           LoadCorruptedStore);
+  FRIEND_TEST_ALL_PREFIXES(OfflinePageMetadataStoreImplTest,
+                           LoadTotallyCorruptedStore);
+
   DISALLOW_COPY_AND_ASSIGN(OfflinePageMetadataStoreImpl);
 };
 
diff --git a/components/offline_pages/offline_page_metadata_store_impl_unittest.cc b/components/offline_pages/offline_page_metadata_store_impl_unittest.cc
index 412ae2a8..dd40bbf8 100644
--- a/components/offline_pages/offline_page_metadata_store_impl_unittest.cc
+++ b/components/offline_pages/offline_page_metadata_store_impl_unittest.cc
@@ -347,4 +347,99 @@
 
 }  // namespace
 
+// Test that loading a store with a bad value still loads.
+// Needs to be outside of the anonymous namespace in order for FRIEND_TEST
+// to work.
+TEST_F(OfflinePageMetadataStoreImplTest, LoadCorruptedStore) {
+  scoped_ptr<OfflinePageMetadataStoreImpl> store(BuildStore());
+
+  // Write one ok page.
+  OfflinePageItem offline_page(GURL(kTestURL), kTestBookmarkId,
+                               base::FilePath(kFilePath), kFileSize);
+  store->AddOrUpdateOfflinePage(
+      offline_page,
+      base::Bind(&OfflinePageMetadataStoreImplTest::UpdateCallback,
+                 base::Unretained(this), ADD));
+  PumpLoop();
+  EXPECT_EQ(ADD, last_called_callback_);
+  EXPECT_EQ(STATUS_TRUE, last_status_);
+
+  // Manually write one broken page (no id)
+  scoped_ptr<leveldb_proto::ProtoDatabase<OfflinePageEntry>::KeyEntryVector>
+      entries_to_save(
+          new leveldb_proto::ProtoDatabase<OfflinePageEntry>::KeyEntryVector());
+  scoped_ptr<std::vector<std::string>> keys_to_remove(
+      new std::vector<std::string>());
+
+  OfflinePageEntry offline_page_proto;
+  entries_to_save->push_back(std::make_pair("0", offline_page_proto));
+
+  store->UpdateEntries(
+      std::move(entries_to_save), std::move(keys_to_remove),
+      base::Bind(&OfflinePageMetadataStoreImplTest::UpdateCallback,
+                 base::Unretained(this), ADD));
+  PumpLoop();
+
+  EXPECT_EQ(ADD, last_called_callback_);
+  EXPECT_EQ(STATUS_TRUE, last_status_);
+
+  ClearResults();
+
+  // Close the store first to ensure file lock is removed.
+  store.reset();
+  store = BuildStore();
+  PumpLoop();
+
+  // One of the pages was busted, so only expect one page.
+  EXPECT_EQ(LOAD, last_called_callback_);
+  EXPECT_EQ(STATUS_TRUE, last_status_);
+  EXPECT_EQ(1U, offline_pages_.size());
+  EXPECT_EQ(offline_page.url, offline_pages_[0].url);
+  EXPECT_EQ(offline_page.bookmark_id, offline_pages_[0].bookmark_id);
+  EXPECT_EQ(offline_page.version, offline_pages_[0].version);
+  EXPECT_EQ(offline_page.file_path, offline_pages_[0].file_path);
+  EXPECT_EQ(offline_page.file_size, offline_pages_[0].file_size);
+  EXPECT_EQ(offline_page.creation_time, offline_pages_[0].creation_time);
+  EXPECT_EQ(offline_page.last_access_time, offline_pages_[0].last_access_time);
+  EXPECT_EQ(offline_page.access_count, offline_pages_[0].access_count);
+}
+
+// Test that loading a store with nothing but bad values errors.
+// Needs to be outside of the anonymous namespace in order for FRIEND_TEST
+// to work.
+TEST_F(OfflinePageMetadataStoreImplTest, LoadTotallyCorruptedStore) {
+  scoped_ptr<OfflinePageMetadataStoreImpl> store(BuildStore());
+
+  // Manually write two broken pages (no id)
+  scoped_ptr<leveldb_proto::ProtoDatabase<OfflinePageEntry>::KeyEntryVector>
+      entries_to_save(
+          new leveldb_proto::ProtoDatabase<OfflinePageEntry>::KeyEntryVector());
+  scoped_ptr<std::vector<std::string>> keys_to_remove(
+      new std::vector<std::string>());
+
+  OfflinePageEntry offline_page_proto;
+  entries_to_save->push_back(std::make_pair("0", offline_page_proto));
+  entries_to_save->push_back(std::make_pair("1", offline_page_proto));
+
+  store->UpdateEntries(
+      std::move(entries_to_save), std::move(keys_to_remove),
+      base::Bind(&OfflinePageMetadataStoreImplTest::UpdateCallback,
+                 base::Unretained(this), ADD));
+  PumpLoop();
+
+  EXPECT_EQ(ADD, last_called_callback_);
+  EXPECT_EQ(STATUS_TRUE, last_status_);
+
+  ClearResults();
+
+  // Close the store first to ensure file lock is removed.
+  store.reset();
+  store = BuildStore();
+  PumpLoop();
+
+  // One of the pages was busted, so only expect one page.
+  EXPECT_EQ(LOAD, last_called_callback_);
+  EXPECT_EQ(STATUS_FALSE, last_status_);
+}
+
 }  // namespace offline_pages
diff --git a/components/offline_pages/proto/offline_pages.proto b/components/offline_pages/proto/offline_pages.proto
index aeab8b0..17d46c2d 100644
--- a/components/offline_pages/proto/offline_pages.proto
+++ b/components/offline_pages/proto/offline_pages.proto
@@ -14,16 +14,16 @@
 
 message OfflinePageEntry {
   // URL of the offline page.
-  required string url = 1;
+  optional string url = 1;
 
   // Bookmark ID of the offline page.
-  required int64 bookmark_id = 2;
+  optional int64 bookmark_id = 2;
 
   // Version of the offline page metadata.
-  required int32 version = 3;
+  optional int32 version = 3;
 
   // Path to the offline archive.
-  required string file_path = 4;
+  optional string file_path = 4;
 
   // Size of the offline archive.
   optional int64 file_size = 5;
diff --git a/components/password_manager/core/browser/password_bubble_experiment.cc b/components/password_manager/core/browser/password_bubble_experiment.cc
index 8b5f796..0dfd8f42 100644
--- a/components/password_manager/core/browser/password_bubble_experiment.cc
+++ b/components/password_manager/core/browser/password_bubble_experiment.cc
@@ -53,7 +53,7 @@
   if (group_name == kSmartLockBrandingGroupName)
     return SmartLockBranding::FULL;
   if (group_name == kSmartLockBrandingSavePromptOnlyGroupName)
-    return SmartLockBranding::SAVE_BUBBLE_ONLY;
+    return SmartLockBranding::SAVE_PROMPT_ONLY;
   return SmartLockBranding::NONE;
 }
 
@@ -61,6 +61,11 @@
   return GetSmartLockBrandingState(sync_service) == SmartLockBranding::FULL;
 }
 
+bool IsSmartLockBrandingSavePromptEnabled(
+    const sync_driver::SyncService* sync_service) {
+  return GetSmartLockBrandingState(sync_service) != SmartLockBranding::NONE;
+}
+
 bool ShouldShowSavePromptFirstRunExperience(
     const sync_driver::SyncService* sync_service,
     PrefService* prefs) {
diff --git a/components/password_manager/core/browser/password_bubble_experiment.h b/components/password_manager/core/browser/password_bubble_experiment.h
index 91f6e91..24877bb 100644
--- a/components/password_manager/core/browser/password_bubble_experiment.h
+++ b/components/password_manager/core/browser/password_bubble_experiment.h
@@ -32,13 +32,13 @@
 // A Smart Lock user is a sync user without a custom passphrase.
 bool IsSmartLockUser(const sync_driver::SyncService* sync_service);
 
-enum class SmartLockBranding { NONE, FULL, SAVE_BUBBLE_ONLY };
+enum class SmartLockBranding { NONE, FULL, SAVE_PROMPT_ONLY };
 
 // If the user is not a Smart Lock user, returns NONE. For Smart Lock users:
 // * returns NONE if the password manager should not be referred to as Smart
 //   Lock anywhere;
 // * returns FULL, if it should be referred to as Smart Lock everywhere;
-// * returns SAVE_BUBBLE_ONLY if it only should be referred to as Smart Lock in
+// * returns SAVE_PROMPT_ONLY if it only should be referred to as Smart Lock in
 //   the save password bubble.
 SmartLockBranding GetSmartLockBrandingState(
     const sync_driver::SyncService* sync_service);
@@ -47,6 +47,11 @@
 // GetSmartLockBrandingState is SmartLockBranding::FULL.
 bool IsSmartLockBrandingEnabled(const sync_driver::SyncService* sync_service);
 
+// Convenience function for checking whether the result of
+// GetSmartLockBrandingState is not equal to SmartLockBranding::NONE.
+bool IsSmartLockBrandingSavePromptEnabled(
+    const sync_driver::SyncService* sync_service);
+
 // Returns true if save prompt should contain first run experience.
 bool ShouldShowSavePromptFirstRunExperience(
     const sync_driver::SyncService* sync_service,
diff --git a/components/password_manager/core/browser/password_bubble_experiment_unittest.cc b/components/password_manager/core/browser/password_bubble_experiment_unittest.cc
index 4e21edb1..cf2c85a 100644
--- a/components/password_manager/core/browser/password_bubble_experiment_unittest.cc
+++ b/components/password_manager/core/browser/password_bubble_experiment_unittest.cc
@@ -47,8 +47,8 @@
     case SmartLockBranding::FULL:
       os << "FULL, ";
       break;
-    case SmartLockBranding::SAVE_BUBBLE_ONLY:
-      os << "SAVE_BUBBLE_ONLY, ";
+    case SmartLockBranding::SAVE_PROMPT_ONLY:
+      os << "SAVE_PROMPT_ONLY, ";
       break;
   }
   os << (testcase.expected_user_type == UserType::SMARTLOCK ? "SMARTLOCK}"
@@ -202,14 +202,14 @@
 }
 
 TEST_F(PasswordManagerPasswordBubbleExperimentTest,
-       IsSmartLockBrandingEnabledTest_SAVE_BUBBLE_ONLY) {
+       IsSmartLockBrandingEnabledTest_SAVE_PROMPT_ONLY) {
   const IsSmartLockBrandingEnabledTestcase kTestData[] = {
       {CustomPassphraseState::SET, syncer::PASSWORDS, SmartLockBranding::NONE,
        UserType::NOT_SMARTLOCK},
       {CustomPassphraseState::SET, syncer::BOOKMARKS, SmartLockBranding::NONE,
        UserType::NOT_SMARTLOCK},
       {CustomPassphraseState::NONE, syncer::PASSWORDS,
-       SmartLockBranding::SAVE_BUBBLE_ONLY, UserType::SMARTLOCK},
+       SmartLockBranding::SAVE_PROMPT_ONLY, UserType::SMARTLOCK},
       {CustomPassphraseState::NONE, syncer::BOOKMARKS, SmartLockBranding::NONE,
        UserType::NOT_SMARTLOCK},
   };
diff --git a/components/resource_provider/resource_provider_app.h b/components/resource_provider/resource_provider_app.h
index 4897d0c6..056c97f 100644
--- a/components/resource_provider/resource_provider_app.h
+++ b/components/resource_provider/resource_provider_app.h
@@ -10,7 +10,7 @@
 #include "base/macros.h"
 #include "components/resource_provider/public/interfaces/resource_provider.mojom.h"
 #include "mojo/public/cpp/bindings/binding.h"
-#include "mojo/public/cpp/bindings/weak_binding_set.h"
+#include "mojo/public/cpp/bindings/binding_set.h"
 #include "mojo/services/tracing/public/cpp/tracing_impl.h"
 #include "mojo/shell/public/cpp/interface_factory.h"
 #include "mojo/shell/public/cpp/shell_client.h"
@@ -39,7 +39,7 @@
 
   mojo::TracingImpl tracing_;
 
-  mojo::WeakBindingSet<ResourceProvider> bindings_;
+  mojo::BindingSet<ResourceProvider> bindings_;
 
   // The name of the app that the resource provider code lives in. When using
   // core services, it'll be the url of that. Otherwise it'll just be
diff --git a/content/browser/frame_host/frame_mojo_shell.cc b/content/browser/frame_host/frame_mojo_shell.cc
index ce43f2d5..633bf96 100644
--- a/content/browser/frame_host/frame_mojo_shell.cc
+++ b/content/browser/frame_host/frame_mojo_shell.cc
@@ -61,7 +61,6 @@
     uint32_t user_id,
     mojo::shell::mojom::InterfaceProviderRequest services,
     mojo::shell::mojom::InterfaceProviderPtr /* exposed_services */,
-    mojo::shell::mojom::CapabilityFilterPtr filter,
     const mojo::shell::mojom::Connector::ConnectCallback& callback) {
   // TODO(beng): user_id is dropped on the floor right now. Figure out what to
   //             do with it.
@@ -69,14 +68,10 @@
   service_provider_bindings_.AddBinding(GetServiceRegistry(),
                                         GetProxy(&frame_services));
 
-  mojo::shell::CapabilityFilter capability_filter =
-      mojo::shell::GetPermissiveCapabilityFilter();
-  if (!filter.is_null())
-    capability_filter = filter->filter.To<mojo::shell::CapabilityFilter>();
   MojoShellContext::ConnectToApplication(
       application_url.To<GURL>(),
       frame_host_->GetSiteInstance()->GetSiteURL(), std::move(services),
-      std::move(frame_services), capability_filter, callback);
+      std::move(frame_services), callback);
 }
 
 void FrameMojoShell::Clone(mojo::shell::mojom::ConnectorRequest request) {
diff --git a/content/browser/frame_host/frame_mojo_shell.h b/content/browser/frame_host/frame_mojo_shell.h
index 8870906..9893ae2f 100644
--- a/content/browser/frame_host/frame_mojo_shell.h
+++ b/content/browser/frame_host/frame_mojo_shell.h
@@ -7,8 +7,8 @@
 
 #include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
+#include "mojo/public/cpp/bindings/binding_set.h"
 #include "mojo/public/cpp/bindings/interface_request.h"
-#include "mojo/public/cpp/bindings/weak_binding_set.h"
 #include "mojo/shell/public/interfaces/shell.mojom.h"
 
 namespace content {
@@ -39,19 +39,18 @@
       uint32_t user_id,
       mojo::shell::mojom::InterfaceProviderRequest services,
       mojo::shell::mojom::InterfaceProviderPtr exposed_services,
-      mojo::shell::mojom::CapabilityFilterPtr filter,
       const mojo::shell::mojom::Connector::ConnectCallback& callback) override;
   void Clone(mojo::shell::mojom::ConnectorRequest request) override;
 
   ServiceRegistryImpl* GetServiceRegistry();
 
   RenderFrameHost* frame_host_;
-  mojo::WeakBindingSet<mojo::shell::mojom::Shell> bindings_;
-  mojo::WeakBindingSet<mojo::shell::mojom::Connector> connectors_;
+  mojo::BindingSet<mojo::shell::mojom::Shell> bindings_;
+  mojo::BindingSet<mojo::shell::mojom::Connector> connectors_;
 
   // ServiceRegistry providing browser services to connected applications.
   scoped_ptr<ServiceRegistryImpl> service_registry_;
-  mojo::WeakBindingSet<mojo::shell::mojom::InterfaceProvider>
+  mojo::BindingSet<mojo::shell::mojom::InterfaceProvider>
       service_provider_bindings_;
 
   DISALLOW_COPY_AND_ASSIGN(FrameMojoShell);
diff --git a/content/browser/frame_host/navigation_controller_impl.cc b/content/browser/frame_host/navigation_controller_impl.cc
index c08834bbf..1a200cc 100644
--- a/content/browser/frame_host/navigation_controller_impl.cc
+++ b/content/browser/frame_host/navigation_controller_impl.cc
@@ -76,7 +76,7 @@
 #include "content/public/browser/user_metrics.h"
 #include "content/public/common/content_client.h"
 #include "content/public/common/content_constants.h"
-#include "content/public/common/content_switches.h"
+#include "content/public/common/content_features.h"
 #include "media/base/mime_util.h"
 #include "net/base/escape.h"
 #include "skia/ext/platform_canvas.h"
@@ -287,8 +287,8 @@
   ReloadInternal(check_for_repost, RELOAD);
 }
 void NavigationControllerImpl::ReloadToRefreshContent(bool check_for_repost) {
-  if (base::CommandLine::ForCurrentProcess()->HasSwitch(
-          switches::kEnableNonValidatingReloadOnRefreshContent)) {
+  if (base::FeatureList::IsEnabled(
+        features::kNonValidatingReloadOnRefreshContent)) {
     // Cause this reload to behave like NAVIGATION_TYPE_SAME_PAGE (e.g., enter
     // in the omnibox), so that the main resource is cache-validated but all
     // other resources use the cache as much as possible.  This requires
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
index 188d17a..a6e002a 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -2265,7 +2265,7 @@
   web_ui_.reset();
 }
 
-const image_downloader::ImageDownloaderPtr&
+const content::mojom::ImageDownloaderPtr&
 RenderFrameHostImpl::GetMojoImageDownloader() {
   if (!mojo_image_downloader_.get() && GetServiceRegistry()) {
     GetServiceRegistry()->ConnectToRemoteService(
diff --git a/content/browser/frame_host/render_frame_host_impl.h b/content/browser/frame_host/render_frame_host_impl.h
index 5d255db..f2fefd97 100644
--- a/content/browser/frame_host/render_frame_host_impl.h
+++ b/content/browser/frame_host/render_frame_host_impl.h
@@ -535,7 +535,7 @@
   void ClearAllWebUI();
 
   // Returns the Mojo ImageDownloader service.
-  const image_downloader::ImageDownloaderPtr& GetMojoImageDownloader();
+  const content::mojom::ImageDownloaderPtr& GetMojoImageDownloader();
 
   // Resets the loading state. Following this call, the RenderFrameHost will be
   // in a non-loading state.
@@ -880,7 +880,7 @@
   scoped_ptr<FrameMojoShell> frame_mojo_shell_;
 
   // Holder of Mojo connection with ImageDownloader service in RenderFrame.
-  image_downloader::ImageDownloaderPtr mojo_image_downloader_;
+  content::mojom::ImageDownloaderPtr mojo_image_downloader_;
 
   // Tracks a navigation happening in this frame. Note that while there can be
   // two navigations in the same FrameTreeNode, there can only be one
diff --git a/content/browser/gpu/gpu_data_manager_impl_private.cc b/content/browser/gpu/gpu_data_manager_impl_private.cc
index 6b57bcf..161f07b 100644
--- a/content/browser/gpu/gpu_data_manager_impl_private.cc
+++ b/content/browser/gpu/gpu_data_manager_impl_private.cc
@@ -11,6 +11,7 @@
 #include "base/metrics/histogram.h"
 #include "base/metrics/sparse_histogram.h"
 #include "base/strings/string_number_conversions.h"
+#include "base/strings/string_split.h"
 #include "base/strings/stringprintf.h"
 #include "base/sys_info.h"
 #include "base/trace_event/trace_event.h"
@@ -18,7 +19,7 @@
 #include "build/build_config.h"
 #include "cc/base/switches.h"
 #include "content/browser/gpu/gpu_process_host.h"
-#include "content/common/gpu/gpu_messages.h"
+#include "content/common/gpu/gpu_host_messages.h"
 #include "content/public/browser/browser_thread.h"
 #include "content/public/browser/gpu_data_manager_observer.h"
 #include "content/public/common/content_client.h"
@@ -408,10 +409,9 @@
 }
 
 void GpuDataManagerImplPrivate::RequestVideoMemoryUsageStatsUpdate() const {
-  GpuProcessHost::SendOnIO(
-      GpuProcessHost::GPU_PROCESS_KIND_SANDBOXED,
-      CAUSE_FOR_GPU_LAUNCH_NO_LAUNCH,
-      new GpuMsg_GetVideoMemoryUsageStats());
+  GpuProcessHost::SendOnIO(GpuProcessHost::GPU_PROCESS_KIND_SANDBOXED,
+                           CAUSE_FOR_GPU_LAUNCH_NO_LAUNCH,
+                           new GpuMsg_GetVideoMemoryUsageStats());
 }
 
 bool GpuDataManagerImplPrivate::ShouldUseSwiftShader() const {
@@ -455,10 +455,9 @@
 }
 
 void GpuDataManagerImplPrivate::DisableGpuWatchdog() {
-  GpuProcessHost::SendOnIO(
-      GpuProcessHost::GPU_PROCESS_KIND_SANDBOXED,
-      CAUSE_FOR_GPU_LAUNCH_NO_LAUNCH,
-      new GpuMsg_DisableWatchdog);
+  GpuProcessHost::SendOnIO(GpuProcessHost::GPU_PROCESS_KIND_SANDBOXED,
+                           CAUSE_FOR_GPU_LAUNCH_NO_LAUNCH,
+                           new GpuMsg_DisableWatchdog);
 }
 
 void GpuDataManagerImplPrivate::SetGLStrings(const std::string& gl_vendor,
@@ -893,10 +892,9 @@
   // Notify observers in the browser process.
   ui::GpuSwitchingManager::GetInstance()->NotifyGpuSwitched();
   // Pass the notification to the GPU process to notify observers there.
-  GpuProcessHost::SendOnIO(
-      GpuProcessHost::GPU_PROCESS_KIND_SANDBOXED,
-      CAUSE_FOR_GPU_LAUNCH_NO_LAUNCH,
-      new GpuMsg_GpuSwitched);
+  GpuProcessHost::SendOnIO(GpuProcessHost::GPU_PROCESS_KIND_SANDBOXED,
+                           CAUSE_FOR_GPU_LAUNCH_NO_LAUNCH,
+                           new GpuMsg_GpuSwitched);
 }
 
 bool GpuDataManagerImplPrivate::UpdateActiveGpu(uint32_t vendor_id,
diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc
index a696ecc4..ef4fea3 100644
--- a/content/browser/gpu/gpu_process_host.cc
+++ b/content/browser/gpu/gpu_process_host.cc
@@ -31,7 +31,7 @@
 #include "content/browser/mojo/mojo_application_host.h"
 #include "content/browser/renderer_host/render_widget_host_impl.h"
 #include "content/common/child_process_host_impl.h"
-#include "content/common/gpu/gpu_messages.h"
+#include "content/common/gpu/gpu_host_messages.h"
 #include "content/common/in_process_child_thread_params.h"
 #include "content/common/view_messages.h"
 #include "content/public/browser/browser_thread.h"
@@ -615,10 +615,8 @@
     IPC_MESSAGE_HANDLER_GENERIC(GpuHostMsg_AcceleratedSurfaceBuffersSwapped,
                                 OnAcceleratedSurfaceBuffersSwapped(message))
 #endif
-    IPC_MESSAGE_HANDLER(GpuHostMsg_DestroyChannel,
-                        OnDestroyChannel)
-    IPC_MESSAGE_HANDLER(GpuHostMsg_CacheShader,
-                        OnCacheShader)
+    IPC_MESSAGE_HANDLER(GpuHostMsg_DestroyChannel, OnDestroyChannel)
+    IPC_MESSAGE_HANDLER(GpuHostMsg_CacheShader, OnCacheShader)
 #if defined(OS_WIN)
     IPC_MESSAGE_HANDLER(GpuHostMsg_AcceleratedSurfaceCreatedChildWindow,
                         OnAcceleratedSurfaceCreatedChildWindow)
@@ -689,7 +687,7 @@
     return;
   }
 
-  GpuMsg_EstablishChannel_Params params;
+  EstablishChannelParams params;
   params.client_id = client_id;
   params.client_tracing_id = client_tracing_id;
   params.preempts = preempts;
@@ -787,8 +785,7 @@
   if (channel_requests_.empty()) {
     // This happens when GPU process is compromised.
     RouteOnUIThread(GpuHostMsg_OnLogMessage(
-        logging::LOG_WARNING,
-        "WARNING",
+        logging::LOG_WARNING, "WARNING",
         "Received a ChannelEstablished message but no requests in queue."));
     return;
   }
@@ -801,10 +798,9 @@
       !GpuDataManagerImpl::GetInstance()->GpuAccessAllowed(NULL)) {
     Send(new GpuMsg_CloseChannel(channel_handle));
     callback.Run(IPC::ChannelHandle(), gpu::GPUInfo());
-    RouteOnUIThread(GpuHostMsg_OnLogMessage(
-        logging::LOG_WARNING,
-        "WARNING",
-        "Hardware acceleration is unavailable."));
+    RouteOnUIThread(
+        GpuHostMsg_OnLogMessage(logging::LOG_WARNING, "WARNING",
+                                "Hardware acceleration is unavailable."));
     return;
   }
 
diff --git a/content/browser/gpu/gpu_process_host_ui_shim.cc b/content/browser/gpu/gpu_process_host_ui_shim.cc
index f50db21..1377dce 100644
--- a/content/browser/gpu/gpu_process_host_ui_shim.cc
+++ b/content/browser/gpu/gpu_process_host_ui_shim.cc
@@ -22,10 +22,12 @@
 #include "content/browser/renderer_host/render_view_host_impl.h"
 #include "content/browser/renderer_host/render_widget_helper.h"
 #include "content/browser/renderer_host/render_widget_host_view_base.h"
-#include "content/common/gpu/gpu_messages.h"
+#include "content/common/gpu/gpu_host_messages.h"
 #include "content/public/browser/browser_thread.h"
+#include "ui/gfx/swap_result.h"
 
 #if defined(OS_MACOSX)
+#include "content/common/gpu/accelerated_surface_buffers_swapped_params_mac.h"
 #include "ui/accelerated_widget_mac/accelerated_widget_mac.h"
 #endif
 
@@ -184,8 +186,7 @@
   DCHECK(CalledOnValidThread());
 
   IPC_BEGIN_MESSAGE_MAP(GpuProcessHostUIShim, message)
-    IPC_MESSAGE_HANDLER(GpuHostMsg_OnLogMessage,
-                        OnLogMessage)
+    IPC_MESSAGE_HANDLER(GpuHostMsg_OnLogMessage, OnLogMessage)
 #if defined(OS_MACOSX)
     IPC_MESSAGE_HANDLER(GpuHostMsg_AcceleratedSurfaceBuffersSwapped,
                         OnAcceleratedSurfaceBuffersSwapped)
@@ -222,19 +223,19 @@
 
 #if defined(OS_MACOSX)
 void GpuProcessHostUIShim::OnAcceleratedSurfaceBuffersSwapped(
-    const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params) {
+    const AcceleratedSurfaceBuffersSwappedParams& params) {
   TRACE_EVENT0("browser",
       "GpuProcessHostUIShim::OnAcceleratedSurfaceBuffersSwapped");
   if (!ui::LatencyInfo::Verify(params.latency_info,
                                "GpuHostMsg_AcceleratedSurfaceBuffersSwapped")) {
-
     TRACE_EVENT0("browser", "ui::LatencyInfo::Verify failed");
     return;
   }
 
   // On Mac with delegated rendering, accelerated surfaces are not necessarily
   // associated with a RenderWidgetHostViewBase.
-  AcceleratedSurfaceMsg_BufferPresented_Params ack_params;
+  BufferPresentedParams ack_params;
+  ack_params.surface_id = params.surface_id;
 
   // If the frame was intended for an NSView that the gfx::AcceleratedWidget is
   // no longer attached to, do not pass the frame along to the widget. Just ack
@@ -266,7 +267,7 @@
   content::ImageTransportFactory::GetInstance()->OnGpuSwapBuffersCompleted(
       params.surface_id, params.latency_info, gfx::SwapResult::SWAP_ACK);
 
-  Send(new AcceleratedSurfaceMsg_BufferPresented(params.route_id, ack_params));
+  Send(new AcceleratedSurfaceMsg_BufferPresented(ack_params));
 }
 #endif
 
diff --git a/content/browser/gpu/gpu_process_host_ui_shim.h b/content/browser/gpu/gpu_process_host_ui_shim.h
index e37eda0..4358b1c6 100644
--- a/content/browser/gpu/gpu_process_host_ui_shim.h
+++ b/content/browser/gpu/gpu_process_host_ui_shim.h
@@ -27,10 +27,6 @@
 #include "ipc/ipc_sender.h"
 #include "ipc/message_router.h"
 
-#if defined(OS_MACOSX)
-struct GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params;
-#endif
-
 namespace ui {
 class LatencyInfo;
 }
@@ -44,6 +40,9 @@
 }
 
 namespace content {
+#if defined(OS_MACOSX)
+struct AcceleratedSurfaceBuffersSwappedParams;
+#endif
 void RouteToGpuProcessHostUIShimTask(int host_id, const IPC::Message& msg);
 
 class GpuProcessHostUIShim : public IPC::Listener,
@@ -98,7 +97,7 @@
 
 #if defined(OS_MACOSX)
   void OnAcceleratedSurfaceBuffersSwapped(
-      const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params);
+      const AcceleratedSurfaceBuffersSwappedParams& params);
 #endif
   void OnVideoMemoryUsageStatsReceived(
       const GPUVideoMemoryUsageStats& video_memory_usage_stats);
diff --git a/content/browser/level_db_wrapper_impl.h b/content/browser/level_db_wrapper_impl.h
index d0f74e5b..06ed348 100644
--- a/content/browser/level_db_wrapper_impl.h
+++ b/content/browser/level_db_wrapper_impl.h
@@ -8,7 +8,7 @@
 #include "base/callback.h"
 #include "base/macros.h"
 #include "content/common/leveldb_wrapper.mojom.h"
-#include "mojo/public/cpp/bindings/weak_binding_set.h"
+#include "mojo/public/cpp/bindings/binding_set.h"
 
 namespace content {
 
@@ -48,7 +48,7 @@
   void OnConnectionError();
 
   std::string prefix_;
-  mojo::WeakBindingSet<LevelDBWrapper> bindings_;
+  mojo::BindingSet<LevelDBWrapper> bindings_;
   base::Closure no_bindings_callback_;
 
   DISALLOW_COPY_AND_ASSIGN(LevelDBWrapperImpl);
diff --git a/content/browser/mojo/mojo_app_connection_impl.cc b/content/browser/mojo/mojo_app_connection_impl.cc
index 14cda96..083a1f9c 100644
--- a/content/browser/mojo/mojo_app_connection_impl.cc
+++ b/content/browser/mojo/mojo_app_connection_impl.cc
@@ -32,7 +32,6 @@
   MojoShellContext::ConnectToApplication(
       url, requestor_url, mojo::GetProxy(&interfaces_),
       mojo::shell::mojom::InterfaceProviderPtr(),
-      mojo::shell::GetPermissiveCapabilityFilter(),
       base::Bind(&OnGotInstanceID));
 }
 
diff --git a/content/browser/mojo/mojo_shell_context.cc b/content/browser/mojo/mojo_shell_context.cc
index 74a50e3..31f449ae 100644
--- a/content/browser/mojo/mojo_shell_context.cc
+++ b/content/browser/mojo/mojo_shell_context.cc
@@ -159,13 +159,12 @@
       const GURL& requestor_url,
       mojo::shell::mojom::InterfaceProviderRequest request,
       mojo::shell::mojom::InterfaceProviderPtr exposed_services,
-      const mojo::shell::CapabilityFilter& filter,
       const mojo::shell::mojom::Connector::ConnectCallback& callback) {
     if (task_runner_ == base::ThreadTaskRunnerHandle::Get()) {
       if (shell_context_) {
         shell_context_->ConnectToApplicationOnOwnThread(
             url, requestor_url, std::move(request), std::move(exposed_services),
-            filter, callback);
+            callback);
       }
     } else {
       // |shell_context_| outlives the main MessageLoop, so it's safe for it to
@@ -175,7 +174,7 @@
           base::Bind(&MojoShellContext::ConnectToApplicationOnOwnThread,
                      base::Unretained(shell_context_), url, requestor_url,
                      base::Passed(&request), base::Passed(&exposed_services),
-                     filter, callback));
+                     callback));
     }
   }
 
@@ -261,11 +260,9 @@
     const GURL& requestor_url,
     mojo::shell::mojom::InterfaceProviderRequest request,
     mojo::shell::mojom::InterfaceProviderPtr exposed_services,
-    const mojo::shell::CapabilityFilter& filter,
     const mojo::shell::mojom::Connector::ConnectCallback& callback) {
   proxy_.Get()->ConnectToApplication(url, requestor_url, std::move(request),
-                                     std::move(exposed_services), filter,
-                                     callback);
+                                     std::move(exposed_services), callback);
 }
 
 void MojoShellContext::ConnectToApplicationOnOwnThread(
@@ -273,16 +270,18 @@
     const GURL& requestor_url,
     mojo::shell::mojom::InterfaceProviderRequest request,
     mojo::shell::mojom::InterfaceProviderPtr exposed_services,
-    const mojo::shell::CapabilityFilter& filter,
     const mojo::shell::mojom::Connector::ConnectCallback& callback) {
   scoped_ptr<mojo::shell::ConnectParams> params(new mojo::shell::ConnectParams);
   // TODO(beng): kUserRoot is obviously wrong.
-  params->set_source(
-      mojo::shell::Identity(requestor_url, std::string(),
-                            mojo::shell::mojom::Connector::kUserRoot,
-                            mojo::shell::GetPermissiveCapabilityFilter()));
+  // TODO(beng): We need to set a permissive filter here temporarily because
+  //             content is known as a bogus system: URL that the application
+  //             manager doesn't understand.
+  mojo::shell::Identity source_id(
+      requestor_url, std::string(), mojo::shell::mojom::Connector::kUserRoot);
+  source_id.SetFilter(mojo::shell::GetPermissiveCapabilityFilter());
+  params->set_source(source_id);
   params->set_target(mojo::shell::Identity(
-      url, std::string(), mojo::shell::mojom::Connector::kUserRoot, filter));
+      url, std::string(), mojo::shell::mojom::Connector::kUserRoot));
   params->set_remote_interfaces(std::move(request));
   params->set_local_interfaces(std::move(exposed_services));
   params->set_connect_callback(callback);
diff --git a/content/browser/mojo/mojo_shell_context.h b/content/browser/mojo/mojo_shell_context.h
index 50ca49c..807b447 100644
--- a/content/browser/mojo/mojo_shell_context.h
+++ b/content/browser/mojo/mojo_shell_context.h
@@ -43,7 +43,6 @@
       const GURL& requestor_url,
       mojo::shell::mojom::InterfaceProviderRequest request,
       mojo::shell::mojom::InterfaceProviderPtr exposed_services,
-      const mojo::shell::CapabilityFilter& filter,
       const mojo::shell::mojom::Connector::ConnectCallback& callback);
 
   static void SetApplicationsForTest(const StaticApplicationMap* apps);
@@ -57,7 +56,6 @@
       const GURL& requestor_url,
       mojo::shell::mojom::InterfaceProviderRequest request,
       mojo::shell::mojom::InterfaceProviderPtr exposed_services,
-      const mojo::shell::CapabilityFilter& filter,
       const mojo::shell::mojom::Connector::ConnectCallback& callback);
 
   static base::LazyInstance<scoped_ptr<Proxy>> proxy_;
diff --git a/content/browser/renderer_host/compositor_impl_android.cc b/content/browser/renderer_host/compositor_impl_android.cc
index 5b01355..722dda8 100644
--- a/content/browser/renderer_host/compositor_impl_android.cc
+++ b/content/browser/renderer_host/compositor_impl_android.cc
@@ -195,8 +195,7 @@
 class SingleThreadTaskGraphRunner : public cc::SingleThreadTaskGraphRunner {
  public:
   SingleThreadTaskGraphRunner() {
-    Start("CompositorTileWorker1",
-          base::SimpleThread::Options(base::ThreadPriority::BACKGROUND));
+    Start("CompositorTileWorker1", base::SimpleThread::Options());
   }
 
   ~SingleThreadTaskGraphRunner() override {
diff --git a/content/browser/renderer_host/gpu_message_filter.cc b/content/browser/renderer_host/gpu_message_filter.cc
index bf1fa079..14813eb4 100644
--- a/content/browser/renderer_host/gpu_message_filter.cc
+++ b/content/browser/renderer_host/gpu_message_filter.cc
@@ -13,7 +13,7 @@
 #include "content/browser/gpu/gpu_data_manager_impl.h"
 #include "content/browser/gpu/gpu_process_host.h"
 #include "content/common/child_process_host_impl.h"
-#include "content/common/gpu/gpu_messages.h"
+#include "content/common/gpu/gpu_host_messages.h"
 
 namespace content {
 
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index 8772b0c..2e295b0 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -120,7 +120,7 @@
 #include "content/common/child_process_messages.h"
 #include "content/common/content_switches_internal.h"
 #include "content/common/frame_messages.h"
-#include "content/common/gpu/gpu_messages.h"
+#include "content/common/gpu/gpu_host_messages.h"
 #include "content/common/in_process_child_thread_params.h"
 #include "content/common/mojo/channel_init.h"
 #include "content/common/mojo/mojo_messages.h"
@@ -1523,7 +1523,6 @@
     // --in-process-webgl.
     switches::kUseGL,
     switches::kUseMobileUserAgent,
-    switches::kUseNormalPriorityForTileTaskWorkerThreads,
     switches::kUseRemoteCompositing,
     switches::kV,
     switches::kVideoThreads,
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 ddb0f0c..b6c97d5 100644
--- a/content/browser/renderer_host/render_widget_host_view_android.cc
+++ b/content/browser/renderer_host/render_widget_host_view_android.cc
@@ -56,7 +56,7 @@
 #include "content/browser/renderer_host/render_widget_host_impl.h"
 #include "content/common/gpu/client/gl_helper.h"
 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h"
-#include "content/common/gpu/gpu_messages.h"
+#include "content/common/gpu/gpu_host_messages.h"
 #include "content/common/gpu/gpu_process_launch_causes.h"
 #include "content/common/input/did_overscroll_params.h"
 #include "content/common/input_messages.h"
diff --git a/content/browser/service_worker/service_worker_client_utils.cc b/content/browser/service_worker/service_worker_client_utils.cc
index a7eb04f..9efef53 100644
--- a/content/browser/service_worker/service_worker_client_utils.cc
+++ b/content/browser/service_worker/service_worker_client_utils.cc
@@ -11,13 +11,17 @@
 #include "content/browser/frame_host/render_frame_host_impl.h"
 #include "content/browser/service_worker/service_worker_context_core.h"
 #include "content/browser/service_worker/service_worker_context_wrapper.h"
+#include "content/browser/service_worker/service_worker_provider_host.h"
 #include "content/browser/service_worker/service_worker_version.h"
 #include "content/browser/storage_partition_impl.h"
+#include "content/browser/web_contents/web_contents_impl.h"
 #include "content/common/service_worker/service_worker_client_info.h"
 #include "content/common/service_worker/service_worker_types.h"
 #include "content/public/browser/browser_thread.h"
 #include "content/public/browser/content_browser_client.h"
 #include "content/public/browser/page_navigator.h"
+#include "content/public/browser/render_frame_host.h"
+#include "content/public/browser/render_widget_host_view.h"
 #include "content/public/browser/web_contents.h"
 #include "content/public/browser/web_contents_observer.h"
 #include "content/public/common/child_process_host.h"
@@ -90,8 +94,60 @@
   DISALLOW_COPY_AND_ASSIGN(OpenURLObserver);
 };
 
+ServiceWorkerClientInfo GetWindowClientInfoOnUI(
+    int render_process_id,
+    int render_frame_id,
+    const std::string& client_uuid) {
+  DCHECK_CURRENTLY_ON(BrowserThread::UI);
+  RenderFrameHostImpl* render_frame_host =
+      RenderFrameHostImpl::FromID(render_process_id, render_frame_id);
+  if (!render_frame_host)
+    return ServiceWorkerClientInfo();
+
+  // TODO(mlamouri,michaeln): it is possible to end up collecting information
+  // for a frame that is actually being navigated and isn't exactly what we are
+  // expecting.
+  return ServiceWorkerClientInfo(
+      client_uuid, render_frame_host->GetVisibilityState(),
+      render_frame_host->IsFocused(), render_frame_host->GetLastCommittedURL(),
+      render_frame_host->GetParent() ? REQUEST_CONTEXT_FRAME_TYPE_NESTED
+                                     : REQUEST_CONTEXT_FRAME_TYPE_TOP_LEVEL,
+      render_frame_host->frame_tree_node()->last_focus_time(),
+      blink::WebServiceWorkerClientTypeWindow);
+}
+
+ServiceWorkerClientInfo FocusOnUI(int render_process_id,
+                                  int render_frame_id,
+                                  const std::string& client_uuid) {
+  DCHECK_CURRENTLY_ON(BrowserThread::UI);
+  RenderFrameHostImpl* render_frame_host =
+      RenderFrameHostImpl::FromID(render_process_id, render_frame_id);
+  WebContentsImpl* web_contents = static_cast<WebContentsImpl*>(
+      WebContents::FromRenderFrameHost(render_frame_host));
+
+  if (!render_frame_host || !web_contents)
+    return ServiceWorkerClientInfo();
+
+  FrameTreeNode* frame_tree_node = render_frame_host->frame_tree_node();
+
+  // Focus the frame in the frame tree node, in case it has changed.
+  frame_tree_node->frame_tree()->SetFocusedFrame(
+      frame_tree_node, render_frame_host->GetSiteInstance());
+
+  // Focus the frame's view to make sure the frame is now considered as focused.
+  render_frame_host->GetView()->Focus();
+
+  // Move the web contents to the foreground.
+  web_contents->Activate();
+
+  return GetWindowClientInfoOnUI(render_process_id, render_frame_id,
+                                 client_uuid);
+}
+
 // This is only called for main frame navigations in OpenWindowOnUI().
-void DidOpenURL(const OpenURLCallback& callback, WebContents* web_contents) {
+void DidOpenURLOnUI(const OpenURLCallback& callback,
+                    WebContents* web_contents) {
+  DCHECK_CURRENTLY_ON(BrowserThread::UI);
   DCHECK(web_contents);
 
   RenderFrameHostImpl* rfhi =
@@ -133,7 +189,7 @@
       true /* is_renderer_initiated */);
 
   GetContentClient()->browser()->OpenURL(browser_context, params,
-                                         base::Bind(&DidOpenURL, callback));
+                                         base::Bind(&DidOpenURLOnUI, callback));
 }
 
 void NavigateClientOnUI(const GURL& url,
@@ -194,7 +250,11 @@
         provider_host->frame_id() != render_frame_id) {
       continue;
     }
-    provider_host->GetWindowClientInfo(base::Bind(callback, SERVICE_WORKER_OK));
+    BrowserThread::PostTaskAndReplyWithResult(
+        BrowserThread::UI, FROM_HERE,
+        base::Bind(&GetWindowClientInfoOnUI, provider_host->process_id(),
+                   provider_host->route_id(), provider_host->client_uuid()),
+        base::Bind(callback, SERVICE_WORKER_OK));
     return;
   }
 
@@ -206,6 +266,7 @@
 void AddWindowClient(
     ServiceWorkerProviderHost* host,
     std::vector<base::Tuple<int, int, std::string>>* client_info) {
+  DCHECK_CURRENTLY_ON(BrowserThread::IO);
   if (host->client_type() != blink::WebServiceWorkerClientTypeWindow)
     return;
   client_info->push_back(base::MakeTuple(host->process_id(), host->frame_id(),
@@ -215,6 +276,7 @@
 void AddNonWindowClient(ServiceWorkerProviderHost* host,
                         const ServiceWorkerClientQueryOptions& options,
                         ServiceWorkerClients* clients) {
+  DCHECK_CURRENTLY_ON(BrowserThread::IO);
   blink::WebServiceWorkerClientType host_client_type = host->client_type();
   if (host_client_type == blink::WebServiceWorkerClientTypeWindow)
     return;
@@ -235,12 +297,12 @@
     const std::vector<base::Tuple<int, int, std::string>>& clients_info,
     const GURL& script_url,
     const GetWindowClientsCallback& callback) {
-  scoped_ptr<ServiceWorkerClients> clients(new ServiceWorkerClients);
+  DCHECK_CURRENTLY_ON(BrowserThread::UI);
 
+  scoped_ptr<ServiceWorkerClients> clients(new ServiceWorkerClients);
   for (const auto& it : clients_info) {
-    ServiceWorkerClientInfo info =
-        ServiceWorkerProviderHost::GetWindowClientInfoOnUI(
-            base::get<0>(it), base::get<1>(it), base::get<2>(it));
+    ServiceWorkerClientInfo info = GetWindowClientInfoOnUI(
+        base::get<0>(it), base::get<1>(it), base::get<2>(it));
 
     // If the request to the provider_host returned an empty
     // ServiceWorkerClientInfo, that means that it wasn't possible to associate
@@ -282,6 +344,7 @@
 void GetNonWindowClients(const base::WeakPtr<ServiceWorkerVersion>& controller,
                          const ServiceWorkerClientQueryOptions& options,
                          ServiceWorkerClients* clients) {
+  DCHECK_CURRENTLY_ON(BrowserThread::IO);
   if (!options.include_uncontrolled) {
     for (auto& controllee : controller->controllee_map())
       AddNonWindowClient(controllee.second, options, clients);
@@ -338,6 +401,18 @@
 
 }  // namespace
 
+void FocusWindowClient(ServiceWorkerProviderHost* provider_host,
+                       const ClientCallback& callback) {
+  DCHECK_CURRENTLY_ON(BrowserThread::IO);
+  DCHECK_EQ(blink::WebServiceWorkerClientTypeWindow,
+            provider_host->client_type());
+  BrowserThread::PostTaskAndReplyWithResult(
+      BrowserThread::UI, FROM_HERE,
+      base::Bind(&FocusOnUI, provider_host->process_id(),
+                 provider_host->frame_id(), provider_host->client_uuid()),
+      callback);
+}
+
 void OpenWindow(const GURL& url,
                 const GURL& script_url,
                 int worker_process_id,
@@ -366,11 +441,10 @@
           base::Bind(&DidNavigate, context, script_url.GetOrigin(), callback)));
 }
 
-void GetClient(
-    const base::WeakPtr<ServiceWorkerVersion>& controller,
-    const std::string& client_uuid,
-    const base::WeakPtr<ServiceWorkerContextCore>& context,
-    const ServiceWorkerProviderHost::GetClientInfoCallback& callback) {
+void GetClient(const base::WeakPtr<ServiceWorkerVersion>& controller,
+               const std::string& client_uuid,
+               const base::WeakPtr<ServiceWorkerContextCore>& context,
+               const ClientCallback& callback) {
   DCHECK_CURRENTLY_ON(BrowserThread::IO);
 
   ServiceWorkerProviderHost* provider_host =
@@ -391,7 +465,11 @@
   }
 
   if (provider_host->client_type() == blink::WebServiceWorkerClientTypeWindow) {
-    provider_host->GetWindowClientInfo(callback);
+    BrowserThread::PostTaskAndReplyWithResult(
+        BrowserThread::UI, FROM_HERE,
+        base::Bind(&GetWindowClientInfoOnUI, provider_host->process_id(),
+                   provider_host->route_id(), provider_host->client_uuid()),
+        callback);
     return;
   }
 
diff --git a/content/browser/service_worker/service_worker_client_utils.h b/content/browser/service_worker/service_worker_client_utils.h
index c4bf3129..4383f2f 100644
--- a/content/browser/service_worker/service_worker_client_utils.h
+++ b/content/browser/service_worker/service_worker_client_utils.h
@@ -10,7 +10,6 @@
 
 #include "base/callback.h"
 #include "base/memory/weak_ptr.h"
-#include "content/browser/service_worker/service_worker_provider_host.h"
 #include "content/common/service_worker/service_worker_status_code.h"
 
 class GURL;
@@ -18,6 +17,7 @@
 namespace content {
 
 class ServiceWorkerContextCore;
+class ServiceWorkerProviderHost;
 class ServiceWorkerVersion;
 struct ServiceWorkerClientInfo;
 struct ServiceWorkerClientQueryOptions;
@@ -27,9 +27,16 @@
 using NavigationCallback =
     base::Callback<void(ServiceWorkerStatusCode status,
                         const ServiceWorkerClientInfo& client_info)>;
+using ClientCallback =
+    base::Callback<void(const ServiceWorkerClientInfo& client_info)>;
 using ServiceWorkerClients = std::vector<ServiceWorkerClientInfo>;
 using ClientsCallback = base::Callback<void(ServiceWorkerClients* clients)>;
 
+// Focuses the window client associated with |provider_host|. |callback| is
+// called with the client information on completion.
+void FocusWindowClient(ServiceWorkerProviderHost* provider_host,
+                       const ClientCallback& callback);
+
 // Opens a new window and navigates it to |url|. |callback| is called with the
 // window's client information on completion.
 void OpenWindow(const GURL& url,
@@ -49,11 +56,10 @@
 
 // Gets a client matched by |client_uuid|. |callback| is called with the client
 // information on completion.
-void GetClient(
-    const base::WeakPtr<ServiceWorkerVersion>& controller,
-    const std::string& client_uuid,
-    const base::WeakPtr<ServiceWorkerContextCore>& context,
-    const ServiceWorkerProviderHost::GetClientInfoCallback& callback);
+void GetClient(const base::WeakPtr<ServiceWorkerVersion>& controller,
+               const std::string& client_uuid,
+               const base::WeakPtr<ServiceWorkerContextCore>& context,
+               const ClientCallback& callback);
 
 // Collects clients matched with |options|. |callback| is called with the client
 // information sorted in MRU order (most recently focused order) on completion.
diff --git a/content/browser/service_worker/service_worker_provider_host.cc b/content/browser/service_worker/service_worker_provider_host.cc
index 639b4428..b54f24c 100644
--- a/content/browser/service_worker/service_worker_provider_host.cc
+++ b/content/browser/service_worker/service_worker_provider_host.cc
@@ -9,9 +9,6 @@
 #include "base/guid.h"
 #include "base/stl_util.h"
 #include "base/time/time.h"
-#include "content/browser/frame_host/frame_tree.h"
-#include "content/browser/frame_host/frame_tree_node.h"
-#include "content/browser/frame_host/render_frame_host_impl.h"
 #include "content/browser/message_port_message_filter.h"
 #include "content/browser/service_worker/service_worker_context_core.h"
 #include "content/browser/service_worker/service_worker_context_request_handler.h"
@@ -20,14 +17,10 @@
 #include "content/browser/service_worker/service_worker_handle.h"
 #include "content/browser/service_worker/service_worker_registration_handle.h"
 #include "content/browser/service_worker/service_worker_version.h"
-#include "content/browser/web_contents/web_contents_impl.h"
 #include "content/common/resource_request_body.h"
 #include "content/common/service_worker/service_worker_messages.h"
 #include "content/common/service_worker/service_worker_types.h"
 #include "content/common/service_worker/service_worker_utils.h"
-#include "content/public/browser/render_frame_host.h"
-#include "content/public/browser/render_widget_host_view.h"
-#include "content/public/browser/web_contents.h"
 #include "content/public/common/browser_side_navigation_policy.h"
 #include "content/public/common/child_process_host.h"
 
@@ -35,33 +28,6 @@
 
 namespace {
 
-ServiceWorkerClientInfo FocusOnUIThread(int render_process_id,
-                                        int render_frame_id,
-                                        const std::string& client_uuid) {
-  RenderFrameHostImpl* render_frame_host =
-      RenderFrameHostImpl::FromID(render_process_id, render_frame_id);
-  WebContentsImpl* web_contents = static_cast<WebContentsImpl*>(
-      WebContents::FromRenderFrameHost(render_frame_host));
-
-  if (!render_frame_host || !web_contents)
-    return ServiceWorkerClientInfo();
-
-  FrameTreeNode* frame_tree_node = render_frame_host->frame_tree_node();
-
-  // Focus the frame in the frame tree node, in case it has changed.
-  frame_tree_node->frame_tree()->SetFocusedFrame(
-      frame_tree_node, render_frame_host->GetSiteInstance());
-
-  // Focus the frame's view to make sure the frame is now considered as focused.
-  render_frame_host->GetView()->Focus();
-
-  // Move the web contents to the foreground.
-  web_contents->Activate();
-
-  return ServiceWorkerProviderHost::GetWindowClientInfoOnUI(
-      render_process_id, render_frame_id, client_uuid);
-}
-
 // PlzNavigate
 // Next ServiceWorkerProviderHost ID for navigations, starts at -2 and keeps
 // going down.
@@ -434,52 +400,6 @@
   Send(new ServiceWorkerMsg_MessageToDocument(params));
 }
 
-void ServiceWorkerProviderHost::Focus(const GetClientInfoCallback& callback) {
-  if (provider_type_ != SERVICE_WORKER_PROVIDER_FOR_WINDOW) {
-    callback.Run(ServiceWorkerClientInfo());
-    return;
-  }
-  BrowserThread::PostTaskAndReplyWithResult(
-      BrowserThread::UI, FROM_HERE,
-      base::Bind(&FocusOnUIThread, render_process_id_, route_id_, client_uuid_),
-      callback);
-}
-
-void ServiceWorkerProviderHost::GetWindowClientInfo(
-    const GetClientInfoCallback& callback) const {
-  if (provider_type_ != SERVICE_WORKER_PROVIDER_FOR_WINDOW) {
-    callback.Run(ServiceWorkerClientInfo());
-    return;
-  }
-  BrowserThread::PostTaskAndReplyWithResult(
-      BrowserThread::UI, FROM_HERE,
-      base::Bind(&ServiceWorkerProviderHost::GetWindowClientInfoOnUI,
-                 render_process_id_, route_id_, client_uuid_),
-      callback);
-}
-
-// static
-ServiceWorkerClientInfo ServiceWorkerProviderHost::GetWindowClientInfoOnUI(
-    int render_process_id,
-    int render_frame_id,
-    const std::string& client_uuid) {
-  RenderFrameHostImpl* render_frame_host =
-      RenderFrameHostImpl::FromID(render_process_id, render_frame_id);
-  if (!render_frame_host)
-    return ServiceWorkerClientInfo();
-
-  // TODO(mlamouri,michaeln): it is possible to end up collecting information
-  // for a frame that is actually being navigated and isn't exactly what we are
-  // expecting.
-  return ServiceWorkerClientInfo(
-      client_uuid, render_frame_host->GetVisibilityState(),
-      render_frame_host->IsFocused(), render_frame_host->GetLastCommittedURL(),
-      render_frame_host->GetParent() ? REQUEST_CONTEXT_FRAME_TYPE_NESTED
-                                     : REQUEST_CONTEXT_FRAME_TYPE_TOP_LEVEL,
-      render_frame_host->frame_tree_node()->last_focus_time(),
-      blink::WebServiceWorkerClientTypeWindow);
-}
-
 void ServiceWorkerProviderHost::AddScopedProcessReferenceToPattern(
     const GURL& pattern) {
   associated_patterns_.push_back(pattern);
diff --git a/content/browser/service_worker/service_worker_provider_host.h b/content/browser/service_worker/service_worker_provider_host.h
index 59c243f..8bb8d92 100644
--- a/content/browser/service_worker/service_worker_provider_host.h
+++ b/content/browser/service_worker/service_worker_provider_host.h
@@ -51,8 +51,6 @@
     : public NON_EXPORTED_BASE(ServiceWorkerRegistration::Listener),
       public base::SupportsWeakPtr<ServiceWorkerProviderHost> {
  public:
-  using GetClientInfoCallback =
-      base::Callback<void(const ServiceWorkerClientInfo&)>;
   using GetRegistrationForReadyCallback =
       base::Callback<void(ServiceWorkerRegistration* reigstration)>;
 
@@ -175,22 +173,6 @@
       const base::string16& message,
       const std::vector<TransferredMessagePort>& sent_message_ports);
 
-  // Activates the WebContents associated with
-  // { render_process_id_, route_id_ }.
-  // Runs the |callback| with the updated ServiceWorkerClientInfo in parameter.
-  void Focus(const GetClientInfoCallback& callback);
-
-  // Asks the renderer to send back the document information.
-  void GetWindowClientInfo(const GetClientInfoCallback& callback) const;
-
-  // Same as above but has to be called from the UI thread.
-  // It is taking the process and frame ids in parameter because |this| is meant
-  // to live on the IO thread.
-  static ServiceWorkerClientInfo GetWindowClientInfoOnUI(
-      int render_process_id,
-      int render_frame_id,
-      const std::string& client_uuid);
-
   // Adds reference of this host's process to the |pattern|, the reference will
   // be removed in destructor.
   void AddScopedProcessReferenceToPattern(const GURL& pattern);
diff --git a/content/browser/service_worker/service_worker_version.cc b/content/browser/service_worker/service_worker_version.cc
index 28fd383e..bb6dbfb 100644
--- a/content/browser/service_worker/service_worker_version.cc
+++ b/content/browser/service_worker/service_worker_version.cc
@@ -1145,8 +1145,15 @@
     // possibly due to timing issue or bad message.
     return;
   }
-  provider_host->Focus(base::Bind(&ServiceWorkerVersion::OnFocusClientFinished,
-                                  weak_factory_.GetWeakPtr(), request_id));
+  if (provider_host->client_type() != blink::WebServiceWorkerClientTypeWindow) {
+    // focus() should be called only for WindowClient. This may happen due to
+    // bad message.
+    return;
+  }
+
+  service_worker_client_utils::FocusWindowClient(
+      provider_host, base::Bind(&ServiceWorkerVersion::OnFocusClientFinished,
+                                weak_factory_.GetWeakPtr(), request_id));
 }
 
 void ServiceWorkerVersion::OnFocusClientFinished(
diff --git a/content/browser/storage_partition_impl.h b/content/browser/storage_partition_impl.h
index 90cd7c4..fa6904d 100644
--- a/content/browser/storage_partition_impl.h
+++ b/content/browser/storage_partition_impl.h
@@ -25,7 +25,7 @@
 #include "content/common/content_export.h"
 #include "content/common/storage_partition_service.mojom.h"
 #include "content/public/browser/storage_partition.h"
-#include "mojo/public/cpp/bindings/weak_binding_set.h"
+#include "mojo/public/cpp/bindings/binding_set.h"
 #include "storage/browser/quota/special_storage_policy.h"
 
 namespace content {
@@ -206,7 +206,7 @@
   scoped_refptr<PlatformNotificationContextImpl> platform_notification_context_;
   scoped_refptr<BackgroundSyncContextImpl> background_sync_context_;
 
-  mojo::WeakBindingSet<StoragePartitionService> bindings_;
+  mojo::BindingSet<StoragePartitionService> bindings_;
 
   // Raw pointer that should always be valid. The BrowserContext owns the
   // StoragePartitionImplMap which then owns StoragePartitionImpl. When the
diff --git a/content/browser/vr/vr_device_manager.h b/content/browser/vr/vr_device_manager.h
index 5fa84e8d..00a51ec9 100644
--- a/content/browser/vr/vr_device_manager.h
+++ b/content/browser/vr/vr_device_manager.h
@@ -18,7 +18,7 @@
 #include "content/browser/vr/vr_device_provider.h"
 #include "content/common/content_export.h"
 #include "content/common/vr_service.mojom.h"
-#include "mojo/public/cpp/bindings/weak_binding_set.h"
+#include "mojo/public/cpp/bindings/binding_set.h"
 
 namespace content {
 
@@ -65,7 +65,7 @@
 
   bool vr_initialized_;
 
-  mojo::WeakBindingSet<VRService> bindings_;
+  mojo::BindingSet<VRService> bindings_;
 
   // For testing. If true will not delete self when consumer count reaches 0.
   bool keep_alive_;
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 2b7899e..d748d53 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -2827,7 +2827,7 @@
     const WebContents::ImageDownloadCallback& callback) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
   static int next_image_download_id = 0;
-  const image_downloader::ImageDownloaderPtr& mojo_image_downloader =
+  const content::mojom::ImageDownloaderPtr& mojo_image_downloader =
       GetMainFrame()->GetMojoImageDownloader();
   const int download_id = ++next_image_download_id;
   if (!mojo_image_downloader) {
@@ -2835,8 +2835,8 @@
     // Android), the downloader service will be invalid. Pre-Mojo, this would
     // hang the callback indefinetly since the IPC would be dropped. Now,
     // respond with a 400 HTTP error code to indicate that something went wrong.
-    image_downloader::DownloadResultPtr result =
-        image_downloader::DownloadResult::New();
+    content::mojom::DownloadResultPtr result =
+        content::mojom::DownloadResult::New();
     result->http_status_code = 400;
     BrowserThread::PostTask(
         BrowserThread::UI, FROM_HERE,
@@ -2846,8 +2846,8 @@
     return download_id;
   }
 
-  image_downloader::DownloadRequestPtr req =
-      image_downloader::DownloadRequest::New();
+  content::mojom::DownloadRequestPtr req =
+      content::mojom::DownloadRequest::New();
 
   req->url = mojo::String::From(url);
   req->is_favicon = is_favicon;
@@ -4646,7 +4646,7 @@
     const ImageDownloadCallback& callback,
     int id,
     const GURL& image_url,
-    image_downloader::DownloadResultPtr result) {
+    content::mojom::DownloadResultPtr result) {
   const std::vector<SkBitmap> images =
       result->images.To<std::vector<SkBitmap>>();
   const std::vector<gfx::Size> original_image_sizes =
diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h
index ed8e741..753c690 100644
--- a/content/browser/web_contents/web_contents_impl.h
+++ b/content/browser/web_contents/web_contents_impl.h
@@ -820,7 +820,7 @@
   void OnDidDownloadImage(const ImageDownloadCallback& callback,
                           int id,
                           const GURL& image_url,
-                          image_downloader::DownloadResultPtr result);
+                          content::mojom::DownloadResultPtr result);
 
   // Callback function when showing JavaScript dialogs.  Takes in a routing ID
   // pair to identify the RenderFrameHost that opened the dialog, because it's
diff --git a/content/common/content_message_generator.h b/content/common/content_message_generator.h
index 3982542..312e56f 100644
--- a/content/common/content_message_generator.h
+++ b/content/common/content_message_generator.h
@@ -28,6 +28,7 @@
 #include "content/common/frame_messages.h"
 #include "content/common/gamepad_messages.h"
 #include "content/common/geofencing_messages.h"
+#include "content/common/gpu/gpu_host_messages.h"
 #include "content/common/gpu/gpu_messages.h"
 #include "content/common/indexed_db/indexed_db_messages.h"
 #include "content/common/input_messages.h"
diff --git a/content/common/gpu/accelerated_surface_buffers_swapped_params_mac.cc b/content/common/gpu/accelerated_surface_buffers_swapped_params_mac.cc
new file mode 100644
index 0000000..2364b84
--- /dev/null
+++ b/content/common/gpu/accelerated_surface_buffers_swapped_params_mac.cc
@@ -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.
+
+#include "content/common/gpu/accelerated_surface_buffers_swapped_params_mac.h"
+
+namespace content {
+AcceleratedSurfaceBuffersSwappedParams::AcceleratedSurfaceBuffersSwappedParams()
+    : surface_id(0), ca_context_id(0), scale_factor(1.f) {}
+
+AcceleratedSurfaceBuffersSwappedParams::
+    ~AcceleratedSurfaceBuffersSwappedParams() {}
+
+}  // namespace content
diff --git a/content/common/gpu/accelerated_surface_buffers_swapped_params_mac.h b/content/common/gpu/accelerated_surface_buffers_swapped_params_mac.h
new file mode 100644
index 0000000..d0f66b0
--- /dev/null
+++ b/content/common/gpu/accelerated_surface_buffers_swapped_params_mac.h
@@ -0,0 +1,28 @@
+// 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_GPU_ACCELERATED_SURFACE_BUFFERS_SWAPPED_PARAMS_MAC_H_
+#define CONTENT_COMMON_GPU_ACCELERATED_SURFACE_BUFFERS_SWAPPED_PARAMS_MAC_H_
+
+#include "ui/base/cocoa/remote_layer_api.h"
+#include "ui/events/latency_info.h"
+#include "ui/gfx/mac/io_surface.h"
+
+namespace content {
+
+struct AcceleratedSurfaceBuffersSwappedParams {
+  AcceleratedSurfaceBuffersSwappedParams();
+  ~AcceleratedSurfaceBuffersSwappedParams();
+
+  int32_t surface_id;
+  CAContextID ca_context_id;
+  gfx::ScopedRefCountedIOSurfaceMachPort io_surface;
+  gfx::Size size;
+  float scale_factor;
+  std::vector<ui::LatencyInfo> latency_info;
+};
+
+}  // namespace content
+
+#endif  // CONTENT_COMMON_GPU_ACCELERATED_SURFACE_BUFFERS_SWAPPED_PARAMS_MAC_H_
diff --git a/content/common/gpu/buffer_presented_params_mac.cc b/content/common/gpu/buffer_presented_params_mac.cc
new file mode 100644
index 0000000..acbb973c
--- /dev/null
+++ b/content/common/gpu/buffer_presented_params_mac.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 "content/common/gpu/buffer_presented_params_mac.h"
+
+namespace content {
+
+BufferPresentedParams::BufferPresentedParams() : surface_id(0) {}
+
+BufferPresentedParams::~BufferPresentedParams() {}
+
+}  // namespace content
diff --git a/content/common/gpu/buffer_presented_params_mac.h b/content/common/gpu/buffer_presented_params_mac.h
new file mode 100644
index 0000000..b94ffa4
--- /dev/null
+++ b/content/common/gpu/buffer_presented_params_mac.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 CONTENT_COMMON_GPU_BUFFER_PRESENTED_PARAMS_MAC_H_
+#define CONTENT_COMMON_GPU_BUFFER_PRESENTED_PARAMS_MAC_H_
+
+#include "base/time/time.h"
+
+namespace content {
+
+struct BufferPresentedParams {
+  BufferPresentedParams();
+  ~BufferPresentedParams();
+
+  int32_t surface_id;
+  base::TimeTicks vsync_timebase;
+  base::TimeDelta vsync_interval;
+};
+
+}  // namespace content
+
+#endif  // CONTENT_COMMON_GPU_BUFFER_PRESENTED_PARAMS_MAC_H_
diff --git a/content/common/gpu/child_window_surface_win.cc b/content/common/gpu/child_window_surface_win.cc
index f51115c2..4564972 100644
--- a/content/common/gpu/child_window_surface_win.cc
+++ b/content/common/gpu/child_window_surface_win.cc
@@ -8,6 +8,7 @@
 #include "base/win/scoped_hdc.h"
 #include "base/win/wrapped_window_proc.h"
 #include "content/common/gpu/gpu_channel_manager.h"
+#include "content/common/gpu/gpu_channel_manager_delegate.h"
 #include "content/common/gpu/gpu_messages.h"
 #include "ui/base/win/hidden_window.h"
 #include "ui/gfx/native_widget_types.h"
@@ -125,8 +126,8 @@
       windowRect.right - windowRect.left, windowRect.bottom - windowRect.top,
       ui::GetHiddenWindow(), NULL, NULL, NULL);
   gfx::SetWindowUserData(window_, this);
-  manager_->Send(new GpuHostMsg_AcceleratedSurfaceCreatedChildWindow(
-      parent_window_, window_));
+  manager_->delegate()->SendAcceleratedSurfaceCreatedChildWindow(parent_window_,
+                                                                 window_);
   return true;
 }
 
diff --git a/content/common/gpu/establish_channel_params.cc b/content/common/gpu/establish_channel_params.cc
new file mode 100644
index 0000000..21c8027
--- /dev/null
+++ b/content/common/gpu/establish_channel_params.cc
@@ -0,0 +1,18 @@
+// 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/gpu/establish_channel_params.h"
+
+namespace content {
+
+EstablishChannelParams::EstablishChannelParams()
+    : client_id(0),
+      client_tracing_id(0),
+      preempts(false),
+      allow_view_command_buffers(false),
+      allow_real_time_streams(false) {}
+
+EstablishChannelParams::~EstablishChannelParams() {}
+
+}  // namespace content
diff --git a/content/common/gpu/establish_channel_params.h b/content/common/gpu/establish_channel_params.h
new file mode 100644
index 0000000..3a06f86
--- /dev/null
+++ b/content/common/gpu/establish_channel_params.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 CONTENT_COMMON_GPU_ESTABLISH_CHANNEL_PARAMS_H_
+#define CONTENT_COMMON_GPU_ESTABLISH_CHANNEL_PARAMS_H_
+
+#include <stdint.h>
+
+#include "content/common/content_export.h"
+
+namespace content {
+
+struct CONTENT_EXPORT EstablishChannelParams {
+  EstablishChannelParams();
+  ~EstablishChannelParams();
+
+  int client_id;
+  uint64_t client_tracing_id;
+  bool preempts;
+  bool allow_view_command_buffers;
+  bool allow_real_time_streams;
+};
+
+}  // namespace content
+
+#endif  // CONTENT_COMMON_GPU_ESTABLISH_CHANNEL_PARAMS_H_
diff --git a/content/common/gpu/gpu_channel.cc b/content/common/gpu/gpu_channel.cc
index 885f6d98c..b6731de 100644
--- a/content/common/gpu/gpu_channel.cc
+++ b/content/common/gpu/gpu_channel.cc
@@ -31,6 +31,7 @@
 #include "base/trace_event/trace_event.h"
 #include "build/build_config.h"
 #include "content/common/gpu/gpu_channel_manager.h"
+#include "content/common/gpu/gpu_channel_manager_delegate.h"
 #include "content/common/gpu/gpu_memory_buffer_factory.h"
 #include "content/common/gpu/gpu_messages.h"
 #include "content/common/gpu/media/gpu_jpeg_decode_accelerator.h"
@@ -700,13 +701,11 @@
 }
 
 void GpuChannel::OnAddSubscription(unsigned int target) {
-  gpu_channel_manager()->Send(
-      new GpuHostMsg_AddSubscription(client_id_, target));
+  gpu_channel_manager()->delegate()->AddSubscription(client_id_, target);
 }
 
 void GpuChannel::OnRemoveSubscription(unsigned int target) {
-  gpu_channel_manager()->Send(
-      new GpuHostMsg_RemoveSubscription(client_id_, target));
+  gpu_channel_manager()->delegate()->RemoveSubscription(client_id_, target);
 }
 
 void GpuChannel::OnStreamRescheduled(int32_t stream_id, bool scheduled) {
@@ -1000,8 +999,7 @@
 
 void GpuChannel::CacheShader(const std::string& key,
                              const std::string& shader) {
-  gpu_channel_manager_->Send(
-      new GpuHostMsg_CacheShader(client_id_, key, shader));
+  gpu_channel_manager_->delegate()->StoreShaderToDisk(client_id_, key, shader);
 }
 
 void GpuChannel::AddFilter(IPC::MessageFilter* filter) {
diff --git a/content/common/gpu/gpu_channel_manager.cc b/content/common/gpu/gpu_channel_manager.cc
index 381292b..d5ffd601 100644
--- a/content/common/gpu/gpu_channel_manager.cc
+++ b/content/common/gpu/gpu_channel_manager.cc
@@ -13,11 +13,15 @@
 #include "base/single_thread_task_runner.h"
 #include "base/thread_task_runner_handle.h"
 #include "build/build_config.h"
+#include "content/common/gpu/establish_channel_params.h"
 #include "content/common/gpu/gpu_channel.h"
+#include "content/common/gpu/gpu_channel_manager_delegate.h"
 #include "content/common/gpu/gpu_memory_buffer_factory.h"
 #include "content/common/gpu/gpu_memory_manager.h"
 #include "content/common/gpu/gpu_messages.h"
+#include "content/common/gpu/image_transport_surface.h"
 #include "content/public/common/content_switches.h"
+#include "gpu/command_buffer/common/sync_token.h"
 #include "gpu/command_buffer/common/value_state.h"
 #include "gpu/command_buffer/service/feature_info.h"
 #include "gpu/command_buffer/service/gpu_switches.h"
@@ -30,6 +34,10 @@
 #include "ui/gl/gl_bindings.h"
 #include "ui/gl/gl_share_group.h"
 
+#if defined(OS_MACOSX)
+#include "content/common/gpu/buffer_presented_params_mac.h"
+#endif
+
 namespace content {
 
 namespace {
@@ -44,7 +52,7 @@
 }
 
 GpuChannelManager::GpuChannelManager(
-    IPC::SyncChannel* channel,
+    GpuChannelManagerDelegate* delegate,
     GpuWatchdog* watchdog,
     base::SingleThreadTaskRunner* task_runner,
     base::SingleThreadTaskRunner* io_task_runner,
@@ -53,7 +61,7 @@
     GpuMemoryBufferFactory* gpu_memory_buffer_factory)
     : task_runner_(task_runner),
       io_task_runner_(io_task_runner),
-      channel_(channel),
+      delegate_(delegate),
       watchdog_(watchdog),
       shutdown_event_(shutdown_event),
       share_group_(new gfx::GLShareGroup),
@@ -108,55 +116,33 @@
 }
 
 void GpuChannelManager::RemoveChannel(int client_id) {
-  Send(new GpuHostMsg_DestroyChannel(client_id));
+  delegate_->DidDestroyChannel(client_id);
   gpu_channels_.erase(client_id);
 }
 
-int GpuChannelManager::GenerateRouteID() {
-  static int last_id = 0;
-  return ++last_id;
+#if defined(OS_MACOSX)
+void GpuChannelManager::AddImageTransportSurface(
+    int32_t surface_id,
+    ImageTransportHelper* image_transport_helper) {
+  image_transport_map_.AddWithID(image_transport_helper, surface_id);
 }
 
-void GpuChannelManager::AddRoute(int32_t routing_id, IPC::Listener* listener) {
-  router_.AddRoute(routing_id, listener);
+void GpuChannelManager::RemoveImageTransportSurface(int32_t surface_id) {
+  image_transport_map_.Remove(surface_id);
 }
 
-void GpuChannelManager::RemoveRoute(int32_t routing_id) {
-  router_.RemoveRoute(routing_id);
+void GpuChannelManager::BufferPresented(const BufferPresentedParams& params) {
+  ImageTransportHelper* helper = image_transport_map_.Lookup(params.surface_id);
+  if (helper)
+    helper->BufferPresented(params);
 }
+#endif
 
 GpuChannel* GpuChannelManager::LookupChannel(int32_t client_id) const {
   const auto& it = gpu_channels_.find(client_id);
   return it != gpu_channels_.end() ? it->second : nullptr;
 }
 
-bool GpuChannelManager::OnControlMessageReceived(const IPC::Message& msg) {
-  bool handled = true;
-  IPC_BEGIN_MESSAGE_MAP(GpuChannelManager, msg)
-    IPC_MESSAGE_HANDLER(GpuMsg_EstablishChannel, OnEstablishChannel)
-    IPC_MESSAGE_HANDLER(GpuMsg_CloseChannel, OnCloseChannel)
-    IPC_MESSAGE_HANDLER(GpuMsg_DestroyGpuMemoryBuffer, OnDestroyGpuMemoryBuffer)
-    IPC_MESSAGE_HANDLER(GpuMsg_LoadedShader, OnLoadedShader)
-    IPC_MESSAGE_HANDLER(GpuMsg_UpdateValueState, OnUpdateValueState)
-#if defined(OS_ANDROID)
-    IPC_MESSAGE_HANDLER(GpuMsg_WakeUpGpu, OnWakeUpGpu);
-#endif
-    IPC_MESSAGE_UNHANDLED(handled = false)
-  IPC_END_MESSAGE_MAP()
-  return handled;
-}
-
-bool GpuChannelManager::OnMessageReceived(const IPC::Message& msg) {
-  if (msg.routing_id() == MSG_ROUTING_CONTROL)
-    return OnControlMessageReceived(msg);
-
-  return router_.RouteMessage(msg);
-}
-
-bool GpuChannelManager::Send(IPC::Message* msg) {
-  return channel_->Send(msg);
-}
-
 scoped_ptr<GpuChannel> GpuChannelManager::CreateGpuChannel(
     int client_id,
     uint64_t client_tracing_id,
@@ -171,8 +157,7 @@
                      allow_view_command_buffers, allow_real_time_streams));
 }
 
-void GpuChannelManager::OnEstablishChannel(
-    const GpuMsg_EstablishChannel_Params& params) {
+void GpuChannelManager::EstablishChannel(const EstablishChannelParams& params) {
   scoped_ptr<GpuChannel> channel(CreateGpuChannel(
       params.client_id, params.client_tracing_id, params.preempts,
       params.allow_view_command_buffers, params.allow_real_time_streams));
@@ -180,11 +165,10 @@
 
   gpu_channels_.set(params.client_id, std::move(channel));
 
-  Send(new GpuHostMsg_ChannelEstablished(channel_handle));
+  delegate_->ChannelEstablished(channel_handle);
 }
 
-void GpuChannelManager::OnCloseChannel(
-    const IPC::ChannelHandle& channel_handle) {
+void GpuChannelManager::CloseChannel(const IPC::ChannelHandle& channel_handle) {
   for (auto it = gpu_channels_.begin(); it != gpu_channels_.end(); ++it) {
     if (it->second->channel_id() == channel_handle.name) {
       gpu_channels_.erase(it);
@@ -193,21 +177,22 @@
   }
 }
 
-void GpuChannelManager::DestroyGpuMemoryBuffer(
+void GpuChannelManager::InternalDestroyGpuMemoryBuffer(
     gfx::GpuMemoryBufferId id,
     int client_id) {
   io_task_runner_->PostTask(
-      FROM_HERE, base::Bind(&GpuChannelManager::DestroyGpuMemoryBufferOnIO,
-                            base::Unretained(this), id, client_id));
+      FROM_HERE,
+      base::Bind(&GpuChannelManager::InternalDestroyGpuMemoryBufferOnIO,
+                 base::Unretained(this), id, client_id));
 }
 
-void GpuChannelManager::DestroyGpuMemoryBufferOnIO(
+void GpuChannelManager::InternalDestroyGpuMemoryBufferOnIO(
     gfx::GpuMemoryBufferId id,
     int client_id) {
   gpu_memory_buffer_factory_->DestroyGpuMemoryBuffer(id, client_id);
 }
 
-void GpuChannelManager::OnDestroyGpuMemoryBuffer(
+void GpuChannelManager::DestroyGpuMemoryBuffer(
     gfx::GpuMemoryBufferId id,
     int client_id,
     const gpu::SyncToken& sync_token) {
@@ -218,18 +203,19 @@
     if (release_state) {
       sync_point_client_waiter_->WaitOutOfOrder(
           release_state.get(), sync_token.release_count(),
-          base::Bind(&GpuChannelManager::DestroyGpuMemoryBuffer,
+          base::Bind(&GpuChannelManager::InternalDestroyGpuMemoryBuffer,
                      base::Unretained(this), id, client_id));
       return;
     }
   }
 
   // No sync token or invalid sync token, destroy immediately.
-  DestroyGpuMemoryBuffer(id, client_id);
+  InternalDestroyGpuMemoryBuffer(id, client_id);
 }
 
-void GpuChannelManager::OnUpdateValueState(
-    int client_id, unsigned int target, const gpu::ValueState& state) {
+void GpuChannelManager::UpdateValueState(int client_id,
+                                         unsigned int target,
+                                         const gpu::ValueState& state) {
   // Only pass updated state to the channel corresponding to the
   // render_widget_host where the event originated.
   auto it = gpu_channels_.find(client_id);
@@ -237,7 +223,7 @@
     it->second->HandleUpdateValueState(target, state);
 }
 
-void GpuChannelManager::OnLoadedShader(const std::string& program_proto) {
+void GpuChannelManager::PopulateShaderCache(const std::string& program_proto) {
   if (program_cache())
     program_cache()->LoadProgram(program_proto);
 }
@@ -265,11 +251,11 @@
     kv.second->MarkAllContextsLost();
   }
   task_runner_->PostTask(FROM_HERE,
-                         base::Bind(&GpuChannelManager::OnLoseAllContexts,
+                         base::Bind(&GpuChannelManager::DestroyAllChannels,
                                     weak_factory_.GetWeakPtr()));
 }
 
-void GpuChannelManager::OnLoseAllContexts() {
+void GpuChannelManager::DestroyAllChannels() {
   gpu_channels_.clear();
 }
 
@@ -286,7 +272,7 @@
   last_gpu_access_time_ = base::TimeTicks::Now();
 }
 
-void GpuChannelManager::OnWakeUpGpu() {
+void GpuChannelManager::WakeUpGpu() {
   begin_wake_up_time_ = base::TimeTicks::Now();
   ScheduleWakeUpGpu();
 }
diff --git a/content/common/gpu/gpu_channel_manager.h b/content/common/gpu/gpu_channel_manager.h
index befc599..e76b373 100644
--- a/content/common/gpu/gpu_channel_manager.h
+++ b/content/common/gpu/gpu_channel_manager.h
@@ -12,6 +12,7 @@
 #include <vector>
 
 #include "base/containers/scoped_ptr_hash_map.h"
+#include "base/id_map.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
@@ -20,12 +21,11 @@
 #include "content/common/content_export.h"
 #include "content/common/content_param_traits.h"
 #include "content/common/gpu/gpu_memory_manager.h"
-#include "ipc/ipc_listener.h"
-#include "ipc/ipc_sender.h"
-#include "ipc/message_router.h"
+#include "gpu/command_buffer/common/constants.h"
 #include "ui/gfx/gpu_memory_buffer.h"
 #include "ui/gfx/native_widget_types.h"
 #include "ui/gl/gl_surface.h"
+#include "url/gurl.h"
 
 namespace base {
 class WaitableEvent;
@@ -51,46 +51,60 @@
 
 namespace IPC {
 struct ChannelHandle;
-class SyncChannel;
 }
 
-struct GPUCreateCommandBufferConfig;
-struct GpuMsg_EstablishChannel_Params;
-
 namespace content {
 class GpuChannel;
+class GpuChannelManagerDelegate;
 class GpuMemoryBufferFactory;
 class GpuWatchdog;
+class ImageTransportHelper;
+struct EstablishChannelParams;
+#if defined(OS_MACOSX)
+struct BufferPresentedParams;
+#endif
 
 // A GpuChannelManager is a thread responsible for issuing rendering commands
 // managing the lifetimes of GPU channels and forwarding IPC requests from the
 // browser process to them based on the corresponding renderer ID.
-class CONTENT_EXPORT GpuChannelManager : public IPC::Listener,
-                                         public IPC::Sender {
+class CONTENT_EXPORT GpuChannelManager {
  public:
-  GpuChannelManager(IPC::SyncChannel* channel,
+  GpuChannelManager(GpuChannelManagerDelegate* delegate,
                     GpuWatchdog* watchdog,
                     base::SingleThreadTaskRunner* task_runner,
                     base::SingleThreadTaskRunner* io_task_runner,
                     base::WaitableEvent* shutdown_event,
                     gpu::SyncPointManager* sync_point_manager,
                     GpuMemoryBufferFactory* gpu_memory_buffer_factory);
-  ~GpuChannelManager() override;
+  virtual ~GpuChannelManager();
+
+  GpuChannelManagerDelegate* delegate() const { return delegate_; }
+
+  void EstablishChannel(const EstablishChannelParams& params);
+  void CloseChannel(const IPC::ChannelHandle& channel_handle);
+  void PopulateShaderCache(const std::string& shader);
+  void DestroyGpuMemoryBuffer(gfx::GpuMemoryBufferId id,
+                              int client_id,
+                              const gpu::SyncToken& sync_token);
+  void UpdateValueState(int client_id,
+                        unsigned int target,
+                        const gpu::ValueState& state);
+#if defined(OS_ANDROID)
+  void WakeUpGpu();
+#endif
+  void DestroyAllChannels();
 
   // Remove the channel for a particular renderer.
   void RemoveChannel(int client_id);
 
-  // Listener overrides.
-  bool OnMessageReceived(const IPC::Message& msg) override;
-
-  // Sender overrides.
-  bool Send(IPC::Message* msg) override;
-
   void LoseAllContexts();
 
-  int GenerateRouteID();
-  void AddRoute(int32_t routing_id, IPC::Listener* listener);
-  void RemoveRoute(int32_t routing_id);
+#if defined(OS_MACOSX)
+  void AddImageTransportSurface(int32_t routing_id,
+                                ImageTransportHelper* image_transport_helper);
+  void RemoveImageTransportSurface(int32_t routing_id);
+  void BufferPresented(const BufferPresentedParams& params);
+#endif
 
   gpu::gles2::ProgramCache* program_cache();
   gpu::gles2::ShaderTranslatorCache* shader_translator_cache();
@@ -147,33 +161,18 @@
   base::ScopedPtrHashMap<int32_t, scoped_ptr<GpuChannel>> gpu_channels_;
 
  private:
-  // Message handlers.
-  bool OnControlMessageReceived(const IPC::Message& msg);
-  void OnEstablishChannel(const GpuMsg_EstablishChannel_Params& params);
-  void OnCloseChannel(const IPC::ChannelHandle& channel_handle);
-  void OnVisibilityChanged(int32_t render_view_id,
-                           int32_t client_id,
-                           bool visible);
-  void OnLoadedShader(const std::string& shader);
-  void DestroyGpuMemoryBuffer(gfx::GpuMemoryBufferId id, int client_id);
-  void DestroyGpuMemoryBufferOnIO(gfx::GpuMemoryBufferId id, int client_id);
-  void OnDestroyGpuMemoryBuffer(gfx::GpuMemoryBufferId id,
-                                int client_id,
-                                const gpu::SyncToken& sync_token);
-
-  void OnUpdateValueState(int client_id,
-                          unsigned int target,
-                          const gpu::ValueState& state);
+  void InternalDestroyGpuMemoryBuffer(gfx::GpuMemoryBufferId id, int client_id);
+  void InternalDestroyGpuMemoryBufferOnIO(gfx::GpuMemoryBufferId id,
+                                          int client_id);
 #if defined(OS_ANDROID)
-  void OnWakeUpGpu();
   void ScheduleWakeUpGpu();
   void DoWakeUpGpu();
 #endif
-  void OnLoseAllContexts();
 
-  // Used to send and receive IPC messages from the browser process.
-  IPC::SyncChannel* const channel_;
-  IPC::MessageRouter router_;
+  GpuChannelManagerDelegate* const delegate_;
+#if defined(OS_MACOSX)
+  IDMap<ImageTransportHelper> image_transport_map_;
+#endif
 
   GpuWatchdog* watchdog_;
 
diff --git a/content/common/gpu/gpu_channel_manager_delegate.h b/content/common/gpu/gpu_channel_manager_delegate.h
new file mode 100644
index 0000000..c05556a
--- /dev/null
+++ b/content/common/gpu/gpu_channel_manager_delegate.h
@@ -0,0 +1,79 @@
+// 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_GPU_GPU_CHANNEL_MANAGER_DELEGATE_H_
+#define CONTENT_COMMON_GPU_GPU_CHANNEL_MANAGER_DELEGATE_H_
+
+#include "gpu/command_buffer/common/constants.h"
+#include "ui/gfx/native_widget_types.h"
+
+class GURL;
+
+namespace IPC {
+struct ChannelHandle;
+}
+
+namespace content {
+
+struct AcceleratedSurfaceBuffersSwappedParams;
+struct GPUMemoryUmaStats;
+
+class GpuChannelManagerDelegate {
+ public:
+  // Tells the delegate that a context has subscribed to a new target and
+  // the browser should start sending the corresponding information
+  virtual void AddSubscription(int32_t client_id, unsigned int target) = 0;
+
+  // Response from GPU to an EstablishChannel request.
+  virtual void ChannelEstablished(const IPC::ChannelHandle& channel_handle) = 0;
+
+  // Tells the delegate that an offscreen context was created for the provided
+  // |active_url|.
+  virtual void DidCreateOffscreenContext(const GURL& active_url) = 0;
+
+  // Notification from GPU that the channel is destroyed.
+  virtual void DidDestroyChannel(int client_id) = 0;
+
+  // Tells the delegate that an offscreen context was destroyed for the provided
+  // |active_url|.
+  virtual void DidDestroyOffscreenContext(const GURL& active_url) = 0;
+
+  // Tells the delegate that a context was lost.
+  virtual void DidLoseContext(bool offscreen,
+                              gpu::error::ContextLostReason reason,
+                              const GURL& active_url) = 0;
+
+  // Tells the delegate about GPU memory usage statistics for UMA logging.
+  virtual void GpuMemoryUmaStats(const GPUMemoryUmaStats& params) = 0;
+
+  // Tells the delegate that no contexts are subscribed to the target anymore
+  // so the delegate should stop sending the corresponding information.
+  virtual void RemoveSubscription(int32_t client_id, unsigned int target) = 0;
+
+  // Tells the delegate to cache the given shader information in persistent
+  // storage. The embedder is expected to repopulate the in-memory cache through
+  // the respective GpuChannelManager API.
+  virtual void StoreShaderToDisk(int32_t client_id,
+                                 const std::string& key,
+                                 const std::string& shader) = 0;
+
+#if defined(OS_MACOSX)
+  // Tells the delegate that an accelerated surface has swapped.
+  virtual void SendAcceleratedSurfaceBuffersSwapped(
+      const AcceleratedSurfaceBuffersSwappedParams& params) = 0;
+#endif
+
+#if defined(OS_WIN)
+  virtual void SendAcceleratedSurfaceCreatedChildWindow(
+      const gfx::PluginWindowHandle& parent_window,
+      const gfx::PluginWindowHandle& child_window) = 0;
+#endif
+
+ protected:
+  virtual ~GpuChannelManagerDelegate() {}
+};
+
+}  // namespace content
+
+#endif  // CONTENT_COMMON_GPU_GPU_CHANNEL_MANAGER_DELEGATE_H_
diff --git a/content/common/gpu/gpu_channel_manager_unittest.cc b/content/common/gpu/gpu_channel_manager_unittest.cc
index 984de95..f279d006 100644
--- a/content/common/gpu/gpu_channel_manager_unittest.cc
+++ b/content/common/gpu/gpu_channel_manager_unittest.cc
@@ -5,14 +5,13 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#include "content/common/gpu/establish_channel_params.h"
 #include "content/common/gpu/gpu_channel.h"
 #include "content/common/gpu/gpu_channel_manager.h"
 #include "content/common/gpu/gpu_channel_test_common.h"
-#include "content/common/gpu/gpu_messages.h"
 #include "gpu/command_buffer/common/value_state.h"
 #include "gpu/command_buffer/service/gl_utils.h"
 #include "gpu/command_buffer/service/valuebuffer_manager.h"
-#include "ipc/ipc_test_sink.h"
 
 using gpu::gles2::ValuebufferManager;
 using gpu::ValueState;
@@ -31,26 +30,20 @@
 
   ASSERT_TRUE(channel_manager());
 
-  GpuMsg_EstablishChannel_Params params;
+  EstablishChannelParams params;
   params.client_id = kClientId;
   params.client_tracing_id = kClientTracingId;
   params.preempts = false;
   params.allow_view_command_buffers = false;
   params.allow_real_time_streams = false;
-  EXPECT_TRUE(
-      channel_manager()->OnMessageReceived(GpuMsg_EstablishChannel(params)));
-  EXPECT_EQ((size_t)1, sink()->message_count());
-  const IPC::Message* msg =
-      sink()->GetUniqueMessageMatching(GpuHostMsg_ChannelEstablished::ID);
-  ASSERT_TRUE(msg);
-  base::Tuple<IPC::ChannelHandle> handle;
-  ASSERT_TRUE(GpuHostMsg_ChannelEstablished::Read(msg, &handle));
-  EXPECT_NE("", base::get<0>(handle).name);
-  sink()->ClearMessages();
+  channel_manager()->EstablishChannel(params);
+  IPC::ChannelHandle handle =
+      channel_manager_delegate()->last_established_channel_handle();
+  EXPECT_NE("", handle.name);
 
   GpuChannel* channel = channel_manager()->LookupChannel(kClientId);
   ASSERT_TRUE(channel);
-  EXPECT_EQ(base::get<0>(handle).name, channel->channel_id());
+  EXPECT_EQ(handle.name, channel->channel_id());
 }
 
 TEST_F(GpuChannelManagerTest, SecureValueStateForwarding) {
@@ -72,31 +65,29 @@
   ASSERT_TRUE(channel_manager());
 
   // Initialize gpu channels
-  GpuMsg_EstablishChannel_Params params;
+  EstablishChannelParams params;
   params.client_id = kClientId1;
   params.client_tracing_id = kClientTracingId1;
   params.preempts = false;
   params.allow_view_command_buffers = false;
   params.allow_real_time_streams = false;
-  EXPECT_TRUE(
-      channel_manager()->OnMessageReceived(GpuMsg_EstablishChannel(params)));
+  channel_manager()->EstablishChannel(params);
   GpuChannel* channel1 = channel_manager()->LookupChannel(kClientId1);
   ASSERT_TRUE(channel1);
 
   params.client_id = kClientId2;
   params.client_tracing_id = kClientTracingId2;
-  EXPECT_TRUE(
-      channel_manager()->OnMessageReceived(GpuMsg_EstablishChannel(params)));
+  channel_manager()->EstablishChannel(params);
   GpuChannel* channel2 = channel_manager()->LookupChannel(kClientId2);
   ASSERT_TRUE(channel2);
 
   EXPECT_NE(channel1, channel2);
 
   // Make sure value states are only accessible by proper channels
-  channel_manager()->OnMessageReceived(GpuMsg_UpdateValueState(
-      kClientId1, GL_MOUSE_POSITION_CHROMIUM, value_state1));
-  channel_manager()->OnMessageReceived(GpuMsg_UpdateValueState(
-      kClientId2, GL_MOUSE_POSITION_CHROMIUM, value_state2));
+  channel_manager()->UpdateValueState(kClientId1, GL_MOUSE_POSITION_CHROMIUM,
+                                      value_state1);
+  channel_manager()->UpdateValueState(kClientId2, GL_MOUSE_POSITION_CHROMIUM,
+                                      value_state2);
 
   const gpu::ValueStateMap* pending_value_buffer_state1 =
       channel1->pending_valuebuffer_state();
diff --git a/content/common/gpu/gpu_channel_test_common.cc b/content/common/gpu/gpu_channel_test_common.cc
index 2e8be03c..ad83c2d 100644
--- a/content/common/gpu/gpu_channel_test_common.cc
+++ b/content/common/gpu/gpu_channel_test_common.cc
@@ -6,25 +6,72 @@
 
 #include "base/test/test_simple_task_runner.h"
 #include "base/thread_task_runner_handle.h"
+#include "content/common/gpu/gpu_channel_manager_delegate.h"
 #include "gpu/command_buffer/service/sync_point_manager.h"
 #include "ipc/ipc_test_sink.h"
 
 namespace content {
 
+TestGpuChannelManagerDelegate::TestGpuChannelManagerDelegate() {}
+
+TestGpuChannelManagerDelegate::~TestGpuChannelManagerDelegate() {}
+
+void TestGpuChannelManagerDelegate::AddSubscription(int32_t client_id,
+                                                    unsigned int target) {}
+
+void TestGpuChannelManagerDelegate::ChannelEstablished(
+    const IPC::ChannelHandle& channel_handle) {
+  last_established_channel_handle_ = channel_handle;
+}
+
+void TestGpuChannelManagerDelegate::DidCreateOffscreenContext(
+    const GURL& active_url) {}
+
+void TestGpuChannelManagerDelegate::DidDestroyChannel(int client_id) {}
+
+void TestGpuChannelManagerDelegate::DidDestroyOffscreenContext(
+    const GURL& active_url) {}
+
+void TestGpuChannelManagerDelegate::DidLoseContext(
+    bool offscreen,
+    gpu::error::ContextLostReason reason,
+    const GURL& active_url) {}
+
+void TestGpuChannelManagerDelegate::GpuMemoryUmaStats(
+    const GPUMemoryUmaStats& params) {}
+
+void TestGpuChannelManagerDelegate::RemoveSubscription(int32_t client_id,
+                                                       unsigned int target) {}
+
+void TestGpuChannelManagerDelegate::StoreShaderToDisk(
+    int32_t client_id,
+    const std::string& key,
+    const std::string& shader) {}
+
+#if defined(OS_MACOSX)
+void TestGpuChannelManagerDelegate::SendAcceleratedSurfaceBuffersSwapped(
+    const AcceleratedSurfaceBuffersSwappedParams& params) {}
+#endif
+
+#if defined(OS_WIN)
+void TestGpuChannelManagerDelegate::SendAcceleratedSurfaceCreatedChildWindow(
+    const gfx::PluginWindowHandle& parent_window,
+    const gfx::PluginWindowHandle& child_window) {}
+#endif
+
 TestGpuChannelManager::TestGpuChannelManager(
-    IPC::TestSink* sink,
+    GpuChannelManagerDelegate* delegate,
     base::SingleThreadTaskRunner* task_runner,
     base::SingleThreadTaskRunner* io_task_runner,
     gpu::SyncPointManager* sync_point_manager,
     GpuMemoryBufferFactory* gpu_memory_buffer_factory)
-    : GpuChannelManager(nullptr,
+    : GpuChannelManager(delegate,
                         nullptr,
                         task_runner,
                         io_task_runner,
                         nullptr,
                         sync_point_manager,
-                        gpu_memory_buffer_factory),
-      sink_(sink) {}
+                        gpu_memory_buffer_factory) {}
 
 TestGpuChannelManager::~TestGpuChannelManager() {
   // Clear gpu channels here so that any IPC messages sent are handled using the
@@ -32,10 +79,6 @@
   gpu_channels_.clear();
 }
 
-bool TestGpuChannelManager::Send(IPC::Message* msg) {
-  return sink_->Send(msg);
-}
-
 scoped_ptr<GpuChannel> TestGpuChannelManager::CreateGpuChannel(
     int client_id,
     uint64_t client_tracing_id,
@@ -43,15 +86,14 @@
     bool allow_view_command_buffers,
     bool allow_real_time_streams) {
   return make_scoped_ptr(new TestGpuChannel(
-      sink_, this, sync_point_manager(), share_group(), mailbox_manager(),
+      this, sync_point_manager(), share_group(), mailbox_manager(),
       preempts ? preemption_flag() : nullptr,
       preempts ? nullptr : preemption_flag(), task_runner_.get(),
       io_task_runner_.get(), client_id, client_tracing_id,
       allow_view_command_buffers, allow_real_time_streams));
 }
 
-TestGpuChannel::TestGpuChannel(IPC::TestSink* sink,
-                               GpuChannelManager* gpu_channel_manager,
+TestGpuChannel::TestGpuChannel(GpuChannelManager* gpu_channel_manager,
                                gpu::SyncPointManager* sync_point_manager,
                                gfx::GLShareGroup* share_group,
                                gpu::gles2::MailboxManager* mailbox_manager,
@@ -75,8 +117,7 @@
                  client_id,
                  client_tracing_id,
                  allow_view_command_buffers,
-                 allow_real_time_streams),
-      sink_(sink) {}
+                 allow_real_time_streams) {}
 
 TestGpuChannel::~TestGpuChannel() {
   // Call stubs here so that any IPC messages sent are handled using the
@@ -89,26 +130,27 @@
 }
 
 IPC::ChannelHandle TestGpuChannel::Init(base::WaitableEvent* shutdown_event) {
-  filter_->OnFilterAdded(sink_);
+  filter_->OnFilterAdded(&sink_);
   return IPC::ChannelHandle(channel_id());
 }
 
 bool TestGpuChannel::Send(IPC::Message* msg) {
   DCHECK(!msg->is_sync());
-  return sink_->Send(msg);
+  return sink_.Send(msg);
 }
 
 // TODO(sunnyps): Use a mock memory buffer factory when necessary.
 GpuChannelTestCommon::GpuChannelTestCommon()
-    : sink_(new IPC::TestSink),
-      task_runner_(new base::TestSimpleTaskRunner),
+    : task_runner_(new base::TestSimpleTaskRunner),
       io_task_runner_(new base::TestSimpleTaskRunner),
       sync_point_manager_(new gpu::SyncPointManager(false)),
-      channel_manager_(new TestGpuChannelManager(sink_.get(),
-                                                 task_runner_.get(),
-                                                 io_task_runner_.get(),
-                                                 sync_point_manager_.get(),
-                                                 nullptr)) {}
+      channel_manager_delegate_(new TestGpuChannelManagerDelegate()),
+      channel_manager_(
+          new TestGpuChannelManager(channel_manager_delegate_.get(),
+                                    task_runner_.get(),
+                                    io_task_runner_.get(),
+                                    sync_point_manager_.get(),
+                                    nullptr)) {}
 
 GpuChannelTestCommon::~GpuChannelTestCommon() {
   // Destroying channels causes tasks to run on the IO task runner.
diff --git a/content/common/gpu/gpu_channel_test_common.h b/content/common/gpu/gpu_channel_test_common.h
index d3243b51..fc56738 100644
--- a/content/common/gpu/gpu_channel_test_common.h
+++ b/content/common/gpu/gpu_channel_test_common.h
@@ -7,6 +7,8 @@
 #include "base/memory/scoped_ptr.h"
 #include "content/common/gpu/gpu_channel.h"
 #include "content/common/gpu/gpu_channel_manager.h"
+#include "content/common/gpu/gpu_channel_manager_delegate.h"
+#include "ipc/ipc_test_sink.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
 namespace base {
@@ -21,18 +23,54 @@
 
 class SyncPointManager;
 
+class TestGpuChannelManagerDelegate : public GpuChannelManagerDelegate {
+ public:
+  TestGpuChannelManagerDelegate();
+  ~TestGpuChannelManagerDelegate() override;
+
+  const IPC::ChannelHandle& last_established_channel_handle() const {
+    return last_established_channel_handle_;
+  }
+
+ private:
+  // GpuChannelManagerDelegate implementation:
+  void AddSubscription(int32_t client_id, unsigned int target) override;
+  void ChannelEstablished(const IPC::ChannelHandle& channel_handle) override;
+  void DidCreateOffscreenContext(const GURL& active_url) override;
+  void DidDestroyChannel(int client_id) override;
+  void DidDestroyOffscreenContext(const GURL& active_url) override;
+  void DidLoseContext(bool offscreen,
+                      gpu::error::ContextLostReason reason,
+                      const GURL& active_url) override;
+  void GpuMemoryUmaStats(const GPUMemoryUmaStats& params) override;
+  void RemoveSubscription(int32_t client_id, unsigned int target) override;
+  void StoreShaderToDisk(int32_t client_id,
+                         const std::string& key,
+                         const std::string& shader) override;
+#if defined(OS_MACOSX)
+  void SendAcceleratedSurfaceBuffersSwapped(
+      const AcceleratedSurfaceBuffersSwappedParams& params) override;
+#endif
+#if defined(OS_WIN)
+  void SendAcceleratedSurfaceCreatedChildWindow(
+      const gfx::PluginWindowHandle& parent_window,
+      const gfx::PluginWindowHandle& child_window) override;
+#endif
+
+  IPC::ChannelHandle last_established_channel_handle_;
+
+  DISALLOW_COPY_AND_ASSIGN(TestGpuChannelManagerDelegate);
+};
+
 class TestGpuChannelManager : public GpuChannelManager {
  public:
-  TestGpuChannelManager(IPC::TestSink* sink,
+  TestGpuChannelManager(GpuChannelManagerDelegate* delegate,
                         base::SingleThreadTaskRunner* task_runner,
                         base::SingleThreadTaskRunner* io_task_runner,
                         gpu::SyncPointManager* sync_point_manager,
                         GpuMemoryBufferFactory* gpu_memory_buffer_factory);
   ~TestGpuChannelManager() override;
 
-  // IPC::Sender implementation.
-  bool Send(IPC::Message* msg) override;
-
  protected:
   scoped_ptr<GpuChannel> CreateGpuChannel(
       int client_id,
@@ -40,15 +78,11 @@
       bool preempts,
       bool allow_view_command_buffers,
       bool allow_real_time_streams) override;
-
- private:
-  IPC::TestSink* const sink_;
 };
 
 class TestGpuChannel : public GpuChannel {
  public:
-  TestGpuChannel(IPC::TestSink* sink,
-                 GpuChannelManager* gpu_channel_manager,
+  TestGpuChannel(GpuChannelManager* gpu_channel_manager,
                  gpu::SyncPointManager* sync_point_manager,
                  gfx::GLShareGroup* share_group,
                  gpu::gles2::MailboxManager* mailbox_manager,
@@ -62,6 +96,7 @@
                  bool allow_real_time_streams);
   ~TestGpuChannel() override;
 
+  IPC::TestSink* sink() { return &sink_; }
   base::ProcessId GetClientPID() const override;
 
   IPC::ChannelHandle Init(base::WaitableEvent* shutdown_event) override;
@@ -70,7 +105,7 @@
   bool Send(IPC::Message* msg) override;
 
  private:
-  IPC::TestSink* const sink_;
+  IPC::TestSink sink_;
 };
 
 class GpuChannelTestCommon : public testing::Test {
@@ -79,15 +114,17 @@
   ~GpuChannelTestCommon() override;
 
  protected:
-  IPC::TestSink* sink() { return sink_.get(); }
   GpuChannelManager* channel_manager() { return channel_manager_.get(); }
+  TestGpuChannelManagerDelegate* channel_manager_delegate() {
+    return channel_manager_delegate_.get();
+  }
   base::TestSimpleTaskRunner* task_runner() { return task_runner_.get(); }
 
  private:
-  scoped_ptr<IPC::TestSink> sink_;
   scoped_refptr<base::TestSimpleTaskRunner> task_runner_;
   scoped_refptr<base::TestSimpleTaskRunner> io_task_runner_;
   scoped_ptr<gpu::SyncPointManager> sync_point_manager_;
+  scoped_ptr<TestGpuChannelManagerDelegate> channel_manager_delegate_;
   scoped_ptr<GpuChannelManager> channel_manager_;
 };
 
diff --git a/content/common/gpu/gpu_channel_unittest.cc b/content/common/gpu/gpu_channel_unittest.cc
index cecd765..2b0ba2c 100644
--- a/content/common/gpu/gpu_channel_unittest.cc
+++ b/content/common/gpu/gpu_channel_unittest.cc
@@ -5,6 +5,7 @@
 #include <stdint.h>
 
 #include "base/test/test_simple_task_runner.h"
+#include "content/common/gpu/establish_channel_params.h"
 #include "content/common/gpu/gpu_channel.h"
 #include "content/common/gpu/gpu_channel_manager.h"
 #include "content/common/gpu/gpu_channel_test_common.h"
@@ -23,23 +24,22 @@
                             bool allow_real_time_streams) {
     DCHECK(channel_manager());
     uint64_t kClientTracingId = 1;
-    GpuMsg_EstablishChannel_Params params;
+    EstablishChannelParams params;
     params.client_id = client_id;
     params.client_tracing_id = kClientTracingId;
     params.preempts = false;
     params.allow_view_command_buffers = allow_view_command_buffers;
     params.allow_real_time_streams = allow_real_time_streams;
-    EXPECT_TRUE(
-        channel_manager()->OnMessageReceived(GpuMsg_EstablishChannel(params)));
-    sink()->ClearMessages();
+    channel_manager()->EstablishChannel(params);
     return channel_manager()->LookupChannel(client_id);
   }
 
   void HandleMessage(GpuChannel* channel, IPC::Message* msg) {
-    channel->HandleMessageForTesting(*msg);
+    TestGpuChannel* test_channel = static_cast<TestGpuChannel*>(channel);
+    test_channel->HandleMessageForTesting(*msg);
 
     if (msg->is_sync()) {
-      const IPC::Message* reply_msg = sink()->GetMessageAt(0);
+      const IPC::Message* reply_msg = test_channel->sink()->GetMessageAt(0);
       ASSERT_TRUE(reply_msg);
 
       EXPECT_TRUE(IPC::SyncMessage::IsMessageReplyTo(
@@ -52,7 +52,7 @@
 
       delete deserializer;
 
-      sink()->ClearMessages();
+      test_channel->sink()->ClearMessages();
     }
 
     delete msg;
diff --git a/content/common/gpu/gpu_command_buffer_stub.cc b/content/common/gpu/gpu_command_buffer_stub.cc
index 5fd4726..eae3cd4 100644
--- a/content/common/gpu/gpu_command_buffer_stub.cc
+++ b/content/common/gpu/gpu_command_buffer_stub.cc
@@ -18,6 +18,7 @@
 #include "build/build_config.h"
 #include "content/common/gpu/gpu_channel.h"
 #include "content/common/gpu/gpu_channel_manager.h"
+#include "content/common/gpu/gpu_channel_manager_delegate.h"
 #include "content/common/gpu/gpu_memory_manager.h"
 #include "content/common/gpu/gpu_memory_tracking.h"
 #include "content/common/gpu/gpu_messages.h"
@@ -467,10 +468,8 @@
 
   if (initialized_) {
     GpuChannelManager* gpu_channel_manager = channel_->gpu_channel_manager();
-    if (handle_.is_null() && !active_url_.is_empty()) {
-      gpu_channel_manager->Send(
-          new GpuHostMsg_DidDestroyOffscreenContext(active_url_));
-    }
+    if (handle_.is_null() && !active_url_.is_empty())
+      gpu_channel_manager->delegate()->DidDestroyOffscreenContext(active_url_);
   }
 
   if (decoder_)
@@ -669,10 +668,8 @@
       reply_message, true, capabilities);
   Send(reply_message);
 
-  if (handle_.is_null() && !active_url_.is_empty()) {
-    manager->Send(new GpuHostMsg_DidCreateOffscreenContext(
-        active_url_));
-  }
+  if (handle_.is_null() && !active_url_.is_empty())
+    manager->delegate()->DidCreateOffscreenContext(active_url_);
 
   initialized_ = true;
 }
@@ -735,8 +732,8 @@
   // determine whether client APIs like WebGL need to be immediately
   // blocked from automatically running.
   GpuChannelManager* gpu_channel_manager = channel_->gpu_channel_manager();
-  gpu_channel_manager->Send(new GpuHostMsg_DidLoseContext(
-      handle_.is_null(), state.context_lost_reason, active_url_));
+  gpu_channel_manager->delegate()->DidLoseContext(
+      handle_.is_null(), state.context_lost_reason, active_url_);
 
   CheckContextLost();
 }
diff --git a/content/common/gpu/gpu_host_messages.h b/content/common/gpu/gpu_host_messages.h
new file mode 100644
index 0000000..743024f
--- /dev/null
+++ b/content/common/gpu/gpu_host_messages.h
@@ -0,0 +1,276 @@
+// 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.
+
+// Multiply-included message file, hence no include guard here, but see below
+// for a much smaller-than-usual include guard section.
+
+#include "build/build_config.h"
+#include "content/common/content_export.h"
+#include "content/common/content_param_traits.h"
+#include "content/common/gpu/establish_channel_params.h"
+#include "content/common/gpu/gpu_memory_uma_stats.h"
+#include "content/common/gpu/gpu_process_launch_causes.h"
+#include "content/public/common/common_param_traits.h"
+#include "content/public/common/gpu_memory_stats.h"
+#include "gpu/command_buffer/common/sync_token.h"
+#include "gpu/command_buffer/common/value_state.h"
+#include "gpu/config/gpu_info.h"
+#include "ipc/ipc_channel_handle.h"
+#include "ipc/ipc_message_macros.h"
+#include "ipc/ipc_message_start.h"
+#include "ui/gfx/gpu_memory_buffer.h"
+#include "ui/gfx/ipc/gfx_param_traits.h"
+#include "ui/gfx/native_widget_types.h"
+#include "url/gurl.h"
+
+#if defined(OS_MACOSX)
+#include "content/common/gpu/accelerated_surface_buffers_swapped_params_mac.h"
+#include "content/common/gpu/buffer_presented_params_mac.h"
+#include "ui/base/cocoa/remote_layer_api.h"
+#include "ui/gfx/mac/io_surface.h"
+#endif
+
+#undef IPC_MESSAGE_EXPORT
+#define IPC_MESSAGE_EXPORT CONTENT_EXPORT
+
+#define IPC_MESSAGE_START GpuMsgStart
+
+IPC_ENUM_TRAITS_MAX_VALUE(content::CauseForGpuLaunch,
+                          content::CAUSE_FOR_GPU_LAUNCH_MAX_ENUM - 1)
+
+IPC_STRUCT_TRAITS_BEGIN(content::GPUMemoryUmaStats)
+  IPC_STRUCT_TRAITS_MEMBER(bytes_allocated_current)
+  IPC_STRUCT_TRAITS_MEMBER(bytes_allocated_max)
+IPC_STRUCT_TRAITS_END()
+
+IPC_STRUCT_TRAITS_BEGIN(content::GPUVideoMemoryUsageStats)
+  IPC_STRUCT_TRAITS_MEMBER(process_map)
+  IPC_STRUCT_TRAITS_MEMBER(bytes_allocated)
+  IPC_STRUCT_TRAITS_MEMBER(bytes_allocated_historical_max)
+IPC_STRUCT_TRAITS_END()
+
+IPC_STRUCT_TRAITS_BEGIN(content::GPUVideoMemoryUsageStats::ProcessStats)
+  IPC_STRUCT_TRAITS_MEMBER(video_memory)
+  IPC_STRUCT_TRAITS_MEMBER(has_duplicates)
+IPC_STRUCT_TRAITS_END()
+
+IPC_STRUCT_BEGIN(GpuMsg_CreateGpuMemoryBuffer_Params)
+  IPC_STRUCT_MEMBER(gfx::GpuMemoryBufferId, id)
+  IPC_STRUCT_MEMBER(gfx::Size, size)
+  IPC_STRUCT_MEMBER(gfx::BufferFormat, format)
+  IPC_STRUCT_MEMBER(gfx::BufferUsage, usage)
+  IPC_STRUCT_MEMBER(int32_t, client_id)
+  IPC_STRUCT_MEMBER(gfx::PluginWindowHandle, surface_handle)
+IPC_STRUCT_END()
+
+IPC_STRUCT_BEGIN(GpuMsg_CreateGpuMemoryBufferFromHandle_Params)
+  IPC_STRUCT_MEMBER(gfx::GpuMemoryBufferHandle, handle)
+  IPC_STRUCT_MEMBER(gfx::GpuMemoryBufferId, id)
+  IPC_STRUCT_MEMBER(gfx::Size, size)
+  IPC_STRUCT_MEMBER(gfx::BufferFormat, format)
+  IPC_STRUCT_MEMBER(int32_t, client_id)
+IPC_STRUCT_END()
+
+IPC_STRUCT_TRAITS_BEGIN(content::EstablishChannelParams)
+  IPC_STRUCT_TRAITS_MEMBER(client_id)
+  IPC_STRUCT_TRAITS_MEMBER(client_tracing_id)
+  IPC_STRUCT_TRAITS_MEMBER(preempts)
+  IPC_STRUCT_TRAITS_MEMBER(allow_view_command_buffers)
+  IPC_STRUCT_TRAITS_MEMBER(allow_real_time_streams)
+IPC_STRUCT_TRAITS_END()
+
+#if defined(OS_MACOSX)
+IPC_STRUCT_TRAITS_BEGIN(content::AcceleratedSurfaceBuffersSwappedParams)
+  IPC_STRUCT_TRAITS_MEMBER(surface_id)
+  // Only one of ca_context_id or io_surface may be non-0.
+  IPC_STRUCT_TRAITS_MEMBER(ca_context_id)
+  IPC_STRUCT_TRAITS_MEMBER(io_surface)
+  IPC_STRUCT_TRAITS_MEMBER(size)
+  IPC_STRUCT_TRAITS_MEMBER(scale_factor)
+  IPC_STRUCT_TRAITS_MEMBER(latency_info)
+IPC_STRUCT_TRAITS_END()
+
+IPC_STRUCT_TRAITS_BEGIN(content::BufferPresentedParams)
+  // The vsync parameters, to synchronize presentation with the display.
+  IPC_STRUCT_TRAITS_MEMBER(surface_id)
+  IPC_STRUCT_TRAITS_MEMBER(vsync_timebase)
+  IPC_STRUCT_TRAITS_MEMBER(vsync_interval)
+IPC_STRUCT_TRAITS_END()
+#endif
+
+//------------------------------------------------------------------------------
+// GPU Messages
+// These are messages from the browser to the GPU process.
+
+// Tells the GPU process to initialize itself. The browser explicitly
+// requests this be done so that we are guaranteed that the channel is set
+// up between the browser and GPU process before doing any work that might
+// potentially crash the GPU process. Detection of the child process
+// exiting abruptly is predicated on having the IPC channel set up.
+IPC_MESSAGE_CONTROL0(GpuMsg_Initialize)
+
+// Tells the GPU process to shutdown itself.
+IPC_MESSAGE_CONTROL0(GpuMsg_Finalize)
+
+// Tells the GPU process to create a new channel for communication with a
+// given client.  The channel name is returned in a
+// GpuHostMsg_ChannelEstablished message.  The client ID is passed so
+// that
+// the GPU process reuses an existing channel to that process if it exists.
+// This ID is a unique opaque identifier generated by the browser process.
+// The client_tracing_id is a unique ID used for the purposes of tracing.
+IPC_MESSAGE_CONTROL1(GpuMsg_EstablishChannel,
+                     content::EstablishChannelParams /* params */)
+
+// Tells the GPU process to close the channel identified by IPC channel
+// handle.  If no channel can be identified, do nothing.
+IPC_MESSAGE_CONTROL1(GpuMsg_CloseChannel,
+                     IPC::ChannelHandle /* channel_handle */)
+
+// Tells the GPU process to create a new gpu memory buffer.
+IPC_MESSAGE_CONTROL1(GpuMsg_CreateGpuMemoryBuffer,
+                     GpuMsg_CreateGpuMemoryBuffer_Params)
+
+// Tells the GPU process to create a new gpu memory buffer from an existing
+// handle.
+IPC_MESSAGE_CONTROL1(GpuMsg_CreateGpuMemoryBufferFromHandle,
+                     GpuMsg_CreateGpuMemoryBufferFromHandle_Params)
+
+// Tells the GPU process to destroy buffer.
+IPC_MESSAGE_CONTROL3(GpuMsg_DestroyGpuMemoryBuffer,
+                     gfx::GpuMemoryBufferId, /* id */
+                     int32_t,                /* client_id */
+                     gpu::SyncToken /* sync_token */)
+
+// Tells the GPU process to create a context for collecting graphics card
+// information.
+IPC_MESSAGE_CONTROL0(GpuMsg_CollectGraphicsInfo)
+
+// Tells the GPU process to report video_memory information for the task manager
+IPC_MESSAGE_CONTROL0(GpuMsg_GetVideoMemoryUsageStats)
+
+#if defined(OS_MACOSX)
+// Tells the GPU process that the browser process has handled the swap
+// buffers or post sub-buffer request.
+IPC_MESSAGE_CONTROL1(AcceleratedSurfaceMsg_BufferPresented,
+                     content::BufferPresentedParams)
+#endif
+
+#if defined(OS_ANDROID)
+// Tells the GPU process to wake up the GPU because we're about to draw.
+IPC_MESSAGE_CONTROL0(GpuMsg_WakeUpGpu)
+#endif
+
+// Tells the GPU process to remove all contexts.
+IPC_MESSAGE_CONTROL0(GpuMsg_Clean)
+
+// Tells the GPU process to crash.
+IPC_MESSAGE_CONTROL0(GpuMsg_Crash)
+
+// Tells the GPU process to hang.
+IPC_MESSAGE_CONTROL0(GpuMsg_Hang)
+
+// Tells the GPU process to disable the watchdog thread.
+IPC_MESSAGE_CONTROL0(GpuMsg_DisableWatchdog)
+
+// Tells the GPU process that the browser has seen a GPU switch.
+IPC_MESSAGE_CONTROL0(GpuMsg_GpuSwitched)
+
+// Sends an input event to the gpu service.
+IPC_MESSAGE_CONTROL3(GpuMsg_UpdateValueState,
+                     int,          /* client_id */
+                     unsigned int, /* target */
+                     gpu::ValueState /* valuestate */)
+
+//------------------------------------------------------------------------------
+// GPU Host Messages
+// These are messages to the browser.
+
+// A renderer sends this when it wants to create a connection to the GPU
+// process. The browser will create the GPU process if necessary, and will
+// return a handle to the channel via a GpuChannelEstablished message.
+IPC_SYNC_MESSAGE_CONTROL1_3(GpuHostMsg_EstablishGpuChannel,
+                            content::CauseForGpuLaunch,
+                            int /* client id */,
+                            IPC::ChannelHandle /* handle to channel */,
+                            gpu::GPUInfo /* stats about GPU process*/)
+
+// A renderer sends this when it wants to know whether a gpu process exists.
+IPC_SYNC_MESSAGE_CONTROL0_1(GpuHostMsg_HasGpuProcess, bool /* result */)
+
+// Response from GPU to a GputMsg_Initialize message.
+IPC_MESSAGE_CONTROL2(GpuHostMsg_Initialized,
+                     bool /* result */,
+                     ::gpu::GPUInfo /* gpu_info */)
+
+// Response from GPU to a GpuHostMsg_EstablishChannel message.
+IPC_MESSAGE_CONTROL1(GpuHostMsg_ChannelEstablished,
+                     IPC::ChannelHandle /* channel_handle */)
+
+// Message from GPU to notify to destroy the channel.
+IPC_MESSAGE_CONTROL1(GpuHostMsg_DestroyChannel, int32_t /* client_id */)
+
+// Message to cache the given shader information.
+IPC_MESSAGE_CONTROL3(GpuHostMsg_CacheShader,
+                     int32_t /* client_id */,
+                     std::string /* key */,
+                     std::string /* shader */)
+
+// Message to the GPU that a shader was loaded from disk.
+IPC_MESSAGE_CONTROL1(GpuMsg_LoadedShader, std::string /* encoded shader */)
+
+// Response from GPU to a GpuMsg_CreateGpuMemoryBuffer message.
+IPC_MESSAGE_CONTROL1(GpuHostMsg_GpuMemoryBufferCreated,
+                     gfx::GpuMemoryBufferHandle /* handle */)
+
+// Response from GPU to a GpuMsg_CollectGraphicsInfo.
+IPC_MESSAGE_CONTROL1(GpuHostMsg_GraphicsInfoCollected,
+                     gpu::GPUInfo /* GPU logging stats */)
+
+// Response from GPU to a GpuMsg_GetVideoMemory.
+IPC_MESSAGE_CONTROL1(GpuHostMsg_VideoMemoryUsageStats,
+                     content::GPUVideoMemoryUsageStats /* GPU memory stats */)
+
+#if defined(OS_MACOSX)
+// Tells the browser that an accelerated surface has swapped.
+IPC_MESSAGE_CONTROL1(GpuHostMsg_AcceleratedSurfaceBuffersSwapped,
+                     content::AcceleratedSurfaceBuffersSwappedParams)
+#endif
+
+#if defined(OS_WIN)
+IPC_MESSAGE_CONTROL2(GpuHostMsg_AcceleratedSurfaceCreatedChildWindow,
+                     gfx::PluginWindowHandle /* parent_window */,
+                     gfx::PluginWindowHandle /* child_window */)
+#endif
+
+IPC_MESSAGE_CONTROL1(GpuHostMsg_DidCreateOffscreenContext, GURL /* url */)
+
+IPC_MESSAGE_CONTROL3(GpuHostMsg_DidLoseContext,
+                     bool /* offscreen */,
+                     gpu::error::ContextLostReason /* reason */,
+                     GURL /* url */)
+
+IPC_MESSAGE_CONTROL1(GpuHostMsg_DidDestroyOffscreenContext, GURL /* url */)
+
+// Tells the browser about GPU memory usage statistics for UMA logging.
+IPC_MESSAGE_CONTROL1(GpuHostMsg_GpuMemoryUmaStats,
+                     content::GPUMemoryUmaStats /* GPU memory UMA stats */)
+
+// Tells the browser that a context has subscribed to a new target and
+// the browser should start sending the corresponding information
+IPC_MESSAGE_CONTROL2(GpuHostMsg_AddSubscription,
+                     int32_t /* client_id */,
+                     unsigned int /* target */)
+
+// Tells the browser that no contexts are subscribed to the target anymore
+// so the browser should stop sending the corresponding information
+IPC_MESSAGE_CONTROL2(GpuHostMsg_RemoveSubscription,
+                     int32_t /* client_id */,
+                     unsigned int /* target */)
+
+// Message from GPU to add a GPU log message to the about:gpu page.
+IPC_MESSAGE_CONTROL3(GpuHostMsg_OnLogMessage,
+                     int /*severity*/,
+                     std::string /* header */,
+                     std::string /* message */)
diff --git a/content/common/gpu/gpu_memory_manager.cc b/content/common/gpu/gpu_memory_manager.cc
index 10f769c..920ec3c 100644
--- a/content/common/gpu/gpu_memory_manager.cc
+++ b/content/common/gpu/gpu_memory_manager.cc
@@ -13,9 +13,9 @@
 #include "base/strings/string_number_conversions.h"
 #include "base/trace_event/trace_event.h"
 #include "content/common/gpu/gpu_channel_manager.h"
+#include "content/common/gpu/gpu_channel_manager_delegate.h"
 #include "content/common/gpu/gpu_memory_tracking.h"
 #include "content/common/gpu/gpu_memory_uma_stats.h"
-#include "content/common/gpu/gpu_messages.h"
 #include "gpu/command_buffer/common/gpu_memory_allocation.h"
 #include "gpu/command_buffer/service/gpu_switches.h"
 
@@ -57,7 +57,7 @@
       bytes_allocated_historical_max_ = GetCurrentUsage();
       // If we're blowing into new memory usage territory, spam the browser
       // process with the most up-to-date information about our memory usage.
-      SendUmaStatsToBrowser();
+      SendUmaStatsToHost();
   }
 }
 
@@ -112,13 +112,13 @@
       bytes_allocated_historical_max_;
 }
 
-void GpuMemoryManager::SendUmaStatsToBrowser() {
+void GpuMemoryManager::SendUmaStatsToHost() {
   if (!channel_manager_)
     return;
   GPUMemoryUmaStats params;
   params.bytes_allocated_current = GetCurrentUsage();
   params.bytes_allocated_max = bytes_allocated_historical_max_;
   params.context_group_count = static_cast<uint32_t>(tracking_groups_.size());
-  channel_manager_->Send(new GpuHostMsg_GpuMemoryUmaStats(params));
+  channel_manager_->delegate()->GpuMemoryUmaStats(params);
 }
 }  // namespace content
diff --git a/content/common/gpu/gpu_memory_manager.h b/content/common/gpu/gpu_memory_manager.h
index 7de22e5..20d5d207 100644
--- a/content/common/gpu/gpu_memory_manager.h
+++ b/content/common/gpu/gpu_memory_manager.h
@@ -49,7 +49,7 @@
       TrackingGroupMap;
 
   // Send memory usage stats to the browser process.
-  void SendUmaStatsToBrowser();
+  void SendUmaStatsToHost();
 
   // Get the current number of bytes allocated.
   uint64_t GetCurrentUsage() const { return bytes_allocated_current_; }
diff --git a/content/common/gpu/gpu_messages.h b/content/common/gpu/gpu_messages.h
index e4db8b3..8ad2fce9 100644
--- a/content/common/gpu/gpu_messages.h
+++ b/content/common/gpu/gpu_messages.h
@@ -53,10 +53,8 @@
 #undef IPC_MESSAGE_EXPORT
 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT
 
-#define IPC_MESSAGE_START GpuMsgStart
+#define IPC_MESSAGE_START GpuChannelMsgStart
 
-IPC_ENUM_TRAITS_MAX_VALUE(content::CauseForGpuLaunch,
-                          content::CAUSE_FOR_GPU_LAUNCH_MAX_ENUM - 1)
 IPC_ENUM_TRAITS_MAX_VALUE(gfx::GpuPreference,
                           gfx::GpuPreferenceLast)
 IPC_ENUM_TRAITS_MAX_VALUE(content::GpuStreamPriority,
@@ -91,50 +89,6 @@
   IPC_STRUCT_MEMBER(gfx::GpuPreference, gpu_preference)
 IPC_STRUCT_END()
 
-IPC_STRUCT_BEGIN(GpuMsg_EstablishChannel_Params)
-  IPC_STRUCT_MEMBER(int, client_id)
-  IPC_STRUCT_MEMBER(uint64_t, client_tracing_id)
-  IPC_STRUCT_MEMBER(bool, preempts)
-  IPC_STRUCT_MEMBER(bool, allow_view_command_buffers)
-  IPC_STRUCT_MEMBER(bool, allow_real_time_streams)
-IPC_STRUCT_END()
-
-IPC_STRUCT_BEGIN(GpuMsg_CreateGpuMemoryBuffer_Params)
-  IPC_STRUCT_MEMBER(gfx::GpuMemoryBufferId, id)
-  IPC_STRUCT_MEMBER(gfx::Size, size)
-  IPC_STRUCT_MEMBER(gfx::BufferFormat, format)
-  IPC_STRUCT_MEMBER(gfx::BufferUsage, usage)
-  IPC_STRUCT_MEMBER(int32_t, client_id)
-  IPC_STRUCT_MEMBER(gfx::PluginWindowHandle, surface_handle)
-IPC_STRUCT_END()
-
-IPC_STRUCT_BEGIN(GpuMsg_CreateGpuMemoryBufferFromHandle_Params)
-  IPC_STRUCT_MEMBER(gfx::GpuMemoryBufferHandle, handle)
-  IPC_STRUCT_MEMBER(gfx::GpuMemoryBufferId, id)
-  IPC_STRUCT_MEMBER(gfx::Size, size)
-  IPC_STRUCT_MEMBER(gfx::BufferFormat, format)
-  IPC_STRUCT_MEMBER(int32_t, client_id)
-IPC_STRUCT_END()
-
-#if defined(OS_MACOSX)
-IPC_STRUCT_BEGIN(GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params)
-  IPC_STRUCT_MEMBER(int32_t, surface_id)
-  // Only one of ca_context_id or io_surface may be non-0.
-  IPC_STRUCT_MEMBER(CAContextID, ca_context_id)
-  IPC_STRUCT_MEMBER(gfx::ScopedRefCountedIOSurfaceMachPort, io_surface)
-  IPC_STRUCT_MEMBER(int32_t, route_id)
-  IPC_STRUCT_MEMBER(gfx::Size, size)
-  IPC_STRUCT_MEMBER(float, scale_factor)
-  IPC_STRUCT_MEMBER(std::vector<ui::LatencyInfo>, latency_info)
-IPC_STRUCT_END()
-
-IPC_STRUCT_BEGIN(AcceleratedSurfaceMsg_BufferPresented_Params)
-  // The vsync parameters, to synchronize presentation with the display.
-  IPC_STRUCT_MEMBER(base::TimeTicks, vsync_timebase)
-  IPC_STRUCT_MEMBER(base::TimeDelta, vsync_interval)
-IPC_STRUCT_END()
-#endif
-
 IPC_STRUCT_BEGIN(AcceleratedJpegDecoderMsg_Decode_Params)
   IPC_STRUCT_MEMBER(int32_t, input_buffer_id)
   IPC_STRUCT_MEMBER(gfx::Size, coded_size)
@@ -285,22 +239,6 @@
   IPC_STRUCT_TRAITS_MEMBER(jpeg_decode_accelerator_supported)
 IPC_STRUCT_TRAITS_END()
 
-IPC_STRUCT_TRAITS_BEGIN(content::GPUVideoMemoryUsageStats::ProcessStats)
-  IPC_STRUCT_TRAITS_MEMBER(video_memory)
-  IPC_STRUCT_TRAITS_MEMBER(has_duplicates)
-IPC_STRUCT_TRAITS_END()
-
-IPC_STRUCT_TRAITS_BEGIN(content::GPUVideoMemoryUsageStats)
-  IPC_STRUCT_TRAITS_MEMBER(process_map)
-  IPC_STRUCT_TRAITS_MEMBER(bytes_allocated)
-  IPC_STRUCT_TRAITS_MEMBER(bytes_allocated_historical_max)
-IPC_STRUCT_TRAITS_END()
-
-IPC_STRUCT_TRAITS_BEGIN(content::GPUMemoryUmaStats)
-  IPC_STRUCT_TRAITS_MEMBER(bytes_allocated_current)
-  IPC_STRUCT_TRAITS_MEMBER(bytes_allocated_max)
-IPC_STRUCT_TRAITS_END()
-
 IPC_STRUCT_TRAITS_BEGIN(gpu::MemoryAllocation)
   IPC_STRUCT_TRAITS_MEMBER(bytes_limit_when_visible)
   IPC_STRUCT_TRAITS_MEMBER(priority_cutoff_when_visible)
@@ -317,185 +255,6 @@
 IPC_STRUCT_TRAITS_END()
 
 //------------------------------------------------------------------------------
-// GPU Messages
-// These are messages from the browser to the GPU process.
-
-// Tells the GPU process to initialize itself. The browser explicitly
-// requests this be done so that we are guaranteed that the channel is set
-// up between the browser and GPU process before doing any work that might
-// potentially crash the GPU process. Detection of the child process
-// exiting abruptly is predicated on having the IPC channel set up.
-IPC_MESSAGE_CONTROL0(GpuMsg_Initialize)
-
-// Tells the GPU process to shutdown itself.
-IPC_MESSAGE_CONTROL0(GpuMsg_Finalize)
-
-// Tells the GPU process to create a new channel for communication with a
-// given client.  The channel name is returned in a
-// GpuHostMsg_ChannelEstablished message.  The client ID is passed so that
-// the GPU process reuses an existing channel to that process if it exists.
-// This ID is a unique opaque identifier generated by the browser process.
-// The client_tracing_id is a unique ID used for the purposes of tracing.
-IPC_MESSAGE_CONTROL1(GpuMsg_EstablishChannel,
-                     GpuMsg_EstablishChannel_Params /* params */)
-
-// Tells the GPU process to close the channel identified by IPC channel
-// handle.  If no channel can be identified, do nothing.
-IPC_MESSAGE_CONTROL1(GpuMsg_CloseChannel,
-                     IPC::ChannelHandle /* channel_handle */)
-
-// Tells the GPU process to create a new gpu memory buffer.
-IPC_MESSAGE_CONTROL1(GpuMsg_CreateGpuMemoryBuffer,
-                     GpuMsg_CreateGpuMemoryBuffer_Params)
-
-// Tells the GPU process to create a new gpu memory buffer from an existing
-// handle.
-IPC_MESSAGE_CONTROL1(GpuMsg_CreateGpuMemoryBufferFromHandle,
-                     GpuMsg_CreateGpuMemoryBufferFromHandle_Params)
-
-// Tells the GPU process to destroy buffer.
-IPC_MESSAGE_CONTROL3(GpuMsg_DestroyGpuMemoryBuffer,
-                     gfx::GpuMemoryBufferId, /* id */
-                     int32_t,                /* client_id */
-                     gpu::SyncToken /* sync_token */)
-
-// Tells the GPU process to create a context for collecting graphics card
-// information.
-IPC_MESSAGE_CONTROL0(GpuMsg_CollectGraphicsInfo)
-
-// Tells the GPU process to report video_memory information for the task manager
-IPC_MESSAGE_CONTROL0(GpuMsg_GetVideoMemoryUsageStats)
-
-#if defined(OS_MACOSX)
-// Tells the GPU process that the browser process has handled the swap
-// buffers or post sub-buffer request.
-IPC_MESSAGE_ROUTED1(AcceleratedSurfaceMsg_BufferPresented,
-                    AcceleratedSurfaceMsg_BufferPresented_Params)
-#endif
-
-#if defined(OS_ANDROID)
-// Tells the GPU process to wake up the GPU because we're about to draw.
-IPC_MESSAGE_CONTROL0(GpuMsg_WakeUpGpu)
-#endif
-
-// Tells the GPU process to remove all contexts.
-IPC_MESSAGE_CONTROL0(GpuMsg_Clean)
-
-// Tells the GPU process to crash.
-IPC_MESSAGE_CONTROL0(GpuMsg_Crash)
-
-// Tells the GPU process to hang.
-IPC_MESSAGE_CONTROL0(GpuMsg_Hang)
-
-// Tells the GPU process to disable the watchdog thread.
-IPC_MESSAGE_CONTROL0(GpuMsg_DisableWatchdog)
-
-// Tells the GPU process that the browser has seen a GPU switch.
-IPC_MESSAGE_CONTROL0(GpuMsg_GpuSwitched)
-
-// Sends an input event to the gpu service.
-IPC_MESSAGE_CONTROL3(GpuMsg_UpdateValueState,
-                     int, /* client_id */
-                     unsigned int, /* target */
-                     gpu::ValueState /* valuestate */)
-
-//------------------------------------------------------------------------------
-// GPU Host Messages
-// These are messages to the browser.
-
-// A renderer sends this when it wants to create a connection to the GPU
-// process. The browser will create the GPU process if necessary, and will
-// return a handle to the channel via a GpuChannelEstablished message.
-IPC_SYNC_MESSAGE_CONTROL1_3(GpuHostMsg_EstablishGpuChannel,
-                            content::CauseForGpuLaunch,
-                            int /* client id */,
-                            IPC::ChannelHandle /* handle to channel */,
-                            gpu::GPUInfo /* stats about GPU process*/)
-
-// A renderer sends this when it wants to know whether a gpu process exists.
-IPC_SYNC_MESSAGE_CONTROL0_1(GpuHostMsg_HasGpuProcess, bool /* result */)
-
-// Response from GPU to a GputMsg_Initialize message.
-IPC_MESSAGE_CONTROL2(GpuHostMsg_Initialized,
-                     bool /* result */,
-                     ::gpu::GPUInfo /* gpu_info */)
-
-// Response from GPU to a GpuHostMsg_EstablishChannel message.
-IPC_MESSAGE_CONTROL1(GpuHostMsg_ChannelEstablished,
-                     IPC::ChannelHandle /* channel_handle */)
-
-// Message from GPU to notify to destroy the channel.
-IPC_MESSAGE_CONTROL1(GpuHostMsg_DestroyChannel, int32_t /* client_id */)
-
-// Message to cache the given shader information.
-IPC_MESSAGE_CONTROL3(GpuHostMsg_CacheShader,
-                     int32_t /* client_id */,
-                     std::string /* key */,
-                     std::string /* shader */)
-
-// Message to the GPU that a shader was loaded from disk.
-IPC_MESSAGE_CONTROL1(GpuMsg_LoadedShader,
-                     std::string /* encoded shader */)
-
-// Response from GPU to a GpuMsg_CreateGpuMemoryBuffer message.
-IPC_MESSAGE_CONTROL1(GpuHostMsg_GpuMemoryBufferCreated,
-                     gfx::GpuMemoryBufferHandle /* handle */)
-
-// Response from GPU to a GpuMsg_CollectGraphicsInfo.
-IPC_MESSAGE_CONTROL1(GpuHostMsg_GraphicsInfoCollected,
-                     gpu::GPUInfo /* GPU logging stats */)
-
-// Response from GPU to a GpuMsg_GetVideoMemory.
-IPC_MESSAGE_CONTROL1(GpuHostMsg_VideoMemoryUsageStats,
-                     content::GPUVideoMemoryUsageStats /* GPU memory stats */)
-
-// Message from GPU to add a GPU log message to the about:gpu page.
-IPC_MESSAGE_CONTROL3(GpuHostMsg_OnLogMessage,
-                     int /*severity*/,
-                     std::string /* header */,
-                     std::string /* message */)
-
-
-#if defined(OS_MACOSX)
-// Tells the browser that an accelerated surface has swapped.
-IPC_MESSAGE_CONTROL1(GpuHostMsg_AcceleratedSurfaceBuffersSwapped,
-                     GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params)
-#endif
-
-#if defined(OS_WIN)
-IPC_MESSAGE_CONTROL2(GpuHostMsg_AcceleratedSurfaceCreatedChildWindow,
-                     gfx::PluginWindowHandle /* parent_window */,
-                     gfx::PluginWindowHandle /* child_window */)
-#endif
-
-IPC_MESSAGE_CONTROL1(GpuHostMsg_DidCreateOffscreenContext,
-                     GURL /* url */)
-
-IPC_MESSAGE_CONTROL3(GpuHostMsg_DidLoseContext,
-                     bool /* offscreen */,
-                     gpu::error::ContextLostReason /* reason */,
-                     GURL /* url */)
-
-IPC_MESSAGE_CONTROL1(GpuHostMsg_DidDestroyOffscreenContext,
-                     GURL /* url */)
-
-// Tells the browser about GPU memory usage statistics for UMA logging.
-IPC_MESSAGE_CONTROL1(GpuHostMsg_GpuMemoryUmaStats,
-                     content::GPUMemoryUmaStats /* GPU memory UMA stats */)
-
-// Tells the browser that a context has subscribed to a new target and
-// the browser should start sending the corresponding information
-IPC_MESSAGE_CONTROL2(GpuHostMsg_AddSubscription,
-                     int32_t /* client_id */,
-                     unsigned int /* target */)
-
-// Tells the browser that no contexts are subscribed to the target anymore
-// so the browser should stop sending the corresponding information
-IPC_MESSAGE_CONTROL2(GpuHostMsg_RemoveSubscription,
-                     int32_t /* client_id */,
-                     unsigned int /* target */)
-
-//------------------------------------------------------------------------------
 // GPU Channel Messages
 // These are messages from a renderer process to the GPU process.
 
diff --git a/content/common/gpu/image_transport_surface.cc b/content/common/gpu/image_transport_surface.cc
index 8f5c1ab..eae07e9d 100644
--- a/content/common/gpu/image_transport_surface.cc
+++ b/content/common/gpu/image_transport_surface.cc
@@ -14,6 +14,7 @@
 #include "build/build_config.h"
 #include "content/common/gpu/gpu_channel.h"
 #include "content/common/gpu/gpu_channel_manager.h"
+#include "content/common/gpu/gpu_channel_manager_delegate.h"
 #include "content/common/gpu/gpu_command_buffer_stub.h"
 #include "content/common/gpu/gpu_messages.h"
 #include "gpu/command_buffer/service/sync_point_manager.h"
@@ -22,6 +23,11 @@
 #include "ui/gl/gl_implementation.h"
 #include "ui/gl/gl_switches.h"
 
+#if defined(OS_MACOSX)
+#include "content/common/gpu/accelerated_surface_buffers_swapped_params_mac.h"
+#include "ui/accelerated_widget_mac/accelerated_widget_mac.h"
+#endif
+
 namespace content {
 
 ImageTransportSurface::ImageTransportSurface() {}
@@ -53,8 +59,9 @@
       manager_(manager),
       stub_(stub->AsWeakPtr()),
       handle_(handle) {
-  route_id_ = manager_->GenerateRouteID();
-  manager_->AddRoute(route_id_, this);
+#if defined(OS_MACOSX)
+  manager_->AddImageTransportSurface(handle_, this);
+#endif
 }
 
 ImageTransportHelper::~ImageTransportHelper() {
@@ -62,7 +69,9 @@
     stub_->SetLatencyInfoCallback(
         base::Callback<void(const std::vector<ui::LatencyInfo>&)>());
   }
-  manager_->RemoveRoute(route_id_);
+#if defined(OS_MACOSX)
+  manager_->RemoveImageTransportSurface(handle_);
+#endif
 }
 
 bool ImageTransportHelper::Initialize(gfx::GLSurface::Format format) {
@@ -78,24 +87,14 @@
   return true;
 }
 
-bool ImageTransportHelper::OnMessageReceived(const IPC::Message& message) {
 #if defined(OS_MACOSX)
-  bool handled = true;
-  IPC_BEGIN_MESSAGE_MAP(ImageTransportHelper, message)
-    IPC_MESSAGE_HANDLER(AcceleratedSurfaceMsg_BufferPresented,
-                        OnBufferPresented)
-    IPC_MESSAGE_UNHANDLED(handled = false)
-  IPC_END_MESSAGE_MAP()
-  return handled;
-#else
-  NOTREACHED();
-  return false;
-#endif
+void ImageTransportHelper::BufferPresented(
+    const BufferPresentedParams& params) {
+  surface_->BufferPresented(params);
 }
 
-#if defined(OS_MACOSX)
 void ImageTransportHelper::SendAcceleratedSurfaceBuffersSwapped(
-    GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params params) {
+    AcceleratedSurfaceBuffersSwappedParams params) {
   // TRACE_EVENT for gpu tests:
   TRACE_EVENT_INSTANT2("test_gpu", "SwapBuffers",
                        TRACE_EVENT_SCOPE_THREAD,
@@ -104,8 +103,7 @@
   // On mac, handle_ is a surface id. See
   // GpuProcessTransportFactory::CreatePerCompositorData
   params.surface_id = handle_;
-  params.route_id = route_id_;
-  manager_->Send(new GpuHostMsg_AcceleratedSurfaceBuffersSwapped(params));
+  manager_->delegate()->SendAcceleratedSurfaceBuffersSwapped(params);
 }
 #endif
 
@@ -130,13 +128,6 @@
   return stub_->decoder();
 }
 
-#if defined(OS_MACOSX)
-void ImageTransportHelper::OnBufferPresented(
-    const AcceleratedSurfaceMsg_BufferPresented_Params& params) {
-  surface_->OnBufferPresented(params);
-}
-#endif
-
 void ImageTransportHelper::SetLatencyInfo(
     const std::vector<ui::LatencyInfo>& latency_info) {
   surface_->SetLatencyInfo(latency_info);
@@ -240,8 +231,8 @@
 }
 
 #if defined(OS_MACOSX)
-void PassThroughImageTransportSurface::OnBufferPresented(
-    const AcceleratedSurfaceMsg_BufferPresented_Params& /* params */) {
+void PassThroughImageTransportSurface::BufferPresented(
+    const BufferPresentedParams& /* params */) {
   NOTREACHED();
 }
 #endif
diff --git a/content/common/gpu/image_transport_surface.h b/content/common/gpu/image_transport_surface.h
index d432708..130d5cb 100644
--- a/content/common/gpu/image_transport_surface.h
+++ b/content/common/gpu/image_transport_surface.h
@@ -26,10 +26,6 @@
 #include "ui/gfx/swap_result.h"
 #include "ui/gl/gl_surface.h"
 
-#if defined(OS_MACOSX)
-struct AcceleratedSurfaceMsg_BufferPresented_Params;
-struct GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params;
-#endif
 
 namespace gfx {
 class GLSurface;
@@ -45,6 +41,10 @@
 namespace content {
 class GpuChannelManager;
 class GpuCommandBufferStub;
+#if defined(OS_MACOSX)
+struct BufferPresentedParams;
+struct AcceleratedSurfaceBuffersSwappedParams;
+#endif
 
 // The GPU process is agnostic as to how it displays results. On some platforms
 // it renders directly to window. On others it renders offscreen and transports
@@ -64,8 +64,7 @@
   ImageTransportSurface();
 
 #if defined(OS_MACOSX)
-  virtual void OnBufferPresented(
-      const AcceleratedSurfaceMsg_BufferPresented_Params& params) = 0;
+  virtual void BufferPresented(const BufferPresentedParams& params) = 0;
 #endif
   virtual void SetLatencyInfo(
       const std::vector<ui::LatencyInfo>& latency_info) = 0;
@@ -104,26 +103,23 @@
 };
 
 class ImageTransportHelper
-    : public IPC::Listener,
-      public base::SupportsWeakPtr<ImageTransportHelper> {
+    : public base::SupportsWeakPtr<ImageTransportHelper> {
  public:
   // Takes weak pointers to objects that outlive the helper.
   ImageTransportHelper(ImageTransportSurface* surface,
                        GpuChannelManager* manager,
                        GpuCommandBufferStub* stub,
                        gfx::PluginWindowHandle handle);
-  ~ImageTransportHelper() override;
+  ~ImageTransportHelper();
 
   bool Initialize(gfx::GLSurface::Format format);
 
-  // IPC::Listener implementation:
-  bool OnMessageReceived(const IPC::Message& message) override;
-
   // Helper send functions. Caller fills in the surface specific params
   // like size and surface id. The helper fills in the rest.
 #if defined(OS_MACOSX)
+  void BufferPresented(const BufferPresentedParams& params);
   void SendAcceleratedSurfaceBuffersSwapped(
-      GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params params);
+      AcceleratedSurfaceBuffersSwappedParams params);
 #endif
 
   // Make the surface's context current.
@@ -138,12 +134,6 @@
  private:
   gpu::gles2::GLES2Decoder* Decoder();
 
-  // IPC::Message handlers.
-#if defined(OS_MACOSX)
-  void OnBufferPresented(
-      const AcceleratedSurfaceMsg_BufferPresented_Params& params);
-#endif
-
   // Backbuffer resize callback.
   void Resize(gfx::Size size, float scale_factor);
 
@@ -188,8 +178,7 @@
 
   // ImageTransportSurface implementation.
 #if defined(OS_MACOSX)
-  void OnBufferPresented(
-      const AcceleratedSurfaceMsg_BufferPresented_Params& params) override;
+  void BufferPresented(const BufferPresentedParams& params) override;
 #endif
   gfx::Size GetSize() override;
   void SetLatencyInfo(
diff --git a/content/common/gpu/image_transport_surface_overlay_mac.h b/content/common/gpu/image_transport_surface_overlay_mac.h
index 97b3e24..76d4eea 100644
--- a/content/common/gpu/image_transport_surface_overlay_mac.h
+++ b/content/common/gpu/image_transport_surface_overlay_mac.h
@@ -63,8 +63,7 @@
   bool IsSurfaceless() const override;
 
   // ImageTransportSurface implementation
-  void OnBufferPresented(
-      const AcceleratedSurfaceMsg_BufferPresented_Params& params) override;
+  void BufferPresented(const BufferPresentedParams& params) override;
   void SetLatencyInfo(const std::vector<ui::LatencyInfo>&) override;
 
   // ui::GpuSwitchingObserver implementation.
diff --git a/content/common/gpu/image_transport_surface_overlay_mac.mm b/content/common/gpu/image_transport_surface_overlay_mac.mm
index ea8a8fd..05f6512 100644
--- a/content/common/gpu/image_transport_surface_overlay_mac.mm
+++ b/content/common/gpu/image_transport_surface_overlay_mac.mm
@@ -22,9 +22,10 @@
 
 #include "base/mac/scoped_cftyperef.h"
 #include "base/trace_event/trace_event.h"
+#include "content/common/gpu/accelerated_surface_buffers_swapped_params_mac.h"
+#include "content/common/gpu/buffer_presented_params_mac.h"
 #include "content/common/gpu/ca_layer_partial_damage_tree_mac.h"
 #include "content/common/gpu/ca_layer_tree_mac.h"
-#include "content/common/gpu/gpu_messages.h"
 #include "ui/accelerated_widget_mac/io_surface_context.h"
 #include "ui/base/cocoa/animation_utils.h"
 #include "ui/base/cocoa/remote_layer_api.h"
@@ -309,7 +310,7 @@
   }
 
   // Send acknowledgement to the browser.
-  GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params params;
+  AcceleratedSurfaceBuffersSwappedParams params;
   if (use_remote_layer_api_) {
     params.ca_context_id = [ca_context_ contextId];
   } else if (current_partial_damage_tree_) {
@@ -454,8 +455,8 @@
   return true;
 }
 
-void ImageTransportSurfaceOverlayMac::OnBufferPresented(
-    const AcceleratedSurfaceMsg_BufferPresented_Params& params) {
+void ImageTransportSurfaceOverlayMac::BufferPresented(
+    const BufferPresentedParams& params) {
   vsync_timebase_ = params.vsync_timebase;
   vsync_interval_ = params.vsync_interval;
   vsync_parameters_valid_ = (vsync_interval_ != base::TimeDelta());
diff --git a/content/common/image_downloader/image_downloader.mojom b/content/common/image_downloader/image_downloader.mojom
index 7f3d289..1372d52 100644
--- a/content/common/image_downloader/image_downloader.mojom
+++ b/content/common/image_downloader/image_downloader.mojom
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-module image_downloader;
+module content.mojom;
 
 import "skia/public/interfaces/bitmap.mojom";
 import "ui/mojo/geometry/geometry.mojom";
diff --git a/content/content_common.gypi b/content/content_common.gypi
index 4de364b2..4b9ec41 100644
--- a/content/content_common.gypi
+++ b/content/content_common.gypi
@@ -339,6 +339,10 @@
       'common/geofencing_types.cc',
       'common/geofencing_types.h',
       'common/gin_java_bridge_messages.h',
+      'common/gpu/accelerated_surface_buffers_swapped_params_mac.cc',
+      'common/gpu/accelerated_surface_buffers_swapped_params_mac.h',
+      'common/gpu/buffer_presented_params_mac.cc',
+      'common/gpu/buffer_presented_params_mac.h',
       'common/gpu/client/command_buffer_metrics.cc',
       'common/gpu/client/command_buffer_metrics.h',
       'common/gpu/client/command_buffer_proxy_impl.cc',
@@ -375,10 +379,14 @@
       'common/gpu/ca_layer_tree_mac.mm',
       'common/gpu/child_window_surface_win.cc',
       'common/gpu/child_window_surface_win.h',
+      'common/gpu/establish_channel_params.cc',
+      'common/gpu/establish_channel_params.h',
+      'common/gpu/gpu_host_messages.h',
       'common/gpu/gpu_channel.cc',
       'common/gpu/gpu_channel.h',
       'common/gpu/gpu_channel_manager.cc',
       'common/gpu/gpu_channel_manager.h',
+      'common/gpu/gpu_channel_manager_delegate.h',
       'common/gpu/gpu_command_buffer_stub.cc',
       'common/gpu/gpu_command_buffer_stub.h',
       'common/gpu/gpu_config.h',
diff --git a/content/gpu/gpu_child_thread.cc b/content/gpu/gpu_child_thread.cc
index 6ea7e2e..339351f 100644
--- a/content/gpu/gpu_child_thread.cc
+++ b/content/gpu/gpu_child_thread.cc
@@ -13,8 +13,9 @@
 #include "build/build_config.h"
 #include "content/child/child_process.h"
 #include "content/child/thread_safe_sender.h"
+#include "content/common/gpu/establish_channel_params.h"
+#include "content/common/gpu/gpu_host_messages.h"
 #include "content/common/gpu/gpu_memory_buffer_factory.h"
-#include "content/common/gpu/gpu_messages.h"
 #include "content/common/gpu/media/gpu_video_decode_accelerator.h"
 #include "content/gpu/gpu_process_control_impl.h"
 #include "content/gpu/gpu_watchdog_thread.h"
@@ -45,14 +46,14 @@
   std::string header = str.substr(0, message_start);
   std::string message = str.substr(message_start);
 
-  g_thread_safe_sender.Get()->Send(new GpuHostMsg_OnLogMessage(
-      severity, header, message));
+  g_thread_safe_sender.Get()->Send(
+      new GpuHostMsg_OnLogMessage(severity, header, message));
 
   return false;
 }
 
-// Message filter used to to handle GpuMsg_CreateGpuMemoryBuffer messages on
-// the IO thread. This allows the UI thread in the browser process to remain
+// Message filter used to to handle GpuMsg_CreateGpuMemoryBuffer messages
+// on the IO thread. This allows the UI thread in the browser process to remain
 // fast at all times.
 class GpuMemoryBufferMessageFilter : public IPC::MessageFilter {
  public:
@@ -74,10 +75,10 @@
     DCHECK(sender_);
     bool handled = true;
     IPC_BEGIN_MESSAGE_MAP(GpuMemoryBufferMessageFilter, message)
-    IPC_MESSAGE_HANDLER(GpuMsg_CreateGpuMemoryBuffer, OnCreateGpuMemoryBuffer)
-    IPC_MESSAGE_HANDLER(GpuMsg_CreateGpuMemoryBufferFromHandle,
-                        OnCreateGpuMemoryBufferFromHandle)
-    IPC_MESSAGE_UNHANDLED(handled = false)
+      IPC_MESSAGE_HANDLER(GpuMsg_CreateGpuMemoryBuffer, OnCreateGpuMemoryBuffer)
+      IPC_MESSAGE_HANDLER(GpuMsg_CreateGpuMemoryBufferFromHandle,
+                          OnCreateGpuMemoryBufferFromHandle)
+      IPC_MESSAGE_UNHANDLED(handled = false)
     IPC_END_MESSAGE_MAP()
     return handled;
   }
@@ -252,8 +253,84 @@
   if (ChildThreadImpl::OnMessageReceived(msg))
     return true;
 
-  return gpu_channel_manager_.get() &&
-         gpu_channel_manager_->OnMessageReceived(msg);
+  bool handled = true;
+  IPC_BEGIN_MESSAGE_MAP(GpuChildThread, msg)
+#if defined(OS_MACOSX)
+    IPC_MESSAGE_HANDLER(AcceleratedSurfaceMsg_BufferPresented,
+                        OnBufferPresented)
+#endif
+    IPC_MESSAGE_HANDLER(GpuMsg_EstablishChannel, OnEstablishChannel)
+    IPC_MESSAGE_HANDLER(GpuMsg_CloseChannel, OnCloseChannel)
+    IPC_MESSAGE_HANDLER(GpuMsg_DestroyGpuMemoryBuffer, OnDestroyGpuMemoryBuffer)
+    IPC_MESSAGE_HANDLER(GpuMsg_LoadedShader, OnLoadedShader)
+    IPC_MESSAGE_HANDLER(GpuMsg_UpdateValueState, OnUpdateValueState)
+#if defined(OS_ANDROID)
+    IPC_MESSAGE_HANDLER(GpuMsg_WakeUpGpu, OnWakeUpGpu);
+#endif
+    IPC_MESSAGE_UNHANDLED(handled = false)
+  IPC_END_MESSAGE_MAP()
+  if (handled)
+    return true;
+
+  return false;
+}
+
+void GpuChildThread::AddSubscription(int32_t client_id, unsigned int target) {
+  Send(new GpuHostMsg_AddSubscription(client_id, target));
+}
+
+void GpuChildThread::ChannelEstablished(
+    const IPC::ChannelHandle& channel_handle) {
+  Send(new GpuHostMsg_ChannelEstablished(channel_handle));
+}
+
+void GpuChildThread::DidCreateOffscreenContext(const GURL& active_url) {
+  Send(new GpuHostMsg_DidCreateOffscreenContext(active_url));
+}
+
+void GpuChildThread::DidDestroyChannel(int client_id) {
+  Send(new GpuHostMsg_DestroyChannel(client_id));
+}
+
+void GpuChildThread::DidDestroyOffscreenContext(const GURL& active_url) {
+  Send(new GpuHostMsg_DidDestroyOffscreenContext(active_url));
+}
+
+void GpuChildThread::DidLoseContext(bool offscreen,
+                                    gpu::error::ContextLostReason reason,
+                                    const GURL& active_url) {
+  Send(new GpuHostMsg_DidLoseContext(offscreen, reason, active_url));
+}
+
+void GpuChildThread::GpuMemoryUmaStats(const GPUMemoryUmaStats& params) {
+  Send(new GpuHostMsg_GpuMemoryUmaStats(params));
+}
+
+void GpuChildThread::RemoveSubscription(int32_t client_id,
+                                        unsigned int target) {
+  Send(new GpuHostMsg_RemoveSubscription(client_id, target));
+}
+
+#if defined(OS_MACOSX)
+void GpuChildThread::SendAcceleratedSurfaceBuffersSwapped(
+    const AcceleratedSurfaceBuffersSwappedParams& params) {
+  Send(new GpuHostMsg_AcceleratedSurfaceBuffersSwapped(params));
+}
+#endif
+
+#if defined(OS_WIN)
+void GpuChildThread::SendAcceleratedSurfaceCreatedChildWindow(
+    const gfx::PluginWindowHandle& parent_window,
+    const gfx::PluginWindowHandle& child_window) {
+  Send(new GpuHostMsg_AcceleratedSurfaceCreatedChildWindow(parent_window,
+                                                           child_window));
+}
+#endif
+
+void GpuChildThread::StoreShaderToDisk(int32_t client_id,
+                                       const std::string& key,
+                                       const std::string& shader) {
+  Send(new GpuHostMsg_CacheShader(client_id, key, shader));
 }
 
 void GpuChildThread::OnInitialize() {
@@ -280,12 +357,11 @@
   // Defer creation of the render thread. This is to prevent it from handling
   // IPC messages before the sandbox has been enabled and all other necessary
   // initialization has succeeded.
-  gpu_channel_manager_.reset(
-      new GpuChannelManager(channel(), watchdog_thread_.get(),
-                            base::ThreadTaskRunnerHandle::Get().get(),
-                            ChildProcess::current()->io_task_runner(),
-                            ChildProcess::current()->GetShutDownEvent(),
-                            sync_point_manager_, gpu_memory_buffer_factory_));
+  gpu_channel_manager_.reset(new GpuChannelManager(
+      this, watchdog_thread_.get(), base::ThreadTaskRunnerHandle::Get().get(),
+      ChildProcess::current()->io_task_runner(),
+      ChildProcess::current()->GetShutDownEvent(), sync_point_manager_,
+      gpu_memory_buffer_factory_));
 
 #if defined(USE_OZONE)
   ui::OzonePlatform::GetInstance()
@@ -352,16 +428,17 @@
 
 void GpuChildThread::OnGetVideoMemoryUsageStats() {
   GPUVideoMemoryUsageStats video_memory_usage_stats;
-  if (gpu_channel_manager_)
+  if (gpu_channel_manager_) {
     gpu_channel_manager_->gpu_memory_manager()->GetVideoMemoryUsageStats(
         &video_memory_usage_stats);
+  }
   Send(new GpuHostMsg_VideoMemoryUsageStats(video_memory_usage_stats));
 }
 
 void GpuChildThread::OnClean() {
   DVLOG(1) << "GPU: Removing all contexts";
   if (gpu_channel_manager_)
-    gpu_channel_manager_->LoseAllContexts();
+    gpu_channel_manager_->DestroyAllChannels();
 }
 
 void GpuChildThread::OnCrash() {
@@ -397,6 +474,55 @@
   ui::GpuSwitchingManager::GetInstance()->NotifyGpuSwitched();
 }
 
+#if defined(OS_MACOSX)
+void GpuChildThread::OnBufferPresented(const BufferPresentedParams& params) {
+  if (gpu_channel_manager_)
+    gpu_channel_manager_->BufferPresented(params);
+}
+#endif
+
+void GpuChildThread::OnEstablishChannel(const EstablishChannelParams& params) {
+  if (gpu_channel_manager_)
+    gpu_channel_manager_->EstablishChannel(params);
+}
+
+void GpuChildThread::OnCloseChannel(const IPC::ChannelHandle& channel_handle) {
+  if (gpu_channel_manager_)
+    gpu_channel_manager_->CloseChannel(channel_handle);
+}
+
+void GpuChildThread::OnLoadedShader(const std::string& shader) {
+  if (gpu_channel_manager_)
+    gpu_channel_manager_->PopulateShaderCache(shader);
+}
+
+void GpuChildThread::OnDestroyGpuMemoryBuffer(
+    gfx::GpuMemoryBufferId id,
+    int client_id,
+    const gpu::SyncToken& sync_token) {
+  if (gpu_channel_manager_)
+    gpu_channel_manager_->DestroyGpuMemoryBuffer(id, client_id, sync_token);
+}
+
+void GpuChildThread::OnUpdateValueState(int client_id,
+                                        unsigned int target,
+                                        const gpu::ValueState& state) {
+  if (gpu_channel_manager_)
+    gpu_channel_manager_->UpdateValueState(client_id, target, state);
+}
+
+#if defined(OS_ANDROID)
+void GpuChildThread::OnWakeUpGpu() {
+  if (gpu_channel_manager_)
+    gpu_channel_manager_->WakeUpGpu();
+}
+#endif
+
+void GpuChildThread::OnLoseAllContexts() {
+  if (gpu_channel_manager_)
+    gpu_channel_manager_->DestroyAllChannels();
+}
+
 void GpuChildThread::BindProcessControlRequest(
     mojo::InterfaceRequest<ProcessControl> request) {
   DVLOG(1) << "GPU: Binding ProcessControl request";
diff --git a/content/gpu/gpu_child_thread.h b/content/gpu/gpu_child_thread.h
index b83ff79..7cbe0fa 100644
--- a/content/gpu/gpu_child_thread.h
+++ b/content/gpu/gpu_child_thread.h
@@ -19,12 +19,13 @@
 #include "content/child/child_thread_impl.h"
 #include "content/common/gpu/gpu_channel.h"
 #include "content/common/gpu/gpu_channel_manager.h"
+#include "content/common/gpu/gpu_channel_manager_delegate.h"
 #include "content/common/gpu/gpu_config.h"
 #include "content/common/gpu/x_util.h"
 #include "content/common/process_control.mojom.h"
 #include "gpu/config/gpu_info.h"
+#include "mojo/public/cpp/bindings/binding_set.h"
 #include "mojo/public/cpp/bindings/interface_request.h"
-#include "mojo/public/cpp/bindings/weak_binding_set.h"
 #include "ui/gfx/native_widget_types.h"
 
 namespace gpu {
@@ -44,7 +45,8 @@
 // these per process. It does process initialization and shutdown. It forwards
 // IPC messages to GpuChannelManager, which is responsible for issuing rendering
 // commands to the GPU.
-class GpuChildThread : public ChildThreadImpl {
+class GpuChildThread : public ChildThreadImpl,
+                       public GpuChannelManagerDelegate {
  public:
   typedef std::queue<IPC::Message*> DeferredMessages;
 
@@ -72,6 +74,30 @@
   bool OnMessageReceived(const IPC::Message& msg) override;
 
  private:
+  // GpuChannelManagerDelegate implementation.
+  void AddSubscription(int32_t client_id, unsigned int target) override;
+  void ChannelEstablished(const IPC::ChannelHandle& channel_handle) override;
+  void DidCreateOffscreenContext(const GURL& active_url) override;
+  void DidDestroyChannel(int client_id) override;
+  void DidDestroyOffscreenContext(const GURL& active_url) override;
+  void DidLoseContext(bool offscreen,
+                      gpu::error::ContextLostReason reason,
+                      const GURL& active_url) override;
+  void GpuMemoryUmaStats(const GPUMemoryUmaStats& params) override;
+  void RemoveSubscription(int32_t client_id, unsigned int target) override;
+#if defined(OS_MACOSX)
+  void SendAcceleratedSurfaceBuffersSwapped(
+      const AcceleratedSurfaceBuffersSwappedParams& params) override;
+#endif
+#if defined(OS_WIN)
+  void SendAcceleratedSurfaceCreatedChildWindow(
+      const gfx::PluginWindowHandle& parent_window,
+      const gfx::PluginWindowHandle& child_window) override;
+#endif
+  void StoreShaderToDisk(int32_t client_id,
+                         const std::string& key,
+                         const std::string& shader) override;
+
   // Message handlers.
   void OnInitialize();
   void OnFinalize();
@@ -85,6 +111,23 @@
   void OnDisableWatchdog();
   void OnGpuSwitched();
 
+#if defined(OS_MACOSX)
+  void OnBufferPresented(const BufferPresentedParams& params);
+#endif
+  void OnEstablishChannel(const EstablishChannelParams& params);
+  void OnCloseChannel(const IPC::ChannelHandle& channel_handle);
+  void OnLoadedShader(const std::string& shader);
+  void OnDestroyGpuMemoryBuffer(gfx::GpuMemoryBufferId id,
+                                int client_id,
+                                const gpu::SyncToken& sync_token);
+  void OnUpdateValueState(int client_id,
+                          unsigned int target,
+                          const gpu::ValueState& state);
+#if defined(OS_ANDROID)
+  void OnWakeUpGpu();
+#endif
+  void OnLoseAllContexts();
+
   void BindProcessControlRequest(
       mojo::InterfaceRequest<ProcessControl> request);
 
@@ -120,7 +163,7 @@
   scoped_ptr<GpuProcessControlImpl> process_control_;
 
   // Bindings to the ProcessControl impl.
-  mojo::WeakBindingSet<ProcessControl> process_control_bindings_;
+  mojo::BindingSet<ProcessControl> process_control_bindings_;
 
   DISALLOW_COPY_AND_ASSIGN(GpuChildThread);
 };
diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc
index 7ce05a03..958e40d 100644
--- a/content/gpu/gpu_main.cc
+++ b/content/gpu/gpu_main.cc
@@ -21,8 +21,8 @@
 #include "content/child/child_process.h"
 #include "content/common/content_constants_internal.h"
 #include "content/common/gpu/gpu_config.h"
+#include "content/common/gpu/gpu_host_messages.h"
 #include "content/common/gpu/gpu_memory_buffer_factory.h"
-#include "content/common/gpu/gpu_messages.h"
 #include "content/common/gpu/media/gpu_jpeg_decode_accelerator.h"
 #include "content/common/gpu/media/gpu_video_decode_accelerator.h"
 #include "content/common/gpu/media/gpu_video_encode_accelerator.h"
@@ -121,8 +121,8 @@
                                  const std::string& str) {
   std::string header = str.substr(0, message_start);
   std::string message = str.substr(message_start);
-  deferred_messages.Get().push(new GpuHostMsg_OnLogMessage(
-      severity, header, message));
+  deferred_messages.Get().push(
+      new GpuHostMsg_OnLogMessage(severity, header, message));
   return false;
 }
 
diff --git a/content/public/common/content_features.cc b/content/public/common/content_features.cc
index 5582e9e1..2a83379 100644
--- a/content/public/common/content_features.cc
+++ b/content/public/common/content_features.cc
@@ -28,6 +28,12 @@
 const base::Feature kExperimentalFramework{"ExperimentalFramework",
                                            base::FEATURE_DISABLED_BY_DEFAULT};
 
+// Non-validating reload on reload-to-refresh-content (e.g. pull-to-refresh).
+// See https://crbug.com/558829
+const base::Feature kNonValidatingReloadOnRefreshContent{
+    "kNonValidatingReloadOnRefreshContent",
+    base::FEATURE_DISABLED_BY_DEFAULT};
+
 // An experiment to optimize resource loading IPC for small resources.
 // http://crbug.com/580928
 const base::Feature kOptimizeIPCForSmallResource{
diff --git a/content/public/common/content_features.h b/content/public/common/content_features.h
index 92681729..6c6a1ca1 100644
--- a/content/public/common/content_features.h
+++ b/content/public/common/content_features.h
@@ -20,6 +20,7 @@
 CONTENT_EXPORT extern const base::Feature kCredentialManagementAPI;
 CONTENT_EXPORT extern const base::Feature kDownloadResumption;
 CONTENT_EXPORT extern const base::Feature kExperimentalFramework;
+CONTENT_EXPORT extern const base::Feature kNonValidatingReloadOnRefreshContent;
 CONTENT_EXPORT extern const base::Feature kOptimizeIPCForSmallResource;
 CONTENT_EXPORT extern const base::Feature kRenderingPipelineThrottling;
 CONTENT_EXPORT extern const base::Feature kScrollAnchoring;
diff --git a/content/public/common/content_switches.cc b/content/public/common/content_switches.cc
index e54fa00..6cecde3 100644
--- a/content/public/common/content_switches.cc
+++ b/content/public/common/content_switches.cc
@@ -398,11 +398,6 @@
 // Enables the network information API.
 const char kEnableNetworkInformation[]      = "enable-network-information";
 
-// Enables non-validating reload on reload-to-refresh-content (e.g. pull-
-// to-refresh).
-const char kEnableNonValidatingReloadOnRefreshContent[] =
-    "enable-non-validating-reload-on-refresh-content";
-
 // Enables action button icons for the Web Notification API.
 const char kEnableNotificationActionIcons[] =
     "enable-notification-action-icons";
@@ -857,11 +852,6 @@
 // Set when Chromium should use a mobile user agent.
 const char kUseMobileUserAgent[] = "use-mobile-user-agent";
 
-// Use normal priority for tile task worker threads.  Otherwise they may
-// be run at background priority on some platforms.
-const char kUseNormalPriorityForTileTaskWorkerThreads[] =
-    "use-normal-priority-for-tile-task-worker-threads";
-
 // Use remote compositor for the renderer.
 const char kUseRemoteCompositing[] = "use-remote-compositing";
 
diff --git a/content/public/common/content_switches.h b/content/public/common/content_switches.h
index a4a32ba..a8db8ef 100644
--- a/content/public/common/content_switches.h
+++ b/content/public/common/content_switches.h
@@ -123,7 +123,6 @@
 extern const char kEnableMemoryBenchmarking[];
 CONTENT_EXPORT extern const char kEnableMojoShellConnection[];
 CONTENT_EXPORT extern const char kEnableNetworkInformation[];
-CONTENT_EXPORT extern const char kEnableNonValidatingReloadOnRefreshContent[];
 CONTENT_EXPORT extern const char kEnableNotificationActionIcons[];
 CONTENT_EXPORT extern const char kEnablePartialRaster[];
 CONTENT_EXPORT extern const char kEnablePinch[];
@@ -239,7 +238,6 @@
 CONTENT_EXPORT extern const char kContentImageTextureTarget[];
 CONTENT_EXPORT extern const char kVideoImageTextureTarget[];
 CONTENT_EXPORT extern const char kUseMobileUserAgent[];
-CONTENT_EXPORT extern const char kUseNormalPriorityForTileTaskWorkerThreads[];
 CONTENT_EXPORT extern const char kUseRemoteCompositing[];
 extern const char kUtilityCmdPrefix[];
 CONTENT_EXPORT extern const char kUtilityProcess[];
diff --git a/content/renderer/gpu/compositor_output_surface.cc b/content/renderer/gpu/compositor_output_surface.cc
index 8210e68..ec64d44 100644
--- a/content/renderer/gpu/compositor_output_surface.cc
+++ b/content/renderer/gpu/compositor_output_surface.cc
@@ -45,10 +45,6 @@
                                  ->compositor_message_filter()),
       frame_swap_message_queue_(swap_frame_message_queue),
       routing_id_(routing_id),
-#if defined(OS_ANDROID)
-      prefers_smoothness_(false),
-      main_thread_runner_(base::MessageLoop::current()->task_runner()),
-#endif
       layout_test_mode_(RenderThreadImpl::current()->layout_test_mode()),
       weak_ptrs_(this) {
   DCHECK(output_surface_filter_.get());
@@ -86,7 +82,6 @@
 void CompositorOutputSurface::DetachFromClient() {
   if (!HasClient())
     return;
-  UpdateSmoothnessTakesPriority(false);
   if (output_surface_proxy_.get())
     output_surface_proxy_->ClearOutputSurface();
   output_surface_filter_->RemoveHandlerOnCompositorThread(
@@ -202,32 +197,4 @@
   return message_sender_->Send(message);
 }
 
-#if defined(OS_ANDROID)
-namespace {
-void SetThreadPriorityToIdle() {
-  base::PlatformThread::SetCurrentThreadPriority(
-      base::ThreadPriority::BACKGROUND);
-}
-void SetThreadPriorityToDefault() {
-  base::PlatformThread::SetCurrentThreadPriority(base::ThreadPriority::NORMAL);
-}
-}  // namespace
-#endif
-
-void CompositorOutputSurface::UpdateSmoothnessTakesPriority(
-    bool prefers_smoothness) {
-#if defined(OS_ANDROID)
-  if (prefers_smoothness_ == prefers_smoothness)
-    return;
-  prefers_smoothness_ = prefers_smoothness;
-  if (prefers_smoothness) {
-    main_thread_runner_->PostTask(FROM_HERE,
-                                  base::Bind(&SetThreadPriorityToIdle));
-  } else {
-    main_thread_runner_->PostTask(FROM_HERE,
-                                  base::Bind(&SetThreadPriorityToDefault));
-  }
-#endif
-}
-
 }  // namespace content
diff --git a/content/renderer/gpu/compositor_output_surface.h b/content/renderer/gpu/compositor_output_surface.h
index cbbad42..f407312 100644
--- a/content/renderer/gpu/compositor_output_surface.h
+++ b/content/renderer/gpu/compositor_output_surface.h
@@ -57,10 +57,6 @@
   void DetachFromClient() override;
   void SwapBuffers(cc::CompositorFrame* frame) override;
 
-  // TODO(epenner): This seems out of place here and would be a better fit
-  // int CompositorThread after it is fully refactored (http://crbug/170828)
-  void UpdateSmoothnessTakesPriority(bool prefer_smoothness) override;
-
  protected:
   void ShortcutSwapAck(uint32_t output_surface_id,
                        scoped_ptr<cc::GLFrameData> gl_frame_data);
@@ -104,10 +100,6 @@
   scoped_refptr<IPC::SyncMessageFilter> message_sender_;
   scoped_refptr<FrameSwapMessageQueue> frame_swap_message_queue_;
   int routing_id_;
-#if defined(OS_ANDROID)
-  bool prefers_smoothness_;
-  scoped_refptr<base::SingleThreadTaskRunner> main_thread_runner_;
-#endif
 
   // TODO(danakj): Remove this when crbug.com/311404
   bool layout_test_mode_;
diff --git a/content/renderer/gpu/gpu_benchmarking_extension.cc b/content/renderer/gpu/gpu_benchmarking_extension.cc
index f471360..9a3c79ae 100644
--- a/content/renderer/gpu/gpu_benchmarking_extension.cc
+++ b/content/renderer/gpu/gpu_benchmarking_extension.cc
@@ -15,7 +15,7 @@
 #include "base/macros.h"
 #include "base/strings/string_number_conversions.h"
 #include "cc/layers/layer.h"
-#include "content/common/gpu/gpu_messages.h"
+#include "content/common/gpu/gpu_host_messages.h"
 #include "content/common/input/synthetic_gesture_params.h"
 #include "content/common/input/synthetic_pinch_gesture_params.h"
 #include "content/common/input/synthetic_smooth_drag_gesture_params.h"
diff --git a/content/renderer/image_downloader/image_downloader_impl.cc b/content/renderer/image_downloader/image_downloader_impl.cc
index c05998b..41dcb82 100644
--- a/content/renderer/image_downloader/image_downloader_impl.cc
+++ b/content/renderer/image_downloader/image_downloader_impl.cc
@@ -117,7 +117,7 @@
 
 ImageDownloaderImpl::ImageDownloaderImpl(
     RenderFrame* render_frame,
-    mojo::InterfaceRequest<image_downloader::ImageDownloader> request)
+    mojo::InterfaceRequest<content::mojom::ImageDownloader> request)
     : RenderFrameObserver(render_frame), binding_(this, std::move(request)) {
   DCHECK(render_frame);
 }
@@ -128,7 +128,7 @@
 // static
 void ImageDownloaderImpl::CreateMojoService(
     RenderFrame* render_frame,
-    mojo::InterfaceRequest<image_downloader::ImageDownloader> request) {
+    mojo::InterfaceRequest<content::mojom::ImageDownloader> request) {
   DVLOG(1) << "ImageDownloaderImpl::CreateService";
   DCHECK(render_frame);
 
@@ -136,9 +136,8 @@
 }
 
 // ImageDownloader methods:
-void ImageDownloaderImpl::DownloadImage(
-    image_downloader::DownloadRequestPtr req,
-    const DownloadImageCallback& callback) {
+void ImageDownloaderImpl::DownloadImage(content::mojom::DownloadRequestPtr req,
+                                        const DownloadImageCallback& callback) {
   const GURL image_url = req->url.To<GURL>();
   bool is_favicon = req->is_favicon;
   uint32_t max_image_size = req->max_bitmap_size;
@@ -212,8 +211,8 @@
     const std::vector<SkBitmap>& result_images,
     const std::vector<gfx::Size>& result_original_image_sizes,
     const DownloadImageCallback& callback) {
-  image_downloader::DownloadResultPtr result =
-      image_downloader::DownloadResult::New();
+  content::mojom::DownloadResultPtr result =
+      content::mojom::DownloadResult::New();
 
   result->http_status_code = http_status_code;
   result->images = mojo::Array<skia::BitmapPtr>::From(result_images);
diff --git a/content/renderer/image_downloader/image_downloader_impl.h b/content/renderer/image_downloader/image_downloader_impl.h
index 888d839..6c2f8be 100644
--- a/content/renderer/image_downloader/image_downloader_impl.h
+++ b/content/renderer/image_downloader/image_downloader_impl.h
@@ -27,21 +27,21 @@
 class MultiResolutionImageResourceFetcher;
 class RenderFrame;
 
-class ImageDownloaderImpl : public image_downloader::ImageDownloader,
+class ImageDownloaderImpl : public content::mojom::ImageDownloader,
                             public RenderFrameObserver {
  public:
   static void CreateMojoService(
       RenderFrame* render_frame,
-      mojo::InterfaceRequest<image_downloader::ImageDownloader> request);
+      mojo::InterfaceRequest<content::mojom::ImageDownloader> request);
 
  private:
   ImageDownloaderImpl(
       RenderFrame* render_frame,
-      mojo::InterfaceRequest<image_downloader::ImageDownloader> request);
+      mojo::InterfaceRequest<content::mojom::ImageDownloader> request);
   ~ImageDownloaderImpl() override;
 
   // ImageDownloader methods:
-  void DownloadImage(image_downloader::DownloadRequestPtr req,
+  void DownloadImage(content::mojom::DownloadRequestPtr req,
                      const DownloadImageCallback& callback) override;
 
   // Requests to fetch an image. When done, the ImageDownloaderImpl
diff --git a/content/renderer/mus/render_widget_window_tree_client_factory.cc b/content/renderer/mus/render_widget_window_tree_client_factory.cc
index 9ff3538..04f5a52 100644
--- a/content/renderer/mus/render_widget_window_tree_client_factory.cc
+++ b/content/renderer/mus/render_widget_window_tree_client_factory.cc
@@ -12,7 +12,7 @@
 #include "content/common/render_widget_window_tree_client_factory.mojom.h"
 #include "content/public/common/mojo_shell_connection.h"
 #include "content/renderer/mus/render_widget_mus_connection.h"
-#include "mojo/public/cpp/bindings/weak_binding_set.h"
+#include "mojo/public/cpp/bindings/binding_set.h"
 #include "mojo/shell/public/cpp/connection.h"
 #include "mojo/shell/public/cpp/interface_factory.h"
 #include "url/gurl.h"
@@ -58,7 +58,7 @@
     connection->Bind(std::move(request));
   }
 
-  mojo::WeakBindingSet<mojom::RenderWidgetWindowTreeClientFactory> bindings_;
+  mojo::BindingSet<mojom::RenderWidgetWindowTreeClientFactory> bindings_;
 
   DISALLOW_COPY_AND_ASSIGN(RenderWidgetWindowTreeClientFactoryImpl);
 };
diff --git a/content/renderer/presentation/presentation_dispatcher.cc b/content/renderer/presentation/presentation_dispatcher.cc
index c79b6e32..df8f970 100644
--- a/content/renderer/presentation/presentation_dispatcher.cc
+++ b/content/renderer/presentation/presentation_dispatcher.cc
@@ -402,7 +402,7 @@
     presentation::PresentationSessionInfoPtr connection,
     presentation::PresentationConnectionCloseReason reason,
     const mojo::String& message) {
-  if (controller_)
+  if (!controller_)
     return;
 
   DCHECK(!connection.is_null());
diff --git a/content/renderer/raster_worker_pool.cc b/content/renderer/raster_worker_pool.cc
index 73ec4ef6..e8ed13b 100644
--- a/content/renderer/raster_worker_pool.cc
+++ b/content/renderer/raster_worker_pool.cc
@@ -124,9 +124,7 @@
       has_namespaces_with_finished_running_tasks_cv_(&lock_),
       shutdown_(false) {}
 
-void RasterWorkerPool::Start(
-    int num_threads,
-    const base::SimpleThread::Options& thread_options) {
+void RasterWorkerPool::Start(int num_threads) {
   DCHECK(threads_.empty());
 
   // Start |num_threads| threads for foreground work, including nonconcurrent
@@ -140,7 +138,7 @@
         base::StringPrintf("CompositorTileWorker%u",
                            static_cast<unsigned>(threads_.size() + 1))
             .c_str(),
-        thread_options, this, foreground_categories,
+        base::SimpleThread::Options(), this, foreground_categories,
         &has_ready_to_run_foreground_tasks_cv_));
     thread->Start();
     threads_.push_back(std::move(thread));
@@ -149,6 +147,13 @@
   // Start a single thread for background work.
   std::vector<cc::TaskCategory> background_categories;
   background_categories.push_back(cc::TASK_CATEGORY_BACKGROUND);
+
+  // Use background priority for background thread.
+  base::SimpleThread::Options thread_options;
+#if !defined(OS_MACOSX)
+  thread_options.set_priority(base::ThreadPriority::BACKGROUND);
+#endif
+
   scoped_ptr<base::SimpleThread> thread(new RasterWorkerPoolThread(
       base::StringPrintf("CompositorTileWorker%u",
                          static_cast<unsigned>(threads_.size() + 1))
diff --git a/content/renderer/raster_worker_pool.h b/content/renderer/raster_worker_pool.h
index dfa325c..b4ddf9a 100644
--- a/content/renderer/raster_worker_pool.h
+++ b/content/renderer/raster_worker_pool.h
@@ -55,8 +55,7 @@
 
   // Spawn |num_threads| number of threads and start running work on the
   // worker threads.
-  void Start(int num_threads,
-             const base::SimpleThread::Options& thread_options);
+  void Start(int num_threads);
 
   // Finish running all the posted tasks (and nested task posted by those tasks)
   // of all the associated task runners.
diff --git a/content/renderer/raster_worker_pool_unittest.cc b/content/renderer/raster_worker_pool_unittest.cc
index 7a402b76..73f83dc 100644
--- a/content/renderer/raster_worker_pool_unittest.cc
+++ b/content/renderer/raster_worker_pool_unittest.cc
@@ -20,7 +20,7 @@
       : raster_worker_pool_(new content::RasterWorkerPool()) {}
 
   void StartTaskRunner() {
-    raster_worker_pool_->Start(kNumThreads, SimpleThread::Options());
+    raster_worker_pool_->Start(kNumThreads);
   }
 
   scoped_refptr<content::RasterWorkerPool> GetTaskRunner() {
@@ -45,7 +45,7 @@
       : raster_worker_pool_(new content::RasterWorkerPool()) {}
 
   void StartTaskRunner() {
-    raster_worker_pool_->Start(kNumThreads, SimpleThread::Options());
+    raster_worker_pool_->Start(kNumThreads);
   }
 
   scoped_refptr<base::SequencedTaskRunner> GetTaskRunner() {
@@ -77,7 +77,7 @@
       : raster_worker_pool_(new content::RasterWorkerPool()) {}
 
   void StartTaskGraphRunner() {
-    raster_worker_pool_->Start(NumThreads, base::SimpleThread::Options());
+    raster_worker_pool_->Start(NumThreads);
   }
 
   cc::TaskGraphRunner* GetTaskGraphRunner() {
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index c53f627..689e5be 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -6058,9 +6058,8 @@
 void RenderFrameImpl::RegisterMojoServices() {
   // Only main frame have ImageDownloader service.
   if (!frame_->parent()) {
-    GetServiceRegistry()->AddService<image_downloader::ImageDownloader>(
-        base::Bind(&ImageDownloaderImpl::CreateMojoService,
-                   base::Unretained(this)));
+    GetServiceRegistry()->AddService(base::Bind(
+        &ImageDownloaderImpl::CreateMojoService, base::Unretained(this)));
   }
 }
 
@@ -6074,17 +6073,11 @@
   if (!mojo_shell_)
     GetServiceRegistry()->ConnectToRemoteService(mojo::GetProxy(&mojo_shell_));
   mojo::shell::mojom::InterfaceProviderPtr interface_provider;
-  mojo::shell::mojom::CapabilityFilterPtr filter(
-      mojo::shell::mojom::CapabilityFilter::New());
-  mojo::Array<mojo::String> all_interfaces;
-  all_interfaces.push_back("*");
-  filter->filter.insert("*", std::move(all_interfaces));
   mojo::shell::mojom::ConnectorPtr connector;
   mojo_shell_->GetConnector(GetProxy(&connector));
   connector->Connect(
       url.spec(), mojo::shell::mojom::Connector::kUserInherit,
-      GetProxy(&interface_provider), nullptr, std::move(filter),
-      base::Bind(&OnGotInstanceID));
+      GetProxy(&interface_provider), nullptr, base::Bind(&OnGotInstanceID));
   return interface_provider;
 }
 
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index 5b5f16c..928702d 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -75,7 +75,7 @@
 #include "content/common/frame_messages.h"
 #include "content/common/gpu/client/context_provider_command_buffer.h"
 #include "content/common/gpu/client/gpu_channel_host.h"
-#include "content/common/gpu/gpu_messages.h"
+#include "content/common/gpu/gpu_host_messages.h"
 #include "content/common/gpu/gpu_process_launch_causes.h"
 #include "content/common/render_frame_setup.mojom.h"
 #include "content/common/render_process_messages.h"
@@ -836,15 +836,7 @@
   are_image_decode_tasks_enabled_ = true;
 #endif
 
-  base::SimpleThread::Options thread_options;
-#if defined(OS_ANDROID) || defined(OS_LINUX)
-  if (!command_line.HasSwitch(
-          switches::kUseNormalPriorityForTileTaskWorkerThreads)) {
-    thread_options.set_priority(base::ThreadPriority::BACKGROUND);
-  }
-#endif
-
-  raster_worker_pool_->Start(num_raster_threads, thread_options);
+  raster_worker_pool_->Start(num_raster_threads);
 
   // TODO(boliu): In single process, browser main loop should set up the
   // discardable memory manager, and should skip this if kSingleProcess.
@@ -1873,10 +1865,8 @@
   int client_id = 0;
   IPC::ChannelHandle channel_handle;
   gpu::GPUInfo gpu_info;
-  if (!Send(new GpuHostMsg_EstablishGpuChannel(cause_for_gpu_launch,
-                                               &client_id,
-                                               &channel_handle,
-                                               &gpu_info)) ||
+  if (!Send(new GpuHostMsg_EstablishGpuChannel(cause_for_gpu_launch, &client_id,
+                                               &channel_handle, &gpu_info)) ||
 #if defined(OS_POSIX)
       channel_handle.socket.fd == -1 ||
 #endif
diff --git a/content/shell/browser/layout_test/layout_test_browser_context.cc b/content/shell/browser/layout_test/layout_test_browser_context.cc
index d0dc9d007..ff55d445 100644
--- a/content/shell/browser/layout_test/layout_test_browser_context.cc
+++ b/content/shell/browser/layout_test/layout_test_browser_context.cc
@@ -96,8 +96,8 @@
       "layout-test-mojom", make_linked_ptr(new MojomProtocolHandler)));
   return new LayoutTestURLRequestContextGetter(
       ignore_certificate_errors(), GetPath(),
-      BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::IO),
-      BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::FILE),
+      BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO),
+      BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE),
       protocol_handlers, std::move(request_interceptors), net_log());
 }
 
diff --git a/content/shell/browser/layout_test/layout_test_url_request_context_getter.cc b/content/shell/browser/layout_test/layout_test_url_request_context_getter.cc
index 4674a587..22c0f162 100644
--- a/content/shell/browser/layout_test/layout_test_url_request_context_getter.cc
+++ b/content/shell/browser/layout_test/layout_test_url_request_context_getter.cc
@@ -17,15 +17,15 @@
 LayoutTestURLRequestContextGetter::LayoutTestURLRequestContextGetter(
     bool ignore_certificate_errors,
     const base::FilePath& base_path,
-    base::MessageLoop* io_loop,
-    base::MessageLoop* file_loop,
+    scoped_refptr<base::SingleThreadTaskRunner> io_task_runner,
+    scoped_refptr<base::SingleThreadTaskRunner> file_task_runner,
     ProtocolHandlerMap* protocol_handlers,
     URLRequestInterceptorScopedVector request_interceptors,
     net::NetLog* net_log)
     : ShellURLRequestContextGetter(ignore_certificate_errors,
                                    base_path,
-                                   io_loop,
-                                   file_loop,
+                                   io_task_runner,
+                                   file_task_runner,
                                    protocol_handlers,
                                    std::move(request_interceptors),
                                    net_log) {
diff --git a/content/shell/browser/layout_test/layout_test_url_request_context_getter.h b/content/shell/browser/layout_test/layout_test_url_request_context_getter.h
index 7d53886d..0f5572c9 100644
--- a/content/shell/browser/layout_test/layout_test_url_request_context_getter.h
+++ b/content/shell/browser/layout_test/layout_test_url_request_context_getter.h
@@ -34,8 +34,8 @@
   LayoutTestURLRequestContextGetter(
       bool ignore_certificate_errors,
       const base::FilePath& base_path,
-      base::MessageLoop* io_loop,
-      base::MessageLoop* file_loop,
+      scoped_refptr<base::SingleThreadTaskRunner> io_task_runner,
+      scoped_refptr<base::SingleThreadTaskRunner> file_task_runner,
       ProtocolHandlerMap* protocol_handlers,
       URLRequestInterceptorScopedVector request_interceptors,
       net::NetLog* net_log);
diff --git a/content/shell/browser/shell_browser_context.cc b/content/shell/browser/shell_browser_context.cc
index 0eee3c36..4b01bf9 100644
--- a/content/shell/browser/shell_browser_context.cc
+++ b/content/shell/browser/shell_browser_context.cc
@@ -133,8 +133,8 @@
     URLRequestInterceptorScopedVector request_interceptors) {
   return new ShellURLRequestContextGetter(
       ignore_certificate_errors_, GetPath(),
-      BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::IO),
-      BrowserThread::UnsafeGetMessageLoopForThread(BrowserThread::FILE),
+      BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO),
+      BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE),
       protocol_handlers, std::move(request_interceptors), net_log_);
 }
 
diff --git a/content/shell/browser/shell_url_request_context_getter.cc b/content/shell/browser/shell_url_request_context_getter.cc
index 08d19e6..02fd3f1 100644
--- a/content/shell/browser/shell_url_request_context_getter.cc
+++ b/content/shell/browser/shell_url_request_context_getter.cc
@@ -67,15 +67,15 @@
 ShellURLRequestContextGetter::ShellURLRequestContextGetter(
     bool ignore_certificate_errors,
     const base::FilePath& base_path,
-    base::MessageLoop* io_loop,
-    base::MessageLoop* file_loop,
+    scoped_refptr<base::SingleThreadTaskRunner> io_task_runner,
+    scoped_refptr<base::SingleThreadTaskRunner> file_task_runner,
     ProtocolHandlerMap* protocol_handlers,
     URLRequestInterceptorScopedVector request_interceptors,
     net::NetLog* net_log)
     : ignore_certificate_errors_(ignore_certificate_errors),
       base_path_(base_path),
-      io_loop_(io_loop),
-      file_loop_(file_loop),
+      io_task_runner_(io_task_runner),
+      file_task_runner_(file_task_runner),
       net_log_(net_log),
       request_interceptors_(std::move(request_interceptors)) {
   // Must first be created on the UI thread.
@@ -99,8 +99,8 @@
 
 scoped_ptr<net::ProxyConfigService>
 ShellURLRequestContextGetter::GetProxyConfigService() {
-  return net::ProxyService::CreateSystemProxyConfigService(
-      io_loop_->task_runner(), file_loop_->task_runner());
+  return net::ProxyService::CreateSystemProxyConfigService(io_task_runner_,
+                                                           file_task_runner_);
 }
 
 scoped_ptr<net::ProxyService> ShellURLRequestContextGetter::GetProxyService() {
diff --git a/content/shell/browser/shell_url_request_context_getter.h b/content/shell/browser/shell_url_request_context_getter.h
index db71883f..a7fa233b 100644
--- a/content/shell/browser/shell_url_request_context_getter.h
+++ b/content/shell/browser/shell_url_request_context_getter.h
@@ -36,8 +36,8 @@
   ShellURLRequestContextGetter(
       bool ignore_certificate_errors,
       const base::FilePath& base_path,
-      base::MessageLoop* io_loop,
-      base::MessageLoop* file_loop,
+      scoped_refptr<base::SingleThreadTaskRunner> io_task_runner,
+      scoped_refptr<base::SingleThreadTaskRunner> file_task_runner,
       ProtocolHandlerMap* protocol_handlers,
       URLRequestInterceptorScopedVector request_interceptors,
       net::NetLog* net_log);
@@ -61,8 +61,8 @@
  private:
   bool ignore_certificate_errors_;
   base::FilePath base_path_;
-  base::MessageLoop* io_loop_;
-  base::MessageLoop* file_loop_;
+  scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_;
+  scoped_refptr<base::SingleThreadTaskRunner> file_task_runner_;
   net::NetLog* net_log_;
 
   scoped_ptr<net::ProxyConfigService> proxy_config_service_;
diff --git a/content/test/data/web_ui_mojo_shell_test.js b/content/test/data/web_ui_mojo_shell_test.js
index b9083507..f6faf1ce 100644
--- a/content/test/data/web_ui_mojo_shell_test.js
+++ b/content/test/data/web_ui_mojo_shell_test.js
@@ -45,7 +45,6 @@
                 response.url == 'chrome://mojo-web-ui/');
           });
         },
-        function (exposedServices) {},
-        new shellMojom.CapabilityFilter({ filter: new Map([["*", ["*"]]]) }));
+        function (exposedServices) {});
   };
 });
diff --git a/content/test/gpu/gpu_tests/webgl_conformance_expectations.py b/content/test/gpu/gpu_tests/webgl_conformance_expectations.py
index bec8263..33a7a58a 100644
--- a/content/test/gpu/gpu_tests/webgl_conformance_expectations.py
+++ b/content/test/gpu/gpu_tests/webgl_conformance_expectations.py
@@ -36,9 +36,6 @@
         bug=478572)
     self.Fail('conformance/extensions/ext-sRGB.html',
         bug=540900)
-    self.Flaky('conformance/textures/image/tex-image-and-sub-image-2d-' +
-               'with-image-rgb-rgb-unsigned_byte.html',
-        ['win', 'linux', 'mac', 'chromeos'], bug=586183)
     # We need to add WebGL 1 check in command buffer that format/type from
     # TexSubImage2D have to match the current texture's.
     self.Fail('conformance/textures/misc/tex-sub-image-2d-bad-args.html',
diff --git a/content/utility/utility_thread_impl.h b/content/utility/utility_thread_impl.h
index fef34a6..63cf38f 100644
--- a/content/utility/utility_thread_impl.h
+++ b/content/utility/utility_thread_impl.h
@@ -16,7 +16,7 @@
 #include "content/common/content_export.h"
 #include "content/common/process_control.mojom.h"
 #include "content/public/utility/utility_thread.h"
-#include "mojo/public/cpp/bindings/weak_binding_set.h"
+#include "mojo/public/cpp/bindings/binding_set.h"
 
 namespace base {
 class FilePath;
@@ -72,7 +72,7 @@
   scoped_ptr<UtilityProcessControlImpl> process_control_;
 
   // Bindings to the ProcessControl impl.
-  mojo::WeakBindingSet<ProcessControl> process_control_bindings_;
+  mojo::BindingSet<ProcessControl> process_control_bindings_;
 
   DISALLOW_COPY_AND_ASSIGN(UtilityThreadImpl);
 };
diff --git a/device/usb/mojo/fake_permission_provider.h b/device/usb/mojo/fake_permission_provider.h
index a1da1b0..5ca1610 100644
--- a/device/usb/mojo/fake_permission_provider.h
+++ b/device/usb/mojo/fake_permission_provider.h
@@ -9,8 +9,8 @@
 
 #include "device/usb/public/interfaces/permission_provider.mojom.h"
 #include "mojo/public/cpp/bindings/array.h"
+#include "mojo/public/cpp/bindings/binding_set.h"
 #include "mojo/public/cpp/bindings/interface_request.h"
-#include "mojo/public/cpp/bindings/weak_binding_set.h"
 
 namespace device {
 namespace usb {
@@ -35,7 +35,7 @@
   void Bind(mojo::InterfaceRequest<PermissionProvider> request) override;
 
  private:
-  mojo::WeakBindingSet<PermissionProvider> bindings_;
+  mojo::BindingSet<PermissionProvider> bindings_;
 };
 
 }  // namespace usb
diff --git a/extensions/renderer/resources/media_router_bindings.js b/extensions/renderer/resources/media_router_bindings.js
index 0b0bee0..ebb668c 100644
--- a/extensions/renderer/resources/media_router_bindings.js
+++ b/extensions/renderer/resources/media_router_bindings.js
@@ -130,7 +130,7 @@
   function presentationConnectionCloseReasonToMojo_(reason) {
     var PresentationConnectionCloseReason =
         mediaRouterMojom.MediaRouter.PresentationConnectionCloseReason;
-    switch (state) {
+    switch (reason) {
       case 'error':
         return PresentationConnectionCloseReason.CONNECTION_ERROR;
       case 'closed':
@@ -392,7 +392,7 @@
   MediaRouter.prototype.onPresentationConnectionClosed =
       function(routeId, reason, message) {
     this.service_.onPresentationConnectionClosed(
-        routeId, presentationConnectionCloseReasonToMojo_(state), message);
+        routeId, presentationConnectionCloseReasonToMojo_(reason), message);
   };
 
   /**
diff --git a/extensions/shell/browser/shell_browser_context.cc b/extensions/shell/browser/shell_browser_context.cc
index b38661b..fb1d5134 100644
--- a/extensions/shell/browser/shell_browser_context.cc
+++ b/extensions/shell/browser/shell_browser_context.cc
@@ -51,9 +51,9 @@
   DCHECK(!url_request_context_getter());
   set_url_request_context_getter(new ShellURLRequestContextGetter(
       this, IgnoreCertificateErrors(), GetPath(),
-      content::BrowserThread::UnsafeGetMessageLoopForThread(
+      content::BrowserThread::GetMessageLoopProxyForThread(
           content::BrowserThread::IO),
-      content::BrowserThread::UnsafeGetMessageLoopForThread(
+      content::BrowserThread::GetMessageLoopProxyForThread(
           content::BrowserThread::FILE),
       protocol_handlers, std::move(request_interceptors), nullptr /* net_log */,
       extension_info_map));
diff --git a/extensions/shell/browser/shell_url_request_context_getter.cc b/extensions/shell/browser/shell_url_request_context_getter.cc
index 8ee74b2..abd5aed 100644
--- a/extensions/shell/browser/shell_url_request_context_getter.cc
+++ b/extensions/shell/browser/shell_url_request_context_getter.cc
@@ -17,16 +17,16 @@
     content::BrowserContext* browser_context,
     bool ignore_certificate_errors,
     const base::FilePath& base_path,
-    base::MessageLoop* io_loop,
-    base::MessageLoop* file_loop,
+    scoped_refptr<base::SingleThreadTaskRunner> io_task_runner,
+    scoped_refptr<base::SingleThreadTaskRunner> file_task_runner,
     content::ProtocolHandlerMap* protocol_handlers,
     content::URLRequestInterceptorScopedVector request_interceptors,
     net::NetLog* net_log,
     InfoMap* extension_info_map)
     : content::ShellURLRequestContextGetter(ignore_certificate_errors,
                                             base_path,
-                                            io_loop,
-                                            file_loop,
+                                            io_task_runner,
+                                            file_task_runner,
                                             protocol_handlers,
                                             std::move(request_interceptors),
                                             net_log),
diff --git a/extensions/shell/browser/shell_url_request_context_getter.h b/extensions/shell/browser/shell_url_request_context_getter.h
index 1b6156a..ca678ea 100644
--- a/extensions/shell/browser/shell_url_request_context_getter.h
+++ b/extensions/shell/browser/shell_url_request_context_getter.h
@@ -33,8 +33,8 @@
       content::BrowserContext* browser_context,
       bool ignore_certificate_errors,
       const base::FilePath& base_path,
-      base::MessageLoop* io_loop,
-      base::MessageLoop* file_loop,
+      scoped_refptr<base::SingleThreadTaskRunner> io_task_runner,
+      scoped_refptr<base::SingleThreadTaskRunner> file_task_runner,
       content::ProtocolHandlerMap* protocol_handlers,
       content::URLRequestInterceptorScopedVector request_interceptors,
       net::NetLog* net_log,
diff --git a/gpu/BUILD.gn b/gpu/BUILD.gn
index c3f82eb..64026a4 100644
--- a/gpu/BUILD.gn
+++ b/gpu/BUILD.gn
@@ -55,6 +55,8 @@
     # TODO(hendrikw): Move egl out of gles2_conform_support.
     "gles2_conform_support/egl/config.cc",
     "gles2_conform_support/egl/config.h",
+    "gles2_conform_support/egl/context.cc",
+    "gles2_conform_support/egl/context.h",
     "gles2_conform_support/egl/display.cc",
     "gles2_conform_support/egl/display.h",
     "gles2_conform_support/egl/egl.cc",
@@ -62,6 +64,8 @@
     "gles2_conform_support/egl/surface.h",
     "gles2_conform_support/egl/test_support.cc",
     "gles2_conform_support/egl/test_support.h",
+    "gles2_conform_support/egl/thread_state.cc",
+    "gles2_conform_support/egl/thread_state.h",
   ]
 
   deps = [
@@ -69,6 +73,7 @@
     "//base",
     "//gpu/command_buffer/client:gles2_c_lib",
     "//gpu/command_buffer/client:gles2_implementation",
+    "//gpu/command_buffer/common:gles2_utils",
     "//ui/gl:gl",
   ]
 
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index f69be1d..2d1d90a1 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -578,6 +578,7 @@
                   const std::vector<int32_t>& attribs) override;
   void Destroy(bool have_context) override;
   void SetSurface(const scoped_refptr<gfx::GLSurface>& surface) override;
+  void ReleaseSurface() override;
   void ProduceFrontBuffer(const Mailbox& mailbox) override;
   bool ResizeOffscreenFrameBuffer(const gfx::Size& size) override;
   void UpdateParentTextureInfo();
@@ -3604,6 +3605,7 @@
 // }  // anonymous namespace
 
 bool GLES2DecoderImpl::MakeCurrent() {
+  DCHECK(surface_);
   if (!context_.get())
     return false;
 
@@ -4161,11 +4163,22 @@
 void GLES2DecoderImpl::SetSurface(
     const scoped_refptr<gfx::GLSurface>& surface) {
   DCHECK(context_->IsCurrent(NULL));
-  DCHECK(surface_.get());
+  DCHECK(surface);
   surface_ = surface;
   RestoreCurrentFramebufferBindings();
 }
 
+void GLES2DecoderImpl::ReleaseSurface() {
+  if (!context_.get())
+    return;
+  if (WasContextLost()) {
+    DLOG(ERROR) << "  GLES2DecoderImpl: Trying to release lost context.";
+    return;
+  }
+  context_->ReleaseCurrent(surface_.get());
+  surface_ = nullptr;
+}
+
 void GLES2DecoderImpl::ProduceFrontBuffer(const Mailbox& mailbox) {
   if (!offscreen_saved_color_texture_.get()) {
     LOG(ERROR) << "Called ProduceFrontBuffer on a non-offscreen context";
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.h b/gpu/command_buffer/service/gles2_cmd_decoder.h
index 297b9cf..43e3492 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.h
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.h
@@ -159,6 +159,10 @@
   // Set the surface associated with the default FBO.
   virtual void SetSurface(const scoped_refptr<gfx::GLSurface>& surface) = 0;
 
+  // Releases the surface associated with the GL context.
+  // The decoder should not be used until a new surface is set.
+  virtual void ReleaseSurface() = 0;
+
   virtual void ProduceFrontBuffer(const Mailbox& mailbox) = 0;
 
   // Resize an offscreen frame buffer.
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_mock.h b/gpu/command_buffer/service/gles2_cmd_decoder_mock.h
index 396f531a..636dc14e 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_mock.h
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_mock.h
@@ -52,6 +52,7 @@
                     const std::vector<int32_t>& attribs));
   MOCK_METHOD1(Destroy, void(bool have_context));
   MOCK_METHOD1(SetSurface, void(const scoped_refptr<gfx::GLSurface>& surface));
+  MOCK_METHOD0(ReleaseSurface, void());
   MOCK_METHOD1(ProduceFrontBuffer, void(const Mailbox& mailbox));
   MOCK_METHOD1(ResizeOffscreenFrameBuffer, bool(const gfx::Size& size));
   MOCK_METHOD0(MakeCurrent, bool());
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc
index 7b08764..f26adcb 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc
@@ -504,18 +504,18 @@
     return;
   // All Tests should have read all their GLErrors before getting here.
   EXPECT_EQ(GL_NO_ERROR, GetGLError());
-
-  EXPECT_CALL(*gl_, DeleteBuffersARB(1, _))
-      .Times(2)
-      .RetiresOnSaturation();
-  if (group_->feature_info()->feature_flags().native_vertex_array_object) {
-    EXPECT_CALL(*gl_, DeleteVertexArraysOES(1, Pointee(kServiceVertexArrayId)))
-        .Times(1)
-        .RetiresOnSaturation();
+  if (!decoder_->WasContextLost()) {
+    EXPECT_CALL(*gl_, DeleteBuffersARB(1, _)).Times(2).RetiresOnSaturation();
+    if (group_->feature_info()->feature_flags().native_vertex_array_object) {
+      EXPECT_CALL(*gl_,
+                  DeleteVertexArraysOES(1, Pointee(kServiceVertexArrayId)))
+          .Times(1)
+          .RetiresOnSaturation();
+    }
   }
 
   decoder_->EndDecoding();
-  decoder_->Destroy(true);
+  decoder_->Destroy(!decoder_->WasContextLost());
   decoder_.reset();
   group_->Destroy(mock_decoder_.get(), false);
   engine_.reset();
diff --git a/gpu/command_buffer/service/vertex_array_manager.cc b/gpu/command_buffer/service/vertex_array_manager.cc
index 0f48a2a..a2f2e1ae 100644
--- a/gpu/command_buffer/service/vertex_array_manager.cc
+++ b/gpu/command_buffer/service/vertex_array_manager.cc
@@ -22,13 +22,15 @@
 }
 
 VertexArrayManager::~VertexArrayManager() {
-  DCHECK(vertex_attrib_managers_.empty());
+  DCHECK(client_vertex_attrib_managers_.empty());
+  DCHECK(other_vertex_attrib_managers_.empty());
   CHECK_EQ(vertex_attrib_manager_count_, 0u);
 }
 
 void VertexArrayManager::Destroy(bool have_context) {
   have_context_ = have_context;
-  vertex_attrib_managers_.clear();
+  client_vertex_attrib_managers_.clear();
+  other_vertex_attrib_managers_.clear();
 }
 
 scoped_refptr<VertexAttribManager>
@@ -41,9 +43,11 @@
 
   if (client_visible) {
     std::pair<VertexAttribManagerMap::iterator, bool> result =
-        vertex_attrib_managers_.insert(
+        client_vertex_attrib_managers_.insert(
             std::make_pair(client_id, vertex_attrib_manager));
     DCHECK(result.second);
+  } else {
+    other_vertex_attrib_managers_.push_back(vertex_attrib_manager);
   }
 
   return vertex_attrib_manager;
@@ -51,16 +55,18 @@
 
 VertexAttribManager* VertexArrayManager::GetVertexAttribManager(
     GLuint client_id) {
-  VertexAttribManagerMap::iterator it = vertex_attrib_managers_.find(client_id);
-  return it != vertex_attrib_managers_.end() ? it->second.get() : NULL;
+  VertexAttribManagerMap::iterator it =
+      client_vertex_attrib_managers_.find(client_id);
+  return it != client_vertex_attrib_managers_.end() ? it->second.get() : NULL;
 }
 
 void VertexArrayManager::RemoveVertexAttribManager(GLuint client_id) {
-  VertexAttribManagerMap::iterator it = vertex_attrib_managers_.find(client_id);
-  if (it != vertex_attrib_managers_.end()) {
+  VertexAttribManagerMap::iterator it =
+      client_vertex_attrib_managers_.find(client_id);
+  if (it != client_vertex_attrib_managers_.end()) {
     VertexAttribManager* vertex_attrib_manager = it->second.get();
     vertex_attrib_manager->MarkAsDeleted();
-    vertex_attrib_managers_.erase(it);
+    client_vertex_attrib_managers_.erase(it);
   }
 }
 
@@ -78,8 +84,8 @@
     GLuint service_id, GLuint* client_id) const {
   // This doesn't need to be fast. It's only used during slow queries.
   for (VertexAttribManagerMap::const_iterator it =
-      vertex_attrib_managers_.begin();
-      it != vertex_attrib_managers_.end(); ++it) {
+           client_vertex_attrib_managers_.begin();
+       it != client_vertex_attrib_managers_.end(); ++it) {
     if (it->second->service_id() == service_id) {
       *client_id = it->first;
       return true;
diff --git a/gpu/command_buffer/service/vertex_array_manager.h b/gpu/command_buffer/service/vertex_array_manager.h
index 5649da1f..2c526881 100644
--- a/gpu/command_buffer/service/vertex_array_manager.h
+++ b/gpu/command_buffer/service/vertex_array_manager.h
@@ -56,7 +56,10 @@
   // Info for each vertex array in the system.
   typedef base::hash_map<GLuint, scoped_refptr<VertexAttribManager> >
       VertexAttribManagerMap;
-  VertexAttribManagerMap vertex_attrib_managers_;
+  VertexAttribManagerMap client_vertex_attrib_managers_;
+
+  // Vertex attrib managers for emulation purposes, not visible to clients.
+  std::vector<scoped_refptr<VertexAttribManager>> other_vertex_attrib_managers_;
 
   // Counts the number of VertexArrayInfo allocated with 'this' as its manager.
   // Allows to check no VertexArrayInfo will outlive this.
diff --git a/gpu/command_buffer/tests/egl_test.cc b/gpu/command_buffer/tests/egl_test.cc
index bf7e30e5..05465d94 100644
--- a/gpu/command_buffer/tests/egl_test.cc
+++ b/gpu/command_buffer/tests/egl_test.cc
@@ -6,31 +6,589 @@
 #include "testing/gtest/include/gtest/gtest.h"
 
 #include <EGL/egl.h>
+#include <GLES2/gl2.h>
+
+#include "base/bind.h"
+#include "base/synchronization/waitable_event.h"
+#include "base/threading/thread.h"
 
 // This file tests EGL basic interface for command_buffer_gles2, the mode of
 // command buffer where the code is compiled as a standalone dynamic library and
 // exposed through EGL API.
 namespace gpu {
 
-using testing::Test;
+class EGLTest : public testing::Test {
+ public:
+  void TearDown() override;
+};
 
-TEST_F(Test, BasicEGLInitialization) {
+void EGLTest::TearDown() {
+  EXPECT_TRUE(eglReleaseThread());
+}
+
+TEST_F(EGLTest, OnlyReleaseThread) {}
+
+TEST_F(EGLTest, GetDisplay) {
+  EGLDisplay display1 = eglGetDisplay(EGL_DEFAULT_DISPLAY);
+  EXPECT_NE(display1, EGL_NO_DISPLAY);
+
+  EGLDisplay display2 = eglGetDisplay(EGL_DEFAULT_DISPLAY);
+  EXPECT_EQ(display1, display2);
+
+  EGLNativeDisplayType invalid_display_type =
+      reinterpret_cast<EGLNativeDisplayType>(0x1);
+  EXPECT_NE(invalid_display_type, EGL_DEFAULT_DISPLAY);
+  EXPECT_EQ(EGL_NO_DISPLAY, eglGetDisplay(invalid_display_type));
+  EXPECT_EQ(EGL_SUCCESS, eglGetError());
+
+  // eglTerminate can be called with uninitialized display.
+  EXPECT_TRUE(eglTerminate(display1));
+}
+
+TEST_F(EGLTest, GetError) {
+  // GetError returns success.
+  EXPECT_EQ(EGL_SUCCESS, eglGetError());
+
+  // "calling eglGetError twice without any other intervening EGL calls will
+  // always return EGL_SUCCESS on the second call"
   EGLDisplay display = eglGetDisplay(EGL_DEFAULT_DISPLAY);
-  ASSERT_NE(display, EGL_NO_DISPLAY);
+  EXPECT_NE(display, EGL_NO_DISPLAY);
+  EXPECT_EQ(EGL_SUCCESS, eglGetError());
+  EXPECT_EQ(nullptr, eglQueryString(display, EGL_EXTENSIONS));
+  EXPECT_EQ(EGL_NOT_INITIALIZED, eglGetError());
+  EXPECT_EQ(EGL_SUCCESS, eglGetError());
+
+  EXPECT_TRUE(eglTerminate(display));
+  EXPECT_EQ(EGL_SUCCESS, eglGetError());
+}
+
+TEST_F(EGLTest, Initialize) {
+  EGLDisplay display = eglGetDisplay(EGL_DEFAULT_DISPLAY);
+  EXPECT_NE(display, EGL_NO_DISPLAY);
 
   // Test for no crash even though passing nullptrs for major, minor.
-  EGLBoolean success = eglInitialize(display, nullptr, nullptr);
-  ASSERT_TRUE(success);
+  EXPECT_TRUE(eglInitialize(display, nullptr, nullptr));
 
   EGLint major = 0;
   EGLint minor = 0;
-  success = eglInitialize(display, &major, &minor);
-  ASSERT_TRUE(success);
-  ASSERT_EQ(major, 1);
-  ASSERT_EQ(minor, 4);
+  EXPECT_TRUE(eglInitialize(display, &major, &minor));
+  EXPECT_EQ(major, 1);
+  EXPECT_EQ(minor, 4);
 
-  success = eglTerminate(display);
-  ASSERT_TRUE(success);
+  EGLDisplay invalid_display = reinterpret_cast<EGLDisplay>(0x1);
+  EXPECT_FALSE(eglInitialize(invalid_display, nullptr, nullptr));
+  EXPECT_EQ(EGL_BAD_DISPLAY, eglGetError());
+}
+
+TEST_F(EGLTest, Terminate) {
+  EGLDisplay display = eglGetDisplay(EGL_DEFAULT_DISPLAY);
+  EXPECT_NE(display, EGL_NO_DISPLAY);
+
+  // eglTerminate can be called multiple times without initialization.
+  EXPECT_TRUE(eglTerminate(display));
+  EXPECT_EQ(EGL_SUCCESS, eglGetError());
+  EXPECT_TRUE(eglTerminate(display));
+  EXPECT_EQ(EGL_SUCCESS, eglGetError());
+
+  EXPECT_TRUE(eglInitialize(display, nullptr, nullptr));
+
+  // eglTerminate can be called multiple times.
+  EXPECT_TRUE(eglTerminate(display));
+  EXPECT_EQ(EGL_SUCCESS, eglGetError());
+  EXPECT_TRUE(eglTerminate(display));
+  EXPECT_EQ(EGL_SUCCESS, eglGetError());
+
+  // After Terminate, an egl call returns not initialized.
+  EXPECT_EQ(nullptr, eglQueryString(display, EGL_EXTENSIONS));
+  EXPECT_EQ(EGL_NOT_INITIALIZED, eglGetError());
+
+  // Re-initialization of same display.
+  EXPECT_TRUE(eglInitialize(display, nullptr, nullptr));
+  EXPECT_NE(nullptr, eglQueryString(display, EGL_EXTENSIONS));
+  EXPECT_TRUE(eglTerminate(display));
+
+  EGLDisplay invalid_display = reinterpret_cast<EGLDisplay>(0x1);
+  EXPECT_FALSE(eglTerminate(invalid_display));
+  EXPECT_EQ(EGL_BAD_DISPLAY, eglGetError());
+}
+
+TEST_F(EGLTest, QueryString) {
+  EGLDisplay display = eglGetDisplay(EGL_DEFAULT_DISPLAY);
+  EXPECT_NE(display, EGL_NO_DISPLAY);
+  EXPECT_EQ(nullptr, eglQueryString(display, EGL_EXTENSIONS));
+  EXPECT_EQ(EGL_NOT_INITIALIZED, eglGetError());
+  EXPECT_STREQ("", eglQueryString(EGL_NO_DISPLAY, EGL_EXTENSIONS));
+
+  EXPECT_EQ(nullptr, eglQueryString(display, EGL_VERSION));
+  EXPECT_EQ(EGL_NOT_INITIALIZED, eglGetError());
+  EXPECT_STREQ("1.4", eglQueryString(EGL_NO_DISPLAY, EGL_VERSION));
+
+  EXPECT_EQ(nullptr, eglQueryString(display, EGL_CLIENT_APIS));
+  EXPECT_EQ(EGL_NOT_INITIALIZED, eglGetError());
+  EXPECT_EQ(nullptr, eglQueryString(EGL_NO_DISPLAY, EGL_CLIENT_APIS));
+  EXPECT_EQ(EGL_BAD_DISPLAY, eglGetError());
+  EXPECT_EQ(nullptr, eglQueryString(display, EGL_VENDOR));
+  EXPECT_EQ(EGL_NOT_INITIALIZED, eglGetError());
+  EXPECT_EQ(nullptr, eglQueryString(EGL_NO_DISPLAY, EGL_VENDOR));
+  EXPECT_EQ(EGL_BAD_DISPLAY, eglGetError());
+
+  EXPECT_TRUE(eglInitialize(display, nullptr, nullptr));
+  EXPECT_EQ(EGL_SUCCESS, eglGetError());
+
+  EXPECT_STREQ("", eglQueryString(display, EGL_EXTENSIONS));
+  EXPECT_EQ(EGL_SUCCESS, eglGetError());
+  EXPECT_STREQ("1.4", eglQueryString(display, EGL_VERSION));
+  EXPECT_EQ(EGL_SUCCESS, eglGetError());
+  EXPECT_STREQ("OpenGL_ES", eglQueryString(display, EGL_CLIENT_APIS));
+  EXPECT_EQ(EGL_SUCCESS, eglGetError());
+  EXPECT_STREQ("Google Inc.", eglQueryString(display, EGL_VENDOR));
+  EXPECT_EQ(EGL_SUCCESS, eglGetError());
+}
+
+TEST_F(EGLTest, GetConfigsUninitialized) {
+  EGLDisplay display = eglGetDisplay(EGL_DEFAULT_DISPLAY);
+  EXPECT_NE(display, EGL_NO_DISPLAY);
+
+  EGLint num_config = 0;
+  const int kConfigsSize = 5;
+  EGLConfig configs[kConfigsSize] = {
+      0,
+  };
+
+  EXPECT_FALSE(eglGetConfigs(display, configs, kConfigsSize, &num_config));
+  EXPECT_EQ(EGL_NOT_INITIALIZED, eglGetError());
+
+  EXPECT_FALSE(eglGetConfigs(display, configs, kConfigsSize, nullptr));
+  EXPECT_EQ(EGL_NOT_INITIALIZED, eglGetError());
+}
+
+TEST_F(EGLTest, ChooseConfigUninitialized) {
+  EGLDisplay display = eglGetDisplay(EGL_DEFAULT_DISPLAY);
+  EXPECT_NE(display, EGL_NO_DISPLAY);
+
+  EGLint num_config = 0;
+  EGLint attrib_list[] = {EGL_NONE};
+  const int kConfigsSize = 5;
+  EGLConfig configs[kConfigsSize] = {
+      0,
+  };
+
+  EXPECT_FALSE(eglChooseConfig(display, attrib_list, configs, kConfigsSize,
+                               &num_config));
+  EXPECT_EQ(EGL_NOT_INITIALIZED, eglGetError());
+
+  EXPECT_FALSE(
+      eglChooseConfig(display, attrib_list, configs, kConfigsSize, nullptr));
+  EXPECT_EQ(EGL_NOT_INITIALIZED, eglGetError());
+}
+
+class EGLConfigTest : public EGLTest {
+ public:
+  void SetUp() override;
+
+ protected:
+  void CheckConfigsExist(EGLint num_config);
+
+  enum { kConfigsSize = 5 };
+  EGLDisplay display_;
+  EGLConfig configs_[kConfigsSize];
+};
+
+void EGLConfigTest::SetUp() {
+  display_ = eglGetDisplay(EGL_DEFAULT_DISPLAY);
+  ASSERT_NE(display_, EGL_NO_DISPLAY);
+  EXPECT_TRUE(eglInitialize(display_, nullptr, nullptr));
+  memset(configs_, 0, sizeof(configs_));
+}
+
+void EGLConfigTest::CheckConfigsExist(EGLint num_config) {
+  EGLint i;
+  if (num_config > kConfigsSize)
+    num_config = static_cast<EGLint>(kConfigsSize);
+  for (i = 0; i < num_config; ++i)
+    EXPECT_NE(nullptr, configs_[i]);
+  for (; i < kConfigsSize; ++i)
+    EXPECT_EQ(nullptr, configs_[i]);
+}
+
+TEST_F(EGLConfigTest, GetConfigsBadNumConfigs) {
+  EXPECT_FALSE(eglGetConfigs(display_, configs_, kConfigsSize, nullptr));
+  EXPECT_EQ(EGL_BAD_PARAMETER, eglGetError());
+}
+
+TEST_F(EGLConfigTest, GetConfigsNullConfigs) {
+  EGLint num_config = 0;
+  EXPECT_TRUE(eglGetConfigs(display_, nullptr, 55, &num_config));
+  EXPECT_GT(num_config, 0);
+}
+
+TEST_F(EGLConfigTest, GetConfigsZeroConfigsSize) {
+  EGLint num_config = 0;
+  EXPECT_TRUE(eglGetConfigs(display_, configs_, 0, &num_config));
+  EXPECT_GT(num_config, 0);
+  EXPECT_EQ(nullptr, configs_[0]);
+}
+
+TEST_F(EGLConfigTest, GetConfigs) {
+  EGLint num_config = 0;
+  EXPECT_TRUE(eglGetConfigs(display_, configs_, kConfigsSize, &num_config));
+  EXPECT_GT(num_config, 0);
+  CheckConfigsExist(num_config);
+}
+
+TEST_F(EGLConfigTest, ChooseConfigBadNumConfigs) {
+  EGLint attrib_list[] = {EGL_NONE};
+  EXPECT_FALSE(
+      eglChooseConfig(display_, attrib_list, configs_, kConfigsSize, nullptr));
+  EXPECT_EQ(EGL_BAD_PARAMETER, eglGetError());
+}
+
+TEST_F(EGLConfigTest, ChooseConfigNullConfigs) {
+  EGLint num_config = 0;
+  EGLint attrib_list[] = {EGL_NONE};
+  EXPECT_TRUE(eglChooseConfig(display_, attrib_list, nullptr, 55, &num_config));
+  EXPECT_GT(num_config, 0);
+}
+
+TEST_F(EGLConfigTest, ChooseConfigZeroConfigsSize) {
+  EGLint num_config = 0;
+  EGLint attrib_list[] = {EGL_NONE};
+  EXPECT_TRUE(eglChooseConfig(display_, attrib_list, configs_, 0, &num_config));
+  EXPECT_GT(num_config, 0);
+  EXPECT_EQ(nullptr, configs_[0]);
+}
+
+TEST_F(EGLConfigTest, ChooseConfig) {
+  EGLint num_config = 0;
+  EGLint attrib_list[] = {EGL_NONE};
+  EXPECT_TRUE(eglChooseConfig(display_, attrib_list, configs_, kConfigsSize,
+                              &num_config));
+  EXPECT_GT(num_config, 0);
+  CheckConfigsExist(num_config);
+}
+
+TEST_F(EGLConfigTest, ChooseConfigInvalidAttrib) {
+  const EGLint kNotModified = 55;
+  EGLint num_config = kNotModified;
+  EGLint invalid_attrib_list[] = {0xABCD};
+  EXPECT_FALSE(eglChooseConfig(display_, invalid_attrib_list, configs_,
+                               kConfigsSize, &num_config));
+  EXPECT_EQ(EGL_BAD_ATTRIBUTE, eglGetError());
+  EXPECT_EQ(kNotModified, num_config);
+}
+
+TEST_F(EGLConfigTest, ChooseConfigWindow) {
+  EGLint num_config = 0;
+  EGLint attrib_list[] = {EGL_SURFACE_TYPE, EGL_WINDOW_BIT, EGL_NONE};
+  EXPECT_TRUE(eglChooseConfig(display_, attrib_list, configs_, kConfigsSize,
+                              &num_config));
+  EXPECT_GT(num_config, 0);
+  for (int i = 0; i < num_config; ++i) {
+    EGLint value = EGL_NONE;
+    eglGetConfigAttrib(display_, configs_[i], EGL_SURFACE_TYPE, &value);
+    EXPECT_NE(0, value & EGL_WINDOW_BIT);
+  }
+}
+
+TEST_F(EGLConfigTest, ChooseConfigPBuffer) {
+  EGLint num_config = 0;
+  EGLint attrib_list[] = {EGL_SURFACE_TYPE, EGL_PBUFFER_BIT, EGL_NONE};
+  EXPECT_TRUE(eglChooseConfig(display_, attrib_list, configs_, kConfigsSize,
+                              &num_config));
+  EXPECT_GT(num_config, 0);
+  for (int i = 0; i < num_config; ++i) {
+    EGLint value = EGL_NONE;
+    eglGetConfigAttrib(display_, configs_[0], EGL_SURFACE_TYPE, &value);
+    EXPECT_NE(0, value & EGL_PBUFFER_BIT);
+  }
+}
+
+TEST_F(EGLConfigTest, ChooseConfigWindowPBufferNotPossible) {
+  EGLint num_config = 0;
+  EGLint attrib_list[] = {EGL_SURFACE_TYPE, EGL_PBUFFER_BIT | EGL_WINDOW_BIT,
+                          EGL_NONE};
+  EXPECT_TRUE(eglChooseConfig(display_, attrib_list, configs_, kConfigsSize,
+                              &num_config));
+  EXPECT_EQ(0, num_config);
+}
+
+TEST_F(EGLConfigTest, ChooseConfigBugExample) {
+  static const EGLint kConfigAttribs[] = {
+      EGL_RED_SIZE,       8, EGL_GREEN_SIZE, 8, EGL_BLUE_SIZE,    8,
+      EGL_ALPHA_SIZE,     8, EGL_DEPTH_SIZE, 8, EGL_STENCIL_SIZE, 8,
+      EGL_SAMPLE_BUFFERS, 1, EGL_SAMPLES,    4, EGL_NONE};
+  EGLint num_config = 0;
+  EXPECT_TRUE(eglChooseConfig(display_, kConfigAttribs, configs_, kConfigsSize,
+                              &num_config));
+
+  // The EGL attribs are not really implemented at the moment.
+  EGLint value = EGL_NONE;
+  EXPECT_TRUE(eglGetConfigAttrib(display_, configs_[0], EGL_RED_SIZE, &value));
+  EXPECT_EQ(0, value);
+}
+
+TEST_F(EGLTest, MakeCurrent) {
+  EGLDisplay display = eglGetDisplay(EGL_DEFAULT_DISPLAY);
+  EXPECT_NE(display, EGL_NO_DISPLAY);
+  // "This is the only case where an uninitialized display may be passed to
+  //  eglMakeCurrent."
+  EXPECT_TRUE(
+      eglMakeCurrent(display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT));
+  EGLDisplay invalid_display = reinterpret_cast<EGLDisplay>(0x1);
+  EXPECT_FALSE(eglMakeCurrent(invalid_display, EGL_NO_SURFACE, EGL_NO_SURFACE,
+                              EGL_NO_CONTEXT));
+  EXPECT_EQ(EGL_BAD_DISPLAY, eglGetError());
+
+  EXPECT_TRUE(eglInitialize(display, nullptr, nullptr));
+  EXPECT_TRUE(
+      eglMakeCurrent(display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT));
+  EXPECT_FALSE(eglMakeCurrent(invalid_display, EGL_NO_SURFACE, EGL_NO_SURFACE,
+                              EGL_NO_CONTEXT));
+}
+
+class EGLSurfaceTest : public EGLTest {
+ public:
+  void SetUp() override;
+  void CreateSurfaceAndContext(EGLSurface* surface, EGLContext* context);
+
+ protected:
+  EGLDisplay display_;
+};
+
+void EGLSurfaceTest::SetUp() {
+  EGLTest::SetUp();
+  display_ = eglGetDisplay(EGL_DEFAULT_DISPLAY);
+  EXPECT_TRUE(eglInitialize(display_, nullptr, nullptr));
+}
+
+void EGLSurfaceTest::CreateSurfaceAndContext(EGLSurface* surface,
+                                             EGLContext* context) {
+  static const EGLint config_attribs[] = {EGL_SURFACE_TYPE, EGL_PBUFFER_BIT,
+                                          EGL_NONE};
+  EGLint num_config;
+  EGLConfig config;
+  EXPECT_TRUE(
+      eglChooseConfig(display_, config_attribs, &config, 1, &num_config));
+  ASSERT_GT(num_config, 0);
+  static const EGLint surface_attribs[] = {EGL_WIDTH, 1, EGL_HEIGHT, 1,
+                                           EGL_NONE};
+  *surface = eglCreatePbufferSurface(display_, config, surface_attribs);
+  static const EGLint context_attribs[] = {EGL_CONTEXT_CLIENT_VERSION, 2,
+                                           EGL_NONE};
+  *context = eglCreateContext(display_, config, nullptr, context_attribs);
+}
+
+class EGLMultipleSurfacesContextsTest : public EGLSurfaceTest {
+ public:
+  void SetUp() override;
+  void TearDown() override;
+
+ protected:
+  EGLSurface surface1_;
+  EGLSurface surface2_;
+  EGLContext context1_;
+  EGLContext context2_;
+};
+
+void EGLMultipleSurfacesContextsTest::SetUp() {
+  EGLSurfaceTest::SetUp();
+  CreateSurfaceAndContext(&surface1_, &context1_);
+  CreateSurfaceAndContext(&surface2_, &context2_);
+  EXPECT_NE(EGL_NO_SURFACE, surface1_);
+  EXPECT_NE(EGL_NO_SURFACE, surface2_);
+  EXPECT_NE(surface1_, surface2_);
+  EXPECT_NE(EGL_NO_CONTEXT, context1_);
+  EXPECT_NE(EGL_NO_CONTEXT, context2_);
+  EXPECT_NE(context1_, context2_);
+}
+
+void EGLMultipleSurfacesContextsTest::TearDown() {
+  EXPECT_TRUE(eglDestroyContext(display_, context1_));
+  EXPECT_TRUE(eglDestroySurface(display_, surface1_));
+  EXPECT_TRUE(eglDestroyContext(display_, context2_));
+  EXPECT_TRUE(eglDestroySurface(display_, surface2_));
+  EGLTest::TearDown();
+}
+
+TEST_F(EGLMultipleSurfacesContextsTest, NoMakeCurrent) {}
+
+TEST_F(EGLMultipleSurfacesContextsTest, MakeCurrentSurfaces) {
+  EXPECT_TRUE(eglMakeCurrent(display_, surface1_, surface1_, context1_));
+  EXPECT_TRUE(eglMakeCurrent(display_, surface2_, surface2_, context2_));
+  EXPECT_TRUE(eglMakeCurrent(display_, surface1_, surface1_, context2_));
+  EXPECT_TRUE(eglMakeCurrent(display_, surface2_, surface2_, context1_));
+}
+
+TEST_F(EGLMultipleSurfacesContextsTest, MakeCurrentSameSurface1) {
+  EXPECT_TRUE(eglMakeCurrent(display_, surface1_, surface1_, context1_));
+  EXPECT_TRUE(eglMakeCurrent(display_, surface1_, surface1_, context2_));
+}
+
+TEST_F(EGLMultipleSurfacesContextsTest, MakeCurrentSameSurface2) {
+  EXPECT_TRUE(eglMakeCurrent(display_, surface1_, surface1_, context1_));
+  EXPECT_TRUE(eglMakeCurrent(display_, surface2_, surface2_, context1_));
+  EXPECT_TRUE(eglMakeCurrent(display_, surface2_, surface2_, context2_));
+}
+
+TEST_F(EGLMultipleSurfacesContextsTest, MakeCurrentSurfacesAndReleases) {
+  EXPECT_TRUE(eglMakeCurrent(display_, surface1_, surface1_, context1_));
+  EXPECT_TRUE(
+      eglMakeCurrent(display_, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT));
+  EXPECT_TRUE(eglMakeCurrent(display_, surface2_, surface2_, context2_));
+  EXPECT_TRUE(
+      eglMakeCurrent(display_, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT));
+  EXPECT_TRUE(eglMakeCurrent(display_, surface1_, surface1_, context2_));
+  EXPECT_TRUE(
+      eglMakeCurrent(display_, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT));
+  EXPECT_TRUE(eglMakeCurrent(display_, surface2_, surface2_, context1_));
+  EXPECT_TRUE(
+      eglMakeCurrent(display_, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT));
+}
+
+TEST_F(EGLMultipleSurfacesContextsTest, MakeCurrentSurfaceFails) {
+  EXPECT_FALSE(eglMakeCurrent(display_, surface1_, surface1_, EGL_NO_CONTEXT));
+  EXPECT_EQ(EGL_BAD_CONTEXT, eglGetError());
+  EXPECT_FALSE(eglMakeCurrent(display_, surface1_, EGL_NO_SURFACE, context1_));
+  EXPECT_EQ(EGL_BAD_SURFACE, eglGetError());
+  EXPECT_FALSE(eglMakeCurrent(display_, EGL_NO_SURFACE, surface1_, context1_));
+  EXPECT_EQ(EGL_BAD_SURFACE, eglGetError());
+
+  EGLDisplay invalid_display = reinterpret_cast<EGLDisplay>(0x1);
+  EGLSurface invalid_surface = reinterpret_cast<EGLSurface>(0x1);
+  EGLSurface invalid_context = reinterpret_cast<EGLContext>(0x1);
+  EXPECT_FALSE(
+      eglMakeCurrent(invalid_display, surface1_, surface1_, context1_));
+  EXPECT_EQ(EGL_BAD_DISPLAY, eglGetError());
+  EXPECT_FALSE(eglMakeCurrent(display_, surface1_, surface1_, invalid_context));
+  EXPECT_EQ(EGL_BAD_CONTEXT, eglGetError());
+  EXPECT_FALSE(eglMakeCurrent(display_, surface1_, invalid_surface, context1_));
+  EXPECT_EQ(EGL_BAD_SURFACE, eglGetError());
+  EXPECT_FALSE(eglMakeCurrent(display_, invalid_surface, surface1_, context1_));
+  EXPECT_EQ(EGL_BAD_SURFACE, eglGetError());
+
+  // Command buffer limitation:
+  // Different read and draw surfaces fail.
+  EXPECT_FALSE(eglMakeCurrent(display_, surface1_, surface2_, context1_));
+  EXPECT_EQ(EGL_BAD_MATCH, eglGetError());
+}
+
+TEST_F(EGLMultipleSurfacesContextsTest, CallGLOnMultipleContextNoCrash) {
+  EXPECT_TRUE(eglMakeCurrent(display_, surface1_, surface1_, context1_));
+
+  typedef GL_APICALL void(GL_APIENTRY * glEnableProc)(GLenum);
+  glEnableProc glEnable =
+      reinterpret_cast<glEnableProc>(eglGetProcAddress("glEnable"));
+  EXPECT_NE(nullptr, glEnable);
+
+  glEnable(GL_BLEND);
+
+  EXPECT_TRUE(eglMakeCurrent(display_, surface2_, surface2_, context2_));
+  glEnable(GL_BLEND);
+}
+
+class EGLThreadTest : public EGLSurfaceTest {
+ public:
+  EGLThreadTest();
+  void SetUp() override;
+  void TearDown() override;
+  void OtherThreadTearDown(base::WaitableEvent*);
+  void OtherThreadMakeCurrent(EGLSurface surface,
+                              EGLContext context,
+                              EGLBoolean* result,
+                              base::WaitableEvent*);
+  void OtherThreadGetError(EGLint* result, base::WaitableEvent*);
+
+ protected:
+  base::Thread other_thread_;
+};
+
+EGLThreadTest::EGLThreadTest()
+    : EGLSurfaceTest(), other_thread_("EGLThreadTest thread") {}
+void EGLThreadTest::SetUp() {
+  EGLSurfaceTest::SetUp();
+  other_thread_.Start();
+}
+
+void EGLThreadTest::TearDown() {
+  base::WaitableEvent completion(true, false);
+  other_thread_.task_runner()->PostTask(
+      FROM_HERE, base::Bind(&EGLThreadTest::OtherThreadTearDown,
+                            base::Unretained(this), &completion));
+  completion.Wait();
+  other_thread_.Stop();
+  EGLSurfaceTest::TearDown();
+}
+
+void EGLThreadTest::OtherThreadTearDown(base::WaitableEvent* completion) {
+  EXPECT_TRUE(eglReleaseThread());
+  completion->Signal();
+}
+
+void EGLThreadTest::OtherThreadMakeCurrent(EGLSurface surface,
+                                           EGLContext context,
+                                           EGLBoolean* result,
+                                           base::WaitableEvent* completion) {
+  *result = eglMakeCurrent(display_, surface, surface, context);
+  completion->Signal();
+}
+
+void EGLThreadTest::OtherThreadGetError(EGLint* result,
+                                        base::WaitableEvent* completion) {
+  *result = eglGetError();
+  completion->Signal();
+}
+
+TEST_F(EGLThreadTest, OnlyReleaseThreadInOther) {}
+
+TEST_F(EGLThreadTest, Basic) {
+  EGLSurface surface;
+  EGLContext context;
+  CreateSurfaceAndContext(&surface, &context);
+  EXPECT_NE(EGL_NO_SURFACE, surface);
+  EXPECT_NE(EGL_NO_CONTEXT, context);
+
+  EXPECT_TRUE(eglMakeCurrent(display_, surface, surface, context));
+
+  base::WaitableEvent completion(false, false);
+
+  EGLBoolean result = EGL_FALSE;
+  other_thread_.task_runner()->PostTask(
+      FROM_HERE,
+      base::Bind(&EGLThreadTest::OtherThreadMakeCurrent, base::Unretained(this),
+                 surface, context, &result, &completion));
+  completion.Wait();
+  EXPECT_FALSE(result);
+  EXPECT_EQ(EGL_SUCCESS, eglGetError());
+
+  EGLint error = EGL_NONE;
+  other_thread_.task_runner()->PostTask(
+      FROM_HERE, base::Bind(&EGLThreadTest::OtherThreadGetError,
+                            base::Unretained(this), &error, &completion));
+  completion.Wait();
+  EXPECT_EQ(EGL_BAD_ACCESS, error);
+  EXPECT_EQ(EGL_SUCCESS, eglGetError());
+
+  other_thread_.task_runner()->PostTask(
+      FROM_HERE, base::Bind(&EGLThreadTest::OtherThreadGetError,
+                            base::Unretained(this), &error, &completion));
+  completion.Wait();
+  EXPECT_EQ(EGL_SUCCESS, error);
+
+  EXPECT_TRUE(
+      eglMakeCurrent(display_, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT));
+
+  other_thread_.task_runner()->PostTask(
+      FROM_HERE,
+      base::Bind(&EGLThreadTest::OtherThreadMakeCurrent, base::Unretained(this),
+                 surface, context, &result, &completion));
+  completion.Wait();
+  EXPECT_TRUE(result);
+
+  EXPECT_FALSE(eglMakeCurrent(display_, surface, surface, context));
+  EXPECT_EQ(EGL_BAD_ACCESS, eglGetError());
+
+  EXPECT_TRUE(eglDestroySurface(display_, surface));
+  EXPECT_TRUE(eglDestroyContext(display_, context));
 }
 
 }  // namespace gpu
diff --git a/gpu/gles2_conform_support/egl/BUILD.gn b/gpu/gles2_conform_support/egl/BUILD.gn
index ee06fbf..731237d 100644
--- a/gpu/gles2_conform_support/egl/BUILD.gn
+++ b/gpu/gles2_conform_support/egl/BUILD.gn
@@ -8,11 +8,15 @@
   sources = [
     "config.cc",
     "config.h",
+    "context.cc",
+    "context.h",
     "display.cc",
     "display.h",
     "egl.cc",
     "surface.cc",
     "surface.h",
+    "thread_state.cc",
+    "thread_state.h",
   ]
 
   configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
@@ -26,6 +30,7 @@
     "//base",
     "//gpu",
     "//gpu/command_buffer/client:gles2_implementation_no_check",
+    "//gpu/command_buffer/common:gles2_utils",
     "//gpu/command_buffer/service",
     "//ui/base",
     "//ui/gfx",
diff --git a/gpu/gles2_conform_support/egl/config.cc b/gpu/gles2_conform_support/egl/config.cc
index d6ce3072..53bd440d 100644
--- a/gpu/gles2_conform_support/egl/config.cc
+++ b/gpu/gles2_conform_support/egl/config.cc
@@ -3,10 +3,11 @@
 // found in the LICENSE file.
 
 #include "gpu/gles2_conform_support/egl/config.h"
+#include "base/logging.h"
 
 namespace egl {
 
-Config::Config()
+Config::Config(EGLint surface_type)
     : buffer_size_(0),
       red_size_(0),
       green_size_(0),
@@ -34,16 +35,37 @@
       sample_buffers_(0),
       samples_(0),
       stencil_size_(0),
-      surface_type_(EGL_WINDOW_BIT),
+      surface_type_(surface_type),
       transparent_type_(EGL_NONE),
       transparent_red_value_(EGL_DONT_CARE),
       transparent_green_value_(EGL_DONT_CARE),
       transparent_blue_value_(EGL_DONT_CARE) {
+  DCHECK(surface_type == EGL_WINDOW_BIT || surface_type == EGL_PBUFFER_BIT);
 }
 
 Config::~Config() {
 }
 
+bool Config::Matches(const EGLint* attrib_list) const {
+  DCHECK(ValidateAttributeList(attrib_list));
+  if (attrib_list) {
+    for (int i = 0; attrib_list[i] != EGL_NONE; i += 2) {
+      switch (attrib_list[i]) {
+        case EGL_SURFACE_TYPE: {
+          EGLint requested_surface_type = attrib_list[i + 1];
+          if (requested_surface_type != EGL_DONT_CARE &&
+              (requested_surface_type & surface_type_) !=
+                  requested_surface_type)
+            return false;
+        }
+        default:
+          break;
+      }
+    }
+  }
+  return true;
+}
+
 bool Config::GetAttrib(EGLint attribute, EGLint* value) const {
   // TODO(alokp): Find out how to get correct values.
   switch (attribute) {
@@ -149,4 +171,52 @@
   return true;
 }
 
+bool Config::ValidateAttributeList(const EGLint* attrib_list) {
+  if (attrib_list) {
+    for (int i = 0; attrib_list[i] != EGL_NONE; i += 2) {
+      switch (attrib_list[i]) {
+        case EGL_ALPHA_MASK_SIZE:
+        case EGL_ALPHA_SIZE:
+        case EGL_BIND_TO_TEXTURE_RGB:
+        case EGL_BIND_TO_TEXTURE_RGBA:
+        case EGL_BLUE_SIZE:
+        case EGL_BUFFER_SIZE:
+        case EGL_COLOR_BUFFER_TYPE:
+        case EGL_CONFIG_CAVEAT:
+        case EGL_CONFIG_ID:
+        case EGL_CONFORMANT:
+        case EGL_DEPTH_SIZE:
+        case EGL_GREEN_SIZE:
+        case EGL_LEVEL:
+        case EGL_LUMINANCE_SIZE:
+        case EGL_MATCH_NATIVE_PIXMAP:
+        case EGL_NATIVE_RENDERABLE:
+        case EGL_MAX_SWAP_INTERVAL:
+        case EGL_MIN_SWAP_INTERVAL:
+        case EGL_RED_SIZE:
+        case EGL_SAMPLE_BUFFERS:
+        case EGL_SAMPLES:
+        case EGL_STENCIL_SIZE:
+        case EGL_RENDERABLE_TYPE:
+        case EGL_SURFACE_TYPE:
+        case EGL_MULTISAMPLE_RESOLVE_BOX_BIT:
+        case EGL_PBUFFER_BIT:
+        case EGL_PIXMAP_BIT:
+        case EGL_SWAP_BEHAVIOR_PRESERVED_BIT:
+        case EGL_VG_ALPHA_FORMAT_PRE_BIT:
+        case EGL_VG_COLORSPACE_LINEAR_BIT:
+        case EGL_WINDOW_BIT:
+        case EGL_TRANSPARENT_TYPE:
+        case EGL_TRANSPARENT_RED_VALUE:
+        case EGL_TRANSPARENT_GREEN_VALUE:
+        case EGL_TRANSPARENT_BLUE_VALUE:
+          break;
+        default:
+          return false;
+      }
+    }
+  }
+  return true;
+}
+
 }  // namespace egl
diff --git a/gpu/gles2_conform_support/egl/config.h b/gpu/gles2_conform_support/egl/config.h
index 53bb568..1ce8156 100644
--- a/gpu/gles2_conform_support/egl/config.h
+++ b/gpu/gles2_conform_support/egl/config.h
@@ -13,10 +13,11 @@
 
 class Config {
  public:
-  Config();
+  explicit Config(EGLint surface_type);
   ~Config();
-
+  bool Matches(const EGLint* attrib_list) const;
   bool GetAttrib(EGLint attribute, EGLint* value) const;
+  static bool ValidateAttributeList(const EGLint* attrib_list);
 
  private:
   // Total color component bits in the color buffer.
diff --git a/gpu/gles2_conform_support/egl/context.cc b/gpu/gles2_conform_support/egl/context.cc
new file mode 100644
index 0000000..47ae35f
--- /dev/null
+++ b/gpu/gles2_conform_support/egl/context.cc
@@ -0,0 +1,390 @@
+// 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 "gpu/gles2_conform_support/egl/context.h"
+
+#include "base/bind.h"
+#include "base/bind_helpers.h"
+#include "gpu/command_buffer/client/gles2_implementation.h"
+#include "gpu/command_buffer/client/gles2_lib.h"
+#include "gpu/command_buffer/client/transfer_buffer.h"
+#include "gpu/command_buffer/common/value_state.h"
+#include "gpu/command_buffer/service/context_group.h"
+#include "gpu/command_buffer/service/mailbox_manager.h"
+#include "gpu/command_buffer/service/memory_tracking.h"
+#include "gpu/command_buffer/service/transfer_buffer_manager.h"
+#include "gpu/command_buffer/service/valuebuffer_manager.h"
+#include "gpu/gles2_conform_support/egl/config.h"
+#include "gpu/gles2_conform_support/egl/display.h"
+#include "gpu/gles2_conform_support/egl/surface.h"
+#include "gpu/gles2_conform_support/egl/thread_state.h"
+
+// The slight complexification in this file comes from following properties:
+// 1) Command buffer connection (context) can not be established without a
+// GLSurface. EGL Context can be created independent of a surface.  This is why
+// the connection is created only during first MakeCurrent.
+// 2) Command buffer MakeCurrent calls need the real gl context and surface be
+// current.
+// 3) Client can change real EGL context behind the scenes and then still expect
+// command buffer MakeCurrent re-set the command buffer context. This is why all
+// MakeCurrent calls must actually reset the real context, even though command
+// buffer current context does not change.
+// 4) EGL context can be destroyed without surface, but command buffer would
+// need the surface to run various cleanups. If context is destroyed
+// surfaceless, the context is marked lost before destruction. This is avoided
+// if possible, since command buffer at the time of writing prints out debug
+// text in this case.
+
+namespace {
+const int32_t kCommandBufferSize = 1024 * 1024;
+const int32_t kTransferBufferSize = 512 * 1024;
+const bool kBindGeneratesResources = true;
+const bool kLoseContextWhenOutOfMemory = false;
+const bool kSupportClientSideArrays = true;
+}
+
+namespace egl {
+Context::Context(Display* display, const Config* config)
+    : display_(display),
+      config_(config),
+      is_current_in_some_thread_(false),
+      is_destroyed_(false) {}
+
+Context::~Context() {
+  // We might not have a surface, so we must lose the context.  Cleanup will
+  // execute GL commands otherwise. TODO: if shared contexts are ever
+  // implemented, this will leak the GL resources. For pbuffer contexts, one
+  // could track the last current surface or create a surface for destroying
+  // purposes only. Other option would be to make the service usable without
+  // surface.
+  if (HasService()) {
+    if (!WasServiceContextLost())
+      MarkServiceContextLost();
+    DestroyService();
+  }
+}
+
+void Context::MarkDestroyed() {
+  is_destroyed_ = true;
+}
+
+void Context::FlushAndSwapBuffers(gfx::GLSurface* current_surface) {
+  DCHECK(HasService() && is_current_in_some_thread_);
+  if (!Flush(current_surface))
+    return;
+  current_surface->SwapBuffers();
+}
+
+bool Context::MakeCurrent(Context* current_context,
+                          gfx::GLSurface* current_surface,
+                          Context* new_context,
+                          gfx::GLSurface* new_surface) {
+  if (!new_context && !current_context) {
+    return true;
+  }
+
+  bool cleanup_old_current_context = false;
+  if (current_context) {
+    if (current_context->Flush(current_surface))
+      cleanup_old_current_context = new_context != current_context;
+  }
+
+  if (new_context) {
+    if (!new_context->IsCompatibleSurface(new_surface))
+      return false;
+
+    if (new_context->HasService()) {
+      if (new_context->WasServiceContextLost())
+        return false;
+      if (new_context != current_context) {
+        // If Flush did not set the current context, set it now. Otherwise
+        // calling into the decoder is not ok.
+        if (!new_context->gl_context_->MakeCurrent(new_surface)) {
+          new_context->MarkServiceContextLost();
+          return false;
+        }
+      }
+      if (new_context != current_context || new_surface != current_surface)
+        new_context->decoder_->SetSurface(new_surface);
+      if (!new_context->decoder_->MakeCurrent()) {
+        new_context->MarkServiceContextLost();
+        return false;
+      }
+    } else {
+      if (!new_context->CreateService(new_surface)) {
+        return false;
+      }
+    }
+  }
+
+  // The current_surface will be released when MakeCurrent succeeds.
+  // Cleanup in this case only.
+  if (cleanup_old_current_context) {
+    if (current_context->is_destroyed_ && current_surface != new_surface) {
+      current_context->gl_context_->MakeCurrent(current_surface);
+      // If we are releasing the context and we have one ref, it means that the
+      // ref will be lost and the object will be destroyed.  Destroy the service
+      // explicitly here, so that cleanup can happen and client GL
+      // implementation does not print errors.
+      current_context->DestroyService();
+    } else {
+      current_context->decoder_->ReleaseSurface();
+    }
+  }
+
+  return true;
+}
+
+bool Context::ValidateAttributeList(const EGLint* attrib_list) {
+  if (attrib_list) {
+    for (int i = 0; attrib_list[i] != EGL_NONE; attrib_list += 2) {
+      switch (attrib_list[i]) {
+        case EGL_CONTEXT_CLIENT_VERSION:
+          break;
+        default:
+          return false;
+      }
+    }
+  }
+  return true;
+}
+
+gpu::Capabilities Context::GetCapabilities() {
+  return decoder_->GetCapabilities();
+}
+
+int32_t Context::CreateImage(ClientBuffer buffer,
+                             size_t width,
+                             size_t height,
+                             unsigned internalformat) {
+  NOTIMPLEMENTED();
+  return -1;
+}
+
+void Context::DestroyImage(int32_t id) {
+  NOTIMPLEMENTED();
+}
+
+int32_t Context::CreateGpuMemoryBufferImage(size_t width,
+                                            size_t height,
+                                            unsigned internalformat,
+                                            unsigned usage) {
+  NOTIMPLEMENTED();
+  return -1;
+}
+
+void Context::SignalQuery(uint32_t query, const base::Closure& callback) {
+  NOTIMPLEMENTED();
+}
+
+void Context::SetLock(base::Lock*) {
+  NOTIMPLEMENTED();
+}
+
+bool Context::IsGpuChannelLost() {
+  NOTIMPLEMENTED();
+  return false;
+}
+
+void Context::EnsureWorkVisible() {
+  // This is only relevant for out-of-process command buffers.
+}
+
+gpu::CommandBufferNamespace Context::GetNamespaceID() const {
+  return gpu::CommandBufferNamespace::IN_PROCESS;
+}
+
+gpu::CommandBufferId Context::GetCommandBufferID() const {
+  return gpu::CommandBufferId();
+}
+
+int32_t Context::GetExtraCommandBufferData() const {
+  return 0;
+}
+
+uint64_t Context::GenerateFenceSyncRelease() {
+  return display_->GenerateFenceSyncRelease();
+}
+
+bool Context::IsFenceSyncRelease(uint64_t release) {
+  return display_->IsFenceSyncRelease(release);
+}
+
+bool Context::IsFenceSyncFlushed(uint64_t release) {
+  return display_->IsFenceSyncFlushed(release);
+}
+
+bool Context::IsFenceSyncFlushReceived(uint64_t release) {
+  return display_->IsFenceSyncFlushReceived(release);
+}
+
+void Context::SignalSyncToken(const gpu::SyncToken& sync_token,
+                              const base::Closure& callback) {
+  NOTIMPLEMENTED();
+}
+
+bool Context::CanWaitUnverifiedSyncToken(const gpu::SyncToken* sync_token) {
+  return false;
+}
+
+void Context::ApplyCurrentContext(gfx::GLSurface* current_surface) {
+  DCHECK(HasService());
+  // The current_surface will be the same as
+  // the surface of the decoder. We can not DCHECK as there is
+  // no accessor.
+  if (!WasServiceContextLost()) {
+    if (!gl_context_->MakeCurrent(current_surface))
+      MarkServiceContextLost();
+  }
+  gles2::SetGLContext(client_gl_context_.get());
+}
+
+void Context::ApplyContextReleased() {
+  gles2::SetGLContext(nullptr);
+}
+
+bool Context::CreateService(gfx::GLSurface* gl_surface) {
+  scoped_refptr<gpu::TransferBufferManager> transfer_buffer_manager(
+      new gpu::TransferBufferManager(nullptr));
+  transfer_buffer_manager->Initialize();
+
+  scoped_ptr<gpu::CommandBufferService> command_buffer(
+      new gpu::CommandBufferService(transfer_buffer_manager.get()));
+  if (!command_buffer->Initialize())
+    return false;
+
+  scoped_refptr<gpu::gles2::ContextGroup> group(new gpu::gles2::ContextGroup(
+      NULL, NULL, new gpu::gles2::ShaderTranslatorCache,
+      new gpu::gles2::FramebufferCompletenessCache, NULL, NULL, NULL, true));
+
+  scoped_ptr<gpu::gles2::GLES2Decoder> decoder(
+      gpu::gles2::GLES2Decoder::Create(group.get()));
+  if (!decoder.get())
+    return false;
+
+  scoped_ptr<gpu::GpuScheduler> gpu_scheduler(new gpu::GpuScheduler(
+      command_buffer.get(), decoder.get(), decoder.get()));
+
+  decoder->set_engine(gpu_scheduler.get());
+
+  scoped_refptr<gfx::GLContext> gl_context(gfx::GLContext::CreateGLContext(
+      nullptr, gl_surface, gfx::PreferDiscreteGpu));
+  if (!gl_context)
+    return false;
+
+  gl_context->MakeCurrent(gl_surface);
+
+  gpu::gles2::ContextCreationAttribHelper helper;
+  config_->GetAttrib(EGL_ALPHA_SIZE, &helper.alpha_size);
+  config_->GetAttrib(EGL_BLUE_SIZE, &helper.blue_size);
+  config_->GetAttrib(EGL_GREEN_SIZE, &helper.green_size);
+  config_->GetAttrib(EGL_RED_SIZE, &helper.red_size);
+  config_->GetAttrib(EGL_DEPTH_SIZE, &helper.depth_size);
+  config_->GetAttrib(EGL_STENCIL_SIZE, &helper.stencil_size);
+  config_->GetAttrib(EGL_SAMPLES, &helper.samples);
+  config_->GetAttrib(EGL_SAMPLE_BUFFERS, &helper.sample_buffers);
+
+  helper.buffer_preserved = false;
+  helper.bind_generates_resource = kBindGeneratesResources;
+  helper.fail_if_major_perf_caveat = false;
+  helper.lose_context_when_out_of_memory = kLoseContextWhenOutOfMemory;
+  helper.context_type = gpu::gles2::CONTEXT_TYPE_OPENGLES2;
+  std::vector<int32_t> attribs;
+  helper.Serialize(&attribs);
+
+  if (!decoder->Initialize(gl_surface, gl_context.get(),
+                           gl_surface->IsOffscreen(), gl_surface->GetSize(),
+                           gpu::gles2::DisallowedFeatures(), attribs)) {
+    return false;
+  }
+
+  command_buffer->SetPutOffsetChangeCallback(base::Bind(
+      &gpu::GpuScheduler::PutChanged, base::Unretained(gpu_scheduler.get())));
+  command_buffer->SetGetBufferChangeCallback(base::Bind(
+      &gpu::GpuScheduler::SetGetBuffer, base::Unretained(gpu_scheduler.get())));
+
+  scoped_ptr<gpu::gles2::GLES2CmdHelper> gles2_cmd_helper(
+      new gpu::gles2::GLES2CmdHelper(command_buffer.get()));
+  if (!gles2_cmd_helper->Initialize(kCommandBufferSize)) {
+    decoder->Destroy(true);
+    return false;
+  }
+
+  scoped_ptr<gpu::TransferBuffer> transfer_buffer(
+      new gpu::TransferBuffer(gles2_cmd_helper.get()));
+
+  gles2_cmd_helper_.reset(gles2_cmd_helper.release());
+  transfer_buffer_.reset(transfer_buffer.release());
+  command_buffer_.reset(command_buffer.release());
+  gpu_scheduler_.reset(gpu_scheduler.release());
+  decoder_.reset(decoder.release());
+  gl_context_ = gl_context.get();
+
+  scoped_ptr<gpu::gles2::GLES2Implementation> context(
+      new gpu::gles2::GLES2Implementation(
+          gles2_cmd_helper_.get(), nullptr, transfer_buffer_.get(),
+          kBindGeneratesResources, kLoseContextWhenOutOfMemory,
+          kSupportClientSideArrays, this));
+
+  if (!context->Initialize(kTransferBufferSize, kTransferBufferSize / 2,
+                           kTransferBufferSize * 2,
+                           gpu::gles2::GLES2Implementation::kNoLimit)) {
+    DestroyService();
+    return false;
+  }
+
+  context->EnableFeatureCHROMIUM("pepper3d_allow_buffers_on_multiple_targets");
+  context->EnableFeatureCHROMIUM("pepper3d_support_fixed_attribs");
+  client_gl_context_.reset(context.release());
+  return true;
+}
+
+void Context::DestroyService() {
+  DCHECK(HasService());
+  bool have_context = !WasServiceContextLost();
+  // The client gl interface might still be set to current global
+  // interface. This will be cleaned up in ApplyContextReleased
+  // with AutoCurrentContextRestore.
+  client_gl_context_.reset();
+  gl_context_ = nullptr;
+
+  transfer_buffer_.reset();
+  gpu_scheduler_.reset();
+  if (decoder_)
+    decoder_->Destroy(have_context);
+  gles2_cmd_helper_.reset();
+  command_buffer_.reset();
+}
+
+bool Context::HasService() const {
+  return decoder_ != nullptr;
+}
+
+void Context::MarkServiceContextLost() {
+  decoder_->MarkContextLost(gpu::error::kMakeCurrentFailed);
+}
+
+bool Context::WasServiceContextLost() const {
+  return decoder_->WasContextLost();
+}
+
+bool Context::IsCompatibleSurface(gfx::GLSurface* gl_surface) {
+  EGLint value = EGL_NONE;
+  config_->GetAttrib(EGL_SURFACE_TYPE, &value);
+  bool config_is_offscreen = (value & EGL_PBUFFER_BIT) != 0;
+  return gl_surface->IsOffscreen() == config_is_offscreen;
+}
+
+bool Context::Flush(gfx::GLSurface* gl_surface) {
+  if (WasServiceContextLost())
+    return false;
+  if (!gl_context_->MakeCurrent(gl_surface)) {
+    MarkServiceContextLost();
+    return false;
+  }
+  client_gl_context_->Flush();
+  return true;
+}
+
+}  // namespace egl
diff --git a/gpu/gles2_conform_support/egl/context.h b/gpu/gles2_conform_support/egl/context.h
new file mode 100644
index 0000000..41483fb
--- /dev/null
+++ b/gpu/gles2_conform_support/egl/context.h
@@ -0,0 +1,120 @@
+// Copyright (c) 2011 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 GPU_GLES2_CONFORM_TEST_CONTEXT_H_
+#define GPU_GLES2_CONFORM_TEST_CONTEXT_H_
+
+#include "base/macros.h"
+#include "base/memory/ref_counted.h"
+#include "gpu/command_buffer/client/gles2_cmd_helper.h"
+#include "gpu/command_buffer/client/gpu_control.h"
+#include "gpu/command_buffer/service/command_buffer_service.h"
+#include "gpu/command_buffer/service/gles2_cmd_decoder.h"
+#include "gpu/command_buffer/service/gpu_scheduler.h"
+#include "ui/gfx/native_widget_types.h"
+#include "ui/gl/gl_context.h"
+#include "ui/gl/gl_context.h"
+#include "ui/gl/gl_surface.h"
+#include "ui/gl/gl_surface.h"
+#include <EGL/egl.h>
+
+namespace gpu {
+class CommandBufferService;
+class GpuControl;
+class GpuScheduler;
+class TransferBuffer;
+class TransferBufferManagerInterface;
+
+namespace gles2 {
+class GLES2CmdHelper;
+class GLES2Interface;
+}  // namespace gles2
+}  // namespace gpu
+
+namespace egl {
+class Display;
+class Surface;
+class Config;
+
+class Context : public base::RefCountedThreadSafe<Context>,
+                private gpu::GpuControl {
+ public:
+  Context(Display* display, const Config* config);
+  bool is_current_in_some_thread() const { return is_current_in_some_thread_; }
+  void set_is_current_in_some_thread(bool flag) {
+    is_current_in_some_thread_ = flag;
+  }
+  void MarkDestroyed();
+  void FlushAndSwapBuffers(gfx::GLSurface* current_surface);
+
+  static bool MakeCurrent(Context* current_context,
+                          gfx::GLSurface* current_surface,
+                          Context* new_context,
+                          gfx::GLSurface* new_surface);
+
+  static bool ValidateAttributeList(const EGLint* attrib_list);
+
+  // GpuControl implementation.
+  gpu::Capabilities GetCapabilities() override;
+  int32_t CreateImage(ClientBuffer buffer,
+                      size_t width,
+                      size_t height,
+                      unsigned internalformat) override;
+  void DestroyImage(int32_t id) override;
+  int32_t CreateGpuMemoryBufferImage(size_t width,
+                                     size_t height,
+                                     unsigned internalformat,
+                                     unsigned usage) override;
+  void SignalQuery(uint32_t query, const base::Closure& callback) override;
+  void SetLock(base::Lock*) override;
+  bool IsGpuChannelLost() override;
+  void EnsureWorkVisible() override;
+  gpu::CommandBufferNamespace GetNamespaceID() const override;
+  gpu::CommandBufferId GetCommandBufferID() const override;
+  int32_t GetExtraCommandBufferData() const override;
+  uint64_t GenerateFenceSyncRelease() override;
+  bool IsFenceSyncRelease(uint64_t release) override;
+  bool IsFenceSyncFlushed(uint64_t release) override;
+  bool IsFenceSyncFlushReceived(uint64_t release) override;
+  void SignalSyncToken(const gpu::SyncToken& sync_token,
+                       const base::Closure& callback) override;
+  bool CanWaitUnverifiedSyncToken(const gpu::SyncToken* sync_token) override;
+
+  // Called by ThreadState to set the needed global variables when this context
+  // is current.
+  void ApplyCurrentContext(gfx::GLSurface* current_surface);
+  static void ApplyContextReleased();
+
+ private:
+  friend class base::RefCountedThreadSafe<Context>;
+  ~Context() override;
+  bool CreateService(gfx::GLSurface* gl_surface);
+  void DestroyService();
+  // Returns true if the object has GL service, either a working one or one
+  // that has lost its GL context.
+  bool HasService() const;
+  void MarkServiceContextLost();
+  bool WasServiceContextLost() const;
+  bool IsCompatibleSurface(gfx::GLSurface* gl_surface);
+  bool Flush(gfx::GLSurface* gl_surface);
+
+  Display* display_;
+  const Config* config_;
+  bool is_current_in_some_thread_;
+  bool is_destroyed_;
+  scoped_ptr<gpu::CommandBufferService> command_buffer_;
+  scoped_ptr<gpu::gles2::GLES2CmdHelper> gles2_cmd_helper_;
+  scoped_ptr<gpu::gles2::GLES2Decoder> decoder_;
+  scoped_ptr<gpu::GpuScheduler> gpu_scheduler_;
+  scoped_ptr<gpu::TransferBuffer> transfer_buffer_;
+
+  scoped_refptr<gfx::GLContext> gl_context_;
+
+  scoped_ptr<gpu::gles2::GLES2Interface> client_gl_context_;
+  DISALLOW_COPY_AND_ASSIGN(Context);
+};
+
+}  // namespace egl
+
+#endif  // GPU_GLES2_CONFORM_TEST_CONTEXT_H_
diff --git a/gpu/gles2_conform_support/egl/display.cc b/gpu/gles2_conform_support/egl/display.cc
index 4b010f2..456483f 100644
--- a/gpu/gles2_conform_support/egl/display.cc
+++ b/gpu/gles2_conform_support/egl/display.cc
@@ -4,133 +4,104 @@
 
 #include "gpu/gles2_conform_support/egl/display.h"
 
-#include <stddef.h>
-#include <stdint.h>
-
-#include <vector>
-#include "base/at_exit.h"
-#include "base/bind.h"
-#include "base/bind_helpers.h"
-#include "base/lazy_instance.h"
-#include "gpu/command_buffer/client/gles2_implementation.h"
-#include "gpu/command_buffer/client/gles2_lib.h"
-#include "gpu/command_buffer/client/transfer_buffer.h"
-#include "gpu/command_buffer/common/value_state.h"
-#include "gpu/command_buffer/service/context_group.h"
-#include "gpu/command_buffer/service/mailbox_manager.h"
-#include "gpu/command_buffer/service/memory_tracking.h"
-#include "gpu/command_buffer/service/transfer_buffer_manager.h"
-#include "gpu/command_buffer/service/valuebuffer_manager.h"
 #include "gpu/gles2_conform_support/egl/config.h"
+#include "gpu/gles2_conform_support/egl/context.h"
 #include "gpu/gles2_conform_support/egl/surface.h"
-#include "gpu/gles2_conform_support/egl/test_support.h"
-
-namespace {
-const int32_t kCommandBufferSize = 1024 * 1024;
-const int32_t kTransferBufferSize = 512 * 1024;
-}
+#include "gpu/gles2_conform_support/egl/thread_state.h"
 
 namespace egl {
-#if defined(COMMAND_BUFFER_GLES_LIB_SUPPORT_ONLY)
-// egl::Display is used for comformance tests and command_buffer_gles.  We only
-// need the exit manager for the command_buffer_gles library.
-// TODO(hendrikw): Find a cleaner solution for this.
-namespace {
-base::LazyInstance<base::Lock>::Leaky g_exit_manager_lock;
-int g_exit_manager_use_count;
-base::AtExitManager* g_exit_manager;
-void RefAtExitManager() {
-  base::AutoLock lock(g_exit_manager_lock.Get());
-#if defined(COMPONENT_BUILD)
-  if (g_command_buffer_gles_has_atexit_manager) {
-    return;
-  }
-#endif
-  if (g_exit_manager_use_count == 0) {
-    g_exit_manager = new base::AtExitManager;
-  }
-  ++g_exit_manager_use_count;
-}
-void ReleaseAtExitManager() {
-  base::AutoLock lock(g_exit_manager_lock.Get());
-#if defined(COMPONENT_BUILD)
-  if (g_command_buffer_gles_has_atexit_manager) {
-    return;
-  }
-#endif
-  --g_exit_manager_use_count;
-  if (g_exit_manager_use_count == 0) {
-    delete g_exit_manager;
-    g_exit_manager = nullptr;
-  }
-}
-}
-#endif
 
-Display::Display(EGLNativeDisplayType display_id)
-    : display_id_(display_id),
-      is_initialized_(false),
-      create_offscreen_(false),
-      create_offscreen_width_(0),
-      create_offscreen_height_(0),
-      next_fence_sync_release_(1) {
-#if defined(COMMAND_BUFFER_GLES_LIB_SUPPORT_ONLY)
-  RefAtExitManager();
-#endif
-}
+Display::Display() : is_initialized_(false) {}
 
 Display::~Display() {
-  gles2::Terminate();
-#if defined(COMMAND_BUFFER_GLES_LIB_SUPPORT_ONLY)
-  ReleaseAtExitManager();
-#endif
+  surfaces_.clear();
+  contexts_.clear();
 }
 
-bool Display::Initialize() {
-  gles2::Initialize();
+EGLBoolean Display::Initialize(ThreadState* ts, EGLint* major, EGLint* minor) {
+  base::AutoLock auto_lock(lock_);
   is_initialized_ = true;
-  return true;
+
+  if (major)
+    *major = 1;
+  if (minor)
+    *minor = 4;
+  return ts->ReturnSuccess(EGL_TRUE);
 }
 
-bool Display::IsValidConfig(EGLConfig config) {
-  return (config != NULL) && (config == config_.get());
+EGLBoolean Display::Terminate(ThreadState* ts) {
+  base::AutoLock auto_lock(lock_);
+  is_initialized_ = false;
+  surfaces_.clear();
+  for (const auto& context : contexts_)
+    context->MarkDestroyed();
+  contexts_.clear();
+  return ts->ReturnSuccess(EGL_TRUE);
 }
 
-bool Display::ChooseConfigs(EGLConfig* configs,
-                            EGLint config_size,
-                            EGLint* num_config) {
-  // TODO(alokp): Find out a way to find all configs. CommandBuffer currently
-  // does not support finding or choosing configs.
-  *num_config = 1;
-  if (configs != NULL) {
-    if (config_ == NULL) {
-      config_.reset(new Config);
-    }
-    configs[0] = config_.get();
+const char* Display::QueryString(ThreadState* ts, EGLint name) {
+  base::AutoLock auto_lock(lock_);
+  if (!is_initialized_)
+    return ts->ReturnError<const char*>(EGL_NOT_INITIALIZED, nullptr);
+  switch (name) {
+    case EGL_CLIENT_APIS:
+      return ts->ReturnSuccess("OpenGL_ES");
+    case EGL_EXTENSIONS:
+      return ts->ReturnSuccess("");
+    case EGL_VENDOR:
+      return ts->ReturnSuccess("Google Inc.");
+    case EGL_VERSION:
+      return ts->ReturnSuccess("1.4");
+    default:
+      return ts->ReturnError<const char*>(EGL_BAD_PARAMETER, nullptr);
   }
-  return true;
 }
 
-bool Display::GetConfigs(EGLConfig* configs,
-                         EGLint config_size,
-                         EGLint* num_config) {
-  // TODO(alokp): Find out a way to find all configs. CommandBuffer currently
-  // does not support finding or choosing configs.
-  *num_config = 1;
-  if (configs != NULL) {
-    if (config_ == NULL) {
-      config_.reset(new Config);
+EGLBoolean Display::ChooseConfig(ThreadState* ts,
+                                 const EGLint* attrib_list,
+                                 EGLConfig* configs,
+                                 EGLint config_size,
+                                 EGLint* num_config) {
+  base::AutoLock auto_lock(lock_);
+  if (!is_initialized_)
+    return ts->ReturnError(EGL_NOT_INITIALIZED, EGL_FALSE);
+  if (num_config == nullptr)
+    return ts->ReturnError(EGL_BAD_PARAMETER, EGL_FALSE);
+  if (!Config::ValidateAttributeList(attrib_list))
+    return ts->ReturnError(EGL_BAD_ATTRIBUTE, EGL_FALSE);
+  InitializeConfigsIfNeeded();
+  if (!configs)
+    config_size = 0;
+  *num_config = 0;
+  for (size_t i = 0; i < arraysize(configs_); ++i) {
+    if (configs_[i]->Matches(attrib_list)) {
+      if (*num_config < config_size) {
+        configs[*num_config] = configs_[i].get();
+      }
+      ++*num_config;
     }
-    configs[0] = config_.get();
   }
-  return true;
+  return ts->ReturnSuccess(EGL_TRUE);
 }
 
-bool Display::GetConfigAttrib(EGLConfig config,
-                              EGLint attribute,
-                              EGLint* value) {
-  const egl::Config* cfg = static_cast<egl::Config*>(config);
-  return cfg->GetAttrib(attribute, value);
+EGLBoolean Display::GetConfigs(ThreadState* ts,
+                               EGLConfig* configs,
+                               EGLint config_size,
+                               EGLint* num_config) {
+  base::AutoLock auto_lock(lock_);
+  if (!is_initialized_)
+    return ts->ReturnError(EGL_NOT_INITIALIZED, EGL_FALSE);
+  if (num_config == nullptr)
+    return ts->ReturnError(EGL_BAD_PARAMETER, EGL_FALSE);
+  InitializeConfigsIfNeeded();
+  if (!configs)
+    config_size = 0;
+  *num_config = arraysize(configs_);
+  size_t count =
+      std::min(arraysize(configs_), static_cast<size_t>(config_size));
+  for (size_t i = 0; i < count; ++i)
+    configs[i] = configs_[i].get();
+  return ts->ReturnSuccess(EGL_TRUE);
 }
 
 bool Display::IsValidNativeWindow(EGLNativeWindowType win) {
@@ -142,246 +113,215 @@
 #endif  // OS_WIN
 }
 
-bool Display::IsValidSurface(EGLSurface surface) {
-  return (surface != NULL) && (surface == surface_.get());
+EGLBoolean Display::GetConfigAttrib(ThreadState* ts,
+                                    EGLConfig cfg,
+                                    EGLint attribute,
+                                    EGLint* value) {
+  base::AutoLock auto_lock(lock_);
+  if (!is_initialized_)
+    return ts->ReturnError(EGL_NOT_INITIALIZED, EGL_FALSE);
+  const egl::Config* config = GetConfig(cfg);
+  if (!config)
+    return ts->ReturnError(EGL_BAD_CONFIG, EGL_FALSE);
+  if (!config->GetAttrib(attribute, value))
+    return ts->ReturnError(EGL_BAD_ATTRIBUTE, EGL_FALSE);
+  return ts->ReturnSuccess(EGL_TRUE);
 }
 
-EGLSurface Display::CreateWindowSurface(EGLConfig config,
+EGLSurface Display::CreatePbufferSurface(ThreadState* ts,
+                                         EGLConfig cfg,
+                                         const EGLint* attrib_list) {
+  base::AutoLock auto_lock(lock_);
+  if (!is_initialized_)
+    return ts->ReturnError(EGL_NOT_INITIALIZED, EGL_NO_SURFACE);
+  const egl::Config* config = GetConfig(cfg);
+  if (!config)
+    return ts->ReturnError(EGL_BAD_CONFIG, EGL_NO_SURFACE);
+  EGLint value = EGL_NONE;
+  config->GetAttrib(EGL_SURFACE_TYPE, &value);
+  if ((value & EGL_PBUFFER_BIT) == 0)
+    return ts->ReturnError(EGL_BAD_MATCH, EGL_NO_SURFACE);
+  if (!egl::Surface::ValidatePbufferAttributeList(attrib_list))
+    return ts->ReturnError(EGL_BAD_ATTRIBUTE, EGL_NO_SURFACE);
+
+  int width = 1;
+  int height = 1;
+  if (attrib_list) {
+    for (const int32_t* attr = attrib_list; attr[0] != EGL_NONE; attr += 2) {
+      switch (attr[0]) {
+        case EGL_WIDTH:
+          width = attr[1];
+          break;
+        case EGL_HEIGHT:
+          height = attr[1];
+          break;
+      }
+    }
+  }
+  scoped_refptr<gfx::GLSurface> gl_surface;
+  gl_surface =
+      gfx::GLSurface::CreateOffscreenGLSurface(gfx::Size(width, height));
+  if (!gl_surface)
+    return ts->ReturnError(EGL_BAD_ALLOC, nullptr);
+  surfaces_.emplace_back(new Surface(gl_surface.get()));
+  return ts->ReturnSuccess<EGLSurface>(surfaces_.back().get());
+}
+
+EGLSurface Display::CreateWindowSurface(ThreadState* ts,
+                                        EGLConfig cfg,
                                         EGLNativeWindowType win,
                                         const EGLint* attrib_list) {
-  if (surface_ != NULL) {
-    // We do not support more than one window surface.
-    return EGL_NO_SURFACE;
-  }
-
-  {
-    gpu::TransferBufferManager* manager =
-        new gpu::TransferBufferManager(nullptr);
-    transfer_buffer_manager_ = manager;
-    manager->Initialize();
-  }
-  scoped_ptr<gpu::CommandBufferService> command_buffer(
-      new gpu::CommandBufferService(transfer_buffer_manager_.get()));
-  if (!command_buffer->Initialize())
-    return NULL;
-
-  scoped_refptr<gpu::gles2::ContextGroup> group(new gpu::gles2::ContextGroup(
-      NULL, NULL, new gpu::gles2::ShaderTranslatorCache,
-      new gpu::gles2::FramebufferCompletenessCache, NULL, NULL, NULL, true));
-
-  decoder_.reset(gpu::gles2::GLES2Decoder::Create(group.get()));
-  if (!decoder_.get())
-    return EGL_NO_SURFACE;
-
-  gpu_scheduler_.reset(new gpu::GpuScheduler(command_buffer.get(),
-                                             decoder_.get(),
-                                             NULL));
-
-  decoder_->set_engine(gpu_scheduler_.get());
-  gfx::Size size(create_offscreen_width_, create_offscreen_height_);
-  if (create_offscreen_) {
-    gl_surface_ = gfx::GLSurface::CreateOffscreenGLSurface(size);
-    create_offscreen_ = false;
-    create_offscreen_width_ = 0;
-    create_offscreen_height_ = 0;
-  } else {
-    gl_surface_ = gfx::GLSurface::CreateViewGLSurface(win);
-  }
-  if (!gl_surface_.get())
-    return EGL_NO_SURFACE;
-
-  gl_context_ = gfx::GLContext::CreateGLContext(NULL,
-                                                gl_surface_.get(),
-                                                gfx::PreferDiscreteGpu);
-  if (!gl_context_.get())
-    return EGL_NO_SURFACE;
-
-  gl_context_->MakeCurrent(gl_surface_.get());
-
-  EGLint depth_size = 0;
-  EGLint alpha_size = 0;
-  EGLint stencil_size = 0;
-  GetConfigAttrib(config, EGL_DEPTH_SIZE, &depth_size);
-  GetConfigAttrib(config, EGL_ALPHA_SIZE, &alpha_size);
-  GetConfigAttrib(config, EGL_STENCIL_SIZE, &stencil_size);
-  std::vector<int32_t> attribs;
-  attribs.push_back(EGL_DEPTH_SIZE);
-  attribs.push_back(depth_size);
-  attribs.push_back(EGL_ALPHA_SIZE);
-  attribs.push_back(alpha_size);
-  attribs.push_back(EGL_STENCIL_SIZE);
-  attribs.push_back(stencil_size);
-  // TODO(gman): Insert attrib_list. Although ES 1.1 says it must be null
-  attribs.push_back(EGL_NONE);
-
-  if (!decoder_->Initialize(gl_surface_.get(),
-                            gl_context_.get(),
-                            gl_surface_->IsOffscreen(),
-                            size,
-                            gpu::gles2::DisallowedFeatures(),
-                            attribs)) {
-    return EGL_NO_SURFACE;
-  }
-
-  command_buffer->SetPutOffsetChangeCallback(
-      base::Bind(&gpu::GpuScheduler::PutChanged,
-                 base::Unretained(gpu_scheduler_.get())));
-  command_buffer->SetGetBufferChangeCallback(
-      base::Bind(&gpu::GpuScheduler::SetGetBuffer,
-                 base::Unretained(gpu_scheduler_.get())));
-
-  scoped_ptr<gpu::gles2::GLES2CmdHelper> cmd_helper(
-      new gpu::gles2::GLES2CmdHelper(command_buffer.get()));
-  if (!cmd_helper->Initialize(kCommandBufferSize))
-    return NULL;
-
-  scoped_ptr<gpu::TransferBuffer> transfer_buffer(new gpu::TransferBuffer(
-      cmd_helper.get()));
-
-  command_buffer_.reset(command_buffer.release());
-  transfer_buffer_.reset(transfer_buffer.release());
-  gles2_cmd_helper_.reset(cmd_helper.release());
-  surface_.reset(new Surface(win));
-
-  return surface_.get();
+  base::AutoLock auto_lock(lock_);
+  if (!is_initialized_)
+    return ts->ReturnError(EGL_NOT_INITIALIZED, EGL_NO_SURFACE);
+  const egl::Config* config = GetConfig(cfg);
+  if (!config)
+    return ts->ReturnError(EGL_BAD_CONFIG, EGL_NO_SURFACE);
+  EGLint value = EGL_NONE;
+  config->GetAttrib(EGL_SURFACE_TYPE, &value);
+  if ((value & EGL_WINDOW_BIT) == 0)
+    return ts->ReturnError(EGL_BAD_CONFIG, EGL_NO_SURFACE);
+  if (!IsValidNativeWindow(win))
+    return ts->ReturnError(EGL_BAD_NATIVE_WINDOW, EGL_NO_SURFACE);
+  if (!Surface::ValidateWindowAttributeList(attrib_list))
+    return ts->ReturnError(EGL_BAD_ATTRIBUTE, EGL_NO_SURFACE);
+  scoped_refptr<gfx::GLSurface> gl_surface;
+  gl_surface = gfx::GLSurface::CreateViewGLSurface(win);
+  if (!gl_surface)
+    return ts->ReturnError(EGL_BAD_ALLOC, EGL_NO_SURFACE);
+  surfaces_.emplace_back(new Surface(gl_surface.get()));
+  return ts->ReturnSuccess(surfaces_.back().get());
 }
 
-void Display::DestroySurface(EGLSurface surface) {
-  DCHECK(IsValidSurface(surface));
-  gpu_scheduler_.reset();
-  if (decoder_.get()) {
-    decoder_->Destroy(true);
+EGLBoolean Display::DestroySurface(ThreadState* ts, EGLSurface sfe) {
+  base::AutoLock auto_lock(lock_);
+  if (!is_initialized_)
+    return ts->ReturnError(EGL_NOT_INITIALIZED, EGL_FALSE);
+  auto it = std::find(surfaces_.begin(), surfaces_.end(), sfe);
+  if (it == surfaces_.end())
+    return ts->ReturnError(EGL_BAD_SURFACE, EGL_FALSE);
+  surfaces_.erase(it);
+  return ts->ReturnSuccess(EGL_TRUE);
+}
+
+EGLBoolean Display::ReleaseCurrent(ThreadState* ts) {
+  base::AutoLock auto_lock(lock_);
+  if (!is_initialized_)
+    return ts->ReturnSuccess(EGL_TRUE);
+  ThreadState::AutoCurrentContextRestore accr(ts);
+  if (ts->current_context()) {
+    Context::MakeCurrent(ts->current_context(),
+                         ts->current_surface()->gl_surface(), nullptr, nullptr);
+    accr.SetCurrent(nullptr, nullptr);
   }
-  decoder_.reset();
-  gl_surface_ = NULL;
-  gl_context_ = NULL;
-  surface_.reset();
+  return ts->ReturnSuccess(EGL_TRUE);
 }
 
-void Display::SwapBuffers(EGLSurface surface) {
-  DCHECK(IsValidSurface(surface));
-  context_->SwapBuffers();
+EGLBoolean Display::MakeCurrent(ThreadState* ts,
+                                EGLSurface draw,
+                                EGLSurface read,
+                                EGLSurface ctx) {
+  base::AutoLock auto_lock(lock_);
+  if (!is_initialized_)
+    return ts->ReturnError(EGL_NOT_INITIALIZED, EGL_FALSE);
+  ThreadState::AutoCurrentContextRestore accr(ts);
+  // Client might have called use because it changed some other gl binding
+  // global state. For example, the client might have called eglMakeCurrent on
+  // the same EGL as what command buffer uses. The client probably knows that
+  // this invalidates the internal state of command buffer, too. So reset the
+  // current context with accr in any case, regardless whether context or
+  // surface pointer changes.
+  Surface* new_surface = GetSurface(draw);
+  if (!new_surface)
+    return ts->ReturnError(EGL_BAD_SURFACE, EGL_FALSE);
+  new_surface = GetSurface(read);
+  if (!new_surface)
+    return ts->ReturnError(EGL_BAD_SURFACE, EGL_FALSE);
+  egl::Context* new_context = GetContext(ctx);
+  if (!new_context)
+    return ts->ReturnError(EGL_BAD_CONTEXT, EGL_FALSE);
+  if (draw != read)
+    return ts->ReturnError(EGL_BAD_MATCH, EGL_FALSE);
+
+  Surface* current_surface = ts->current_surface();
+  Context* current_context = ts->current_context();
+
+  if (current_context != new_context &&
+      new_context->is_current_in_some_thread())
+    return ts->ReturnError(EGL_BAD_ACCESS, EGL_FALSE);
+
+  if (current_surface != new_surface &&
+      new_surface->is_current_in_some_thread())
+    return ts->ReturnError(EGL_BAD_ACCESS, EGL_FALSE);
+
+  if (!Context::MakeCurrent(
+          current_context,
+          current_context ? current_surface->gl_surface() : nullptr,
+          new_context, new_context ? new_surface->gl_surface() : nullptr))
+    return ts->ReturnError(EGL_BAD_MATCH, EGL_FALSE);
+
+  accr.SetCurrent(new_surface, new_context);
+  return ts->ReturnSuccess(EGL_TRUE);
 }
 
-bool Display::IsValidContext(EGLContext ctx) {
-  return (ctx != NULL) && (ctx == context_.get());
+EGLBoolean Display::SwapBuffers(ThreadState* ts, EGLSurface sfe) {
+  base::AutoLock auto_lock(lock_);
+  if (!is_initialized_)
+    return ts->ReturnError(EGL_NOT_INITIALIZED, EGL_FALSE);
+  egl::Surface* surface = GetSurface(sfe);
+  if (!surface)
+    return ts->ReturnError(EGL_BAD_SURFACE, EGL_FALSE);
+  if (ts->current_surface() != surface)
+    return ts->ReturnError(EGL_BAD_SURFACE, EGL_FALSE);
+  ts->current_context()->FlushAndSwapBuffers(surface->gl_surface());
+  return ts->ReturnSuccess(EGL_TRUE);
 }
 
-EGLContext Display::CreateContext(EGLConfig config,
+EGLContext Display::CreateContext(ThreadState* ts,
+                                  EGLConfig cfg,
                                   EGLContext share_ctx,
                                   const EGLint* attrib_list) {
-  DCHECK(IsValidConfig(config));
-  // TODO(alokp): Add support for shared contexts.
-  if (share_ctx != NULL)
-    return EGL_NO_CONTEXT;
-
-  DCHECK(command_buffer_ != NULL);
-  DCHECK(transfer_buffer_.get());
-
-  bool bind_generates_resources = true;
-  bool lose_context_when_out_of_memory = false;
-  bool support_client_side_arrays = true;
-
-  context_.reset(
-      new gpu::gles2::GLES2Implementation(gles2_cmd_helper_.get(),
-                                          NULL,
-                                          transfer_buffer_.get(),
-                                          bind_generates_resources,
-                                          lose_context_when_out_of_memory,
-                                          support_client_side_arrays,
-                                          this));
-
-  if (!context_->Initialize(
-      kTransferBufferSize,
-      kTransferBufferSize / 2,
-      kTransferBufferSize * 2,
-      gpu::gles2::GLES2Implementation::kNoLimit)) {
-    return EGL_NO_CONTEXT;
+  base::AutoLock auto_lock(lock_);
+  if (!is_initialized_)
+    return ts->ReturnError(EGL_NOT_INITIALIZED, EGL_NO_CONTEXT);
+  if (share_ctx != EGL_NO_CONTEXT) {
+    egl::Context* share_context = GetContext(share_ctx);
+    if (!share_context)
+      return ts->ReturnError(EGL_BAD_CONTEXT, EGL_NO_CONTEXT);
+    // TODO(alokp): Add support for shared contexts.
+    return ts->ReturnError(EGL_BAD_MATCH, EGL_NO_CONTEXT);
   }
-
-  context_->EnableFeatureCHROMIUM("pepper3d_allow_buffers_on_multiple_targets");
-  context_->EnableFeatureCHROMIUM("pepper3d_support_fixed_attribs");
-
-  return context_.get();
+  if (!egl::Context::ValidateAttributeList(attrib_list))
+    return ts->ReturnError(EGL_BAD_ATTRIBUTE, EGL_NO_CONTEXT);
+  const egl::Config* config = GetConfig(cfg);
+  if (!config)
+    return ts->ReturnError(EGL_BAD_CONFIG, EGL_NO_CONTEXT);
+  scoped_refptr<Context> context(new Context(this, config));
+  if (!context)
+    return ts->ReturnError(EGL_BAD_ALLOC, EGL_NO_CONTEXT);
+  contexts_.emplace_back(context.get());
+  return ts->ReturnSuccess<EGLContext>(context.get());
 }
 
-void Display::DestroyContext(EGLContext ctx) {
-  DCHECK(IsValidContext(ctx));
-  context_.reset();
-  transfer_buffer_.reset();
-}
-
-bool Display::MakeCurrent(EGLSurface draw, EGLSurface read, EGLContext ctx) {
-  if (ctx == EGL_NO_CONTEXT) {
-    gles2::SetGLContext(NULL);
-  } else {
-    DCHECK(IsValidSurface(draw));
-    DCHECK(IsValidSurface(read));
-    DCHECK(IsValidContext(ctx));
-    gles2::SetGLContext(context_.get());
-    gl_context_->MakeCurrent(gl_surface_.get());
-  }
-  return true;
-}
-
-gpu::Capabilities Display::GetCapabilities() {
-  return decoder_->GetCapabilities();
-}
-
-int32_t Display::CreateImage(ClientBuffer buffer,
-                             size_t width,
-                             size_t height,
-                             unsigned internalformat) {
-  NOTIMPLEMENTED();
-  return -1;
-}
-
-void Display::DestroyImage(int32_t id) {
-  NOTIMPLEMENTED();
-}
-
-int32_t Display::CreateGpuMemoryBufferImage(size_t width,
-                                            size_t height,
-                                            unsigned internalformat,
-                                            unsigned usage) {
-  NOTIMPLEMENTED();
-  return -1;
-}
-
-void Display::SignalQuery(uint32_t query, const base::Closure& callback) {
-  NOTIMPLEMENTED();
-}
-
-void Display::SetLock(base::Lock*) {
-  NOTIMPLEMENTED();
-}
-
-bool Display::IsGpuChannelLost() {
-  NOTIMPLEMENTED();
-  return false;
-}
-
-void Display::EnsureWorkVisible() {
-  // This is only relevant for out-of-process command buffers.
-}
-
-gpu::CommandBufferNamespace Display::GetNamespaceID() const {
-  return gpu::CommandBufferNamespace::IN_PROCESS;
-}
-
-gpu::CommandBufferId Display::GetCommandBufferID() const {
-  return gpu::CommandBufferId();
-}
-
-int32_t Display::GetExtraCommandBufferData() const {
-  return 0;
+EGLBoolean Display::DestroyContext(ThreadState* ts, EGLContext ctx) {
+  base::AutoLock auto_lock(lock_);
+  if (!is_initialized_)
+    return ts->ReturnError(EGL_NOT_INITIALIZED, EGL_FALSE);
+  auto it = std::find(contexts_.begin(), contexts_.end(), ctx);
+  if (it == contexts_.end())
+    return ts->ReturnError(EGL_BAD_CONTEXT, EGL_FALSE);
+  (*it)->MarkDestroyed();
+  contexts_.erase(it);
+  return ts->ReturnSuccess(EGL_TRUE);
 }
 
 uint64_t Display::GenerateFenceSyncRelease() {
+  base::AutoLock auto_lock(lock_);
   return next_fence_sync_release_++;
 }
 
 bool Display::IsFenceSyncRelease(uint64_t release) {
+  base::AutoLock auto_lock(lock_);
   return release > 0 && release < next_fence_sync_release_;
 }
 
@@ -393,13 +333,41 @@
   return IsFenceSyncRelease(release);
 }
 
-void Display::SignalSyncToken(const gpu::SyncToken& sync_token,
-                              const base::Closure& callback) {
-  NOTIMPLEMENTED();
+void Display::InitializeConfigsIfNeeded() {
+  lock_.AssertAcquired();
+  if (!configs_[0]) {
+    // The interface offers separate configs for window and pbuffer.
+    // This way we can record the client intention at context creation time.
+    // The GL implementation (gfx::GLContext and gfx::GLSurface) needs this
+    // distinction when creating a context.
+    configs_[0].reset(new Config(EGL_WINDOW_BIT));
+    configs_[1].reset(new Config(EGL_PBUFFER_BIT));
+  }
 }
 
-bool Display::CanWaitUnverifiedSyncToken(const gpu::SyncToken* sync_token) {
-  return false;
+const Config* Display::GetConfig(EGLConfig cfg) {
+  lock_.AssertAcquired();
+  for (const auto& config : configs_) {
+    if (config.get() == cfg)
+      return config.get();
+  }
+  return nullptr;
+}
+
+Surface* Display::GetSurface(EGLSurface surface) {
+  lock_.AssertAcquired();
+  auto it = std::find(surfaces_.begin(), surfaces_.end(), surface);
+  if (it == surfaces_.end())
+    return nullptr;
+  return it->get();
+}
+
+Context* Display::GetContext(EGLContext context) {
+  lock_.AssertAcquired();
+  auto it = std::find(contexts_.begin(), contexts_.end(), context);
+  if (it == contexts_.end())
+    return nullptr;
+  return it->get();
 }
 
 }  // namespace egl
diff --git a/gpu/gles2_conform_support/egl/display.h b/gpu/gles2_conform_support/egl/display.h
index 292d68b..619fed9 100644
--- a/gpu/gles2_conform_support/egl/display.h
+++ b/gpu/gles2_conform_support/egl/display.h
@@ -9,122 +9,87 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#include <vector>
+
 #include "base/macros.h"
+#include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
-#include "gpu/command_buffer/client/gles2_cmd_helper.h"
-#include "gpu/command_buffer/client/gpu_control.h"
-#include "gpu/command_buffer/service/command_buffer_service.h"
-#include "gpu/command_buffer/service/gles2_cmd_decoder.h"
-#include "gpu/command_buffer/service/gpu_scheduler.h"
-#include "ui/gfx/native_widget_types.h"
-#include "ui/gl/gl_context.h"
-#include "ui/gl/gl_surface.h"
-
-namespace gpu {
-class CommandBufferService;
-class GpuControl;
-class GpuScheduler;
-class TransferBuffer;
-class TransferBufferManagerInterface;
-
-namespace gles2 {
-class GLES2CmdHelper;
-class GLES2Implementation;
-}  // namespace gles2
-}  // namespace gpu
+#include "base/synchronization/lock.h"
 
 namespace egl {
 
 class Config;
+class Context;
 class Surface;
+class ThreadState;
 
-class Display : private gpu::GpuControl {
+class Display {
  public:
-  explicit Display(EGLNativeDisplayType display_id);
-  ~Display() override;
-
-  void SetCreateOffscreen(int width, int height) {
-    create_offscreen_ = true;
-    create_offscreen_width_ = width;
-    create_offscreen_height_ = height;
-  }
+  explicit Display();
+  ~Display();
 
   bool is_initialized() const { return is_initialized_; }
-  bool Initialize();
+
+  void ReleaseCurrentForReleaseThread(ThreadState*);
+
+  EGLBoolean Initialize(ThreadState* ts, EGLint* major, EGLint* minor);
+  EGLBoolean Terminate(ThreadState* ts);
+  const char* QueryString(ThreadState* ts, EGLint name);
 
   // Config routines.
-  bool IsValidConfig(EGLConfig config);
-  bool ChooseConfigs(
-      EGLConfig* configs, EGLint config_size, EGLint* num_config);
-  bool GetConfigs(EGLConfig* configs, EGLint config_size, EGLint* num_config);
-  bool GetConfigAttrib(EGLConfig config, EGLint attribute, EGLint* value);
+  EGLBoolean GetConfigAttrib(ThreadState* ts,
+                             EGLConfig cfg,
+                             EGLint attribute,
+                             EGLint* value);
+  EGLBoolean ChooseConfig(ThreadState* ts,
+                          const EGLint* attrib_list,
+                          EGLConfig* configs,
+                          EGLint config_size,
+                          EGLint* num_config);
+  EGLBoolean GetConfigs(ThreadState*,
+                        EGLConfig*,
+                        EGLint config_size,
+                        EGLint* num_config);
 
   // Surface routines.
-  bool IsValidNativeWindow(EGLNativeWindowType win);
-  bool IsValidSurface(EGLSurface surface);
-  EGLSurface CreateWindowSurface(EGLConfig config,
+  static bool IsValidNativeWindow(EGLNativeWindowType);
+  EGLSurface CreatePbufferSurface(ThreadState*,
+                                  EGLConfig,
+                                  const EGLint* attrib_list);
+  EGLSurface CreateWindowSurface(ThreadState*,
+                                 EGLConfig,
                                  EGLNativeWindowType win,
                                  const EGLint* attrib_list);
-  void DestroySurface(EGLSurface surface);
-  void SwapBuffers(EGLSurface surface);
+  EGLBoolean DestroySurface(ThreadState*, EGLSurface);
+  EGLBoolean SwapBuffers(ThreadState*, EGLSurface);
 
   // Context routines.
-  bool IsValidContext(EGLContext ctx);
-  EGLContext CreateContext(EGLConfig config,
-                           EGLContext share_ctx,
+  EGLContext CreateContext(ThreadState*,
+                           EGLConfig,
+                           EGLSurface share_ctx,
                            const EGLint* attrib_list);
-  void DestroyContext(EGLContext ctx);
-  bool MakeCurrent(EGLSurface draw, EGLSurface read, EGLContext ctx);
+  EGLBoolean DestroyContext(ThreadState*, EGLContext);
 
-  // GpuControl implementation.
-  gpu::Capabilities GetCapabilities() override;
-  int32_t CreateImage(ClientBuffer buffer,
-                      size_t width,
-                      size_t height,
-                      unsigned internalformat) override;
-  void DestroyImage(int32_t id) override;
-  int32_t CreateGpuMemoryBufferImage(size_t width,
-                                     size_t height,
-                                     unsigned internalformat,
-                                     unsigned usage) override;
-  void SignalQuery(uint32_t query, const base::Closure& callback) override;
-  void SetLock(base::Lock*) override;
-  bool IsGpuChannelLost() override;
-  void EnsureWorkVisible() override;
-  gpu::CommandBufferNamespace GetNamespaceID() const override;
-  gpu::CommandBufferId GetCommandBufferID() const override;
-  int32_t GetExtraCommandBufferData() const override;
-  uint64_t GenerateFenceSyncRelease() override;
-  bool IsFenceSyncRelease(uint64_t release) override;
-  bool IsFenceSyncFlushed(uint64_t release) override;
-  bool IsFenceSyncFlushReceived(uint64_t release) override;
-  void SignalSyncToken(const gpu::SyncToken& sync_token,
-                       const base::Closure& callback) override;
-  bool CanWaitUnverifiedSyncToken(const gpu::SyncToken* sync_token) override;
+  EGLBoolean ReleaseCurrent(ThreadState*);
+  EGLBoolean MakeCurrent(ThreadState*, EGLSurface, EGLSurface, EGLContext);
+
+  uint64_t GenerateFenceSyncRelease();
+  bool IsFenceSyncRelease(uint64_t release);
+  bool IsFenceSyncFlushed(uint64_t release);
+  bool IsFenceSyncFlushReceived(uint64_t release);
 
  private:
-  EGLNativeDisplayType display_id_;
+  void InitializeConfigsIfNeeded();
+  const Config* GetConfig(EGLConfig);
+  Surface* GetSurface(EGLSurface);
+  Context* GetContext(EGLContext);
 
+  base::Lock lock_;
   bool is_initialized_;
-
-  bool create_offscreen_;
-  int create_offscreen_width_;
-  int create_offscreen_height_;
   uint64_t next_fence_sync_release_;
-
-  scoped_refptr<gpu::TransferBufferManagerInterface> transfer_buffer_manager_;
-  scoped_ptr<gpu::CommandBufferService> command_buffer_;
-  scoped_ptr<gpu::GpuScheduler> gpu_scheduler_;
-  scoped_ptr<gpu::gles2::GLES2Decoder> decoder_;
-  scoped_refptr<gfx::GLContext> gl_context_;
-  scoped_refptr<gfx::GLSurface> gl_surface_;
-  scoped_ptr<gpu::gles2::GLES2CmdHelper> gles2_cmd_helper_;
-  scoped_ptr<gpu::TransferBuffer> transfer_buffer_;
-
-  // TODO(alokp): Support more than one config, surface, and context.
-  scoped_ptr<Config> config_;
-  scoped_ptr<Surface> surface_;
-  scoped_ptr<gpu::gles2::GLES2Implementation> context_;
+  std::vector<scoped_refptr<Surface>> surfaces_;
+  std::vector<scoped_refptr<Context>> contexts_;
+  scoped_ptr<Config> configs_[2];
 
   DISALLOW_COPY_AND_ASSIGN(Display);
 };
diff --git a/gpu/gles2_conform_support/egl/egl.cc b/gpu/gles2_conform_support/egl/egl.cc
index 5a81954b..b14479bc3 100644
--- a/gpu/gles2_conform_support/egl/egl.cc
+++ b/gpu/gles2_conform_support/egl/egl.cc
@@ -5,184 +5,58 @@
 #include <EGL/egl.h>
 #include <stdint.h>
 
-#include "base/command_line.h"
-#include "base/environment.h"
-#include "base/strings/string_split.h"
-#include "base/strings/string_util.h"
-#include "base/strings/utf_string_conversions.h"
 #include "gpu/command_buffer/client/gles2_lib.h"
-#include "gpu/command_buffer/service/gpu_switches.h"
-#include "gpu/config/gpu_info_collector.h"
-#include "gpu/config/gpu_util.h"
+#include "gpu/gles2_conform_support/egl/config.h"
+#include "gpu/gles2_conform_support/egl/context.h"
 #include "gpu/gles2_conform_support/egl/display.h"
-#include "ui/gl/gl_context.h"
-#include "ui/gl/gl_surface.h"
-
-#if REGAL_STATIC_EGL
-extern "C" {
-
-typedef EGLContext RegalSystemContext;
-#define REGAL_DECL
-REGAL_DECL void RegalMakeCurrent( RegalSystemContext ctx );
-
-}  // extern "C"
-#endif
-
-namespace {
-void SetCurrentError(EGLint error_code) {
-}
-
-template<typename T>
-T EglError(EGLint error_code, T return_value) {
-  SetCurrentError(error_code);
-  return return_value;
-}
-
-template<typename T>
-T EglSuccess(T return_value) {
-  SetCurrentError(EGL_SUCCESS);
-  return return_value;
-}
-
-EGLint ValidateDisplay(EGLDisplay dpy) {
-  if (dpy == EGL_NO_DISPLAY)
-    return EGL_BAD_DISPLAY;
-
-  egl::Display* display = static_cast<egl::Display*>(dpy);
-  if (!display->is_initialized())
-    return EGL_NOT_INITIALIZED;
-
-  return EGL_SUCCESS;
-}
-
-EGLint ValidateDisplayConfig(EGLDisplay dpy, EGLConfig config) {
-  EGLint error_code = ValidateDisplay(dpy);
-  if (error_code != EGL_SUCCESS)
-    return error_code;
-
-  egl::Display* display = static_cast<egl::Display*>(dpy);
-  if (!display->IsValidConfig(config))
-    return EGL_BAD_CONFIG;
-
-  return EGL_SUCCESS;
-}
-
-EGLint ValidateDisplaySurface(EGLDisplay dpy, EGLSurface surface) {
-  EGLint error_code = ValidateDisplay(dpy);
-  if (error_code != EGL_SUCCESS)
-    return error_code;
-
-  egl::Display* display = static_cast<egl::Display*>(dpy);
-  if (!display->IsValidSurface(surface))
-    return EGL_BAD_SURFACE;
-
-  return EGL_SUCCESS;
-}
-
-EGLint ValidateDisplayContext(EGLDisplay dpy, EGLContext context) {
-  EGLint error_code = ValidateDisplay(dpy);
-  if (error_code != EGL_SUCCESS)
-    return error_code;
-
-  egl::Display* display = static_cast<egl::Display*>(dpy);
-  if (!display->IsValidContext(context))
-    return EGL_BAD_CONTEXT;
-
-  return EGL_SUCCESS;
-}
-}  // namespace
+#include "gpu/gles2_conform_support/egl/surface.h"
+#include "gpu/gles2_conform_support/egl/thread_state.h"
 
 extern "C" {
 EGLAPI EGLint EGLAPIENTRY eglGetError() {
-  // TODO(alokp): Fix me.
-  return EGL_SUCCESS;
+  return egl::ThreadState::Get()->ConsumeErrorCode();
 }
 
 EGLAPI EGLDisplay EGLAPIENTRY eglGetDisplay(EGLNativeDisplayType display_id) {
-  return new egl::Display(display_id);
+  if (display_id != EGL_DEFAULT_DISPLAY)
+    return EGL_NO_DISPLAY;
+  return egl::ThreadState::Get()->GetDefaultDisplay();
 }
 
 EGLAPI EGLBoolean EGLAPIENTRY eglInitialize(EGLDisplay dpy,
                                             EGLint* major,
                                             EGLint* minor) {
-  if (dpy == EGL_NO_DISPLAY)
-    return EglError(EGL_BAD_DISPLAY, EGL_FALSE);
-
-  egl::Display* display = static_cast<egl::Display*>(dpy);
-  if (!display->Initialize())
-    return EglError(EGL_NOT_INITIALIZED, EGL_FALSE);
-
-  // eglInitialize can be called multiple times, prevent InitializeOneOff from
-  // being called multiple times.
-  if (gfx::GetGLImplementation() == gfx::kGLImplementationNone) {
-    base::CommandLine::StringVector argv;
-    scoped_ptr<base::Environment> env(base::Environment::Create());
-    std::string env_string;
-    env->GetVar("CHROME_COMMAND_BUFFER_GLES2_ARGS", &env_string);
-#if defined(OS_WIN)
-    argv = base::SplitString(base::UTF8ToUTF16(env_string),
-                             base::kWhitespaceUTF16, base::TRIM_WHITESPACE,
-                             base::SPLIT_WANT_NONEMPTY);
-    argv.insert(argv.begin(), base::UTF8ToUTF16("dummy"));
-#else
-    argv = base::SplitString(env_string,
-                             base::kWhitespaceASCII, base::TRIM_WHITESPACE,
-                             base::SPLIT_WANT_NONEMPTY);
-    argv.insert(argv.begin(), "dummy");
-#endif
-    base::CommandLine::Init(0, nullptr);
-    base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
-    // Need to call both Init and InitFromArgv, since Windows does not use
-    // argc, argv in CommandLine::Init(argc, argv).
-    command_line->InitFromArgv(argv);
-    if (!command_line->HasSwitch(switches::kDisableGpuDriverBugWorkarounds)) {
-      gpu::GPUInfo gpu_info;
-      gpu::CollectBasicGraphicsInfo(&gpu_info);
-      gpu::ApplyGpuDriverBugWorkarounds(gpu_info, command_line);
-    }
-
-    gfx::GLSurface::InitializeOneOff();
-  }
-  if (major)
-    *major = 1;
-  if (minor)
-    *minor = 4;
-  return EglSuccess(EGL_TRUE);
+  egl::ThreadState* ts = egl::ThreadState::Get();
+  egl::Display* display = ts->GetDisplay(dpy);
+  if (!display)
+    return ts->ReturnError(EGL_BAD_DISPLAY, EGL_FALSE);
+  return display->Initialize(ts, major, minor);
 }
 
 EGLAPI EGLBoolean EGLAPIENTRY eglTerminate(EGLDisplay dpy) {
-  EGLint error_code = ValidateDisplay(dpy);
-  if (error_code != EGL_SUCCESS)
-    return EglError(error_code, EGL_FALSE);
-
-  egl::Display* display = static_cast<egl::Display*>(dpy);
-  delete display;
-
-  // TODO: EGL specifies that the objects are marked for deletion and they will
-  // remain alive as long as "contexts or surfaces associated with display is
-  // current to any thread".
-  // Currently we delete the display here, and may also call exit handlers.
-
-  return EglSuccess(EGL_TRUE);
+  egl::ThreadState* ts = egl::ThreadState::Get();
+  egl::Display* display = ts->GetDisplay(dpy);
+  if (!display)
+    return ts->ReturnError(EGL_BAD_DISPLAY, EGL_FALSE);
+  return display->Terminate(ts);
 }
 
 EGLAPI const char* EGLAPIENTRY eglQueryString(EGLDisplay dpy, EGLint name) {
-  EGLint error_code = ValidateDisplay(dpy);
-  if (error_code != EGL_SUCCESS)
-    return EglError(error_code, static_cast<const char*>(NULL));
-
-  switch (name) {
-    case EGL_CLIENT_APIS:
-      return EglSuccess("OpenGL_ES");
-    case EGL_EXTENSIONS:
-      return EglSuccess("");
-    case EGL_VENDOR:
-      return EglSuccess("Google Inc.");
-    case EGL_VERSION:
-      return EglSuccess("1.4");
-    default:
-      return EglError(EGL_BAD_PARAMETER, static_cast<const char*>(NULL));
+  egl::ThreadState* ts = egl::ThreadState::Get();
+  if (dpy == EGL_NO_DISPLAY) {
+    switch (name) {
+      case EGL_EXTENSIONS:
+        return ts->ReturnSuccess("");
+      case EGL_VERSION:
+        return ts->ReturnSuccess("1.4");
+      default:
+        break;
+    }
   }
+  egl::Display* display = ts->GetDisplay(dpy);
+  if (!display)
+    return ts->ReturnError<const char*>(EGL_BAD_DISPLAY, nullptr);
+  return display->QueryString(ts, name);
 }
 
 EGLAPI EGLBoolean EGLAPIENTRY eglChooseConfig(EGLDisplay dpy,
@@ -190,103 +64,57 @@
                                               EGLConfig* configs,
                                               EGLint config_size,
                                               EGLint* num_config) {
-  EGLint error_code = ValidateDisplay(dpy);
-  if (error_code != EGL_SUCCESS)
-    return EglError(error_code, EGL_FALSE);
-
-  if (num_config == NULL)
-    return EglError(EGL_BAD_PARAMETER, EGL_FALSE);
-
-  egl::Display* display = static_cast<egl::Display*>(dpy);
-  if (!display->ChooseConfigs(configs, config_size, num_config))
-    return EglError(EGL_BAD_ATTRIBUTE, EGL_FALSE);
-
-  return EglSuccess(EGL_TRUE);
+  egl::ThreadState* ts = egl::ThreadState::Get();
+  egl::Display* display = ts->GetDisplay(dpy);
+  if (!display)
+    return ts->ReturnError(EGL_BAD_DISPLAY, EGL_FALSE);
+  return display->ChooseConfig(ts, attrib_list, configs, config_size,
+                               num_config);
 }
 
 EGLAPI EGLBoolean EGLAPIENTRY eglGetConfigs(EGLDisplay dpy,
                                             EGLConfig* configs,
                                             EGLint config_size,
                                             EGLint* num_config) {
-  EGLint error_code = ValidateDisplay(dpy);
-  if (error_code != EGL_SUCCESS)
-    return EglError(error_code, EGL_FALSE);
-
-  if (num_config == NULL)
-    return EglError(EGL_BAD_PARAMETER, EGL_FALSE);
-
-  egl::Display* display = static_cast<egl::Display*>(dpy);
-  if (!display->GetConfigs(configs, config_size, num_config))
-    return EglError(EGL_BAD_ATTRIBUTE, EGL_FALSE);
-
-  return EglSuccess(EGL_TRUE);
+  egl::ThreadState* ts = egl::ThreadState::Get();
+  egl::Display* display = ts->GetDisplay(dpy);
+  if (!display)
+    return ts->ReturnError(EGL_BAD_DISPLAY, EGL_FALSE);
+  return display->GetConfigs(ts, configs, config_size, num_config);
 }
 
 EGLAPI EGLBoolean EGLAPIENTRY eglGetConfigAttrib(EGLDisplay dpy,
-                                                 EGLConfig config,
+                                                 EGLConfig cfg,
                                                  EGLint attribute,
                                                  EGLint* value) {
-  EGLint error_code = ValidateDisplayConfig(dpy, config);
-  if (error_code != EGL_SUCCESS)
-    return EglError(error_code, EGL_FALSE);
-
-  egl::Display* display = static_cast<egl::Display*>(dpy);
-  if (!display->GetConfigAttrib(config, attribute, value))
-    return EglError(EGL_BAD_ATTRIBUTE, EGL_FALSE);
-
-  return EglSuccess(EGL_TRUE);
+  egl::ThreadState* ts = egl::ThreadState::Get();
+  egl::Display* display = ts->GetDisplay(dpy);
+  if (!display)
+    return ts->ReturnError(EGL_BAD_DISPLAY, EGL_FALSE);
+  return display->GetConfigAttrib(ts, cfg, attribute, value);
 }
 
 EGLAPI EGLSurface EGLAPIENTRY
 eglCreateWindowSurface(EGLDisplay dpy,
-                       EGLConfig config,
+                       EGLConfig cfg,
                        EGLNativeWindowType win,
                        const EGLint* attrib_list) {
-  EGLint error_code = ValidateDisplayConfig(dpy, config);
-  if (error_code != EGL_SUCCESS)
-    return EglError(error_code, EGL_NO_SURFACE);
-
-  egl::Display* display = static_cast<egl::Display*>(dpy);
-  if (!display->IsValidNativeWindow(win))
-    return EglError(EGL_BAD_NATIVE_WINDOW, EGL_NO_SURFACE);
-
-  EGLSurface surface = display->CreateWindowSurface(config, win, attrib_list);
-  if (surface == EGL_NO_SURFACE)
-    return EglError(EGL_BAD_ALLOC, EGL_NO_SURFACE);
-
-  return EglSuccess(surface);
+  egl::ThreadState* ts = egl::ThreadState::Get();
+  egl::Display* display = ts->GetDisplay(dpy);
+  if (!display)
+    return ts->ReturnError(EGL_BAD_DISPLAY, EGL_NO_SURFACE);
+  return display->CreateWindowSurface(ts, cfg, win, attrib_list);
 }
 
 EGLAPI EGLSurface EGLAPIENTRY
 eglCreatePbufferSurface(EGLDisplay dpy,
-                        EGLConfig config,
+                        EGLConfig cfg,
                         const EGLint* attrib_list) {
-  EGLint error_code = ValidateDisplayConfig(dpy, config);
-  if (error_code != EGL_SUCCESS)
-    return EglError(error_code, EGL_NO_SURFACE);
-
-  egl::Display* display = static_cast<egl::Display*>(dpy);
-  int width = 1;
-  int height = 1;
-  if (attrib_list) {
-    for (const int32_t* attr = attrib_list; attr[0] != EGL_NONE; attr += 2) {
-      switch (attr[0]) {
-        case EGL_WIDTH:
-          width = attr[1];
-          break;
-        case EGL_HEIGHT:
-          height = attr[1];
-          break;
-      }
-    }
-  }
-  display->SetCreateOffscreen(width, height);
-
-  EGLSurface surface = display->CreateWindowSurface(config, 0, attrib_list);
-  if (surface == EGL_NO_SURFACE)
-    return EglError(EGL_BAD_ALLOC, EGL_NO_SURFACE);
-
-  return EglSuccess(surface);
+  egl::ThreadState* ts = egl::ThreadState::Get();
+  egl::Display* display = ts->GetDisplay(dpy);
+  if (!display)
+    return ts->ReturnError(EGL_BAD_DISPLAY, EGL_NO_SURFACE);
+  return display->CreatePbufferSurface(ts, cfg, attrib_list);
 }
 
 EGLAPI EGLSurface EGLAPIENTRY
@@ -298,14 +126,12 @@
 }
 
 EGLAPI EGLBoolean EGLAPIENTRY eglDestroySurface(EGLDisplay dpy,
-                                                EGLSurface surface) {
-  EGLint error_code = ValidateDisplaySurface(dpy, surface);
-  if (error_code != EGL_SUCCESS)
-    return EglError(error_code, EGL_FALSE);
-
-  egl::Display* display = static_cast<egl::Display*>(dpy);
-  display->DestroySurface(surface);
-  return EglSuccess(EGL_TRUE);
+                                                EGLSurface sfe) {
+  egl::ThreadState* ts = egl::ThreadState::Get();
+  egl::Display* display = ts->GetDisplay(dpy);
+  if (!display)
+    return ts->ReturnError(EGL_BAD_DISPLAY, EGL_FALSE);
+  return display->DestroySurface(ts, sfe);
 }
 
 EGLAPI EGLBoolean EGLAPIENTRY eglQuerySurface(EGLDisplay dpy,
@@ -328,7 +154,8 @@
 }
 
 EGLAPI EGLBoolean EGLAPIENTRY eglReleaseThread(void) {
-  return EGL_FALSE;
+  egl::ThreadState::ReleaseThread();
+  return EGL_TRUE;
 }
 
 EGLAPI EGLSurface EGLAPIENTRY
@@ -364,64 +191,42 @@
 }
 
 EGLAPI EGLContext EGLAPIENTRY eglCreateContext(EGLDisplay dpy,
-                                               EGLConfig config,
-                                               EGLContext share_context,
+                                               EGLConfig cfg,
+                                               EGLContext share_ctx,
                                                const EGLint* attrib_list) {
-  EGLint error_code = ValidateDisplayConfig(dpy, config);
-  if (error_code != EGL_SUCCESS)
-    return EglError(error_code, EGL_NO_CONTEXT);
-
-  if (share_context != EGL_NO_CONTEXT) {
-    error_code = ValidateDisplayContext(dpy, share_context);
-    if (error_code != EGL_SUCCESS)
-      return EglError(error_code, EGL_NO_CONTEXT);
-  }
-
-  egl::Display* display = static_cast<egl::Display*>(dpy);
-  EGLContext context = display->CreateContext(
-      config, share_context, attrib_list);
-  if (context == EGL_NO_CONTEXT)
-    return EglError(EGL_BAD_ALLOC, EGL_NO_CONTEXT);
-
-  return EglSuccess(context);
+  egl::ThreadState* ts = egl::ThreadState::Get();
+  egl::Display* display = ts->GetDisplay(dpy);
+  if (!display)
+    return ts->ReturnError(EGL_BAD_DISPLAY, EGL_NO_CONTEXT);
+  return display->CreateContext(ts, cfg, share_ctx, attrib_list);
 }
 
 EGLAPI EGLBoolean EGLAPIENTRY eglDestroyContext(EGLDisplay dpy,
                                                 EGLContext ctx) {
-  EGLint error_code = ValidateDisplayContext(dpy, ctx);
-  if (error_code != EGL_SUCCESS)
-    return EglError(error_code, EGL_FALSE);
-
-  egl::Display* display = static_cast<egl::Display*>(dpy);
-  display->DestroyContext(ctx);
-  return EGL_TRUE;
+  egl::ThreadState* ts = egl::ThreadState::Get();
+  egl::Display* display = ts->GetDisplay(dpy);
+  if (!display)
+    return ts->ReturnError(EGL_BAD_DISPLAY, EGL_FALSE);
+  return display->DestroyContext(ts, ctx);
 }
 
 EGLAPI EGLBoolean EGLAPIENTRY eglMakeCurrent(EGLDisplay dpy,
                                              EGLSurface draw,
                                              EGLSurface read,
                                              EGLContext ctx) {
-  if (ctx != EGL_NO_CONTEXT) {
-    EGLint error_code = ValidateDisplaySurface(dpy, draw);
-    if (error_code != EGL_SUCCESS)
-      return EglError(error_code, EGL_FALSE);
-    error_code = ValidateDisplaySurface(dpy, read);
-    if (error_code != EGL_SUCCESS)
-      return EglError(error_code, EGL_FALSE);
-    error_code = ValidateDisplayContext(dpy, ctx);
-    if (error_code != EGL_SUCCESS)
-      return EglError(error_code, EGL_FALSE);
+  egl::ThreadState* ts = egl::ThreadState::Get();
+  if (draw == EGL_NO_SURFACE && read == EGL_NO_SURFACE &&
+      ctx == EGL_NO_CONTEXT) {
+    egl::Display* display =
+        dpy == EGL_NO_DISPLAY ? ts->GetDefaultDisplay() : ts->GetDisplay(dpy);
+    if (!display)
+      return ts->ReturnError(EGL_BAD_DISPLAY, EGL_FALSE);
+    return display->ReleaseCurrent(ts);
   }
-
-  egl::Display* display = static_cast<egl::Display*>(dpy);
-  if (!display->MakeCurrent(draw, read, ctx))
-    return EglError(EGL_CONTEXT_LOST, EGL_FALSE);
-
-#if REGAL_STATIC_EGL
-  RegalMakeCurrent(ctx);
-#endif
-
-  return EGL_TRUE;
+  egl::Display* display = ts->GetDisplay(dpy);
+  if (!display)
+    return ts->ReturnError(EGL_BAD_DISPLAY, EGL_FALSE);
+  return display->MakeCurrent(ts, draw, read, ctx);
 }
 
 EGLAPI EGLContext EGLAPIENTRY eglGetCurrentContext() {
@@ -451,15 +256,12 @@
   return EGL_FALSE;
 }
 
-EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers(EGLDisplay dpy,
-                                             EGLSurface surface) {
-  EGLint error_code = ValidateDisplaySurface(dpy, surface);
-  if (error_code != EGL_SUCCESS)
-    return EglError(error_code, EGL_FALSE);
-
-  egl::Display* display = static_cast<egl::Display*>(dpy);
-  display->SwapBuffers(surface);
-  return EglSuccess(EGL_TRUE);
+EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers(EGLDisplay dpy, EGLSurface sfe) {
+  egl::ThreadState* ts = egl::ThreadState::Get();
+  egl::Display* display = ts->GetDisplay(dpy);
+  if (!display)
+    return ts->ReturnError(EGL_BAD_DISPLAY, EGL_FALSE);
+  return display->SwapBuffers(ts, sfe);
 }
 
 EGLAPI EGLBoolean EGLAPIENTRY eglCopyBuffers(EGLDisplay dpy,
diff --git a/gpu/gles2_conform_support/egl/surface.cc b/gpu/gles2_conform_support/egl/surface.cc
index 423fe275..9899cb3 100644
--- a/gpu/gles2_conform_support/egl/surface.cc
+++ b/gpu/gles2_conform_support/egl/surface.cc
@@ -3,13 +3,40 @@
 // found in the LICENSE file.
 
 #include "gpu/gles2_conform_support/egl/surface.h"
+#include "ui/gl/gl_surface.h"
 
 namespace egl {
 
-Surface::Surface(EGLNativeWindowType win) : window_(win) {
-}
+Surface::Surface(gfx::GLSurface* gl_surface)
+    : is_current_in_some_thread_(false), gl_surface_(gl_surface) {}
 
 Surface::~Surface() {
 }
 
+gfx::GLSurface* Surface::gl_surface() const {
+  return gl_surface_.get();
+}
+
+bool Surface::ValidatePbufferAttributeList(const EGLint* attrib_list) {
+  if (attrib_list) {
+    for (int i = 0; attrib_list[i] != EGL_NONE; i += 2) {
+      switch (attrib_list[i]) {
+        case EGL_WIDTH:
+        case EGL_HEIGHT:
+          break;
+        default:
+          return false;
+      }
+    }
+  }
+  return true;
+}
+
+bool Surface::ValidateWindowAttributeList(const EGLint* attrib_list) {
+  if (attrib_list) {
+    if (attrib_list[0] != EGL_NONE)
+      return false;
+  }
+  return true;
+}
 }  // namespace egl
diff --git a/gpu/gles2_conform_support/egl/surface.h b/gpu/gles2_conform_support/egl/surface.h
index 3db553e..84ba0aa 100644
--- a/gpu/gles2_conform_support/egl/surface.h
+++ b/gpu/gles2_conform_support/egl/surface.h
@@ -8,19 +8,28 @@
 #include <EGL/egl.h>
 
 #include "base/macros.h"
-
+#include "base/memory/ref_counted.h"
+namespace gfx {
+class GLSurface;
+}
 namespace egl {
 
-class Surface {
+class Surface : public base::RefCountedThreadSafe<Surface> {
  public:
-  explicit Surface(EGLNativeWindowType win);
-  ~Surface();
-
-  EGLNativeWindowType window() { return window_; }
+  explicit Surface(gfx::GLSurface* gl_surface);
+  void set_is_current_in_some_thread(bool flag) {
+    is_current_in_some_thread_ = flag;
+  }
+  bool is_current_in_some_thread() const { return is_current_in_some_thread_; }
+  gfx::GLSurface* gl_surface() const;
+  static bool ValidatePbufferAttributeList(const EGLint* attrib_list);
+  static bool ValidateWindowAttributeList(const EGLint* attrib_list);
 
  private:
-  EGLNativeWindowType window_;
-
+  friend class base::RefCountedThreadSafe<Surface>;
+  ~Surface();
+  bool is_current_in_some_thread_;
+  scoped_refptr<gfx::GLSurface> gl_surface_;
   DISALLOW_COPY_AND_ASSIGN(Surface);
 };
 
diff --git a/gpu/gles2_conform_support/egl/thread_state.cc b/gpu/gles2_conform_support/egl/thread_state.cc
new file mode 100644
index 0000000..5f2e691
--- /dev/null
+++ b/gpu/gles2_conform_support/egl/thread_state.cc
@@ -0,0 +1,199 @@
+// 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 "gpu/gles2_conform_support/egl/thread_state.h"
+
+#include "base/at_exit.h"
+#include "base/command_line.h"
+#include "base/environment.h"
+#include "base/lazy_instance.h"
+#include "base/strings/string_split.h"
+#include "base/strings/string_util.h"
+#include "base/strings/utf_string_conversions.h"
+#include "gpu/command_buffer/client/gles2_lib.h"
+#include "gpu/command_buffer/common/thread_local.h"
+#include "gpu/command_buffer/service/gpu_switches.h"
+#include "gpu/config/gpu_info_collector.h"
+#include "gpu/config/gpu_util.h"
+#include "gpu/gles2_conform_support/egl/context.h"
+#include "gpu/gles2_conform_support/egl/display.h"
+#include "gpu/gles2_conform_support/egl/surface.h"
+#include "gpu/gles2_conform_support/egl/test_support.h"
+#include "ui/gl/gl_context.h"
+#include "ui/gl/gl_surface.h"
+
+// Thread local key for ThreadState instance. Accessed when holding g_egl_lock
+// only, since the initialization can not be Guaranteed otherwise.  Not in
+// anonymous namespace due to Mac OS X 10.6 linker. See gles2_lib.cc.
+static gpu::ThreadLocalKey g_egl_thread_state_key;
+
+namespace {
+base::LazyInstance<base::Lock>::Leaky g_egl_lock;
+int g_egl_active_thread_count;
+
+egl::Display* g_egl_default_display;
+
+#if defined(COMMAND_BUFFER_GLES_LIB_SUPPORT_ONLY)
+// egl::Display is used for comformance tests and command_buffer_gles.  We only
+// need the exit manager for the command_buffer_gles library.
+base::AtExitManager* g_exit_manager;
+#endif
+}  // namespace
+
+namespace egl {
+
+egl::ThreadState* ThreadState::Get() {
+  base::AutoLock lock(g_egl_lock.Get());
+  if (g_egl_active_thread_count == 0) {
+#if defined(COMMAND_BUFFER_GLES_LIB_SUPPORT_ONLY)
+#if defined(COMPONENT_BUILD)
+    if (!g_command_buffer_gles_has_atexit_manager)
+      g_exit_manager = new base::AtExitManager;
+#else
+    g_exit_manager = new base::AtExitManager;
+#endif
+#endif
+    gles2::Initialize();
+
+    if (gfx::GetGLImplementation() == gfx::kGLImplementationNone) {
+      base::CommandLine::StringVector argv;
+      scoped_ptr<base::Environment> env(base::Environment::Create());
+      std::string env_string;
+      env->GetVar("CHROME_COMMAND_BUFFER_GLES2_ARGS", &env_string);
+#if defined(OS_WIN)
+      argv = base::SplitString(base::UTF8ToUTF16(env_string),
+                               base::kWhitespaceUTF16, base::TRIM_WHITESPACE,
+                               base::SPLIT_WANT_NONEMPTY);
+      argv.insert(argv.begin(), base::UTF8ToUTF16("dummy"));
+#else
+      argv =
+          base::SplitString(env_string, base::kWhitespaceASCII,
+                            base::TRIM_WHITESPACE, base::SPLIT_WANT_NONEMPTY);
+      argv.insert(argv.begin(), "dummy");
+#endif
+      base::CommandLine::Init(0, nullptr);
+      base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
+      // Need to call both Init and InitFromArgv, since Windows does not use
+      // argc, argv in CommandLine::Init(argc, argv).
+      command_line->InitFromArgv(argv);
+      if (!command_line->HasSwitch(switches::kDisableGpuDriverBugWorkarounds)) {
+        gpu::GPUInfo gpu_info;
+        gpu::CollectBasicGraphicsInfo(&gpu_info);
+        gpu::ApplyGpuDriverBugWorkarounds(gpu_info, command_line);
+      }
+
+      gfx::GLSurface::InitializeOneOff();
+    }
+
+    g_egl_default_display = new egl::Display();
+    g_egl_thread_state_key = gpu::ThreadLocalAlloc();
+  }
+  egl::ThreadState* thread_state = static_cast<egl::ThreadState*>(
+      gpu::ThreadLocalGetValue(g_egl_thread_state_key));
+  if (!thread_state) {
+    thread_state = new egl::ThreadState;
+    gpu::ThreadLocalSetValue(g_egl_thread_state_key, thread_state);
+    ++g_egl_active_thread_count;
+  }
+  return thread_state;
+}
+
+void ThreadState::ReleaseThread() {
+  base::AutoLock lock(g_egl_lock.Get());
+  if (g_egl_active_thread_count == 0)
+    return;
+
+  egl::ThreadState* thread_state = static_cast<egl::ThreadState*>(
+      gpu::ThreadLocalGetValue(g_egl_thread_state_key));
+  if (!thread_state)
+    return;
+
+  --g_egl_active_thread_count;
+  if (g_egl_active_thread_count > 0) {
+    g_egl_default_display->ReleaseCurrent(thread_state);
+    delete thread_state;
+  } else {
+    gpu::ThreadLocalFree(g_egl_thread_state_key);
+
+    // First delete the display object, so that it drops the possible refs to
+    // current context.
+    delete g_egl_default_display;
+    g_egl_default_display = nullptr;
+
+    // We can use Surface and Context without lock, since there's no threads
+    // left anymore. Destroy the current context explicitly, in an attempt to
+    // reduce the number of error messages abandoned context would produce.
+    if (thread_state->current_context()) {
+      Context::MakeCurrent(thread_state->current_context(),
+                           thread_state->current_surface()->gl_surface(),
+                           nullptr, nullptr);
+    }
+    delete thread_state;
+
+    gles2::Terminate();
+#if defined(COMMAND_BUFFER_GLES_LIB_SUPPORT_ONLY)
+#if defined(COMPONENT_BUILD)
+    if (g_command_buffer_gles_has_atexit_manager)
+      delete g_exit_manager;
+#else
+    delete g_exit_manager;
+#endif
+    g_exit_manager = nullptr;
+#endif
+  }
+}
+
+ThreadState::ThreadState() : error_code_(EGL_SUCCESS) {}
+
+ThreadState::~ThreadState() {}
+
+EGLint ThreadState::ConsumeErrorCode() {
+  EGLint current_error_code = error_code_;
+  error_code_ = EGL_SUCCESS;
+  return current_error_code;
+}
+
+Display* ThreadState::GetDisplay(EGLDisplay dpy) {
+  if (dpy == g_egl_default_display)
+    return g_egl_default_display;
+  return nullptr;
+}
+
+Display* ThreadState::GetDefaultDisplay() {
+  return g_egl_default_display;
+}
+
+void ThreadState::SetCurrent(Surface* surface, Context* context) {
+  DCHECK((surface == nullptr) == (context == nullptr));
+  if (current_context_) {
+    current_context_->set_is_current_in_some_thread(false);
+    current_surface_->set_is_current_in_some_thread(false);
+  }
+  current_surface_ = surface;
+  current_context_ = context;
+  if (current_context_) {
+    current_context_->set_is_current_in_some_thread(true);
+    current_surface_->set_is_current_in_some_thread(true);
+  }
+}
+
+ThreadState::AutoCurrentContextRestore::AutoCurrentContextRestore(
+    ThreadState* thread_state)
+    : thread_state_(thread_state) {}
+
+ThreadState::AutoCurrentContextRestore::~AutoCurrentContextRestore() {
+  if (Context* current_context = thread_state_->current_context()) {
+    current_context->ApplyCurrentContext(
+        thread_state_->current_surface()->gl_surface());
+  } else {
+    Context::ApplyContextReleased();
+  }
+}
+
+void ThreadState::AutoCurrentContextRestore::SetCurrent(Surface* surface,
+                                                        Context* context) {
+  thread_state_->SetCurrent(surface, context);
+}
+
+}  // namespace egl
diff --git a/gpu/gles2_conform_support/egl/thread_state.h b/gpu/gles2_conform_support/egl/thread_state.h
new file mode 100644
index 0000000..963ac5c6
--- /dev/null
+++ b/gpu/gles2_conform_support/egl/thread_state.h
@@ -0,0 +1,70 @@
+// 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 GPU_GLES2_CONFORM_SUPPORT_EGL_STATE_H_
+#define GPU_GLES2_CONFORM_SUPPORT_EGL_STATE_H_
+
+#include "base/macros.h"
+#include "base/memory/ref_counted.h"
+#include <EGL/egl.h>
+
+namespace egl {
+
+class Context;
+class Display;
+class Surface;
+
+// Thread-local API state of EGL.
+class ThreadState {
+ public:
+  // Factory getter for the class. Should only be called by the API layer, and
+  // then passed through Display in order to avoid lock issues.
+  static ThreadState* Get();
+  static void ReleaseThread();
+
+  Surface* current_surface() const { return current_surface_.get(); }
+  Context* current_context() const { return current_context_.get(); }
+
+  template <typename T>
+  T ReturnError(EGLint error, T return_value) {
+    error_code_ = error;
+    return return_value;
+  }
+  template <typename T>
+  T ReturnSuccess(T return_value) {
+    error_code_ = EGL_SUCCESS;
+    return return_value;
+  }
+  EGLint ConsumeErrorCode();
+
+  Display* GetDefaultDisplay();
+  Display* GetDisplay(EGLDisplay);
+
+  // RAII class for ensuring that ThreadState current context
+  // is reflected in the gfx:: and gles:: global variables.
+  class AutoCurrentContextRestore {
+   public:
+    AutoCurrentContextRestore(ThreadState*);
+    ~AutoCurrentContextRestore();
+    void SetCurrent(Surface*, Context*);
+
+   private:
+    ThreadState* thread_state_;
+    DISALLOW_COPY_AND_ASSIGN(AutoCurrentContextRestore);
+  };
+
+ private:
+  ThreadState();
+  ~ThreadState();
+  void SetCurrent(Surface*, Context*);
+
+  EGLint error_code_;
+  scoped_refptr<Surface> current_surface_;
+  scoped_refptr<Context> current_context_;
+  DISALLOW_COPY_AND_ASSIGN(ThreadState);
+};
+
+}  // namespace egl
+
+#endif
diff --git a/gpu/gles2_conform_support/gles2_conform_support.gyp b/gpu/gles2_conform_support/gles2_conform_support.gyp
index f585d92e..681aa1f5 100644
--- a/gpu/gles2_conform_support/gles2_conform_support.gyp
+++ b/gpu/gles2_conform_support/gles2_conform_support.gyp
@@ -27,6 +27,7 @@
       'type': 'static_library',
       'dependencies': [
         '../../base/base.gyp:base',
+	'../../gpu/command_buffer/command_buffer.gyp:gles2_utils',
         '../../gpu/gpu.gyp:command_buffer_service',
         '../../gpu/gpu.gyp:gles2_implementation_no_check',
         '../../gpu/gpu.gyp:gpu',
@@ -38,11 +39,15 @@
       'sources': [
         'egl/config.cc',
         'egl/config.h',
+        'egl/context.cc',
+        'egl/context.h',
         'egl/display.cc',
         'egl/display.h',
         'egl/egl.cc',
         'egl/surface.cc',
         'egl/surface.h',
+        'egl/thread_state.cc',
+        'egl/thread_state.h',
       ],
       'defines': [
         'EGLAPI=',
diff --git a/gpu/gles2_conform_support/native/egl_native_windowless.cc b/gpu/gles2_conform_support/native/egl_native_windowless.cc
index 14172cfe..a864d95 100644
--- a/gpu/gles2_conform_support/native/egl_native_windowless.cc
+++ b/gpu/gles2_conform_support/native/egl_native_windowless.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 "gpu/gles2_conform_support/egl/display.h"
-
 extern "C" {
 #if defined(GLES2_CONFORM_SUPPORT_ONLY)
 #include "gpu/gles2_conform_support/gtf/gtf_stubs.h"
@@ -24,9 +22,8 @@
                               EGLDisplay eglDisplay, EGLConfig eglConfig,
                               const char* title, int width, int height,
                               EGLNativeWindowType *pNativeWindow) {
-  egl::Display* display = static_cast<egl::Display*>(eglDisplay);
-  display->SetCreateOffscreen(width, height);
-  return GTFtrue;
+  // GTF should use EGL pbuffer interface directly.
+  return GTFfalse;
 }
 
 void GTFNativeDestroyWindow(EGLNativeDisplayType nativeDisplay,
diff --git a/gpu/gpu.gyp b/gpu/gpu.gyp
index 2ad775d..5f95bc5 100644
--- a/gpu/gpu.gyp
+++ b/gpu/gpu.gyp
@@ -427,6 +427,7 @@
         '../gpu/gpu.gyp:command_buffer_service',
         '../ui/gfx/gfx.gyp:gfx_geometry',
         '../ui/gl/gl.gyp:gl',
+        'command_buffer/command_buffer.gyp:gles2_utils',
         'gles2_c_lib',
         'gles2_implementation',
       ],
@@ -435,6 +436,8 @@
         # TODO(hendrikw): Move egl out of gles2_conform_support.
         'gles2_conform_support/egl/config.cc',
         'gles2_conform_support/egl/config.h',
+        'gles2_conform_support/egl/context.cc',
+        'gles2_conform_support/egl/context.h',
         'gles2_conform_support/egl/display.cc',
         'gles2_conform_support/egl/display.h',
         'gles2_conform_support/egl/egl.cc',
@@ -442,6 +445,8 @@
         'gles2_conform_support/egl/surface.h',
         'gles2_conform_support/egl/test_support.cc',
         'gles2_conform_support/egl/test_support.h',
+        'gles2_conform_support/egl/thread_state.cc',
+        'gles2_conform_support/egl/thread_state.h',
       ],
 	  'defines': [
         'COMMAND_BUFFER_GLES_LIB_SUPPORT_ONLY',
diff --git a/ipc/ipc_message_start.h b/ipc/ipc_message_start.h
index e63e1f06c..88b0204 100644
--- a/ipc/ipc_message_start.h
+++ b/ipc/ipc_message_start.h
@@ -21,6 +21,7 @@
   WorkerMsgStart,
   NaClMsgStart,
   UtilityMsgStart,
+  GpuChannelMsgStart,
   GpuMsgStart,
   ServiceMsgStart,
   PpapiMsgStart,
diff --git a/mash/screenlock/screenlock.h b/mash/screenlock/screenlock.h
index 07f9de5..e05a46c 100644
--- a/mash/screenlock/screenlock.h
+++ b/mash/screenlock/screenlock.h
@@ -10,7 +10,7 @@
 #include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "mash/shell/public/interfaces/shell.mojom.h"
-#include "mojo/public/cpp/bindings/weak_binding_set.h"
+#include "mojo/public/cpp/bindings/binding_set.h"
 #include "mojo/services/tracing/public/cpp/tracing_impl.h"
 #include "mojo/shell/public/cpp/shell_client.h"
 
@@ -38,7 +38,7 @@
   mojo::Shell* shell_;
   mojo::TracingImpl tracing_;
   scoped_ptr<views::AuraInit> aura_init_;
-  mojo::WeakBindingSet<mash::shell::mojom::ScreenlockStateListener> bindings_;
+  mojo::BindingSet<mash::shell::mojom::ScreenlockStateListener> bindings_;
 
   DISALLOW_COPY_AND_ASSIGN(Screenlock);
 };
diff --git a/mash/shell/shell_application_delegate.h b/mash/shell/shell_application_delegate.h
index 60a1d69b..524a554a 100644
--- a/mash/shell/shell_application_delegate.h
+++ b/mash/shell/shell_application_delegate.h
@@ -11,8 +11,8 @@
 #include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "mash/shell/public/interfaces/shell.mojom.h"
-#include "mojo/public/cpp/bindings/weak_binding_set.h"
-#include "mojo/public/cpp/bindings/weak_interface_ptr_set.h"
+#include "mojo/public/cpp/bindings/binding_set.h"
+#include "mojo/public/cpp/bindings/interface_ptr_set.h"
 #include "mojo/shell/public/cpp/interface_factory.h"
 #include "mojo/shell/public/cpp/shell_client.h"
 
@@ -63,9 +63,8 @@
   mojo::Shell* shell_;
   std::map<std::string, scoped_ptr<mojo::Connection>> connections_;
   bool screen_locked_;
-  mojo::WeakBindingSet<mash::shell::mojom::Shell> bindings_;
-  mojo::WeakInterfacePtrSet<mojom::ScreenlockStateListener>
-      screenlock_listeners_;
+  mojo::BindingSet<mash::shell::mojom::Shell> bindings_;
+  mojo::InterfacePtrSet<mojom::ScreenlockStateListener> screenlock_listeners_;
 
   DISALLOW_COPY_AND_ASSIGN(ShellApplicationDelegate);
 };
diff --git a/mash/wm/accelerator_registrar_impl.h b/mash/wm/accelerator_registrar_impl.h
index fe470c6..3bde90f 100644
--- a/mash/wm/accelerator_registrar_impl.h
+++ b/mash/wm/accelerator_registrar_impl.h
@@ -13,8 +13,8 @@
 #include "base/macros.h"
 #include "components/mus/public/interfaces/accelerator_registrar.mojom.h"
 #include "mash/wm/root_windows_observer.h"
+#include "mojo/public/cpp/bindings/binding_set.h"
 #include "mojo/public/cpp/bindings/strong_binding.h"
-#include "mojo/public/cpp/bindings/weak_binding_set.h"
 
 namespace mash {
 namespace wm {
diff --git a/mash/wm/window_manager_application.h b/mash/wm/window_manager_application.h
index 7699b9f..7f2806f1 100644
--- a/mash/wm/window_manager_application.h
+++ b/mash/wm/window_manager_application.h
@@ -19,7 +19,7 @@
 #include "components/mus/public/interfaces/window_tree_host.mojom.h"
 #include "mash/wm/public/interfaces/user_window_controller.mojom.h"
 #include "mojo/public/cpp/bindings/binding.h"
-#include "mojo/public/cpp/bindings/weak_binding_set.h"
+#include "mojo/public/cpp/bindings/binding_set.h"
 #include "mojo/services/tracing/public/cpp/tracing_impl.h"
 #include "mojo/shell/public/cpp/shell_client.h"
 
@@ -107,7 +107,7 @@
   // |user_window_controller_| is created once OnEmbed() is called. Until that
   // time |user_window_controller_requests_| stores pending interface requests.
   scoped_ptr<UserWindowControllerImpl> user_window_controller_;
-  mojo::WeakBindingSet<mash::wm::mojom::UserWindowController>
+  mojo::BindingSet<mash::wm::mojom::UserWindowController>
       user_window_controller_binding_;
   std::vector<
       scoped_ptr<mojo::InterfaceRequest<mash::wm::mojom::UserWindowController>>>
diff --git a/mojo/edk/embedder/platform_shared_buffer.cc b/mojo/edk/embedder/platform_shared_buffer.cc
index bbcf15d4..9516634b 100644
--- a/mojo/edk/embedder/platform_shared_buffer.cc
+++ b/mojo/edk/embedder/platform_shared_buffer.cc
@@ -27,9 +27,14 @@
 #elif defined(OS_WIN)
   return ScopedPlatformHandle(PlatformHandle(memory_handle.GetHandle()));
 #else
-  CHECK_EQ(memory_handle.GetType(), base::SharedMemoryHandle::POSIX);
-  return ScopedPlatformHandle(
-      PlatformHandle(memory_handle.GetFileDescriptor().fd));
+  if (memory_handle.GetType() == base::SharedMemoryHandle::MACH) {
+    return ScopedPlatformHandle(PlatformHandle(
+        memory_handle.GetMemoryObject()));
+  } else {
+    DCHECK(memory_handle.GetType() == base::SharedMemoryHandle::POSIX);
+    return ScopedPlatformHandle(PlatformHandle(
+        memory_handle.GetFileDescriptor().fd));
+  }
 #endif
 }
 
@@ -185,6 +190,14 @@
 #if defined(OS_WIN)
   base::SharedMemoryHandle handle(platform_handle.release().handle,
                                   base::GetCurrentProcId());
+#elif defined(OS_MACOSX) && !defined(OS_IOS)
+  base::SharedMemoryHandle handle;
+  if (platform_handle.get().type == PlatformHandle::Type::MACH) {
+    handle = base::SharedMemoryHandle(
+        platform_handle.release().port, num_bytes_, base::GetCurrentProcId());
+  } else {
+    handle = base::SharedMemoryHandle(platform_handle.release().handle, false);
+  }
 #else
   base::SharedMemoryHandle handle(platform_handle.release().handle, false);
 #endif
diff --git a/mojo/mojo_public.gyp b/mojo/mojo_public.gyp
index 3017df8..10a0dae 100644
--- a/mojo/mojo_public.gyp
+++ b/mojo/mojo_public.gyp
@@ -104,8 +104,10 @@
         'public/cpp/bindings/associated_interface_ptr_info.h',
         'public/cpp/bindings/associated_interface_request.h',
         'public/cpp/bindings/binding.h',
+        'public/cpp/bindings/binding_set.h',
         'public/cpp/bindings/callback.h',
         'public/cpp/bindings/interface_ptr.h',
+        'public/cpp/bindings/interface_ptr_set.h',
         'public/cpp/bindings/interface_request.h',
         'public/cpp/bindings/lib/array_internal.cc',
         'public/cpp/bindings/lib/array_internal.h',
@@ -177,8 +179,6 @@
         'public/cpp/bindings/string.h',
         'public/cpp/bindings/strong_binding.h',
         'public/cpp/bindings/type_converter.h',
-        'public/cpp/bindings/weak_binding_set.h',
-        'public/cpp/bindings/weak_interface_ptr_set.h',
         # This comes from the mojo_interface_bindings_cpp_sources dependency.
         '>@(mojom_generated_sources)',
       ],
diff --git a/mojo/public/cpp/bindings/BUILD.gn b/mojo/public/cpp/bindings/BUILD.gn
index 72079fd..6b7a015f 100644
--- a/mojo/public/cpp/bindings/BUILD.gn
+++ b/mojo/public/cpp/bindings/BUILD.gn
@@ -11,8 +11,10 @@
     "associated_interface_ptr_info.h",
     "associated_interface_request.h",
     "binding.h",
+    "binding_set.h",
     "interface_ptr.h",
     "interface_ptr_info.h",
+    "interface_ptr_set.h",
     "interface_request.h",
     "lib/array_internal.cc",
     "lib/array_internal.h",
@@ -85,8 +87,6 @@
     "struct_ptr.h",
     "struct_traits.h",
     "type_converter.h",
-    "weak_binding_set.h",
-    "weak_interface_ptr_set.h",
   ]
 
   public_deps = [
diff --git a/mojo/public/cpp/bindings/binding_set.h b/mojo/public/cpp/bindings/binding_set.h
new file mode 100644
index 0000000..82e7cfb
--- /dev/null
+++ b/mojo/public/cpp/bindings/binding_set.h
@@ -0,0 +1,113 @@
+// 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 MOJO_PUBLIC_CPP_BINDINGS_BINDING_SET_H_
+#define MOJO_PUBLIC_CPP_BINDINGS_BINDING_SET_H_
+
+#include <algorithm>
+#include <utility>
+#include <vector>
+
+#include "base/macros.h"
+#include "base/memory/weak_ptr.h"
+#include "mojo/public/cpp/bindings/binding.h"
+
+namespace mojo {
+
+// Use this class to manage a set of bindings, which are automatically destroyed
+// and removed from the set when the pipe they bound to is disconnected.
+template <typename Interface>
+class BindingSet {
+ public:
+  using GenericInterface = typename Interface::GenericInterface;
+
+  BindingSet() {}
+  ~BindingSet() { CloseAllBindings(); }
+
+  void set_connection_error_handler(const Closure& error_handler) {
+    error_handler_ = error_handler;
+  }
+
+  void AddBinding(Interface* impl, InterfaceRequest<GenericInterface> request) {
+    auto binding = new Element(impl, std::move(request));
+    binding->set_connection_error_handler([this]() { OnConnectionError(); });
+    bindings_.push_back(binding->GetWeakPtr());
+  }
+
+  // Returns an InterfacePtr bound to one end of a pipe whose other end is
+  // bound to |this|.
+  InterfacePtr<Interface> CreateInterfacePtrAndBind(Interface* impl) {
+    InterfacePtr<Interface> interface_ptr;
+    AddBinding(impl, GetProxy(&interface_ptr));
+    return interface_ptr;
+  }
+
+  void CloseAllBindings() {
+    for (const auto& it : bindings_) {
+      if (it) {
+        it->Close();
+        delete it.get();
+      }
+    }
+    bindings_.clear();
+  }
+
+  bool empty() const { return bindings_.empty(); }
+
+ private:
+  class Element {
+   public:
+    using GenericInterface = typename Interface::GenericInterface;
+
+    Element(Interface* impl, InterfaceRequest<GenericInterface> request)
+        : binding_(impl, std::move(request)), weak_ptr_factory_(this) {
+      binding_.set_connection_error_handler([this]() { OnConnectionError(); });
+    }
+
+    ~Element() {}
+
+    void set_connection_error_handler(const Closure& error_handler) {
+      error_handler_ = error_handler;
+    }
+
+    base::WeakPtr<Element> GetWeakPtr() {
+      return weak_ptr_factory_.GetWeakPtr();
+    }
+
+    void Close() { binding_.Close(); }
+
+    void OnConnectionError() {
+      Closure error_handler = error_handler_;
+      delete this;
+      error_handler.Run();
+    }
+
+   private:
+    Binding<Interface> binding_;
+    Closure error_handler_;
+    base::WeakPtrFactory<Element> weak_ptr_factory_;
+
+    DISALLOW_COPY_AND_ASSIGN(Element);
+  };
+
+  void OnConnectionError() {
+    // Clear any deleted bindings.
+    bindings_.erase(std::remove_if(bindings_.begin(), bindings_.end(),
+                                   [](const base::WeakPtr<Element>& p) {
+                                     return p.get() == nullptr;
+                                   }),
+                    bindings_.end());
+
+    error_handler_.Run();
+  }
+
+  Closure error_handler_;
+  std::vector<base::WeakPtr<Element>> bindings_;
+
+  DISALLOW_COPY_AND_ASSIGN(BindingSet);
+};
+
+}  // namespace mojo
+
+#endif  // MOJO_PUBLIC_CPP_BINDINGS_BINDING_SET_H_
diff --git a/mojo/public/cpp/bindings/interface_ptr_set.h b/mojo/public/cpp/bindings/interface_ptr_set.h
new file mode 100644
index 0000000..c5d402d
--- /dev/null
+++ b/mojo/public/cpp/bindings/interface_ptr_set.h
@@ -0,0 +1,83 @@
+// 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 MOJO_PUBLIC_CPP_BINDINGS_INTERFACE_PTR_SET_H_
+#define MOJO_PUBLIC_CPP_BINDINGS_INTERFACE_PTR_SET_H_
+
+#include <utility>
+#include <vector>
+
+#include "base/macros.h"
+#include "base/memory/weak_ptr.h"
+#include "mojo/public/cpp/bindings/interface_ptr.h"
+
+namespace mojo {
+
+template <typename Interface>
+class InterfacePtrSet {
+ public:
+  InterfacePtrSet() {}
+  ~InterfacePtrSet() { CloseAll(); }
+
+  void AddInterfacePtr(InterfacePtr<Interface> ptr) {
+    auto weak_interface_ptr = new Element(std::move(ptr));
+    ptrs_.push_back(weak_interface_ptr->GetWeakPtr());
+    ClearNullInterfacePtrs();
+  }
+
+  template <typename FunctionType>
+  void ForAllPtrs(FunctionType function) {
+    for (const auto& it : ptrs_) {
+      if (it)
+        function(it->get());
+    }
+    ClearNullInterfacePtrs();
+  }
+
+  void CloseAll() {
+    for (const auto& it : ptrs_) {
+      if (it)
+        it->Close();
+    }
+    ptrs_.clear();
+  }
+
+ private:
+  class Element {
+   public:
+    explicit Element(InterfacePtr<Interface> ptr)
+        : ptr_(std::move(ptr)), weak_ptr_factory_(this) {
+      ptr_.set_connection_error_handler([this]() { delete this; });
+    }
+    ~Element() {}
+
+    void Close() { ptr_.reset(); }
+
+    Interface* get() { return ptr_.get(); }
+
+    base::WeakPtr<Element> GetWeakPtr() {
+      return weak_ptr_factory_.GetWeakPtr();
+    }
+
+   private:
+    InterfacePtr<Interface> ptr_;
+    base::WeakPtrFactory<Element> weak_ptr_factory_;
+
+    DISALLOW_COPY_AND_ASSIGN(Element);
+  };
+
+  void ClearNullInterfacePtrs() {
+    ptrs_.erase(std::remove_if(ptrs_.begin(), ptrs_.end(),
+                               [](const base::WeakPtr<Element>& p) {
+                                 return p.get() == nullptr;
+                               }),
+                ptrs_.end());
+  }
+
+  std::vector<base::WeakPtr<Element>> ptrs_;
+};
+
+}  // namespace mojo
+
+#endif  // MOJO_PUBLIC_CPP_BINDINGS_INTERFACE_PTR_SET_H_
diff --git a/mojo/public/cpp/bindings/tests/pickle_unittest.cc b/mojo/public/cpp/bindings/tests/pickle_unittest.cc
index a0d7a2e..33961b4 100644
--- a/mojo/public/cpp/bindings/tests/pickle_unittest.cc
+++ b/mojo/public/cpp/bindings/tests/pickle_unittest.cc
@@ -9,10 +9,10 @@
 #include "base/logging.h"
 #include "base/message_loop/message_loop.h"
 #include "base/run_loop.h"
+#include "mojo/public/cpp/bindings/binding_set.h"
 #include "mojo/public/cpp/bindings/interface_request.h"
 #include "mojo/public/cpp/bindings/tests/pickled_struct_blink.h"
 #include "mojo/public/cpp/bindings/tests/pickled_struct_chromium.h"
-#include "mojo/public/cpp/bindings/weak_binding_set.h"
 #include "mojo/public/interfaces/bindings/tests/test_native_types.mojom-blink.h"
 #include "mojo/public/interfaces/bindings/tests/test_native_types.mojom-chromium.h"
 #include "mojo/public/interfaces/bindings/tests/test_native_types.mojom.h"
@@ -134,9 +134,9 @@
  private:
   base::MessageLoop loop_;
   ChromiumPicklePasserImpl chromium_service_;
-  mojo::WeakBindingSet<chromium::PicklePasser> chromium_bindings_;
+  mojo::BindingSet<chromium::PicklePasser> chromium_bindings_;
   BlinkPicklePasserImpl blink_service_;
-  mojo::WeakBindingSet<blink::PicklePasser> blink_bindings_;
+  mojo::BindingSet<blink::PicklePasser> blink_bindings_;
 };
 
 }  // namespace
diff --git a/mojo/public/cpp/bindings/tests/struct_traits_unittest.cc b/mojo/public/cpp/bindings/tests/struct_traits_unittest.cc
index 02fb53f..b4c3e49 100644
--- a/mojo/public/cpp/bindings/tests/struct_traits_unittest.cc
+++ b/mojo/public/cpp/bindings/tests/struct_traits_unittest.cc
@@ -7,11 +7,11 @@
 #include "base/logging.h"
 #include "base/message_loop/message_loop.h"
 #include "base/run_loop.h"
+#include "mojo/public/cpp/bindings/binding_set.h"
 #include "mojo/public/cpp/bindings/interface_request.h"
 #include "mojo/public/cpp/bindings/tests/rect_blink.h"
 #include "mojo/public/cpp/bindings/tests/rect_chromium.h"
 #include "mojo/public/cpp/bindings/tests/struct_with_traits_impl.h"
-#include "mojo/public/cpp/bindings/weak_binding_set.h"
 #include "mojo/public/interfaces/bindings/tests/struct_with_traits.mojom.h"
 #include "mojo/public/interfaces/bindings/tests/test_native_types.mojom-blink.h"
 #include "mojo/public/interfaces/bindings/tests/test_native_types.mojom-chromium.h"
@@ -126,12 +126,12 @@
   base::MessageLoop loop_;
 
   ChromiumRectServiceImpl chromium_service_;
-  mojo::WeakBindingSet<chromium::RectService> chromium_bindings_;
+  mojo::BindingSet<chromium::RectService> chromium_bindings_;
 
   BlinkRectServiceImpl blink_service_;
-  mojo::WeakBindingSet<blink::RectService> blink_bindings_;
+  mojo::BindingSet<blink::RectService> blink_bindings_;
 
-  mojo::WeakBindingSet<TraitsTestService> traits_test_bindings_;
+  mojo::BindingSet<TraitsTestService> traits_test_bindings_;
 };
 
 }  // namespace
diff --git a/mojo/public/cpp/bindings/weak_binding_set.h b/mojo/public/cpp/bindings/weak_binding_set.h
deleted file mode 100644
index bf06a28..0000000
--- a/mojo/public/cpp/bindings/weak_binding_set.h
+++ /dev/null
@@ -1,118 +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 MOJO_PUBLIC_CPP_BINDINGS_WEAK_BINDING_SET_H_
-#define MOJO_PUBLIC_CPP_BINDINGS_WEAK_BINDING_SET_H_
-
-#include <algorithm>
-#include <utility>
-#include <vector>
-
-#include "base/macros.h"
-#include "base/memory/weak_ptr.h"
-#include "mojo/public/cpp/bindings/binding.h"
-
-namespace mojo {
-
-template <typename Interface>
-class WeakBinding;
-
-// Use this class to manage a set of weak pointers to bindings each of which is
-// owned by the pipe they are bound to.
-template <typename Interface>
-class WeakBindingSet {
- public:
-  using GenericInterface = typename Interface::GenericInterface;
-
-  WeakBindingSet() {}
-  ~WeakBindingSet() { CloseAllBindings(); }
-
-  void set_connection_error_handler(const Closure& error_handler) {
-    error_handler_ = error_handler;
-  }
-
-  void AddBinding(Interface* impl, InterfaceRequest<GenericInterface> request) {
-    auto binding = new WeakBinding<Interface>(impl, std::move(request));
-    binding->set_connection_error_handler([this]() { OnConnectionError(); });
-    bindings_.push_back(binding->GetWeakPtr());
-  }
-
-  // Returns an InterfacePtr bound to one end of a pipe whose other end is
-  // bound to |this|.
-  InterfacePtr<Interface> CreateInterfacePtrAndBind(Interface* impl) {
-    InterfacePtr<Interface> interface_ptr;
-    AddBinding(impl, GetProxy(&interface_ptr));
-    return interface_ptr;
-  }
-
-  void CloseAllBindings() {
-    for (const auto& it : bindings_) {
-      if (it) {
-        it->Close();
-        delete it.get();
-      }
-    }
-    bindings_.clear();
-  }
-
-  bool empty() const { return bindings_.empty(); }
-
- private:
-  void OnConnectionError() {
-    // Clear any deleted bindings.
-    bindings_.erase(
-        std::remove_if(bindings_.begin(), bindings_.end(),
-                       [](const base::WeakPtr<WeakBinding<Interface>>& p) {
-                         return p.get() == nullptr;
-                       }),
-        bindings_.end());
-
-    error_handler_.Run();
-  }
-
-  Closure error_handler_;
-  std::vector<base::WeakPtr<WeakBinding<Interface>>> bindings_;
-
-  DISALLOW_COPY_AND_ASSIGN(WeakBindingSet);
-};
-
-template <typename Interface>
-class WeakBinding {
- public:
-  using GenericInterface = typename Interface::GenericInterface;
-
-  WeakBinding(Interface* impl, InterfaceRequest<GenericInterface> request)
-      : binding_(impl, std::move(request)), weak_ptr_factory_(this) {
-    binding_.set_connection_error_handler([this]() { OnConnectionError(); });
-  }
-
-  ~WeakBinding() {}
-
-  void set_connection_error_handler(const Closure& error_handler) {
-    error_handler_ = error_handler;
-  }
-
-  base::WeakPtr<WeakBinding> GetWeakPtr() {
-    return weak_ptr_factory_.GetWeakPtr();
-  }
-
-  void Close() { binding_.Close(); }
-
-  void OnConnectionError() {
-    Closure error_handler = error_handler_;
-    delete this;
-    error_handler.Run();
-  }
-
- private:
-  Binding<Interface> binding_;
-  Closure error_handler_;
-  base::WeakPtrFactory<WeakBinding> weak_ptr_factory_;
-
-  DISALLOW_COPY_AND_ASSIGN(WeakBinding);
-};
-
-}  // namespace mojo
-
-#endif  // MOJO_PUBLIC_CPP_BINDINGS_WEAK_BINDING_SET_H_
diff --git a/mojo/public/cpp/bindings/weak_interface_ptr_set.h b/mojo/public/cpp/bindings/weak_interface_ptr_set.h
deleted file mode 100644
index f92a5ed..0000000
--- a/mojo/public/cpp/bindings/weak_interface_ptr_set.h
+++ /dev/null
@@ -1,88 +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 MOJO_PUBLIC_CPP_BINDINGS_WEAK_INTERFACE_PTR_SET_H_
-#define MOJO_PUBLIC_CPP_BINDINGS_WEAK_INTERFACE_PTR_SET_H_
-
-#include <utility>
-#include <vector>
-
-#include "base/macros.h"
-#include "base/memory/weak_ptr.h"
-#include "mojo/public/cpp/bindings/interface_ptr.h"
-
-namespace mojo {
-
-template <typename Interface>
-class WeakInterfacePtr;
-
-template <typename Interface>
-class WeakInterfacePtrSet {
- public:
-  WeakInterfacePtrSet() {}
-  ~WeakInterfacePtrSet() { CloseAll(); }
-
-  void AddInterfacePtr(InterfacePtr<Interface> ptr) {
-    auto weak_interface_ptr = new WeakInterfacePtr<Interface>(std::move(ptr));
-    ptrs_.push_back(weak_interface_ptr->GetWeakPtr());
-    ClearNullInterfacePtrs();
-  }
-
-  template <typename FunctionType>
-  void ForAllPtrs(FunctionType function) {
-    for (const auto& it : ptrs_) {
-      if (it)
-        function(it->get());
-    }
-    ClearNullInterfacePtrs();
-  }
-
-  void CloseAll() {
-    for (const auto& it : ptrs_) {
-      if (it)
-        it->Close();
-    }
-    ptrs_.clear();
-  }
-
- private:
-  using WPWIPI = base::WeakPtr<WeakInterfacePtr<Interface>>;
-
-  void ClearNullInterfacePtrs() {
-    ptrs_.erase(
-        std::remove_if(ptrs_.begin(), ptrs_.end(),
-                       [](const WPWIPI& p) { return p.get() == nullptr; }),
-        ptrs_.end());
-  }
-
-  std::vector<WPWIPI> ptrs_;
-};
-
-template <typename Interface>
-class WeakInterfacePtr {
- public:
-  explicit WeakInterfacePtr(InterfacePtr<Interface> ptr)
-      : ptr_(std::move(ptr)), weak_ptr_factory_(this) {
-    ptr_.set_connection_error_handler([this]() { delete this; });
-  }
-  ~WeakInterfacePtr() {}
-
-  void Close() { ptr_.reset(); }
-
-  Interface* get() { return ptr_.get(); }
-
-  base::WeakPtr<WeakInterfacePtr> GetWeakPtr() {
-    return weak_ptr_factory_.GetWeakPtr();
-  }
-
- private:
-  InterfacePtr<Interface> ptr_;
-  base::WeakPtrFactory<WeakInterfacePtr> weak_ptr_factory_;
-
-  DISALLOW_COPY_AND_ASSIGN(WeakInterfacePtr);
-};
-
-}  // namespace mojo
-
-#endif  // MOJO_PUBLIC_CPP_BINDINGS_WEAK_INTERFACE_PTR_SET_H_
diff --git a/mojo/services/package_manager/package_manager.h b/mojo/services/package_manager/package_manager.h
index 12597240..e587cc6 100644
--- a/mojo/services/package_manager/package_manager.h
+++ b/mojo/services/package_manager/package_manager.h
@@ -9,7 +9,7 @@
 #include "base/memory/weak_ptr.h"
 #include "base/path_service.h"
 #include "base/values.h"
-#include "mojo/public/cpp/bindings/weak_binding_set.h"
+#include "mojo/public/cpp/bindings/binding_set.h"
 #include "mojo/services/package_manager/public/interfaces/catalog.mojom.h"
 #include "mojo/services/package_manager/public/interfaces/resolver.mojom.h"
 #include "mojo/services/package_manager/public/interfaces/shell_resolver.mojom.h"
@@ -157,9 +157,9 @@
   base::TaskRunner* blocking_pool_;
   GURL system_package_dir_;
 
-  mojo::WeakBindingSet<mojom::Resolver> resolver_bindings_;
-  mojo::WeakBindingSet<mojom::ShellResolver> shell_resolver_bindings_;
-  mojo::WeakBindingSet<mojom::Catalog> catalog_bindings_;
+  mojo::BindingSet<mojom::Resolver> resolver_bindings_;
+  mojo::BindingSet<mojom::ShellResolver> shell_resolver_bindings_;
+  mojo::BindingSet<mojom::Catalog> catalog_bindings_;
 
   scoped_ptr<ApplicationCatalogStore> catalog_store_;
   std::map<GURL, ApplicationInfo> catalog_;
diff --git a/mojo/services/tracing/tracing_app.h b/mojo/services/tracing/tracing_app.h
index edb189ef..f409887 100644
--- a/mojo/services/tracing/tracing_app.h
+++ b/mojo/services/tracing/tracing_app.h
@@ -10,9 +10,9 @@
 #include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/scoped_vector.h"
+#include "mojo/public/cpp/bindings/binding_set.h"
+#include "mojo/public/cpp/bindings/interface_ptr_set.h"
 #include "mojo/public/cpp/bindings/strong_binding.h"
-#include "mojo/public/cpp/bindings/weak_binding_set.h"
-#include "mojo/public/cpp/bindings/weak_interface_ptr_set.h"
 #include "mojo/services/tracing/public/interfaces/tracing.mojom.h"
 #include "mojo/services/tracing/trace_data_sink.h"
 #include "mojo/services/tracing/trace_recorder_impl.h"
@@ -64,9 +64,9 @@
 
   scoped_ptr<TraceDataSink> sink_;
   ScopedVector<TraceRecorderImpl> recorder_impls_;
-  mojo::WeakInterfacePtrSet<TraceProvider> provider_ptrs_;
+  mojo::InterfacePtrSet<TraceProvider> provider_ptrs_;
   mojo::Binding<TraceCollector> collector_binding_;
-  mojo::WeakBindingSet<StartupPerformanceDataCollector>
+  mojo::BindingSet<StartupPerformanceDataCollector>
       startup_performance_data_collector_bindings_;
   StartupPerformanceTimes startup_performance_times_;
   bool tracing_active_;
diff --git a/mojo/shell/application_instance.cc b/mojo/shell/application_instance.cc
index df2cfb7..e1a89d029 100644
--- a/mojo/shell/application_instance.cc
+++ b/mojo/shell/application_instance.cc
@@ -14,6 +14,7 @@
 #include "mojo/common/common_type_converters.h"
 #include "mojo/common/url_type_converters.h"
 #include "mojo/shell/application_manager.h"
+#include "mojo/shell/capability_filter.h"
 
 namespace mojo {
 namespace shell {
@@ -84,7 +85,6 @@
     uint32_t user_id,
     shell::mojom::InterfaceProviderRequest remote_interfaces,
     shell::mojom::InterfaceProviderPtr local_interfaces,
-    mojom::CapabilityFilterPtr filter,
     const ConnectCallback& callback) {
   GURL url = app_url.To<GURL>();
   if (!url.is_valid()) {
@@ -94,14 +94,9 @@
   }
   if (allow_any_application_ ||
       identity_.filter().find(url.spec()) != identity_.filter().end()) {
-    CapabilityFilter capability_filter = GetPermissiveCapabilityFilter();
-    if (!filter.is_null())
-      capability_filter = filter->filter.To<CapabilityFilter>();
-
     scoped_ptr<ConnectParams> params(new ConnectParams);
     params->set_source(identity_);
-    params->set_target(
-        Identity(url, std::string(), user_id, capability_filter));
+    params->set_target(Identity(url, std::string(), user_id));
     params->set_remote_interfaces(std::move(remote_interfaces));
     params->set_local_interfaces(std::move(local_interfaces));
     params->set_connect_callback(callback);
diff --git a/mojo/shell/application_instance.h b/mojo/shell/application_instance.h
index fb4d046..4599137 100644
--- a/mojo/shell/application_instance.h
+++ b/mojo/shell/application_instance.h
@@ -14,8 +14,7 @@
 #include "base/memory/scoped_ptr.h"
 #include "base/process/process_handle.h"
 #include "mojo/public/cpp/bindings/binding.h"
-#include "mojo/public/cpp/bindings/weak_binding_set.h"
-#include "mojo/shell/capability_filter.h"
+#include "mojo/public/cpp/bindings/binding_set.h"
 #include "mojo/shell/connect_params.h"
 #include "mojo/shell/identity.h"
 #include "mojo/shell/public/interfaces/application_manager.mojom.h"
@@ -66,7 +65,6 @@
                uint32_t user_id,
                shell::mojom::InterfaceProviderRequest remote_interfaces,
                shell::mojom::InterfaceProviderPtr local_interfaces,
-               mojom::CapabilityFilterPtr filter,
                const ConnectCallback& callback) override;
   void Clone(mojom::ConnectorRequest request) override;
 
@@ -93,7 +91,7 @@
   mojom::ShellClientPtr shell_client_;
   Binding<mojom::Shell> binding_;
   Binding<mojom::PIDReceiver> pid_receiver_binding_;
-  WeakBindingSet<mojom::Connector> connectors_;
+  BindingSet<mojom::Connector> connectors_;
   bool queue_requests_;
   std::vector<ConnectParams*> queued_client_requests_;
   NativeRunner* native_runner_;
diff --git a/mojo/shell/application_manager.cc b/mojo/shell/application_manager.cc
index 6f27b2b..314f4ea 100644
--- a/mojo/shell/application_manager.cc
+++ b/mojo/shell/application_manager.cc
@@ -178,10 +178,10 @@
   // manually by other code, not in response to a Connect() request. The newly
   // created instance is identified by |url| and may be subsequently reached by
   // client code using this identity.
-  CapabilityFilter local_filter = filter->filter.To<CapabilityFilter>();
   // TODO(beng): obtain userid from the inbound connection.
   Identity target_id(url.To<GURL>(), std::string(),
-                     mojom::Connector::kUserInherit, local_filter);
+                     mojom::Connector::kUserInherit);
+  target_id.SetFilter(filter->filter.To<CapabilityFilter>());
   mojom::ShellClientRequest request;
   ApplicationInstance* instance = CreateInstance(target_id, &request);
   instance->BindPIDReceiver(std::move(pid_receiver));
@@ -304,12 +304,13 @@
     return;
 
   Identity source = params->source();
-  CapabilityFilter filter = params->target().filter();
-  // TODO(beng): this clobbers the filter passed via Connect().
+  // |base_filter| can be null when there is no manifest, e.g. for URL types
+  // not resolvable by the resolver.
+  CapabilityFilter filter = GetPermissiveCapabilityFilter();
   if (!base_filter.is_null())
     filter = base_filter->filter.To<CapabilityFilter>();
-  Identity target(params->target().url(), params->target().qualifier(),
-                  params->target().user_id(), filter);
+  Identity target = params->target();
+  target.SetFilter(filter);
 
   mojom::ShellClientRequest request;
   ApplicationInstance* instance = CreateInstance(target, &request);
@@ -325,10 +326,9 @@
     // In cases where a package alias is resolved, we have to use the qualifier
     // from the original request rather than for the package itself, which will
     // always be the same.
-    CreateShellClient(source,
-                      Identity(resolved_gurl, target.qualifier(),
-                               target.user_id(), filter),
-                      target.url(), std::move(request));
+    CreateShellClient(
+        source, Identity(resolved_gurl, target.qualifier(), target.user_id()),
+        target.url(), std::move(request));
   } else {
     bool start_sandboxed = false;
     base::FilePath path = util::UrlToFilePath(file_url.To<GURL>());
diff --git a/mojo/shell/application_manager.h b/mojo/shell/application_manager.h
index 2757d92..fb1763b 100644
--- a/mojo/shell/application_manager.h
+++ b/mojo/shell/application_manager.h
@@ -11,8 +11,8 @@
 #include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/memory/weak_ptr.h"
-#include "mojo/public/cpp/bindings/weak_binding_set.h"
-#include "mojo/public/cpp/bindings/weak_interface_ptr_set.h"
+#include "mojo/public/cpp/bindings/binding_set.h"
+#include "mojo/public/cpp/bindings/interface_ptr_set.h"
 #include "mojo/services/package_manager/package_manager.h"
 #include "mojo/services/package_manager/public/interfaces/shell_resolver.mojom.h"
 #include "mojo/shell/application_loader.h"
@@ -186,14 +186,14 @@
   // Counter used to assign ids to content handlers.
   uint32_t shell_client_factory_id_counter_;
 
-  WeakInterfacePtrSet<mojom::ApplicationManagerListener> listeners_;
+  InterfacePtrSet<mojom::ApplicationManagerListener> listeners_;
 
   base::Callback<void(const Identity&)> instance_quit_callback_;
   base::TaskRunner* file_task_runner_;
   scoped_ptr<NativeRunnerFactory> native_runner_factory_;
   std::vector<scoped_ptr<NativeRunner>> native_runners_;
   scoped_ptr<ShellConnection> shell_connection_;
-  WeakBindingSet<mojom::ApplicationManager> bindings_;
+  BindingSet<mojom::ApplicationManager> bindings_;
   base::WeakPtrFactory<ApplicationManager> weak_ptr_factory_;
 
   DISALLOW_COPY_AND_ASSIGN(ApplicationManager);
diff --git a/mojo/shell/background/background_shell.cc b/mojo/shell/background/background_shell.cc
index 5d8bdc51..3ba1203 100644
--- a/mojo/shell/background/background_shell.cc
+++ b/mojo/shell/background/background_shell.cc
@@ -180,9 +180,7 @@
 mojom::ShellClientRequest BackgroundShell::CreateShellClientRequest(
     const GURL& url) {
   scoped_ptr<ConnectParams> params(new ConnectParams);
-  params->set_target(
-      Identity(url, std::string(), mojom::Connector::kUserRoot,
-               GetPermissiveCapabilityFilter()));
+  params->set_target(Identity(url, std::string(), mojom::Connector::kUserRoot));
   mojom::ShellClientRequest request;
   base::WaitableEvent signal(true, false);
   thread_->message_loop()->task_runner()->PostTask(
diff --git a/mojo/shell/background/tests/test_service.cc b/mojo/shell/background/tests/test_service.cc
index 3c9dbbd..4d001afe 100644
--- a/mojo/shell/background/tests/test_service.cc
+++ b/mojo/shell/background/tests/test_service.cc
@@ -3,7 +3,7 @@
 // found in the LICENSE file.
 
 #include "mojo/public/c/system/main.h"
-#include "mojo/public/cpp/bindings/weak_binding_set.h"
+#include "mojo/public/cpp/bindings/binding_set.h"
 #include "mojo/shell/background/tests/test.mojom.h"
 #include "mojo/shell/public/cpp/application_runner.h"
 #include "mojo/shell/public/cpp/connection.h"
@@ -39,7 +39,7 @@
   // mojom::TestService
   void Test(const TestCallback& callback) override { callback.Run(); }
 
-  WeakBindingSet<mojom::TestService> bindings_;
+  BindingSet<mojom::TestService> bindings_;
 
   DISALLOW_COPY_AND_ASSIGN(TestClient);
 };
diff --git a/mojo/shell/connect_params.cc b/mojo/shell/connect_params.cc
index 215f705c..cdcbdb0 100644
--- a/mojo/shell/connect_params.cc
+++ b/mojo/shell/connect_params.cc
@@ -12,13 +12,7 @@
 namespace shell {
 
 ConnectParams::ConnectParams() {}
-
 ConnectParams::~ConnectParams() {}
 
-void ConnectParams::SetTargetURL(const GURL& target_url) {
-  target_ = Identity(target_url, target_.qualifier(),
-                     mojom::Connector::kUserInherit, target_.filter());
-}
-
 }  // namespace shell
 }  // namespace mojo
diff --git a/mojo/shell/connect_params.h b/mojo/shell/connect_params.h
index af45214..8ff0fbb 100644
--- a/mojo/shell/connect_params.h
+++ b/mojo/shell/connect_params.h
@@ -28,9 +28,6 @@
    ConnectParams();
    ~ConnectParams();
 
-  // The following methods set both |target_| and |target_url_request_|.
-  void SetTargetURL(const GURL& target_url);
-
   void set_source(const Identity& source) { source_ = source;  }
   const Identity& source() const { return source_; }
   void set_target(const Identity& target) { target_ = target; }
diff --git a/mojo/shell/connect_util.h b/mojo/shell/connect_util.h
index 14c32077..5aac3c3f 100644
--- a/mojo/shell/connect_util.h
+++ b/mojo/shell/connect_util.h
@@ -45,8 +45,7 @@
                                InterfacePtr<Interface>* ptr) {
   ScopedMessagePipeHandle service_handle = ConnectToInterfaceByName(
       application_manager, source,
-      Identity(application_url, std::string(), mojom::Connector::kUserInherit,
-               GetPermissiveCapabilityFilter()),
+      Identity(application_url, std::string(), mojom::Connector::kUserInherit),
       Interface::Name_);
   ptr->Bind(InterfacePtrInfo<Interface>(std::move(service_handle), 0u));
 }
diff --git a/mojo/shell/identity.cc b/mojo/shell/identity.cc
index 0a4169a..c1c10e2 100644
--- a/mojo/shell/identity.cc
+++ b/mojo/shell/identity.cc
@@ -34,14 +34,9 @@
 
 Identity::Identity(const GURL& url, const std::string& qualifier,
                    uint32_t user_id)
-    : Identity(url, qualifier, user_id, CapabilityFilter()) {}
-
-Identity::Identity(const GURL& url, const std::string& qualifier,
-                   uint32_t user_id, CapabilityFilter filter)
     : url_(url),
       qualifier_(qualifier.empty() ? url_.spec() : qualifier),
-      user_id_(user_id),
-      filter_(CanonicalizeFilter(filter)) {}
+      user_id_(user_id) {}
 
 Identity::~Identity() {}
 
@@ -57,13 +52,22 @@
 }
 
 bool Identity::operator==(const Identity& other) const {
+  // We specifically don't include filter in the equivalence check because we
+  // don't quite know how this should work yet.
+  // TODO(beng): figure out how it should work.
   return other.url_ == url_ && other.qualifier_ == qualifier_ &&
-    other.filter_ == filter_ && other.user_id_ == user_id_;
+         other.user_id_ == user_id_;
+}
+
+void Identity::SetFilter(const CapabilityFilter& filter) {
+  filter_ = CanonicalizeFilter(filter);
 }
 
 Identity CreateShellIdentity() {
-  return Identity(GURL("mojo://shell/"), std::string(),
-                  mojom::Connector::kUserRoot, GetPermissiveCapabilityFilter());
+  Identity id =
+      Identity(GURL("mojo://shell/"), "", mojom::Connector::kUserRoot);
+  id.SetFilter(GetPermissiveCapabilityFilter());
+  return id;
 }
 
 }  // namespace shell
diff --git a/mojo/shell/identity.h b/mojo/shell/identity.h
index 16e9681..2db1dd2 100644
--- a/mojo/shell/identity.h
+++ b/mojo/shell/identity.h
@@ -27,10 +27,6 @@
   Identity(const GURL& in_url,
            const std::string& in_qualifier,
            uint32_t user_id);
-  Identity(const GURL& in_url,
-           const std::string& in_qualifier,
-           uint32_t user,
-           CapabilityFilter filter);
   ~Identity();
 
   bool operator<(const Identity& other) const;
@@ -41,6 +37,7 @@
   uint32_t user_id() const { return user_id_; }
   void set_user_id(uint32_t user_id) { user_id_ = user_id; }
   const std::string& qualifier() const { return qualifier_; }
+  void SetFilter(const CapabilityFilter& filter);
   const CapabilityFilter& filter() const { return filter_; }
 
  private:
diff --git a/mojo/shell/public/cpp/connector.h b/mojo/shell/public/cpp/connector.h
index 7385e185..c527d92 100644
--- a/mojo/shell/public/cpp/connector.h
+++ b/mojo/shell/public/cpp/connector.h
@@ -11,8 +11,6 @@
 
 namespace mojo {
 
-shell::mojom::CapabilityFilterPtr CreatePermissiveCapabilityFilter();
-
 // An interface that encapsulates the Mojo Shell's broker interface by which
 // connections between applications are established. Once Connect() is called,
 // this class is bound to the thread the call was made on and it cannot be
@@ -35,18 +33,11 @@
     ~ConnectParams();
 
     const GURL& url() { return url_; }
-    shell::mojom::CapabilityFilterPtr TakeFilter() {
-      return std::move(filter_);
-    }
-    void set_filter(shell::mojom::CapabilityFilterPtr filter) {
-      filter_ = std::move(filter);
-    }
     void set_user_id(uint32_t user_id) { user_id_ = user_id; }
     uint32_t user_id() const { return user_id_; }
 
    private:
     GURL url_;
-    shell::mojom::CapabilityFilterPtr filter_;
     uint32_t user_id_;
 
     DISALLOW_COPY_AND_ASSIGN(ConnectParams);
@@ -73,7 +64,6 @@
   void ConnectToInterface(const std::string& url,
                           InterfacePtr<Interface>* ptr) {
     ConnectParams params(url);
-    params.set_filter(CreatePermissiveCapabilityFilter());
     return ConnectToInterface(&params, ptr);
   }
 
diff --git a/mojo/shell/public/cpp/lib/connector_impl.cc b/mojo/shell/public/cpp/lib/connector_impl.cc
index 989382e..33cc1bf 100644
--- a/mojo/shell/public/cpp/lib/connector_impl.cc
+++ b/mojo/shell/public/cpp/lib/connector_impl.cc
@@ -10,9 +10,7 @@
 
 Connector::ConnectParams::ConnectParams(const std::string& url)
     : url_(url),
-      filter_(shell::mojom::CapabilityFilter::New()),
       user_id_(shell::mojom::Connector::kUserInherit) {
-  filter_->filter.SetToEmpty();
 }
 Connector::ConnectParams::~ConnectParams() {}
 
@@ -22,7 +20,6 @@
 
 scoped_ptr<Connection> ConnectorImpl::Connect(const std::string& url) {
   ConnectParams params(url);
-  params.set_filter(CreatePermissiveCapabilityFilter());
   return Connect(&params);
 }
 
@@ -59,7 +56,6 @@
                       params->user_id(),
                       std::move(remote_request),
                       std::move(local_interfaces),
-                      params->TakeFilter(),
                       registry->GetConnectCallback());
   return std::move(registry);
 }
diff --git a/mojo/shell/public/cpp/lib/shell_connection.cc b/mojo/shell/public/cpp/lib/shell_connection.cc
index 1a3d398..cbefe4f7 100644
--- a/mojo/shell/public/cpp/lib/shell_connection.cc
+++ b/mojo/shell/public/cpp/lib/shell_connection.cc
@@ -235,13 +235,4 @@
     Quit();
 }
 
-shell::mojom::CapabilityFilterPtr CreatePermissiveCapabilityFilter() {
-  shell::mojom::CapabilityFilterPtr filter(
-      shell::mojom::CapabilityFilter::New());
-  Array<String> all_interfaces;
-  all_interfaces.push_back("*");
-  filter->filter.insert("*", std::move(all_interfaces));
-  return filter;
-}
-
 }  // namespace mojo
diff --git a/mojo/shell/public/cpp/shell.h b/mojo/shell/public/cpp/shell.h
index d333acb..cb7aec5 100644
--- a/mojo/shell/public/cpp/shell.h
+++ b/mojo/shell/public/cpp/shell.h
@@ -50,7 +50,6 @@
   void ConnectToInterface(const std::string& url,
                           InterfacePtr<Interface>* ptr) {
     Connector::ConnectParams params(url);
-    params.set_filter(CreatePermissiveCapabilityFilter());
     return ConnectToInterface(&params, ptr);
   }
 
diff --git a/mojo/shell/public/interfaces/shell.mojom b/mojo/shell/public/interfaces/shell.mojom
index 8c7f41b..1eaa9a3 100644
--- a/mojo/shell/public/interfaces/shell.mojom
+++ b/mojo/shell/public/interfaces/shell.mojom
@@ -69,9 +69,6 @@
   //    InterfaceProvider are filtered by the security policy described by the
   //    source and target application manifests.
   //
-  //  filter
-  //    Deprecated, to be removed.
-  //
   //  Response: (application_id)
   //    The shell responds with a unique identifier for the instance that was
   //    connected to.
@@ -79,8 +76,7 @@
   Connect(string url,
           uint32 user_id,
           InterfaceProvider&? remote_interfaces,
-          InterfaceProvider? local_interfaces,
-          CapabilityFilter filter) => (uint32 application_id);
+          InterfaceProvider? local_interfaces) => (uint32 application_id);
 
   // Clones this Connector so it can be passed to another thread.
   Clone(Connector& request);
diff --git a/mojo/shell/runner/child/native_apptest_target.cc b/mojo/shell/runner/child/native_apptest_target.cc
index d2747c5..04ebdbb 100644
--- a/mojo/shell/runner/child/native_apptest_target.cc
+++ b/mojo/shell/runner/child/native_apptest_target.cc
@@ -7,7 +7,7 @@
 #include "base/at_exit.h"
 #include "base/command_line.h"
 #include "base/macros.h"
-#include "mojo/public/cpp/bindings/weak_binding_set.h"
+#include "mojo/public/cpp/bindings/binding_set.h"
 #include "mojo/shell/public/cpp/connection.h"
 #include "mojo/shell/public/cpp/interface_factory.h"
 #include "mojo/shell/public/cpp/shell.h"
@@ -47,7 +47,7 @@
     bindings_.AddBinding(this, std::move(request));
   }
 
-  mojo::WeakBindingSet<mojo::shell::test::TestNativeService> bindings_;
+  mojo::BindingSet<mojo::shell::test::TestNativeService> bindings_;
 
   DISALLOW_COPY_AND_ASSIGN(TargetApplicationDelegate);
 };
diff --git a/mojo/shell/standalone/context.cc b/mojo/shell/standalone/context.cc
index 72488e5..e6ecd09 100644
--- a/mojo/shell/standalone/context.cc
+++ b/mojo/shell/standalone/context.cc
@@ -166,8 +166,7 @@
   scoped_ptr<ConnectParams> params(new ConnectParams);
   params->set_source(CreateShellIdentity());
   params->set_target(Identity(GURL("mojo:tracing"), std::string(),
-                              mojom::Connector::kUserInherit,
-                              GetPermissiveCapabilityFilter()));
+                              mojom::Connector::kUserInherit));
   params->set_remote_interfaces(GetProxy(&tracing_remote_interfaces));
   params->set_local_interfaces(std::move(tracing_local_interfaces));
   application_manager_->Connect(std::move(params));
@@ -237,9 +236,7 @@
 
   scoped_ptr<ConnectParams> params(new ConnectParams);
   params->set_source(CreateShellIdentity());
-  params->set_target(
-      Identity(url, std::string(), mojom::Connector::kUserRoot,
-               GetPermissiveCapabilityFilter()));
+  params->set_target(Identity(url, std::string(), mojom::Connector::kUserRoot));
   params->set_remote_interfaces(GetProxy(&remote_interfaces));
   params->set_local_interfaces(std::move(local_interfaces));
   application_manager_->Connect(std::move(params));
diff --git a/mojo/shell/tests/application_manager_apptest.cc b/mojo/shell/tests/application_manager_apptest.cc
index 9ebc076..82fa8bc1 100644
--- a/mojo/shell/tests/application_manager_apptest.cc
+++ b/mojo/shell/tests/application_manager_apptest.cc
@@ -11,7 +11,7 @@
 #include "base/macros.h"
 #include "base/message_loop/message_loop.h"
 #include "base/process/process_handle.h"
-#include "mojo/public/cpp/bindings/weak_binding_set.h"
+#include "mojo/public/cpp/bindings/binding_set.h"
 #include "mojo/shell/public/cpp/application_test_base.h"
 #include "mojo/shell/public/cpp/interface_factory.h"
 #include "mojo/shell/public/cpp/shell.h"
diff --git a/mojo/shell/tests/application_manager_apptest_driver.cc b/mojo/shell/tests/application_manager_apptest_driver.cc
index aad9660..2a820fe0 100644
--- a/mojo/shell/tests/application_manager_apptest_driver.cc
+++ b/mojo/shell/tests/application_manager_apptest_driver.cc
@@ -21,7 +21,7 @@
 #include "mojo/edk/embedder/embedder.h"
 #include "mojo/edk/embedder/platform_channel_pair.h"
 #include "mojo/edk/embedder/scoped_platform_handle.h"
-#include "mojo/public/cpp/bindings/weak_binding_set.h"
+#include "mojo/public/cpp/bindings/binding_set.h"
 #include "mojo/shell/public/cpp/connection.h"
 #include "mojo/shell/public/cpp/interface_factory.h"
 #include "mojo/shell/public/cpp/shell.h"
@@ -136,7 +136,7 @@
 
   mojo::Shell* shell_;
   base::Process target_;
-  mojo::WeakBindingSet<Driver> bindings_;
+  mojo::BindingSet<Driver> bindings_;
   base::WeakPtrFactory<TargetApplicationDelegate> weak_factory_;
 
   DISALLOW_COPY_AND_ASSIGN(TargetApplicationDelegate);
diff --git a/mojo/shell/tests/application_manager_unittest.cc b/mojo/shell/tests/application_manager_unittest.cc
index d9f4473..51bcc15b 100644
--- a/mojo/shell/tests/application_manager_unittest.cc
+++ b/mojo/shell/tests/application_manager_unittest.cc
@@ -604,8 +604,7 @@
   scoped_ptr<ConnectParams> params(new ConnectParams);
   params->set_source(CreateShellIdentity());
   params->set_target(
-      Identity(GURL("test:test"), "", mojom::Connector::kUserRoot,
-               GetPermissiveCapabilityFilter()));
+      Identity(GURL("test:test"), "", mojom::Connector::kUserRoot));
   application_manager_->SetInstanceQuitCallback(
       base::Bind(&QuitClosure, params->target(), &called));
   application_manager_->Connect(std::move(params));
diff --git a/mojo/shell/tests/capability_filter_test.cc b/mojo/shell/tests/capability_filter_test.cc
index 57fb1f0..3fac67c 100644
--- a/mojo/shell/tests/capability_filter_test.cc
+++ b/mojo/shell/tests/capability_filter_test.cc
@@ -9,8 +9,8 @@
 #include "base/macros.h"
 #include "base/stl_util.h"
 #include "base/strings/stringprintf.h"
+#include "mojo/public/cpp/bindings/binding_set.h"
 #include "mojo/public/cpp/bindings/strong_binding.h"
-#include "mojo/public/cpp/bindings/weak_binding_set.h"
 #include "mojo/services/package_manager/package_manager.h"
 #include "mojo/shell/application_loader.h"
 #include "mojo/shell/public/cpp/connection.h"
@@ -98,7 +98,7 @@
   std::set<std::string> expectations_;
   std::set<std::string> unexpected_;
   base::MessageLoop* loop_;
-  WeakBindingSet<Validator> validator_bindings_;
+  BindingSet<Validator> validator_bindings_;
 
   DISALLOW_COPY_AND_ASSIGN(ConnectionValidator);
 };
@@ -151,8 +151,8 @@
 
   Shell* shell_;
   ValidatorPtr validator_;
-  WeakBindingSet<Safe> safe_bindings_;
-  WeakBindingSet<Unsafe> unsafe_bindings_;
+  BindingSet<Safe> safe_bindings_;
+  BindingSet<Unsafe> unsafe_bindings_;
 
   DISALLOW_COPY_AND_ASSIGN(ServiceApplication);
 };
@@ -332,7 +332,7 @@
   scoped_ptr<ConnectParams> params(new ConnectParams);
   params->set_source(CreateShellIdentity());
   params->set_target(Identity(GURL(url), std::string(),
-                              mojom::Connector::kUserInherit, filter));
+                              mojom::Connector::kUserInherit));
   params->set_remote_interfaces(GetProxy(&remote_interfaces));
   params->set_local_interfaces(std::move(local_interfaces));
   quit_identities_.insert(params->target());
diff --git a/mojo/shell/tests/capability_filter_unittest.cc b/mojo/shell/tests/capability_filter_unittest.cc
index 42748a5..1eb7d4d 100644
--- a/mojo/shell/tests/capability_filter_unittest.cc
+++ b/mojo/shell/tests/capability_filter_unittest.cc
@@ -19,13 +19,13 @@
   DISALLOW_COPY_AND_ASSIGN(CapabilityFilterApplicationTest);
 };
 
-TEST_F(CapabilityFilterApplicationTest, Blocking) {
+TEST_F(CapabilityFilterApplicationTest, DISABLED_Blocking) {
   CreateLoader<TestApplication>("test:trusted");
   CreateLoader<TestApplication>("test:untrusted");
   RunBlockingTest();
 }
 
-TEST_F(CapabilityFilterApplicationTest, Wildcards) {
+TEST_F(CapabilityFilterApplicationTest, DISABLED_Wildcards) {
   CreateLoader<TestApplication>("test:wildcard");
   CreateLoader<TestApplication>("test:blocked");
   CreateLoader<TestApplication>("test:wildcard2");
diff --git a/mojo/shell/tests/package_test_package.cc b/mojo/shell/tests/package_test_package.cc
index a9defe4..ee8ff5b 100644
--- a/mojo/shell/tests/package_test_package.cc
+++ b/mojo/shell/tests/package_test_package.cc
@@ -12,7 +12,7 @@
 #include "base/run_loop.h"
 #include "base/threading/simple_thread.h"
 #include "mojo/public/c/system/main.h"
-#include "mojo/public/cpp/bindings/weak_binding_set.h"
+#include "mojo/public/cpp/bindings/binding_set.h"
 #include "mojo/shell/public/cpp/application_runner.h"
 #include "mojo/shell/public/cpp/interface_factory.h"
 #include "mojo/shell/public/cpp/shell.h"
@@ -88,7 +88,7 @@
   const std::string name_;
   mojom::ShellClientRequest request_;
   Shell* shell_;
-  WeakBindingSet<test::mojom::PackageTestService> bindings_;
+  BindingSet<test::mojom::PackageTestService> bindings_;
 
   DISALLOW_COPY_AND_ASSIGN(ProvidedShellClient);
 };
@@ -151,8 +151,8 @@
 
   Shell* shell_;
   std::vector<scoped_ptr<ShellClient>> delegates_;
-  WeakBindingSet<mojom::ShellClientFactory> shell_client_factory_bindings_;
-  WeakBindingSet<test::mojom::PackageTestService> bindings_;
+  BindingSet<mojom::ShellClientFactory> shell_client_factory_bindings_;
+  BindingSet<test::mojom::PackageTestService> bindings_;
 
   DISALLOW_COPY_AND_ASSIGN(PackageTestShellClient);
 };
diff --git a/net/http/http_transaction_test_util.cc b/net/http/http_transaction_test_util.cc
index 2298efd0..2bbe2e9 100644
--- a/net/http/http_transaction_test_util.cc
+++ b/net/http/http_transaction_test_util.cc
@@ -390,8 +390,7 @@
 }
 
 bool MockNetworkTransaction::GetRemoteEndpoint(IPEndPoint* endpoint) const {
-  IPAddress ip_address(127, 0, 0, 1);
-  *endpoint = IPEndPoint(ip_address, 80);
+  *endpoint = IPEndPoint(IPAddress(127, 0, 0, 1), 80);
   return true;
 }
 
diff --git a/net/quic/p2p/quic_p2p_session.cc b/net/quic/p2p/quic_p2p_session.cc
index e198399..148efe79 100644
--- a/net/quic/p2p/quic_p2p_session.cc
+++ b/net/quic/p2p/quic_p2p_session.cc
@@ -20,19 +20,18 @@
 QuicP2PSession::QuicP2PSession(const QuicConfig& config,
                                const QuicP2PCryptoConfig& crypto_config,
                                scoped_ptr<QuicConnection> connection,
-                               scoped_ptr<net::Socket> socket)
+                               scoped_ptr<Socket> socket)
     : QuicSession(connection.release(), config),
       socket_(std::move(socket)),
       crypto_stream_(new QuicP2PCryptoStream(this, crypto_config)),
-      read_buffer_(new net::IOBuffer(static_cast<size_t>(kMaxPacketSize))) {
+      read_buffer_(new IOBuffer(static_cast<size_t>(kMaxPacketSize))) {
   DCHECK(config.negotiated());
 
   // Non-null IP address needs to be passed here because QuicConnection uses
   // ToString() to format addresses for logging and ToString() is not allowed
   // for empty addresses.
   // TODO(sergeyu): Fix QuicConnection and remove SetSelfAddress() call below.
-  net::IPAddress ip(0, 0, 0, 0);
-  this->connection()->SetSelfAddress(net::IPEndPoint(ip, 0));
+  this->connection()->SetSelfAddress(IPEndPoint(IPAddress(0, 0, 0, 0), 0));
 }
 
 QuicP2PSession::~QuicP2PSession() {}
@@ -60,7 +59,7 @@
 }
 
 QuicP2PStream* QuicP2PSession::CreateOutgoingDynamicStream(
-    net::SpdyPriority priority) {
+    SpdyPriority priority) {
   QuicP2PStream* stream = new QuicP2PStream(GetNextOutgoingStreamId(), this);
   if (stream) {
     ActivateStream(stream);
@@ -82,7 +81,7 @@
 }
 
 void QuicP2PSession::DoReadLoop(int result) {
-  while (error() == net::QUIC_NO_ERROR) {
+  while (error() == QUIC_NO_ERROR) {
     switch (read_state_) {
       case READ_STATE_DO_READ:
         CHECK_EQ(result, OK);
@@ -106,7 +105,7 @@
   read_state_ = READ_STATE_DO_READ_COMPLETE;
 
   if (!socket_) {
-    return net::ERR_SOCKET_NOT_CONNECTED;
+    return ERR_SOCKET_NOT_CONNECTED;
   }
 
   return socket_->Read(
@@ -119,7 +118,7 @@
   read_state_ = READ_STATE_DO_READ;
 
   if (result <= 0) {
-    connection()->CloseConnection(net::QUIC_PACKET_READ_ERROR,
+    connection()->CloseConnection(QUIC_PACKET_READ_ERROR,
                                   ConnectionCloseSource::FROM_SELF);
     return result;
   }
diff --git a/net/quic/p2p/quic_p2p_session_test.cc b/net/quic/p2p/quic_p2p_session_test.cc
index 88dc76c..6df1dd1 100644
--- a/net/quic/p2p/quic_p2p_session_test.cc
+++ b/net/quic/p2p/quic_p2p_session_test.cc
@@ -198,7 +198,7 @@
   QuicP2PSessionTest()
       : quic_helper_(base::ThreadTaskRunnerHandle::Get().get(),
                      &quic_clock_,
-                     net::QuicRandom::GetInstance()) {
+                     QuicRandom::GetInstance()) {
     // Simulate out-of-bound config handshake.
     CryptoHandshakeMessage hello_message;
     config_.ToHandshakeMessage(&hello_message);
@@ -226,11 +226,10 @@
   scoped_ptr<QuicP2PSession> CreateP2PSession(scoped_ptr<Socket> socket,
                                               QuicP2PCryptoConfig crypto_config,
                                               Perspective perspective) {
-    net::QuicChromiumPacketWriter* writer =
-        new net::QuicChromiumPacketWriter(socket.get());
-    net::IPAddress ip(0, 0, 0, 0);
+    QuicChromiumPacketWriter* writer =
+        new QuicChromiumPacketWriter(socket.get());
     scoped_ptr<QuicConnection> quic_connection1(new QuicConnection(
-        0, net::IPEndPoint(ip, 0), &quic_helper_, writer,
+        0, IPEndPoint(IPAddress(0, 0, 0, 0), 0), &quic_helper_, writer,
         true /* owns_writer */, perspective, QuicSupportedVersions()));
     writer->SetConnection(quic_connection1.get());
 
@@ -272,10 +271,10 @@
 
   // Add streams to write_blocked_lists of both QuicSession objects.
   QuicWriteBlockedList* write_blocked_list1 =
-      net::test::QuicSessionPeer::GetWriteBlockedStreams(from_session);
+      test::QuicSessionPeer::GetWriteBlockedStreams(from_session);
   write_blocked_list1->RegisterStream(expected_stream_id, kV3HighestPriority);
   QuicWriteBlockedList* write_blocked_list2 =
-      net::test::QuicSessionPeer::GetWriteBlockedStreams(to_session);
+      test::QuicSessionPeer::GetWriteBlockedStreams(to_session);
   write_blocked_list2->RegisterStream(expected_stream_id, kV3HighestPriority);
 
   // Send a test message to the client.
@@ -329,7 +328,7 @@
 
   // The socket must be destroyed when connection is closed.
   EXPECT_TRUE(socket1_);
-  session1_->connection()->CloseConnection(net::QUIC_NO_ERROR,
+  session1_->connection()->CloseConnection(QUIC_NO_ERROR,
                                            ConnectionCloseSource::FROM_SELF);
   EXPECT_FALSE(socket1_);
 }
@@ -349,7 +348,7 @@
 
   // Add stream to write_blocked_list.
   QuicWriteBlockedList* write_blocked_list =
-      net::test::QuicSessionPeer::GetWriteBlockedStreams(session1_.get());
+      test::QuicSessionPeer::GetWriteBlockedStreams(session1_.get());
   write_blocked_list->RegisterStream(stream->id(), kV3HighestPriority);
 
   socket1_->SetWriteError(ERR_INTERNET_DISCONNECTED);
diff --git a/net/quic/quic_end_to_end_unittest.cc b/net/quic/quic_end_to_end_unittest.cc
index 10cfc97..eb4c4a39 100644
--- a/net/quic/quic_end_to_end_unittest.cc
+++ b/net/quic/quic_end_to_end_unittest.cc
@@ -121,7 +121,7 @@
     params_.http_auth_handler_factory = auth_handler_factory_.get();
     params_.http_server_properties = http_server_properties.GetWeakPtr();
 
-    net::CertVerifyResult verify_result;
+    CertVerifyResult verify_result;
     verify_result.verified_cert = ImportCertFromFile(
         GetTestCertsDirectory(), "quic_test.example.com.crt");
     cert_verifier_.AddResultForCertAndHost(verify_result.verified_cert.get(),
@@ -167,8 +167,7 @@
 
   // Starts the QUIC server listening on a random port.
   void StartServer() {
-    IPAddress ip(127, 0, 0, 1);
-    server_address_ = IPEndPoint(ip, 0);
+    server_address_ = IPEndPoint(IPAddress(127, 0, 0, 1), 0);
     server_config_.SetInitialStreamFlowControlWindowToSend(
         kInitialStreamFlowControlWindowForTest);
     server_config_.SetInitialSessionFlowControlWindowToSend(
diff --git a/net/tools/quic/end_to_end_test.cc b/net/tools/quic/end_to_end_test.cc
index 19ca2c0..ff07c60 100644
--- a/net/tools/quic/end_to_end_test.cc
+++ b/net/tools/quic/end_to_end_test.cc
@@ -1453,8 +1453,7 @@
 class WrongAddressWriter : public QuicPacketWriterWrapper {
  public:
   WrongAddressWriter() {
-    IPAddress ip(127, 0, 0, 2);
-    self_address_ = IPEndPoint(ip, 0);
+    self_address_ = IPEndPoint(IPAddress(127, 0, 0, 2), 0);
   }
 
   WriteResult WritePacket(const char* buffer,
diff --git a/net/tools/quic/quic_client.cc b/net/tools/quic/quic_client.cc
index 8c2c8e8..b8472d04 100644
--- a/net/tools/quic/quic_client.cc
+++ b/net/tools/quic/quic_client.cc
@@ -164,8 +164,7 @@
   if (bind_to_address_.size() != 0) {
     client_address = IPEndPoint(bind_to_address_, local_port_);
   } else if (address_family == AF_INET) {
-    IPAddress any4(0, 0, 0, 0);
-    client_address = IPEndPoint(any4, local_port_);
+    client_address = IPEndPoint(IPAddress(0, 0, 0, 0), local_port_);
   } else {
     IPAddress any6;
     CHECK(any6.AssignFromIPLiteral("::"));
diff --git a/net/tools/quic/quic_simple_client.cc b/net/tools/quic/quic_simple_client.cc
index 25bd93d..4c2b2216 100644
--- a/net/tools/quic/quic_simple_client.cc
+++ b/net/tools/quic/quic_simple_client.cc
@@ -107,8 +107,7 @@
   if (bind_to_address_.size() != 0) {
     client_address_ = IPEndPoint(bind_to_address_, local_port_);
   } else if (address_family == AF_INET) {
-    IPAddress any4(0, 0, 0, 0);
-    client_address_ = IPEndPoint(any4, local_port_);
+    client_address_ = IPEndPoint(IPAddress(0, 0, 0, 0), local_port_);
   } else {
     IPAddress any6;
     CHECK(any6.AssignFromIPLiteral("::"));
diff --git a/third_party/WebKit/LayoutTests/LeakExpectations b/third_party/WebKit/LayoutTests/LeakExpectations
index 27144f9..fdfdd6c2 100644
--- a/third_party/WebKit/LayoutTests/LeakExpectations
+++ b/third_party/WebKit/LayoutTests/LeakExpectations
@@ -68,11 +68,6 @@
 crbug.com/403363 http/tests/security/mixedContent/insecure-audio-video-in-main-frame.html [ Leak ]
 crbug.com/405125 media/media-controls-clone-crash.html [ Leak Pass ]
 
-# leaks in newly added web-platform tests
-crbug.com/413731 imported/web-platform-tests/shadow-dom/untriaged/elements-and-dom-objects/shadowroot-object/shadowroot-methods/test-004.html [ Leak Failure ]
-crbug.com/413731 imported/web-platform-tests/shadow-dom/untriaged/user-interaction/ranges-and-selections/test-001.html [ Leak Failure ]
-crbug.com/413731 imported/web-platform-tests/shadow-dom/untriaged/user-interaction/ranges-and-selections/test-002.html [ Leak Failure ]
-
 crbug.com/414163 [ Debug ] inspector/sources/debugger/promise-tracker.html [ Crash ]
 
 crbug.com/417752 storage/websql/sql-error-codes.html [ Pass Leak ]
diff --git a/third_party/WebKit/LayoutTests/Mac10_11_Expectations b/third_party/WebKit/LayoutTests/Mac10_11_Expectations
new file mode 100644
index 0000000..52e9766
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/Mac10_11_Expectations
@@ -0,0 +1,1093 @@
+# FIXME: crbug.com/589709 - This file should be emptied out while we are triaging
+# failures and deleted when it is empty and all of the failures have been either
+# fixed, rebaselined, or moved to their own dedicated bugs and merged into
+# TestExpectations
+
+crbug.com/589709 [ Mac10.11 Retina ] compositing/gestures/gesture-tapHighlight-pixel-rotated-div.html [ Missing ]
+crbug.com/589709 [ Mac10.11 Retina ] compositing/gestures/gesture-tapHighlight-pixel-rotated-link.html [ Missing ]
+crbug.com/589709 [ Mac10.11 Retina ] compositing/gestures/gesture-tapHighlight-pixel-transparent.html [ Missing ]
+crbug.com/589709 [ Mac10.11 Retina ] compositing/gestures/gesture-tapHighlight-with-box-shadow.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] compositing/gestures/gesture-tapHighlight-with-squashing.html [ Missing ]
+crbug.com/589709 [ Mac10.11 Retina ] compositing/layer-creation/compositing-reason-removed.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] compositing/lots-of-img-layers-with-opacity.html [ Timeout ]
+crbug.com/589709 [ Mac10.11 Retina ] compositing/lots-of-img-layers.html [ Timeout ]
+crbug.com/589709 [ Mac10.11 Retina ] compositing/overflow/do-not-paint-outline-into-composited-scrolling-contents.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] compositing/overflow/fixed-scroll-in-empty-root-layer.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] compositing/overflow/text-color-change.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] compositing/overflow/theme-affects-visual-overflow.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] compositing/overflow/update-widget-positions-on-nested-frames-and-scrollers.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] compositing/overflow/updating-scrolling-container-and-content.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] compositing/overflow/updating-scrolling-container.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] compositing/shadows/shadow-drawing.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] compositing/squashing/invalidate-when-leaving-squashed-layer.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] compositing/squashing/invalidation-for-subpixel-offset-of-squashed-layer.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] compositing/squashing/invalidations-with-large-negative-margin.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] compositing/squashing/repaint-overflow-scrolled-squashed-content.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] compositing/squashing/repaint-squashed-layer-in-rect.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] compositing/squashing/repaint-via-layout-offset.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] compositing/squashing/resize-squashing-layer-that-needs-full-repaint.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] compositing/squashing/squash-partial-repaint-inside-squashed-layer.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] compositing/squashing/squashing-inside-preserve-3d-element.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/basic/comments.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/basic/containment.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/basic/contextual_selectors.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/basic/grouping.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/basic/id_as_selector.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/basic/inheritance.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/box_properties/acid_test.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/box_properties/border.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/box_properties/border_bottom.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/box_properties/border_bottom_inline.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/box_properties/border_bottom_width.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/box_properties/border_bottom_width_inline.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/box_properties/border_color.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/box_properties/border_color_inline.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/box_properties/border_inline.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/box_properties/border_left.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/box_properties/border_left_inline.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/box_properties/border_left_width.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/box_properties/border_left_width_inline.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/box_properties/border_right.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/box_properties/border_right_inline.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/box_properties/border_right_width.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/box_properties/border_right_width_inline.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/box_properties/border_style.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/box_properties/border_style_inline.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/box_properties/border_top.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/box_properties/border_top_inline.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/box_properties/border_top_width.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/box_properties/border_top_width_inline.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/box_properties/border_width.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/box_properties/border_width_inline.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/box_properties/clear.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/box_properties/clear_float.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/box_properties/float.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/box_properties/float_elements_in_series.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/box_properties/float_margin.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/box_properties/height.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/box_properties/margin.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/box_properties/margin_bottom.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/box_properties/margin_bottom_inline.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/box_properties/margin_inline.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/box_properties/margin_left.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/box_properties/margin_left_inline.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/box_properties/margin_right.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/box_properties/margin_right_inline.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/box_properties/margin_top.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/box_properties/margin_top_inline.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/box_properties/padding.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/box_properties/padding_bottom.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/box_properties/padding_bottom_inline.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/box_properties/padding_inline.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/box_properties/padding_left.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/box_properties/padding_left_inline.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/box_properties/padding_right.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/box_properties/padding_right_inline.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/box_properties/padding_top.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/box_properties/padding_top_inline.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/box_properties/width.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/cascade/cascade_order.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/cascade/important.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/classification/display.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/classification/list_style.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/classification/list_style_image.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/classification/list_style_position.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/classification/list_style_type.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/classification/white_space.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/color_and_background/background.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/color_and_background/background_attachment.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/color_and_background/background_color.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/color_and_background/background_image.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/color_and_background/background_position.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/color_and_background/background_repeat.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/color_and_background/color.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/conformance/forward_compatible_parsing.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/font_properties/font_family.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/font_properties/font_size.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/font_properties/font_style.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/font_properties/font_variant.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/font_properties/font_weight.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/formatting_model/canvas.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/formatting_model/floating_elements.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/formatting_model/height_of_lines.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/formatting_model/inline_elements.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/formatting_model/replaced_elements.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/formatting_model/vertical_formatting.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/pseudo/anchor.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/pseudo/firstletter.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/pseudo/firstline.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/pseudo/multiple_pseudo_elements.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/pseudo/pseudo_elements_in_selectors.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/text_properties/letter_spacing.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/text_properties/line_height.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/text_properties/text_align.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/text_properties/text_decoration.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/text_properties/text_indent.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/text_properties/text_transform.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/text_properties/vertical_align.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/text_properties/word_spacing.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/units/color_units.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/units/length_units.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/units/percentage_units.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css1/units/urls.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css2.1/20110323/c543-txt-decor-000.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css2.1/t050803-c14-classes-00-e.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css2.1/t0509-c15-ids-01-e.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css2.1/t0602-c13-inh-underlin-00-e.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css2.1/t09-c5526c-display-00-e.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css2.1/t0905-c414-flt-wrap-01-d-g.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css2.1/t1503-c522-font-family-00-b.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css2.1/t1508-c527-font-06-b.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css3/flexbox/repaint-rtl-column.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css3/selectors3/html/css3-modsel-161.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css3/selectors3/html/css3-modsel-19b.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css3/selectors3/html/css3-modsel-23.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css3/selectors3/html/css3-modsel-24.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css3/selectors3/html/css3-modsel-25.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css3/selectors3/html/css3-modsel-64.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css3/selectors3/html/css3-modsel-68.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css3/selectors3/html/css3-modsel-69.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css3/selectors3/html/css3-modsel-70.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css3/selectors3/xhtml/css3-modsel-161.xml [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css3/selectors3/xhtml/css3-modsel-19b.xml [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css3/selectors3/xhtml/css3-modsel-23.xml [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css3/selectors3/xhtml/css3-modsel-24.xml [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css3/selectors3/xhtml/css3-modsel-25.xml [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css3/selectors3/xhtml/css3-modsel-64.xml [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css3/selectors3/xhtml/css3-modsel-68.xml [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css3/selectors3/xhtml/css3-modsel-69.xml [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css3/selectors3/xhtml/css3-modsel-70.xml [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css3/selectors3/xml/css3-modsel-161.xml [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css3/selectors3/xml/css3-modsel-19b.xml [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css3/selectors3/xml/css3-modsel-23.xml [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css3/selectors3/xml/css3-modsel-24.xml [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css3/selectors3/xml/css3-modsel-25.xml [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css3/selectors3/xml/css3-modsel-64.xml [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css3/selectors3/xml/css3-modsel-68.xml [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css3/selectors3/xml/css3-modsel-69.xml [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] css3/selectors3/xml/css3-modsel-70.xml [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] editing/deleting/5144139-2.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] editing/deleting/merge-whitespace-pre.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] editing/execCommand/format-block-with-trailing-br.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] editing/input/caret-at-the-edge-of-input.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] editing/input/ctrl-up-down.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] editing/input/linux_ltr_composition_underline.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] editing/input/linux_rtl_composition_underline.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] editing/input/reveal-caret-of-multiline-input.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] editing/inserting/4278698.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] editing/inserting/paragraph-separator-03.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] editing/pasteboard/4641033.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] editing/pasteboard/drop-text-without-selection.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] editing/pasteboard/innerText-inline-table.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] editing/pasteboard/pasting-tabs.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] editing/selection/3690703-2.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] editing/selection/3690703.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] editing/selection/3690719.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] editing/selection/4397952.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] editing/selection/4975120.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] editing/selection/5240265.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] editing/selection/caret-before-select.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] editing/selection/designmode-no-caret.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] editing/selection/extend-inside-transforms-backward.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] editing/selection/extend-inside-transforms-forward.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] editing/selection/linux_selection_color.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] editing/selection/move-by-word-visually-crash-test-5.html [ Timeout ]
+crbug.com/589709 [ Mac10.11 Retina ] editing/selection/readonly-disabled-text-selection.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] editing/selection/replaced-boundaries-3.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] editing/selection/select-across-readonly-input-1.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] editing/selection/select-across-readonly-input-2.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] editing/selection/select-across-readonly-input-3.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] editing/selection/select-across-readonly-input-4.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] editing/selection/select-across-readonly-input-5.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] editing/selection/select-box.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] editing/selection/select-element-paragraph-boundary.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] editing/selection/selection-button-text.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] editing/selection/triple-click-in-pre.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] editing/spelling/grammar-markers-hidpi.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] editing/spelling/grammar-markers.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] editing/spelling/inline-spelling-markers-hidpi-composited.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] editing/spelling/inline-spelling-markers-hidpi.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] editing/spelling/inline_spelling_markers.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] editing/spelling/input-type-text.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] editing/spelling/spelling-on-context-menu-key.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] editing/undo/redo-after-detach.html [ Timeout ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/backgrounds/background-inherit-color-bug.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/block/basic/011.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/block/basic/015.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/block/float/float-avoidance.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/block/float/shrink-to-avoid-float-complexity.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/block/margin-collapse/103.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/block/positioning/inline-block-relposition.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/canvas/alpha.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/canvas/canvas-imageSmoothingQuality-pixel.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/canvas/canvas-lost-gpu-context.html [ Missing ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/canvas/canvas-text-space-characters.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/css-generated-content/014.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/css/beforeSelectorOnCodeElement.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/css/color-correction-on-text-shadow.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/css/continuationCrash.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/css/device-aspect-ratio.html [ Timeout ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/css/empty-pseudo-class.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/css/first-child-pseudo-class.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/css/first-of-type-pseudo-class.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/css/font-face-data-uri-invalid.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/css/fontfaceset-download-error.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/css/hover-subselector.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/css/input-search-padding.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/css/last-child-pseudo-class.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/css/last-of-type-pseudo-class.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/css/line-height-font-order.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/css/line-height.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/css/margin-top-bottom-dynamic.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/css/non-standard-checkbox-size.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/css/only-child-pseudo-class.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/css/only-of-type-pseudo-class.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/css/outline-auto-empty-rects.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/css/shadow-multiple.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/css/text-overflow-input.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/css/universal-hover-quirk.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/css/word-space-extra.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/deprecated-flexbox/023.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/deprecated-flexbox/024.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/dom/HTMLInputElement/input-image-alt-text.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/dom/HTMLTableColElement/resize-table-using-col-width.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/dom/adopt-attribute-crash.svg [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/dom/row-inner-text.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/dynamic/008.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/dynamic/positioned-movement-with-positioned-children.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/dynamic/text-combine.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/encoding/denormalised-voiced-japanese-chars.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/events/autoscroll.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/events/context-no-deselect.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/events/iframe-object-onload.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/events/keyboard-scroll-by-page.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/events/menu-key-context-menu-document.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/events/menu-key-context-menu-position.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/events/menu-key-context-menu.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/events/mouse-cursor-no-mousemove.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/events/mouse-cursor-style-change-iframe.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/events/mouse-double-triple-click-should-not-select-next-node-for-user-select-none.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/events/mouse-down-on-pseudo-element-remove-crash.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/events/mouse-drag-from-frame-to-other-frame.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/events/mouse-drag-from-frame.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/events/mouse-event-buttons-attribute.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/events/mouse-relative-position.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/events/mouse-wheel-main-frame-scroll.html [ Timeout ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/events/panScroll-click-hyperlink.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/events/panScroll-click.html [ Timeout ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/events/panScroll-drag.html [ Timeout ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/events/panScroll-event-fired.html [ Timeout ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/events/panScroll-in-iframe.html [ Timeout ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/events/panScroll-nested-divs-forbidden.html [ Timeout ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/events/panScroll-nested-divs.html [ Timeout ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/files/file-in-input-display.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/001.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/basic-buttons.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/basic-inputs.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/blankbuttons.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/button-default-title.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/button-positioned.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/button-sizes.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/button-style-color.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/button-table-styles.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/button-text-transform.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/button/button-align.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/button/button-cannot-be-nested.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/button/button-reset-focus-by-mouse-then-keydown.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/button/button-white-space.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/calendar-picker/calendar-picker-appearance-ar.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/calendar-picker/calendar-picker-appearance-minimum-date.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/calendar-picker/calendar-picker-appearance-required-ar.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/calendar-picker/calendar-picker-appearance-required.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/calendar-picker/calendar-picker-appearance-ru.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/calendar-picker/calendar-picker-appearance-step.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/calendar-picker/calendar-picker-appearance-zoom125.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/calendar-picker/calendar-picker-appearance-zoom200.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/calendar-picker/calendar-picker-appearance.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/calendar-picker/date-open-picker-with-f4-key.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/calendar-picker/datetimelocal-open-picker-with-f4-key.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/calendar-picker/month-open-picker-with-f4-key.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/calendar-picker/month-picker-appearance-step.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/calendar-picker/month-picker-appearance.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/calendar-picker/week-open-picker-with-f4-key.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/calendar-picker/week-picker-appearance-step.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/calendar-picker/week-picker-appearance.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/color/color-suggestion-picker-appearance-zoom125.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/color/color-suggestion-picker-appearance-zoom200.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/color/color-suggestion-picker-appearance.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/color/color-suggestion-picker-one-row-appearance.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/color/color-suggestion-picker-two-row-appearance.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/color/color-suggestion-picker-with-scrollbar-appearance.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/control-clip-overflow.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/control-clip.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/control-restrict-line-height.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/date/date-appearance-basic.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/date/date-appearance-l10n.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/date/date-appearance-pseudo-elements.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/datetimelocal/datetimelocal-appearance-basic.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/datetimelocal/datetimelocal-appearance-l10n.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/file/file-input-direction.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/file/file-input-disabled.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/file/file-input-pressed-state.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/file/input-file-re-render.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/floating-textfield-relayout.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/form-element-geometry.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/formmove.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/formmove2.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/formmove3.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/image/002.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/image/005.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/indeterminate.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/input-align.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/input-appearance-height.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/input-button-sizes.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/input-first-letter.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/input-type-text-min-width.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/input-value.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/minWidthPercent.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/month/month-appearance-basic.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/month/month-appearance-l10n.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/month/month-appearance-pseudo-elements.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/number/number-appearance-rtl.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/number/number-appearance-spinbutton-disabled-readonly.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/number/number-appearance-spinbutton-layer.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/placeholder-position.html [ Timeout ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/plaintext-mode-2.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/search/disabled-search-input.html [ Timeout ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/search/search-abs-pos-cancel-button.html [ Timeout ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/search/search-appearance-basic.html [ Timeout ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/search/search-cancel-button-style-sharing.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/search/search-display-none-cancel-button.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/search/search-popup-crasher.html [ Timeout ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/search/search-results-attribute.html [ Timeout ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/search/search-rtl.html [ Timeout ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/search/search-transformed.html [ Timeout ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/search/search-vertical-alignment.html [ Timeout ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/search/search-zoomed.html [ Timeout ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/search/searchfield-heights.html [ Timeout ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/select-popup/popup-menu-appearance-empty.html [ Missing ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/select-popup/popup-menu-appearance-fractional-width.html [ Missing ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/select-popup/popup-menu-appearance-long.html [ Missing ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/select-popup/popup-menu-appearance-many.html [ Missing ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/select-popup/popup-menu-appearance-rtl.html [ Missing ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/select-popup/popup-menu-appearance-single-option.html [ Missing ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/select-popup/popup-menu-appearance-styled.html [ Missing ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/select-popup/popup-menu-appearance-tall.html [ Missing ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/select-popup/popup-menu-appearance-texttransform.html [ Missing ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/select-popup/popup-menu-appearance-transform.html [ Missing ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/select-popup/popup-menu-appearance-zoom.html [ Missing ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/select-popup/popup-menu-appearance-zoom090.html [ Missing ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/select-popup/popup-menu-appearance.html [ Missing ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/select-popup/popup-menu-ax.html [ Missing ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/select-popup/popup-menu-crash-on-cancel.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/select-popup/popup-menu-event-order.html [ Missing ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/select-popup/popup-menu-key-operations.html [ Missing ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/select-popup/popup-menu-mouse-operations.html [ Missing ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/select-popup/popup-menu-multiline-title.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/select-popup/popup-menu-nested-style.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/select-popup/popup-menu-non-latin-update-from-element.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/select-popup/popup-menu-open-partially-visible.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/select-popup/popup-menu-position.html [ Missing ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/select-popup/popup-menu-resize-after-open.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/select-popup/popup-menu-size.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/select-popup/popup-menu-touch-operations.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/select-popup/popup-menu-update-from-element.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/select/003.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/select/004.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/select/HTMLOptionElement_label01.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/select/HTMLOptionElement_label02.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/select/HTMLOptionElement_label03.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/select/HTMLOptionElement_label04.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/select/HTMLOptionElement_label05.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/select/basic-selects.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/select/disabled-select-change-index.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/select/hidden-listbox.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/select/listbox-appearance-basic.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/select/listbox-appearance-separator.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/select/listbox-bidi-align.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/select/listbox-scrollbar-incremental-load.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/select/listbox-width-change.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/select/listbox-with-display-none-option.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/select/menulist-appearance-basic.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/select/menulist-clip.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/select/menulist-deselect-update.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/select/menulist-no-overflow.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/select/menulist-onchange-fired-with-key-up-down.html [ Timeout ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/select/menulist-option-wrap.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/select/menulist-restrict-line-height.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/select/menulist-style-color.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/select/menulist-update-text-popup.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/select/menulist-width-change.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/select/optgroup-rendering.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/select/option-script.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/select/option-strip-whitespace.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/select/option-text-clip.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/select/popup-with-display-none-optgroup.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/select/select-align.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/select/select-autofilled.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/select/select-background-none.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/select/select-baseline.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/select/select-block-background.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/select/select-change-listbox-size.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/select/select-change-listbox-to-popup.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/select/select-change-popup-to-listbox.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/select/select-dirty-parent-pref-widths.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/select/select-disabled-appearance.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/select/select-empty-option-height.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/select/select-initial-position.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/select/select-item-background-clip.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/select/select-list-box-with-height.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/select/select-listbox-multiple-no-focusring.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/select/select-multiple-rtl.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/select/select-overflow-scroll-inherited.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/select/select-overflow-scroll.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/select/select-selected.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/select/select-size-invalid.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/select/select-style.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/select/select-writing-direction-natural.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/stuff-on-my-optgroup.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/submit/submit-appearance-basic.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/submit/submit-focus-by-mouse-then-keydown.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/suggestion-picker/date-suggestion-picker-appearance-rtl.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/suggestion-picker/date-suggestion-picker-appearance-with-scroll-bar.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/suggestion-picker/date-suggestion-picker-appearance-zoom125.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/suggestion-picker/date-suggestion-picker-appearance-zoom200.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/suggestion-picker/date-suggestion-picker-appearance.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/suggestion-picker/datetimelocal-suggestion-picker-appearance-locale-hebrew.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/suggestion-picker/datetimelocal-suggestion-picker-appearance-rtl.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/suggestion-picker/datetimelocal-suggestion-picker-appearance-with-scroll-bar.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/suggestion-picker/datetimelocal-suggestion-picker-appearance.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/suggestion-picker/month-suggestion-picker-appearance-rtl.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/suggestion-picker/month-suggestion-picker-appearance-with-scroll-bar.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/suggestion-picker/month-suggestion-picker-appearance.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/suggestion-picker/time-suggestion-picker-appearance-locale-hebrew.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/suggestion-picker/time-suggestion-picker-appearance-rtl.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/suggestion-picker/time-suggestion-picker-appearance-with-scroll-bar.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/suggestion-picker/time-suggestion-picker-appearance.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/suggestion-picker/week-suggestion-picker-appearance-rtl.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/suggestion-picker/week-suggestion-picker-appearance-with-scroll-bar.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/suggestion-picker/week-suggestion-picker-appearance.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/tabbing-input-iframe.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/targeted-frame-submission.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/text-style-color.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/text/input-appearance-bkcolor.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/text/input-appearance-default-bkcolor.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/text/input-appearance-disabled.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/text/input-appearance-focus.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/text/input-appearance-preventDefault.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/text/input-appearance-readonly.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/text/input-appearance-selection.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/text/input-appearance-visibility.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/text/input-appearance-width.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/text/input-baseline.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/text/input-disabled-color.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/text/input-double-click-selection-gap-bug.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/text/input-field-text-truncated.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/text/input-placeholder-paint-order.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/text/input-placeholder-visibility-1.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/text/input-placeholder-visibility-3.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/text/input-readonly-autoscroll.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/text/input-readonly-dimmed.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/text/input-spaces.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/text/input-table.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/text/input-text-double-click.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/text/input-text-drag-down.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/text/input-text-option-delete.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/text/input-text-scroll-left-on-blur.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/text/input-text-word-wrap.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/text/placeholder-pseudo-style.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/text/text-appearance-basic.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/text/text-font-height-mismatch.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/text/textfield-outline.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/text/textfield-overflow-by-value-update.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/textarea/basic-textareas-quirks.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/textarea/basic-textareas.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/textarea/linebox-overflow-in-textarea-padding.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/textarea/onselect-textarea.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/textarea/placeholder-appearance-textarea.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/textarea/reset-textarea.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/textarea/textAreaLineHeight.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/textarea/textarea-align.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/textarea/textarea-appearance-basic.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/textarea/textarea-newline.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/textarea/textarea-placeholder-paint-order.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/textarea/textarea-placeholder-pseudo-style.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/textarea/textarea-placeholder-visibility-1.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/textarea/textarea-placeholder-visibility-2.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/textarea/textarea-scroll-height.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/textarea/textarea-scrollbar.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/textarea/textarea-scrolled-focus-ring.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/textarea/textarea-scrolled-mask.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/textarea/textarea-scrolled-type.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/textarea/textarea-setinnerhtml.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/time/time-appearance-basic.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/time/time-appearance-pseudo-elements.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/week/week-appearance-basic.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/forms/week/week-appearance-pseudo-elements.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/frames/cached-frame-counter.html [ Timeout ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/frames/iframe-scrolling-attribute.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/harness/sample-fail-mismatch-reftest.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/html/details-replace-summary-child.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/html/details-replace-text.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/html/keygen.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/html/listing.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/images/12-55.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/images/182.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/images/2-dht.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/images/23-55.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/images/55.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/images/color-profile-background-clip-text.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/images/color-profile-munsell-adobe-to-srgb.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/images/color-profile-munsell-srgb-to-srgb.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/images/color-profile-svg-fill-text.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/images/huge-image-viewport-scale.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/images/image-click-scale-restore-zoomed-image.html [ Timeout ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/images/style-access-during-imageChanged-crash.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/inline/justify-emphasis-inline-box.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/inline/positionedLifetime.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/inline/vertical-align-with-fallback-fonts.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/invalid/014.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/invalid/019.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/lists/003-vertical.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/lists/003.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/lists/dynamic-marker-crash.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/loader/text-document-wrapping.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/multicol/multicol-with-child-renderLayer-for-input.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/overflow/005.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/overflow/007.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/overflow/clip-rects-fixed-ancestor.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/overflow/overflow-auto-table.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/overflow/overflow-x-y.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/overflow/scroll-nested-positioned-layer-in-overflow.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/overflow/scrollRevealButton.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/parser/001.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/parser/bad-xml-slash.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/parser/document-write-option.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/parser/entity-comment-in-textarea.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/parser/open-comment-in-textarea.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/parser/xml-colon-entity.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/parser/xml-declaration-missing-ending-mark.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/repaint/change-text-content-and-background-color.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/repaint/control-clip.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/repaint/multi-layout-one-frame.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/repaint/search-field-cancel.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/repaint/shadow-multiple.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/repaint/subtree-root-skipped.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/replaced/replaced-breaking-mixture.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/replaced/replaced-breaking.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/replaced/width100percent-button.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/replaced/width100percent-checkbox.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/replaced/width100percent-menulist.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/replaced/width100percent-radio.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/replaced/width100percent-searchfield.html [ Timeout ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/replaced/width100percent-textarea.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/replaced/width100percent-textfield.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/ruby/base-shorter-than-text.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/selectors/064.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/spatial-navigation/snav-multiple-select-focusring.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/table/018.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/table/append-cells2.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/table/border-collapsing/004-vertical.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/table/border-collapsing/004.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/table/invisible-cell-background.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/table/prepend-in-anonymous-table.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/table/remove-td-display-none.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/table/spanOverlapRepaint.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/table/text-field-baseline.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text-autosizing/display-type-change.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text-autosizing/hackernews-comments.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text-autosizing/layout-after-append.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text-autosizing/list-item-above-dbcat.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text-autosizing/tables/css-table-lots-of-text-many-cells.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text-autosizing/tables/css-table-single-cell-lots-of-text.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text-autosizing/tables/fixed-table-lots-of-text-many-cells.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text-autosizing/tables/fixed-table-single-cell-lots-of-text.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text-autosizing/tables/lots-of-text-many-cells.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text-autosizing/tables/narrow-percentage-width.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text-autosizing/tables/narrow-specified-width.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text-autosizing/tables/nested-table-wrapping.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text-autosizing/tables/nested-tables.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text-autosizing/tables/single-cell-lots-of-text.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text-autosizing/tables/single-percent-width-cell-lots-of-text.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text-autosizing/tables/table-cell-inflation.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text-autosizing/tables/table-for-layout.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text-autosizing/tables/wide-percentage-width.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text-autosizing/tables/wide-specified-width.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/aat-morx.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/apply-start-width-after-skipped-text.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/atsui-kerning-and-ligatures.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/atsui-multiple-renderers.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/atsui-partial-selection.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/atsui-pointtooffset-calls-cg.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/atsui-rtl-override-selection.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/atsui-small-caps-punctuation-size.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/atsui-spacing-features.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/basic/001.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/basic/002.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/basic/003.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/basic/004.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/basic/005.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/basic/006.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/basic/007.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/basic/008.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/basic/009.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/basic/011.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/basic/012.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/basic/013.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/basic/014.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/basic/015.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/basic/generic-family-changes.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/basic/generic-family-reset.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/bidi-embedding-pop-and-push-same.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/bidi-img-alt-text.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/break-word.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/capitalize-boundaries.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/capitalize-empty-generated-string.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/capitalize-preserve-nbsp.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/caps-lock-indicator-disabled.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/caps-lock-indicator-enabled.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/cg-fallback-bolding.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/cg-vs-atsui.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/chromium-linux-fontconfig-renderstyle.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/complex-path-with-no-subpixel-fonts.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/complex-preferred-logical-widths.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/complex-synthetic-bold-space-width.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/complex-text-rtl-selection-repaint.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/custom-font-data-crash.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/custom-font-data-crash2.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/decorations-with-text-combine.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/delete-hard-break-character.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/drawBidiText.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/ellipsis-platform-font-change.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/embed-at-end-of-pre-wrap-line.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/emoji-web-font.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/emoticons.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/emphasis-complex.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/emphasis-ellipsis-complextext.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/emphasis-vertical.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/emphasis.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/fake-italic.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/fallback-for-custom-font.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/firstline/001.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/firstline/002.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/firstline/003.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/fixed-pitch-control-characters.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/font-ascent-mac.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/font-cachekey.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/font-initial.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/font-kerning.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/font-size-adjust.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/font-smallcaps-layout.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/font-stretch-variant.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/font-stretch.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/font-variant-ligatures.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/font-weight-600.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/font-weight-variant.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/font-weight.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/format-control.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/glyph-reordering.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/in-rendered-text-rtl.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/international/001.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/international/002.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/international/003.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/international/alef-connected.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/international/arabic-vertical-offset.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/international/bidi-AN-after-L.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/international/bidi-AN-after-empty-run.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/international/bidi-CS-after-AN.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/international/bidi-L2-run-reordering.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/international/bidi-LDB-2-CSS.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/international/bidi-LDB-2-HTML.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/international/bidi-LDB-2-formatting-characters.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/international/bidi-control-chars-treated-as-ZWS.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/international/bidi-european-terminators.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/international/bidi-explicit-embedding.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/international/bidi-ignored-for-first-child-inline.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/international/bidi-innertext.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/international/bidi-layout-across-linebreak.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/international/bidi-linebreak-001.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/international/bidi-linebreak-002.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/international/bidi-linebreak-003.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/international/bidi-listbox-atsui.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/international/bidi-listbox.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/international/bidi-menulist.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/international/bidi-mirror-he-ar.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/international/bidi-neutral-directionality-paragraph-start.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/international/bidi-neutral-run.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/international/bidi-override.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/international/bidi-word-spacing-rtl.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/international/bold-bengali.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/international/complex-character-based-fallback.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/international/complex-joining-using-gpos.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/international/danda-space.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/international/draw-complex-text-from-to.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/international/hebrew-vowels.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/international/hindi-spacing.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/international/hindi-whitespace.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/international/khmer-selection.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/international/lang-glyph-cache-separation.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/international/menulist-width-rtl.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/international/mixed-directionality-selection.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/international/plane2.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/international/pop-up-button-text-alignment-and-direction.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/international/rtl-caret.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/international/rtl-negative-letter-spacing.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/international/rtl-white-space-pre-wrap.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/international/text-combine-image-test.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/international/text-spliced-font.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/international/thai-baht-space.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/international/thai-line-breaks.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/international/unicode-bidi-plaintext-in-textarea.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/international/unicode-bidi-plaintext.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/international/vertical-text-glyph-test.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/international/wrap-CJK-001.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/international/zerowidthjoiner.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/justified-selection-at-edge.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/justified-selection.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/justify-ideograph-complex.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/justify-ideograph-leading-expansion.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/justify-ideograph-simple.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/justify-padding-distribution.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/large-text-composed-char.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/letter-spacing-negative-opacity.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/line-breaks-after-white-space.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/line-breaks.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/line-initial-and-final-swashes.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/midword-break-after-breakable-char.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/midword-break-before-surrogate-pair.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/midword-break-hang.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/monospace-width-cache.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/orientation-sideways.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/reset-emptyRun.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/selection-hard-linebreak.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/selection-multiple-runs.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/selection-painted-separately.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/selection-painting-hidpi.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/selection-rect-line-height-too-big.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/selection-rect-line-height-too-small.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/shadow-no-blur.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/shadow-translucent-fill.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/shaping/same-script-different-lang.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/shaping/shaping-script-order.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/shaping/shaping-selection-rect.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/should-use-atsui.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/small-caps-turkish.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/soft-hyphen-2.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/soft-hyphen-3.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/softHyphen.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/stroking-decorations.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/stroking.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/sub-pixel/text-scaling-ltr.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/sub-pixel/text-scaling-pixel.html [ Missing ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/text-letter-spacing.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/text-shadow-no-default-color.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/text-stroke-with-border.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/textIteratorNilRenderer.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/trailing-white-space-2.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/trailing-white-space.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/unicode-fallback-font.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/updateNewFont.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/vertical-rl-rtl-linebreak.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/vertical-surrogate-pair.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/wbr-in-pre-crash.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/wbr-pre.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/wbr-styled.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/wbr.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/webfont-synthetic-bold.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/whitespace/001.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/whitespace/002.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/whitespace/003.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/whitespace/004.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/whitespace/005.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/whitespace/006.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/whitespace/007.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/whitespace/008.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/whitespace/009.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/whitespace/010.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/whitespace/011.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/whitespace/012.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/whitespace/013.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/whitespace/014.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/whitespace/015.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/whitespace/016.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/whitespace/017.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/whitespace/018.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/whitespace/019.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/whitespace/020.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/whitespace/021.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/whitespace/022.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/whitespace/023.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/whitespace/024.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/whitespace/025.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/whitespace/026.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/whitespace/027.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/whitespace/028.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/whitespace/029.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/whitespace/030.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/whitespace/nbsp-mode-and-linewraps.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/whitespace/normal-after-nowrap-breaking.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/whitespace/nowrap-clear-float.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/whitespace/pre-newline-box-test.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/whitespace/pre-wrap-last-char.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/whitespace/pre-wrap-line-test.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/whitespace/pre-wrap-overflow-selection.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/whitespace/pre-wrap-spaces-after-newline.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/whitespace/select-new-line-with-line-break-normal.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/whitespace/span-in-word-space-causes-overflow.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/whitespace/tab-character-basics.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/wide-zero-width-space.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/word-break-run-rounding.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/word-break-soft-hyphen.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/word-break.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/text/word-space.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/transforms/shadows.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/writing-mode/border-vertical-lr.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/writing-mode/english-lr-text.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/writing-mode/japanese-lr-selection.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/writing-mode/japanese-lr-text.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/writing-mode/japanese-rl-selection.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/writing-mode/japanese-rl-text.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/writing-mode/japanese-ruby-vertical-lr.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/writing-mode/japanese-ruby-vertical-rl.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/writing-mode/text-orientation-basic.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fast/writing-mode/vertical-baseline-alignment.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] fonts/monospace.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] harness-tests/mojo-helpers.html [ Timeout ]
+crbug.com/589709 [ Mac10.11 Retina ] http/tests/filesystem/input-display.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] http/tests/inspector/filesystem/async-callstack-filesystem.html [ Timeout ]
+crbug.com/589709 [ Mac10.11 Retina ] http/tests/misc/timer-vs-loading.html [ Timeout ]
+crbug.com/589709 [ Mac10.11 Retina ] http/tests/navigation/navigation-redirect-schedule-crash.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] http/tests/perf/large-inlined-script.html [ Timeout ]
+crbug.com/589709 [ Mac10.11 Retina ] http/tests/security/contentTypeOptions/nosniff-script-without-content-type-blocked.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] http/tests/webfont/font-display.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] http/tests/webfont/popup-menu-load-webfont-after-open.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] http/tests/websocket/invalid-subprotocol-characters.html [ Timeout ]
+crbug.com/589709 [ Mac10.11 Retina ] ietestcenter/css3/text/textshadow-001.htm [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] ietestcenter/css3/text/textshadow-002.htm [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] ietestcenter/css3/text/textshadow-003.htm [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] ietestcenter/css3/text/textshadow-004.htm [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] ietestcenter/css3/text/textshadow-010.htm [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] imported/csswg-test/css21/linebox/inline-formatting-context-023.xht [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] imported/csswg-test/css21/linebox/line-box-height-002.xht [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] imported/csswg-test/css21/linebox/line-height-126.xht [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] imported/csswg-test/css21/linebox/line-height-129.xht [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] imported/csswg-test/css21/linebox/vertical-align-117a.xht [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] imported/csswg-test/css21/linebox/vertical-align-118a.xht [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] imported/csswg-test/css21/linebox/vertical-align-baseline-003.xht [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] imported/csswg-test/css21/linebox/vertical-align-baseline-004a.xht [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] imported/csswg-test/css21/linebox/vertical-align-baseline-005a.xht [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] imported/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-009a.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] imported/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-009b.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] imported/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-009c.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] imported/web-platform-tests/html/obsolete/requirements-for-implementations/the-marquee-element-0/marquee-events.html [ Timeout ]
+crbug.com/589709 [ Mac10.11 Retina ] imported/web-platform-tests/html/rendering/replaced-elements/svg-embedded-sizing/svg-in-iframe-auto.html [ Timeout ]
+crbug.com/589709 [ Mac10.11 Retina ] imported/web-platform-tests/html/rendering/replaced-elements/svg-embedded-sizing/svg-in-iframe-percentage.html [ Timeout ]
+crbug.com/589709 [ Mac10.11 Retina ] imported/web-platform-tests/html/rendering/replaced-elements/svg-embedded-sizing/svg-in-object-auto.html [ Timeout ]
+crbug.com/589709 [ Mac10.11 Retina ] imported/web-platform-tests/html/rendering/replaced-elements/svg-embedded-sizing/svg-in-object-fixed.html [ Timeout ]
+crbug.com/589709 [ Mac10.11 Retina ] imported/web-platform-tests/html/rendering/replaced-elements/svg-embedded-sizing/svg-in-object-percentage.html [ Timeout ]
+crbug.com/589709 [ Mac10.11 Retina ] imported/web-platform-tests/html/semantics/embedded-content/media-elements/playing-the-media-resource/pause-remove-from-document-networkState.html [ Timeout ]
+crbug.com/589709 [ Mac10.11 Retina ] imported/web-platform-tests/html/syntax/parsing/html5lib_template.html [ Timeout ]
+crbug.com/589709 [ Mac10.11 Retina ] imported/web-platform-tests/html/syntax/parsing/html5lib_tests16.html [ Timeout ]
+crbug.com/589709 [ Mac10.11 Retina ] imported/web-platform-tests/webstorage/storage_local_setitem_quotaexceedederr.html [ Timeout ]
+crbug.com/589709 [ Mac10.11 Retina ] inspector-protocol/heap-profiler/heap-samples-in-snapshot.html [ Timeout ]
+crbug.com/589709 [ Mac10.11 Retina ] inspector-protocol/layout-fonts/ogham.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] inspector-protocol/layout-fonts/tifinagh.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] inspector-protocol/layout-fonts/unicode-range-combining-chars-fallback.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] inspector/screen-orientation-override.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] inspector/sources/debugger-breakpoints/debugger-reload-breakpoints-with-source-maps.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] inspector/sources/debugger/debugger-completions-on-call-frame.html [ Timeout ]
+crbug.com/589709 [ Mac10.11 Retina ] inspector/tracing/compile-script.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] jquery/event.html [ Timeout ]
+crbug.com/589709 [ Mac10.11 Retina ] jquery/manipulation.html [ Timeout ]
+crbug.com/589709 [ Mac10.11 Retina ] media/controls-cast-do-not-fade-out.html [ Timeout ]
+crbug.com/589709 [ Mac10.11 Retina ] media/stable/video-object-fit-stable.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] media/track/track-cue-rendering-vertical.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] paint/theme/search-field-results-decoration-crash.html [ Timeout ]
+crbug.com/589709 [ Mac10.11 Retina ] plugins/embed-attributes-style.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] plugins/mouse-click-plugin-clears-selection.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] printing/webgl-oversized-printing.html [ Timeout ]
+crbug.com/589709 [ Mac10.11 Retina ] scrollbars/custom-scrollbar-with-incomplete-style.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] svg/W3C-SVG-1.1/text-align-08-b.svg [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] svg/W3C-SVG-1.1/text-fonts-01-t.svg [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] svg/as-border-image/svg-as-border-image.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] svg/as-object/embedded-svg-immediate-offsetWidth-query.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] svg/as-object/embedded-svg-size-changes.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] svg/as-object/nested-embedded-svg-size-changes.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] svg/batik/text/xmlSpace.svg [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] svg/css/text-gradient-shadow.svg [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] svg/css/text-shadow-multiple.xhtml [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] svg/custom/dominant-baseline-hanging.svg [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] svg/custom/getscreenctm-in-mixed-content.xhtml [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] svg/custom/inline-svg-in-xhtml.xml [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] svg/custom/object-sizing.xhtml [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] svg/custom/rootmost-svg-xy-attrs.xhtml [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] svg/custom/use-detach.svg [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] svg/dom/SVGLengthList-appendItem.xhtml [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] svg/dom/SVGLengthList-getItem.xhtml [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] svg/dom/SVGLengthList-initialize.xhtml [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] svg/dom/SVGLengthList-insertItemBefore.xhtml [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] svg/dom/SVGLengthList-removeItem.xhtml [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] svg/dom/SVGLengthList-replaceItem.xhtml [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] svg/dom/SVGLengthList-xml-dom-modifications.xhtml [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] svg/dom/SVGLocatable-getCTM-svg-root.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] svg/dom/SVGStringList-basics.xhtml [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] svg/dom/css-transforms.xhtml [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] svg/hixie/mixed/003.xml [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] svg/text/small-fonts-2.svg [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] svg/text/text-selection-fonts-01-t.svg [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] svg/text/text-with-geometric-precision.svg [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla/bugs/45621.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla/bugs/bug10269-2.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla/bugs/bug10296-1.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla/bugs/bug1055-1.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla/bugs/bug1188.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla/bugs/bug13105.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla/bugs/bug13118.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla/bugs/bug1318.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla/bugs/bug138725.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla/bugs/bug139524-2.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla/bugs/bug157890.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla/bugs/bug18359.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla/bugs/bug194024.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla/bugs/bug20579.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla/bugs/bug22019.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla/bugs/bug23235.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla/bugs/bug2479-2.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla/bugs/bug2479-3.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla/bugs/bug2479-4.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla/bugs/bug26178.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla/bugs/bug28928.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla/bugs/bug29326.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla/bugs/bug30559.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla/bugs/bug30692.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla/bugs/bug33855.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla/bugs/bug39209.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla/bugs/bug4382.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla/bugs/bug4429.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla/bugs/bug44505.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla/bugs/bug4527.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla/bugs/bug46368-1.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla/bugs/bug46368-2.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla/bugs/bug51037.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla/bugs/bug51727.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla/bugs/bug52505.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla/bugs/bug52506.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla/bugs/bug59354.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla/bugs/bug60749.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla/bugs/bug68912.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla/bugs/bug7112-1.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla/bugs/bug7112-2.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla/bugs/bug7121-1.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla/bugs/bug7342.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla/bugs/bug83786.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla/bugs/bug8950.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla/bugs/bug96334.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla/collapsing_borders/bug41262-3.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla/collapsing_borders/bug41262-4.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla/core/margins.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla/dom/tableDom.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla/marvin/backgr_index.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla/marvin/backgr_layers-opacity.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla/marvin/backgr_position-table.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla/marvin/backgr_simple-table-cell.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla/marvin/backgr_simple-table-column-group.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla/marvin/backgr_simple-table-column.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla/marvin/backgr_simple-table-row-group.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla/marvin/backgr_simple-table-row.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla/marvin/backgr_simple-table.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla/other/move_row.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla/other/test6.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla_expected_failures/bugs/bug1055-2.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla_expected_failures/bugs/bug1128.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla_expected_failures/bugs/bug1725.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla_expected_failures/bugs/bug21518.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla_expected_failures/bugs/bug22122.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla_expected_failures/bugs/bug2479-5.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla_expected_failures/bugs/bug58402-2.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla_expected_failures/collapsing_borders/bug41262-5.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla_expected_failures/collapsing_borders/bug41262-6.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla_expected_failures/marvin/backgr_border-table-cell.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla_expected_failures/marvin/backgr_border-table-column-group.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla_expected_failures/marvin/backgr_border-table-column.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla_expected_failures/marvin/backgr_border-table-quirks.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla_expected_failures/marvin/backgr_border-table-row-group.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla_expected_failures/marvin/backgr_border-table-row.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla_expected_failures/marvin/backgr_border-table.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla_expected_failures/marvin/backgr_fixed-bg.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla_expected_failures/marvin/backgr_layers-hide.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla_expected_failures/marvin/backgr_layers-show.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla_expected_failures/marvin/backgr_position-table-cell.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla_expected_failures/marvin/backgr_position-table-column-group.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla_expected_failures/marvin/backgr_position-table-column.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla_expected_failures/marvin/backgr_position-table-row-group.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] tables/mozilla_expected_failures/marvin/backgr_position-table-row.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] transforms/2d/zoom-menulist.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] virtual/android/fullscreen/compositor-touch-hit-rects-fullscreen-video-controls.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] virtual/android/fullscreen/full-screen-iframe-allowed-video.html [ Missing ]
+crbug.com/589709 [ Mac10.11 Retina ] virtual/android/fullscreen/video-controls-timeline.html [ Missing ]
+crbug.com/589709 [ Mac10.11 Retina ] virtual/android/fullscreen/video-fail-to-enter-full-screen.html [ Missing ]
+crbug.com/589709 [ Mac10.11 Retina ] virtual/android/fullscreen/video-scrolled-iframe.html [ Missing ]
+crbug.com/589709 [ Mac10.11 Retina ] virtual/android/fullscreen/video-specified-size.html [ Missing ]
+crbug.com/589709 [ Mac10.11 Retina ] virtual/display_list_2d_canvas/fast/canvas/alpha.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] virtual/display_list_2d_canvas/fast/canvas/canvas-imageSmoothingQuality-pixel.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] virtual/display_list_2d_canvas/fast/canvas/canvas-text-space-characters.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] virtual/gpu/fast/canvas/alpha.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] virtual/gpu/fast/canvas/canvas-blend-image.html [ Timeout ]
+crbug.com/589709 [ Mac10.11 Retina ] virtual/gpu/fast/canvas/canvas-blend-solid.html [ Timeout ]
+crbug.com/589709 [ Mac10.11 Retina ] virtual/gpu/fast/canvas/canvas-text-space-characters.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] virtual/pointerevent/fast/events/autoscroll.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] virtual/pointerevent/fast/events/context-no-deselect.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] virtual/pointerevent/fast/events/iframe-object-onload.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] virtual/pointerevent/fast/events/keyboard-scroll-by-page.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] virtual/pointerevent/fast/events/menu-key-context-menu-document.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] virtual/pointerevent/fast/events/menu-key-context-menu-position.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] virtual/pointerevent/fast/events/menu-key-context-menu.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] virtual/pointerevent/fast/events/mouse-cursor-no-mousemove.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] virtual/pointerevent/fast/events/mouse-cursor-style-change-iframe.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] virtual/pointerevent/fast/events/mouse-double-triple-click-should-not-select-next-node-for-user-select-none.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] virtual/pointerevent/fast/events/mouse-down-on-pseudo-element-remove-crash.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] virtual/pointerevent/fast/events/mouse-drag-from-frame-to-other-frame.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] virtual/pointerevent/fast/events/mouse-drag-from-frame.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] virtual/pointerevent/fast/events/mouse-event-buttons-attribute.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] virtual/pointerevent/fast/events/mouse-relative-position.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] virtual/pointerevent/fast/events/mouse-wheel-main-frame-scroll.html [ Timeout ]
+crbug.com/589709 [ Mac10.11 Retina ] virtual/pointerevent/fast/events/panScroll-click-hyperlink.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] virtual/pointerevent/fast/events/panScroll-click.html [ Timeout ]
+crbug.com/589709 [ Mac10.11 Retina ] virtual/pointerevent/fast/events/panScroll-drag.html [ Timeout ]
+crbug.com/589709 [ Mac10.11 Retina ] virtual/pointerevent/fast/events/panScroll-event-fired.html [ Timeout ]
+crbug.com/589709 [ Mac10.11 Retina ] virtual/pointerevent/fast/events/panScroll-in-iframe.html [ Timeout ]
+crbug.com/589709 [ Mac10.11 Retina ] virtual/pointerevent/fast/events/panScroll-nested-divs-forbidden.html [ Timeout ]
+crbug.com/589709 [ Mac10.11 Retina ] virtual/pointerevent/fast/events/panScroll-nested-divs.html [ Timeout ]
+crbug.com/589709 [ Mac10.11 Retina ] virtual/prefer_compositing_to_lcd_text/compositing/overflow/do-not-paint-outline-into-composited-scrolling-contents.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] virtual/prefer_compositing_to_lcd_text/compositing/overflow/theme-affects-visual-overflow.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] virtual/prefer_compositing_to_lcd_text/compositing/overflow/update-widget-positions-on-nested-frames-and-scrollers.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] virtual/prefer_compositing_to_lcd_text/scrollbars/custom-scrollbar-with-incomplete-style.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] virtual/rootlayerscrolls/scrollbars/custom-scrollbar-with-incomplete-style.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] virtual/smoothscrolling/fast/events/touch/gesture/gesture-tap-frame-scrolled.html [ Timeout ]
+crbug.com/589709 [ Mac10.11 Retina ] virtual/threaded/fast/idle-callback/idle_periods.html [ Timeout ]
+crbug.com/589709 [ Mac10.11 Retina ] virtual/threaded/fast/scroll-behavior/smooth-scroll/keyboard-scroll.html [ Timeout ]
+crbug.com/589709 [ Mac10.11 Retina ] virtual/threaded/printing/setPrinting.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] virtual/threaded/printing/width-overflow.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] virtual/trustedeventsdefaultaction/fast/events/autoscroll.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] virtual/trustedeventsdefaultaction/fast/events/context-no-deselect.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] virtual/trustedeventsdefaultaction/fast/events/iframe-object-onload.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] virtual/trustedeventsdefaultaction/fast/events/keyboard-scroll-by-page.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] virtual/trustedeventsdefaultaction/fast/events/menu-key-context-menu-document.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] virtual/trustedeventsdefaultaction/fast/events/menu-key-context-menu-position.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] virtual/trustedeventsdefaultaction/fast/events/menu-key-context-menu.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] virtual/trustedeventsdefaultaction/fast/events/mouse-cursor-no-mousemove.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] virtual/trustedeventsdefaultaction/fast/events/mouse-cursor-style-change-iframe.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] virtual/trustedeventsdefaultaction/fast/events/mouse-double-triple-click-should-not-select-next-node-for-user-select-none.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] virtual/trustedeventsdefaultaction/fast/events/mouse-down-on-pseudo-element-remove-crash.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] virtual/trustedeventsdefaultaction/fast/events/mouse-drag-from-frame-to-other-frame.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] virtual/trustedeventsdefaultaction/fast/events/mouse-drag-from-frame.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] virtual/trustedeventsdefaultaction/fast/events/mouse-event-buttons-attribute.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] virtual/trustedeventsdefaultaction/fast/events/mouse-relative-position.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] virtual/trustedeventsdefaultaction/fast/events/mouse-wheel-main-frame-scroll.html [ Timeout ]
+crbug.com/589709 [ Mac10.11 Retina ] virtual/trustedeventsdefaultaction/fast/events/panScroll-click-hyperlink.html [ Failure ]
+crbug.com/589709 [ Mac10.11 Retina ] virtual/trustedeventsdefaultaction/fast/events/panScroll-click.html [ Timeout ]
+crbug.com/589709 [ Mac10.11 Retina ] virtual/trustedeventsdefaultaction/fast/events/panScroll-drag.html [ Timeout ]
+crbug.com/589709 [ Mac10.11 Retina ] virtual/trustedeventsdefaultaction/fast/events/panScroll-event-fired.html [ Timeout ]
+crbug.com/589709 [ Mac10.11 Retina ] virtual/trustedeventsdefaultaction/fast/events/panScroll-in-iframe.html [ Timeout ]
+crbug.com/589709 [ Mac10.11 Retina ] virtual/trustedeventsdefaultaction/fast/events/panScroll-nested-divs-forbidden.html [ Timeout ]
+crbug.com/589709 [ Mac10.11 Retina ] virtual/trustedeventsdefaultaction/fast/events/panScroll-nested-divs.html [ Timeout ]
diff --git a/third_party/WebKit/LayoutTests/NeverFixTests b/third_party/WebKit/LayoutTests/NeverFixTests
index dba1aaa..a9504b7 100644
--- a/third_party/WebKit/LayoutTests/NeverFixTests
+++ b/third_party/WebKit/LayoutTests/NeverFixTests
@@ -36,10 +36,7 @@
 [ Linux Win ] virtual/trustedeventsdefaultaction/fast/events/option-tab.html [ WontFix ]
 
 # This test only applies to overlay scrollbar platforms.
-[ SnowLeopard Win Linux ] fast/dom/partial-layout-overlay-scrollbars.html [ WontFix ]
-
-# These tests are only valid on platforms with overlay scrollbars support.
-[ SnowLeopard ] inspector-protocol/emulation [ WontFix ]
+[ Win Linux ] fast/dom/partial-layout-overlay-scrollbars.html [ WontFix ]
 
 # Mac's popup behavior is different.
 [ Mac ] fast/forms/select/menulist-onchange-fired-with-key-up-down.html [ WontFix ]
@@ -133,17 +130,6 @@
 # Missing Chrome Mac support, will start working when we move to harfbuzz on mac.
 [ Mac ] fast/text/international/zerowidthjoiner.html [ WontFix ]
 
-# Hits an assert on Snow-leopard Debug but not on any other platforms.
-[ Snowleopard Debug ] inspector/sources/debugger-async/async-callstack-mutation-observer.html [ WontFix ]
-[ Snowleopard Debug ] inspector/sources/debugger-async/async-callstack.html [ WontFix ]
-[ Snowleopard Debug ] inspector/sources/debugger-async/async-callstack-scopes.html [ WontFix ]
-[ Snowleopard Debug ] inspector/console/console-format.html [ WontFix ]
-[ Snowleopard Debug ] inspector/elements/styles-2/pseudo-elements.html [ WontFix ]
-[ Snowleopard Debug ] inspector/sources/debugger-breakpoints/dom-breakpoints.html [ WontFix ]
-[ Snowleopard Debug ] inspector/sources/debugger-breakpoints/event-listener-breakpoints.html [ WontFix ]
-[ SnowLeopard Debug ] fast/text/trailing_whitespace_wrapping.html [ WontFix ]
-
-
 # Subpixel font scaling requires antialiasing on mac (which isn't enabled tests).
 [ Mac ] fast/text/sub-pixel/text-scaling-ltr.html [ WontFix ]
 [ Mac ] fast/text/sub-pixel/text-scaling-pixel.html [ WontFix ]
@@ -152,13 +138,6 @@
 [ Mac ] fast/text/sub-pixel/text-scaling-webfont.html [ WontFix ]
 [ Mac ] fast/text/mixed-direction-bidi-wrap.html [ WontFix ]
 
-# Mac 10.6 only due to slight changes in text rendering
-[ SnowLeopard ] fast/text/international/text-shaping-arabic.html [ WontFix ]
-
-# Mac 10.6 debug only, and the tests are very artificial to test orientation of all code points.
-[ SnowLeopard Debug ] imported/csswg-test/css-writing-modes-3/text-orientation-script-001k.html [ WontFix ]
-[ SnowLeopard Debug ] imported/csswg-test/css-writing-modes-3/text-orientation-script-001m.html [ WontFix ]
-
 # These two printing tests fail with the threaded compositor but they
 # aren't critical to run in this mode.
 virtual/threaded/printing/setPrinting.html [ WontFix ]
@@ -205,8 +184,7 @@
 
 # On Linux bold emoji are already supported.
 crbug.com/551843 [ Linux ] fast/text/fallback-traits-fixup.html [ WontFix ]
-# Max 10.6 did not have any emoji support.
-crbug.com/551843 [ Linux Win Mac10.6 ] fast/text/emoji-font-weight-mac.html [ WontFix ]
+crbug.com/551843 [ Linux Win ] fast/text/emoji-font-weight-mac.html [ WontFix ]
 
 # These tests are too slow with our MESA backend.  We can re-enable when we have
 # bots running tests on real hardware. Don't want to just delete these because they
diff --git a/third_party/WebKit/LayoutTests/SlowTests b/third_party/WebKit/LayoutTests/SlowTests
index 8fe0f7a..1f85299 100644
--- a/third_party/WebKit/LayoutTests/SlowTests
+++ b/third_party/WebKit/LayoutTests/SlowTests
@@ -79,7 +79,6 @@
 crbug.com/451577 [ Debug ] fast/dom/gc-treescope.html  [ Slow ]
 crbug.com/451577 [ Debug ] fast/frames/calculate-round.html [ Slow ]
 crbug.com/451577 imported/web-platform-tests/IndexedDB/idbindex-multientry-big.htm [ Slow ]
-crbug.com/451577 [ Mac10.7 Mac10.8 ] inspector/elements/user-properties.html [ Slow ]
 crbug.com/451577 [ Mac ] inspector/extensions/extensions-reload.html [ Slow ]
 crbug.com/451577 [ Mac ] inspector/extensions/extensions-resources.html [ Slow ]
 crbug.com/451577 [ Win10 ] inspector/extensions/extensions-sidebar.html [ Slow ]
diff --git a/third_party/WebKit/LayoutTests/TestExpectations b/third_party/WebKit/LayoutTests/TestExpectations
index 0129779..0917ed6 100644
--- a/third_party/WebKit/LayoutTests/TestExpectations
+++ b/third_party/WebKit/LayoutTests/TestExpectations
@@ -102,8 +102,8 @@
 crbug.com/527242 virtual/spv2/paint/invalidation/spv2/cached-change-table-border-width.html [ Failure ]
 crbug.com/527242 virtual/spv2/paint/invalidation/spv2/cached-change-tbody-border-width.html [ Failure ]
 
-crbug.com/537172 [ Mac10.6 Win10 ] virtual/spv2/paint/invalidation/spv2/background-image-paint-invalidation.html [ Failure ]
-crbug.com/564443 [ Mac10.7 Mac10.8 Mac10.9 Mac10.10 Win7 Linux ] virtual/spv2/paint/invalidation/spv2/background-image-paint-invalidation.html [ Failure Pass ]
+crbug.com/537172 [ Win10 ] virtual/spv2/paint/invalidation/spv2/background-image-paint-invalidation.html [ Failure ]
+crbug.com/564443 [ Mac10.9 Mac10.10 Win7 Linux ] virtual/spv2/paint/invalidation/spv2/background-image-paint-invalidation.html [ Failure Pass ]
 
 crbug.com/504613 crbug.com/524248 paint/images/image-backgrounds-not-antialiased.html [ Skip ]
 crbug.com/504613 crbug.com/524248 virtual/spv2/paint/images/image-backgrounds-not-antialiased.html [ Skip ]
@@ -127,7 +127,6 @@
 crbug.com/492664 [ Mac ] imported/csswg-test/css-writing-modes-3/bidi-isolate-002.html [ Failure ]
 crbug.com/492664 [ Win ] imported/csswg-test/css-writing-modes-3/bidi-override-005.html [ Failure ]
 crbug.com/492664 [ Win ] imported/csswg-test/css-writing-modes-3/bidi-plaintext-001.html [ Failure ]
-crbug.com/418091 [ Mac10.6 ] fast/text/aat-morx.html [ Failure ]
 crbug.com/463358 crbug.com/581963 [ Linux Mac Debug ] svg/transforms/text-with-pattern-inside-transformed-html.xhtml [ Failure ]
 crbug.com/463358 [ Mac Linux Debug ] fast/backgrounds/transformed-body-html-background.html [ Failure ]
 crbug.com/463358 [ Mac Linux Debug ] css3/masking/clip-path-polygon-nonzero.html [ Failure ]
@@ -180,7 +179,6 @@
 crbug.com/520184 http/tests/history/frameset-repeated-name.html [ Failure Pass ]
 crbug.com/520187 [ Linux Win ] http/tests/loading/bad-scheme-subframe.html [ Failure Pass ]
 crbug.com/520188 [ Win ] http/tests/local/fileapi/file-last-modified-after-delete.html [ Failure Pass ]
-crbug.com/520189 [ Mac10.6 ] http/tests/misc/submit-post-keygen.html [ Pass Timeout ]
 crbug.com/520190 http/tests/navigatorconnect/postmessage-cross-origin.html [ Pass Timeout ]
 crbug.com/520191 http/tests/security/mixedContent/strict-mode-via-pref-image-blocked.https.html [ Failure Pass ]
 crbug.com/520611 [ Debug ] fast/filesystem/workers/file-writer-events-shared-worker.html [ Failure Pass ]
@@ -310,9 +308,8 @@
 crbug.com/498539 inspector/tracing/timeline-time.html [ Pass Failure Timeout ]
 crbug.com/498539 inspector/tracing/timeline-timer.html [ Pass Failure ]
 crbug.com/498539 inspector/elements/styles-3/styles-change-node-while-editing.html [ Failure Pass ]
-crbug.com/498539 [ Mac10.7 ] inspector/sources/debugger/js-with-inline-stylesheets.html [ Pass Timeout ]
-crbug.com/498539 [ Mac10.7 Mac10.8 Retina Mac10.9 Mac10.10 Mac10.6 ] inspector/sources/debugger/live-edit-no-reveal.html [ Crash Pass Timeout ]
-crbug.com/498539 [ Mac10.8 Mac10.10 ] inspector/sources/debugger/debug-inlined-scripts-fragment-id.html [ Pass Timeout ]
+crbug.com/498539 [ Mac ] inspector/sources/debugger/live-edit-no-reveal.html [ Crash Pass Timeout ]
+crbug.com/498539 [ Mac10.10 ] inspector/sources/debugger/debug-inlined-scripts-fragment-id.html [ Pass Timeout ]
 crbug.com/498539 [ Precise ] inspector/sources/debugger-step/debugger-step-over-inlined-scripts.html [ Pass Timeout ]
 crbug.com/498539 [ Precise Win7 Mac10.10 ] inspector/sources/debugger-breakpoints/dynamic-scripts-breakpoints.html [ Pass Timeout ]
 crbug.com/498539 [ Precise Mac10.10 ] inspector/sources/debugger-breakpoints/set-breakpoint.html [ Pass Timeout ]
@@ -330,7 +327,7 @@
 crbug.com/498539 [ Linux32 ] inspector/console/console-log-linkify-stack-in-errors.html [ Failure Pass ]
 crbug.com/498539 [ Linux32 Win7 ] inspector/console/console-log-short-hand-method.html [ Failure Pass ]
 crbug.com/498539 [ Mac10.9 ] inspector/console/console-uncaught-exception.html [ Failure Pass ]
-crbug.com/498539 [ Mac10.8 Win7 ] inspector/console/console-log-wrapped-in-framework.html [ Failure Pass ]
+crbug.com/498539 [ Win7 ] inspector/console/console-log-wrapped-in-framework.html [ Failure Pass ]
 crbug.com/498539 [ Precise Linux32 ] inspector/console/console-filter-level-test.html [ Failure Pass ]
 crbug.com/498539 [ Win7 ] inspector/console/console-command-clear.html [ Failure Pass ]
 crbug.com/498539 [ Win7 ] inspector/console/console-custom-formatters.html [ Failure Pass ]
@@ -344,11 +341,9 @@
 crbug.com/498539 [ Win7 ] inspector/console/console-trace-arguments.html [ Failure Pass ]
 crbug.com/498539 [ Win7 ] inspector/console/console-trace-in-eval.html [ Failure Pass ]
 crbug.com/498539 [ Retina ] http/tests/inspector/search/sources-search-scope.html [ Failure Pass ]
-crbug.com/498539 [ Mac10.7 ] inspector-protocol/heap-profiler/heap-snapshot-with-event-listener.html [ Pass Timeout ]
-crbug.com/498539 [ Precise Mac10.7 Win7 ] inspector-protocol/cpu-profiler/record-cpu-profile.html [ Crash Pass ]
-crbug.com/498539 [ Precise Mac10.7 Win7 Mac10.6 ] inspector/agents-enable-disable.html [ Crash Pass ]
-crbug.com/498539 [ Precise Win7 Mac10.6 ] inspector/elements/styles-1/edit-inspector-stylesheet.html [ Failure Pass Timeout ]
-crbug.com/498539 [ Mac10.6 ] http/tests/inspector/extensions-network-redirect.html [ Crash Pass ]
+crbug.com/498539 [ Precise Win7 ] inspector-protocol/cpu-profiler/record-cpu-profile.html [ Crash Pass ]
+crbug.com/498539 [ Precise Win7 ] inspector/agents-enable-disable.html [ Crash Pass ]
+crbug.com/498539 [ Precise Win7 ] inspector/elements/styles-1/edit-inspector-stylesheet.html [ Failure Pass Timeout ]
 crbug.com/498539 crbug.com/410145 [ Release ] inspector-protocol/heap-profiler/heap-objects-tracking.html [ Crash Pass ]
 crbug.com/498539 [ Win7 Release ] inspector/elements/styles-2/perform-undo-perform-of-mergable-action.html [ Failure Pass ]
 crbug.com/498539 [ Win7 ] inspector/elements/styles-3/selector-list.html [ Failure Pass ]
@@ -487,7 +482,7 @@
 crbug.com/505364 imported/web-platform-tests/shadow-dom/untriaged/styles/css-variables/test-001.html [ Failure ]
 crbug.com/505364 imported/web-platform-tests/shadow-dom/untriaged/styles/test-003.html [ Failure ]
 crbug.com/505364 imported/web-platform-tests/shadow-dom/untriaged/styles/test-010.html [ Failure Crash ]
-crbug.com/505364 imported/web-platform-tests/shadow-dom/untriaged/user-interaction/ranges-and-selections/test-002.html [ Failure Crash ]
+crbug.com/413731 imported/web-platform-tests/shadow-dom/untriaged/user-interaction/ranges-and-selections/test-002.html [ Failure Crash ]
 
 crbug.com/552532 [ Win10 ] fast/replaced/no-focus-ring-embed.html [ Pass Crash ]
 crbug.com/552532 [ Win10 ] fast/replaced/no-focus-ring-object.html [ Pass Crash ]
@@ -507,8 +502,6 @@
 crbug.com/505364 imported/web-platform-tests/shadow-dom/untriaged/shadow-trees/upper-boundary-encapsulation/ownerdocument-002.html [ Failure ]
 crbug.com/505364 crbug.com/520616 imported/web-platform-tests/shadow-dom/untriaged/shadow-trees/upper-boundary-encapsulation/test-009.html [ Failure ]
 
-crbug.com/539623 [ Mac10.6 ] fast/repaint/selection-change-in-iframe-with-relative-parent.html [ Pass Failure ]
-
 crbug.com/387740 imported/web-platform-tests/mediacapture-streams/stream-api/introduction/disabled-audio-silence.html [ Skip ]
 crbug.com/387740 imported/web-platform-tests/mediacapture-streams/stream-api/introduction/disabled-video-black.html [ Skip ]
 crbug.com/387740 imported/web-platform-tests/mediacapture-streams/stream-api/mediastreamtrack/mediastreamtrack-end.html [ Skip ]
@@ -595,6 +588,10 @@
 crbug.com/441840 imported/csswg-test/css-shapes-1/shape-outside/values/shape-outside-polygon-004.html [ Failure ]
 crbug.com/441840 imported/csswg-test/css-shapes-1/shape-outside/values/shape-outside-shape-arguments-000.html [ Failure ]
 
+crbug.com/586413 imported/csswg-test/css-snap-size-1/snap-width-001.html [ Failure ]
+crbug.com/586413 imported/csswg-test/css-snap-size-1/snap-width-border-001.html [ Failure ]
+crbug.com/586413 imported/csswg-test/css-snap-size-1/snap-width-padding-001.html [ Failure ]
+
 crbug.com/505151 imported/csswg-test/css-writing-modes-3/abs-pos-non-replaced-icb-vlr-003.xht [ Failure ]
 crbug.com/505151 imported/csswg-test/css-writing-modes-3/abs-pos-non-replaced-icb-vlr-005.xht [ Failure ]
 crbug.com/505151 imported/csswg-test/css-writing-modes-3/abs-pos-non-replaced-icb-vlr-011.xht [ Failure ]
@@ -886,8 +883,6 @@
 crbug.com/363099 [ Win ] plugins/nested-plugin-objects.html [ Failure ]
 crbug.com/363099 [ Win ] plugins/open-and-close-window-with-plugin.html [ Failure ]
 
-crbug.com/418091 [ Mac10.6 ] fast/text/international/zerowidthjoiner.html [ Failure ]
-
 crbug.com/425345 [ Mac ] fast/text/line-break-after-question-mark.html [ Failure ]
 
 crbug.com/574283 [ Mac ] virtual/threaded/fast/scroll-behavior/smooth-scroll/mousewheel-scroll-interrupted.html [ Skip ]
@@ -1036,21 +1031,12 @@
 crbug.com/553838 [ Mac ] imported/csswg-test/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-align-self-baseline-horiz-001a.xhtml [ Failure ]
 crbug.com/553838 [ Mac ] imported/csswg-test/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-align-self-baseline-horiz-001b.xhtml [ Failure ]
 
-crbug.com/471066 [ Mac10.6 ] fast/text/apply-start-width-after-skipped-text.html [ Failure ]
-crbug.com/471066 [ Mac10.6 ] fast/text/bidi-explicit-embedding-past-end.html [ Failure ]
-crbug.com/471066 [ Mac10.6 ] fast/text/emphasis-overlap.html [ Failure ]
-crbug.com/471066 [ Mac10.6 ] fast/text/fake-italic.html [ Failure ]
-
-crbug.com/478109 [ Mac10.6 ] fast/text/bidi-embedding-pop-and-push-same-2.html [ Failure ]
-
 # These need a rebaseline due crbug.com/504745 on Windows when they are activated again.
 crbug.com/521124 crbug.com/410145 [ Win ] fast/text/international/vertical-text-glyph-test.html [ Pass Failure ]
 crbug.com/521124 crbug.com/410145 [ Win ] fast/text/international/text-combine-image-test.html [ Pass Failure ]
 crbug.com/521124 crbug.com/410145 [ Win7 ] fast/css/font-weight-1.html [ Pass Failure ]
 crbug.com/521124 crbug.com/571481 crbug.com/410145 [ Win ] fast/text/orientation-sideways.html [ Pass Failure ]
 
-crbug.com/581974 [ Mac10.7 Debug ] fast/text/justify-ideograph-simple.html [ Failure ]
-crbug.com/581974 [ Mac10.7 Debug ] fast/text/justify-ideograph-complex.html [ Failure ]
 
 # Temporary, until we stop use_system_harfbuzz on Linux including non-official builds
 crbug.com/462689 [ Linux ] fast/text/unicode-variation-selector.html [ Failure ]
@@ -1364,9 +1350,6 @@
 
 crbug.com/571376 http/tests/webfont/font-display-intervention.html [ Pass Failure ]
 
-crbug.com/570899 [ Mac10.6 ] virtual/rootlayerscrolls/fast/scrolling/background-paint-scrolled.html [ Failure ]
-crbug.com/571361 [ Mac10.6 ] virtual/rootlayerscrolls/fast/scrolling/background-paint-scrolled-out-and-in.html [ Failure ]
-
 crbug.com/320139 fast/repaint/block-layout-inline-children-replaced.html [ Pass Failure ]
 
 crbug.com/575766 http/tests/inspector/resource-tree/resource-tree-frame-add.html [ Timeout Pass ]
@@ -1378,7 +1361,6 @@
 
 crbug.com/571721 inspector/console/console-xpath.html [ Timeout Pass ]
 
-crbug.com/571762 [ Mac10.7 ] inspector/console/inspect-html-all-collection.html [ Timeout Pass ]
 crbug.com/580378 [ Mac ] fast/replaced/width100percent-searchfield.html [ Failure Pass ]
 crbug.com/571765 [ Linux Trusty Mac10.9 ] inspector/console/worker-eval-contains-stack.html [ Timeout Crash Pass ]
 
@@ -1394,7 +1376,6 @@
 
 crbug.com/579493 http/tests/security/xss-DENIED-xsl-document-securityOrigin.xml [ Timeout ]
 
-crbug.com/572723 [ Mac10.7 Release ] inspector/sources/debugger/debugger-completions-on-call-frame.html [ Timeout Pass ]
 crbug.com/572723 [ Linux Mac10.9 ] inspector/sources/debugger/debugger-disable-enable.html [ Pass Failure Timeout ]
 crbug.com/572723 inspector/sources/debugger/debugger-uncaught-promise-on-pause.html [ Timeout Pass ]
 
@@ -1417,7 +1398,7 @@
 
 crbug.com/587593 [ Android ] fast/js/pic/cached-single-entry-transition.html [ Pass Failure ]
 
-crbug.com/587779 [ Mac10.7 Retina Mac10.10 ] fast/dynamic/window-resize-scrollbars-test.html [ Timeout Failure Pass ]
+crbug.com/587779 [ Retina Mac10.10 ] fast/dynamic/window-resize-scrollbars-test.html [ Timeout Failure Pass ]
 
 crbug.com/587950 [ Mac Win ] virtual/threaded/animations/background-shorthand-crash.html [ Failure ]
 
diff --git a/third_party/WebKit/LayoutTests/animations/composition/background-position-composition.html b/third_party/WebKit/LayoutTests/animations/composition/background-position-composition.html
new file mode 100644
index 0000000..5ee27c9
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/animations/composition/background-position-composition.html
@@ -0,0 +1,89 @@
+<!DOCTYPE html>
+<meta charset="UTF-8">
+<style>
+.target {
+  width: 120px;
+  height: 120px;
+  display: inline-block;
+  background-image: url(), url();
+}
+</style>
+<body>
+<script src="../interpolation/resources/interpolation-test.js"></script>
+<script>
+assertComposition({
+  property: 'background-position',
+  underlying: '40px 140px',
+  addFrom: '60px 160px',
+  addTo: '160px 260px',
+}, [
+  {at: -0.25, is: '75px 275px, 75px 275px'},
+  {at: 0, is: '100px 300px, 100px 300px'},
+  {at: 0.25, is: '125px 325px, 125px 325px'},
+  {at: 0.5, is: '150px 350px, 150px 350px'},
+  {at: 0.75, is: '175px 375px, 175px 375px'},
+  {at: 1, is: '200px 400px, 200px 400px'},
+  {at: 1.25, is: '225px 425px, 225px 425px'},
+]);
+
+assertComposition({
+  property: 'background-position',
+  underlying: 'top 20% left 40%',
+  addFrom: 'left 60% top 80%',
+  addTo: 'right 80% bottom 40%',
+}, [
+  {at: -0.25, is: '110% 105%, 110% 105%'},
+  {at: 0, is: '100% 100%, 100% 100%'},
+  {at: 0.25, is: '90% 95%, 90% 95%'},
+  {at: 0.5, is: '80% 90%, 80% 90%'},
+  {at: 0.75, is: '70% 85%, 70% 85%'},
+  {at: 1, is: '60% 80%, 60% 80%'},
+  {at: 1.25, is: '50% 75%, 50% 75%'},
+]);
+
+assertComposition({
+  property: 'background-position',
+  underlying: 'top 20% left 40%',
+  addFrom: 'left 60% top 80%, top 180% left 160%',
+  addTo: 'right 80% bottom 40%',
+}, [
+  {at: -0.25, is: '110% 105%, 235% 230%'},
+  {at: 0, is: '100% 100%, 200% 200%'},
+  {at: 0.25, is: '90% 95%, 165% 170%'},
+  {at: 0.5, is: '80% 90%, 130% 140%'},
+  {at: 0.75, is: '70% 85%, 95% 110%'},
+  {at: 1, is: '60% 80%, 60% 80%'},
+  {at: 1.25, is: '50% 75%, 25% 50%'},
+]);
+
+assertComposition({
+  property: 'background-position',
+  underlying: '40px 140px',
+  replaceFrom: '100px 200px',
+  addTo: '160px 260px',
+}, [
+  {at: -0.25, is: '75px 150px, 75px 150px'},
+  {at: 0, is: '100px 200px, 100px 200px'},
+  {at: 0.25, is: '125px 250px, 125px 250px'},
+  {at: 0.5, is: '150px 300px, 150px 300px'},
+  {at: 0.75, is: '175px 350px, 175px 350px'},
+  {at: 1, is: '200px 400px, 200px 400px'},
+  {at: 1.25, is: '225px 450px, 225px 450px'},
+]);
+
+assertComposition({
+  property: 'background-position',
+  underlying: '40px 140px',
+  addFrom: '60px 160px',
+  replaceTo: '200px 400px',
+}, [
+  {at: -0.25, is: '75px 275px, 75px 275px'},
+  {at: 0, is: '100px 300px, 100px 300px'},
+  {at: 0.25, is: '125px 325px, 125px 325px'},
+  {at: 0.5, is: '150px 350px, 150px 350px'},
+  {at: 0.75, is: '175px 375px, 175px 375px'},
+  {at: 1, is: '200px 400px, 200px 400px'},
+  {at: 1.25, is: '225px 425px, 225px 425px'},
+]);
+</script>
+</body>
diff --git a/third_party/WebKit/LayoutTests/animations/interpolation/background-position-origin-interpolation-expected.txt b/third_party/WebKit/LayoutTests/animations/interpolation/background-position-origin-interpolation-expected.txt
index 94a62d3..be892ea 100644
--- a/third_party/WebKit/LayoutTests/animations/interpolation/background-position-origin-interpolation-expected.txt
+++ b/third_party/WebKit/LayoutTests/animations/interpolation/background-position-origin-interpolation-expected.txt
@@ -25,46 +25,51 @@
 PASS CSS Transitions: property <background-position> from [center center] to [left 20px top 20px] at (0.5) is [calc(10px + 25%) calc(10px + 25%)] 
 PASS CSS Transitions: property <background-position> from [center center] to [left 20px top 20px] at (0.75) is [calc(15px + 12.5%) calc(15px + 12.5%)] 
 PASS CSS Transitions: property <background-position> from [center center] to [left 20px top 20px] at (1) is [20px 20px] 
-FAIL CSS Transitions: property <background-position> from [center center] to [center top 20px] at (0) is [left 50% 50%] assert_equals: expected "left 50 % top 50 % " but got "left 50 % 50 % "
-FAIL CSS Transitions: property <background-position> from [center center] to [center top 20px] at (0.25) is [left 50% calc(5px + 37.5%)] assert_equals: expected "left 50 % top calc ( 5px + 37.5 % ) " but got "left 50 % calc ( 5px + 37.5 % ) "
-FAIL CSS Transitions: property <background-position> from [center center] to [center top 20px] at (0.5) is [left 50% calc(10px + 25%)] assert_equals: expected "left 50 % top calc ( 10px + 25 % ) " but got "left 50 % calc ( 10px + 25 % ) "
-FAIL CSS Transitions: property <background-position> from [center center] to [center top 20px] at (0.75) is [left 50% calc(15px + 12.5%)] assert_equals: expected "left 50 % top calc ( 15px + 12.5 % ) " but got "left 50 % calc ( 15px + 12.5 % ) "
-FAIL CSS Transitions: property <background-position> from [center center] to [center top 20px] at (1) is [left 50% 20px] assert_equals: expected "left 50 % top 20px " but got "left 50 % 20px "
+FAIL CSS Transitions: property <background-position> from [center center] to [center top 20px] at (0) is [left 50% 50%] assert_equals: expected "50 % 50 % " but got "left 50 % 50 % "
+FAIL CSS Transitions: property <background-position> from [center center] to [center top 20px] at (0.25) is [left 50% calc(5px + 37.5%)] assert_equals: expected "50 % calc ( 5px + 37.5 % ) " but got "left 50 % calc ( 5px + 37.5 % ) "
+FAIL CSS Transitions: property <background-position> from [center center] to [center top 20px] at (0.5) is [left 50% calc(10px + 25%)] assert_equals: expected "50 % calc ( 10px + 25 % ) " but got "left 50 % calc ( 10px + 25 % ) "
+FAIL CSS Transitions: property <background-position> from [center center] to [center top 20px] at (0.75) is [left 50% calc(15px + 12.5%)] assert_equals: expected "50 % calc ( 15px + 12.5 % ) " but got "left 50 % calc ( 15px + 12.5 % ) "
+FAIL CSS Transitions: property <background-position> from [center center] to [center top 20px] at (1) is [left 50% 20px] assert_equals: expected "50 % 20px " but got "left 50 % 20px "
 PASS CSS Transitions: property <background-position> from [center center] to [right 20px top 20px] at (0) is [50% 50%] 
 PASS CSS Transitions: property <background-position> from [center center] to [right 20px top 20px] at (0.25) is [calc(-5px + 62.5%) calc(5px + 37.5%)] 
 PASS CSS Transitions: property <background-position> from [center center] to [right 20px top 20px] at (0.5) is [calc(-10px + 75%) calc(10px + 25%)] 
 PASS CSS Transitions: property <background-position> from [center center] to [right 20px top 20px] at (0.75) is [calc(-15px + 87.5%) calc(15px + 12.5%)] 
 PASS CSS Transitions: property <background-position> from [center center] to [right 20px top 20px] at (1) is [calc(-20px + 100%) 20px] 
-FAIL CSS Transitions: property <background-position> from [center center] to [left 20px center] at (0) is [50% top 50%] assert_equals: expected "left 50 % top 50 % " but got "50 % top 50 % "
-FAIL CSS Transitions: property <background-position> from [center center] to [left 20px center] at (0.25) is [calc(5px + 37.5%) top 50%] assert_equals: expected "left calc ( 5px + 37.5 % ) top 50 % " but got "calc ( 5px + 37.5 % ) top 50 % "
-FAIL CSS Transitions: property <background-position> from [center center] to [left 20px center] at (0.5) is [calc(10px + 25%) top 50%] assert_equals: expected "left calc ( 10px + 25 % ) top 50 % " but got "calc ( 10px + 25 % ) top 50 % "
-FAIL CSS Transitions: property <background-position> from [center center] to [left 20px center] at (0.75) is [calc(15px + 12.5%) top 50%] assert_equals: expected "left calc ( 15px + 12.5 % ) top 50 % " but got "calc ( 15px + 12.5 % ) top 50 % "
-FAIL CSS Transitions: property <background-position> from [center center] to [left 20px center] at (1) is [20px top 50%] assert_equals: expected "left 20px top 50 % " but got "20px top 50 % "
+FAIL CSS Transitions: property <background-position> from [center center] to [left 20px center] at (0) is [50% top 50%] assert_equals: expected "50 % 50 % " but got "50 % top 50 % "
+FAIL CSS Transitions: property <background-position> from [center center] to [left 20px center] at (0.25) is [calc(5px + 37.5%) top 50%] assert_equals: expected "calc ( 5px + 37.5 % ) 50 % " but got "calc ( 5px + 37.5 % ) top 50 % "
+FAIL CSS Transitions: property <background-position> from [center center] to [left 20px center] at (0.5) is [calc(10px + 25%) top 50%] assert_equals: expected "calc ( 10px + 25 % ) 50 % " but got "calc ( 10px + 25 % ) top 50 % "
+FAIL CSS Transitions: property <background-position> from [center center] to [left 20px center] at (0.75) is [calc(15px + 12.5%) top 50%] assert_equals: expected "calc ( 15px + 12.5 % ) 50 % " but got "calc ( 15px + 12.5 % ) top 50 % "
+FAIL CSS Transitions: property <background-position> from [center center] to [left 20px center] at (1) is [20px top 50%] assert_equals: expected "20px 50 % " but got "20px top 50 % "
 PASS CSS Transitions: property <background-position> from [center center] to [center center] at (0) is [50% 50%] 
 PASS CSS Transitions: property <background-position> from [center center] to [center center] at (0.25) is [50% 50%] 
 PASS CSS Transitions: property <background-position> from [center center] to [center center] at (0.5) is [50% 50%] 
 PASS CSS Transitions: property <background-position> from [center center] to [center center] at (0.75) is [50% 50%] 
 PASS CSS Transitions: property <background-position> from [center center] to [center center] at (1) is [50% 50%] 
-FAIL CSS Transitions: property <background-position> from [center center] to [right 20px center] at (0) is [50% top 50%] assert_equals: expected "left 50 % top 50 % " but got "50 % top 50 % "
-FAIL CSS Transitions: property <background-position> from [center center] to [right 20px center] at (0.25) is [calc(-5px + 62.5%) top 50%] assert_equals: expected "left calc ( - 5px + 62.5 % ) top 50 % " but got "calc ( - 5px + 62.5 % ) top 50 % "
-FAIL CSS Transitions: property <background-position> from [center center] to [right 20px center] at (0.5) is [calc(-10px + 75%) top 50%] assert_equals: expected "left calc ( - 10px + 75 % ) top 50 % " but got "calc ( - 10px + 75 % ) top 50 % "
-FAIL CSS Transitions: property <background-position> from [center center] to [right 20px center] at (0.75) is [calc(-15px + 87.5%) top 50%] assert_equals: expected "left calc ( - 15px + 87.5 % ) top 50 % " but got "calc ( - 15px + 87.5 % ) top 50 % "
-FAIL CSS Transitions: property <background-position> from [center center] to [right 20px center] at (1) is [calc(-20px + 100%) top 50%] assert_equals: expected "left calc ( - 20px + 100 % ) top 50 % " but got "calc ( - 20px + 100 % ) top 50 % "
+FAIL CSS Transitions: property <background-position> from [center center] to [right 20px center] at (0) is [50% top 50%] assert_equals: expected "50 % 50 % " but got "50 % top 50 % "
+FAIL CSS Transitions: property <background-position> from [center center] to [right 20px center] at (0.25) is [calc(-5px + 62.5%) top 50%] assert_equals: expected "calc ( - 5px + 62.5 % ) 50 % " but got "calc ( - 5px + 62.5 % ) top 50 % "
+FAIL CSS Transitions: property <background-position> from [center center] to [right 20px center] at (0.5) is [calc(-10px + 75%) top 50%] assert_equals: expected "calc ( - 10px + 75 % ) 50 % " but got "calc ( - 10px + 75 % ) top 50 % "
+FAIL CSS Transitions: property <background-position> from [center center] to [right 20px center] at (0.75) is [calc(-15px + 87.5%) top 50%] assert_equals: expected "calc ( - 15px + 87.5 % ) 50 % " but got "calc ( - 15px + 87.5 % ) top 50 % "
+FAIL CSS Transitions: property <background-position> from [center center] to [right 20px center] at (1) is [calc(-20px + 100%) top 50%] assert_equals: expected "calc ( - 20px + 100 % ) 50 % " but got "calc ( - 20px + 100 % ) top 50 % "
 PASS CSS Transitions: property <background-position> from [center center] to [left 20px bottom 20px] at (0) is [50% 50%] 
 PASS CSS Transitions: property <background-position> from [center center] to [left 20px bottom 20px] at (0.25) is [calc(5px + 37.5%) calc(-5px + 62.5%)] 
 PASS CSS Transitions: property <background-position> from [center center] to [left 20px bottom 20px] at (0.5) is [calc(10px + 25%) calc(-10px + 75%)] 
 PASS CSS Transitions: property <background-position> from [center center] to [left 20px bottom 20px] at (0.75) is [calc(15px + 12.5%) calc(-15px + 87.5%)] 
 PASS CSS Transitions: property <background-position> from [center center] to [left 20px bottom 20px] at (1) is [20px calc(-20px + 100%)] 
-FAIL CSS Transitions: property <background-position> from [center center] to [center bottom 20px] at (0) is [left 50% 50%] assert_equals: expected "left 50 % top 50 % " but got "left 50 % 50 % "
-FAIL CSS Transitions: property <background-position> from [center center] to [center bottom 20px] at (0.25) is [left 50% calc(-5px + 62.5%)] assert_equals: expected "left 50 % top calc ( - 5px + 62.5 % ) " but got "left 50 % calc ( - 5px + 62.5 % ) "
-FAIL CSS Transitions: property <background-position> from [center center] to [center bottom 20px] at (0.5) is [left 50% calc(-10px + 75%)] assert_equals: expected "left 50 % top calc ( - 10px + 75 % ) " but got "left 50 % calc ( - 10px + 75 % ) "
-FAIL CSS Transitions: property <background-position> from [center center] to [center bottom 20px] at (0.75) is [left 50% calc(-15px + 87.5%)] assert_equals: expected "left 50 % top calc ( - 15px + 87.5 % ) " but got "left 50 % calc ( - 15px + 87.5 % ) "
-FAIL CSS Transitions: property <background-position> from [center center] to [center bottom 20px] at (1) is [left 50% calc(-20px + 100%)] assert_equals: expected "left 50 % top calc ( - 20px + 100 % ) " but got "left 50 % calc ( - 20px + 100 % ) "
+FAIL CSS Transitions: property <background-position> from [center center] to [center bottom 20px] at (0) is [left 50% 50%] assert_equals: expected "50 % 50 % " but got "left 50 % 50 % "
+FAIL CSS Transitions: property <background-position> from [center center] to [center bottom 20px] at (0.25) is [left 50% calc(-5px + 62.5%)] assert_equals: expected "50 % calc ( - 5px + 62.5 % ) " but got "left 50 % calc ( - 5px + 62.5 % ) "
+FAIL CSS Transitions: property <background-position> from [center center] to [center bottom 20px] at (0.5) is [left 50% calc(-10px + 75%)] assert_equals: expected "50 % calc ( - 10px + 75 % ) " but got "left 50 % calc ( - 10px + 75 % ) "
+FAIL CSS Transitions: property <background-position> from [center center] to [center bottom 20px] at (0.75) is [left 50% calc(-15px + 87.5%)] assert_equals: expected "50 % calc ( - 15px + 87.5 % ) " but got "left 50 % calc ( - 15px + 87.5 % ) "
+FAIL CSS Transitions: property <background-position> from [center center] to [center bottom 20px] at (1) is [left 50% calc(-20px + 100%)] assert_equals: expected "50 % calc ( - 20px + 100 % ) " but got "left 50 % calc ( - 20px + 100 % ) "
 PASS CSS Transitions: property <background-position> from [center center] to [right 20px bottom 20px] at (0) is [50% 50%] 
 PASS CSS Transitions: property <background-position> from [center center] to [right 20px bottom 20px] at (0.25) is [calc(-5px + 62.5%) calc(-5px + 62.5%)] 
 PASS CSS Transitions: property <background-position> from [center center] to [right 20px bottom 20px] at (0.5) is [calc(-10px + 75%) calc(-10px + 75%)] 
 PASS CSS Transitions: property <background-position> from [center center] to [right 20px bottom 20px] at (0.75) is [calc(-15px + 87.5%) calc(-15px + 87.5%)] 
 PASS CSS Transitions: property <background-position> from [center center] to [right 20px bottom 20px] at (1) is [calc(-20px + 100%) calc(-20px + 100%)] 
+PASS CSS Transitions: property <background-position> from [center] to [bottom] at (0) is [50% 50%] 
+PASS CSS Transitions: property <background-position> from [center] to [bottom] at (0.25) is [50% 62.5%] 
+PASS CSS Transitions: property <background-position> from [center] to [bottom] at (0.5) is [50% 75%] 
+PASS CSS Transitions: property <background-position> from [center] to [bottom] at (0.75) is [50% 87.5%] 
+PASS CSS Transitions: property <background-position> from [center] to [bottom] at (1) is [50% 100%] 
 PASS CSS Animations: property <background-position> from [] to [left 20px top 20px] at (0) is [10px 10px] 
 PASS CSS Animations: property <background-position> from [] to [left 20px top 20px] at (0.25) is [12.5px 12.5px] 
 PASS CSS Animations: property <background-position> from [] to [left 20px top 20px] at (0.5) is [15px 15px] 
@@ -90,46 +95,51 @@
 PASS CSS Animations: property <background-position> from [center center] to [left 20px top 20px] at (0.5) is [calc(10px + 25%) calc(10px + 25%)] 
 PASS CSS Animations: property <background-position> from [center center] to [left 20px top 20px] at (0.75) is [calc(15px + 12.5%) calc(15px + 12.5%)] 
 PASS CSS Animations: property <background-position> from [center center] to [left 20px top 20px] at (1) is [20px 20px] 
-FAIL CSS Animations: property <background-position> from [center center] to [center top 20px] at (0) is [50% 50%] assert_equals: expected "left 50 % top 50 % " but got "50 % 50 % "
-FAIL CSS Animations: property <background-position> from [center center] to [center top 20px] at (0.25) is [50% calc(5px + 37.5%)] assert_equals: expected "left 50 % top calc ( 5px + 37.5 % ) " but got "50 % calc ( 5px + 37.5 % ) "
-FAIL CSS Animations: property <background-position> from [center center] to [center top 20px] at (0.5) is [50% calc(10px + 25%)] assert_equals: expected "left 50 % top calc ( 10px + 25 % ) " but got "50 % calc ( 10px + 25 % ) "
-FAIL CSS Animations: property <background-position> from [center center] to [center top 20px] at (0.75) is [50% calc(15px + 12.5%)] assert_equals: expected "left 50 % top calc ( 15px + 12.5 % ) " but got "50 % calc ( 15px + 12.5 % ) "
-FAIL CSS Animations: property <background-position> from [center center] to [center top 20px] at (1) is [50% 20px] assert_equals: expected "left 50 % top 20px " but got "50 % 20px "
+PASS CSS Animations: property <background-position> from [center center] to [center top 20px] at (0) is [50% 50%] 
+PASS CSS Animations: property <background-position> from [center center] to [center top 20px] at (0.25) is [50% calc(5px + 37.5%)] 
+PASS CSS Animations: property <background-position> from [center center] to [center top 20px] at (0.5) is [50% calc(10px + 25%)] 
+PASS CSS Animations: property <background-position> from [center center] to [center top 20px] at (0.75) is [50% calc(15px + 12.5%)] 
+PASS CSS Animations: property <background-position> from [center center] to [center top 20px] at (1) is [50% 20px] 
 PASS CSS Animations: property <background-position> from [center center] to [right 20px top 20px] at (0) is [50% 50%] 
 PASS CSS Animations: property <background-position> from [center center] to [right 20px top 20px] at (0.25) is [calc(-5px + 62.5%) calc(5px + 37.5%)] 
 PASS CSS Animations: property <background-position> from [center center] to [right 20px top 20px] at (0.5) is [calc(-10px + 75%) calc(10px + 25%)] 
 PASS CSS Animations: property <background-position> from [center center] to [right 20px top 20px] at (0.75) is [calc(-15px + 87.5%) calc(15px + 12.5%)] 
 PASS CSS Animations: property <background-position> from [center center] to [right 20px top 20px] at (1) is [calc(-20px + 100%) 20px] 
-FAIL CSS Animations: property <background-position> from [center center] to [left 20px center] at (0) is [50% 50%] assert_equals: expected "left 50 % top 50 % " but got "50 % 50 % "
-FAIL CSS Animations: property <background-position> from [center center] to [left 20px center] at (0.25) is [calc(5px + 37.5%) 50%] assert_equals: expected "left calc ( 5px + 37.5 % ) top 50 % " but got "calc ( 5px + 37.5 % ) 50 % "
-FAIL CSS Animations: property <background-position> from [center center] to [left 20px center] at (0.5) is [calc(10px + 25%) 50%] assert_equals: expected "left calc ( 10px + 25 % ) top 50 % " but got "calc ( 10px + 25 % ) 50 % "
-FAIL CSS Animations: property <background-position> from [center center] to [left 20px center] at (0.75) is [calc(15px + 12.5%) 50%] assert_equals: expected "left calc ( 15px + 12.5 % ) top 50 % " but got "calc ( 15px + 12.5 % ) 50 % "
-FAIL CSS Animations: property <background-position> from [center center] to [left 20px center] at (1) is [20px 50%] assert_equals: expected "left 20px top 50 % " but got "20px 50 % "
+PASS CSS Animations: property <background-position> from [center center] to [left 20px center] at (0) is [50% 50%] 
+PASS CSS Animations: property <background-position> from [center center] to [left 20px center] at (0.25) is [calc(5px + 37.5%) 50%] 
+PASS CSS Animations: property <background-position> from [center center] to [left 20px center] at (0.5) is [calc(10px + 25%) 50%] 
+PASS CSS Animations: property <background-position> from [center center] to [left 20px center] at (0.75) is [calc(15px + 12.5%) 50%] 
+PASS CSS Animations: property <background-position> from [center center] to [left 20px center] at (1) is [20px 50%] 
 PASS CSS Animations: property <background-position> from [center center] to [center center] at (0) is [50% 50%] 
 PASS CSS Animations: property <background-position> from [center center] to [center center] at (0.25) is [50% 50%] 
 PASS CSS Animations: property <background-position> from [center center] to [center center] at (0.5) is [50% 50%] 
 PASS CSS Animations: property <background-position> from [center center] to [center center] at (0.75) is [50% 50%] 
 PASS CSS Animations: property <background-position> from [center center] to [center center] at (1) is [50% 50%] 
-FAIL CSS Animations: property <background-position> from [center center] to [right 20px center] at (0) is [50% 50%] assert_equals: expected "left 50 % top 50 % " but got "50 % 50 % "
-FAIL CSS Animations: property <background-position> from [center center] to [right 20px center] at (0.25) is [calc(-5px + 62.5%) 50%] assert_equals: expected "left calc ( - 5px + 62.5 % ) top 50 % " but got "calc ( - 5px + 62.5 % ) 50 % "
-FAIL CSS Animations: property <background-position> from [center center] to [right 20px center] at (0.5) is [calc(-10px + 75%) 50%] assert_equals: expected "left calc ( - 10px + 75 % ) top 50 % " but got "calc ( - 10px + 75 % ) 50 % "
-FAIL CSS Animations: property <background-position> from [center center] to [right 20px center] at (0.75) is [calc(-15px + 87.5%) 50%] assert_equals: expected "left calc ( - 15px + 87.5 % ) top 50 % " but got "calc ( - 15px + 87.5 % ) 50 % "
-FAIL CSS Animations: property <background-position> from [center center] to [right 20px center] at (1) is [calc(-20px + 100%) 50%] assert_equals: expected "left calc ( - 20px + 100 % ) top 50 % " but got "calc ( - 20px + 100 % ) 50 % "
+PASS CSS Animations: property <background-position> from [center center] to [right 20px center] at (0) is [50% 50%] 
+PASS CSS Animations: property <background-position> from [center center] to [right 20px center] at (0.25) is [calc(-5px + 62.5%) 50%] 
+PASS CSS Animations: property <background-position> from [center center] to [right 20px center] at (0.5) is [calc(-10px + 75%) 50%] 
+PASS CSS Animations: property <background-position> from [center center] to [right 20px center] at (0.75) is [calc(-15px + 87.5%) 50%] 
+PASS CSS Animations: property <background-position> from [center center] to [right 20px center] at (1) is [calc(-20px + 100%) 50%] 
 PASS CSS Animations: property <background-position> from [center center] to [left 20px bottom 20px] at (0) is [50% 50%] 
 PASS CSS Animations: property <background-position> from [center center] to [left 20px bottom 20px] at (0.25) is [calc(5px + 37.5%) calc(-5px + 62.5%)] 
 PASS CSS Animations: property <background-position> from [center center] to [left 20px bottom 20px] at (0.5) is [calc(10px + 25%) calc(-10px + 75%)] 
 PASS CSS Animations: property <background-position> from [center center] to [left 20px bottom 20px] at (0.75) is [calc(15px + 12.5%) calc(-15px + 87.5%)] 
 PASS CSS Animations: property <background-position> from [center center] to [left 20px bottom 20px] at (1) is [20px calc(-20px + 100%)] 
-FAIL CSS Animations: property <background-position> from [center center] to [center bottom 20px] at (0) is [50% 50%] assert_equals: expected "left 50 % top 50 % " but got "50 % 50 % "
-FAIL CSS Animations: property <background-position> from [center center] to [center bottom 20px] at (0.25) is [50% calc(-5px + 62.5%)] assert_equals: expected "left 50 % top calc ( - 5px + 62.5 % ) " but got "50 % calc ( - 5px + 62.5 % ) "
-FAIL CSS Animations: property <background-position> from [center center] to [center bottom 20px] at (0.5) is [50% calc(-10px + 75%)] assert_equals: expected "left 50 % top calc ( - 10px + 75 % ) " but got "50 % calc ( - 10px + 75 % ) "
-FAIL CSS Animations: property <background-position> from [center center] to [center bottom 20px] at (0.75) is [50% calc(-15px + 87.5%)] assert_equals: expected "left 50 % top calc ( - 15px + 87.5 % ) " but got "50 % calc ( - 15px + 87.5 % ) "
-FAIL CSS Animations: property <background-position> from [center center] to [center bottom 20px] at (1) is [50% calc(-20px + 100%)] assert_equals: expected "left 50 % top calc ( - 20px + 100 % ) " but got "50 % calc ( - 20px + 100 % ) "
+PASS CSS Animations: property <background-position> from [center center] to [center bottom 20px] at (0) is [50% 50%] 
+PASS CSS Animations: property <background-position> from [center center] to [center bottom 20px] at (0.25) is [50% calc(-5px + 62.5%)] 
+PASS CSS Animations: property <background-position> from [center center] to [center bottom 20px] at (0.5) is [50% calc(-10px + 75%)] 
+PASS CSS Animations: property <background-position> from [center center] to [center bottom 20px] at (0.75) is [50% calc(-15px + 87.5%)] 
+PASS CSS Animations: property <background-position> from [center center] to [center bottom 20px] at (1) is [50% calc(-20px + 100%)] 
 PASS CSS Animations: property <background-position> from [center center] to [right 20px bottom 20px] at (0) is [50% 50%] 
 PASS CSS Animations: property <background-position> from [center center] to [right 20px bottom 20px] at (0.25) is [calc(-5px + 62.5%) calc(-5px + 62.5%)] 
 PASS CSS Animations: property <background-position> from [center center] to [right 20px bottom 20px] at (0.5) is [calc(-10px + 75%) calc(-10px + 75%)] 
 PASS CSS Animations: property <background-position> from [center center] to [right 20px bottom 20px] at (0.75) is [calc(-15px + 87.5%) calc(-15px + 87.5%)] 
 PASS CSS Animations: property <background-position> from [center center] to [right 20px bottom 20px] at (1) is [calc(-20px + 100%) calc(-20px + 100%)] 
+PASS CSS Animations: property <background-position> from [center] to [bottom] at (0) is [50% 50%] 
+PASS CSS Animations: property <background-position> from [center] to [bottom] at (0.25) is [50% 62.5%] 
+PASS CSS Animations: property <background-position> from [center] to [bottom] at (0.5) is [50% 75%] 
+PASS CSS Animations: property <background-position> from [center] to [bottom] at (0.75) is [50% 87.5%] 
+PASS CSS Animations: property <background-position> from [center] to [bottom] at (1) is [50% 100%] 
 PASS Web Animations: property <background-position> from [initial] to [left 20px top 20px] at (0) is [0% 0%] 
 PASS Web Animations: property <background-position> from [initial] to [left 20px top 20px] at (0.25) is [5px 5px] 
 PASS Web Animations: property <background-position> from [initial] to [left 20px top 20px] at (0.5) is [10px 10px] 
@@ -150,45 +160,50 @@
 PASS Web Animations: property <background-position> from [center center] to [left 20px top 20px] at (0.5) is [calc(10px + 25%) calc(10px + 25%)] 
 PASS Web Animations: property <background-position> from [center center] to [left 20px top 20px] at (0.75) is [calc(15px + 12.5%) calc(15px + 12.5%)] 
 PASS Web Animations: property <background-position> from [center center] to [left 20px top 20px] at (1) is [20px 20px] 
-FAIL Web Animations: property <background-position> from [center center] to [center top 20px] at (0) is [50% 50%] assert_equals: expected "left 50 % top 50 % " but got "50 % 50 % "
-FAIL Web Animations: property <background-position> from [center center] to [center top 20px] at (0.25) is [50% calc(5px + 37.5%)] assert_equals: expected "left 50 % top calc ( 5px + 37.5 % ) " but got "50 % calc ( 5px + 37.5 % ) "
-FAIL Web Animations: property <background-position> from [center center] to [center top 20px] at (0.5) is [50% calc(10px + 25%)] assert_equals: expected "left 50 % top calc ( 10px + 25 % ) " but got "50 % calc ( 10px + 25 % ) "
-FAIL Web Animations: property <background-position> from [center center] to [center top 20px] at (0.75) is [50% calc(15px + 12.5%)] assert_equals: expected "left 50 % top calc ( 15px + 12.5 % ) " but got "50 % calc ( 15px + 12.5 % ) "
-FAIL Web Animations: property <background-position> from [center center] to [center top 20px] at (1) is [50% 20px] assert_equals: expected "left 50 % top 20px " but got "50 % 20px "
+PASS Web Animations: property <background-position> from [center center] to [center top 20px] at (0) is [50% 50%] 
+PASS Web Animations: property <background-position> from [center center] to [center top 20px] at (0.25) is [50% calc(5px + 37.5%)] 
+PASS Web Animations: property <background-position> from [center center] to [center top 20px] at (0.5) is [50% calc(10px + 25%)] 
+PASS Web Animations: property <background-position> from [center center] to [center top 20px] at (0.75) is [50% calc(15px + 12.5%)] 
+PASS Web Animations: property <background-position> from [center center] to [center top 20px] at (1) is [50% 20px] 
 PASS Web Animations: property <background-position> from [center center] to [right 20px top 20px] at (0) is [50% 50%] 
 PASS Web Animations: property <background-position> from [center center] to [right 20px top 20px] at (0.25) is [calc(-5px + 62.5%) calc(5px + 37.5%)] 
 PASS Web Animations: property <background-position> from [center center] to [right 20px top 20px] at (0.5) is [calc(-10px + 75%) calc(10px + 25%)] 
 PASS Web Animations: property <background-position> from [center center] to [right 20px top 20px] at (0.75) is [calc(-15px + 87.5%) calc(15px + 12.5%)] 
 PASS Web Animations: property <background-position> from [center center] to [right 20px top 20px] at (1) is [calc(-20px + 100%) 20px] 
-FAIL Web Animations: property <background-position> from [center center] to [left 20px center] at (0) is [50% 50%] assert_equals: expected "left 50 % top 50 % " but got "50 % 50 % "
-FAIL Web Animations: property <background-position> from [center center] to [left 20px center] at (0.25) is [calc(5px + 37.5%) 50%] assert_equals: expected "left calc ( 5px + 37.5 % ) top 50 % " but got "calc ( 5px + 37.5 % ) 50 % "
-FAIL Web Animations: property <background-position> from [center center] to [left 20px center] at (0.5) is [calc(10px + 25%) 50%] assert_equals: expected "left calc ( 10px + 25 % ) top 50 % " but got "calc ( 10px + 25 % ) 50 % "
-FAIL Web Animations: property <background-position> from [center center] to [left 20px center] at (0.75) is [calc(15px + 12.5%) 50%] assert_equals: expected "left calc ( 15px + 12.5 % ) top 50 % " but got "calc ( 15px + 12.5 % ) 50 % "
-FAIL Web Animations: property <background-position> from [center center] to [left 20px center] at (1) is [20px 50%] assert_equals: expected "left 20px top 50 % " but got "20px 50 % "
+PASS Web Animations: property <background-position> from [center center] to [left 20px center] at (0) is [50% 50%] 
+PASS Web Animations: property <background-position> from [center center] to [left 20px center] at (0.25) is [calc(5px + 37.5%) 50%] 
+PASS Web Animations: property <background-position> from [center center] to [left 20px center] at (0.5) is [calc(10px + 25%) 50%] 
+PASS Web Animations: property <background-position> from [center center] to [left 20px center] at (0.75) is [calc(15px + 12.5%) 50%] 
+PASS Web Animations: property <background-position> from [center center] to [left 20px center] at (1) is [20px 50%] 
 PASS Web Animations: property <background-position> from [center center] to [center center] at (0) is [50% 50%] 
 PASS Web Animations: property <background-position> from [center center] to [center center] at (0.25) is [50% 50%] 
 PASS Web Animations: property <background-position> from [center center] to [center center] at (0.5) is [50% 50%] 
 PASS Web Animations: property <background-position> from [center center] to [center center] at (0.75) is [50% 50%] 
 PASS Web Animations: property <background-position> from [center center] to [center center] at (1) is [50% 50%] 
-FAIL Web Animations: property <background-position> from [center center] to [right 20px center] at (0) is [50% 50%] assert_equals: expected "left 50 % top 50 % " but got "50 % 50 % "
-FAIL Web Animations: property <background-position> from [center center] to [right 20px center] at (0.25) is [calc(-5px + 62.5%) 50%] assert_equals: expected "left calc ( - 5px + 62.5 % ) top 50 % " but got "calc ( - 5px + 62.5 % ) 50 % "
-FAIL Web Animations: property <background-position> from [center center] to [right 20px center] at (0.5) is [calc(-10px + 75%) 50%] assert_equals: expected "left calc ( - 10px + 75 % ) top 50 % " but got "calc ( - 10px + 75 % ) 50 % "
-FAIL Web Animations: property <background-position> from [center center] to [right 20px center] at (0.75) is [calc(-15px + 87.5%) 50%] assert_equals: expected "left calc ( - 15px + 87.5 % ) top 50 % " but got "calc ( - 15px + 87.5 % ) 50 % "
-FAIL Web Animations: property <background-position> from [center center] to [right 20px center] at (1) is [calc(-20px + 100%) 50%] assert_equals: expected "left calc ( - 20px + 100 % ) top 50 % " but got "calc ( - 20px + 100 % ) 50 % "
+PASS Web Animations: property <background-position> from [center center] to [right 20px center] at (0) is [50% 50%] 
+PASS Web Animations: property <background-position> from [center center] to [right 20px center] at (0.25) is [calc(-5px + 62.5%) 50%] 
+PASS Web Animations: property <background-position> from [center center] to [right 20px center] at (0.5) is [calc(-10px + 75%) 50%] 
+PASS Web Animations: property <background-position> from [center center] to [right 20px center] at (0.75) is [calc(-15px + 87.5%) 50%] 
+PASS Web Animations: property <background-position> from [center center] to [right 20px center] at (1) is [calc(-20px + 100%) 50%] 
 PASS Web Animations: property <background-position> from [center center] to [left 20px bottom 20px] at (0) is [50% 50%] 
 PASS Web Animations: property <background-position> from [center center] to [left 20px bottom 20px] at (0.25) is [calc(5px + 37.5%) calc(-5px + 62.5%)] 
 PASS Web Animations: property <background-position> from [center center] to [left 20px bottom 20px] at (0.5) is [calc(10px + 25%) calc(-10px + 75%)] 
 PASS Web Animations: property <background-position> from [center center] to [left 20px bottom 20px] at (0.75) is [calc(15px + 12.5%) calc(-15px + 87.5%)] 
 PASS Web Animations: property <background-position> from [center center] to [left 20px bottom 20px] at (1) is [20px calc(-20px + 100%)] 
-FAIL Web Animations: property <background-position> from [center center] to [center bottom 20px] at (0) is [50% 50%] assert_equals: expected "left 50 % top 50 % " but got "50 % 50 % "
-FAIL Web Animations: property <background-position> from [center center] to [center bottom 20px] at (0.25) is [50% calc(-5px + 62.5%)] assert_equals: expected "left 50 % top calc ( - 5px + 62.5 % ) " but got "50 % calc ( - 5px + 62.5 % ) "
-FAIL Web Animations: property <background-position> from [center center] to [center bottom 20px] at (0.5) is [50% calc(-10px + 75%)] assert_equals: expected "left 50 % top calc ( - 10px + 75 % ) " but got "50 % calc ( - 10px + 75 % ) "
-FAIL Web Animations: property <background-position> from [center center] to [center bottom 20px] at (0.75) is [50% calc(-15px + 87.5%)] assert_equals: expected "left 50 % top calc ( - 15px + 87.5 % ) " but got "50 % calc ( - 15px + 87.5 % ) "
-FAIL Web Animations: property <background-position> from [center center] to [center bottom 20px] at (1) is [50% calc(-20px + 100%)] assert_equals: expected "left 50 % top calc ( - 20px + 100 % ) " but got "50 % calc ( - 20px + 100 % ) "
+PASS Web Animations: property <background-position> from [center center] to [center bottom 20px] at (0) is [50% 50%] 
+PASS Web Animations: property <background-position> from [center center] to [center bottom 20px] at (0.25) is [50% calc(-5px + 62.5%)] 
+PASS Web Animations: property <background-position> from [center center] to [center bottom 20px] at (0.5) is [50% calc(-10px + 75%)] 
+PASS Web Animations: property <background-position> from [center center] to [center bottom 20px] at (0.75) is [50% calc(-15px + 87.5%)] 
+PASS Web Animations: property <background-position> from [center center] to [center bottom 20px] at (1) is [50% calc(-20px + 100%)] 
 PASS Web Animations: property <background-position> from [center center] to [right 20px bottom 20px] at (0) is [50% 50%] 
 PASS Web Animations: property <background-position> from [center center] to [right 20px bottom 20px] at (0.25) is [calc(-5px + 62.5%) calc(-5px + 62.5%)] 
 PASS Web Animations: property <background-position> from [center center] to [right 20px bottom 20px] at (0.5) is [calc(-10px + 75%) calc(-10px + 75%)] 
 PASS Web Animations: property <background-position> from [center center] to [right 20px bottom 20px] at (0.75) is [calc(-15px + 87.5%) calc(-15px + 87.5%)] 
 PASS Web Animations: property <background-position> from [center center] to [right 20px bottom 20px] at (1) is [calc(-20px + 100%) calc(-20px + 100%)] 
+PASS Web Animations: property <background-position> from [center] to [bottom] at (0) is [50% 50%] 
+PASS Web Animations: property <background-position> from [center] to [bottom] at (0.25) is [50% 62.5%] 
+PASS Web Animations: property <background-position> from [center] to [bottom] at (0.5) is [50% 75%] 
+PASS Web Animations: property <background-position> from [center] to [bottom] at (0.75) is [50% 87.5%] 
+PASS Web Animations: property <background-position> from [center] to [bottom] at (1) is [50% 100%] 
 Harness: the test ran to completion.
 
diff --git a/third_party/WebKit/LayoutTests/animations/interpolation/background-position-origin-interpolation.html b/third_party/WebKit/LayoutTests/animations/interpolation/background-position-origin-interpolation.html
index de91281..14ccc923 100644
--- a/third_party/WebKit/LayoutTests/animations/interpolation/background-position-origin-interpolation.html
+++ b/third_party/WebKit/LayoutTests/animations/interpolation/background-position-origin-interpolation.html
@@ -96,11 +96,11 @@
   from: 'center center',
   to: 'center top 20px',
 }, [
-  {at: 0, is: 'left 50% top 50%'},
-  {at: 0.25, is: 'left 50% top calc(5px + 37.5%)'},
-  {at: 0.5, is: 'left 50% top calc(10px + 25%)'},
-  {at: 0.75, is: 'left 50% top calc(15px + 12.5%)'},
-  {at: 1, is: 'left 50% top 20px'},
+  {at: 0, is: '50% 50%'},
+  {at: 0.25, is: '50% calc(5px + 37.5%)'},
+  {at: 0.5, is: '50% calc(10px + 25%)'},
+  {at: 0.75, is: '50% calc(15px + 12.5%)'},
+  {at: 1, is: '50% 20px'},
 ]);
 
 // right-top
@@ -122,11 +122,11 @@
   from: 'center center',
   to: 'left 20px center',
 }, [
-  {at: 0, is: 'left 50% top 50%'},
-  {at: 0.25, is: 'left calc(5px + 37.5%) top 50%'},
-  {at: 0.5, is: 'left calc(10px + 25%) top 50%'},
-  {at: 0.75, is: 'left calc(15px + 12.5%) top 50%'},
-  {at: 1, is: 'left 20px top 50%'},
+  {at: 0, is: '50% 50%'},
+  {at: 0.25, is: 'calc(5px + 37.5%) 50%'},
+  {at: 0.5, is: 'calc(10px + 25%) 50%'},
+  {at: 0.75, is: 'calc(15px + 12.5%) 50%'},
+  {at: 1, is: '20px 50%'},
 ]);
 
 // center-center
@@ -148,11 +148,11 @@
   from: 'center center',
   to: 'right 20px center',
 }, [
-  {at: 0, is: 'left 50% top 50%'},
-  {at: 0.25, is: 'left calc(-5px + 62.5%) top 50%'},
-  {at: 0.5, is: 'left calc(-10px + 75%) top 50%'},
-  {at: 0.75, is: 'left calc(-15px + 87.5%) top 50%'},
-  {at: 1, is: 'left calc(-20px + 100%) top 50%'},
+  {at: 0, is: '50% 50%'},
+  {at: 0.25, is: 'calc(-5px + 62.5%) 50%'},
+  {at: 0.5, is: 'calc(-10px + 75%) 50%'},
+  {at: 0.75, is: 'calc(-15px + 87.5%) 50%'},
+  {at: 1, is: 'calc(-20px + 100%) 50%'},
 ]);
 
 // left-bottom
@@ -174,11 +174,11 @@
   from: 'center center',
   to: 'center bottom 20px',
 }, [
-  {at: 0, is: 'left 50% top 50%'},
-  {at: 0.25, is: 'left 50% top calc(-5px + 62.5%)'},
-  {at: 0.5, is: 'left 50% top calc(-10px + 75%)'},
-  {at: 0.75, is: 'left 50% top calc(-15px + 87.5%)'},
-  {at: 1, is: 'left 50% top calc(-20px + 100%)'},
+  {at: 0, is: '50% 50%'},
+  {at: 0.25, is: '50% calc(-5px + 62.5%)'},
+  {at: 0.5, is: '50% calc(-10px + 75%)'},
+  {at: 0.75, is: '50% calc(-15px + 87.5%)'},
+  {at: 1, is: '50% calc(-20px + 100%)'},
 ]);
 
 // right-bottom
@@ -193,5 +193,18 @@
   {at: 0.75, is: 'calc(-15px + 87.5%) calc(-15px + 87.5%)'},
   {at: 1, is: 'calc(-20px + 100%) calc(-20px + 100%)'},
 ]);
+
+// Single values
+assertInterpolation({
+  property: 'background-position',
+  from: 'center',
+  to: 'bottom',
+}, [
+  {at: 0, is: '50% 50%'},
+  {at: 0.25, is: '50% 62.5%'},
+  {at: 0.5, is: '50% 75%'},
+  {at: 0.75, is: '50% 87.5%'},
+  {at: 1, is: '50% 100%'},
+]);
 </script>
 </body>
diff --git a/third_party/WebKit/LayoutTests/animations/responsive/background-position-responsive.html b/third_party/WebKit/LayoutTests/animations/responsive/background-position-responsive.html
new file mode 100644
index 0000000..10f734c6d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/animations/responsive/background-position-responsive.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<script src="resources/responsive-test.js"></script>
+<script>
+assertCSSResponsive({
+  property: 'background-position',
+  from: neutralKeyframe,
+  to: '100px 100px',
+  configurations: [{
+    state: {underlying: '20px 60px'},
+    expect: [
+      {at: 0.25, is: '40px 70px'},
+      {at: 0.75, is: '80px 90px'},
+    ],
+  }, {
+    state: {underlying: '60px 20px'},
+    expect: [
+      {at: 0.25, is: '70px 40px'},
+      {at: 0.75, is: '90px 80px'},
+    ],
+  }],
+});
+
+assertCSSResponsive({
+  property: 'background-position',
+  from: 'inherit',
+  to: '100px 100px',
+  configurations: [{
+    state: {inherited: '20px 60px'},
+    expect: [
+      {at: 0.25, is: '40px 70px'},
+      {at: 0.75, is: '80px 90px'},
+    ],
+  }, {
+    state: {inherited: '60px 20px'},
+    expect: [
+      {at: 0.25, is: '70px 40px'},
+      {at: 0.75, is: '90px 80px'},
+    ],
+  }],
+});
+</script>
diff --git a/third_party/WebKit/LayoutTests/fast/events/sequential-focus-navigation-starting-point.html b/third_party/WebKit/LayoutTests/fast/events/sequential-focus-navigation-starting-point.html
index a1dfa66..e65c502 100644
--- a/third_party/WebKit/LayoutTests/fast/events/sequential-focus-navigation-starting-point.html
+++ b/third_party/WebKit/LayoutTests/fast/events/sequential-focus-navigation-starting-point.html
@@ -16,11 +16,26 @@
     eventSender.mouseDown();
     eventSender.keyDown('\t');
     assert_equals(document.activeElement.id, 'next');
+    eventSender.mouseUp();
 
     hoverOverElement(container.querySelector('div'));
     eventSender.mouseDown();
     eventSender.keyDown('\t', ['shiftKey']);
     assert_equals(document.activeElement.id, 'prev');
+    eventSender.mouseUp();
+
+    container.innerHTML = '<span style="font-size:60px;"><input id=prev>Text Text<input id=next></span>';
+    hoverOverElement(container.querySelector('span'));
+    eventSender.mouseDown();
+    eventSender.keyDown('\t');
+    assert_equals(document.activeElement.id, 'next');
+    eventSender.mouseUp();
+
+    hoverOverElement(container.querySelector('span'));
+    eventSender.mouseDown();
+    eventSender.keyDown('\t', ['shiftKey']);
+    assert_equals(document.activeElement.id, 'prev');
+    eventSender.mouseUp();
 }, 'Mouse press should update sequential focus navigation starting point.');
 
 test(function() {
diff --git a/third_party/WebKit/LayoutTests/fast/inline/propagate-style-to-anonymous-children-of-inline-expected.txt b/third_party/WebKit/LayoutTests/fast/inline/propagate-style-to-anonymous-children-of-inline-expected.txt
new file mode 100644
index 0000000..0383162
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/inline/propagate-style-to-anonymous-children-of-inline-expected.txt
@@ -0,0 +1 @@
+Test passes if it does not crash.
diff --git a/third_party/WebKit/LayoutTests/fast/inline/propagate-style-to-anonymous-children-of-inline.html b/third_party/WebKit/LayoutTests/fast/inline/propagate-style-to-anonymous-children-of-inline.html
new file mode 100644
index 0000000..f5d3137
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/inline/propagate-style-to-anonymous-children-of-inline.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<style>
+* {
+  writing-mode: vertical-lr;
+}
+#child {
+  display: table-header-group;
+}
+</style>
+<script>
+function start() {
+  document.styleSheets[0].deleteRule(0);
+
+  if (window.testRunner)
+    testRunner.dumpAsText();
+}
+</script>
+<body onload="start();">
+<span><span id="child">Test passes if it does not crash.</span></span>
+</body>
diff --git a/third_party/WebKit/LayoutTests/imported/csswg-test/css-shapes-1/shape-outside/shape-image/gradients/shape-outside-radial-gradient-001.html b/third_party/WebKit/LayoutTests/imported/csswg-test/css-shapes-1/shape-outside/shape-image/gradients/shape-outside-radial-gradient-001.html
index c316a98..e92fee6 100644
--- a/third_party/WebKit/LayoutTests/imported/csswg-test/css-shapes-1/shape-outside/shape-image/gradients/shape-outside-radial-gradient-001.html
+++ b/third_party/WebKit/LayoutTests/imported/csswg-test/css-shapes-1/shape-outside/shape-image/gradients/shape-outside-radial-gradient-001.html
@@ -5,7 +5,6 @@
     <link rel="author" title="Bear Travis" href="betravis@adobe.com"/>
     <link rel="help" href="http://www.w3.org/TR/css-shapes-1/#shapes-from-image"/>
     <link rel="help" href="http://www.w3.org/TR/css-shapes-1/#shape-outside-property"/>
-    <link rel="match" href="reference/shape-outside-radial-gradient-001-ref.html"/>
     <meta name="flags" content="ahem dom"/>
     <meta name="assert" content="This test verifies that shape-outside respects a
                                 simple radial gradient."/>
diff --git a/third_party/WebKit/LayoutTests/imported/csswg-test/css-snap-size-1/snap-height-parsing-001.html b/third_party/WebKit/LayoutTests/imported/csswg-test/css-snap-size-1/snap-height-parsing-001.html
index a9690854..f2a93d9 100644
--- a/third_party/WebKit/LayoutTests/imported/csswg-test/css-snap-size-1/snap-height-parsing-001.html
+++ b/third_party/WebKit/LayoutTests/imported/csswg-test/css-snap-size-1/snap-height-parsing-001.html
@@ -2,7 +2,7 @@
 <title>CSS Snap Size: parsing snap-height</title>
 <link rel="author" title="Koji Ishii" href="kojiishi@gmail.com">
 <link rel="help" href="https://drafts.csswg.org/css-snap-size/#snap-height">
-<meta name="assert" content="This test asserts the parser and getComputedStyle works correctly for the snap-height property.">
+<meta name="assert" content="This test asserts the parsing and getComputedStyle works correctly for the snap-height property.">
 <meta name="flags" content="dom">
 <script src="../../../resources/testharness.js"></script>
 <script src="../../../resources/testharnessreport.js"></script>
diff --git a/third_party/WebKit/LayoutTests/imported/csswg-test/css-snap-size-1/snap-width-001-expected.html b/third_party/WebKit/LayoutTests/imported/csswg-test/css-snap-size-1/snap-width-001-expected.html
new file mode 100644
index 0000000..f51606e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/imported/csswg-test/css-snap-size-1/snap-width-001-expected.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<title>CSS Snap Size: snap-width</title>
+<link rel="author" title="Koji Ishii" href="kojiishi@gmail.com">
+<style>
+.test, .ref {
+  font-family: Ahem;
+  font-size: 32px;
+  line-height: 1;
+  margin: .5em 0;
+  width: 20em;
+}
+</style>
+<body>
+<p class="instructions" style="display:none">Test passes if the top and the bottom boxes are the same,
+  including how they look and their horizontal positions.
+<div class="test">XXXXXXXXXX XXXXXXXXX</div>
+<div class="ref">XXXXXXXXXX XXXXXXXXX</div>
+</body>
diff --git a/third_party/WebKit/LayoutTests/imported/csswg-test/css-snap-size-1/snap-width-001.html b/third_party/WebKit/LayoutTests/imported/csswg-test/css-snap-size-1/snap-width-001.html
new file mode 100644
index 0000000..1bb8ad7
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/imported/csswg-test/css-snap-size-1/snap-width-001.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<title>CSS Snap Size: snap-width</title>
+<link rel="author" title="Koji Ishii" href="kojiishi@gmail.com">
+<link rel="help" href="https://drafts.csswg.org/css-snap-size/#snap-width">
+<link rel="match" href="reference/snap-width-001.html">
+<meta name="assert" content="This test asserts the snap-width property rounds down the box width.">
+<meta name="flags" content="ahem">
+<style>
+.test, .ref {
+  font-family: Ahem;
+  font-size: 32px;
+  line-height: 1;
+  margin: .5em 0;
+  width: 20em;
+}
+.test {
+  width: 20.5em;
+  text-align: right;
+  snap-width: 1em;
+}
+</style>
+<body>
+<p class="instructions" style="display:none">Test passes if the top and the bottom boxes are the same,
+  including how they look and their horizontal positions.
+<div class="test">XXXXXXXXXX XXXXXXXXX</div>
+<div class="ref">XXXXXXXXXX XXXXXXXXX</div>
+</body>
diff --git a/third_party/WebKit/LayoutTests/imported/csswg-test/css-snap-size-1/snap-width-border-001-expected.html b/third_party/WebKit/LayoutTests/imported/csswg-test/css-snap-size-1/snap-width-border-001-expected.html
new file mode 100644
index 0000000..6d3330c
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/imported/csswg-test/css-snap-size-1/snap-width-border-001-expected.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<title>CSS Snap Size: snap-width</title>
+<link rel="author" title="Koji Ishii" href="kojiishi@gmail.com">
+<style>
+.test, .ref {
+  border: .4em blue solid;
+  font-family: Ahem;
+  font-size: 32px;
+  line-height: 1;
+  margin: .5em 0;
+  padding: .4em;
+  width: 20em;
+}
+</style>
+<body>
+<p class="instructions" style="display:none">Test passes if the top and the bottom boxes are the same,
+  including how they look and their horizontal positions.
+<div class="test">XXXXXXXXXX XXXXXXXXX</div>
+<div class="ref">XXXXXXXXXX XXXXXXXXX</div>
+</body>
diff --git a/third_party/WebKit/LayoutTests/imported/csswg-test/css-snap-size-1/snap-width-border-001.html b/third_party/WebKit/LayoutTests/imported/csswg-test/css-snap-size-1/snap-width-border-001.html
new file mode 100644
index 0000000..e0dce11
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/imported/csswg-test/css-snap-size-1/snap-width-border-001.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<title>CSS Snap Size: snap-width</title>
+<link rel="author" title="Koji Ishii" href="kojiishi@gmail.com">
+<link rel="help" href="https://drafts.csswg.org/css-snap-size/#snap-width">
+<link rel="match" href="reference/snap-width-border-001.html">
+<meta name="assert" content="This test asserts the snap-width property rounds down the box width.">
+<meta name="flags" content="ahem">
+<style>
+.test, .ref {
+  border: .4em blue solid;
+  font-family: Ahem;
+  font-size: 32px;
+  line-height: 1;
+  margin: .5em 0;
+  padding: .4em;
+  width: 20em;
+}
+.test {
+  width: 20.5em;
+  text-align: right;
+  snap-width: 1em;
+}
+</style>
+<body>
+<p class="instructions" style="display:none">Test passes if the top and the bottom boxes are the same,
+  including how they look and their horizontal positions.
+<div class="test">XXXXXXXXXX XXXXXXXXX</div>
+<div class="ref">XXXXXXXXXX XXXXXXXXX</div>
+</body>
diff --git a/third_party/WebKit/LayoutTests/imported/csswg-test/css-snap-size-1/snap-width-padding-001-expected.html b/third_party/WebKit/LayoutTests/imported/csswg-test/css-snap-size-1/snap-width-padding-001-expected.html
new file mode 100644
index 0000000..77617e7
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/imported/csswg-test/css-snap-size-1/snap-width-padding-001-expected.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<title>CSS Snap Size: snap-width</title>
+<link rel="author" title="Koji Ishii" href="kojiishi@gmail.com">
+<style>
+.test, .ref {
+  font-family: Ahem;
+  font-size: 32px;
+  line-height: 1;
+  margin: .5em 0;
+  padding: .4em;
+  width: 20em;
+}
+</style>
+<body>
+<p class="instructions" style="display:none">Test passes if the top and the bottom boxes are the same,
+  including how they look and their horizontal positions.
+<div class="test">XXXXXXXXXX XXXXXXXXX</div>
+<div class="ref">XXXXXXXXXX XXXXXXXXX</div>
+</body>
diff --git a/third_party/WebKit/LayoutTests/imported/csswg-test/css-snap-size-1/snap-width-padding-001.html b/third_party/WebKit/LayoutTests/imported/csswg-test/css-snap-size-1/snap-width-padding-001.html
new file mode 100644
index 0000000..b567c6b2
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/imported/csswg-test/css-snap-size-1/snap-width-padding-001.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<title>CSS Snap Size: snap-width</title>
+<link rel="author" title="Koji Ishii" href="kojiishi@gmail.com">
+<link rel="help" href="https://drafts.csswg.org/css-snap-size/#snap-width">
+<link rel="match" href="reference/snap-width-padding-001.html">
+<meta name="assert" content="This test asserts the snap-width property rounds down the box width.">
+<meta name="flags" content="ahem">
+<style>
+.test, .ref {
+  font-family: Ahem;
+  font-size: 32px;
+  line-height: 1;
+  margin: .5em 0;
+  padding: .4em;
+  width: 20em;
+}
+.test {
+  width: 20.5em;
+  text-align: right;
+  snap-width: 1em;
+}
+</style>
+<body>
+<p class="instructions" style="display:none">Test passes if the top and the bottom boxes are the same,
+  including how they look and their horizontal positions.
+<div class="test">XXXXXXXXXX XXXXXXXXX</div>
+<div class="ref">XXXXXXXXXX XXXXXXXXX</div>
+</body>
diff --git a/third_party/WebKit/LayoutTests/imported/csswg-test/css-snap-size-1/snap-width-parsing-001-expected.txt b/third_party/WebKit/LayoutTests/imported/csswg-test/css-snap-size-1/snap-width-parsing-001-expected.txt
new file mode 100644
index 0000000..1866465
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/imported/csswg-test/css-snap-size-1/snap-width-parsing-001-expected.txt
@@ -0,0 +1,13 @@
+This is a testharness.js-based test.
+FAIL initial value assert_equals: expected (string) "0px" but got (undefined) undefined
+FAIL snap-width: 20px assert_equals: expected (string) "20px" but got (undefined) undefined
+FAIL snap-width should not inherit assert_equals: expected (string) "0px" but got (undefined) undefined
+FAIL snap-width: inherit assert_equals: expected (string) "20px" but got (undefined) undefined
+FAIL snap-width: 20px; snap-width: initial assert_equals: expected (string) "0px" but got (undefined) undefined
+FAIL snap-width: 20px; snap-width: 0 assert_equals: expected (string) "0px" but got (undefined) undefined
+FAIL snap-width: 20px; snap-width: 1 assert_equals: expected (string) "20px" but got (undefined) undefined
+FAIL snap-width: 20px; snap-width: -1px assert_equals: expected (string) "20px" but got (undefined) undefined
+FAIL snap-width: 20px; snap-width: 10% assert_equals: expected (string) "20px" but got (undefined) undefined
+FAIL Computed value must be the absolute length Cannot read property 'slice' of undefined
+Harness: the test ran to completion.
+
diff --git a/third_party/WebKit/LayoutTests/imported/csswg-test/css-snap-size-1/snap-width-parsing-001.html b/third_party/WebKit/LayoutTests/imported/csswg-test/css-snap-size-1/snap-width-parsing-001.html
new file mode 100644
index 0000000..ae77e76
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/imported/csswg-test/css-snap-size-1/snap-width-parsing-001.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<title>CSS Snap Size: parsing snap-width</title>
+<link rel="author" title="Koji Ishii" href="kojiishi@gmail.com">
+<link rel="help" href="https://drafts.csswg.org/css-snap-size/#snap-width">
+<meta name="assert" content="This test asserts the parsing and getComputedStyle works correctly for the snap-width property.">
+<meta name="flags" content="dom">
+<script src="../../../resources/testharness.js"></script>
+<script src="../../../resources/testharnessreport.js"></script>
+
+<div data-expected="0px" title="initial value"></div>
+
+<div style="snap-width: 20px" data-expected="20px">
+  <div data-expected="0px" title="snap-width should not inherit"></div>
+  <div style="snap-width: inherit" data-expected="20px"></div>
+</div>
+
+<div style="snap-width: 20px; snap-width: initial" data-expected="0px"></div>
+
+<!--  "0" is a valid length even without units  -->
+<div style="snap-width: 20px; snap-width: 0" data-expected="0px"></div>
+
+<!--  These are invalid and thus its preceding declarations should remain  -->
+<div style="snap-width: 20px; snap-width: 1" data-expected="20px"></div>
+<div style="snap-width: 20px; snap-width: -1px" data-expected="20px"></div>
+<div style="snap-width: 20px; snap-width: 10%" data-expected="20px"></div>
+
+<div id="pt" style="snap-width: 40pt"></div>
+
+<script>
+Array.prototype.forEach.call(document.querySelectorAll("[data-expected]"), function (element) {
+  test(function () {
+    var actual = getComputedStyle(element).snapWidth;
+    assert_equals(actual, element.dataset.expected);
+  }, element.title || element.getAttribute("style"));
+});
+
+test(function () {
+  assert_equals(getComputedStyle(document.getElementById("pt")).snapWidth.slice(-2), "px");
+}, "Computed value must be the absolute length");
+</script>
diff --git a/third_party/WebKit/LayoutTests/inspector/console/console-control-characters-expected.txt b/third_party/WebKit/LayoutTests/inspector/console/console-control-characters-expected.txt
new file mode 100644
index 0000000..c840aac3
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector/console/console-control-characters-expected.txt
@@ -0,0 +1,5 @@
+Verify that control characters are substituted with printable characters.
+
+var� i = 0;
+ Uncaught SyntaxError: Unexpected token ILLEGAL(…)
+
diff --git a/third_party/WebKit/LayoutTests/inspector/console/console-control-characters.html b/third_party/WebKit/LayoutTests/inspector/console/console-control-characters.html
new file mode 100644
index 0000000..afdc95a
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector/console/console-control-characters.html
@@ -0,0 +1,28 @@
+<html>
+<head>
+<script src="../../http/tests/inspector/inspector-test.js"></script>
+<script src="../../http/tests/inspector/console-test.js"></script>
+<script>
+
+function test()
+{
+    // The following command has control character.
+    InspectorTest.evaluateInConsole("var\u001D i = 0;", onEvaluated);
+
+    function onEvaluated()
+    {
+        InspectorTest.dumpConsoleMessages();
+        InspectorTest.completeTest();
+    }
+}
+
+</script>
+</head>
+
+<body onload="runTest()">
+<p>
+    Verify that control characters are substituted with printable characters.
+</p>
+
+</body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/inspector/console/console-linkify-message-location-expected.txt b/third_party/WebKit/LayoutTests/inspector/console/console-linkify-message-location-expected.txt
new file mode 100644
index 0000000..27a80c1
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector/console/console-linkify-message-location-expected.txt
@@ -0,0 +1,8 @@
+CONSOLE MESSAGE: line 8: 239
+Test that console.log() would linkify its location in respect with blackboxing.
+
+foo.js:4 
+boo.js:4
+VM:1
+foo.js:4
+
diff --git a/third_party/WebKit/LayoutTests/inspector/console/console-linkify-message-location.html b/third_party/WebKit/LayoutTests/inspector/console/console-linkify-message-location.html
new file mode 100644
index 0000000..8c8be39a
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector/console/console-linkify-message-location.html
@@ -0,0 +1,73 @@
+<html>
+<head>
+<script src="../../http/tests/inspector/inspector-test.js"></script>
+<script src="../../http/tests/inspector/console-test.js"></script>
+<script>
+function foo()
+{
+    console.trace(239);
+}
+//# sourceURL=foo.js
+</script>
+<script>
+function boo()
+{
+    foo();
+}
+//# sourceURL=boo.js
+</script>
+<script>
+
+function test()
+{
+    InspectorTest.evaluateInPage("boo()", step1);
+
+    function step1()
+    {
+        dumpConsoleMessageURLs();
+
+        InspectorTest.addSniffer(WebInspector.BlackboxManager.prototype, "_patternChangeFinishedForTests", step2);
+        var frameworkRegexString = "foo\\.js";
+        WebInspector.settingForTest("skipStackFramesPattern").set(frameworkRegexString);
+    }
+
+    function step2()
+    {
+        dumpConsoleMessageURLs();
+        InspectorTest.addSniffer(WebInspector.BlackboxManager.prototype, "_patternChangeFinishedForTests", step3);
+        var frameworkRegexString = "foo\\.js|boo\\.js";
+        WebInspector.settingForTest("skipStackFramesPattern").set(frameworkRegexString);
+    }
+
+    function step3()
+    {
+        dumpConsoleMessageURLs();
+        InspectorTest.addSniffer(WebInspector.BlackboxManager.prototype, "_patternChangeFinishedForTests", step4);
+        var frameworkRegexString = "";
+        WebInspector.settingForTest("skipStackFramesPattern").set(frameworkRegexString);
+    }
+
+    function step4()
+    {
+        dumpConsoleMessageURLs();
+        InspectorTest.completeTest();
+    }
+
+    function dumpConsoleMessageURLs()
+    {
+        var messages = WebInspector.ConsolePanel._view()._visibleViewMessages;
+        for (var i = 0; i < messages.length; ++i) {
+            var element = messages[i].toMessageElement();
+            var anchor = element.querySelector(".console-message-url");
+            InspectorTest.addResult(anchor.textContent.replace(/VM\d+/g, "VM"));
+        }
+    }
+}
+</script>
+</head>
+<body onload="runTest()">
+<p>
+Test that console.log() would linkify its location in respect with blackboxing.
+</p>
+</body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/inspector/elements/elements-inspect-iframe-from-different-domain.html b/third_party/WebKit/LayoutTests/inspector/elements/elements-inspect-iframe-from-different-domain.html
index 7071548..3a9ef5a 100644
--- a/third_party/WebKit/LayoutTests/inspector/elements/elements-inspect-iframe-from-different-domain.html
+++ b/third_party/WebKit/LayoutTests/inspector/elements/elements-inspect-iframe-from-different-domain.html
@@ -52,7 +52,8 @@
             InspectorTest.addResult("PASS: selected node  with id '" + id + "'");
         else
             InspectorTest.addResult("FAIL: unexpected selection " + id);
-        InspectorTest.evaluateInConsole("inspect(el2)", step4);
+        // Frame was changed to the iframe. Moving back to the top frame.
+        InspectorTest.evaluateInConsole("inspect(window.frameElement.parentElement)", step4);
     }
 
     function step4()
@@ -62,6 +63,16 @@
 
     function step5()
     {
+        InspectorTest.evaluateInConsole("inspect(el2)", step6);
+    }
+
+    function step6()
+    {
+        InspectorTest.runAfterPendingDispatches(step7);
+    }
+
+    function step7()
+    {
         var id = selectedNodeId();
         if (id === "iframe-div")
             InspectorTest.addResult("PASS: selected node  with id '" + id + "'");
diff --git a/third_party/WebKit/LayoutTests/inspector/elements/selected-element-changes-execution-context-expected.txt b/third_party/WebKit/LayoutTests/inspector/elements/selected-element-changes-execution-context-expected.txt
new file mode 100644
index 0000000..4a7012e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector/elements/selected-element-changes-execution-context-expected.txt
@@ -0,0 +1,12 @@
+Tests that the execution context is changed to match new selected node.
+
+
+Context has changed:
+true
+Context matches node frameId: 
+true
+Context has changed:
+true
+Context matches node frameId: 
+true
+
diff --git a/third_party/WebKit/LayoutTests/inspector/elements/selected-element-changes-execution-context.html b/third_party/WebKit/LayoutTests/inspector/elements/selected-element-changes-execution-context.html
new file mode 100644
index 0000000..9328ee2
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector/elements/selected-element-changes-execution-context.html
@@ -0,0 +1,47 @@
+<html>
+<head>
+<script src="../../http/tests/inspector/inspector-test.js"></script>
+<script src="../../http/tests/inspector/elements-test.js"></script>
+<script>
+function test()
+{
+    InspectorTest.expandElementsTree(selectNode);
+    var previousContext;
+
+    function selectNode()
+    {
+        previousContext = WebInspector.context.flavor(WebInspector.ExecutionContext);
+        InspectorTest.selectNodeWithId("head", iframeNodeSelected);
+    }
+
+    function iframeNodeSelected()
+    {
+        var node = WebInspector.panels.elements.selectedDOMNode();
+        var currentContext = WebInspector.context.flavor(WebInspector.ExecutionContext);
+        InspectorTest.addResult("Context has changed:");
+        InspectorTest.addResult(previousContext.id !== currentContext.id);
+        InspectorTest.addResult("Context matches node frameId: ");
+        InspectorTest.addResult(currentContext.frameId == node.frameId());
+        previousContext = currentContext;
+        InspectorTest.selectNodeWithId("element", elementSelected);
+    }
+
+    function elementSelected()
+    {
+        var node = WebInspector.panels.elements.selectedDOMNode();
+        var currentContext = WebInspector.context.flavor(WebInspector.ExecutionContext);
+        InspectorTest.addResult("Context has changed:");
+        InspectorTest.addResult(previousContext.id !== currentContext.id);
+        InspectorTest.addResult("Context matches node frameId: ");
+        InspectorTest.addResult(currentContext.frameId == node.frameId());
+        InspectorTest.completeTest();
+    }
+}
+</script>
+</head>
+<body>
+    <p>Tests that the execution context is changed to match new selected node.</p>
+    <iframe src="resources/set-outer-html-body-iframe.html" onload="runTest()"></iframe>
+    <div id="element"></div>
+</body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/inspector/sass/resources/test-edit-insert-property.css b/third_party/WebKit/LayoutTests/inspector/sass/resources/test-edit-insert-property.css
new file mode 100644
index 0000000..07e7f2f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector/sass/resources/test-edit-insert-property.css
@@ -0,0 +1,16 @@
+.box1 {
+  color: red;
+  margin: 10px; }
+
+.box2 {
+  color: red;
+  margin: 10px; }
+
+.box3 {
+  color: red;
+  margin: 10px; }
+
+body {
+  font-family: "arial"; }
+
+/*# sourceMappingURL=test-edit-insert-property.css.map */
diff --git a/third_party/WebKit/LayoutTests/inspector/sass/resources/test-edit-insert-property.css.map b/third_party/WebKit/LayoutTests/inspector/sass/resources/test-edit-insert-property.css.map
new file mode 100644
index 0000000..43ef62c
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector/sass/resources/test-edit-insert-property.css.map
@@ -0,0 +1,7 @@
+{
+"version": 3,
+"mappings": "AAGI,KAAU;EACN,KAAK,EAJL,GAAG;EAKH,MAAM,EAAE,IAAI;;AAFhB,KAAU;EACN,KAAK,EAJL,GAAG;EAKH,MAAM,EAAE,IAAI;;AAFhB,KAAU;EACN,KAAK,EAJL,GAAG;EAKH,MAAM,EAAE,IAAI;;AAIpB,IAAK;EACD,WAAW,EAAE,OAAO",
+"sources": ["test-edit-insert-property.scss"],
+"names": [],
+"file": "test-edit-insert-property.css"
+}
diff --git a/third_party/WebKit/LayoutTests/inspector/sass/resources/test-edit-insert-property.scss b/third_party/WebKit/LayoutTests/inspector/sass/resources/test-edit-insert-property.scss
new file mode 100644
index 0000000..1ee139ed
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector/sass/resources/test-edit-insert-property.scss
@@ -0,0 +1,12 @@
+$color: red;
+
+@for $i from 1 through 3 {
+    .box#{$i} {
+        color: $color;
+        margin: 10px;
+    }
+}
+
+body {
+    font-family: "arial";
+}
diff --git a/third_party/WebKit/LayoutTests/inspector/sass/resources/test-edit-remove-property.css b/third_party/WebKit/LayoutTests/inspector/sass/resources/test-edit-remove-property.css
new file mode 100644
index 0000000..9a718d2
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector/sass/resources/test-edit-remove-property.css
@@ -0,0 +1,13 @@
+.box1 {
+  color: red;
+  margin: 10px; }
+
+.box2 {
+  color: red;
+  margin: 10px; }
+
+.box3 {
+  color: red;
+  margin: 10px; }
+
+/*# sourceMappingURL=test-edit-remove-property.css.map */
diff --git a/third_party/WebKit/LayoutTests/inspector/sass/resources/test-edit-remove-property.css.map b/third_party/WebKit/LayoutTests/inspector/sass/resources/test-edit-remove-property.css.map
new file mode 100644
index 0000000..a5b1923
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector/sass/resources/test-edit-remove-property.css.map
@@ -0,0 +1,7 @@
+{
+"version": 3,
+"mappings": "AAEI,KAAU;EACN,KAAK,EAHL,GAAG;EAIH,MAAM,EAAE,IAAI;;AAFhB,KAAU;EACN,KAAK,EAHL,GAAG;EAIH,MAAM,EAAE,IAAI;;AAFhB,KAAU;EACN,KAAK,EAHL,GAAG;EAIH,MAAM,EAAE,IAAI",
+"sources": ["test-edit-remove-property.scss"],
+"names": [],
+"file": "test-edit-remove-property.css"
+}
diff --git a/third_party/WebKit/LayoutTests/inspector/sass/resources/test-edit-remove-property.scss b/third_party/WebKit/LayoutTests/inspector/sass/resources/test-edit-remove-property.scss
new file mode 100644
index 0000000..a0314fd
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector/sass/resources/test-edit-remove-property.scss
@@ -0,0 +1,7 @@
+$color: red;
+@for $i from 1 through 3 {
+    .box#{$i} {
+        color: $color;
+        margin: 10px;
+    }
+}
diff --git a/third_party/WebKit/LayoutTests/inspector/sass/resources/test-edit-toggle-property.css b/third_party/WebKit/LayoutTests/inspector/sass/resources/test-edit-toggle-property.css
new file mode 100644
index 0000000..bf44675
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector/sass/resources/test-edit-toggle-property.css
@@ -0,0 +1,13 @@
+.box1 {
+/*color: red;*/
+  margin: 10px; }
+
+.box2 {
+/*color: red;*/
+  margin: 10px; }
+
+.box3 {
+/*color: red;*/
+  margin: 10px; }
+
+/*# sourceMappingURL=test-edit-toggle-property.css.map */
diff --git a/third_party/WebKit/LayoutTests/inspector/sass/resources/test-edit-toggle-property.css.map b/third_party/WebKit/LayoutTests/inspector/sass/resources/test-edit-toggle-property.css.map
new file mode 100644
index 0000000..46398a4b
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector/sass/resources/test-edit-toggle-property.css.map
@@ -0,0 +1,7 @@
+{
+"version": 3,
+"mappings": "AACI,KAAU;EACH,KAAK,EAAE,GAAG;EACb,MAAM,EAAE,IAAI;;AAFhB,KAAU;EACH,KAAK,EAAE,GAAG;EACb,MAAM,EAAE,IAAI;;AAFhB,KAAU;EACH,KAAK,EAAE,GAAG;EACb,MAAM,EAAE,IAAI",
+"sources": ["test-edit-toggle-property.scss"],
+"names": [],
+"file": "test-edit-toggle-property.css"
+}
diff --git a/third_party/WebKit/LayoutTests/inspector/sass/resources/test-edit-toggle-property.scss b/third_party/WebKit/LayoutTests/inspector/sass/resources/test-edit-toggle-property.scss
new file mode 100644
index 0000000..2e15e95
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector/sass/resources/test-edit-toggle-property.scss
@@ -0,0 +1,6 @@
+@for $i from 1 through 3 {
+    .box#{$i} {
+        /* color: red; */
+        margin: 10px;
+    }
+}
diff --git a/third_party/WebKit/LayoutTests/inspector/sass/test-edit-insert-property-expected.txt b/third_party/WebKit/LayoutTests/inspector/sass/test-edit-insert-property-expected.txt
new file mode 100644
index 0000000..ba121f5
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector/sass/test-edit-insert-property-expected.txt
@@ -0,0 +1,337 @@
+Verify that mapping is not valid for misaligned sources.
+
+INITIAL MODELS
+===== test-edit-insert-property.css =====
+.box1.{
+..color:.red;
+..margin:.10px;.}
+
+.box2.{
+..color:.red;
+..margin:.10px;.}
+
+.box3.{
+..color:.red;
+..margin:.10px;.}
+
+body.{
+..font-family:."arial";.}
+
+/*#.sourceMappingURL=test-edit-insert-property.css.map.*/
+
+===== test-edit-insert-property.scss =====
+$color:.red;
+
+@for.$i.from.1.through.3.{
+.....box#{$i}.{
+........color:.$color;
+........margin:.10px;
+....}
+}
+
+body.{
+....font-family:."arial";
+}
+
+
+------------------------- TEST: testPrependProperty --------------------------
+
+Edits:
+    {1, 2, 1, 7} 'color' => 'border: 1px solid black;color'
+===== test-edit-insert-property.css =====
+    .box1.{
+    ..border:..1px.solid.black;
+    ..color:.red;
+    ..margin:.10px;.}
+    
+    .box2.{
+    ..border:..1px.solid.black;
+    ..color:.red;
+    ..margin:.10px;.}
+    
+    .box3.{
+    ..border:..1px.solid.black;
+    ..color:.red;
+    ..margin:.10px;.}
+    
+    body.{
+    ..font-family:."arial";.}
+    
+    /*#.sourceMappingURL=test-edit-insert-property.css.map.*/
+    
+===== test-edit-insert-property.scss =====
+    $color:.red;
+    
+    @for.$i.from.1.through.3.{
+    .....box#{$i}.{
+    ........border:..1px.solid.black;
+    ........color:.$color;
+    ........margin:.10px;
+    ....}
+    }
+    
+    body.{
+    ....font-family:."arial";
+    }
+    
+
+----------------------- TEST: testInsertMiddleProperty -----------------------
+
+Edits:
+    {1, 9, 1, 13} 'red;' => 'red;border: 1px solid black;'
+===== test-edit-insert-property.css =====
+    .box1.{
+    ..color:.red;
+    ..border:..1px.solid.black;
+    ..margin:.10px;.}
+    
+    .box2.{
+    ..color:.red;
+    ..border:..1px.solid.black;
+    ..margin:.10px;.}
+    
+    .box3.{
+    ..color:.red;
+    ..border:..1px.solid.black;
+    ..margin:.10px;.}
+    
+    body.{
+    ..font-family:."arial";.}
+    
+    /*#.sourceMappingURL=test-edit-insert-property.css.map.*/
+    
+===== test-edit-insert-property.scss =====
+    $color:.red;
+    
+    @for.$i.from.1.through.3.{
+    .....box#{$i}.{
+    ........color:.$color;
+    ........border:..1px.solid.black;
+    ........margin:.10px;
+    ....}
+    }
+    
+    body.{
+    ....font-family:."arial";
+    }
+    
+
+---------------------- TEST: testInsertTrailingProperty ----------------------
+
+Edits:
+    {2, 10, 2, 15} '10px;' => '10px;border: 1px solid black;'
+===== test-edit-insert-property.css =====
+    .box1.{
+    ..color:.red;
+    ..margin:.10px;
+    ..border:..1px.solid.black;.}
+    
+    .box2.{
+    ..color:.red;
+    ..margin:.10px;
+    ..border:..1px.solid.black;.}
+    
+    .box3.{
+    ..color:.red;
+    ..margin:.10px;
+    ..border:..1px.solid.black;.}
+    
+    body.{
+    ..font-family:."arial";.}
+    
+    /*#.sourceMappingURL=test-edit-insert-property.css.map.*/
+    
+===== test-edit-insert-property.scss =====
+    $color:.red;
+    
+    @for.$i.from.1.through.3.{
+    .....box#{$i}.{
+    ........color:.$color;
+    ........margin:.10px;
+    ........border:..1px.solid.black;
+    ....}
+    }
+    
+    body.{
+    ....font-family:."arial";
+    }
+    
+
+-------------------- TEST: testInsertDuplicateProperties ---------------------
+
+Edits:
+    {1, 2, 1, 7} 'color' => 'border: 1px solid black;color'
+    {9, 2, 9, 7} 'color' => 'border: 1px solid black;color'
+===== test-edit-insert-property.css =====
+    .box1.{
+    ..border:..1px.solid.black;
+    ..color:.red;
+    ..margin:.10px;.}
+    
+    .box2.{
+    ..border:..1px.solid.black;
+    ..color:.red;
+    ..margin:.10px;.}
+    
+    .box3.{
+    ..border:..1px.solid.black;
+    ..color:.red;
+    ..margin:.10px;.}
+    
+    body.{
+    ..font-family:."arial";.}
+    
+    /*#.sourceMappingURL=test-edit-insert-property.css.map.*/
+    
+===== test-edit-insert-property.scss =====
+    $color:.red;
+    
+    @for.$i.from.1.through.3.{
+    .....box#{$i}.{
+    ........border:..1px.solid.black;
+    ........color:.$color;
+    ........margin:.10px;
+    ....}
+    }
+    
+    body.{
+    ....font-family:."arial";
+    }
+    
+
+---------------- TEST: testPrependDifferentPropertiesSameRule ----------------
+
+Edits:
+    {1, 2, 1, 7} 'color' => 'display:flex;overflow:hidden;color'
+===== test-edit-insert-property.css =====
+    .box1.{
+    ..display:.flex;
+    ..overflow:.hidden;
+    ..color:.red;
+    ..margin:.10px;.}
+    
+    .box2.{
+    ..display:.flex;
+    ..overflow:.hidden;
+    ..color:.red;
+    ..margin:.10px;.}
+    
+    .box3.{
+    ..display:.flex;
+    ..overflow:.hidden;
+    ..color:.red;
+    ..margin:.10px;.}
+    
+    body.{
+    ..font-family:."arial";.}
+    
+    /*#.sourceMappingURL=test-edit-insert-property.css.map.*/
+    
+===== test-edit-insert-property.scss =====
+    $color:.red;
+    
+    @for.$i.from.1.through.3.{
+    .....box#{$i}.{
+    ........display:.flex;
+    ........overflow:.hidden;
+    ........color:.$color;
+    ........margin:.10px;
+    ....}
+    }
+    
+    body.{
+    ....font-family:."arial";
+    }
+    
+
+------------ TEST: testInsertTrailingDifferentPropertiesSameRule -------------
+
+Edits:
+    {2, 10, 2, 15} '10px;' => '10px;display:flex;overflow:hidden;'
+===== test-edit-insert-property.css =====
+    .box1.{
+    ..color:.red;
+    ..margin:.10px;
+    ..display:.flex;
+    ..overflow:.hidden;.}
+    
+    .box2.{
+    ..color:.red;
+    ..margin:.10px;
+    ..display:.flex;
+    ..overflow:.hidden;.}
+    
+    .box3.{
+    ..color:.red;
+    ..margin:.10px;
+    ..display:.flex;
+    ..overflow:.hidden;.}
+    
+    body.{
+    ..font-family:."arial";.}
+    
+    /*#.sourceMappingURL=test-edit-insert-property.css.map.*/
+    
+===== test-edit-insert-property.scss =====
+    $color:.red;
+    
+    @for.$i.from.1.through.3.{
+    .....box#{$i}.{
+    ........color:.$color;
+    ........margin:.10px;
+    ........display:.flex;
+    ........overflow:.hidden;
+    ....}
+    }
+    
+    body.{
+    ....font-family:."arial";
+    }
+    
+
+------------- TEST: testInsertDifferentPropertiesDifferentRules --------------
+
+Edits:
+    {1, 2, 1, 7} 'color' => 'margin:10px;color'
+    {10, 10, 10, 15} '10px;' => '10px;border: 1px solid black;'
+===== test-edit-insert-property.css =====
+    .box1.{
+    ..margin:.10px;
+    ..color:.red;
+    ..margin:.10px;
+    ..border:..1px.solid.black;.}
+    
+    .box2.{
+    ..margin:.10px;
+    ..color:.red;
+    ..margin:.10px;
+    ..border:..1px.solid.black;.}
+    
+    .box3.{
+    ..margin:.10px;
+    ..color:.red;
+    ..margin:.10px;
+    ..border:..1px.solid.black;.}
+    
+    body.{
+    ..font-family:."arial";.}
+    
+    /*#.sourceMappingURL=test-edit-insert-property.css.map.*/
+    
+===== test-edit-insert-property.scss =====
+    $color:.red;
+    
+    @for.$i.from.1.through.3.{
+    .....box#{$i}.{
+    ........margin:.10px;
+    ........color:.$color;
+    ........margin:.10px;
+    ........border:..1px.solid.black;
+    ....}
+    }
+    
+    body.{
+    ....font-family:."arial";
+    }
+    
+
diff --git a/third_party/WebKit/LayoutTests/inspector/sass/test-edit-insert-property.html b/third_party/WebKit/LayoutTests/inspector/sass/test-edit-insert-property.html
new file mode 100644
index 0000000..4d8ce5d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector/sass/test-edit-insert-property.html
@@ -0,0 +1,76 @@
+<html>
+<head>
+
+<link rel="stylesheet" href="resources/test-edit-insert-property.css">
+
+<script src="../../http/tests/inspector/inspector-test.js"></script>
+<script src="../../http/tests/inspector/debugger-test.js"></script>
+<script src="./sass-test.js"></script>
+<script>
+
+function test()
+{
+    var header = InspectorTest.cssModel.styleSheetHeaders().find(header => !!header.sourceMapURL)
+
+    InspectorTest.runCSSEditTests(header, [
+        function testPrependProperty(text)
+        {
+            return [
+                InspectorTest.createEdit(text, "color", "border: 1px solid black;color")
+            ];
+        },
+
+        function testInsertMiddleProperty(text)
+        {
+            return [
+                InspectorTest.createEdit(text, "red;", "red;border: 1px solid black;")
+            ];
+        },
+
+        function testInsertTrailingProperty(text)
+        {
+            return [
+                InspectorTest.createEdit(text, "10px;", "10px;border: 1px solid black;")
+            ];
+        },
+
+        function testInsertDuplicateProperties(text)
+        {
+            return [
+                InspectorTest.createEdit(text, "color", "border: 1px solid black;color", 0),
+                InspectorTest.createEdit(text, "color", "border: 1px solid black;color", 2),
+            ];
+        },
+
+        function testPrependDifferentPropertiesSameRule(text)
+        {
+            return [
+                InspectorTest.createEdit(text, "color", "display:flex;overflow:hidden;color"),
+            ];
+        },
+
+        function testInsertTrailingDifferentPropertiesSameRule(text)
+        {
+            return [
+                InspectorTest.createEdit(text, "10px;", "10px;display:flex;overflow:hidden;"),
+            ];
+        },
+
+        function testInsertDifferentPropertiesDifferentRules(text)
+        {
+            return [
+                InspectorTest.createEdit(text, "color", "margin:10px;color", 0),
+                InspectorTest.createEdit(text, "10px;", "10px;border: 1px solid black;", 2)
+            ];
+        },
+    ]);
+}
+
+</script>
+
+</head>
+
+<body onload="runTest()">
+<p>Verify that mapping is not valid for misaligned sources.</p>
+</body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/inspector/sass/test-edit-remove-property-expected.txt b/third_party/WebKit/LayoutTests/inspector/sass/test-edit-remove-property-expected.txt
new file mode 100644
index 0000000..5a2f9d28
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector/sass/test-edit-remove-property-expected.txt
@@ -0,0 +1,135 @@
+Verify that mapping is not valid for misaligned sources.
+
+INITIAL MODELS
+===== test-edit-remove-property.css =====
+.box1.{
+..color:.red;
+..margin:.10px;.}
+
+.box2.{
+..color:.red;
+..margin:.10px;.}
+
+.box3.{
+..color:.red;
+..margin:.10px;.}
+
+/*#.sourceMappingURL=test-edit-remove-property.css.map.*/
+
+===== test-edit-remove-property.scss =====
+$color:.red;
+@for.$i.from.1.through.3.{
+.....box#{$i}.{
+........color:.$color;
+........margin:.10px;
+....}
+}
+
+
+-------------------------- TEST: testRemoveProperty --------------------------
+
+Edits:
+    {2, 2, 2, 15} 'margin: 10px;' => ''
+===== test-edit-remove-property.css =====
+    .box1.{
+    ..color:.red;
+    ...}
+    
+    .box2.{
+    ..color:.red;
+    ...}
+    
+    .box3.{
+    ..color:.red;
+    ...}
+    
+    /*#.sourceMappingURL=test-edit-remove-property.css.map.*/
+    
+===== test-edit-remove-property.scss =====
+    $color:.red;
+    @for.$i.from.1.through.3.{
+    .....box#{$i}.{
+    ........color:.$color;
+    ....}
+    }
+    
+
+---------------------- TEST: testRemovePropertyVariable ----------------------
+
+Edits:
+    {1, 2, 1, 13} 'color: red;' => ''
+===== test-edit-remove-property.css =====
+    .box1.{
+    ..margin:.10px;.}
+    
+    .box2.{
+    ..margin:.10px;.}
+    
+    .box3.{
+    ..margin:.10px;.}
+    
+    /*#.sourceMappingURL=test-edit-remove-property.css.map.*/
+    
+===== test-edit-remove-property.scss =====
+    $color:.red;
+    @for.$i.from.1.through.3.{
+    .....box#{$i}.{
+    ........margin:.10px;
+    ....}
+    }
+    
+
+--------------------- TEST: testRemoveMultipleProperties ---------------------
+
+Edits:
+    {2, 2, 2, 15} 'margin: 10px;' => ''
+    {10, 2, 10, 15} 'margin: 10px;' => ''
+===== test-edit-remove-property.css =====
+    .box1.{
+    ..color:.red;
+    ...}
+    
+    .box2.{
+    ..color:.red;
+    ...}
+    
+    .box3.{
+    ..color:.red;
+    ...}
+    
+    /*#.sourceMappingURL=test-edit-remove-property.css.map.*/
+    
+===== test-edit-remove-property.scss =====
+    $color:.red;
+    @for.$i.from.1.through.3.{
+    .....box#{$i}.{
+    ........color:.$color;
+    ....}
+    }
+    
+
+---------------- TEST: testRemoveMultipleDifferentProperties -----------------
+
+Edits:
+    {6, 2, 6, 15} 'margin: 10px;' => ''
+    {9, 2, 9, 13} 'color: red;' => ''
+===== test-edit-remove-property.css =====
+    .box1.{
+    ...}
+    
+    .box2.{
+    ...}
+    
+    .box3.{
+    ...}
+    
+    /*#.sourceMappingURL=test-edit-remove-property.css.map.*/
+    
+===== test-edit-remove-property.scss =====
+    $color:.red;
+    @for.$i.from.1.through.3.{
+    .....box#{$i}.{
+    ....}
+    }
+    
+
diff --git a/third_party/WebKit/LayoutTests/inspector/sass/test-edit-remove-property.html b/third_party/WebKit/LayoutTests/inspector/sass/test-edit-remove-property.html
new file mode 100644
index 0000000..14dabfd3
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector/sass/test-edit-remove-property.html
@@ -0,0 +1,55 @@
+<html>
+<head>
+
+<link rel="stylesheet" href="resources/test-edit-remove-property.css">
+
+<script src="../../http/tests/inspector/inspector-test.js"></script>
+<script src="../../http/tests/inspector/debugger-test.js"></script>
+<script src="./sass-test.js"></script>
+<script>
+
+function test()
+{
+    var header = InspectorTest.cssModel.styleSheetHeaders().find(header => !!header.sourceMapURL)
+
+    InspectorTest.runCSSEditTests(header, [
+        function testRemoveProperty(text)
+        {
+            return [
+                InspectorTest.createEdit(text, "margin: 10px;", "")
+            ];
+        },
+
+        function testRemovePropertyVariable(text)
+        {
+            return [
+                InspectorTest.createEdit(text, "color: red;", "")
+            ];
+        },
+
+        function testRemoveMultipleProperties(text)
+        {
+            return [
+                InspectorTest.createEdit(text, "margin: 10px;", "", 0),
+                InspectorTest.createEdit(text, "margin: 10px;", "", 2),
+            ];
+        },
+
+        function testRemoveMultipleDifferentProperties(text)
+        {
+            return [
+                InspectorTest.createEdit(text, "margin: 10px;", "", 1),
+                InspectorTest.createEdit(text, "color: red;", "", 2),
+            ];
+        },
+    ]);
+}
+
+</script>
+
+</head>
+
+<body onload="runTest()">
+<p>Verify that mapping is not valid for misaligned sources.</p>
+</body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/inspector/sass/test-edit-toggle-property-expected.txt b/third_party/WebKit/LayoutTests/inspector/sass/test-edit-toggle-property-expected.txt
new file mode 100644
index 0000000..23d24f6
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector/sass/test-edit-toggle-property-expected.txt
@@ -0,0 +1,112 @@
+Verify that mapping is not valid for misaligned sources.
+
+INITIAL MODELS
+===== test-edit-toggle-property.css =====
+.box1.{
+/*color:.red;*/
+..margin:.10px;.}
+
+.box2.{
+/*color:.red;*/
+..margin:.10px;.}
+
+.box3.{
+/*color:.red;*/
+..margin:.10px;.}
+
+/*#.sourceMappingURL=test-edit-toggle-property.css.map.*/
+
+===== test-edit-toggle-property.scss =====
+@for.$i.from.1.through.3.{
+.....box#{$i}.{
+......../*.color:.red;.*/
+........margin:.10px;
+....}
+}
+
+
+------------------------- TEST: testDisableProperty --------------------------
+
+Edits:
+    {2, 2, 2, 15} 'margin: 10px;' => '/* margin: 10px; */'
+===== test-edit-toggle-property.css =====
+    .box1.{
+    /*color:.red;*/
+    ../*.margin:.10px;.*/.}
+    
+    .box2.{
+    /*color:.red;*/
+    ../*.margin:.10px;.*/.}
+    
+    .box3.{
+    /*color:.red;*/
+    ../*.margin:.10px;.*/.}
+    
+    /*#.sourceMappingURL=test-edit-toggle-property.css.map.*/
+    
+===== test-edit-toggle-property.scss =====
+    @for.$i.from.1.through.3.{
+    .....box#{$i}.{
+    ......../*.color:.red;.*/
+    ......../*.margin:.10px;.*/
+    ....}
+    }
+    
+
+-------------------------- TEST: testEnableProperty --------------------------
+
+Edits:
+    {1, 0, 1, 15} '/*color: red;*/' => 'color: red;'
+===== test-edit-toggle-property.css =====
+    .box1.{
+    color:.red;
+    ..margin:.10px;.}
+    
+    .box2.{
+    color:.red;
+    ..margin:.10px;.}
+    
+    .box3.{
+    color:.red;
+    ..margin:.10px;.}
+    
+    /*#.sourceMappingURL=test-edit-toggle-property.css.map.*/
+    
+===== test-edit-toggle-property.scss =====
+    @for.$i.from.1.through.3.{
+    .....box#{$i}.{
+    ........color:.red;.
+    ........margin:.10px;
+    ....}
+    }
+    
+
+-------------------- TEST: testDisableMultipleProperties ---------------------
+
+Edits:
+    {2, 2, 2, 15} 'margin: 10px;' => '/* margin: 10px; */'
+    {10, 2, 10, 15} 'margin: 10px;' => '/* margin: 10px; */'
+===== test-edit-toggle-property.css =====
+    .box1.{
+    /*color:.red;*/
+    ../*.margin:.10px;.*/.}
+    
+    .box2.{
+    /*color:.red;*/
+    ../*.margin:.10px;.*/.}
+    
+    .box3.{
+    /*color:.red;*/
+    ../*.margin:.10px;.*/.}
+    
+    /*#.sourceMappingURL=test-edit-toggle-property.css.map.*/
+    
+===== test-edit-toggle-property.scss =====
+    @for.$i.from.1.through.3.{
+    .....box#{$i}.{
+    ......../*.color:.red;.*/
+    ......../*.margin:.10px;.*/
+    ....}
+    }
+    
+
diff --git a/third_party/WebKit/LayoutTests/inspector/sass/test-edit-toggle-property.html b/third_party/WebKit/LayoutTests/inspector/sass/test-edit-toggle-property.html
new file mode 100644
index 0000000..42d89cf
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector/sass/test-edit-toggle-property.html
@@ -0,0 +1,47 @@
+<html>
+<head>
+
+<link rel="stylesheet" href="resources/test-edit-toggle-property.css">
+
+<script src="../../http/tests/inspector/inspector-test.js"></script>
+<script src="../../http/tests/inspector/debugger-test.js"></script>
+<script src="./sass-test.js"></script>
+<script>
+
+function test()
+{
+    var header = InspectorTest.cssModel.styleSheetHeaders().find(header => !!header.sourceMapURL)
+
+    InspectorTest.runCSSEditTests(header, [
+        function testDisableProperty(text)
+        {
+            return [
+                InspectorTest.createEdit(text, "margin: 10px;", "/* margin: 10px; */")
+            ];
+        },
+
+        function testEnableProperty(text)
+        {
+            return [
+                InspectorTest.createEdit(text, "/*color: red;*/", "color: red;")
+            ];
+        },
+
+        function testDisableMultipleProperties(text)
+        {
+            return [
+                InspectorTest.createEdit(text, "margin: 10px;", "/* margin: 10px; */", 0),
+                InspectorTest.createEdit(text, "margin: 10px;", "/* margin: 10px; */", 2)
+            ];
+        },
+    ]);
+}
+
+</script>
+
+</head>
+
+<body onload="runTest()">
+<p>Verify that mapping is not valid for misaligned sources.</p>
+</body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/resources/mojo-helpers.js b/third_party/WebKit/LayoutTests/resources/mojo-helpers.js
index aca02bc..10350f7f 100644
--- a/third_party/WebKit/LayoutTests/resources/mojo-helpers.js
+++ b/third_party/WebKit/LayoutTests/resources/mojo-helpers.js
@@ -6,26 +6,15 @@
 
 // Fix up the global window.define, since all baked-in Mojo modules expect to
 // find it there. This define() also returns a promise to the module.
-let define = (function(){
-  let moduleCache = new Map();
-
-  return function(name, deps, factory) {
-    let promise = moduleCache.get(name);
-    if (promise === undefined) {
-      // This promise must be cached as mojo.define will only call the factory
-      // function the first time the module is defined.
-      promise = new Promise(resolve => {
-        mojo.define(name, deps, (...modules) => {
-          let result = factory(...modules);
-          resolve(result);
-          return result;
-        });
-      });
-      moduleCache.set(name, promise);
-    }
-    return promise;
-  }
-})();
+function define(name, deps, factory) {
+  return new Promise(resolve => {
+    mojo.define(name, deps, (...modules) => {
+      let result = factory(...modules);
+      resolve(result);
+      return result;
+    });
+  });
+}
 
 // Returns a promise to an object that exposes common Mojo module interfaces.
 // Additional modules to load can be specified in the |modules| parameter. The
diff --git a/third_party/WebKit/LayoutTests/usb/mock-services.html b/third_party/WebKit/LayoutTests/usb/mock-services.html
deleted file mode 100644
index 99a0d87b..0000000
--- a/third_party/WebKit/LayoutTests/usb/mock-services.html
+++ /dev/null
@@ -1,20 +0,0 @@
-<!DOCTYPE html>
-<script src="../resources/testharness.js"></script>
-<script src="../resources/testharnessreport.js"></script>
-<script src="../resources/mojo-helpers.js"></script>
-<script src="resources/device.mojom.js"></script>
-<script src="resources/device_manager.mojom.js"></script>
-<script src="resources/permission_provider.mojom.js"></script>
-<script src="resources/fake-devices.js"></script>
-<script src="resources/usb-helpers.js"></script>
-<script>
-'use strict';
-
-usb_test(usb => {
-  assert_true(usb instanceof Object);
-  assert_true(usb.DeviceManager instanceof Object);
-  assert_true(usb.Device instanceof Object);
-  assert_true(usb.PermissionProvider instanceof Object);
-  assert_true(usb.mockDeviceManager instanceof Object);
-}, 'USB Mojo bindings and mock interfaces are available to tests.')
-</script>
diff --git a/third_party/WebKit/LayoutTests/usb/resources/fake-devices.js b/third_party/WebKit/LayoutTests/usb/resources/fake-devices.js
deleted file mode 100644
index 14d669a..0000000
--- a/third_party/WebKit/LayoutTests/usb/resources/fake-devices.js
+++ /dev/null
@@ -1,107 +0,0 @@
-'use strict';
-
-function fakeUsbDevices() {
-  return define('Fake USB Devices', [
-    'device/usb/public/interfaces/device.mojom',
-  ], device => Promise.resolve([
-    {
-      guid: 'CD9FA048-FC9B-7A71-DBFC-FD44B78D6397',
-      usb_version_major: 2,
-      usb_version_minor: 0,
-      usb_version_subminor: 0,
-      class_code: 7,
-      subclass_code: 1,
-      protocol_code: 2,
-      vendor_id: 0x18d1,
-      product_id: 0xf00d,
-      device_version_major: 1,
-      device_version_minor: 2,
-      device_version_subminor: 3,
-      manufacturer_name: 'Google, Inc.',
-      product_name: 'The amazing imaginary printer',
-      serial_number: '4',
-      configurations: [
-        {
-          configuration_value: 1,
-          configuration_name: 'Printer Mode',
-          interfaces: [
-            {
-              interface_number: 0,
-              alternates: [
-                {
-                  alternate_setting: 0,
-                  class_code: 0xff,
-                  subclass_code: 0x01,
-                  protocol_code: 0x01,
-                  interface_name: 'Control',
-                  endpoints: []
-                }
-              ]
-            },
-            {
-              interface_number: 1,
-              alternates: [
-                {
-                  alternate_setting: 0,
-                  class_code: 0xff,
-                  subclass_code: 0x02,
-                  protocol_code: 0x01,
-                  interface_name: 'Data',
-                  endpoints: [
-                    {
-                      endpoint_number: 1,
-                      direction: device.TransferDirection.OUTBOUND,
-                      type: device.EndpointType.BULK,
-                      packet_size: 1024
-                    }
-                  ]
-                }
-              ]
-            }
-          ]
-        },
-        {
-          configuration_value: 2,
-          configuration_name: 'Fighting Robot Mode',
-          interfaces: [
-            {
-              interface_number: 0,
-              alternates: [
-                {
-                  alternate_setting: 0,
-                  class_code: 0xff,
-                  subclass_code: 0x42,
-                  protocol_code: 0x01,
-                  interface_name: 'Disabled',
-                  endpoints: []
-                },
-                {
-                  alternate_setting: 1,
-                  class_code: 0xff,
-                  subclass_code: 0x42,
-                  protocol_code: 0x01,
-                  interface_name: 'Activate!',
-                  endpoints: [
-                    {
-                      endpoint_number: 2,
-                      direction: device.TransferDirection.INBOUND,
-                      type: device.EndpointType.ISOCHRONOUS,
-                      packet_size: 1024
-                    },
-                    {
-                      endpoint_number: 2,
-                      direction: device.TransferDirection.OUTBOUND,
-                      type: device.EndpointType.ISOCHRONOUS,
-                      packet_size: 1024
-                    }
-                  ]
-                }
-              ]
-            },
-          ]
-        }
-      ],
-      webusb_allowed_origins: { origins: [], configurations: [] },
-    }
-  ]));
-}
diff --git a/third_party/WebKit/LayoutTests/usb/resources/usb-helpers.js b/third_party/WebKit/LayoutTests/usb/resources/usb-helpers.js
deleted file mode 100644
index bb13aeaf..0000000
--- a/third_party/WebKit/LayoutTests/usb/resources/usb-helpers.js
+++ /dev/null
@@ -1,354 +0,0 @@
-'use strict';
-
-function usbMocks(mojo) {
-  return define('USB Mocks', [
-    'device/usb/public/interfaces/device_manager.mojom',
-    'device/usb/public/interfaces/device.mojom',
-    'device/usb/public/interfaces/permission_provider.mojom',
-    'content/public/renderer/service_provider',
-  ], (deviceManager, device, permissionProvider) => {
-    function assertDeviceInfoEquals(device, info) {
-      assert_equals(device.guid, info.guid);
-      assert_equals(device.usbVersionMajor, info.usb_version_major);
-      assert_equals(device.usbVersionMinor, info.usb_version_minor);
-      assert_equals(device.usbVersionSubminor, info.usb_version_subminor);
-      assert_equals(device.deviceClass, info.class_code);
-      assert_equals(device.deviceSubclass, info.subclass_code);
-      assert_equals(device.deviceProtocol, info.protocol_code);
-      assert_equals(device.vendorId, info.vendor_id);
-      assert_equals(device.productId, info.product_id);
-      assert_equals(device.deviceVersionMajor, info.device_version_major);
-      assert_equals(device.deviceVersionMinor, info.device_version_minor);
-      assert_equals(device.deviceVersionSubminor,
-                    info.device_version_subminor);
-      assert_equals(device.manufacturerName, info.manufacturer_name);
-      assert_equals(device.productName, info.product_name);
-      assert_equals(device.serialNumber, info.serial_number);
-      assert_equals(device.configurations.length,
-                    info.configurations.length);
-      for (var i = 0; i < device.configurations.length; ++i) {
-        assertConfigurationInfoEquals(device.configurations[i],
-                                      info.configurations[i]);
-      }
-    };
-
-    function assertConfigurationInfoEquals(configuration, info) {
-      assert_equals(configuration.configurationValue,
-                    info.configuration_value);
-      assert_equals(configuration.configurationName,
-                    info.configuration_name);
-      assert_equals(configuration.interfaces.length,
-                    info.interfaces.length);
-      for (var i = 0; i < configuration.interfaces.length; ++i) {
-        assertInterfaceInfoEquals(configuration.interfaces[i],
-                                  info.interfaces[i]);
-      }
-    };
-
-    function assertInterfaceInfoEquals(iface, info) {
-      assert_equals(iface.interfaceNumber, info.interface_number);
-      assert_equals(iface.alternates.length, info.alternates.length);
-      for (var i = 0; i < iface.alternates.length; ++i) {
-        assertAlternateInfoEquals(iface.alternates[i], info.alternates[i]);
-      }
-    };
-
-    function assertAlternateInfoEquals(alternate, info) {
-      assert_equals(alternate.alternateSetting, info.alternate_setting);
-      assert_equals(alternate.interfaceClass, info.class_code);
-      assert_equals(alternate.interfaceSubclass, info.subclass_code);
-      assert_equals(alternate.interfaceProtocol, info.protocol_code);
-      assert_equals(alternate.interfaceName, info.interface_name);
-      assert_equals(alternate.endpoints.length, info.endpoints.length);
-      for (var i = 0; i < alternate.endpoints.length; ++i) {
-        assertEndpointInfoEquals(alternate.endpoints[i], info.endpoints[i]);
-      }
-    }
-
-    function assertEndpointInfoEquals(endpoint, info) {
-      var direction;
-      switch (info.direction) {
-        case device.TransferDirection.INBOUND:
-          direction = "in";
-          break;
-        case device.TransferDirection.OUTBOUND:
-          direction = "out";
-          break;
-      }
-
-      var type;
-      switch (info.type) {
-        case device.EndpointType.BULK:
-          type = "bulk";
-          break;
-        case device.EndpointType.INTERRUPT:
-          type = "interrupt";
-          break;
-        case device.EndpointType.ISOCHRONOUS:
-          type = "isochronous";
-          break;
-      }
-
-      assert_equals(endpoint.endpointNumber, info.endpoint_number);
-      assert_equals(endpoint.direction, direction);
-      assert_equals(endpoint.type, type);
-      assert_equals(endpoint.packetSize, info.packet_size);
-    }
-
-    class MockDevice extends device.Device.stubClass {
-      constructor(info, pipe) {
-        super();
-        this.info_ = info;
-        this.pipe_ = pipe;
-        this.router_ = new mojo.router.Router(pipe);
-        this.router_.setIncomingReceiver(this);
-        this.opened_ = false;
-        this.currentConfiguration_ = undefined;
-        this.claimedInterfaces_ = new Map();
-      }
-
-      getDeviceInfo() {
-        return Promise.resolve({ info: this.info_ });
-      }
-
-      getConfiguration() {
-        if (this.currentConfiguration_ === undefined) {
-          return Promise.resolve({ value: 0 });
-        } else {
-          return Promise.resolve({
-              value: this.currentConfiguration_.configuration_value });
-        }
-      }
-
-      open() {
-        // TODO(reillyg): Check if the device is opened and return
-        // OpenDeviceError.ALREADY_OPEN.
-        this.opened_ = true;
-        return Promise.resolve({ error: device.OpenDeviceError.OK });
-      }
-
-      close() {
-        this.opened_ = false;
-        return Promise.resolve({});
-      }
-
-      setConfiguration(value) {
-        if (!this.opened_)
-          return Promise.resolve({ success: false });
-
-        let selected_configuration = this.info_.configurations.find(
-            configuration => configuration.configuration_value == value);
-        if (selected_configuration !== undefined) {
-          this.currentConfiguration_ = selected_configuration;
-          return Promise.resolve({ success: true });
-        } else {
-          return Promise.resolve({ success: false });
-        }
-      }
-
-      claimInterface(interfaceNumber) {
-        if (!this.opened_)
-          return Promise.resolve({ success: false });
-
-        if (this.currentConfiguration_ === undefined)
-          return Promise.resolve({ success: false });
-
-        if (this.claimedInterfaces_.has(interfaceNumber))
-          return Promise.resolve({ success: false });
-
-        if (this.currentConfiguration_.interfaces.some(
-                iface => iface.interface_number == interfaceNumber)) {
-          this.claimedInterfaces_.set(interfaceNumber, 0);
-          return Promise.resolve({ success: true });
-        } else {
-          return Promise.resolve({ success: false });
-        }
-      }
-
-      releaseInterface(interfaceNumber) {
-        if (!this.opened_)
-          return Promise.resolve({ success: false });
-
-        if (this.currentConfiguration_ === undefined)
-          return Promise.resolve({ success: false });
-
-        if (this.claimedInterfaces_.has(interfaceNumber)) {
-          this.claimedInterfaces_.delete(interfaceNumber);
-          return Promise.resolve({ success: true });
-        } else {
-          return Promise.resolve({ success: false });
-        }
-      }
-
-      setInterfaceAlternateSetting(interfaceNumber, alternateSetting) {
-        if (!this.opened_ || this.currentConfiguration_ === undefined)
-          return Promise.resolve({ success: false });
-
-        if (!this.claimedInterfaces_.has(interfaceNumber))
-          return Promise.resolve({ success: false });
-
-        let iface = this.currentConfiguration_.interfaces.find(
-            iface => iface.interface_number == interfaceNumber);
-        if (iface === undefined)
-          return Promise.resolve({ success: false });
-
-        if (iface.alternates.some(
-               x => x.alternate_setting == alternateSetting)) {
-          this.claimedInterfaces_.set(interfaceNumber, alternateSetting);
-          return Promise.resolve({ success: true });
-        } else {
-          return Promise.resolve({ success: false });
-        }
-      }
-
-      reset() { throw 'Not implemented!'; }
-      clearHalt(endpoint) { throw 'Not implemented!'; }
-
-      controlTransferIn(params, length, timeout) {
-        return Promise.resolve({
-          status: device.TransferStatus.OK,
-          data: [length >> 8, length & 0xff, params.request, params.value >> 8,
-                 params.value & 0xff, params.index >> 8, params.index & 0xff]
-        });
-      }
-
-      controlTransferOut(params, data, timeout) {
-        throw 'Not implemented!';
-      }
-      genericTransferIn(endpointNumber, length, timeout) {
-        throw 'Not implemented!';
-      }
-      genericTransferOut(endpointNumber, data, timeout) {
-        throw 'Not implemented!';
-      }
-      isochronousTransferIn(endpointNumber, numPackets, packetLength,
-                            timeout) {
-        throw 'Not implemented!';
-      }
-      isochronousTransferOut(endpointNumber, packets, timeout) {
-        throw 'Not implemented!';
-      }
-    };
-
-    class MockDeviceManager extends deviceManager.DeviceManager.stubClass {
-      constructor() {
-        super();
-        this.router_ = null;
-        this.mockDevices_ = new Map();
-        this.addedDevices_ = [];
-        this.removedDevices_ = [];
-        this.deviceChangePromiseResolvers_ = [];
-      }
-
-      reset() {
-        this.mockDevices_.forEach(device => {
-          for (var handle of device.handles)
-            mojo.core.close(handle.pipe_);
-          this.removedDevices_.push(device.info);
-        });
-        this.mockDevices_.clear();
-        this.maybeResolveDeviceChangePromise();
-      }
-
-      addMockDevice(info) {
-        let device = {
-          info: info,
-          handles: []
-        };
-        this.mockDevices_.set(info.guid, device);
-        this.addedDevices_.push(info);
-        this.maybeResolveDeviceChangePromise();
-      }
-
-      removeMockDevice(info) {
-        let device = this.mockDevices_.get(info.guid);
-        for (var handle of device.handles)
-          mojo.core.close(handle.pipe_);
-        this.mockDevices_.delete(info.guid);
-        this.removedDevices_.push(info);
-        this.maybeResolveDeviceChangePromise();
-      }
-
-      bindToPipe(pipe) {
-        assert_equals(this.router_, null);
-        this.router_ = new mojo.router.Router(pipe);
-        this.router_.setIncomingReceiver(this);
-      }
-
-      getDevices(options) {
-        let devices = [];
-        this.mockDevices_.forEach(device => {
-          devices.push(device.info);
-        });
-        return Promise.resolve({ results: devices });
-      }
-
-      getDeviceChanges() {
-        let promise = new Promise((resolve, reject) => {
-          this.deviceChangePromiseResolvers_.push(resolve);
-        });
-        this.maybeResolveDeviceChangePromise();
-        return promise;
-      }
-
-      maybeResolveDeviceChangePromise() {
-        if (this.addedDevices_.length == 0 &&
-            this.removedDevices_.length == 0) {
-          return;
-        }
-
-        let resolve = this.deviceChangePromiseResolvers_.shift();
-        if (resolve === undefined)
-          return;
-
-        resolve({
-          changes: {
-            devices_added: this.addedDevices_,
-            devices_removed: this.removedDevices_
-          }
-        });
-        this.addedDevices_ = [];
-        this.removedDevices_ = [];
-      }
-
-      getDevice(guid, pipe) {
-        let device = this.mockDevices_.get(guid);
-        if (device !== undefined) {
-          var mock = new MockDevice(device.info, pipe);
-          device.handles.push(mock);
-        }
-      }
-    }
-
-    let mockDeviceManager = new MockDeviceManager;
-    mojo.serviceRegistry.addServiceOverrideForTesting(
-        deviceManager.DeviceManager.name,
-        pipe => {
-          mockDeviceManager.bindToPipe(pipe);
-        });
-
-    mojo.serviceRegistry.addServiceOverrideForTesting(
-        permissionProvider.PermissionProvider.name,
-        pipe => {
-          console.log('Connected to PermissionProvider!');
-        });
-
-    return fakeUsbDevices().then(fakeDevices => Promise.resolve({
-      DeviceManager: deviceManager.DeviceManager,
-      Device: device.Device,
-      PermissionProvider: permissionProvider.PermissionProvider,
-      mockDeviceManager: mockDeviceManager,
-      fakeDevices: fakeDevices,
-      assertDeviceInfoEquals: assertDeviceInfoEquals,
-      assertConfigurationInfoEquals: assertConfigurationInfoEquals,
-    }));
-  });
-}
-
-function usb_test(func, name, properties) {
-  mojo_test(mojo => usbMocks(mojo).then(usb => {
-    let result = Promise.resolve(func(usb));
-    let cleanUp = () => usb.mockDeviceManager.reset();
-    return result.then(cleanUp, cleanUp);
-  }), name, properties);
-}
diff --git a/third_party/WebKit/LayoutTests/usb/usb.html b/third_party/WebKit/LayoutTests/usb/usb.html
deleted file mode 100644
index 9d0fbc56..0000000
--- a/third_party/WebKit/LayoutTests/usb/usb.html
+++ /dev/null
@@ -1,46 +0,0 @@
-<!DOCTYPE html>
-<script src="../resources/testharness.js"></script>
-<script src="../resources/testharnessreport.js"></script>
-<script src="../resources/mojo-helpers.js"></script>
-<script src="resources/device.mojom.js"></script>
-<script src="resources/device_manager.mojom.js"></script>
-<script src="resources/permission_provider.mojom.js"></script>
-<script src="resources/fake-devices.js"></script>
-<script src="resources/usb-helpers.js"></script>
-<script>
-'use strict';
-
-usb_test(usb => {
-  usb.mockDeviceManager.addMockDevice(usb.fakeDevices[0]);
-
-  return navigator.usb.getDevices().then(devices => {
-    assert_equals(devices.length, 1);
-    usb.assertDeviceInfoEquals(devices[0], usb.fakeDevices[0]);
-  });
-}, 'getDevices returns devices exposed by the DeviceManager service.');
-
-usb_test(usb => {
-  let promise = new Promise((resolve, reject) => {
-    navigator.usb.addEventListener('connect', e => {
-      usb.assertDeviceInfoEquals(e.device, usb.fakeDevices[0]);
-      resolve();
-    });
-  });
-
-  usb.mockDeviceManager.addMockDevice(usb.fakeDevices[0]);
-  return promise;
-}, 'onconnect event is trigged by adding a device');
-
-usb_test(usb => {
-  let promise = new Promise((resolve, reject) => {
-    navigator.usb.addEventListener('disconnect', e => {
-      usb.assertDeviceInfoEquals(e.device, usb.fakeDevices[0]);
-      resolve();
-    });
-  });
-
-  usb.mockDeviceManager.addMockDevice(usb.fakeDevices[0]);
-  usb.mockDeviceManager.removeMockDevice(usb.fakeDevices[0]);
-  return promise;
-}, 'ondisconnect event is triggered by removing a device');
-</script>
diff --git a/third_party/WebKit/LayoutTests/usb/usbDevice.html b/third_party/WebKit/LayoutTests/usb/usbDevice.html
deleted file mode 100644
index 34f7e55..0000000
--- a/third_party/WebKit/LayoutTests/usb/usbDevice.html
+++ /dev/null
@@ -1,105 +0,0 @@
-<!DOCTYPE html>
-<script src="../resources/testharness.js"></script>
-<script src="../resources/testharnessreport.js"></script>
-<script src="../resources/mojo-helpers.js"></script>
-<script src="resources/device.mojom.js"></script>
-<script src="resources/device_manager.mojom.js"></script>
-<script src="resources/permission_provider.mojom.js"></script>
-<script src="resources/fake-devices.js"></script>
-<script src="resources/usb-helpers.js"></script>
-<script>
-'use strict';
-
-usb_test(usb => {
-  usb.mockDeviceManager.addMockDevice(usb.fakeDevices[0]);
-  return navigator.usb.getDevices().then(devices => {
-    assert_equals(devices.length, 1);
-    let device = devices[0];
-    return device.open().then(() => device.close());
-  });
-}, 'a device can be opened and closed');
-
-usb_test(usb => {
-  usb.mockDeviceManager.addMockDevice(usb.fakeDevices[0]);
-  return navigator.usb.getDevices().then(devices => {
-    assert_equals(devices.length, 1);
-    let device = devices[0];
-    return device.open()
-      .then(() => device.setConfiguration(1))
-      .then(() => device.getConfiguration())
-      .then(config => {
-         usb.assertConfigurationInfoEquals(
-             config, usb.fakeDevices[0].configurations[0]);
-      })
-      .then(() => device.close());
-  });
-}, 'device configuration can be set and queried');
-
-usb_test(usb => {
-  usb.mockDeviceManager.addMockDevice(usb.fakeDevices[0]);
-  return navigator.usb.getDevices().then(devices => {
-    assert_equals(devices.length, 1);
-    let device = devices[0];
-    return device.open()
-      .then(() => device.getConfiguration()
-        .then(() => {
-          assert_true(false, 'getConfiguration should reject');
-        })
-        .catch(error => {
-          assert_equals(error.code, DOMException.NOT_FOUND_ERR);
-          return Promise.resolve();
-        }))
-      .then(() => device.close());
-  });
-}, 'querying an unset configuration raises NotFoundError');
-
-usb_test(usb => {
-  usb.mockDeviceManager.addMockDevice(usb.fakeDevices[0]);
-  return navigator.usb.getDevices().then(devices => {
-    assert_equals(devices.length, 1);
-    let device = devices[0];
-    return device.open()
-      .then(() => device.setConfiguration(1))
-      .then(() => device.claimInterface(0))
-      .then(() => device.releaseInterface(0))
-      .then(() => device.close());
-  });
-}, 'an interface can be claimed and released');
-
-usb_test(usb => {
-  usb.mockDeviceManager.addMockDevice(usb.fakeDevices[0]);
-  return navigator.usb.getDevices().then(devices => {
-    assert_equals(devices.length, 1);
-    let device = devices[0];
-    return device.open()
-      .then(() => device.setConfiguration(2))
-      .then(() => device.claimInterface(0))
-      .then(() => device.setInterface(0, 1))
-      .then(() => device.close());
-  });
-}, 'can select an alternate interface');
-
-usb_test(usb => {
-  usb.mockDeviceManager.addMockDevice(usb.fakeDevices[0]);
-  return navigator.usb.getDevices().then(devices => {
-    assert_equals(devices.length, 1);
-    let device = devices[0];
-    return device.open()
-      .then(() => device.controlTransferIn({
-        requestType: "vendor",
-        recipient: "device",
-        request: 0x42,
-        value: 0x1234,
-        index: 0x5678
-      }, 7))
-      .then(result => {
-        assert_equals("ok", result.status);
-        assert_equals(7, result.data.byteLength);
-        assert_equals(0x07, result.data.getUint16(0));
-        assert_equals(0x42, result.data.getUint8(2));
-        assert_equals(0x1234, result.data.getUint16(3));
-        assert_equals(0x5678, result.data.getUint16(5));
-      });
-  });
-}, 'can issue IN control transfer');
-</script>
diff --git a/third_party/WebKit/Source/config.gni b/third_party/WebKit/Source/config.gni
index 3132bf20..da79174 100644
--- a/third_party/WebKit/Source/config.gni
+++ b/third_party/WebKit/Source/config.gni
@@ -10,9 +10,6 @@
 }
 if (current_cpu == "arm") {
   import("//build/config/arm.gni")
-} else {
-  # TODO(brettw) remove this once && early-out is checked in.
-  arm_version = 0
 }
 
 declare_args() {
@@ -23,6 +20,10 @@
   # If true, force blink asserts to be off in a release build.  When false,
   # blink asserts in release build may be controlled by DCHECK_ALWAYS_ON.
   blink_asserts_off_in_release = false
+
+  # If true, doesn't compile debug symbols into webcore reducing the
+  # size of the binary and increasing the speed of gdb.
+  remove_webcore_debug_symbols = false
 }
 
 # Whether Android build uses OpenMAX DL FFT. Currently supported only on
diff --git a/third_party/WebKit/Source/core/BUILD.gn b/third_party/WebKit/Source/core/BUILD.gn
index a205950..1daf6b02 100644
--- a/third_party/WebKit/Source/core/BUILD.gn
+++ b/third_party/WebKit/Source/core/BUILD.gn
@@ -34,6 +34,11 @@
 # Core targets also get wexit time destructors.
 core_config_add += [ "//build/config/compiler:wexit_time_destructors" ]
 
+if (remove_webcore_debug_symbols) {
+  core_config_remove += [ "//build/config/compiler:default_symbols" ]
+  core_config_add += [ "//build/config/compiler:no_symbols" ]
+}
+
 # Config for code that builds as part of core.
 config("config") {
   defines = [ "BLINK_CORE_IMPLEMENTATION=1" ]
diff --git a/third_party/WebKit/Source/core/animation/CSSLengthInterpolationType.cpp b/third_party/WebKit/Source/core/animation/CSSLengthInterpolationType.cpp
index 8a97b542..46b17a8 100644
--- a/third_party/WebKit/Source/core/animation/CSSLengthInterpolationType.cpp
+++ b/third_party/WebKit/Source/core/animation/CSSLengthInterpolationType.cpp
@@ -105,6 +105,18 @@
     underlyingNonInterpolableValue = CSSLengthNonInterpolableValue::merge(underlyingNonInterpolableValue.get(), nonInterpolableValue);
 }
 
+void CSSLengthInterpolationType::subtractFromOneHundredPercent(InterpolationValue& result)
+{
+    InterpolableList& list = toInterpolableList(*result.interpolableValue);
+    for (size_t i = 0; i < CSSPrimitiveValue::LengthUnitTypeCount; i++) {
+        double value = -toInterpolableNumber(*list.get(i)).value();
+        if (i == CSSPrimitiveValue::UnitTypePercentage)
+            value += 100;
+        toInterpolableNumber(*list.getMutable(i)).set(value);
+    }
+    result.nonInterpolableValue = CSSLengthNonInterpolableValue::create(true);
+}
+
 InterpolationValue CSSLengthInterpolationType::maybeConvertCSSValue(const CSSValue& value)
 {
     if (!value.isPrimitiveValue())
diff --git a/third_party/WebKit/Source/core/animation/CSSLengthInterpolationType.h b/third_party/WebKit/Source/core/animation/CSSLengthInterpolationType.h
index bbf804b..fe942d8 100644
--- a/third_party/WebKit/Source/core/animation/CSSLengthInterpolationType.h
+++ b/third_party/WebKit/Source/core/animation/CSSLengthInterpolationType.h
@@ -29,6 +29,7 @@
     static PairwiseInterpolationValue staticMergeSingleConversions(InterpolationValue& start, InterpolationValue& end);
     static bool nonInterpolableValuesAreCompatible(const NonInterpolableValue*, const NonInterpolableValue*);
     static void composite(OwnPtr<InterpolableValue>&, RefPtr<NonInterpolableValue>&, double underlyingFraction, const InterpolableValue&, const NonInterpolableValue*);
+    static void subtractFromOneHundredPercent(InterpolationValue& result);
 
 private:
     float effectiveZoom(const ComputedStyle&) const;
diff --git a/third_party/WebKit/Source/core/animation/CSSLengthListInterpolationType.cpp b/third_party/WebKit/Source/core/animation/CSSLengthListInterpolationType.cpp
index f70a66c1..c76529c 100644
--- a/third_party/WebKit/Source/core/animation/CSSLengthListInterpolationType.cpp
+++ b/third_party/WebKit/Source/core/animation/CSSLengthListInterpolationType.cpp
@@ -33,48 +33,43 @@
     });
 }
 
+static InterpolationValue maybeConvertLengthList(const Vector<Length>& lengthList, float zoom)
+{
+    if (lengthList.isEmpty())
+        return nullptr;
+
+    return ListInterpolationFunctions::createList(lengthList.size(), [&lengthList, zoom](size_t index) {
+        return CSSLengthInterpolationType::maybeConvertLength(lengthList[index], zoom);
+    });
+}
+
 InterpolationValue CSSLengthListInterpolationType::maybeConvertInitial() const
 {
     return maybeConvertLengthList(LengthListPropertyFunctions::getInitialLengthList(cssProperty()), 1);
 }
 
-InterpolationValue CSSLengthListInterpolationType::maybeConvertLengthList(const RefVector<Length>* lengthList, float zoom) const
-{
-    if (!lengthList || lengthList->size() == 0)
-        return nullptr;
-
-    return ListInterpolationFunctions::createList(lengthList->size(), [lengthList, zoom](size_t index) {
-        return CSSLengthInterpolationType::maybeConvertLength(lengthList->at(index), zoom);
-    });
-}
-
 class ParentLengthListChecker : public InterpolationType::ConversionChecker {
 public:
     ~ParentLengthListChecker() final {}
 
-    static PassOwnPtr<ParentLengthListChecker> create(CSSPropertyID property, PassRefPtr<RefVector<Length>> inheritedLengthList)
+    static PassOwnPtr<ParentLengthListChecker> create(CSSPropertyID property, const Vector<Length>& inheritedLengthList)
     {
         return adoptPtr(new ParentLengthListChecker(property, inheritedLengthList));
     }
 
 private:
-    ParentLengthListChecker(CSSPropertyID property, PassRefPtr<RefVector<Length>> inheritedLengthList)
+    ParentLengthListChecker(CSSPropertyID property, const Vector<Length>& inheritedLengthList)
         : m_property(property)
         , m_inheritedLengthList(inheritedLengthList)
     { }
 
     bool isValid(const InterpolationEnvironment& environment, const InterpolationValue& underlying) const final
     {
-        const RefVector<Length>* lengthList = LengthListPropertyFunctions::getLengthList(m_property, *environment.state().parentStyle());
-        if (!lengthList && !m_inheritedLengthList)
-            return true;
-        if (!lengthList || !m_inheritedLengthList)
-            return false;
-        return *m_inheritedLengthList == *lengthList;
+        return m_inheritedLengthList == LengthListPropertyFunctions::getLengthList(m_property, *environment.state().parentStyle());
     }
 
     CSSPropertyID m_property;
-    RefPtr<RefVector<Length>> m_inheritedLengthList;
+    Vector<Length> m_inheritedLengthList;
 };
 
 InterpolationValue CSSLengthListInterpolationType::maybeConvertInherit(const StyleResolverState& state, ConversionCheckers& conversionCheckers) const
@@ -82,9 +77,8 @@
     if (!state.parentStyle())
         return nullptr;
 
-    const RefVector<Length>* inheritedLengthList = LengthListPropertyFunctions::getLengthList(cssProperty(), *state.parentStyle());
-    conversionCheckers.append(ParentLengthListChecker::create(cssProperty(),
-        const_cast<RefVector<Length>*>(inheritedLengthList))); // Take ref.
+    Vector<Length> inheritedLengthList = LengthListPropertyFunctions::getLengthList(cssProperty(), *state.parentStyle());
+    conversionCheckers.append(ParentLengthListChecker::create(cssProperty(), inheritedLengthList));
     return maybeConvertLengthList(inheritedLengthList, state.parentStyle()->effectiveZoom());
 }
 
@@ -106,7 +100,7 @@
 
 InterpolationValue CSSLengthListInterpolationType::maybeConvertUnderlyingValue(const InterpolationEnvironment& environment) const
 {
-    const RefVector<Length>* underlyingLengthList = LengthListPropertyFunctions::getLengthList(cssProperty(), *environment.state().style());
+    Vector<Length> underlyingLengthList = LengthListPropertyFunctions::getLengthList(cssProperty(), *environment.state().style());
     return maybeConvertLengthList(underlyingLengthList, environment.state().style()->effectiveZoom());
 }
 
@@ -124,15 +118,15 @@
     ASSERT(length > 0);
     const NonInterpolableList& nonInterpolableList = toNonInterpolableList(*nonInterpolableValue);
     ASSERT(nonInterpolableList.length() == length);
-    RefPtr<RefVector<Length>> result = RefVector<Length>::create();
+    Vector<Length> result(length);
     for (size_t i = 0; i < length; i++) {
-        result->append(CSSLengthInterpolationType::resolveInterpolableLength(
+        result[i] = CSSLengthInterpolationType::resolveInterpolableLength(
             *interpolableList.get(i),
             nonInterpolableList.get(i),
             environment.state().cssToLengthConversionData(),
-            m_valueRange));
+            m_valueRange);
     }
-    LengthListPropertyFunctions::setLengthList(cssProperty(), *environment.state().style(), result.release());
+    LengthListPropertyFunctions::setLengthList(cssProperty(), *environment.state().style(), std::move(result));
 }
 
 } // namespace blink
diff --git a/third_party/WebKit/Source/core/animation/CSSLengthListInterpolationType.h b/third_party/WebKit/Source/core/animation/CSSLengthListInterpolationType.h
index a1f9bd5..0c3c222 100644
--- a/third_party/WebKit/Source/core/animation/CSSLengthListInterpolationType.h
+++ b/third_party/WebKit/Source/core/animation/CSSLengthListInterpolationType.h
@@ -8,7 +8,6 @@
 #include "core/animation/CSSInterpolationType.h"
 #include "core/animation/CSSLengthInterpolationType.h"
 #include "platform/Length.h"
-#include "wtf/RefVector.h"
 
 namespace blink {
 
@@ -21,12 +20,10 @@
     void apply(const InterpolableValue&, const NonInterpolableValue*, InterpolationEnvironment&) const final;
 
 private:
-    InterpolationValue maybeConvertLengthList(const RefVector<Length>*, float zoom) const;
-
     InterpolationValue maybeConvertNeutral(const InterpolationValue& underlying, ConversionCheckers&) const final;
     InterpolationValue maybeConvertInitial() const final;
     InterpolationValue maybeConvertInherit(const StyleResolverState&, ConversionCheckers&) const final;
-    InterpolationValue maybeConvertValue(const CSSValue&, const StyleResolverState&, ConversionCheckers&) const final;
+    virtual InterpolationValue maybeConvertValue(const CSSValue&, const StyleResolverState&, ConversionCheckers&) const;
 
     PairwiseInterpolationValue mergeSingleConversions(InterpolationValue& start, InterpolationValue& end) const final;
 
diff --git a/third_party/WebKit/Source/core/animation/CSSPositionAxisListInterpolationType.cpp b/third_party/WebKit/Source/core/animation/CSSPositionAxisListInterpolationType.cpp
new file mode 100644
index 0000000..93d79823
--- /dev/null
+++ b/third_party/WebKit/Source/core/animation/CSSPositionAxisListInterpolationType.cpp
@@ -0,0 +1,42 @@
+// 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 "core/animation/CSSPositionAxisListInterpolationType.h"
+
+#include "core/animation/CSSLengthInterpolationType.h"
+#include "core/animation/ListInterpolationFunctions.h"
+#include "core/css/CSSPrimitiveValue.h"
+#include "core/css/CSSValueList.h"
+#include "core/css/CSSValuePair.h"
+
+namespace blink {
+
+static InterpolationValue convertPositionAxisCSSValue(const CSSValue& value)
+{
+    if (!value.isValuePair())
+        return CSSLengthInterpolationType::maybeConvertCSSValue(value);
+
+    const CSSValuePair& pair = toCSSValuePair(value);
+    InterpolationValue result = CSSLengthInterpolationType::maybeConvertCSSValue(pair.second());
+    CSSValueID side = toCSSPrimitiveValue(pair.first()).getValueID();
+    if (side == CSSValueRight || side == CSSValueBottom)
+        CSSLengthInterpolationType::subtractFromOneHundredPercent(result);
+    return result;
+}
+
+InterpolationValue CSSPositionAxisListInterpolationType::maybeConvertValue(const CSSValue& value, const StyleResolverState&, ConversionCheckers&) const
+{
+    if (!value.isBaseValueList()) {
+        return ListInterpolationFunctions::createList(1, [&value](size_t) {
+            return convertPositionAxisCSSValue(value);
+        });
+    }
+
+    const CSSValueList& list = toCSSValueList(value);
+    return ListInterpolationFunctions::createList(list.length(), [&list](size_t index) {
+        return convertPositionAxisCSSValue(*list.item(index));
+    });
+}
+
+} // namespace blink
diff --git a/third_party/WebKit/Source/core/animation/CSSPositionAxisListInterpolationType.h b/third_party/WebKit/Source/core/animation/CSSPositionAxisListInterpolationType.h
new file mode 100644
index 0000000..b42b131
--- /dev/null
+++ b/third_party/WebKit/Source/core/animation/CSSPositionAxisListInterpolationType.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.
+
+#ifndef CSSPositionAxisListInterpolationType_h
+#define CSSPositionAxisListInterpolationType_h
+
+#include "core/animation/CSSLengthListInterpolationType.h"
+
+namespace blink {
+
+class CSSPositionAxisListInterpolationType : public CSSLengthListInterpolationType {
+public:
+    CSSPositionAxisListInterpolationType(CSSPropertyID property)
+        : CSSLengthListInterpolationType(property)
+    { }
+
+private:
+    InterpolationValue maybeConvertValue(const CSSValue&, const StyleResolverState&, ConversionCheckers&) const final;
+};
+
+} // namespace blink
+
+#endif // CSSPositionAxisListInterpolationType_h
diff --git a/third_party/WebKit/Source/core/animation/CompositorAnimations.cpp b/third_party/WebKit/Source/core/animation/CompositorAnimations.cpp
index 362c833..da39c595 100644
--- a/third_party/WebKit/Source/core/animation/CompositorAnimations.cpp
+++ b/third_party/WebKit/Source/core/animation/CompositorAnimations.cpp
@@ -678,11 +678,11 @@
         PropertySpecificKeyframeVector values;
         getKeyframeValuesForProperty(&effect, property, compositorTiming.scaledDuration, values);
 
-        CompositorAnimation::TargetProperty targetProperty;
+        CompositorTargetProperty::Type targetProperty;
         OwnPtr<CompositorAnimationCurve> curve;
         switch (property.cssProperty()) {
         case CSSPropertyOpacity: {
-            targetProperty = CompositorAnimation::TargetPropertyOpacity;
+            targetProperty = CompositorTargetProperty::OPACITY;
 
             CompositorFloatAnimationCurve* floatCurve = CompositorFactory::current().createFloatAnimationCurve();
             addKeyframesToCurve(*floatCurve, values, timing);
@@ -692,7 +692,7 @@
         }
         case CSSPropertyWebkitFilter:
         case CSSPropertyBackdropFilter: {
-            targetProperty = CompositorAnimation::TargetPropertyFilter;
+            targetProperty = CompositorTargetProperty::FILTER;
             CompositorFilterAnimationCurve* filterCurve = CompositorFactory::current().createFilterAnimationCurve();
             addKeyframesToCurve(*filterCurve, values, timing);
             setTimingFunctionOnCurve(*filterCurve, timing.timingFunction.get());
@@ -703,7 +703,7 @@
         case CSSPropertyScale:
         case CSSPropertyTranslate:
         case CSSPropertyTransform: {
-            targetProperty = CompositorAnimation::TargetPropertyTransform;
+            targetProperty = CompositorTargetProperty::TRANSFORM;
             CompositorTransformAnimationCurve* transformCurve = CompositorFactory::current().createTransformAnimationCurve();
             addKeyframesToCurve(*transformCurve, values, timing);
             setTimingFunctionOnCurve(*transformCurve, timing.timingFunction.get());
diff --git a/third_party/WebKit/Source/core/animation/CompositorAnimationsTest.cpp b/third_party/WebKit/Source/core/animation/CompositorAnimationsTest.cpp
index 86e27384..1a599a7 100644
--- a/third_party/WebKit/Source/core/animation/CompositorAnimationsTest.cpp
+++ b/third_party/WebKit/Source/core/animation/CompositorAnimationsTest.cpp
@@ -669,10 +669,10 @@
     usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(CompositorFloatKeyframe(1.0, 5.0)));
 
     // Create animation
-    WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMock(CompositorAnimation::TargetPropertyOpacity);
+    WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMock(CompositorTargetProperty::OPACITY);
     ExpectationSet usesMockAnimation;
 
-    usesMockCurve += EXPECT_CALL(*m_mockCompositorFactory, createAnimation(Ref(*mockCurvePtr), CompositorAnimation::TargetPropertyOpacity, _, _))
+    usesMockCurve += EXPECT_CALL(*m_mockCompositorFactory, createAnimation(Ref(*mockCurvePtr), CompositorTargetProperty::OPACITY, _, _))
         .WillOnce(Return(mockAnimationPtr));
 
     usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setIterations(1));
@@ -714,10 +714,10 @@
     usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(CompositorFloatKeyframe(10.0, 5.0)));
 
     // Create animation
-    WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMock(CompositorAnimation::TargetPropertyOpacity);
+    WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMock(CompositorTargetProperty::OPACITY);
     ExpectationSet usesMockAnimation;
 
-    usesMockCurve += EXPECT_CALL(*m_mockCompositorFactory, createAnimation(Ref(*mockCurvePtr), CompositorAnimation::TargetPropertyOpacity, _, _))
+    usesMockCurve += EXPECT_CALL(*m_mockCompositorFactory, createAnimation(Ref(*mockCurvePtr), CompositorTargetProperty::OPACITY, _, _))
         .WillOnce(Return(mockAnimationPtr));
 
     usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setIterations(1));
@@ -766,10 +766,10 @@
     usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(CompositorFloatKeyframe(1.0, 5.0)));
 
     // KeyframeEffect is created
-    WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMock(CompositorAnimation::TargetPropertyOpacity);
+    WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMock(CompositorTargetProperty::OPACITY);
     ExpectationSet usesMockAnimation;
 
-    usesMockCurve += EXPECT_CALL(*m_mockCompositorFactory, createAnimation(Ref(*mockCurvePtr), CompositorAnimation::TargetPropertyOpacity, _, _))
+    usesMockCurve += EXPECT_CALL(*m_mockCompositorFactory, createAnimation(Ref(*mockCurvePtr), CompositorTargetProperty::OPACITY, _, _))
         .WillOnce(Return(mockAnimationPtr));
 
     usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setIterations(5));
@@ -813,10 +813,10 @@
     usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(CompositorFloatKeyframe(1.75, 5.0)));
 
     // Create animation
-    WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMock(CompositorAnimation::TargetPropertyOpacity);
+    WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMock(CompositorTargetProperty::OPACITY);
     ExpectationSet usesMockAnimation;
 
-    usesMockCurve += EXPECT_CALL(*m_mockCompositorFactory, createAnimation(Ref(*mockCurvePtr), CompositorAnimation::TargetPropertyOpacity, _, _))
+    usesMockCurve += EXPECT_CALL(*m_mockCompositorFactory, createAnimation(Ref(*mockCurvePtr), CompositorTargetProperty::OPACITY, _, _))
         .WillOnce(Return(mockAnimationPtr));
 
     usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setIterations(5));
@@ -870,10 +870,10 @@
     usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(CompositorFloatKeyframe(2.0, 5.0)));
 
     // KeyframeEffect is created
-    WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMock(CompositorAnimation::TargetPropertyOpacity);
+    WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMock(CompositorTargetProperty::OPACITY);
     ExpectationSet usesMockAnimation;
 
-    usesMockCurve += EXPECT_CALL(*m_mockCompositorFactory, createAnimation(Ref(*mockCurvePtr), CompositorAnimation::TargetPropertyOpacity, _, _))
+    usesMockCurve += EXPECT_CALL(*m_mockCompositorFactory, createAnimation(Ref(*mockCurvePtr), CompositorTargetProperty::OPACITY, _, _))
         .WillOnce(Return(mockAnimationPtr));
 
     usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setIterations(10));
@@ -928,10 +928,10 @@
     usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(CompositorFloatKeyframe(1.0, 5.0)));
 
     // Create the animation
-    WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMock(CompositorAnimation::TargetPropertyOpacity);
+    WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMock(CompositorTargetProperty::OPACITY);
     ExpectationSet usesMockAnimation;
 
-    usesMockCurve += EXPECT_CALL(*m_mockCompositorFactory, createAnimation(Ref(*mockCurvePtr), CompositorAnimation::TargetPropertyOpacity, _, _))
+    usesMockCurve += EXPECT_CALL(*m_mockCompositorFactory, createAnimation(Ref(*mockCurvePtr), CompositorTargetProperty::OPACITY, _, _))
         .WillOnce(Return(mockAnimationPtr));
 
     usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setIterations(10));
@@ -976,10 +976,10 @@
     usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(CompositorFloatKeyframe(1.5, 5.0)));
 
     // Create animation
-    WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMock(CompositorAnimation::TargetPropertyOpacity);
+    WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMock(CompositorTargetProperty::OPACITY);
     ExpectationSet usesMockAnimation;
 
-    usesMockCurve += EXPECT_CALL(*m_mockCompositorFactory, createAnimation(Ref(*mockCurvePtr), CompositorAnimation::TargetPropertyOpacity, _, _))
+    usesMockCurve += EXPECT_CALL(*m_mockCompositorFactory, createAnimation(Ref(*mockCurvePtr), CompositorTargetProperty::OPACITY, _, _))
         .WillOnce(Return(mockAnimationPtr));
 
     usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setIterations(5));
@@ -1021,10 +1021,10 @@
     usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(CompositorFloatKeyframe(1.0, 5.0)));
 
     // Create animation
-    WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMock(CompositorAnimation::TargetPropertyOpacity);
+    WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMock(CompositorTargetProperty::OPACITY);
     ExpectationSet usesMockAnimation;
 
-    usesMockCurve += EXPECT_CALL(*m_mockCompositorFactory, createAnimation(Ref(*mockCurvePtr), CompositorAnimation::TargetPropertyOpacity, _, _))
+    usesMockCurve += EXPECT_CALL(*m_mockCompositorFactory, createAnimation(Ref(*mockCurvePtr), CompositorTargetProperty::OPACITY, _, _))
         .WillOnce(Return(mockAnimationPtr));
 
     usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setIterations(1));
@@ -1066,10 +1066,10 @@
     usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(CompositorFloatKeyframe(1.0, 5.0)));
 
     // Create animation
-    WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMock(CompositorAnimation::TargetPropertyOpacity);
+    WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMock(CompositorTargetProperty::OPACITY);
     ExpectationSet usesMockAnimation;
 
-    usesMockCurve += EXPECT_CALL(*m_mockCompositorFactory, createAnimation(Ref(*mockCurvePtr), CompositorAnimation::TargetPropertyOpacity, _, _))
+    usesMockCurve += EXPECT_CALL(*m_mockCompositorFactory, createAnimation(Ref(*mockCurvePtr), CompositorTargetProperty::OPACITY, _, _))
         .WillOnce(Return(mockAnimationPtr));
 
     usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setIterations(1));
@@ -1111,10 +1111,10 @@
     usesMockCurve += EXPECT_CALL(*mockCurvePtr, add(CompositorFloatKeyframe(1.0, 5.0)));
 
     // Create animation
-    WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMock(CompositorAnimation::TargetPropertyOpacity);
+    WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMock(CompositorTargetProperty::OPACITY);
     ExpectationSet usesMockAnimation;
 
-    usesMockCurve += EXPECT_CALL(*m_mockCompositorFactory, createAnimation(Ref(*mockCurvePtr), CompositorAnimation::TargetPropertyOpacity, _, _))
+    usesMockCurve += EXPECT_CALL(*m_mockCompositorFactory, createAnimation(Ref(*mockCurvePtr), CompositorTargetProperty::OPACITY, _, _))
         .WillOnce(Return(mockAnimationPtr));
 
     usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setIterations(1));
@@ -1157,10 +1157,10 @@
     usesMockCurve += EXPECT_CALL(*mockCurvePtr, setCubicBezierTimingFunction(1, 2, 3, 4));
 
     // Create animation
-    WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMock(CompositorAnimation::TargetPropertyOpacity);
+    WebCompositorAnimationMock* mockAnimationPtr = new WebCompositorAnimationMock(CompositorTargetProperty::OPACITY);
     ExpectationSet usesMockAnimation;
 
-    usesMockCurve += EXPECT_CALL(*m_mockCompositorFactory, createAnimation(Ref(*mockCurvePtr), CompositorAnimation::TargetPropertyOpacity, _, _))
+    usesMockCurve += EXPECT_CALL(*m_mockCompositorFactory, createAnimation(Ref(*mockCurvePtr), CompositorTargetProperty::OPACITY, _, _))
         .WillOnce(Return(mockAnimationPtr));
 
     usesMockAnimation += EXPECT_CALL(*mockAnimationPtr, setIterations(1));
diff --git a/third_party/WebKit/Source/core/animation/CompositorAnimationsTestHelper.h b/third_party/WebKit/Source/core/animation/CompositorAnimationsTestHelper.h
index 075bae81..0b53fa4 100644
--- a/third_party/WebKit/Source/core/animation/CompositorAnimationsTestHelper.h
+++ b/third_party/WebKit/Source/core/animation/CompositorAnimationsTestHelper.h
@@ -58,12 +58,12 @@
 
 class WebCompositorAnimationMock : public CompositorAnimation {
 private:
-    CompositorAnimation::TargetProperty m_property;
+    CompositorTargetProperty::Type m_property;
 
 public:
     // Target Property is set through the constructor.
-    WebCompositorAnimationMock(CompositorAnimation::TargetProperty p) : m_property(p) { }
-    virtual CompositorAnimation::TargetProperty targetProperty() const { return m_property; }
+    WebCompositorAnimationMock(CompositorTargetProperty::Type p) : m_property(p) { }
+    virtual CompositorTargetProperty::Type targetProperty() const { return m_property; }
 
     MOCK_METHOD0(id, int());
     MOCK_METHOD0(group, int());
@@ -130,7 +130,7 @@
 public:
     class CompositorFactoryMock : public CompositorFactory {
     public:
-        MOCK_METHOD4(createAnimation, CompositorAnimation*(const CompositorAnimationCurve& curve, CompositorAnimation::TargetProperty target, int groupId, int animationId));
+        MOCK_METHOD4(createAnimation, CompositorAnimation*(const CompositorAnimationCurve& curve, CompositorTargetProperty::Type target, int groupId, int animationId));
         MOCK_METHOD0(createFloatAnimationCurve, CompositorFloatAnimationCurve*());
         MOCK_METHOD0(createAnimationPlayer, CompositorAnimationPlayer*());
         MOCK_METHOD0(createAnimationTimeline, CompositorAnimationTimeline*());
diff --git a/third_party/WebKit/Source/core/animation/InterpolableValue.h b/third_party/WebKit/Source/core/animation/InterpolableValue.h
index 3eff2a42..a3d30a8d 100644
--- a/third_party/WebKit/Source/core/animation/InterpolableValue.h
+++ b/third_party/WebKit/Source/core/animation/InterpolableValue.h
@@ -61,6 +61,7 @@
     PassOwnPtr<InterpolableValue> cloneAndZero() const final { return create(0); }
     void scale(double scale) final;
     void scaleAndAdd(double scale, const InterpolableValue& other) final;
+    void set(double value) { m_value = value; }
 
 private:
     void interpolate(const InterpolableValue& to, const double progress, InterpolableValue& result) const final;
diff --git a/third_party/WebKit/Source/core/animation/LengthListPropertyFunctions.cpp b/third_party/WebKit/Source/core/animation/LengthListPropertyFunctions.cpp
new file mode 100644
index 0000000..904c14d
--- /dev/null
+++ b/third_party/WebKit/Source/core/animation/LengthListPropertyFunctions.cpp
@@ -0,0 +1,144 @@
+// 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 "core/animation/LengthListPropertyFunctions.h"
+
+#include "core/style/ComputedStyle.h"
+
+namespace blink {
+
+namespace {
+
+const FillLayer* getFillLayer(CSSPropertyID property, const ComputedStyle& style)
+{
+    switch (property) {
+    case CSSPropertyBackgroundPositionX:
+    case CSSPropertyBackgroundPositionY:
+        return &style.backgroundLayers();
+    case CSSPropertyWebkitMaskPositionX:
+    case CSSPropertyWebkitMaskPositionY:
+        return &style.maskLayers();
+    default:
+        ASSERT_NOT_REACHED();
+        return nullptr;
+    }
+}
+
+FillLayer* accessFillLayer(CSSPropertyID property, ComputedStyle& style)
+{
+    switch (property) {
+    case CSSPropertyBackgroundPositionX:
+    case CSSPropertyBackgroundPositionY:
+        return &style.accessBackgroundLayers();
+    case CSSPropertyWebkitMaskPositionX:
+    case CSSPropertyWebkitMaskPositionY:
+        return &style.accessMaskLayers();
+    default:
+        ASSERT_NOT_REACHED();
+        return nullptr;
+    }
+}
+
+struct FillLayerMethods {
+    FillLayerMethods(CSSPropertyID property)
+    {
+        switch (property) {
+        case CSSPropertyBackgroundPositionX:
+        case CSSPropertyWebkitMaskPositionX:
+            isSet = &FillLayer::isXPositionSet;
+            get = &FillLayer::xPosition;
+            set = &FillLayer::setXPosition;
+            clear = &FillLayer::clearXPosition;
+            break;
+        case CSSPropertyBackgroundPositionY:
+        case CSSPropertyWebkitMaskPositionY:
+            isSet = &FillLayer::isYPositionSet;
+            get = &FillLayer::yPosition;
+            set = &FillLayer::setYPosition;
+            clear = &FillLayer::clearYPosition;
+            break;
+        default:
+            ASSERT_NOT_REACHED();
+            isSet = nullptr;
+            get = nullptr;
+            set = nullptr;
+            clear = nullptr;
+            break;
+        }
+    }
+
+    bool (FillLayer::*isSet)() const;
+    const Length& (FillLayer::*get)() const;
+    void (FillLayer::*set)(const Length&);
+    void (FillLayer::*clear)();
+};
+
+} // namespace
+
+ValueRange LengthListPropertyFunctions::valueRange(CSSPropertyID property)
+{
+    switch (property) {
+    case CSSPropertyBackgroundPositionX:
+    case CSSPropertyBackgroundPositionY:
+    case CSSPropertyWebkitMaskPositionX:
+    case CSSPropertyWebkitMaskPositionY:
+        return ValueRangeAll;
+
+    case CSSPropertyStrokeDasharray:
+        return ValueRangeNonNegative;
+
+    default:
+        ASSERT_NOT_REACHED();
+        return ValueRangeAll;
+    }
+}
+
+Vector<Length> LengthListPropertyFunctions::getInitialLengthList(CSSPropertyID property)
+{
+    return getLengthList(property, *ComputedStyle::initialStyle());
+}
+
+Vector<Length> LengthListPropertyFunctions::getLengthList(CSSPropertyID property, const ComputedStyle& style)
+{
+    Vector<Length> result;
+
+    if (property == CSSPropertyStrokeDasharray) {
+        if (style.strokeDashArray())
+            result.appendVector(style.strokeDashArray()->vector());
+        return result;
+    }
+
+    const FillLayer* fillLayer = getFillLayer(property, style);
+    FillLayerMethods fillLayerMethods(property);
+    while (fillLayer && (fillLayer->*fillLayerMethods.isSet)()) {
+        result.append((fillLayer->*fillLayerMethods.get)());
+        fillLayer = fillLayer->next();
+    }
+    return result;
+}
+
+void LengthListPropertyFunctions::setLengthList(CSSPropertyID property, ComputedStyle& style, Vector<Length>&& lengthList)
+{
+    if (property == CSSPropertyStrokeDasharray) {
+        style.setStrokeDashArray(lengthList.isEmpty() ? nullptr : RefVector<Length>::create(std::move(lengthList)));
+        return;
+    }
+
+    FillLayer* fillLayer = accessFillLayer(property, style);
+    FillLayer* prev = nullptr;
+    FillLayerMethods fillLayerMethods(property);
+    for (size_t i = 0; i < lengthList.size(); i++) {
+        if (!fillLayer)
+            fillLayer = prev->ensureNext();
+        (fillLayer->*fillLayerMethods.set)(lengthList[i]);
+        prev = fillLayer;
+        fillLayer = fillLayer->next();
+    }
+    while (fillLayer) {
+        (fillLayer->*fillLayerMethods.clear)();
+        fillLayer = fillLayer->next();
+    }
+}
+
+} // namespace blink
diff --git a/third_party/WebKit/Source/core/animation/LengthListPropertyFunctions.h b/third_party/WebKit/Source/core/animation/LengthListPropertyFunctions.h
index 0174a42..b15720d 100644
--- a/third_party/WebKit/Source/core/animation/LengthListPropertyFunctions.h
+++ b/third_party/WebKit/Source/core/animation/LengthListPropertyFunctions.h
@@ -6,40 +6,20 @@
 #define LengthListPropertyFunctions_h
 
 #include "core/CSSPropertyNames.h"
-#include "core/style/ComputedStyle.h"
 #include "platform/Length.h"
-#include "wtf/Allocator.h"
-#include "wtf/RefVector.h"
+#include "wtf/Vector.h"
 
 namespace blink {
 
+class ComputedStyle;
+
 class LengthListPropertyFunctions {
     STATIC_ONLY(LengthListPropertyFunctions);
 public:
-    static ValueRange valueRange(CSSPropertyID property)
-    {
-        ASSERT(property == CSSPropertyStrokeDasharray);
-        return ValueRangeNonNegative;
-    }
-
-    static const RefVector<Length>* getInitialLengthList(CSSPropertyID property)
-    {
-        ASSERT(property == CSSPropertyStrokeDasharray);
-        return nullptr;
-    }
-
-    static const RefVector<Length>* getLengthList(CSSPropertyID property, const ComputedStyle& style)
-    {
-        ASSERT(property == CSSPropertyStrokeDasharray);
-        return style.strokeDashArray();
-    }
-
-    static void setLengthList(CSSPropertyID property, ComputedStyle& style, PassRefPtr<RefVector<Length>> lengthList)
-    {
-        ASSERT(property == CSSPropertyStrokeDasharray);
-        style.setStrokeDashArray(lengthList);
-    }
-
+    static ValueRange valueRange(CSSPropertyID);
+    static Vector<Length> getInitialLengthList(CSSPropertyID);
+    static Vector<Length> getLengthList(CSSPropertyID, const ComputedStyle&);
+    static void setLengthList(CSSPropertyID, ComputedStyle&, Vector<Length>&& lengthList);
 };
 
 } // namespace blink
diff --git a/third_party/WebKit/Source/core/animation/PropertyInterpolationTypesMapping.cpp b/third_party/WebKit/Source/core/animation/PropertyInterpolationTypesMapping.cpp
index 52bee750..1f2a93c5 100644
--- a/third_party/WebKit/Source/core/animation/PropertyInterpolationTypesMapping.cpp
+++ b/third_party/WebKit/Source/core/animation/PropertyInterpolationTypesMapping.cpp
@@ -16,6 +16,7 @@
 #include "core/animation/CSSNumberInterpolationType.h"
 #include "core/animation/CSSPaintInterpolationType.h"
 #include "core/animation/CSSPathInterpolationType.h"
+#include "core/animation/CSSPositionAxisListInterpolationType.h"
 #include "core/animation/CSSShadowListInterpolationType.h"
 #include "core/animation/CSSValueInterpolationType.h"
 #include "core/animation/CSSVisibilityInterpolationType.h"
@@ -174,6 +175,12 @@
         case CSSPropertyMotionRotation:
             applicableTypes->append(adoptPtr(new CSSMotionRotationInterpolationType(cssProperty)));
             break;
+        case CSSPropertyBackgroundPositionX:
+        case CSSPropertyBackgroundPositionY:
+        case CSSPropertyWebkitMaskPositionX:
+        case CSSPropertyWebkitMaskPositionY:
+            applicableTypes->append(adoptPtr(new CSSPositionAxisListInterpolationType(cssProperty)));
+            break;
         default:
             // TODO(alancutter): Support all interpolable CSS properties here so we can stop falling back to the old StyleInterpolation implementation.
             if (CSSPropertyMetadata::isInterpolableProperty(cssProperty))
diff --git a/third_party/WebKit/Source/core/core.gypi b/third_party/WebKit/Source/core/core.gypi
index 01f9609c..2d9944f 100644
--- a/third_party/WebKit/Source/core/core.gypi
+++ b/third_party/WebKit/Source/core/core.gypi
@@ -877,6 +877,8 @@
             'animation/CSSPaintInterpolationType.h',
             'animation/CSSPathInterpolationType.cpp',
             'animation/CSSPathInterpolationType.h',
+            'animation/CSSPositionAxisListInterpolationType.cpp',
+            'animation/CSSPositionAxisListInterpolationType.h',
             'animation/CSSShadowListInterpolationType.cpp',
             'animation/CSSShadowListInterpolationType.h',
             'animation/CSSValueInterpolationType.cpp',
@@ -926,6 +928,8 @@
             'animation/LegacyStyleInterpolation.h',
             'animation/LengthBoxStyleInterpolation.cpp',
             'animation/LengthBoxStyleInterpolation.h',
+            'animation/LengthListPropertyFunctions.cpp',
+            'animation/LengthListPropertyFunctions.h',
             'animation/LengthPairStyleInterpolation.cpp',
             'animation/LengthPairStyleInterpolation.h',
             'animation/LengthPropertyFunctions.cpp',
diff --git a/third_party/WebKit/Source/core/css/CSSStyleSheet.cpp b/third_party/WebKit/Source/core/css/CSSStyleSheet.cpp
index f0eb22e..07cf951 100644
--- a/third_party/WebKit/Source/core/css/CSSStyleSheet.cpp
+++ b/third_party/WebKit/Source/core/css/CSSStyleSheet.cpp
@@ -85,7 +85,7 @@
         || isHTMLLinkElement(*parentNode)
         || isHTMLStyleElement(*parentNode)
         || isSVGStyleElement(*parentNode)
-        || parentNode->nodeType() == Node::PROCESSING_INSTRUCTION_NODE;
+        || parentNode->getNodeType() == Node::PROCESSING_INSTRUCTION_NODE;
 }
 #endif
 
diff --git a/third_party/WebKit/Source/core/css/StyleRuleImport.cpp b/third_party/WebKit/Source/core/css/StyleRuleImport.cpp
index b252d3f..35a3723 100644
--- a/third_party/WebKit/Source/core/css/StyleRuleImport.cpp
+++ b/third_party/WebKit/Source/core/css/StyleRuleImport.cpp
@@ -88,7 +88,7 @@
     if (!baseURL.isNull()) {
         context.setBaseURL(baseURL);
         if (document)
-            context.setReferrer(Referrer(baseURL.strippedForUseAsReferrer(), document->referrerPolicy()));
+            context.setReferrer(Referrer(baseURL.strippedForUseAsReferrer(), document->getReferrerPolicy()));
     }
 
     m_styleSheet = StyleSheetContents::create(this, href, context);
diff --git a/third_party/WebKit/Source/core/css/invalidation/StyleInvalidator.cpp b/third_party/WebKit/Source/core/css/invalidation/StyleInvalidator.cpp
index 211ec34b..92f57e41 100644
--- a/third_party/WebKit/Source/core/css/invalidation/StyleInvalidator.cpp
+++ b/third_party/WebKit/Source/core/css/invalidation/StyleInvalidator.cpp
@@ -44,7 +44,7 @@
     ASSERT(element.inActiveDocument());
     bool requiresDescendantInvalidation = false;
 
-    if (element.styleChangeType() < SubtreeStyleChange) {
+    if (element.getStyleChangeType() < SubtreeStyleChange) {
         for (auto& invalidationSet : invalidationLists.descendants) {
             if (invalidationSet->wholeSubtreeInvalid()) {
                 element.setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTracing::create(StyleChangeReason::StyleInvalidator));
@@ -213,7 +213,7 @@
     for (const auto& invalidationSet : pendingInvalidations->siblings())
         siblingData.pushInvalidationSet(toSiblingInvalidationSet(*invalidationSet));
 
-    if (element.styleChangeType() >= SubtreeStyleChange)
+    if (element.getStyleChangeType() >= SubtreeStyleChange)
         return;
 
     if (!pendingInvalidations->descendants().isEmpty()) {
@@ -234,7 +234,7 @@
         return false;
 
     bool thisElementNeedsStyleRecalc = false;
-    if (element.styleChangeType() >= SubtreeStyleChange) {
+    if (element.getStyleChangeType() >= SubtreeStyleChange) {
         recursionData.setWholeSubtreeInvalid();
     } else {
         thisElementNeedsStyleRecalc = recursionData.matchesCurrentInvalidationSets(element);
diff --git a/third_party/WebKit/Source/core/css/parser/CSSParserMode.cpp b/third_party/WebKit/Source/core/css/parser/CSSParserMode.cpp
index e377644c..f8ba7ff9 100644
--- a/third_party/WebKit/Source/core/css/parser/CSSParserMode.cpp
+++ b/third_party/WebKit/Source/core/css/parser/CSSParserMode.cpp
@@ -45,7 +45,7 @@
     : m_baseURL(baseURL.isNull() ? document.baseURL() : baseURL)
     , m_charset(charset)
     , m_mode(document.inQuirksMode() ? HTMLQuirksMode : HTMLStandardMode)
-    , m_referrer(m_baseURL.strippedForUseAsReferrer(), document.referrerPolicy())
+    , m_referrer(m_baseURL.strippedForUseAsReferrer(), document.getReferrerPolicy())
     , m_isHTMLDocument(document.isHTMLDocument())
     , m_useLegacyBackgroundSizeShorthandBehavior(document.settings() ? document.settings()->useLegacyBackgroundSizeShorthandBehavior() : false)
     , m_shouldCheckContentSecurityPolicy(DoNotCheckContentSecurityPolicy)
diff --git a/third_party/WebKit/Source/core/dom/Attr.h b/third_party/WebKit/Source/core/dom/Attr.h
index 9bfd829..3fdd0e9 100644
--- a/third_party/WebKit/Source/core/dom/Attr.h
+++ b/third_party/WebKit/Source/core/dom/Attr.h
@@ -66,7 +66,7 @@
     bool isElementNode() const = delete; // This will catch anyone doing an unnecessary check.
 
     String nodeName() const override { return name(); }
-    NodeType nodeType() const override { return ATTRIBUTE_NODE; }
+    NodeType getNodeType() const override { return ATTRIBUTE_NODE; }
 
     String nodeValue() const override { return value(); }
     void setNodeValue(const String&) override;
diff --git a/third_party/WebKit/Source/core/dom/CDATASection.cpp b/third_party/WebKit/Source/core/dom/CDATASection.cpp
index 1cfc95c..ae7b886 100644
--- a/third_party/WebKit/Source/core/dom/CDATASection.cpp
+++ b/third_party/WebKit/Source/core/dom/CDATASection.cpp
@@ -40,7 +40,7 @@
     return "#cdata-section";
 }
 
-Node::NodeType CDATASection::nodeType() const
+Node::NodeType CDATASection::getNodeType() const
 {
     return CDATA_SECTION_NODE;
 }
diff --git a/third_party/WebKit/Source/core/dom/CDATASection.h b/third_party/WebKit/Source/core/dom/CDATASection.h
index c461800b..1f2879b 100644
--- a/third_party/WebKit/Source/core/dom/CDATASection.h
+++ b/third_party/WebKit/Source/core/dom/CDATASection.h
@@ -36,11 +36,11 @@
     CDATASection(Document&, const String&);
 
     String nodeName() const override;
-    NodeType nodeType() const override;
+    NodeType getNodeType() const override;
     PassRefPtrWillBeRawPtr<Text> cloneWithData(const String&) override;
 };
 
-DEFINE_NODE_TYPE_CASTS(CDATASection, nodeType() == Node::CDATA_SECTION_NODE);
+DEFINE_NODE_TYPE_CASTS(CDATASection, getNodeType() == Node::CDATA_SECTION_NODE);
 
 } // namespace blink
 
diff --git a/third_party/WebKit/Source/core/dom/CharacterData.cpp b/third_party/WebKit/Source/core/dom/CharacterData.cpp
index d2e1a60f..62df07f5 100644
--- a/third_party/WebKit/Source/core/dom/CharacterData.cpp
+++ b/third_party/WebKit/Source/core/dom/CharacterData.cpp
@@ -169,7 +169,7 @@
         toText(this)->updateTextLayoutObject(offsetOfReplacedData, oldLength, recalcStyleBehavior);
 
     if (source != UpdateFromParser) {
-        if (nodeType() == PROCESSING_INSTRUCTION_NODE)
+        if (getNodeType() == PROCESSING_INSTRUCTION_NODE)
             toProcessingInstruction(this)->didAttributeChanged();
 
         if (document().frame())
diff --git a/third_party/WebKit/Source/core/dom/Comment.cpp b/third_party/WebKit/Source/core/dom/Comment.cpp
index bbe68cfb..a223466 100644
--- a/third_party/WebKit/Source/core/dom/Comment.cpp
+++ b/third_party/WebKit/Source/core/dom/Comment.cpp
@@ -40,7 +40,7 @@
     return "#comment";
 }
 
-Node::NodeType Comment::nodeType() const
+Node::NodeType Comment::getNodeType() const
 {
     return COMMENT_NODE;
 }
diff --git a/third_party/WebKit/Source/core/dom/Comment.h b/third_party/WebKit/Source/core/dom/Comment.h
index 45a0444..8a1e9ead 100644
--- a/third_party/WebKit/Source/core/dom/Comment.h
+++ b/third_party/WebKit/Source/core/dom/Comment.h
@@ -36,11 +36,11 @@
     Comment(Document&, const String&);
 
     String nodeName() const override;
-    NodeType nodeType() const override;
+    NodeType getNodeType() const override;
     PassRefPtrWillBeRawPtr<Node> cloneNode(bool deep) override;
 };
 
-DEFINE_NODE_TYPE_CASTS(Comment, nodeType() == Node::COMMENT_NODE);
+DEFINE_NODE_TYPE_CASTS(Comment, getNodeType() == Node::COMMENT_NODE);
 
 } // namespace blink
 
diff --git a/third_party/WebKit/Source/core/dom/ContainerNode.cpp b/third_party/WebKit/Source/core/dom/ContainerNode.cpp
index 2fdfb8e..6eaee1c 100644
--- a/third_party/WebKit/Source/core/dom/ContainerNode.cpp
+++ b/third_party/WebKit/Source/core/dom/ContainerNode.cpp
@@ -104,10 +104,10 @@
 bool ContainerNode::isChildTypeAllowed(const Node& child) const
 {
     if (!child.isDocumentFragment())
-        return childTypeAllowed(child.nodeType());
+        return childTypeAllowed(child.getNodeType());
 
     for (Node* node = toDocumentFragment(child).firstChild(); node; node = node->nextSibling()) {
-        if (!childTypeAllowed(node->nodeType()))
+        if (!childTypeAllowed(node->getNodeType()))
             return false;
     }
     return true;
@@ -1341,7 +1341,7 @@
 
 void ContainerNode::checkForSiblingStyleChanges(SiblingCheckType changeType, Node* nodeBeforeChange, Node* nodeAfterChange)
 {
-    if (!inActiveDocument() || document().hasPendingForcedStyleRecalc() || styleChangeType() >= SubtreeStyleChange)
+    if (!inActiveDocument() || document().hasPendingForcedStyleRecalc() || getStyleChangeType() >= SubtreeStyleChange)
         return;
 
     // Forward positional selectors include nth-child, nth-of-type, first-of-type and only-of-type.
diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp
index 26eaa978..ad20f7e 100644
--- a/third_party/WebKit/Source/core/dom/Document.cpp
+++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -904,7 +904,7 @@
 
 PassRefPtrWillBeRawPtr<Node> Document::importNode(Node* importedNode, bool deep, ExceptionState& exceptionState)
 {
-    switch (importedNode->nodeType()) {
+    switch (importedNode->getNodeType()) {
     case TEXT_NODE:
         return createTextNode(importedNode->nodeValue());
     case CDATA_SECTION_NODE:
@@ -970,7 +970,7 @@
 {
     EventQueueScope scope;
 
-    switch (source->nodeType()) {
+    switch (source->getNodeType()) {
     case DOCUMENT_NODE:
         exceptionState.throwDOMException(NotSupportedError, "The node provided is of type '" + source->nodeName() + "', which may not be adopted.");
         return nullptr;
@@ -1411,7 +1411,7 @@
     return "#document";
 }
 
-Node::NodeType Document::nodeType() const
+Node::NodeType Document::getNodeType() const
 {
     return DOCUMENT_NODE;
 }
@@ -1544,7 +1544,7 @@
 
 bool Document::hasPendingForcedStyleRecalc() const
 {
-    return hasPendingStyleRecalc() && !inStyleRecalc() && styleChangeType() >= SubtreeStyleChange;
+    return hasPendingStyleRecalc() && !inStyleRecalc() && getStyleChangeType() >= SubtreeStyleChange;
 }
 
 void Document::updateStyleInvalidationIfNeeded()
@@ -1819,7 +1819,7 @@
     m_lifecycle.advanceTo(DocumentLifecycle::InStyleRecalc);
 
     StyleRecalcChange change = NoChange;
-    if (styleChangeType() >= SubtreeStyleChange)
+    if (getStyleChangeType() >= SubtreeStyleChange)
         change = Force;
 
     NthIndexCache nthIndexCache(*this);
@@ -2110,7 +2110,7 @@
 
 void Document::scheduleSVGFilterLayerUpdateHack(Element& element)
 {
-    if (element.styleChangeType() == NeedsReattachStyleChange)
+    if (element.getStyleChangeType() == NeedsReattachStyleChange)
         return;
     element.setSVGFilterNeedsLayerUpdate();
     m_layerUpdateSVGFilterElements.add(&element);
@@ -3244,7 +3244,7 @@
         // Documents may contain no more than one of each of these.
         // (One Element and one DocumentType.)
         for (Node& c : NodeTraversal::childrenOf(*this)) {
-            if (c.nodeType() == type)
+            if (c.getNodeType() == type)
                 return false;
         }
         return true;
@@ -3254,7 +3254,7 @@
 
 bool Document::canAcceptChild(const Node& newChild, const Node* oldChild, ExceptionState& exceptionState) const
 {
-    if (oldChild && oldChild->nodeType() == newChild.nodeType())
+    if (oldChild && oldChild->getNodeType() == newChild.getNodeType())
         return true;
 
     int numDoctypes = 0;
@@ -3266,7 +3266,7 @@
         if (oldChild && *oldChild == child)
             continue;
 
-        switch (child.nodeType()) {
+        switch (child.getNodeType()) {
         case DOCUMENT_TYPE_NODE:
             numDoctypes++;
             break;
@@ -3281,7 +3281,7 @@
     // Then, see how many doctypes and elements might be added by the new child.
     if (newChild.isDocumentFragment()) {
         for (Node& child : NodeTraversal::childrenOf(toDocumentFragment(newChild))) {
-            switch (child.nodeType()) {
+            switch (child.getNodeType()) {
             case ATTRIBUTE_NODE:
             case CDATA_SECTION_NODE:
             case DOCUMENT_FRAGMENT_NODE:
@@ -3302,7 +3302,7 @@
             }
         }
     } else {
-        switch (newChild.nodeType()) {
+        switch (newChild.getNodeType()) {
         case ATTRIBUTE_NODE:
         case CDATA_SECTION_NODE:
         case DOCUMENT_FRAGMENT_NODE:
@@ -3355,7 +3355,7 @@
 
 void Document::cloneDataFromDocument(const Document& other)
 {
-    setCompatibilityMode(other.compatibilityMode());
+    setCompatibilityMode(other.getCompatibilityMode());
     setEncodingData(other.m_encodingData);
     setContextFeatures(other.contextFeatures());
     setSecurityOrigin(other.securityOrigin()->isolatedCopy());
@@ -3729,7 +3729,7 @@
     ASSERT(node->document() == this);
     if (!m_sequentialFocusNavigationStartingPoint)
         m_sequentialFocusNavigationStartingPoint = Range::create(*this);
-    m_sequentialFocusNavigationStartingPoint->selectNodeContents(node->isElementNode() ? node : node->parentOrShadowHostElement(), ASSERT_NO_EXCEPTION);
+    m_sequentialFocusNavigationStartingPoint->selectNodeContents(node, ASSERT_NO_EXCEPTION);
 }
 
 Element* Document::sequentialFocusNavigationStartingPoint(WebFocusType type) const
@@ -3741,7 +3741,11 @@
     if (!m_sequentialFocusNavigationStartingPoint->collapsed()) {
         Node* node = m_sequentialFocusNavigationStartingPoint->startContainer();
         ASSERT(node == m_sequentialFocusNavigationStartingPoint->endContainer());
-        return node->isElementNode() ? toElement(node) : node->parentOrShadowHostElement();
+        if (node->isElementNode())
+            return toElement(node);
+        if (Element* neighborElement = type == WebFocusTypeForward ? ElementTraversal::previous(*node) : ElementTraversal::next(*node))
+            return neighborElement;
+        return node->parentOrShadowHostElement();
     }
 
     // Range::selectNodeContents didn't select contents because the element had
@@ -4941,10 +4945,10 @@
     // In the common case, create the security context from the currently
     // loading URL with a fresh content security policy.
     m_cookieURL = m_url;
-    enforceSandboxFlags(initializer.sandboxFlags());
+    enforceSandboxFlags(initializer.getSandboxFlags());
     if (initializer.shouldEnforceStrictMixedContentChecking())
         enforceStrictMixedContentChecking();
-    setInsecureRequestsPolicy(initializer.insecureRequestsPolicy());
+    setInsecureRequestsPolicy(initializer.getInsecureRequestsPolicy());
     if (initializer.insecureNavigationsToUpgrade()) {
         for (auto toUpgrade : *initializer.insecureNavigationsToUpgrade())
             addInsecureNavigationUpgrade(toUpgrade);
diff --git a/third_party/WebKit/Source/core/dom/Document.h b/third_party/WebKit/Source/core/dom/Document.h
index b144a8f3..7dbdab76 100644
--- a/third_party/WebKit/Source/core/dom/Document.h
+++ b/third_party/WebKit/Source/core/dom/Document.h
@@ -552,7 +552,7 @@
     enum CompatibilityMode { QuirksMode, LimitedQuirksMode, NoQuirksMode };
 
     void setCompatibilityMode(CompatibilityMode);
-    CompatibilityMode compatibilityMode() const { return m_compatibilityMode; }
+    CompatibilityMode getCompatibilityMode() const { return m_compatibilityMode; }
 
     String compatMode() const;
 
@@ -1080,7 +1080,7 @@
 
     bool importContainerNodeChildren(ContainerNode* oldContainerNode, PassRefPtrWillBeRawPtr<ContainerNode> newContainerNode, ExceptionState&);
     void lockCompatibilityMode() { m_compatibilityModeLocked = true; }
-    ParserSynchronizationPolicy parserSynchronizationPolicy() const { return m_parserSyncPolicy; }
+    ParserSynchronizationPolicy getParserSynchronizationPolicy() const { return m_parserSyncPolicy; }
 
 private:
     friend class IgnoreDestructiveWriteCountIncrementer;
@@ -1120,7 +1120,7 @@
     void childrenChanged(const ChildrenChange&) override;
 
     String nodeName() const final;
-    NodeType nodeType() const final;
+    NodeType getNodeType() const final;
     bool childTypeAllowed(NodeType) const final;
     PassRefPtrWillBeRawPtr<Node> cloneNode(bool deep) final;
     void cloneDataFromDocument(const Document&);
diff --git a/third_party/WebKit/Source/core/dom/DocumentFragment.cpp b/third_party/WebKit/Source/core/dom/DocumentFragment.cpp
index 87d98d12..fd008ab 100644
--- a/third_party/WebKit/Source/core/dom/DocumentFragment.cpp
+++ b/third_party/WebKit/Source/core/dom/DocumentFragment.cpp
@@ -43,7 +43,7 @@
     return "#document-fragment";
 }
 
-Node::NodeType DocumentFragment::nodeType() const
+Node::NodeType DocumentFragment::getNodeType() const
 {
     return DOCUMENT_FRAGMENT_NODE;
 }
diff --git a/third_party/WebKit/Source/core/dom/DocumentFragment.h b/third_party/WebKit/Source/core/dom/DocumentFragment.h
index 74788f62..cc36c67 100644
--- a/third_party/WebKit/Source/core/dom/DocumentFragment.h
+++ b/third_party/WebKit/Source/core/dom/DocumentFragment.h
@@ -46,7 +46,7 @@
     String nodeName() const final;
 
 private:
-    NodeType nodeType() const final;
+    NodeType getNodeType() const final;
     PassRefPtrWillBeRawPtr<Node> cloneNode(bool deep) override;
     bool childTypeAllowed(NodeType) const override;
 
diff --git a/third_party/WebKit/Source/core/dom/DocumentInit.cpp b/third_party/WebKit/Source/core/dom/DocumentInit.cpp
index 389db7b..c75e302f 100644
--- a/third_party/WebKit/Source/core/dom/DocumentInit.cpp
+++ b/third_party/WebKit/Source/core/dom/DocumentInit.cpp
@@ -101,7 +101,7 @@
     return 0;
 }
 
-SandboxFlags DocumentInit::sandboxFlags() const
+SandboxFlags DocumentInit::getSandboxFlags() const
 {
     ASSERT(frameForSecurityContext());
     return frameForSecurityContext()->loader().effectiveSandboxFlags();
@@ -113,10 +113,10 @@
     return frameForSecurityContext()->loader().shouldEnforceStrictMixedContentChecking();
 }
 
-SecurityContext::InsecureRequestsPolicy DocumentInit::insecureRequestsPolicy() const
+SecurityContext::InsecureRequestsPolicy DocumentInit::getInsecureRequestsPolicy() const
 {
     ASSERT(frameForSecurityContext());
-    return frameForSecurityContext()->loader().insecureRequestsPolicy();
+    return frameForSecurityContext()->loader().getInsecureRequestsPolicy();
 }
 
 SecurityContext::InsecureNavigationsSet* DocumentInit::insecureNavigationsToUpgrade() const
diff --git a/third_party/WebKit/Source/core/dom/DocumentInit.h b/third_party/WebKit/Source/core/dom/DocumentInit.h
index 4b3437bf..f166738 100644
--- a/third_party/WebKit/Source/core/dom/DocumentInit.h
+++ b/third_party/WebKit/Source/core/dom/DocumentInit.h
@@ -61,10 +61,10 @@
     bool shouldSetURL() const;
     bool isSeamlessAllowedFor(Document* child) const;
     bool shouldReuseDefaultView() const { return m_shouldReuseDefaultView; }
-    SandboxFlags sandboxFlags() const;
+    SandboxFlags getSandboxFlags() const;
     bool shouldEnforceStrictMixedContentChecking() const;
     bool isHostedInReservedIPRange() const;
-    SecurityContext::InsecureRequestsPolicy insecureRequestsPolicy() const;
+    SecurityContext::InsecureRequestsPolicy getInsecureRequestsPolicy() const;
     SecurityContext::InsecureNavigationsSet* insecureNavigationsToUpgrade() const;
 
     Document* parent() const { return m_parent.get(); }
diff --git a/third_party/WebKit/Source/core/dom/DocumentLifecycle.cpp b/third_party/WebKit/Source/core/dom/DocumentLifecycle.cpp
index 7fcdd9d..5e9e11c7 100644
--- a/third_party/WebKit/Source/core/dom/DocumentLifecycle.cpp
+++ b/third_party/WebKit/Source/core/dom/DocumentLifecycle.cpp
@@ -41,7 +41,7 @@
 // related data to avoid this being a global setting.
 static unsigned s_allowThrottlingCount = 0;
 
-DocumentLifecycle::Scope::Scope(DocumentLifecycle& lifecycle, State finalState)
+DocumentLifecycle::Scope::Scope(DocumentLifecycle& lifecycle, LifecycleState finalState)
     : m_lifecycle(lifecycle)
     , m_finalState(finalState)
 {
@@ -52,7 +52,7 @@
     m_lifecycle.advanceTo(m_finalState);
 }
 
-DocumentLifecycle::DeprecatedTransition::DeprecatedTransition(State from, State to)
+DocumentLifecycle::DeprecatedTransition::DeprecatedTransition(LifecycleState from, LifecycleState to)
     : m_previous(s_deprecatedTransitionStack)
     , m_from(from)
     , m_to(to)
@@ -88,7 +88,7 @@
 
 #if ENABLE(ASSERT)
 
-bool DocumentLifecycle::canAdvanceTo(State nextState) const
+bool DocumentLifecycle::canAdvanceTo(LifecycleState nextState) const
 {
     // We can stop from anywhere.
     if (nextState == Stopping)
@@ -248,7 +248,7 @@
     return false;
 }
 
-bool DocumentLifecycle::canRewindTo(State nextState) const
+bool DocumentLifecycle::canRewindTo(LifecycleState nextState) const
 {
     // This transition is bogus, but we've whitelisted it anyway.
     if (s_deprecatedTransitionStack && m_state == s_deprecatedTransitionStack->from() && nextState == s_deprecatedTransitionStack->to())
@@ -264,14 +264,14 @@
 
 #endif
 
-void DocumentLifecycle::advanceTo(State nextState)
+void DocumentLifecycle::advanceTo(LifecycleState nextState)
 {
     ASSERT_WITH_MESSAGE(canAdvanceTo(nextState),
         "Cannot advance document lifecycle from %s to %s.", stateAsDebugString(m_state), stateAsDebugString(nextState));
     m_state = nextState;
 }
 
-void DocumentLifecycle::ensureStateAtMost(State state)
+void DocumentLifecycle::ensureStateAtMost(LifecycleState state)
 {
     ASSERT(state == VisualUpdatePending || state == StyleClean || state == LayoutClean);
     if (m_state <= state)
@@ -290,7 +290,7 @@
 #define DEBUG_STRING_CASE(StateName) \
     case StateName: return #StateName
 
-const char* DocumentLifecycle::stateAsDebugString(const State state)
+const char* DocumentLifecycle::stateAsDebugString(const LifecycleState state)
 {
     switch (state) {
         DEBUG_STRING_CASE(Uninitialized);
diff --git a/third_party/WebKit/Source/core/dom/DocumentLifecycle.h b/third_party/WebKit/Source/core/dom/DocumentLifecycle.h
index 72084fd5..2580dd18 100644
--- a/third_party/WebKit/Source/core/dom/DocumentLifecycle.h
+++ b/third_party/WebKit/Source/core/dom/DocumentLifecycle.h
@@ -42,7 +42,7 @@
     DISALLOW_NEW();
     WTF_MAKE_NONCOPYABLE(DocumentLifecycle);
 public:
-    enum State {
+    enum LifecycleState {
         Uninitialized,
         Inactive,
 
@@ -87,28 +87,28 @@
         STACK_ALLOCATED();
         WTF_MAKE_NONCOPYABLE(Scope);
     public:
-        Scope(DocumentLifecycle&, State finalState);
+        Scope(DocumentLifecycle&, LifecycleState finalState);
         ~Scope();
 
     private:
         DocumentLifecycle& m_lifecycle;
-        State m_finalState;
+        LifecycleState m_finalState;
     };
 
     class DeprecatedTransition {
         DISALLOW_NEW();
         WTF_MAKE_NONCOPYABLE(DeprecatedTransition);
     public:
-        DeprecatedTransition(State from, State to);
+        DeprecatedTransition(LifecycleState from, LifecycleState to);
         ~DeprecatedTransition();
 
-        State from() const { return m_from; }
-        State to() const { return m_to; }
+        LifecycleState from() const { return m_from; }
+        LifecycleState to() const { return m_to; }
 
     private:
         DeprecatedTransition* m_previous;
-        State m_from;
-        State m_to;
+        LifecycleState m_from;
+        LifecycleState m_to;
     };
 
     class DetachScope {
@@ -142,7 +142,7 @@
     ~DocumentLifecycle();
 
     bool isActive() const { return m_state > Inactive && m_state < Stopping; }
-    State state() const { return m_state; }
+    LifecycleState state() const { return m_state; }
 
     bool stateAllowsTreeMutations() const;
     bool stateAllowsLayoutTreeMutations() const;
@@ -150,8 +150,8 @@
     bool stateAllowsLayoutInvalidation() const;
     bool stateAllowsLayoutTreeNotifications() const;
 
-    void advanceTo(State);
-    void ensureStateAtMost(State);
+    void advanceTo(LifecycleState);
+    void ensureStateAtMost(LifecycleState);
 
     bool inDetach() const { return m_detachCount; }
     void incrementDetachCount() { m_detachCount++; }
@@ -164,16 +164,16 @@
     bool throttlingAllowed() const;
 
 #if ENABLE(ASSERT)
-    static const char* stateAsDebugString(const State);
+    static const char* stateAsDebugString(const LifecycleState);
 #endif
 
 private:
 #if ENABLE(ASSERT)
-    bool canAdvanceTo(State) const;
-    bool canRewindTo(State) const;
+    bool canAdvanceTo(LifecycleState) const;
+    bool canRewindTo(LifecycleState) const;
 #endif
 
-    State m_state;
+    LifecycleState m_state;
     int m_detachCount;
 };
 
diff --git a/third_party/WebKit/Source/core/dom/DocumentTest.cpp b/third_party/WebKit/Source/core/dom/DocumentTest.cpp
index 72fa382..b83d53b 100644
--- a/third_party/WebKit/Source/core/dom/DocumentTest.cpp
+++ b/third_party/WebKit/Source/core/dom/DocumentTest.cpp
@@ -259,7 +259,7 @@
 
 TEST_F(DocumentTest, referrerPolicyParsing)
 {
-    EXPECT_EQ(ReferrerPolicyDefault, document().referrerPolicy());
+    EXPECT_EQ(ReferrerPolicyDefault, document().getReferrerPolicy());
 
     struct TestCase {
         const char* policy;
@@ -281,7 +281,7 @@
         document().setReferrerPolicy(ReferrerPolicyDefault);
 
         document().processReferrerPolicy(test.policy);
-        EXPECT_EQ(test.expected, document().referrerPolicy()) << test.policy;
+        EXPECT_EQ(test.expected, document().getReferrerPolicy()) << test.policy;
     }
 }
 
diff --git a/third_party/WebKit/Source/core/dom/DocumentType.cpp b/third_party/WebKit/Source/core/dom/DocumentType.cpp
index 6055c7c6..29b5d2d7 100644
--- a/third_party/WebKit/Source/core/dom/DocumentType.cpp
+++ b/third_party/WebKit/Source/core/dom/DocumentType.cpp
@@ -40,7 +40,7 @@
     return name();
 }
 
-Node::NodeType DocumentType::nodeType() const
+Node::NodeType DocumentType::getNodeType() const
 {
     return DOCUMENT_TYPE_NODE;
 }
diff --git a/third_party/WebKit/Source/core/dom/DocumentType.h b/third_party/WebKit/Source/core/dom/DocumentType.h
index f4b7c15..85718c1 100644
--- a/third_party/WebKit/Source/core/dom/DocumentType.h
+++ b/third_party/WebKit/Source/core/dom/DocumentType.h
@@ -44,7 +44,7 @@
     DocumentType(Document*, const String& name, const String& publicId, const String& systemId);
 
     String nodeName() const override;
-    NodeType nodeType() const override;
+    NodeType getNodeType() const override;
     PassRefPtrWillBeRawPtr<Node> cloneNode(bool deep) override;
 
     InsertionNotificationRequest insertedInto(ContainerNode*) override;
diff --git a/third_party/WebKit/Source/core/dom/Element.cpp b/third_party/WebKit/Source/core/dom/Element.cpp
index fe83bc5c..53f79f1 100644
--- a/third_party/WebKit/Source/core/dom/Element.cpp
+++ b/third_party/WebKit/Source/core/dom/Element.cpp
@@ -371,7 +371,7 @@
     return elementAnimations && !elementAnimations->isEmpty();
 }
 
-Node::NodeType Element::nodeType() const
+Node::NodeType Element::getNodeType() const
 {
     return ELEMENT_NODE;
 }
@@ -1515,7 +1515,7 @@
 
     // We've already been through detach when doing an attach, but we might
     // need to clear any state that's been added since then.
-    if (hasRareData() && styleChangeType() == NeedsReattachStyleChange) {
+    if (hasRareData() && getStyleChangeType() == NeedsReattachStyleChange) {
         ElementRareData* data = elementRareData();
         data->clearComputedStyle();
     }
@@ -1779,7 +1779,7 @@
         }
     }
 
-    if (styleChangeType() >= SubtreeStyleChange)
+    if (getStyleChangeType() >= SubtreeStyleChange)
         return Force;
 
     if (change > Inherit || localChange > Inherit)
@@ -1860,7 +1860,7 @@
 
 void Element::setNeedsAnimationStyleRecalc()
 {
-    if (styleChangeType() != NoStyleChange)
+    if (getStyleChangeType() != NoStyleChange)
         return;
 
     setNeedsStyleRecalc(LocalStyleChange, StyleChangeReasonForTracing::create(StyleChangeReason::Animation));
diff --git a/third_party/WebKit/Source/core/dom/Element.h b/third_party/WebKit/Source/core/dom/Element.h
index d122d89..ae7a036 100644
--- a/third_party/WebKit/Source/core/dom/Element.h
+++ b/third_party/WebKit/Source/core/dom/Element.h
@@ -663,7 +663,7 @@
     void updateId(TreeScope&, const AtomicString& oldId, const AtomicString& newId);
     void updateName(const AtomicString& oldName, const AtomicString& newName);
 
-    NodeType nodeType() const final;
+    NodeType getNodeType() const final;
     bool childTypeAllowed(NodeType) const final;
 
     void setAttributeInternal(size_t index, const QualifiedName&, const AtomicString& value, SynchronizationOfLazyAttribute);
diff --git a/third_party/WebKit/Source/core/dom/ExecutionContext.h b/third_party/WebKit/Source/core/dom/ExecutionContext.h
index 45331c7..acafd94 100644
--- a/third_party/WebKit/Source/core/dom/ExecutionContext.h
+++ b/third_party/WebKit/Source/core/dom/ExecutionContext.h
@@ -157,7 +157,7 @@
     virtual bool isSecureContext(const SecureContextCheck = StandardSecureContextCheck) const;
 
     virtual void setReferrerPolicy(ReferrerPolicy);
-    ReferrerPolicy referrerPolicy() const { return m_referrerPolicy; }
+    ReferrerPolicy getReferrerPolicy() const { return m_referrerPolicy; }
 
 protected:
     ExecutionContext();
diff --git a/third_party/WebKit/Source/core/dom/Node.cpp b/third_party/WebKit/Source/core/dom/Node.cpp
index 9c6de0c2..71726f3 100644
--- a/third_party/WebKit/Source/core/dom/Node.cpp
+++ b/third_party/WebKit/Source/core/dom/Node.cpp
@@ -167,7 +167,7 @@
                 }
             }
 
-            switch (node->nodeType()) {
+            switch (node->getNodeType()) {
             case ELEMENT_NODE: {
                 ++elementNodes;
 
@@ -519,7 +519,7 @@
         if (node == this)
             break;
 
-        if (node->nodeType() == TEXT_NODE)
+        if (node->getNodeType() == TEXT_NODE)
             node = toText(node)->mergeNextSiblingNodesIfPossible();
         else
             node = NodeTraversal::nextPostOrder(*node);
@@ -728,7 +728,7 @@
         "data",
         InspectorStyleRecalcInvalidationTrackingEvent::data(this, reason));
 
-    StyleChangeType existingChangeType = styleChangeType();
+    StyleChangeType existingChangeType = getStyleChangeType();
     if (changeType > existingChangeType)
         setStyleChange(changeType);
 
@@ -899,7 +899,7 @@
     reattachContext.performingReattach = true;
 
     // We only need to detach if the node has already been through attach().
-    if (styleChangeType() < NeedsReattachStyleChange)
+    if (getStyleChangeType() < NeedsReattachStyleChange)
         detach(reattachContext);
     attach(reattachContext);
 }
@@ -1117,8 +1117,8 @@
     if (!other)
         return false;
 
-    NodeType nodeType = this->nodeType();
-    if (nodeType != other->nodeType())
+    NodeType nodeType = this->getNodeType();
+    if (nodeType != other->getNodeType())
         return false;
 
     if (nodeName() != other->nodeName())
@@ -1176,7 +1176,7 @@
 {
     const AtomicString& namespaceURI = namespaceURIMaybeEmpty.isEmpty() ? nullAtom : namespaceURIMaybeEmpty;
 
-    switch (nodeType()) {
+    switch (getNodeType()) {
     case ELEMENT_NODE: {
         const Element& element = toElement(*this);
 
@@ -1224,7 +1224,7 @@
 
     const Element* context;
 
-    switch (nodeType()) {
+    switch (getNodeType()) {
     case ELEMENT_NODE:
         context = toElement(this);
         break;
@@ -1258,7 +1258,7 @@
     if (!prefix.isNull() && prefix.isEmpty())
         return nullAtom;
 
-    switch (nodeType()) {
+    switch (getNodeType()) {
     case ELEMENT_NODE: {
         const Element& element = toElement(*this);
 
@@ -1329,7 +1329,7 @@
 
 void Node::setTextContent(const String& text)
 {
-    switch (nodeType()) {
+    switch (getNodeType()) {
     case TEXT_NODE:
     case CDATA_SECTION_NODE:
     case COMMENT_NODE:
@@ -1377,8 +1377,8 @@
     if (otherNode == this)
         return DOCUMENT_POSITION_EQUIVALENT;
 
-    const Attr* attr1 = nodeType() == ATTRIBUTE_NODE ? toAttr(this) : nullptr;
-    const Attr* attr2 = otherNode->nodeType() == ATTRIBUTE_NODE ? toAttr(otherNode) : nullptr;
+    const Attr* attr1 = getNodeType() == ATTRIBUTE_NODE ? toAttr(this) : nullptr;
+    const Attr* attr2 = otherNode->getNodeType() == ATTRIBUTE_NODE ? toAttr(otherNode) : nullptr;
 
     const Node* start1 = attr1 ? attr1->ownerElement() : this;
     const Node* start2 = attr2 ? attr2->ownerElement() : otherNode;
@@ -1449,9 +1449,9 @@
         const Node* child2 = chain2[--index2];
         if (child1 != child2) {
             // If one of the children is an attribute, it wins.
-            if (child1->nodeType() == ATTRIBUTE_NODE)
+            if (child1->getNodeType() == ATTRIBUTE_NODE)
                 return DOCUMENT_POSITION_FOLLOWING | connection;
-            if (child2->nodeType() == ATTRIBUTE_NODE)
+            if (child2->getNodeType() == ATTRIBUTE_NODE)
                 return DOCUMENT_POSITION_PRECEDING | connection;
 
             // If one of the children is a shadow root,
@@ -1549,7 +1549,7 @@
         WTFLogAlways("%s%s\t%p \"%s\"\n", prefix, nodeName().utf8().data(), this, value.utf8().data());
     } else if (isDocumentTypeNode()) {
         WTFLogAlways("%sDOCTYPE %s\t%p\n", prefix, nodeName().utf8().data(), this);
-    } else if (nodeType() == PROCESSING_INSTRUCTION_NODE) {
+    } else if (getNodeType() == PROCESSING_INSTRUCTION_NODE) {
         WTFLogAlways("%s?%s\t%p\n", prefix, nodeName().utf8().data(), this);
     } else if (isShadowRoot()) {
         // nodeName of ShadowRoot is #document-fragment.  It's confused with
@@ -1596,7 +1596,7 @@
             continue;
         }
 
-        switch (node->nodeType()) {
+        switch (node->getNodeType()) {
         case ELEMENT_NODE: {
             WTFLogAlways("/%s", node->nodeName().utf8().data());
 
@@ -2377,7 +2377,7 @@
 unsigned Node::lengthOfContents() const
 {
     // This switch statement must be consistent with that of Range::processContentsBetweenOffsets.
-    switch (nodeType()) {
+    switch (getNodeType()) {
     case Node::TEXT_NODE:
     case Node::CDATA_SECTION_NODE:
     case Node::COMMENT_NODE:
diff --git a/third_party/WebKit/Source/core/dom/Node.h b/third_party/WebKit/Source/core/dom/Node.h
index 5656b031..fd8a939 100644
--- a/third_party/WebKit/Source/core/dom/Node.h
+++ b/third_party/WebKit/Source/core/dom/Node.h
@@ -204,7 +204,7 @@
     virtual String nodeName() const = 0;
     virtual String nodeValue() const;
     virtual void setNodeValue(const String&);
-    virtual NodeType nodeType() const = 0;
+    virtual NodeType getNodeType() const = 0;
     ContainerNode* parentNode() const;
     Element* parentElement() const;
     ContainerNode* parentElementOrShadowRoot() const;
@@ -364,9 +364,9 @@
     // to check which element is exactly focused.
     bool focused() const { return isUserActionElement() && isUserActionElementFocused(); }
 
-    bool needsAttach() const { return styleChangeType() == NeedsReattachStyleChange; }
-    bool needsStyleRecalc() const { return styleChangeType() != NoStyleChange; }
-    StyleChangeType styleChangeType() const { return static_cast<StyleChangeType>(m_nodeFlags & StyleChangeMask); }
+    bool needsAttach() const { return getStyleChangeType() == NeedsReattachStyleChange; }
+    bool needsStyleRecalc() const { return getStyleChangeType() != NoStyleChange; }
+    StyleChangeType getStyleChangeType() const { return static_cast<StyleChangeType>(m_nodeFlags & StyleChangeMask); }
     bool childNeedsStyleRecalc() const { return getFlag(ChildNeedsStyleRecalcFlag); }
     bool isLink() const { return getFlag(IsLinkFlag); }
     bool isEditingText() const { ASSERT(isTextNode()); return getFlag(HasNameOrIsEditingTextFlag); }
@@ -494,7 +494,7 @@
     bool isChildOfV0ShadowHost() const;
     bool isSlotAssignable() const { return isTextNode() || isElementNode(); }
 
-    bool isDocumentTypeNode() const { return nodeType() == DOCUMENT_TYPE_NODE; }
+    bool isDocumentTypeNode() const { return getNodeType() == DOCUMENT_TYPE_NODE; }
     virtual bool childTypeAllowed(NodeType) const { return false; }
     unsigned countChildren() const;
 
@@ -867,7 +867,7 @@
 
 inline void Node::lazyReattachIfAttached()
 {
-    if (styleChangeType() == NeedsReattachStyleChange)
+    if (getStyleChangeType() == NeedsReattachStyleChange)
         return;
     if (!inActiveDocument())
         return;
diff --git a/third_party/WebKit/Source/core/dom/Node.idl b/third_party/WebKit/Source/core/dom/Node.idl
index 264cfa5..d3271a4 100644
--- a/third_party/WebKit/Source/core/dom/Node.idl
+++ b/third_party/WebKit/Source/core/dom/Node.idl
@@ -37,7 +37,7 @@
     const unsigned short DOCUMENT_TYPE_NODE = 10;
     const unsigned short DOCUMENT_FRAGMENT_NODE = 11;
     const unsigned short NOTATION_NODE = 12; // historical
-    readonly attribute unsigned short nodeType;
+    [ImplementedAs=getNodeType] readonly attribute unsigned short nodeType;
     readonly attribute DOMString nodeName;
 
     readonly attribute DOMString? baseURI;
diff --git a/third_party/WebKit/Source/core/dom/NodeIteratorBase.cpp b/third_party/WebKit/Source/core/dom/NodeIteratorBase.cpp
index 9b4d30ab0..bcb45b16 100644
--- a/third_party/WebKit/Source/core/dom/NodeIteratorBase.cpp
+++ b/third_party/WebKit/Source/core/dom/NodeIteratorBase.cpp
@@ -43,7 +43,7 @@
 {
     // The bit twiddling here is done to map DOM node types, which are given as integers from
     // 1 through 14, to whatToShow bit masks.
-    if (!(((1 << (node->nodeType() - 1)) & m_whatToShow)))
+    if (!(((1 << (node->getNodeType() - 1)) & m_whatToShow)))
         return NodeFilter::FILTER_SKIP;
     if (!m_filter)
         return NodeFilter::FILTER_ACCEPT;
diff --git a/third_party/WebKit/Source/core/dom/ProcessingInstruction.cpp b/third_party/WebKit/Source/core/dom/ProcessingInstruction.cpp
index c41eaf7..8bd6fb7 100644
--- a/third_party/WebKit/Source/core/dom/ProcessingInstruction.cpp
+++ b/third_party/WebKit/Source/core/dom/ProcessingInstruction.cpp
@@ -90,7 +90,7 @@
     return m_target;
 }
 
-Node::NodeType ProcessingInstruction::nodeType() const
+Node::NodeType ProcessingInstruction::getNodeType() const
 {
     return PROCESSING_INSTRUCTION_NODE;
 }
diff --git a/third_party/WebKit/Source/core/dom/ProcessingInstruction.h b/third_party/WebKit/Source/core/dom/ProcessingInstruction.h
index e7349711..7a13785 100644
--- a/third_party/WebKit/Source/core/dom/ProcessingInstruction.h
+++ b/third_party/WebKit/Source/core/dom/ProcessingInstruction.h
@@ -82,7 +82,7 @@
     ProcessingInstruction(Document&, const String& target, const String& data);
 
     String nodeName() const override;
-    NodeType nodeType() const override;
+    NodeType getNodeType() const override;
     PassRefPtrWillBeRawPtr<Node> cloneNode(bool deep) override;
 
     InsertionNotificationRequest insertedInto(ContainerNode*) override;
@@ -115,11 +115,11 @@
     RefPtrWillBeMember<DetachableEventListener> m_listenerForXSLT;
 };
 
-DEFINE_NODE_TYPE_CASTS(ProcessingInstruction, nodeType() == Node::PROCESSING_INSTRUCTION_NODE);
+DEFINE_NODE_TYPE_CASTS(ProcessingInstruction, getNodeType() == Node::PROCESSING_INSTRUCTION_NODE);
 
 inline bool isXSLStyleSheet(const Node& node)
 {
-    return node.nodeType() == Node::PROCESSING_INSTRUCTION_NODE && toProcessingInstruction(node).isXSL();
+    return node.getNodeType() == Node::PROCESSING_INSTRUCTION_NODE && toProcessingInstruction(node).isXSL();
 }
 
 } // namespace blink
diff --git a/third_party/WebKit/Source/core/dom/Range.cpp b/third_party/WebKit/Source/core/dom/Range.cpp
index 257d7cf..72841063 100644
--- a/third_party/WebKit/Source/core/dom/Range.cpp
+++ b/third_party/WebKit/Source/core/dom/Range.cpp
@@ -621,7 +621,7 @@
 
     // This switch statement must be consistent with that of Node::lengthOfContents.
     RefPtrWillBeRawPtr<Node> result = nullptr;
-    switch (container->nodeType()) {
+    switch (container->getNodeType()) {
     case Node::TEXT_NODE:
     case Node::CDATA_SECTION_NODE:
     case Node::COMMENT_NODE:
@@ -783,13 +783,13 @@
     else
         checkAgainst = m_start.container();
 
-    Node::NodeType newNodeType = newNode->nodeType();
+    Node::NodeType newNodeType = newNode->getNodeType();
     int numNewChildren;
     if (newNodeType == Node::DOCUMENT_FRAGMENT_NODE && !newNode->isShadowRoot()) {
         // check each child node, not the DocumentFragment itself
         numNewChildren = 0;
         for (Node* c = toDocumentFragment(newNode)->firstChild(); c; c = c->nextSibling()) {
-            if (!checkAgainst->childTypeAllowed(c->nodeType())) {
+            if (!checkAgainst->childTypeAllowed(c->getNodeType())) {
                 exceptionState.throwDOMException(HierarchyRequestError, "The node to be inserted contains a '" + c->nodeName() + "' node, which may not be inserted here.");
                 return;
             }
@@ -877,7 +877,7 @@
 
     Node* pastLast = pastLastNode();
     for (Node* n = firstNode(); n != pastLast; n = NodeTraversal::next(*n)) {
-        Node::NodeType type = n->nodeType();
+        Node::NodeType type = n->getNodeType();
         if (type == Node::TEXT_NODE || type == Node::CDATA_SECTION_NODE) {
             String data = toCharacterData(n)->data();
             int length = data.length();
@@ -947,7 +947,7 @@
 
 Node* Range::checkNodeWOffset(Node* n, int offset, ExceptionState& exceptionState) const
 {
-    switch (n->nodeType()) {
+    switch (n->getNodeType()) {
     case Node::DOCUMENT_TYPE_NODE:
         exceptionState.throwDOMException(InvalidNodeTypeError, "The node provided is of type '" + n->nodeName() + "'.");
         return nullptr;
@@ -994,7 +994,7 @@
         return;
     }
 
-    switch (n->nodeType()) {
+    switch (n->getNodeType()) {
     case Node::ATTRIBUTE_NODE:
     case Node::DOCUMENT_FRAGMENT_NODE:
     case Node::DOCUMENT_NODE:
@@ -1013,7 +1013,7 @@
     while (ContainerNode* parent = root->parentNode())
         root = parent;
 
-    switch (root->nodeType()) {
+    switch (root->getNodeType()) {
     case Node::ATTRIBUTE_NODE:
     case Node::DOCUMENT_NODE:
     case Node::DOCUMENT_FRAGMENT_NODE:
@@ -1074,7 +1074,7 @@
         return;
     }
 
-    switch (refNode->nodeType()) {
+    switch (refNode->getNodeType()) {
     case Node::CDATA_SECTION_NODE:
     case Node::COMMENT_NODE:
     case Node::DOCUMENT_TYPE_NODE:
@@ -1107,7 +1107,7 @@
     // InvalidNodeTypeError: Raised if refNode or an ancestor of refNode is an Entity, Notation
     // or DocumentType node.
     for (Node* n = refNode; n; n = n->parentNode()) {
-        switch (n->nodeType()) {
+        switch (n->getNodeType()) {
         case Node::ATTRIBUTE_NODE:
         case Node::CDATA_SECTION_NODE:
         case Node::COMMENT_NODE:
@@ -1137,7 +1137,7 @@
     }
 
     for (Node* n = refNode; n; n = n->parentNode()) {
-        switch (n->nodeType()) {
+        switch (n->getNodeType()) {
         case Node::ATTRIBUTE_NODE:
         case Node::CDATA_SECTION_NODE:
         case Node::COMMENT_NODE:
@@ -1172,10 +1172,10 @@
 
     // InvalidStateError: Raised if the Range partially selects a non-Text node.
     Node* startNonTextContainer = m_start.container();
-    if (startNonTextContainer->nodeType() == Node::TEXT_NODE)
+    if (startNonTextContainer->getNodeType() == Node::TEXT_NODE)
         startNonTextContainer = startNonTextContainer->parentNode();
     Node* endNonTextContainer = m_end.container();
-    if (endNonTextContainer->nodeType() == Node::TEXT_NODE)
+    if (endNonTextContainer->getNodeType() == Node::TEXT_NODE)
         endNonTextContainer = endNonTextContainer->parentNode();
     if (startNonTextContainer != endNonTextContainer) {
         exceptionState.throwDOMException(InvalidStateError, "The Range has partially selected a non-Text node.");
@@ -1184,7 +1184,7 @@
 
     // InvalidNodeTypeError: Raised if node is an Attr, Entity, DocumentType, Notation,
     // Document, or DocumentFragment node.
-    switch (newParent->nodeType()) {
+    switch (newParent->getNodeType()) {
     case Node::ATTRIBUTE_NODE:
     case Node::DOCUMENT_FRAGMENT_NODE:
     case Node::DOCUMENT_NODE:
@@ -1213,7 +1213,7 @@
         return;
     }
 
-    if (!parentOfNewParent->childTypeAllowed(newParent->nodeType())) {
+    if (!parentOfNewParent->childTypeAllowed(newParent->getNodeType())) {
         exceptionState.throwDOMException(HierarchyRequestError, "The node provided is of type '" + newParent->nodeName() + "', which may not be inserted here.");
         return;
     }
diff --git a/third_party/WebKit/Source/core/dom/ScriptableDocumentParser.h b/third_party/WebKit/Source/core/dom/ScriptableDocumentParser.h
index f1da6e1..9d6fbcc 100644
--- a/third_party/WebKit/Source/core/dom/ScriptableDocumentParser.h
+++ b/third_party/WebKit/Source/core/dom/ScriptableDocumentParser.h
@@ -52,7 +52,7 @@
     void setWasCreatedByScript(bool wasCreatedByScript) { m_wasCreatedByScript = wasCreatedByScript; }
     bool wasCreatedByScript() const { return m_wasCreatedByScript; }
 
-    ParserContentPolicy parserContentPolicy() { return m_parserContentPolicy; }
+    ParserContentPolicy getParserContentPolicy() { return m_parserContentPolicy; }
 
 protected:
     explicit ScriptableDocumentParser(Document&, ParserContentPolicy = AllowScriptingContent);
diff --git a/third_party/WebKit/Source/core/dom/SecurityContext.h b/third_party/WebKit/Source/core/dom/SecurityContext.h
index c15a4ed..1693b35 100644
--- a/third_party/WebKit/Source/core/dom/SecurityContext.h
+++ b/third_party/WebKit/Source/core/dom/SecurityContext.h
@@ -67,7 +67,7 @@
     void setSecurityOrigin(PassRefPtr<SecurityOrigin>);
     virtual void didUpdateSecurityOrigin() = 0;
 
-    SandboxFlags sandboxFlags() const { return m_sandboxFlags; }
+    SandboxFlags getSandboxFlags() const { return m_sandboxFlags; }
     bool isSandboxed(SandboxFlags mask) const { return m_sandboxFlags & mask; }
     void enforceSandboxFlags(SandboxFlags mask);
 
@@ -75,7 +75,7 @@
     bool isHostedInReservedIPRange() const { return m_hostedInReservedIPRange; }
 
     void setInsecureRequestsPolicy(InsecureRequestsPolicy policy) { m_insecureRequestsPolicy = policy; }
-    InsecureRequestsPolicy insecureRequestsPolicy() const { return m_insecureRequestsPolicy; }
+    InsecureRequestsPolicy getInsecureRequestsPolicy() const { return m_insecureRequestsPolicy; }
 
     void addInsecureNavigationUpgrade(unsigned hashedHost) { m_insecureNavigationsToUpgrade.add(hashedHost); }
     InsecureNavigationsSet* insecureNavigationsToUpgrade() { return &m_insecureNavigationsToUpgrade; }
diff --git a/third_party/WebKit/Source/core/dom/StyleEngine.cpp b/third_party/WebKit/Source/core/dom/StyleEngine.cpp
index 6cf9cd2..11b0c76 100644
--- a/third_party/WebKit/Source/core/dom/StyleEngine.cpp
+++ b/third_party/WebKit/Source/core/dom/StyleEngine.cpp
@@ -619,7 +619,7 @@
         return true;
     if (!element.parentNode())
         return true;
-    return element.parentNode()->styleChangeType() >= SubtreeStyleChange;
+    return element.parentNode()->getStyleChangeType() >= SubtreeStyleChange;
 }
 
 void StyleEngine::classChangedForElement(const SpaceSplitString& changedClasses, Element& element)
diff --git a/third_party/WebKit/Source/core/dom/StyleSheetCandidate.cpp b/third_party/WebKit/Source/core/dom/StyleSheetCandidate.cpp
index 1ac86d88..4db3173b 100644
--- a/third_party/WebKit/Source/core/dom/StyleSheetCandidate.cpp
+++ b/third_party/WebKit/Source/core/dom/StyleSheetCandidate.cpp
@@ -108,7 +108,7 @@
 
 StyleSheetCandidate::Type StyleSheetCandidate::typeOf(Node& node)
 {
-    if (node.nodeType() == Node::PROCESSING_INSTRUCTION_NODE)
+    if (node.getNodeType() == Node::PROCESSING_INSTRUCTION_NODE)
         return Pi;
 
     if (node.isHTMLElement()) {
diff --git a/third_party/WebKit/Source/core/dom/Text.cpp b/third_party/WebKit/Source/core/dom/Text.cpp
index f1647b7..9263b95 100644
--- a/third_party/WebKit/Source/core/dom/Text.cpp
+++ b/third_party/WebKit/Source/core/dom/Text.cpp
@@ -66,7 +66,7 @@
 
     // Merge text nodes.
     while (Node* nextSibling = this->nextSibling()) {
-        if (nextSibling->nodeType() != TEXT_NODE)
+        if (nextSibling->getNodeType() != TEXT_NODE)
             break;
 
         RefPtrWillBeRawPtr<Text> nextText = toText(nextSibling);
@@ -135,7 +135,7 @@
 static const Text* earliestLogicallyAdjacentTextNode(const Text* t)
 {
     for (const Node* n = t->previousSibling(); n; n = n->previousSibling()) {
-        Node::NodeType type = n->nodeType();
+        Node::NodeType type = n->getNodeType();
         if (type == Node::TEXT_NODE || type == Node::CDATA_SECTION_NODE) {
             t = toText(n);
             continue;
@@ -149,7 +149,7 @@
 static const Text* latestLogicallyAdjacentTextNode(const Text* t)
 {
     for (const Node* n = t->nextSibling(); n; n = n->nextSibling()) {
-        Node::NodeType type = n->nodeType();
+        Node::NodeType type = n->getNodeType();
         if (type == Node::TEXT_NODE || type == Node::CDATA_SECTION_NODE) {
             t = toText(n);
             continue;
@@ -227,7 +227,7 @@
     return "#text";
 }
 
-Node::NodeType Text::nodeType() const
+Node::NodeType Text::getNodeType() const
 {
     return TEXT_NODE;
 }
@@ -369,7 +369,7 @@
     AttachContext reattachContext(context);
     reattachContext.performingReattach = true;
 
-    if (styleChangeType() < NeedsReattachStyleChange)
+    if (getStyleChangeType() < NeedsReattachStyleChange)
         detach(reattachContext);
     if (layoutObjectIsNeeded)
         LayoutTreeBuilderForText(*this, layoutParent->layoutObject()).createLayoutObject();
diff --git a/third_party/WebKit/Source/core/dom/Text.h b/third_party/WebKit/Source/core/dom/Text.h
index fa8435d..f0fb217 100644
--- a/third_party/WebKit/Source/core/dom/Text.h
+++ b/third_party/WebKit/Source/core/dom/Text.h
@@ -60,7 +60,7 @@
     void reattachIfNeeded(const AttachContext& = AttachContext());
 
     bool canContainRangeEndPoint() const final { return true; }
-    NodeType nodeType() const override;
+    NodeType getNodeType() const override;
 
     DECLARE_VIRTUAL_TRACE();
 
diff --git a/third_party/WebKit/Source/core/dom/shadow/InsertionPoint.cpp b/third_party/WebKit/Source/core/dom/shadow/InsertionPoint.cpp
index 19323fd..abc49f3f 100644
--- a/third_party/WebKit/Source/core/dom/shadow/InsertionPoint.cpp
+++ b/third_party/WebKit/Source/core/dom/shadow/InsertionPoint.cpp
@@ -123,7 +123,7 @@
 
 void InsertionPoint::willRecalcStyle(StyleRecalcChange change)
 {
-    if (change < Inherit && styleChangeType() < SubtreeStyleChange)
+    if (change < Inherit && getStyleChangeType() < SubtreeStyleChange)
         return;
     for (size_t i = 0; i < m_distributedNodes.size(); ++i)
         m_distributedNodes.at(i)->setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTracing::create(StyleChangeReason::PropagateInheritChangeToDistributedNodes));
diff --git a/third_party/WebKit/Source/core/dom/shadow/ShadowRoot.cpp b/third_party/WebKit/Source/core/dom/shadow/ShadowRoot.cpp
index eb8f50f..f4e47ae 100644
--- a/third_party/WebKit/Source/core/dom/shadow/ShadowRoot.cpp
+++ b/third_party/WebKit/Source/core/dom/shadow/ShadowRoot.cpp
@@ -140,7 +140,7 @@
 
     StyleSharingDepthScope sharingScope(*this);
 
-    if (styleChangeType() >= SubtreeStyleChange)
+    if (getStyleChangeType() >= SubtreeStyleChange)
         change = Force;
 
     // There's no style to update so just calling recalcStyle means we're updated.
diff --git a/third_party/WebKit/Source/core/editing/iterators/SimplifiedBackwardsTextIterator.cpp b/third_party/WebKit/Source/core/editing/iterators/SimplifiedBackwardsTextIterator.cpp
index d18b403..4fe31d2 100644
--- a/third_party/WebKit/Source/core/editing/iterators/SimplifiedBackwardsTextIterator.cpp
+++ b/third_party/WebKit/Source/core/editing/iterators/SimplifiedBackwardsTextIterator.cpp
@@ -154,7 +154,7 @@
         // Don't handle node if we start iterating at [node, 0].
         if (!m_handledNode && !(m_node == m_endNode && !m_endOffset)) {
             LayoutObject* layoutObject = m_node->layoutObject();
-            if (layoutObject && layoutObject->isText() && m_node->nodeType() == Node::TEXT_NODE) {
+            if (layoutObject && layoutObject->isText() && m_node->getNodeType() == Node::TEXT_NODE) {
                 // FIXME: What about CDATA_SECTION_NODE?
                 if (layoutObject->style()->visibility() == VISIBLE && m_offset > 0)
                     m_handledNode = handleTextNode();
diff --git a/third_party/WebKit/Source/core/editing/iterators/TextIterator.cpp b/third_party/WebKit/Source/core/editing/iterators/TextIterator.cpp
index 2867b57..708b95ea 100644
--- a/third_party/WebKit/Source/core/editing/iterators/TextIterator.cpp
+++ b/third_party/WebKit/Source/core/editing/iterators/TextIterator.cpp
@@ -313,7 +313,7 @@
             // Handle the current node according to its type.
             if (m_iterationProgress < HandledNode) {
                 bool handledNode = false;
-                if (layoutObject->isText() && m_node->nodeType() == Node::TEXT_NODE) { // FIXME: What about CDATA_SECTION_NODE?
+                if (layoutObject->isText() && m_node->getNodeType() == Node::TEXT_NODE) { // FIXME: What about CDATA_SECTION_NODE?
                     if (!m_fullyClippedStack.top() || ignoresStyleVisibility())
                         handledNode = handleTextNode();
                 } else if (layoutObject && (layoutObject->isImage() || layoutObject->isLayoutPart()
diff --git a/third_party/WebKit/Source/core/editing/serializers/MarkupAccumulator.cpp b/third_party/WebKit/Source/core/editing/serializers/MarkupAccumulator.cpp
index 8a246931..10025e15 100644
--- a/third_party/WebKit/Source/core/editing/serializers/MarkupAccumulator.cpp
+++ b/third_party/WebKit/Source/core/editing/serializers/MarkupAccumulator.cpp
@@ -73,7 +73,7 @@
 
 void MarkupAccumulator::appendStartMarkup(StringBuilder& result, Node& node, Namespaces* namespaces)
 {
-    switch (node.nodeType()) {
+    switch (node.getNodeType()) {
     case Node::TEXT_NODE:
         appendText(result, toText(node));
         break;
diff --git a/third_party/WebKit/Source/core/editing/serializers/MarkupFormatter.cpp b/third_party/WebKit/Source/core/editing/serializers/MarkupFormatter.cpp
index 095859a..dabc74b 100644
--- a/third_party/WebKit/Source/core/editing/serializers/MarkupFormatter.cpp
+++ b/third_party/WebKit/Source/core/editing/serializers/MarkupFormatter.cpp
@@ -131,7 +131,7 @@
 
 void MarkupFormatter::appendStartMarkup(StringBuilder& result, const Node& node, Namespaces* namespaces)
 {
-    switch (node.nodeType()) {
+    switch (node.getNodeType()) {
     case Node::TEXT_NODE:
         ASSERT_NOT_REACHED();
         break;
diff --git a/third_party/WebKit/Source/core/editing/serializers/Serialization.cpp b/third_party/WebKit/Source/core/editing/serializers/Serialization.cpp
index 6b8dae3..05927f5 100644
--- a/third_party/WebKit/Source/core/editing/serializers/Serialization.cpp
+++ b/third_party/WebKit/Source/core/editing/serializers/Serialization.cpp
@@ -291,7 +291,7 @@
 static bool findNodesSurroundingContext(DocumentFragment* fragment, RefPtrWillBeRawPtr<Comment>& nodeBeforeContext, RefPtrWillBeRawPtr<Comment>& nodeAfterContext)
 {
     for (Node& node : NodeTraversal::startsAt(fragment->firstChild())) {
-        if (node.nodeType() == Node::COMMENT_NODE && toComment(node).data() == fragmentMarkerTag) {
+        if (node.getNodeType() == Node::COMMENT_NODE && toComment(node).data() == fragmentMarkerTag) {
             if (!nodeBeforeContext) {
                 nodeBeforeContext = &toComment(node);
             } else {
diff --git a/third_party/WebKit/Source/core/editing/serializers/StyledMarkupSerializer.cpp b/third_party/WebKit/Source/core/editing/serializers/StyledMarkupSerializer.cpp
index 638692eb..8e931d63b 100644
--- a/third_party/WebKit/Source/core/editing/serializers/StyledMarkupSerializer.cpp
+++ b/third_party/WebKit/Source/core/editing/serializers/StyledMarkupSerializer.cpp
@@ -405,7 +405,7 @@
 {
     if (!m_accumulator)
         return;
-    switch (node.nodeType()) {
+    switch (node.getNodeType()) {
     case Node::TEXT_NODE: {
         Text& text = toText(node);
         if (text.parentElement() && isHTMLTextAreaElement(text.parentElement())) {
diff --git a/third_party/WebKit/Source/core/frame/FrameOwner.h b/third_party/WebKit/Source/core/frame/FrameOwner.h
index 9352a7a..59cab0f 100644
--- a/third_party/WebKit/Source/core/frame/FrameOwner.h
+++ b/third_party/WebKit/Source/core/frame/FrameOwner.h
@@ -22,7 +22,7 @@
 
     virtual bool isLocal() const = 0;
 
-    virtual SandboxFlags sandboxFlags() const = 0;
+    virtual SandboxFlags getSandboxFlags() const = 0;
     virtual void dispatchLoad() = 0;
 
     // On load failure, a frame can ask its owner to render fallback content
diff --git a/third_party/WebKit/Source/core/frame/RemoteFrame.cpp b/third_party/WebKit/Source/core/frame/RemoteFrame.cpp
index 7c2e6635..92d0d137 100644
--- a/third_party/WebKit/Source/core/frame/RemoteFrame.cpp
+++ b/third_party/WebKit/Source/core/frame/RemoteFrame.cpp
@@ -70,7 +70,7 @@
     // The process where this frame actually lives won't have sufficient information to determine
     // correct referrer, since it won't have access to the originDocument. Set it now.
     ResourceRequest request(url);
-    request.setHTTPReferrer(SecurityPolicy::generateReferrer(originDocument.referrerPolicy(), url, originDocument.outgoingReferrer()));
+    request.setHTTPReferrer(SecurityPolicy::generateReferrer(originDocument.getReferrerPolicy(), url, originDocument.outgoingReferrer()));
     request.setHasUserGesture(userGestureStatus == UserGestureStatus::Active);
     remoteFrameClient()->navigate(request, replaceCurrentItem);
 }
diff --git a/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.h b/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.h
index 18e8cfe6..766d39652 100644
--- a/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.h
+++ b/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.h
@@ -248,7 +248,7 @@
     String evalDisabledErrorMessage() const;
 
     void setInsecureRequestsPolicy(SecurityContext::InsecureRequestsPolicy);
-    SecurityContext::InsecureRequestsPolicy insecureRequestsPolicy() const { return m_insecureRequestsPolicy; }
+    SecurityContext::InsecureRequestsPolicy getInsecureRequestsPolicy() const { return m_insecureRequestsPolicy; }
 
     bool urlMatchesSelf(const KURL&) const;
     bool protocolMatchesSelf(const KURL&) const;
diff --git a/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicyTest.cpp b/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicyTest.cpp
index 5aa882ad..5b64c54 100644
--- a/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicyTest.cpp
+++ b/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicyTest.cpp
@@ -40,20 +40,20 @@
 TEST_F(ContentSecurityPolicyTest, ParseUpgradeInsecureRequestsEnabled)
 {
     csp->didReceiveHeader("upgrade-insecure-requests", ContentSecurityPolicyHeaderTypeEnforce, ContentSecurityPolicyHeaderSourceHTTP);
-    EXPECT_EQ(SecurityContext::InsecureRequestsUpgrade, csp->insecureRequestsPolicy());
+    EXPECT_EQ(SecurityContext::InsecureRequestsUpgrade, csp->getInsecureRequestsPolicy());
 
     csp->bindToExecutionContext(document.get());
-    EXPECT_EQ(SecurityContext::InsecureRequestsUpgrade, document->insecureRequestsPolicy());
+    EXPECT_EQ(SecurityContext::InsecureRequestsUpgrade, document->getInsecureRequestsPolicy());
     EXPECT_TRUE(document->insecureNavigationsToUpgrade()->contains(secureOrigin->host().impl()->hash()));
 }
 
 TEST_F(ContentSecurityPolicyTest, ParseMonitorInsecureRequestsEnabled)
 {
     csp->didReceiveHeader("upgrade-insecure-requests", ContentSecurityPolicyHeaderTypeReport, ContentSecurityPolicyHeaderSourceHTTP);
-    EXPECT_EQ(SecurityContext::InsecureRequestsDoNotUpgrade, csp->insecureRequestsPolicy());
+    EXPECT_EQ(SecurityContext::InsecureRequestsDoNotUpgrade, csp->getInsecureRequestsPolicy());
 
     csp->bindToExecutionContext(document.get());
-    EXPECT_EQ(SecurityContext::InsecureRequestsDoNotUpgrade, document->insecureRequestsPolicy());
+    EXPECT_EQ(SecurityContext::InsecureRequestsDoNotUpgrade, document->getInsecureRequestsPolicy());
     EXPECT_FALSE(document->insecureNavigationsToUpgrade()->contains(secureOrigin->host().impl()->hash()));
 }
 
@@ -107,33 +107,33 @@
 {
     csp->didReceiveHeader("referrer unsafe-url; referrer origin;", ContentSecurityPolicyHeaderTypeEnforce, ContentSecurityPolicyHeaderSourceHTTP);
     csp->bindToExecutionContext(document.get());
-    EXPECT_EQ(ReferrerPolicyOrigin, document->referrerPolicy());
+    EXPECT_EQ(ReferrerPolicyOrigin, document->getReferrerPolicy());
 }
 
 TEST_F(ContentSecurityPolicyTest, MultipleReferrerPolicies)
 {
     csp->didReceiveHeader("referrer unsafe-url;", ContentSecurityPolicyHeaderTypeEnforce, ContentSecurityPolicyHeaderSourceHTTP);
     csp->bindToExecutionContext(document.get());
-    EXPECT_EQ(ReferrerPolicyAlways, document->referrerPolicy());
+    EXPECT_EQ(ReferrerPolicyAlways, document->getReferrerPolicy());
     document->processReferrerPolicy("origin");
-    EXPECT_EQ(ReferrerPolicyOrigin, document->referrerPolicy());
+    EXPECT_EQ(ReferrerPolicyOrigin, document->getReferrerPolicy());
 }
 
 TEST_F(ContentSecurityPolicyTest, UnknownReferrerDirective)
 {
     csp->didReceiveHeader("referrer unsafe-url; referrer blahblahblah", ContentSecurityPolicyHeaderTypeEnforce, ContentSecurityPolicyHeaderSourceHTTP);
     csp->bindToExecutionContext(document.get());
-    EXPECT_EQ(ReferrerPolicyAlways, document->referrerPolicy());
+    EXPECT_EQ(ReferrerPolicyAlways, document->getReferrerPolicy());
     document->processReferrerPolicy("origin");
     document->processReferrerPolicy("blahblahblah");
-    EXPECT_EQ(ReferrerPolicyOrigin, document->referrerPolicy());
+    EXPECT_EQ(ReferrerPolicyOrigin, document->getReferrerPolicy());
 }
 
 TEST_F(ContentSecurityPolicyTest, EmptyReferrerDirective)
 {
     csp->didReceiveHeader("referrer;", ContentSecurityPolicyHeaderTypeEnforce, ContentSecurityPolicyHeaderSourceHTTP);
     csp->bindToExecutionContext(document.get());
-    EXPECT_EQ(ReferrerPolicyNever, document->referrerPolicy());
+    EXPECT_EQ(ReferrerPolicyNever, document->getReferrerPolicy());
 }
 
 } // namespace blink
diff --git a/third_party/WebKit/Source/core/html/HTMLBodyElement.cpp b/third_party/WebKit/Source/core/html/HTMLBodyElement.cpp
index 4e53552d..a7c841e 100644
--- a/third_party/WebKit/Source/core/html/HTMLBodyElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLBodyElement.cpp
@@ -63,7 +63,7 @@
         if (!url.isEmpty()) {
             RefPtrWillBeRawPtr<CSSImageValue> imageValue = CSSImageValue::create(url, document().completeURL(url));
             imageValue->setInitiator(localName());
-            imageValue->setReferrer(Referrer(document().outgoingReferrer(), document().referrerPolicy()));
+            imageValue->setReferrer(Referrer(document().outgoingReferrer(), document().getReferrerPolicy()));
             style->setProperty(CSSProperty(CSSPropertyBackgroundImage, imageValue.release()));
         }
     } else if (name == marginwidthAttr || name == leftmarginAttr) {
diff --git a/third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.h b/third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.h
index eb38835..576bab5 100644
--- a/third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.h
+++ b/third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.h
@@ -79,7 +79,7 @@
     // FrameOwner overrides:
     bool isLocal() const override { return true; }
     void dispatchLoad() override;
-    SandboxFlags sandboxFlags() const override { return m_sandboxFlags; }
+    SandboxFlags getSandboxFlags() const override { return m_sandboxFlags; }
     void renderFallbackContent() override { }
     ScrollbarMode scrollingMode() const override { return ScrollbarAuto; }
     int marginWidth() const override { return -1; }
diff --git a/third_party/WebKit/Source/core/html/HTMLSlotElement.cpp b/third_party/WebKit/Source/core/html/HTMLSlotElement.cpp
index b694c01..1fa4ffb 100644
--- a/third_party/WebKit/Source/core/html/HTMLSlotElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLSlotElement.cpp
@@ -217,7 +217,7 @@
 
 void HTMLSlotElement::willRecalcStyle(StyleRecalcChange change)
 {
-    if (change < Inherit && styleChangeType() < SubtreeStyleChange)
+    if (change < Inherit && getStyleChangeType() < SubtreeStyleChange)
         return;
 
     for (auto& node : m_distributedNodes)
diff --git a/third_party/WebKit/Source/core/html/HTMLTableElement.cpp b/third_party/WebKit/Source/core/html/HTMLTableElement.cpp
index dd167f8..8125c36 100644
--- a/third_party/WebKit/Source/core/html/HTMLTableElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLTableElement.cpp
@@ -298,7 +298,7 @@
         String url = stripLeadingAndTrailingHTMLSpaces(value);
         if (!url.isEmpty()) {
             RefPtrWillBeRawPtr<CSSImageValue> imageValue = CSSImageValue::create(url, document().completeURL(url));
-            imageValue->setReferrer(Referrer(document().outgoingReferrer(), document().referrerPolicy()));
+            imageValue->setReferrer(Referrer(document().outgoingReferrer(), document().getReferrerPolicy()));
             style->setProperty(CSSProperty(CSSPropertyBackgroundImage, imageValue.release()));
         }
     } else if (name == valignAttr) {
diff --git a/third_party/WebKit/Source/core/html/HTMLTablePartElement.cpp b/third_party/WebKit/Source/core/html/HTMLTablePartElement.cpp
index f104c50b..d05e193 100644
--- a/third_party/WebKit/Source/core/html/HTMLTablePartElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLTablePartElement.cpp
@@ -54,7 +54,7 @@
         String url = stripLeadingAndTrailingHTMLSpaces(value);
         if (!url.isEmpty()) {
             RefPtrWillBeRawPtr<CSSImageValue> imageValue = CSSImageValue::create(url, document().completeURL(url));
-            imageValue->setReferrer(Referrer(document().outgoingReferrer(), document().referrerPolicy()));
+            imageValue->setReferrer(Referrer(document().outgoingReferrer(), document().getReferrerPolicy()));
             style->setProperty(CSSProperty(CSSPropertyBackgroundImage, imageValue.release()));
         }
     } else if (name == valignAttr) {
diff --git a/third_party/WebKit/Source/core/html/TextDocument.cpp b/third_party/WebKit/Source/core/html/TextDocument.cpp
index 555840a..561b323 100644
--- a/third_party/WebKit/Source/core/html/TextDocument.cpp
+++ b/third_party/WebKit/Source/core/html/TextDocument.cpp
@@ -37,7 +37,7 @@
 
 PassRefPtrWillBeRawPtr<DocumentParser> TextDocument::createParser()
 {
-    return TextDocumentParser::create(*this, parserSynchronizationPolicy());
+    return TextDocumentParser::create(*this, getParserSynchronizationPolicy());
 }
 
 } // namespace blink
diff --git a/third_party/WebKit/Source/core/html/parser/HTMLConstructionSite.h b/third_party/WebKit/Source/core/html/parser/HTMLConstructionSite.h
index 812b072..90daa17 100644
--- a/third_party/WebKit/Source/core/html/parser/HTMLConstructionSite.h
+++ b/third_party/WebKit/Source/core/html/parser/HTMLConstructionSite.h
@@ -199,7 +199,7 @@
     HTMLFormElement* form() const { return m_form.get(); }
     PassRefPtrWillBeRawPtr<HTMLFormElement> takeForm();
 
-    ParserContentPolicy parserContentPolicy() { return m_parserContentPolicy; }
+    ParserContentPolicy getParserContentPolicy() { return m_parserContentPolicy; }
 
     class RedirectToFosterParentGuard {
         STACK_ALLOCATED();
diff --git a/third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp b/third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp
index bd84b305..a353983 100644
--- a/third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp
+++ b/third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp
@@ -143,7 +143,7 @@
     , m_token(syncPolicy == ForceSynchronousParsing ? adoptPtr(new HTMLToken) : nullptr)
     , m_tokenizer(syncPolicy == ForceSynchronousParsing ? HTMLTokenizer::create(m_options) : nullptr)
     , m_scriptRunner(HTMLScriptRunner::create(&document, this))
-    , m_treeBuilder(HTMLTreeBuilder::create(this, &document, parserContentPolicy(), reportErrors, m_options))
+    , m_treeBuilder(HTMLTreeBuilder::create(this, &document, getParserContentPolicy(), reportErrors, m_options))
     , m_loadingTaskRunner(adoptPtr(document.loadingTaskRunner()->clone()))
     , m_parserScheduler(HTMLParserScheduler::create(this, m_loadingTaskRunner.get()))
     , m_xssAuditorDelegate(&document)
@@ -168,7 +168,7 @@
     , m_options(&fragment->document())
     , m_token(adoptPtr(new HTMLToken))
     , m_tokenizer(HTMLTokenizer::create(m_options))
-    , m_treeBuilder(HTMLTreeBuilder::create(this, fragment, contextElement, this->parserContentPolicy(), m_options))
+    , m_treeBuilder(HTMLTreeBuilder::create(this, fragment, contextElement, this->getParserContentPolicy(), m_options))
     , m_loadingTaskRunner(adoptPtr(fragment->document().loadingTaskRunner()->clone()))
     , m_xssAuditorDelegate(&fragment->document())
     , m_weakFactory(this)
@@ -321,7 +321,7 @@
 
 void HTMLDocumentParser::runScriptsForPausedTreeBuilder()
 {
-    ASSERT(scriptingContentIsAllowed(parserContentPolicy()));
+    ASSERT(scriptingContentIsAllowed(getParserContentPolicy()));
 
     TextPosition scriptStartPosition = TextPosition::belowRangePosition();
     RefPtrWillBeRawPtr<Element> scriptElement = m_treeBuilder->takeScriptToProcess(scriptStartPosition);
diff --git a/third_party/WebKit/Source/core/html/parser/HTMLTreeBuilder.cpp b/third_party/WebKit/Source/core/html/parser/HTMLTreeBuilder.cpp
index 3d1a4f5f..39b2b1f8 100644
--- a/third_party/WebKit/Source/core/html/parser/HTMLTreeBuilder.cpp
+++ b/third_party/WebKit/Source/core/html/parser/HTMLTreeBuilder.cpp
@@ -755,7 +755,7 @@
     if (token->name() == appletTag
         || token->name() == embedTag
         || token->name() == objectTag) {
-        if (!pluginContentIsAllowed(m_tree.parserContentPolicy()))
+        if (!pluginContentIsAllowed(m_tree.getParserContentPolicy()))
             return;
     }
     if (token->name() == appletTag
@@ -2113,7 +2113,7 @@
         if (token->name() == scriptTag) {
             // Pause ourselves so that parsing stops until the script can be processed by the caller.
             ASSERT(m_tree.currentStackItem()->hasTagName(scriptTag));
-            if (scriptingContentIsAllowed(m_tree.parserContentPolicy()))
+            if (scriptingContentIsAllowed(m_tree.getParserContentPolicy()))
                 m_scriptToProcess = m_tree.currentElement();
             m_tree.openElements()->pop();
             setInsertionMode(m_originalInsertionMode);
@@ -2768,7 +2768,7 @@
             adjustSVGTagNameCase(token);
 
         if (token->name() == SVGNames::scriptTag && m_tree.currentStackItem()->hasTagName(SVGNames::scriptTag)) {
-            if (scriptingContentIsAllowed(m_tree.parserContentPolicy()))
+            if (scriptingContentIsAllowed(m_tree.getParserContentPolicy()))
                 m_scriptToProcess = m_tree.currentElement();
             m_tree.openElements()->pop();
             return;
diff --git a/third_party/WebKit/Source/core/inspector/DOMPatchSupport.cpp b/third_party/WebKit/Source/core/inspector/DOMPatchSupport.cpp
index 2d0e177..91d2763 100644
--- a/third_party/WebKit/Source/core/inspector/DOMPatchSupport.cpp
+++ b/third_party/WebKit/Source/core/inspector/DOMPatchSupport.cpp
@@ -166,7 +166,7 @@
     Node* oldNode = oldDigest->m_node;
     Node* newNode = newDigest->m_node;
 
-    if (newNode->nodeType() != oldNode->nodeType() || newNode->nodeName() != oldNode->nodeName())
+    if (newNode->getNodeType() != oldNode->getNodeType() || newNode->nodeName() != oldNode->nodeName())
         return m_domEditor->replaceChild(oldNode->parentNode(), newNode, oldNode, exceptionState);
 
     if (oldNode->nodeValue() != newNode->nodeValue()) {
@@ -402,7 +402,7 @@
     OwnPtr<WebCryptoDigestor> digestor = createDigestor(HashAlgorithmSha1);
     DigestValue digestResult;
 
-    Node::NodeType nodeType = node->nodeType();
+    Node::NodeType nodeType = node->getNodeType();
     digestor->consume(reinterpret_cast<const unsigned char*>(&nodeType), sizeof(nodeType));
     addStringToDigestor(digestor.get(), node->nodeName());
     addStringToDigestor(digestor.get(), node->nodeValue());
diff --git a/third_party/WebKit/Source/core/inspector/InspectorBaseAgent.cpp b/third_party/WebKit/Source/core/inspector/InspectorBaseAgent.cpp
index aa32554a..101bcf96 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorBaseAgent.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorBaseAgent.cpp
@@ -92,7 +92,7 @@
 {
     RefPtr<JSONValue> state = parseJSON(savedState);
     if (state)
-        m_state = state->asObject();
+        m_state = JSONObject::cast(state);
     if (!m_state)
         m_state = JSONObject::create();
 
diff --git a/third_party/WebKit/Source/core/inspector/InspectorBaseAgent.h b/third_party/WebKit/Source/core/inspector/InspectorBaseAgent.h
index a42bac72..deb96ad6 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorBaseAgent.h
+++ b/third_party/WebKit/Source/core/inspector/InspectorBaseAgent.h
@@ -48,7 +48,7 @@
 class InstrumentingAgents;
 class LocalFrame;
 
-using protocol::OptionalValue;
+using protocol::Maybe;
 
 class CORE_EXPORT InspectorAgent : public NoBaseWillBeGarbageCollectedFinalized<InspectorAgent> {
     USING_FAST_MALLOC_WILL_BE_REMOVED(InspectorAgent);
diff --git a/third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp b/third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp
index 413be6b..c811c6a 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp
@@ -862,7 +862,7 @@
     }
 }
 
-void InspectorCSSAgent::getMatchedStylesForNode(ErrorString* errorString, int nodeId, OwnPtr<protocol::CSS::CSSStyle>* inlineStyle, OwnPtr<protocol::CSS::CSSStyle>* attributesStyle, OwnPtr<protocol::Array<protocol::CSS::RuleMatch>>* matchedCSSRules, OwnPtr<protocol::Array<protocol::CSS::PseudoElementMatches>>* pseudoIdMatches, OwnPtr<protocol::Array<protocol::CSS::InheritedStyleEntry>>* inheritedEntries, OwnPtr<protocol::Array<protocol::CSS::CSSKeyframesRule>>* cssKeyframesRules)
+void InspectorCSSAgent::getMatchedStylesForNode(ErrorString* errorString, int nodeId, Maybe<protocol::CSS::CSSStyle>* inlineStyle, Maybe<protocol::CSS::CSSStyle>* attributesStyle, Maybe<protocol::Array<protocol::CSS::RuleMatch>>* matchedCSSRules, Maybe<protocol::Array<protocol::CSS::PseudoElementMatches>>* pseudoIdMatches, Maybe<protocol::Array<protocol::CSS::InheritedStyleEntry>>* inheritedEntries, Maybe<protocol::Array<protocol::CSS::CSSKeyframesRule>>* cssKeyframesRules)
 {
     Element* element = elementForId(errorString, nodeId);
     if (!element) {
@@ -911,7 +911,7 @@
         RefPtrWillBeRawPtr<CSSRuleList> matchedRules = styleResolver.pseudoCSSRulesForElement(element, pseudoId, StyleResolver::AllCSSRules);
         protocol::DOM::PseudoType pseudoType;
         if (matchedRules && matchedRules->length() && m_domAgent->getPseudoElementType(pseudoId, &pseudoType)) {
-            (*pseudoIdMatches)->addItem(protocol::CSS::PseudoElementMatches::create()
+            pseudoIdMatches->fromJust()->addItem(protocol::CSS::PseudoElementMatches::create()
                 .setPseudoType(pseudoType)
                 .setMatches(buildArrayForMatchedRuleList(matchedRules.get(), element, pseudoId)).build());
         }
@@ -931,7 +931,7 @@
                 entry->setInlineStyle(styleSheet->buildObjectForStyle(styleSheet->inlineStyle()));
         }
 
-        (*inheritedEntries)->addItem(entry.release());
+        inheritedEntries->fromJust()->addItem(entry.release());
         parentElement = parentElement->parentOrShadowHostElement();
     }
 
@@ -1004,7 +1004,7 @@
     return cssKeyframesRules.release();
 }
 
-void InspectorCSSAgent::getInlineStylesForNode(ErrorString* errorString, int nodeId, OwnPtr<protocol::CSS::CSSStyle>* inlineStyle, OwnPtr<protocol::CSS::CSSStyle>* attributesStyle)
+void InspectorCSSAgent::getInlineStylesForNode(ErrorString* errorString, int nodeId, Maybe<protocol::CSS::CSSStyle>* inlineStyle, Maybe<protocol::CSS::CSSStyle>* attributesStyle)
 {
     Element* element = elementForId(errorString, nodeId);
     if (!element)
@@ -1100,7 +1100,7 @@
     inspectorStyleSheet->getText(result);
 }
 
-void InspectorCSSAgent::setStyleSheetText(ErrorString* errorString, const String& styleSheetId, const String& text, protocol::OptionalValue<String>* sourceMapURL)
+void InspectorCSSAgent::setStyleSheetText(ErrorString* errorString, const String& styleSheetId, const String& text, protocol::Maybe<String>* sourceMapURL)
 {
     FrontendOperationScope scope;
     InspectorStyleSheetBase* inspectorStyleSheet = assertStyleSheetForId(errorString, styleSheetId);
@@ -2046,7 +2046,7 @@
     setLayoutEditorValue(errorString, element, style.get(), propertyId, value);
 }
 
-void InspectorCSSAgent::getBackgroundColors(ErrorString* errorString, int nodeId, OwnPtr<protocol::Array<String>>* result)
+void InspectorCSSAgent::getBackgroundColors(ErrorString* errorString, int nodeId, Maybe<protocol::Array<String>>* result)
 {
     Element* element = elementForId(errorString, nodeId);
     if (!element) {
@@ -2095,7 +2095,7 @@
 
     *result = protocol::Array<String>::create();
     for (auto color : colors)
-        (*result)->addItem(color.serializedAsCSSComponentValue());
+        result->fromJust()->addItem(color.serializedAsCSSComponentValue());
 }
 
 DEFINE_TRACE(InspectorCSSAgent)
diff --git a/third_party/WebKit/Source/core/inspector/InspectorCSSAgent.h b/third_party/WebKit/Source/core/inspector/InspectorCSSAgent.h
index 933c1108..4b4d91b 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorCSSAgent.h
+++ b/third_party/WebKit/Source/core/inspector/InspectorCSSAgent.h
@@ -128,12 +128,12 @@
 
     void enable(ErrorString*, PassRefPtr<EnableCallback>) override;
     void disable(ErrorString*) override;
-    void getMatchedStylesForNode(ErrorString*, int nodeId, OwnPtr<protocol::CSS::CSSStyle>* inlineStyle, OwnPtr<protocol::CSS::CSSStyle>* attributesStyle, OwnPtr<protocol::Array<protocol::CSS::RuleMatch>>* matchedCSSRules, OwnPtr<protocol::Array<protocol::CSS::PseudoElementMatches>>*, OwnPtr<protocol::Array<protocol::CSS::InheritedStyleEntry>>*, OwnPtr<protocol::Array<protocol::CSS::CSSKeyframesRule>>*) override;
-    void getInlineStylesForNode(ErrorString*, int nodeId, OwnPtr<protocol::CSS::CSSStyle>* inlineStyle, OwnPtr<protocol::CSS::CSSStyle>* attributesStyle) override;
+    void getMatchedStylesForNode(ErrorString*, int nodeId, Maybe<protocol::CSS::CSSStyle>* inlineStyle, Maybe<protocol::CSS::CSSStyle>* attributesStyle, Maybe<protocol::Array<protocol::CSS::RuleMatch>>* matchedCSSRules, Maybe<protocol::Array<protocol::CSS::PseudoElementMatches>>*, Maybe<protocol::Array<protocol::CSS::InheritedStyleEntry>>*, Maybe<protocol::Array<protocol::CSS::CSSKeyframesRule>>*) override;
+    void getInlineStylesForNode(ErrorString*, int nodeId, Maybe<protocol::CSS::CSSStyle>* inlineStyle, Maybe<protocol::CSS::CSSStyle>* attributesStyle) override;
     void getComputedStyleForNode(ErrorString*, int nodeId, OwnPtr<protocol::Array<protocol::CSS::CSSComputedStyleProperty>>*) override;
     void getPlatformFontsForNode(ErrorString*, int nodeId, OwnPtr<protocol::Array<protocol::CSS::PlatformFontUsage>>* fonts) override;
     void getStyleSheetText(ErrorString*, const String& styleSheetId, String* text) override;
-    void setStyleSheetText(ErrorString*, const String& styleSheetId, const String& text, OptionalValue<String>* sourceMapURL) override;
+    void setStyleSheetText(ErrorString*, const String& styleSheetId, const String& text, Maybe<String>* sourceMapURL) override;
     void setRuleSelector(ErrorString*, const String& styleSheetId, PassOwnPtr<protocol::CSS::SourceRange>, const String& selector, OwnPtr<protocol::CSS::SelectorList>*) override;
     void setKeyframeKey(ErrorString*, const String& styleSheetId, PassOwnPtr<protocol::CSS::SourceRange>, const String& keyText, OwnPtr<protocol::CSS::Value>* outKeyText) override;
     void setStyleTexts(ErrorString*, PassOwnPtr<protocol::Array<protocol::CSS::StyleDeclarationEdit>> edits, OwnPtr<protocol::Array<protocol::CSS::CSSStyle>>* styles) override;
@@ -143,7 +143,7 @@
     void forcePseudoState(ErrorString*, int nodeId, PassOwnPtr<protocol::Array<String>> forcedPseudoClasses) override;
     void getMediaQueries(ErrorString*, OwnPtr<protocol::Array<protocol::CSS::CSSMedia>>*) override;
     void setEffectivePropertyValueForNode(ErrorString*, int nodeId, const String& propertyName, const String& value) override;
-    void getBackgroundColors(ErrorString*, int nodeId, OwnPtr<protocol::Array<String>>* backgroundColors) override;
+    void getBackgroundColors(ErrorString*, int nodeId, Maybe<protocol::Array<String>>* backgroundColors) override;
 
     void collectMediaQueriesFromRule(CSSRule*, protocol::Array<protocol::CSS::CSSMedia>*);
     void collectMediaQueriesFromStyleSheet(CSSStyleSheet*, protocol::Array<protocol::CSS::CSSMedia>*);
diff --git a/third_party/WebKit/Source/core/inspector/InspectorDOMAgent.cpp b/third_party/WebKit/Source/core/inspector/InspectorDOMAgent.cpp
index 3b216b3..5ebde8a 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorDOMAgent.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorDOMAgent.cpp
@@ -97,11 +97,12 @@
 const size_t maxTextSize = 10000;
 const UChar ellipsisUChar[] = { 0x2026, 0 };
 
-Color parseColor(PassOwnPtr<protocol::DOM::RGBA> rgba)
+Color parseColor(const Maybe<protocol::DOM::RGBA>& maybeRgba)
 {
-    if (!rgba)
+    if (!maybeRgba.isJust())
         return Color::transparent;
 
+    protocol::DOM::RGBA* rgba = maybeRgba.fromJust();
     if (!rgba->hasR() && !rgba->hasG() && !rgba->hasB())
         return Color::transparent;
 
@@ -519,7 +520,7 @@
         return;
     }
     m_state->setBoolean(DOMAgentState::domAgentEnabled, false);
-    setSearchingForNode(errorString, NotSearching, nullptr);
+    setSearchingForNode(errorString, NotSearching, Maybe<protocol::DOM::HighlightConfig>());
     m_instrumentingAgents->setInspectorDOMAgent(nullptr);
     m_history.clear();
     m_domEditor.clear();
@@ -595,9 +596,9 @@
     return nullptr;
 }
 
-void InspectorDOMAgent::requestChildNodes(ErrorString* errorString, int nodeId, const OptionalValue<int>& depth)
+void InspectorDOMAgent::requestChildNodes(ErrorString* errorString, int nodeId, const Maybe<int>& depth)
 {
-    int sanitizedDepth = depth.get(1);
+    int sanitizedDepth = depth.fromMaybe(1);
     if (sanitizedDepth == 0 || sanitizedDepth < -1) {
         *errorString = "Please provide a positive integer as a depth or -1 for entire subtree";
         return;
@@ -718,7 +719,7 @@
     m_domEditor->setAttribute(element, name, value, errorString);
 }
 
-void InspectorDOMAgent::setAttributesAsText(ErrorString* errorString, int elementId, const String& text, const OptionalValue<String>& name)
+void InspectorDOMAgent::setAttributesAsText(ErrorString* errorString, int elementId, const String& text, const Maybe<String>& name)
 {
     Element* element = assertEditableElement(errorString, elementId);
     if (!element)
@@ -740,10 +741,10 @@
         return;
     }
 
-    String caseAdjustedName = shouldIgnoreCase ? name.get("").lower() : name.get("");
+    String caseAdjustedName = shouldIgnoreCase ? name.fromMaybe("").lower() : name.fromMaybe("");
 
     AttributeCollection attributes = parsedElement->attributes();
-    if (attributes.isEmpty() && name.hasValue()) {
+    if (attributes.isEmpty() && name.isJust()) {
         m_domEditor->removeAttribute(element, caseAdjustedName, errorString);
         return;
     }
@@ -754,12 +755,12 @@
         String attributeName = attribute.name().toString();
         if (shouldIgnoreCase)
             attributeName = attributeName.lower();
-        foundOriginalAttribute |= name.hasValue() && attributeName == caseAdjustedName;
+        foundOriginalAttribute |= name.isJust() && attributeName == caseAdjustedName;
         if (!m_domEditor->setAttribute(element, attributeName, attribute.value(), errorString))
             return;
     }
 
-    if (!foundOriginalAttribute && name.hasValue() && !name.get().stripWhiteSpace().isEmpty())
+    if (!foundOriginalAttribute && name.isJust() && !name.fromJust().stripWhiteSpace().isEmpty())
         m_domEditor->removeAttribute(element, caseAdjustedName, errorString);
 }
 
@@ -871,7 +872,7 @@
     if (!node)
         return;
 
-    if (node->nodeType() != Node::TEXT_NODE) {
+    if (node->getNodeType() != Node::TEXT_NODE) {
         *errorString = "Can only set value of text nodes";
         return;
     }
@@ -916,14 +917,14 @@
     return nullptr;
 }
 
-void InspectorDOMAgent::performSearch(ErrorString*, const String& whitespaceTrimmedQuery, const OptionalValue<bool>& optionalIncludeUserAgentShadowDOM, String* searchId, int* resultCount)
+void InspectorDOMAgent::performSearch(ErrorString*, const String& whitespaceTrimmedQuery, const Maybe<bool>& optionalIncludeUserAgentShadowDOM, String* searchId, int* resultCount)
 {
     // FIXME: Few things are missing here:
     // 1) Search works with node granularity - number of matches within node is not calculated.
     // 2) There is no need to push all search results to the front-end at a time, pushing next / previous result
     //    is sufficient.
 
-    bool includeUserAgentShadowDOM = optionalIncludeUserAgentShadowDOM.get(false);
+    bool includeUserAgentShadowDOM = optionalIncludeUserAgentShadowDOM.fromMaybe(false);
 
     unsigned queryLength = whitespaceTrimmedQuery.length();
     bool startTagFound = !whitespaceTrimmedQuery.find('<');
@@ -954,7 +955,7 @@
 
         // Manual plain text search.
         for (; node; node = nextNodeWithShadowDOMInMind(*node, documentElement, includeUserAgentShadowDOM)) {
-            switch (node->nodeType()) {
+            switch (node->getNodeType()) {
             case Node::TEXT_NODE:
             case Node::COMMENT_NODE:
             case Node::CDATA_SECTION_NODE: {
@@ -1009,7 +1010,7 @@
                 if (exceptionState.hadException())
                     break;
 
-                if (node->nodeType() == Node::ATTRIBUTE_NODE)
+                if (node->getNodeType() == Node::ATTRIBUTE_NODE)
                     node = toAttr(node)->ownerElement();
                 resultCollector.add(node);
             }
@@ -1096,37 +1097,38 @@
     frontend()->nodeHighlightRequested(nodeId);
 }
 
-void InspectorDOMAgent::setSearchingForNode(ErrorString* errorString, SearchMode searchMode, PassOwnPtr<protocol::DOM::HighlightConfig> highlightInspectorObject)
+void InspectorDOMAgent::setSearchingForNode(ErrorString* errorString, SearchMode searchMode, const Maybe<protocol::DOM::HighlightConfig>& highlightInspectorObject)
 {
     if (m_client)
         m_client->setInspectMode(searchMode, searchMode != NotSearching ? highlightConfigFromInspectorObject(errorString, highlightInspectorObject) : nullptr);
 }
 
-PassOwnPtr<InspectorHighlightConfig> InspectorDOMAgent::highlightConfigFromInspectorObject(ErrorString* errorString, PassOwnPtr<protocol::DOM::HighlightConfig> highlightInspectorObject)
+PassOwnPtr<InspectorHighlightConfig> InspectorDOMAgent::highlightConfigFromInspectorObject(ErrorString* errorString, const Maybe<protocol::DOM::HighlightConfig>& highlightInspectorObject)
 {
-    if (!highlightInspectorObject) {
+    if (!highlightInspectorObject.isJust()) {
         *errorString = "Internal error: highlight configuration parameter is missing";
         return nullptr;
     }
 
+    protocol::DOM::HighlightConfig* config = highlightInspectorObject.fromJust();
     OwnPtr<InspectorHighlightConfig> highlightConfig = adoptPtr(new InspectorHighlightConfig());
-    highlightConfig->showInfo = highlightInspectorObject->getShowInfo(false);
-    highlightConfig->showRulers = highlightInspectorObject->getShowRulers(false);
-    highlightConfig->showExtensionLines = highlightInspectorObject->getShowExtensionLines(false);
-    highlightConfig->displayAsMaterial = highlightInspectorObject->getDisplayAsMaterial(false);
-    highlightConfig->content = parseColor(highlightInspectorObject->getContentColor(nullptr));
-    highlightConfig->padding = parseColor(highlightInspectorObject->getPaddingColor(nullptr));
-    highlightConfig->border = parseColor(highlightInspectorObject->getBorderColor(nullptr));
-    highlightConfig->margin = parseColor(highlightInspectorObject->getMarginColor(nullptr));
-    highlightConfig->eventTarget = parseColor(highlightInspectorObject->getEventTargetColor(nullptr));
-    highlightConfig->shape = parseColor(highlightInspectorObject->getShapeColor(nullptr));
-    highlightConfig->shapeMargin = parseColor(highlightInspectorObject->getShapeMarginColor(nullptr));
-    highlightConfig->selectorList = highlightInspectorObject->getSelectorList("");
+    highlightConfig->showInfo = config->getShowInfo(false);
+    highlightConfig->showRulers = config->getShowRulers(false);
+    highlightConfig->showExtensionLines = config->getShowExtensionLines(false);
+    highlightConfig->displayAsMaterial = config->getDisplayAsMaterial(false);
+    highlightConfig->content = parseColor(config->getContentColor(nullptr));
+    highlightConfig->padding = parseColor(config->getPaddingColor(nullptr));
+    highlightConfig->border = parseColor(config->getBorderColor(nullptr));
+    highlightConfig->margin = parseColor(config->getMarginColor(nullptr));
+    highlightConfig->eventTarget = parseColor(config->getEventTargetColor(nullptr));
+    highlightConfig->shape = parseColor(config->getShapeColor(nullptr));
+    highlightConfig->shapeMargin = parseColor(config->getShapeMarginColor(nullptr));
+    highlightConfig->selectorList = config->getSelectorList("");
 
     return highlightConfig.release();
 }
 
-void InspectorDOMAgent::setInspectMode(ErrorString* errorString, const String& mode, PassOwnPtr<protocol::DOM::HighlightConfig> highlightConfig)
+void InspectorDOMAgent::setInspectMode(ErrorString* errorString, const String& mode, const Maybe<protocol::DOM::HighlightConfig>& highlightConfig)
 {
     SearchMode searchMode;
     if (mode == protocol::DOM::InspectModeEnum::SearchForNode) {
@@ -1148,13 +1150,13 @@
     setSearchingForNode(errorString, searchMode, highlightConfig);
 }
 
-void InspectorDOMAgent::highlightRect(ErrorString*, int x, int y, int width, int height, PassOwnPtr<protocol::DOM::RGBA> color, PassOwnPtr<protocol::DOM::RGBA> outlineColor)
+void InspectorDOMAgent::highlightRect(ErrorString*, int x, int y, int width, int height, const Maybe<protocol::DOM::RGBA>& color, const Maybe<protocol::DOM::RGBA>& outlineColor)
 {
     OwnPtr<FloatQuad> quad = adoptPtr(new FloatQuad(FloatRect(x, y, width, height)));
     innerHighlightQuad(quad.release(), color, outlineColor);
 }
 
-void InspectorDOMAgent::highlightQuad(ErrorString* errorString, PassOwnPtr<protocol::Array<double>> quadArray, PassOwnPtr<protocol::DOM::RGBA> color, PassOwnPtr<protocol::DOM::RGBA> outlineColor)
+void InspectorDOMAgent::highlightQuad(ErrorString* errorString, PassOwnPtr<protocol::Array<double>> quadArray, const Maybe<protocol::DOM::RGBA>& color, const Maybe<protocol::DOM::RGBA>& outlineColor)
 {
     OwnPtr<FloatQuad> quad = adoptPtr(new FloatQuad());
     if (!parseQuad(quadArray, quad.get())) {
@@ -1164,7 +1166,7 @@
     innerHighlightQuad(quad.release(), color, outlineColor);
 }
 
-void InspectorDOMAgent::innerHighlightQuad(PassOwnPtr<FloatQuad> quad, PassOwnPtr<protocol::DOM::RGBA> color, PassOwnPtr<protocol::DOM::RGBA> outlineColor)
+void InspectorDOMAgent::innerHighlightQuad(PassOwnPtr<FloatQuad> quad, const Maybe<protocol::DOM::RGBA>& color, const Maybe<protocol::DOM::RGBA>& outlineColor)
 {
     OwnPtr<InspectorHighlightConfig> highlightConfig = adoptPtr(new InspectorHighlightConfig());
     highlightConfig->content = parseColor(color);
@@ -1191,15 +1193,15 @@
     return node;
 }
 
-void InspectorDOMAgent::highlightNode(ErrorString* errorString, PassOwnPtr<protocol::DOM::HighlightConfig> highlightInspectorObject, const OptionalValue<int>& nodeId, const OptionalValue<int>& backendNodeId, const OptionalValue<String>& objectId)
+void InspectorDOMAgent::highlightNode(ErrorString* errorString, PassOwnPtr<protocol::DOM::HighlightConfig> highlightInspectorObject, const Maybe<int>& nodeId, const Maybe<int>& backendNodeId, const Maybe<String>& objectId)
 {
     Node* node = nullptr;
-    if (nodeId.hasValue()) {
-        node = assertNode(errorString, nodeId.get());
-    } else if (backendNodeId.hasValue()) {
-        node = DOMNodeIds::nodeForId(backendNodeId.get());
-    } else if (objectId.hasValue()) {
-        node = nodeForRemoteId(errorString, objectId.get());
+    if (nodeId.isJust()) {
+        node = assertNode(errorString, nodeId.fromJust());
+    } else if (backendNodeId.isJust()) {
+        node = DOMNodeIds::nodeForId(backendNodeId.fromJust());
+    } else if (objectId.isJust()) {
+        node = nodeForRemoteId(errorString, objectId.fromJust());
     } else
         *errorString = "Either nodeId or objectId must be specified";
 
@@ -1217,8 +1219,8 @@
 void InspectorDOMAgent::highlightFrame(
     ErrorString*,
     const String& frameId,
-    PassOwnPtr<protocol::DOM::RGBA> color,
-    PassOwnPtr<protocol::DOM::RGBA> outlineColor)
+    const Maybe<protocol::DOM::RGBA>& color,
+    const Maybe<protocol::DOM::RGBA>& outlineColor)
 {
     LocalFrame* frame = IdentifiersFactory::frameById(m_inspectedFrames, frameId);
     // FIXME: Inspector doesn't currently work cross process.
@@ -1238,7 +1240,7 @@
         m_client->hideHighlight();
 }
 
-void InspectorDOMAgent::copyTo(ErrorString* errorString, int nodeId, int targetElementId, const OptionalValue<int>& anchorNodeId, int* newNodeId)
+void InspectorDOMAgent::copyTo(ErrorString* errorString, int nodeId, int targetElementId, const Maybe<int>& anchorNodeId, int* newNodeId)
 {
     Node* node = assertEditableNode(errorString, nodeId);
     if (!node)
@@ -1249,8 +1251,8 @@
         return;
 
     Node* anchorNode = nullptr;
-    if (anchorNodeId.hasValue() && anchorNodeId.get()) {
-        anchorNode = assertEditableChildNode(errorString, targetElement, anchorNodeId.get());
+    if (anchorNodeId.isJust() && anchorNodeId.fromJust()) {
+        anchorNode = assertEditableChildNode(errorString, targetElement, anchorNodeId.fromJust());
         if (!anchorNode)
             return;
     }
@@ -1267,7 +1269,7 @@
     *newNodeId = pushNodePathToFrontend(clonedNode.get());
 }
 
-void InspectorDOMAgent::moveTo(ErrorString* errorString, int nodeId, int targetElementId, const OptionalValue<int>& anchorNodeId, int* newNodeId)
+void InspectorDOMAgent::moveTo(ErrorString* errorString, int nodeId, int targetElementId, const Maybe<int>& anchorNodeId, int* newNodeId)
 {
     Node* node = assertEditableNode(errorString, nodeId);
     if (!node)
@@ -1287,8 +1289,8 @@
     }
 
     Node* anchorNode = nullptr;
-    if (anchorNodeId.hasValue() && anchorNodeId.get()) {
-        anchorNode = assertEditableChildNode(errorString, targetElement, anchorNodeId.get());
+    if (anchorNodeId.isJust() && anchorNodeId.fromJust()) {
+        anchorNode = assertEditableChildNode(errorString, targetElement, anchorNodeId.fromJust());
         if (!anchorNode)
             return;
     }
@@ -1367,7 +1369,7 @@
     HitTestResult result(request, IntPoint(x, y));
     m_document->frame()->contentLayoutObject()->hitTest(result);
     Node* node = result.innerPossiblyPseudoNode();
-    while (node && node->nodeType() == Node::TEXT_NODE)
+    while (node && node->getNodeType() == Node::TEXT_NODE)
         node = node->parentNode();
     if (!node) {
         *errorString = "No node found at given location";
@@ -1376,9 +1378,9 @@
     *nodeId = pushNodePathToFrontend(node);
 }
 
-void InspectorDOMAgent::resolveNode(ErrorString* errorString, int nodeId, const OptionalValue<String>& objectGroup, OwnPtr<protocol::Runtime::RemoteObject>* result)
+void InspectorDOMAgent::resolveNode(ErrorString* errorString, int nodeId, const Maybe<String>& objectGroup, OwnPtr<protocol::Runtime::RemoteObject>* result)
 {
-    String objectGroupName = objectGroup.get("");
+    String objectGroupName = objectGroup.fromMaybe("");
     Node* node = nodeForId(nodeId);
     if (!node) {
         *errorString = "No node with given id found";
@@ -1441,7 +1443,7 @@
     String localName;
     String nodeValue;
 
-    switch (node->nodeType()) {
+    switch (node->getNodeType()) {
     case Node::TEXT_NODE:
     case Node::COMMENT_NODE:
     case Node::CDATA_SECTION_NODE:
@@ -1461,7 +1463,7 @@
 
     OwnPtr<protocol::DOM::Node> value = protocol::DOM::Node::create()
         .setNodeId(id)
-        .setNodeType(static_cast<int>(node->nodeType()))
+        .setNodeType(static_cast<int>(node->getNodeType()))
         .setNodeName(node->nodeName())
         .setLocalName(localName)
         .setNodeValue(nodeValue).build();
@@ -1479,6 +1481,12 @@
                 value->setContentDocument(buildObjectForNode(doc, 0, nodesMap));
         }
 
+        if (node->parentNode() && node->parentNode()->isDocumentNode()) {
+            LocalFrame* frame = node->document().frame();
+            if (frame)
+                value->setFrameId(IdentifiersFactory::frameId(frame));
+        }
+
         ElementShadow* shadow = element->shadow();
         if (shadow) {
             OwnPtr<protocol::Array<protocol::DOM::Node>> shadowRoots = protocol::Array<protocol::DOM::Node>::create();
@@ -1569,7 +1577,7 @@
     if (depth == 0) {
         // Special-case the only text child - pretend that container's children have been requested.
         Node* firstChild = container->firstChild();
-        if (firstChild && firstChild->nodeType() == Node::TEXT_NODE && !firstChild->nextSibling()) {
+        if (firstChild && firstChild->getNodeType() == Node::TEXT_NODE && !firstChild->nextSibling()) {
             children->addItem(buildObjectForNode(firstChild, 0, nodesMap));
             m_childrenRequested.add(bind(container, nodesMap));
         }
@@ -1609,7 +1617,7 @@
             continue;
 
         OwnPtr<protocol::DOM::BackendNode> backendNode = protocol::DOM::BackendNode::create()
-            .setNodeType(distributedNode->nodeType())
+            .setNodeType(distributedNode->getNodeType())
             .setNodeName(distributedNode->nodeName())
             .setBackendNodeId(DOMNodeIds::idForNode(distributedNode)).build();
         distributedNodes->addItem(backendNode.release());
@@ -1666,7 +1674,7 @@
 bool InspectorDOMAgent::isWhitespace(Node* node)
 {
     //TODO: pull ignoreWhitespace setting from the frontend and use here.
-    return node && node->nodeType() == Node::TEXT_NODE && node->nodeValue().stripWhiteSpace().length() == 0;
+    return node && node->getNodeType() == Node::TEXT_NODE && node->nodeValue().stripWhiteSpace().length() == 0;
 }
 
 void InspectorDOMAgent::domContentLoadedEventFired(LocalFrame* frame)
diff --git a/third_party/WebKit/Source/core/inspector/InspectorDOMAgent.h b/third_party/WebKit/Source/core/inspector/InspectorDOMAgent.h
index 8769089..ce1f934 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorDOMAgent.h
+++ b/third_party/WebKit/Source/core/inspector/InspectorDOMAgent.h
@@ -117,34 +117,34 @@
     void enable(ErrorString*) override;
     void disable(ErrorString*) override;
     void getDocument(ErrorString*, OwnPtr<protocol::DOM::Node>* root) override;
-    void requestChildNodes(ErrorString*, int nodeId, const OptionalValue<int>& depth) override;
+    void requestChildNodes(ErrorString*, int nodeId, const Maybe<int>& depth) override;
     void querySelector(ErrorString*, int nodeId, const String& selector, int* outNodeId) override;
     void querySelectorAll(ErrorString*, int nodeId, const String& selector, OwnPtr<protocol::Array<int>>* nodeIds) override;
     void setNodeName(ErrorString*, int nodeId, const String& name, int* outNodeId) override;
     void setNodeValue(ErrorString*, int nodeId, const String& value) override;
     void removeNode(ErrorString*, int nodeId) override;
     void setAttributeValue(ErrorString*, int nodeId, const String& name, const String& value) override;
-    void setAttributesAsText(ErrorString*, int nodeId, const String& text, const OptionalValue<String>& name) override;
+    void setAttributesAsText(ErrorString*, int nodeId, const String& text, const Maybe<String>& name) override;
     void removeAttribute(ErrorString*, int nodeId, const String& name) override;
     void getOuterHTML(ErrorString*, int nodeId, String* outerHTML) override;
     void setOuterHTML(ErrorString*, int nodeId, const String& outerHTML) override;
-    void performSearch(ErrorString*, const String& query, const OptionalValue<bool>& includeUserAgentShadowDOM, String* searchId, int* resultCount) override;
+    void performSearch(ErrorString*, const String& query, const Maybe<bool>& includeUserAgentShadowDOM, String* searchId, int* resultCount) override;
     void getSearchResults(ErrorString*, const String& searchId, int fromIndex, int toIndex, OwnPtr<protocol::Array<int>>* nodeIds) override;
     void discardSearchResults(ErrorString*, const String& searchId) override;
     void requestNode(ErrorString*, const String& objectId, int* outNodeId) override;
-    void setInspectMode(ErrorString*, const String& mode, PassOwnPtr<protocol::DOM::HighlightConfig>) override;
-    void highlightRect(ErrorString*, int x, int y, int width, int height, PassOwnPtr<protocol::DOM::RGBA> color, PassOwnPtr<protocol::DOM::RGBA> outlineColor) override;
-    void highlightQuad(ErrorString*, PassOwnPtr<protocol::Array<double>> quad, PassOwnPtr<protocol::DOM::RGBA> color, PassOwnPtr<protocol::DOM::RGBA> outlineColor) override;
-    void highlightNode(ErrorString*, PassOwnPtr<protocol::DOM::HighlightConfig>, const OptionalValue<int>& nodeId, const OptionalValue<int>& backendNodeId, const OptionalValue<String>& objectId) override;
+    void setInspectMode(ErrorString*, const String& mode, const Maybe<protocol::DOM::HighlightConfig>&) override;
+    void highlightRect(ErrorString*, int x, int y, int width, int height, const Maybe<protocol::DOM::RGBA>& color, const Maybe<protocol::DOM::RGBA>& outlineColor) override;
+    void highlightQuad(ErrorString*, PassOwnPtr<protocol::Array<double>> quad, const Maybe<protocol::DOM::RGBA>& color, const Maybe<protocol::DOM::RGBA>& outlineColor) override;
+    void highlightNode(ErrorString*, PassOwnPtr<protocol::DOM::HighlightConfig>, const Maybe<int>& nodeId, const Maybe<int>& backendNodeId, const Maybe<String>& objectId) override;
     void hideHighlight(ErrorString*) override;
-    void highlightFrame(ErrorString*, const String& frameId, PassOwnPtr<protocol::DOM::RGBA> contentColor, PassOwnPtr<protocol::DOM::RGBA> contentOutlineColor) override;
+    void highlightFrame(ErrorString*, const String& frameId, const Maybe<protocol::DOM::RGBA>& contentColor, const Maybe<protocol::DOM::RGBA>& contentOutlineColor) override;
     void pushNodeByPathToFrontend(ErrorString*, const String& path, int* outNodeId) override;
     void pushNodesByBackendIdsToFrontend(ErrorString*, PassOwnPtr<protocol::Array<int>> backendNodeIds, OwnPtr<protocol::Array<int>>* nodeIds) override;
     void setInspectedNode(ErrorString*, int nodeId) override;
-    void resolveNode(ErrorString*, int nodeId, const OptionalValue<String>& objectGroup, OwnPtr<protocol::Runtime::RemoteObject>*) override;
+    void resolveNode(ErrorString*, int nodeId, const Maybe<String>& objectGroup, OwnPtr<protocol::Runtime::RemoteObject>*) override;
     void getAttributes(ErrorString*, int nodeId, OwnPtr<protocol::Array<String>>* attributes) override;
-    void copyTo(ErrorString*, int nodeId, int targetNodeId, const OptionalValue<int>& insertBeforeNodeId, int* outNodeId) override;
-    void moveTo(ErrorString*, int nodeId, int targetNodeId, const OptionalValue<int>& insertBeforeNodeId, int* outNodeId) override;
+    void copyTo(ErrorString*, int nodeId, int targetNodeId, const Maybe<int>& insertBeforeNodeId, int* outNodeId) override;
+    void moveTo(ErrorString*, int nodeId, int targetNodeId, const Maybe<int>& insertBeforeNodeId, int* outNodeId) override;
     void undo(ErrorString*) override;
     void redo(ErrorString*) override;
     void markUndoableState(ErrorString*) override;
@@ -207,8 +207,8 @@
     void setDocument(Document*);
     void innerEnable();
 
-    void setSearchingForNode(ErrorString*, SearchMode, PassOwnPtr<protocol::DOM::HighlightConfig>);
-    PassOwnPtr<InspectorHighlightConfig> highlightConfigFromInspectorObject(ErrorString*, PassOwnPtr<protocol::DOM::HighlightConfig> highlightInspectorObject);
+    void setSearchingForNode(ErrorString*, SearchMode, const Maybe<protocol::DOM::HighlightConfig>&);
+    PassOwnPtr<InspectorHighlightConfig> highlightConfigFromInspectorObject(ErrorString*, const Maybe<protocol::DOM::HighlightConfig>& highlightInspectorObject);
 
     // Node-related methods.
     typedef WillBeHeapHashMap<RefPtrWillBeMember<Node>, int> NodeToIdMap;
@@ -236,7 +236,7 @@
 
     void discardFrontendBindings();
 
-    void innerHighlightQuad(PassOwnPtr<FloatQuad>, PassOwnPtr<protocol::DOM::RGBA> color, PassOwnPtr<protocol::DOM::RGBA> outlineColor);
+    void innerHighlightQuad(PassOwnPtr<FloatQuad>, const Maybe<protocol::DOM::RGBA>& color, const Maybe<protocol::DOM::RGBA>& outlineColor);
 
     bool pushDocumentUponHandlelessOperation(ErrorString*);
 
diff --git a/third_party/WebKit/Source/core/inspector/InspectorDOMDebuggerAgent.cpp b/third_party/WebKit/Source/core/inspector/InspectorDOMDebuggerAgent.cpp
index 5ed155488..e49c67ae 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorDOMDebuggerAgent.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorDOMDebuggerAgent.cpp
@@ -169,9 +169,9 @@
         m_instrumentingAgents->setInspectorDOMDebuggerAgent(this);
 }
 
-void InspectorDOMDebuggerAgent::setEventListenerBreakpoint(ErrorString* error, const String& eventName, const OptionalValue<String>& targetName)
+void InspectorDOMDebuggerAgent::setEventListenerBreakpoint(ErrorString* error, const String& eventName, const Maybe<String>& targetName)
 {
-    setBreakpoint(error, String(listenerEventCategoryType) + eventName, targetName.get(String()));
+    setBreakpoint(error, String(listenerEventCategoryType) + eventName, targetName.fromMaybe(String()));
 }
 
 void InspectorDOMDebuggerAgent::setInstrumentationBreakpoint(ErrorString* error, const String& eventName)
@@ -183,7 +183,7 @@
 {
     JSONObject::iterator it = object->find(propertyName);
     if (it != object->end())
-        return it->value->asObject();
+        return JSONObject::cast(it->value);
 
     RefPtr<JSONObject> result = JSONObject::create();
     object->setObject(propertyName, result);
@@ -225,9 +225,9 @@
     didAddBreakpoint();
 }
 
-void InspectorDOMDebuggerAgent::removeEventListenerBreakpoint(ErrorString* error, const String& eventName, const OptionalValue<String>& targetName)
+void InspectorDOMDebuggerAgent::removeEventListenerBreakpoint(ErrorString* error, const String& eventName, const Maybe<String>& targetName)
 {
-    removeBreakpoint(error, String(listenerEventCategoryType) + eventName, targetName.get(String()));
+    removeBreakpoint(error, String(listenerEventCategoryType) + eventName, targetName.fromMaybe(String()));
 }
 
 void InspectorDOMDebuggerAgent::removeInstrumentationBreakpoint(ErrorString* error, const String& eventName)
@@ -537,7 +537,7 @@
     if (it == breakpoints->end())
         return nullptr;
     bool match = false;
-    RefPtr<JSONObject> breakpointsByTarget = it->value->asObject();
+    RefPtr<JSONObject> breakpointsByTarget = JSONObject::cast(it->value);
     breakpointsByTarget->getBoolean(DOMDebuggerAgentState::eventTargetAny, &match);
     if (!match && targetName)
         breakpointsByTarget->getBoolean(targetName->lower(), &match);
diff --git a/third_party/WebKit/Source/core/inspector/InspectorDOMDebuggerAgent.h b/third_party/WebKit/Source/core/inspector/InspectorDOMDebuggerAgent.h
index 12d78eae..5ce5f84 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorDOMDebuggerAgent.h
+++ b/third_party/WebKit/Source/core/inspector/InspectorDOMDebuggerAgent.h
@@ -68,8 +68,8 @@
     // DOMDebugger API for InspectorFrontend
     void setDOMBreakpoint(ErrorString*, int nodeId, const String& type) override;
     void removeDOMBreakpoint(ErrorString*, int nodeId, const String& type) override;
-    void setEventListenerBreakpoint(ErrorString*, const String& eventName, const OptionalValue<String>& targetName) override;
-    void removeEventListenerBreakpoint(ErrorString*, const String& eventName, const OptionalValue<String>& targetName) override;
+    void setEventListenerBreakpoint(ErrorString*, const String& eventName, const Maybe<String>& targetName) override;
+    void removeEventListenerBreakpoint(ErrorString*, const String& eventName, const Maybe<String>& targetName) override;
     void setInstrumentationBreakpoint(ErrorString*, const String& eventName) override;
     void removeInstrumentationBreakpoint(ErrorString*, const String& eventName) override;
     void setXHRBreakpoint(ErrorString*, const String& url) override;
diff --git a/third_party/WebKit/Source/core/inspector/InspectorDebuggerAgent.cpp b/third_party/WebKit/Source/core/inspector/InspectorDebuggerAgent.cpp
index 7cc1c1a..206bbdc 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorDebuggerAgent.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorDebuggerAgent.cpp
@@ -37,6 +37,8 @@
 
 namespace blink {
 
+using protocol::Maybe;
+
 namespace DebuggerAgentState {
 static const char debuggerEnabled[] = "debuggerEnabled";
 }
@@ -87,11 +89,12 @@
     m_v8DebuggerAgent->setSkipAllPauses(errorString, inSkipped);
 }
 
-void InspectorDebuggerAgent::setBreakpointByUrl(ErrorString* errorString, int inLineNumber,
-    const OptionalValue<String>& inUrl,
-    const OptionalValue<String>& inUrlRegex,
-    const OptionalValue<int>& inColumnNumber,
-    const OptionalValue<String>& inCondition,
+void InspectorDebuggerAgent::setBreakpointByUrl(ErrorString* errorString,
+    int inLineNumber,
+    const Maybe<String>& inUrl,
+    const Maybe<String>& inUrlRegex,
+    const Maybe<int>& inColumnNumber,
+    const Maybe<String>& inCondition,
     protocol::Debugger::BreakpointId* outBreakpointId,
     OwnPtr<Array<protocol::Debugger::Location>>* outLocations)
 {
@@ -99,7 +102,7 @@
 }
 
 void InspectorDebuggerAgent::setBreakpoint(ErrorString* errorString, PassOwnPtr<protocol::Debugger::Location> inLocation,
-    const OptionalValue<String>& inCondition,
+    const Maybe<String>& inCondition,
     protocol::Debugger::BreakpointId* outBreakpointId,
     OwnPtr<protocol::Debugger::Location>* outActualLocation)
 {
@@ -114,7 +117,7 @@
 
 void InspectorDebuggerAgent::continueToLocation(ErrorString* errorString,
     PassOwnPtr<protocol::Debugger::Location> inLocation,
-    const OptionalValue<bool>& inInterstatementLocation)
+    const Maybe<bool>& inInterstatementLocation)
 {
     m_v8DebuggerAgent->continueToLocation(errorString, inLocation, inInterstatementLocation);
 }
@@ -152,8 +155,8 @@
 void InspectorDebuggerAgent::searchInContent(ErrorString* errorString,
     const String& inScriptId,
     const String& inQuery,
-    const OptionalValue<bool>& inCaseSensitive,
-    const OptionalValue<bool>& inIsRegex,
+    const Maybe<bool>& inCaseSensitive,
+    const Maybe<bool>& inIsRegex,
     OwnPtr<Array<protocol::Debugger::SearchMatch>>* outResult)
 {
     m_v8DebuggerAgent->searchInContent(errorString, inScriptId, inQuery, inCaseSensitive, inIsRegex, outResult);
@@ -167,11 +170,11 @@
 void InspectorDebuggerAgent::setScriptSource(ErrorString* errorString,
     const String& inScriptId,
     const String& inScriptSource,
-    const OptionalValue<bool>& inPreview,
-    OwnPtr<Array<protocol::Debugger::CallFrame>>* optOutCallFrames,
-    OptionalValue<bool>* optOutStackChanged,
-    OwnPtr<protocol::Debugger::StackTrace>* optOutAsyncStackTrace,
-    OwnPtr<protocol::Debugger::SetScriptSourceError>* optOutCompileError)
+    const Maybe<bool>& inPreview,
+    Maybe<Array<protocol::Debugger::CallFrame>>* optOutCallFrames,
+    Maybe<bool>* optOutStackChanged,
+    Maybe<protocol::Debugger::StackTrace>* optOutAsyncStackTrace,
+    Maybe<protocol::Debugger::SetScriptSourceError>* optOutCompileError)
 {
     m_v8DebuggerAgent->setScriptSource(errorString, inScriptId, inScriptSource, inPreview, optOutCallFrames, optOutStackChanged, optOutAsyncStackTrace, optOutCompileError);
 }
@@ -179,7 +182,7 @@
 void InspectorDebuggerAgent::restartFrame(ErrorString* errorString,
     const String& inCallFrameId,
     OwnPtr<Array<protocol::Debugger::CallFrame>>* outCallFrames,
-    OwnPtr<protocol::Debugger::StackTrace>* optOutAsyncStackTrace)
+    Maybe<protocol::Debugger::StackTrace>* optOutAsyncStackTrace)
 {
     m_v8DebuggerAgent->restartFrame(errorString, inCallFrameId, outCallFrames, optOutAsyncStackTrace);
 }
@@ -221,17 +224,17 @@
 void InspectorDebuggerAgent::evaluateOnCallFrame(ErrorString* errorString,
     const String& inCallFrameId,
     const String& inExpression,
-    const OptionalValue<String>& inObjectGroup,
-    const OptionalValue<bool>& inIncludeCommandLineAPI,
-    const OptionalValue<bool>& inDoNotPauseOnExceptionsAndMuteConsole,
-    const OptionalValue<bool>& inReturnByValue,
-    const OptionalValue<bool>& inGeneratePreview,
+    const Maybe<String>& inObjectGroup,
+    const Maybe<bool>& inIncludeCommandLineAPI,
+    const Maybe<bool>& inDoNotPauseOnExceptionsAndMuteConsole,
+    const Maybe<bool>& inReturnByValue,
+    const Maybe<bool>& inGeneratePreview,
     OwnPtr<protocol::Runtime::RemoteObject>* outResult,
-    OptionalValue<bool>* optOutWasThrown,
-    OwnPtr<protocol::Runtime::ExceptionDetails>* optOutExceptionDetails)
+    Maybe<bool>* optOutWasThrown,
+    Maybe<protocol::Runtime::ExceptionDetails>* optOutExceptionDetails)
 {
     MuteConsoleScope<InspectorDebuggerAgent> muteScope;
-    if (inDoNotPauseOnExceptionsAndMuteConsole.get(false))
+    if (inDoNotPauseOnExceptionsAndMuteConsole.fromMaybe(false))
         muteScope.enter(this);
     m_v8DebuggerAgent->evaluateOnCallFrame(errorString, inCallFrameId, inExpression, inObjectGroup, inIncludeCommandLineAPI, inDoNotPauseOnExceptionsAndMuteConsole, inReturnByValue, inGeneratePreview, outResult, optOutWasThrown, optOutExceptionDetails);
 }
@@ -239,22 +242,22 @@
 void InspectorDebuggerAgent::setVariableValue(ErrorString* errorString, int inScopeNumber,
     const String& inVariableName,
     PassOwnPtr<protocol::Runtime::CallArgument> inNewValue,
-    const OptionalValue<String>& inCallFrameId,
-    const OptionalValue<String>& inFunctionObjectId)
+    const Maybe<String>& inCallFrameId,
+    const Maybe<String>& inFunctionObjectId)
 {
     m_v8DebuggerAgent->setVariableValue(errorString, inScopeNumber, inVariableName, inNewValue, inCallFrameId, inFunctionObjectId);
 }
 
 void InspectorDebuggerAgent::getStepInPositions(ErrorString* errorString,
     const String& inCallFrameId,
-    OwnPtr<Array<protocol::Debugger::Location>>* optOutStepInPositions)
+    Maybe<Array<protocol::Debugger::Location>>* optOutStepInPositions)
 {
     m_v8DebuggerAgent->getStepInPositions(errorString, inCallFrameId, optOutStepInPositions);
 }
 
 void InspectorDebuggerAgent::getBacktrace(ErrorString* errorString,
     OwnPtr<Array<protocol::Debugger::CallFrame>>* outCallFrames,
-    OwnPtr<protocol::Debugger::StackTrace>* optOutAsyncStackTrace)
+    Maybe<protocol::Debugger::StackTrace>* optOutAsyncStackTrace)
 {
     m_v8DebuggerAgent->getBacktrace(errorString, outCallFrames, optOutAsyncStackTrace);
 }
@@ -266,7 +269,7 @@
 }
 
 void InspectorDebuggerAgent::enablePromiseTracker(ErrorString* errorString,
-    const OptionalValue<bool>& inCaptureStacks)
+    const Maybe<bool>& inCaptureStacks)
 {
     m_v8DebuggerAgent->enablePromiseTracker(errorString, inCaptureStacks);
 }
@@ -279,7 +282,7 @@
 void InspectorDebuggerAgent::getPromiseById(
     ErrorString* errorString,
     int inPromiseId,
-    const OptionalValue<String>& inObjectGroup,
+    const Maybe<String>& inObjectGroup,
     OwnPtr<protocol::Runtime::RemoteObject>* outPromise)
 {
     m_v8DebuggerAgent->getPromiseById(errorString, inPromiseId, inObjectGroup, outPromise);
diff --git a/third_party/WebKit/Source/core/inspector/InspectorDebuggerAgent.h b/third_party/WebKit/Source/core/inspector/InspectorDebuggerAgent.h
index 11186669..58dbcda6 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorDebuggerAgent.h
+++ b/third_party/WebKit/Source/core/inspector/InspectorDebuggerAgent.h
@@ -50,33 +50,33 @@
     void disable(ErrorString*) override;
     void setBreakpointsActive(ErrorString*, bool active) override;
     void setSkipAllPauses(ErrorString*, bool skipped) override;
-    void setBreakpointByUrl(ErrorString*, int lineNumber, const OptionalValue<String>& url, const OptionalValue<String>& urlRegex, const OptionalValue<int>& columnNumber, const OptionalValue<String>& condition, String* breakpointId, OwnPtr<protocol::Array<protocol::Debugger::Location>>* locations) override;
-    void setBreakpoint(ErrorString*, PassOwnPtr<protocol::Debugger::Location>, const OptionalValue<String>& condition, String* breakpointId, OwnPtr<protocol::Debugger::Location>* actualLocation) override;
+    void setBreakpointByUrl(ErrorString*, int lineNumber, const Maybe<String>& url, const Maybe<String>& urlRegex, const Maybe<int>& columnNumber, const Maybe<String>& condition, String* breakpointId, OwnPtr<protocol::Array<protocol::Debugger::Location>>* locations) override;
+    void setBreakpoint(ErrorString*, PassOwnPtr<protocol::Debugger::Location>, const Maybe<String>& condition, String* breakpointId, OwnPtr<protocol::Debugger::Location>* actualLocation) override;
     void removeBreakpoint(ErrorString*, const String& breakpointId) override;
-    void continueToLocation(ErrorString*, PassOwnPtr<protocol::Debugger::Location>, const OptionalValue<bool>& interstatementLocation) override;
+    void continueToLocation(ErrorString*, PassOwnPtr<protocol::Debugger::Location>, const Maybe<bool>& interstatementLocation) override;
     void stepOver(ErrorString*) override;
     void stepInto(ErrorString*) override;
     void stepOut(ErrorString*) override;
     void pause(ErrorString*) override;
     void resume(ErrorString*) override;
     void stepIntoAsync(ErrorString*) override;
-    void searchInContent(ErrorString*, const String& scriptId, const String& query, const OptionalValue<bool>& caseSensitive, const OptionalValue<bool>& isRegex, OwnPtr<protocol::Array<protocol::Debugger::SearchMatch>>* result) override;
+    void searchInContent(ErrorString*, const String& scriptId, const String& query, const Maybe<bool>& caseSensitive, const Maybe<bool>& isRegex, OwnPtr<protocol::Array<protocol::Debugger::SearchMatch>>* result) override;
     void canSetScriptSource(ErrorString*, bool* result) override;
-    void setScriptSource(ErrorString*, const String& scriptId, const String& scriptSource, const OptionalValue<bool>& preview, OwnPtr<protocol::Array<protocol::Debugger::CallFrame>>* callFrames, OptionalValue<bool>* stackChanged, OwnPtr<protocol::Debugger::StackTrace>* asyncStackTrace, OwnPtr<protocol::Debugger::SetScriptSourceError>* compileError) override;
-    void restartFrame(ErrorString*, const String& callFrameId, OwnPtr<protocol::Array<protocol::Debugger::CallFrame>>* callFrames, OwnPtr<protocol::Debugger::StackTrace>* asyncStackTrace) override;
+    void setScriptSource(ErrorString*, const String& scriptId, const String& scriptSource, const Maybe<bool>& preview, Maybe<protocol::Array<protocol::Debugger::CallFrame>>* callFrames, Maybe<bool>* stackChanged, Maybe<protocol::Debugger::StackTrace>* asyncStackTrace, Maybe<protocol::Debugger::SetScriptSourceError>* compileError) override;
+    void restartFrame(ErrorString*, const String& callFrameId, OwnPtr<protocol::Array<protocol::Debugger::CallFrame>>* callFrames, Maybe<protocol::Debugger::StackTrace>* asyncStackTrace) override;
     void getScriptSource(ErrorString*, const String& scriptId, String* scriptSource) override;
     void getFunctionDetails(ErrorString*, const String& functionId, OwnPtr<protocol::Debugger::FunctionDetails>*) override;
     void getGeneratorObjectDetails(ErrorString*, const String& objectId, OwnPtr<protocol::Debugger::GeneratorObjectDetails>*) override;
     void getCollectionEntries(ErrorString*, const String& objectId, OwnPtr<protocol::Array<protocol::Debugger::CollectionEntry>>* entries) override;
     void setPauseOnExceptions(ErrorString*, const String& state) override;
-    void evaluateOnCallFrame(ErrorString*, const String& callFrameId, const String& expression, const OptionalValue<String>& objectGroup, const OptionalValue<bool>& includeCommandLineAPI, const OptionalValue<bool>& doNotPauseOnExceptionsAndMuteConsole, const OptionalValue<bool>& returnByValue, const OptionalValue<bool>& generatePreview, OwnPtr<protocol::Runtime::RemoteObject>* result, OptionalValue<bool>* wasThrown, OwnPtr<protocol::Runtime::ExceptionDetails>*) override;
-    void setVariableValue(ErrorString*, int scopeNumber, const String& variableName, PassOwnPtr<protocol::Runtime::CallArgument> newValue, const OptionalValue<String>& callFrameId, const OptionalValue<String>& functionObjectId) override;
-    void getStepInPositions(ErrorString*, const String& callFrameId, OwnPtr<protocol::Array<protocol::Debugger::Location>>* stepInPositions) override;
-    void getBacktrace(ErrorString*, OwnPtr<protocol::Array<protocol::Debugger::CallFrame>>* callFrames, OwnPtr<protocol::Debugger::StackTrace>* asyncStackTrace) override;
+    void evaluateOnCallFrame(ErrorString*, const String& callFrameId, const String& expression, const Maybe<String>& objectGroup, const Maybe<bool>& includeCommandLineAPI, const Maybe<bool>& doNotPauseOnExceptionsAndMuteConsole, const Maybe<bool>& returnByValue, const Maybe<bool>& generatePreview, OwnPtr<protocol::Runtime::RemoteObject>* result, Maybe<bool>* wasThrown, Maybe<protocol::Runtime::ExceptionDetails>*) override;
+    void setVariableValue(ErrorString*, int scopeNumber, const String& variableName, PassOwnPtr<protocol::Runtime::CallArgument> newValue, const Maybe<String>& callFrameId, const Maybe<String>& functionObjectId) override;
+    void getStepInPositions(ErrorString*, const String& callFrameId, Maybe<protocol::Array<protocol::Debugger::Location>>* stepInPositions) override;
+    void getBacktrace(ErrorString*, OwnPtr<protocol::Array<protocol::Debugger::CallFrame>>* callFrames, Maybe<protocol::Debugger::StackTrace>* asyncStackTrace) override;
     void setAsyncCallStackDepth(ErrorString*, int maxDepth) override;
-    void enablePromiseTracker(ErrorString*, const OptionalValue<bool>& captureStacks) override;
+    void enablePromiseTracker(ErrorString*, const Maybe<bool>& captureStacks) override;
     void disablePromiseTracker(ErrorString*) override;
-    void getPromiseById(ErrorString*, int promiseId, const OptionalValue<String>& objectGroup, OwnPtr<protocol::Runtime::RemoteObject>* promise) override;
+    void getPromiseById(ErrorString*, int promiseId, const Maybe<String>& objectGroup, OwnPtr<protocol::Runtime::RemoteObject>* promise) override;
     void flushAsyncOperationEvents(ErrorString*) override;
     void setAsyncOperationBreakpoint(ErrorString*, int operationId) override;
     void removeAsyncOperationBreakpoint(ErrorString*, int operationId) override;
diff --git a/third_party/WebKit/Source/core/inspector/InspectorHeapProfilerAgent.cpp b/third_party/WebKit/Source/core/inspector/InspectorHeapProfilerAgent.cpp
index 2e094fb..058d042 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorHeapProfilerAgent.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorHeapProfilerAgent.cpp
@@ -120,13 +120,13 @@
     m_v8HeapProfilerAgent->collectGarbage(error);
 }
 
-void InspectorHeapProfilerAgent::startTrackingHeapObjects(ErrorString* error, const protocol::OptionalValue<bool>& trackAllocations)
+void InspectorHeapProfilerAgent::startTrackingHeapObjects(ErrorString* error, const protocol::Maybe<bool>& trackAllocations)
 {
     m_v8HeapProfilerAgent->startTrackingHeapObjects(error, trackAllocations);
     startUpdateStatsTimer();
 }
 
-void InspectorHeapProfilerAgent::stopTrackingHeapObjects(ErrorString* error, const protocol::OptionalValue<bool>& reportProgress)
+void InspectorHeapProfilerAgent::stopTrackingHeapObjects(ErrorString* error, const protocol::Maybe<bool>& reportProgress)
 {
     m_v8HeapProfilerAgent->stopTrackingHeapObjects(error, reportProgress);
     stopUpdateStatsTimer();
@@ -159,12 +159,12 @@
     stopUpdateStatsTimer();
 }
 
-void InspectorHeapProfilerAgent::takeHeapSnapshot(ErrorString* errorString, const protocol::OptionalValue<bool>& reportProgress)
+void InspectorHeapProfilerAgent::takeHeapSnapshot(ErrorString* errorString, const protocol::Maybe<bool>& reportProgress)
 {
     m_v8HeapProfilerAgent->takeHeapSnapshot(errorString, reportProgress);
 }
 
-void InspectorHeapProfilerAgent::getObjectByHeapObjectId(ErrorString* error, const String& heapSnapshotObjectId, const protocol::OptionalValue<String>& objectGroup, OwnPtr<protocol::Runtime::RemoteObject>* result)
+void InspectorHeapProfilerAgent::getObjectByHeapObjectId(ErrorString* error, const String& heapSnapshotObjectId, const protocol::Maybe<String>& objectGroup, OwnPtr<protocol::Runtime::RemoteObject>* result)
 {
     bool ok;
     unsigned id = heapSnapshotObjectId.toUInt(&ok);
diff --git a/third_party/WebKit/Source/core/inspector/InspectorHeapProfilerAgent.h b/third_party/WebKit/Source/core/inspector/InspectorHeapProfilerAgent.h
index 3a3a042..6b2b6225 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorHeapProfilerAgent.h
+++ b/third_party/WebKit/Source/core/inspector/InspectorHeapProfilerAgent.h
@@ -64,11 +64,11 @@
 
     void enable(ErrorString*) override;
     void disable(ErrorString*) override;
-    void startTrackingHeapObjects(ErrorString*, const OptionalValue<bool>& trackAllocations) override;
-    void stopTrackingHeapObjects(ErrorString*, const OptionalValue<bool>& reportProgress) override;
-    void takeHeapSnapshot(ErrorString*, const OptionalValue<bool>& reportProgress) override;
+    void startTrackingHeapObjects(ErrorString*, const Maybe<bool>& trackAllocations) override;
+    void stopTrackingHeapObjects(ErrorString*, const Maybe<bool>& reportProgress) override;
+    void takeHeapSnapshot(ErrorString*, const Maybe<bool>& reportProgress) override;
     void collectGarbage(ErrorString*) override;
-    void getObjectByHeapObjectId(ErrorString*, const String& objectId, const OptionalValue<String>& objectGroup, OwnPtr<protocol::Runtime::RemoteObject>* result) override;
+    void getObjectByHeapObjectId(ErrorString*, const String& objectId, const Maybe<String>& objectGroup, OwnPtr<protocol::Runtime::RemoteObject>* result) override;
     void addInspectedHeapObject(ErrorString*, const String& heapObjectId) override;
     void getHeapObjectId(ErrorString*, const String& objectId, String* heapSnapshotObjectId) override;
     void startSampling(ErrorString*) override;
diff --git a/third_party/WebKit/Source/core/inspector/InspectorInputAgent.cpp b/third_party/WebKit/Source/core/inspector/InspectorInputAgent.cpp
index b709a77d..cc82320 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorInputAgent.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorInputAgent.cpp
@@ -118,7 +118,7 @@
 {
 }
 
-void InspectorInputAgent::dispatchTouchEvent(ErrorString* error, const String& type, PassOwnPtr<protocol::Array<protocol::Input::TouchPoint>> touchPoints, const protocol::OptionalValue<int>& modifiers, const protocol::OptionalValue<double>& timestamp)
+void InspectorInputAgent::dispatchTouchEvent(ErrorString* error, const String& type, PassOwnPtr<protocol::Array<protocol::Input::TouchPoint>> touchPoints, const protocol::Maybe<int>& modifiers, const protocol::Maybe<double>& timestamp)
 {
     PlatformEvent::Type convertedType;
     if (type == "touchStart") {
@@ -132,9 +132,9 @@
         return;
     }
 
-    unsigned convertedModifiers = GetEventModifiers(modifiers.get(0));
+    unsigned convertedModifiers = GetEventModifiers(modifiers.fromMaybe(0));
 
-    SyntheticInspectorTouchEvent event(convertedType, convertedModifiers, timestamp.get(currentTime()));
+    SyntheticInspectorTouchEvent event(convertedType, convertedModifiers, timestamp.fromMaybe(currentTime()));
 
     int autoId = 0;
     for (size_t i = 0; i < touchPoints->length(); ++i) {
diff --git a/third_party/WebKit/Source/core/inspector/InspectorInputAgent.h b/third_party/WebKit/Source/core/inspector/InspectorInputAgent.h
index 7f1123ab..bd001a2 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorInputAgent.h
+++ b/third_party/WebKit/Source/core/inspector/InspectorInputAgent.h
@@ -56,7 +56,7 @@
     DECLARE_VIRTUAL_TRACE();
 
     // Methods called from the frontend for simulating input.
-    void dispatchTouchEvent(ErrorString*, const String& type, PassOwnPtr<protocol::Array<protocol::Input::TouchPoint>> touchPoints, const OptionalValue<int>& modifiers, const OptionalValue<double>& timestamp) override;
+    void dispatchTouchEvent(ErrorString*, const String& type, PassOwnPtr<protocol::Array<protocol::Input::TouchPoint>> touchPoints, const Maybe<int>& modifiers, const Maybe<double>& timestamp) override;
 private:
     explicit InspectorInputAgent(InspectedFrames*);
 
diff --git a/third_party/WebKit/Source/core/inspector/InspectorLayerTreeAgent.cpp b/third_party/WebKit/Source/core/inspector/InspectorLayerTreeAgent.cpp
index 0040da0e..25cd3d31 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorLayerTreeAgent.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorLayerTreeAgent.cpp
@@ -401,12 +401,12 @@
     return it->value.get();
 }
 
-void InspectorLayerTreeAgent::replaySnapshot(ErrorString* errorString, const String& snapshotId, const OptionalValue<int>& fromStep, const OptionalValue<int>& toStep, const OptionalValue<double>& scale, String* dataURL)
+void InspectorLayerTreeAgent::replaySnapshot(ErrorString* errorString, const String& snapshotId, const Maybe<int>& fromStep, const Maybe<int>& toStep, const Maybe<double>& scale, String* dataURL)
 {
     const PictureSnapshot* snapshot = snapshotById(errorString, snapshotId);
     if (!snapshot)
         return;
-    OwnPtr<Vector<char>> base64Data = snapshot->replay(fromStep.get(0), toStep.get(0), scale.get(1.0));
+    OwnPtr<Vector<char>> base64Data = snapshot->replay(fromStep.fromMaybe(0), toStep.fromMaybe(0), scale.fromMaybe(1.0));
     if (!base64Data) {
         *errorString = "Image encoding failed";
         return;
@@ -426,17 +426,17 @@
     return true;
 }
 
-void InspectorLayerTreeAgent::profileSnapshot(ErrorString* errorString, const String& snapshotId, const protocol::OptionalValue<int>& minRepeatCount, const protocol::OptionalValue<double>& minDuration, PassOwnPtr<protocol::DOM::Rect> clipRect, OwnPtr<protocol::Array<protocol::Array<double>>>* outTimings)
+void InspectorLayerTreeAgent::profileSnapshot(ErrorString* errorString, const String& snapshotId, const protocol::Maybe<int>& minRepeatCount, const protocol::Maybe<double>& minDuration, const Maybe<protocol::DOM::Rect>& clipRect, OwnPtr<protocol::Array<protocol::Array<double>>>* outTimings)
 {
     const PictureSnapshot* snapshot = snapshotById(errorString, snapshotId);
     if (!snapshot)
         return;
     FloatRect rect;
-    if (clipRect && !parseRect(clipRect.get(), &rect)) {
+    if (clipRect.isJust() && !parseRect(clipRect.fromJust(), &rect)) {
         *errorString = "Invalid argument, missing required field";
         return;
     }
-    OwnPtr<PictureSnapshot::Timings> timings = snapshot->profile(minRepeatCount.get(1), minDuration.get(0), clipRect ? &rect : 0);
+    OwnPtr<PictureSnapshot::Timings> timings = snapshot->profile(minRepeatCount.fromMaybe(1), minDuration.fromMaybe(0), clipRect.isJust() ? &rect : 0);
     *outTimings = Array<Array<double>>::create();
     for (size_t i = 0; i < timings->size(); ++i) {
         const Vector<double>& row = (*timings)[i];
diff --git a/third_party/WebKit/Source/core/inspector/InspectorLayerTreeAgent.h b/third_party/WebKit/Source/core/inspector/InspectorLayerTreeAgent.h
index 54f6f95f..7437c27 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorLayerTreeAgent.h
+++ b/third_party/WebKit/Source/core/inspector/InspectorLayerTreeAgent.h
@@ -79,8 +79,8 @@
     void makeSnapshot(ErrorString*, const String& layerId, String* snapshotId) override;
     void loadSnapshot(ErrorString*, PassOwnPtr<protocol::Array<protocol::LayerTree::PictureTile>> tiles, String* snapshotId) override;
     void releaseSnapshot(ErrorString*, const String& snapshotId) override;
-    void profileSnapshot(ErrorString*, const String& snapshotId, const OptionalValue<int>& minRepeatCount, const OptionalValue<double>& minDuration, PassOwnPtr<protocol::DOM::Rect> clipRect, OwnPtr<protocol::Array<protocol::Array<double>>>* timings) override;
-    void replaySnapshot(ErrorString*, const String& snapshotId, const OptionalValue<int>& fromStep, const OptionalValue<int>& toStep, const OptionalValue<double>& scale, String* dataURL) override;
+    void profileSnapshot(ErrorString*, const String& snapshotId, const Maybe<int>& minRepeatCount, const Maybe<double>& minDuration, const Maybe<protocol::DOM::Rect>& clipRect, OwnPtr<protocol::Array<protocol::Array<double>>>* timings) override;
+    void replaySnapshot(ErrorString*, const String& snapshotId, const Maybe<int>& fromStep, const Maybe<int>& toStep, const Maybe<double>& scale, String* dataURL) override;
     void snapshotCommandLog(ErrorString*, const String& snapshotId, OwnPtr<protocol::Array<RefPtr<JSONObject>>>* commandLog) override;
 
     // Called by other agents.
diff --git a/third_party/WebKit/Source/core/inspector/InspectorPageAgent.cpp b/third_party/WebKit/Source/core/inspector/InspectorPageAgent.cpp
index c3c4b9c..1bd4718d 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorPageAgent.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorPageAgent.cpp
@@ -416,13 +416,13 @@
     m_state->setBoolean(PageAgentState::autoAttachToCreatedPages, autoAttach);
 }
 
-void InspectorPageAgent::reload(ErrorString*, const OptionalValue<bool>& optionalIgnoreCache, const OptionalValue<String>& optionalScriptToEvaluateOnLoad)
+void InspectorPageAgent::reload(ErrorString*, const Maybe<bool>& optionalIgnoreCache, const Maybe<String>& optionalScriptToEvaluateOnLoad)
 {
-    m_pendingScriptToEvaluateOnLoadOnce = optionalScriptToEvaluateOnLoad.get("");
+    m_pendingScriptToEvaluateOnLoadOnce = optionalScriptToEvaluateOnLoad.fromMaybe("");
     ErrorString unused;
     m_debuggerAgent->setSkipAllPauses(&unused, true);
     m_reloading = true;
-    m_inspectedFrames->root()->reload(optionalIgnoreCache.get(false) ? FrameLoadTypeReloadFromOrigin : FrameLoadTypeReload, NotClientRedirect);
+    m_inspectedFrames->root()->reload(optionalIgnoreCache.fromMaybe(false) ? FrameLoadTypeReloadFromOrigin : FrameLoadTypeReload, NotClientRedirect);
 }
 
 void InspectorPageAgent::navigate(ErrorString*, const String& url, String* outFrameId)
@@ -559,13 +559,13 @@
     callback->sendSuccess(results.release());
 }
 
-void InspectorPageAgent::searchInResource(ErrorString*, const String& frameId, const String& url, const String& query, const OptionalValue<bool>& optionalCaseSensitive, const OptionalValue<bool>& optionalIsRegex, PassRefPtr<SearchInResourceCallback> callback)
+void InspectorPageAgent::searchInResource(ErrorString*, const String& frameId, const String& url, const String& query, const Maybe<bool>& optionalCaseSensitive, const Maybe<bool>& optionalIsRegex, PassRefPtr<SearchInResourceCallback> callback)
 {
     if (!m_enabled) {
         callback->sendFailure("Agent is not enabled.");
         return;
     }
-    m_inspectorResourceContentLoader->ensureResourcesContentLoaded(bind(&InspectorPageAgent::searchContentAfterResourcesContentLoaded, this, frameId, url, query, optionalCaseSensitive.get(false), optionalIsRegex.get(false), callback));
+    m_inspectorResourceContentLoader->ensureResourcesContentLoaded(bind(&InspectorPageAgent::searchContentAfterResourcesContentLoaded, this, frameId, url, query, optionalCaseSensitive.fromMaybe(false), optionalIsRegex.fromMaybe(false), callback));
 }
 
 void InspectorPageAgent::setDocumentContent(ErrorString* errorString, const String& frameId, const String& html)
@@ -767,7 +767,7 @@
     return result.release();
 }
 
-void InspectorPageAgent::startScreencast(ErrorString*, const OptionalValue<String>& format, const OptionalValue<int>& quality, const OptionalValue<int>& maxWidth, const OptionalValue<int>& maxHeight, const OptionalValue<int>& everyNthFrame)
+void InspectorPageAgent::startScreencast(ErrorString*, const Maybe<String>& format, const Maybe<int>& quality, const Maybe<int>& maxWidth, const Maybe<int>& maxHeight, const Maybe<int>& everyNthFrame)
 {
     m_state->setBoolean(PageAgentState::screencastEnabled, true);
 }
@@ -777,10 +777,10 @@
     m_state->setBoolean(PageAgentState::screencastEnabled, false);
 }
 
-void InspectorPageAgent::setOverlayMessage(ErrorString*, const OptionalValue<String>& message)
+void InspectorPageAgent::setOverlayMessage(ErrorString*, const Maybe<String>& message)
 {
     if (m_client)
-        m_client->setPausedInDebuggerMessage(message.get(String()));
+        m_client->setPausedInDebuggerMessage(message.fromMaybe(String()));
 }
 
 DEFINE_TRACE(InspectorPageAgent)
diff --git a/third_party/WebKit/Source/core/inspector/InspectorPageAgent.h b/third_party/WebKit/Source/core/inspector/InspectorPageAgent.h
index 273d7b3..6726841 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorPageAgent.h
+++ b/third_party/WebKit/Source/core/inspector/InspectorPageAgent.h
@@ -54,7 +54,7 @@
 
 typedef String ErrorString;
 
-using blink::protocol::OptionalValue;
+using blink::protocol::Maybe;
 
 class CORE_EXPORT InspectorPageAgent final : public InspectorBaseAgent<InspectorPageAgent, protocol::Frontend::Page>, public protocol::Dispatcher::PageCommandHandler {
     WTF_MAKE_NONCOPYABLE(InspectorPageAgent);
@@ -102,15 +102,15 @@
     void addScriptToEvaluateOnLoad(ErrorString*, const String& scriptSource, String* identifier) override;
     void removeScriptToEvaluateOnLoad(ErrorString*, const String& identifier) override;
     void setAutoAttachToCreatedPages(ErrorString*, bool autoAttach) override;
-    void reload(ErrorString*, const OptionalValue<bool>& ignoreCache, const OptionalValue<String>& scriptToEvaluateOnLoad) override;
+    void reload(ErrorString*, const Maybe<bool>& ignoreCache, const Maybe<String>& scriptToEvaluateOnLoad) override;
     void navigate(ErrorString*, const String& url, String* frameId) override;
     void getResourceTree(ErrorString*, OwnPtr<protocol::Page::FrameResourceTree>* frameTree) override;
     void getResourceContent(ErrorString*, const String& frameId, const String& url, PassRefPtr<GetResourceContentCallback>) override;
-    void searchInResource(ErrorString*, const String& frameId, const String& url, const String& query, const OptionalValue<bool>& caseSensitive, const OptionalValue<bool>& isRegex, PassRefPtr<SearchInResourceCallback>) override;
+    void searchInResource(ErrorString*, const String& frameId, const String& url, const String& query, const Maybe<bool>& caseSensitive, const Maybe<bool>& isRegex, PassRefPtr<SearchInResourceCallback>) override;
     void setDocumentContent(ErrorString*, const String& frameId, const String& html) override;
-    void startScreencast(ErrorString*, const OptionalValue<String>& format, const OptionalValue<int>& quality, const OptionalValue<int>& maxWidth, const OptionalValue<int>& maxHeight, const OptionalValue<int>& everyNthFrame) override;
+    void startScreencast(ErrorString*, const Maybe<String>& format, const Maybe<int>& quality, const Maybe<int>& maxWidth, const Maybe<int>& maxHeight, const Maybe<int>& everyNthFrame) override;
     void stopScreencast(ErrorString*) override;
-    void setOverlayMessage(ErrorString*, const OptionalValue<String>& message) override;
+    void setOverlayMessage(ErrorString*, const Maybe<String>& message) override;
 
     // InspectorInstrumentation API
     void didClearDocumentOfWindowObject(LocalFrame*);
diff --git a/third_party/WebKit/Source/core/inspector/InspectorResourceAgent.cpp b/third_party/WebKit/Source/core/inspector/InspectorResourceAgent.cpp
index 30e79b6..d133351 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorResourceAgent.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorResourceAgent.cpp
@@ -360,7 +360,7 @@
             responseObject->setRequestHeadersText(response.resourceLoadInfo()->requestHeadersText);
     }
 
-    AtomicString remoteIPAddress = response.remoteIPAddress();
+    String remoteIPAddress = response.remoteIPAddress();
     if (!remoteIPAddress.isEmpty()) {
         responseObject->setRemoteIPAddress(remoteIPAddress);
         responseObject->setRemotePort(response.remotePort());
diff --git a/third_party/WebKit/Source/core/inspector/InspectorRuntimeAgent.cpp b/third_party/WebKit/Source/core/inspector/InspectorRuntimeAgent.cpp
index 5dccda6..a213823 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorRuntimeAgent.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorRuntimeAgent.cpp
@@ -85,25 +85,25 @@
 
 void InspectorRuntimeAgent::evaluate(ErrorString* errorString,
     const String& expression,
-    const OptionalValue<String>& objectGroup,
-    const OptionalValue<bool>& includeCommandLineAPI,
-    const OptionalValue<bool>& doNotPauseOnExceptionsAndMuteConsole,
-    const OptionalValue<int>& optExecutionContextId,
-    const OptionalValue<bool>& returnByValue,
-    const OptionalValue<bool>& generatePreview,
+    const Maybe<String>& objectGroup,
+    const Maybe<bool>& includeCommandLineAPI,
+    const Maybe<bool>& doNotPauseOnExceptionsAndMuteConsole,
+    const Maybe<int>& optExecutionContextId,
+    const Maybe<bool>& returnByValue,
+    const Maybe<bool>& generatePreview,
     OwnPtr<protocol::Runtime::RemoteObject>* result,
-    OptionalValue<bool>* wasThrown,
-    OwnPtr<protocol::Runtime::ExceptionDetails>* exceptionDetails)
+    Maybe<bool>* wasThrown,
+    Maybe<protocol::Runtime::ExceptionDetails>* exceptionDetails)
 {
     int executionContextId;
-    if (optExecutionContextId.hasValue()) {
-        executionContextId = optExecutionContextId.get();
+    if (optExecutionContextId.isJust()) {
+        executionContextId = optExecutionContextId.fromJust();
     } else {
         v8::HandleScope handles(defaultScriptState()->isolate());
         executionContextId = m_v8RuntimeAgent->ensureDefaultContextAvailable(defaultScriptState()->context());
     }
     MuteConsoleScope<InspectorRuntimeAgent> muteScope;
-    if (doNotPauseOnExceptionsAndMuteConsole.get(false))
+    if (doNotPauseOnExceptionsAndMuteConsole.fromMaybe(false))
         muteScope.enter(this);
     m_v8RuntimeAgent->evaluate(errorString, expression, objectGroup, includeCommandLineAPI, doNotPauseOnExceptionsAndMuteConsole, executionContextId, returnByValue, generatePreview, result, wasThrown, exceptionDetails);
     TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "UpdateCounters", TRACE_EVENT_SCOPE_THREAD, "data", InspectorUpdateCountersEvent::data());
@@ -112,15 +112,15 @@
 void InspectorRuntimeAgent::callFunctionOn(ErrorString* errorString,
     const String& objectId,
     const String& expression,
-    PassOwnPtr<protocol::Array<protocol::Runtime::CallArgument>> optionalArguments,
-    const OptionalValue<bool>& doNotPauseOnExceptionsAndMuteConsole,
-    const OptionalValue<bool>& returnByValue,
-    const OptionalValue<bool>& generatePreview,
+    const Maybe<protocol::Array<protocol::Runtime::CallArgument>>& optionalArguments,
+    const Maybe<bool>& doNotPauseOnExceptionsAndMuteConsole,
+    const Maybe<bool>& returnByValue,
+    const Maybe<bool>& generatePreview,
     OwnPtr<protocol::Runtime::RemoteObject>* result,
-    OptionalValue<bool>* wasThrown)
+    Maybe<bool>* wasThrown)
 {
     MuteConsoleScope<InspectorRuntimeAgent> muteScope;
-    if (doNotPauseOnExceptionsAndMuteConsole.get(false))
+    if (doNotPauseOnExceptionsAndMuteConsole.fromMaybe(false))
         muteScope.enter(this);
     m_v8RuntimeAgent->callFunctionOn(errorString, objectId, expression, optionalArguments, doNotPauseOnExceptionsAndMuteConsole, returnByValue, generatePreview, result, wasThrown);
     TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "UpdateCounters", TRACE_EVENT_SCOPE_THREAD, "data", InspectorUpdateCountersEvent::data());
@@ -128,12 +128,12 @@
 
 void InspectorRuntimeAgent::getProperties(ErrorString* errorString,
     const String& objectId,
-    const OptionalValue<bool>& ownProperties,
-    const OptionalValue<bool>& accessorPropertiesOnly,
-    const OptionalValue<bool>& generatePreview,
+    const Maybe<bool>& ownProperties,
+    const Maybe<bool>& accessorPropertiesOnly,
+    const Maybe<bool>& generatePreview,
     OwnPtr<protocol::Array<protocol::Runtime::PropertyDescriptor>>* result,
-    OwnPtr<protocol::Array<protocol::Runtime::InternalPropertyDescriptor>>* internalProperties,
-    OwnPtr<protocol::Runtime::ExceptionDetails>* exceptionDetails)
+    Maybe<protocol::Array<protocol::Runtime::InternalPropertyDescriptor>>* internalProperties,
+    Maybe<protocol::Runtime::ExceptionDetails>* exceptionDetails)
 {
     MuteConsoleScope<InspectorRuntimeAgent> muteScope(this);
     m_v8RuntimeAgent->getProperties(errorString, objectId, ownProperties, accessorPropertiesOnly, generatePreview, result, internalProperties, exceptionDetails);
@@ -169,8 +169,8 @@
     const String& inSourceURL,
     bool inPersistScript,
     int inExecutionContextId,
-    OptionalValue<protocol::Runtime::ScriptId>* optOutScriptId,
-    OwnPtr<protocol::Runtime::ExceptionDetails>* optOutExceptionDetails)
+    Maybe<protocol::Runtime::ScriptId>* optOutScriptId,
+    Maybe<protocol::Runtime::ExceptionDetails>* optOutExceptionDetails)
 {
     m_v8RuntimeAgent->compileScript(errorString, inExpression, inSourceURL, inPersistScript, inExecutionContextId, optOutScriptId, optOutExceptionDetails);
 }
@@ -178,14 +178,14 @@
 void InspectorRuntimeAgent::runScript(ErrorString* errorString,
     const String& inScriptId,
     int inExecutionContextId,
-    const OptionalValue<String>& inObjectGroup,
-    const OptionalValue<bool>& inDoNotPauseOnExceptionsAndMuteConsole,
-    const OptionalValue<bool>& includeCommandLineAPI,
+    const Maybe<String>& inObjectGroup,
+    const Maybe<bool>& inDoNotPauseOnExceptionsAndMuteConsole,
+    const Maybe<bool>& includeCommandLineAPI,
     OwnPtr<protocol::Runtime::RemoteObject>* outResult,
-    OwnPtr<protocol::Runtime::ExceptionDetails>* optOutExceptionDetails)
+    Maybe<protocol::Runtime::ExceptionDetails>* optOutExceptionDetails)
 {
     MuteConsoleScope<InspectorRuntimeAgent> muteScope;
-    if (inDoNotPauseOnExceptionsAndMuteConsole.get(false))
+    if (inDoNotPauseOnExceptionsAndMuteConsole.fromMaybe(false))
         muteScope.enter(this);
     m_v8RuntimeAgent->runScript(errorString, inScriptId, inExecutionContextId, inObjectGroup, inDoNotPauseOnExceptionsAndMuteConsole, includeCommandLineAPI, outResult, optOutExceptionDetails);
 }
diff --git a/third_party/WebKit/Source/core/inspector/InspectorRuntimeAgent.h b/third_party/WebKit/Source/core/inspector/InspectorRuntimeAgent.h
index 48f8a4da..4e222e9 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorRuntimeAgent.h
+++ b/third_party/WebKit/Source/core/inspector/InspectorRuntimeAgent.h
@@ -47,7 +47,7 @@
 
 typedef String ErrorString;
 
-using protocol::OptionalValue;
+using protocol::Maybe;
 
 class CORE_EXPORT InspectorRuntimeAgent
     : public InspectorBaseAgent<InspectorRuntimeAgent, protocol::Frontend::Runtime>
@@ -71,9 +71,9 @@
     void restore() override;
 
     // Part of the protocol.
-    void evaluate(ErrorString*, const String& expression, const OptionalValue<String>& objectGroup, const OptionalValue<bool>& includeCommandLineAPI, const OptionalValue<bool>& doNotPauseOnExceptionsAndMuteConsole, const OptionalValue<int>& contextId, const OptionalValue<bool>& returnByValue, const OptionalValue<bool>& generatePreview, OwnPtr<protocol::Runtime::RemoteObject>* result, OptionalValue<bool>* wasThrown, OwnPtr<protocol::Runtime::ExceptionDetails>*) override;
-    void callFunctionOn(ErrorString*, const String& objectId, const String& functionDeclaration, PassOwnPtr<protocol::Array<protocol::Runtime::CallArgument>> arguments, const OptionalValue<bool>& doNotPauseOnExceptionsAndMuteConsole, const OptionalValue<bool>& returnByValue, const OptionalValue<bool>& generatePreview, OwnPtr<protocol::Runtime::RemoteObject>* result, OptionalValue<bool>* wasThrown) override;
-    void getProperties(ErrorString*, const String& objectId, const OptionalValue<bool>& ownProperties, const OptionalValue<bool>& accessorPropertiesOnly, const OptionalValue<bool>& generatePreview, OwnPtr<protocol::Array<protocol::Runtime::PropertyDescriptor>>* result, OwnPtr<protocol::Array<protocol::Runtime::InternalPropertyDescriptor>>* internalProperties, OwnPtr<protocol::Runtime::ExceptionDetails>*) override;
+    void evaluate(ErrorString*, const String& expression, const Maybe<String>& objectGroup, const Maybe<bool>& includeCommandLineAPI, const Maybe<bool>& doNotPauseOnExceptionsAndMuteConsole, const Maybe<int>& contextId, const Maybe<bool>& returnByValue, const Maybe<bool>& generatePreview, OwnPtr<protocol::Runtime::RemoteObject>* result, Maybe<bool>* wasThrown, Maybe<protocol::Runtime::ExceptionDetails>*) override;
+    void callFunctionOn(ErrorString*, const String& objectId, const String& functionDeclaration, const Maybe<protocol::Array<protocol::Runtime::CallArgument>>& arguments, const Maybe<bool>& doNotPauseOnExceptionsAndMuteConsole, const Maybe<bool>& returnByValue, const Maybe<bool>& generatePreview, OwnPtr<protocol::Runtime::RemoteObject>* result, Maybe<bool>* wasThrown) override;
+    void getProperties(ErrorString*, const String& objectId, const Maybe<bool>& ownProperties, const Maybe<bool>& accessorPropertiesOnly, const Maybe<bool>& generatePreview, OwnPtr<protocol::Array<protocol::Runtime::PropertyDescriptor>>* result, Maybe<protocol::Array<protocol::Runtime::InternalPropertyDescriptor>>* internalProperties, Maybe<protocol::Runtime::ExceptionDetails>*) override;
     void releaseObject(ErrorString*, const String& objectId) override;
     void releaseObjectGroup(ErrorString*, const String& objectGroup) override;
     void run(ErrorString*) override;
@@ -81,8 +81,8 @@
     void disable(ErrorString*) override;
     void isRunRequired(ErrorString*, bool* result) override;
     void setCustomObjectFormatterEnabled(ErrorString*, bool enabled) override;
-    void compileScript(ErrorString*, const String& expression, const String& sourceURL, bool persistScript, int executionContextId, OptionalValue<String>* scriptId, OwnPtr<protocol::Runtime::ExceptionDetails>*) override;
-    void runScript(ErrorString*, const String& scriptId, int executionContextId, const OptionalValue<String>& objectGroup, const OptionalValue<bool>& doNotPauseOnExceptionsAndMuteConsole, const OptionalValue<bool>& includeCommandLineAPI, OwnPtr<protocol::Runtime::RemoteObject>* result, OwnPtr<protocol::Runtime::ExceptionDetails>*) override;
+    void compileScript(ErrorString*, const String& expression, const String& sourceURL, bool persistScript, int executionContextId, Maybe<String>* scriptId, Maybe<protocol::Runtime::ExceptionDetails>*) override;
+    void runScript(ErrorString*, const String& scriptId, int executionContextId, const Maybe<String>& objectGroup, const Maybe<bool>& doNotPauseOnExceptionsAndMuteConsole, const Maybe<bool>& includeCommandLineAPI, OwnPtr<protocol::Runtime::RemoteObject>* result, Maybe<protocol::Runtime::ExceptionDetails>*) override;
 
     virtual void muteConsole() = 0;
     virtual void unmuteConsole() = 0;
diff --git a/third_party/WebKit/Source/core/inspector/InspectorTracingAgent.cpp b/third_party/WebKit/Source/core/inspector/InspectorTracingAgent.cpp
index 2913cc83..31ab3dc 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorTracingAgent.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorTracingAgent.cpp
@@ -44,15 +44,15 @@
     emitMetadataEvents();
 }
 void InspectorTracingAgent::start(ErrorString*,
-    const OptionalValue<String>& categories,
-    const OptionalValue<String>& options,
-    const OptionalValue<double>& bufferUsageReportingInterval,
-    const OptionalValue<String>& transferMode,
+    const Maybe<String>& categories,
+    const Maybe<String>& options,
+    const Maybe<double>& bufferUsageReportingInterval,
+    const Maybe<String>& transferMode,
     PassRefPtr<StartCallback> callback)
 {
     ASSERT(sessionId().isEmpty());
     m_state->setString(TracingAgentState::sessionId, IdentifiersFactory::createIdentifier());
-    m_client->enableTracing(categories.get(String()));
+    m_client->enableTracing(categories.fromMaybe(String()));
     emitMetadataEvents();
     callback->sendSuccess();
 }
diff --git a/third_party/WebKit/Source/core/inspector/InspectorTracingAgent.h b/third_party/WebKit/Source/core/inspector/InspectorTracingAgent.h
index 2b3740e..0c0b3c4 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorTracingAgent.h
+++ b/third_party/WebKit/Source/core/inspector/InspectorTracingAgent.h
@@ -42,7 +42,7 @@
     void disable(ErrorString*) override;
 
     // Protocol method implementations.
-    void start(ErrorString*, const OptionalValue<String>& categories, const OptionalValue<String>& options, const OptionalValue<double>& bufferUsageReportingInterval, const OptionalValue<String>& transferMode, PassRefPtr<StartCallback>) override;
+    void start(ErrorString*, const Maybe<String>& categories, const Maybe<String>& options, const Maybe<double>& bufferUsageReportingInterval, const Maybe<String>& transferMode, PassRefPtr<StartCallback>) override;
     void end(ErrorString*, PassRefPtr<EndCallback>) override;
 
     // Methods for other agents to use.
diff --git a/third_party/WebKit/Source/core/layout/LayoutInline.cpp b/third_party/WebKit/Source/core/layout/LayoutInline.cpp
index 0fcce8b1..b73476f 100644
--- a/third_party/WebKit/Source/core/layout/LayoutInline.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutInline.cpp
@@ -194,6 +194,8 @@
         }
         setAlwaysCreateLineBoxes(alwaysCreateLineBoxesNew);
     }
+
+    propagateStyleToAnonymousChildren(true);
 }
 
 void LayoutInline::updateAlwaysCreateLineBoxes(bool fullLayout)
diff --git a/third_party/WebKit/Source/core/layout/LayoutTreeAsText.cpp b/third_party/WebKit/Source/core/layout/LayoutTreeAsText.cpp
index 238d82d..9dba98b8 100644
--- a/third_party/WebKit/Source/core/layout/LayoutTreeAsText.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutTreeAsText.cpp
@@ -106,7 +106,7 @@
 {
     if (n->isDocumentNode())
         return "";
-    if (n->nodeType() == Node::COMMENT_NODE)
+    if (n->getNodeType() == Node::COMMENT_NODE)
         return "COMMENT";
     return n->nodeName();
 }
diff --git a/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp b/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
index 73e56f6..06aef60 100644
--- a/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
+++ b/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
@@ -103,7 +103,7 @@
         if (!request.didSetHTTPReferrer()) {
             ASSERT(m_document);
             outgoingOrigin = m_document->securityOrigin();
-            request.setHTTPReferrer(SecurityPolicy::generateReferrer(m_document->referrerPolicy(), request.url(), m_document->outgoingReferrer()));
+            request.setHTTPReferrer(SecurityPolicy::generateReferrer(m_document->getReferrerPolicy(), request.url(), m_document->outgoingReferrer()));
         } else {
             RELEASE_ASSERT(SecurityPolicy::generateReferrer(request.referrerPolicy(), request.url(), request.httpReferrer()).referrer == request.httpReferrer());
             outgoingOrigin = SecurityOrigin::createFromString(request.httpReferrer());
@@ -654,7 +654,7 @@
     if (fetchRequest.resourceRequest().frameType() != WebURLRequest::FrameTypeNone)
         fetchRequest.mutableResourceRequest().addHTTPHeaderField("Upgrade-Insecure-Requests", "1");
 
-    if (m_document && m_document->insecureRequestsPolicy() == SecurityContext::InsecureRequestsUpgrade && url.protocolIs("http")) {
+    if (m_document && m_document->getInsecureRequestsPolicy() == SecurityContext::InsecureRequestsUpgrade && url.protocolIs("http")) {
         ASSERT(m_document->insecureNavigationsToUpgrade());
 
         // We always upgrade requests that meet any of the following criteria:
diff --git a/third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp b/third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp
index 8f51fa411..758f798 100644
--- a/third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp
+++ b/third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp
@@ -82,7 +82,7 @@
     DEFINE_INLINE_VIRTUAL_TRACE() { FrameOwner::trace(visitor); }
 
     bool isLocal() const override { return false; }
-    SandboxFlags sandboxFlags() const override { return SandboxNone; }
+    SandboxFlags getSandboxFlags() const override { return SandboxNone; }
     void dispatchLoad() override { }
     void renderFallbackContent() override { }
     ScrollbarMode scrollingMode() const override { return ScrollbarAuto; }
diff --git a/third_party/WebKit/Source/core/loader/FrameLoader.cpp b/third_party/WebKit/Source/core/loader/FrameLoader.cpp
index 038cf60a8..9b54797f9 100644
--- a/third_party/WebKit/Source/core/loader/FrameLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/FrameLoader.cpp
@@ -147,7 +147,7 @@
     // therefore show the current document's url as the referrer.
     if (clientRedirectPolicy == ClientRedirect) {
         request.setHTTPReferrer(Referrer(m_frame->document()->outgoingReferrer(),
-            m_frame->document()->referrerPolicy()));
+            m_frame->document()->getReferrerPolicy()));
     }
 
     if (!overrideURL.isEmpty()) {
@@ -742,7 +742,7 @@
     // Always use the initiating document to generate the referrer.
     // We need to generateReferrer(), because we haven't enforced ReferrerPolicy or https->http
     // referrer suppression yet.
-    Referrer referrer = SecurityPolicy::generateReferrer(originDocument->referrerPolicy(), request.url(), originDocument->outgoingReferrer());
+    Referrer referrer = SecurityPolicy::generateReferrer(originDocument->getReferrerPolicy(), request.url(), originDocument->outgoingReferrer());
 
     request.setHTTPReferrer(referrer);
     RefPtr<SecurityOrigin> referrerOrigin = SecurityOrigin::createFromString(referrer.referrer);
@@ -1520,10 +1520,10 @@
 {
     SandboxFlags flags = m_forcedSandboxFlags;
     if (FrameOwner* frameOwner = m_frame->owner())
-        flags |= frameOwner->sandboxFlags();
+        flags |= frameOwner->getSandboxFlags();
     // Frames need to inherit the sandbox flags of their parent frame.
     if (Frame* parentFrame = m_frame->tree().parent())
-        flags |= parentFrame->securityContext()->sandboxFlags();
+        flags |= parentFrame->securityContext()->getSandboxFlags();
     return flags;
 }
 
@@ -1536,7 +1536,7 @@
     return parentFrame->securityContext()->shouldEnforceStrictMixedContentChecking();
 }
 
-SecurityContext::InsecureRequestsPolicy FrameLoader::insecureRequestsPolicy() const
+SecurityContext::InsecureRequestsPolicy FrameLoader::getInsecureRequestsPolicy() const
 {
     Frame* parentFrame = m_frame->tree().parent();
     if (!parentFrame)
@@ -1548,7 +1548,7 @@
         return SecurityContext::InsecureRequestsDoNotUpgrade;
 
     ASSERT(toLocalFrame(parentFrame)->document());
-    return toLocalFrame(parentFrame)->document()->insecureRequestsPolicy();
+    return toLocalFrame(parentFrame)->document()->getInsecureRequestsPolicy();
 }
 
 SecurityContext::InsecureNavigationsSet* FrameLoader::insecureNavigationsToUpgrade() const
diff --git a/third_party/WebKit/Source/core/loader/FrameLoader.h b/third_party/WebKit/Source/core/loader/FrameLoader.h
index b99538f3..7ff5199 100644
--- a/third_party/WebKit/Source/core/loader/FrameLoader.h
+++ b/third_party/WebKit/Source/core/loader/FrameLoader.h
@@ -144,7 +144,7 @@
 
     bool shouldEnforceStrictMixedContentChecking() const;
 
-    SecurityContext::InsecureRequestsPolicy insecureRequestsPolicy() const;
+    SecurityContext::InsecureRequestsPolicy getInsecureRequestsPolicy() const;
     SecurityContext::InsecureNavigationsSet* insecureNavigationsToUpgrade() const;
 
     Frame* opener();
diff --git a/third_party/WebKit/Source/core/loader/PrerenderHandle.cpp b/third_party/WebKit/Source/core/loader/PrerenderHandle.cpp
index c4f479c..a08c27cc 100644
--- a/third_party/WebKit/Source/core/loader/PrerenderHandle.cpp
+++ b/third_party/WebKit/Source/core/loader/PrerenderHandle.cpp
@@ -48,7 +48,7 @@
     if (!document.frame())
         return nullptr;
 
-    RefPtr<Prerender> prerender = Prerender::create(client, url, prerenderRelTypes, SecurityPolicy::generateReferrer(document.referrerPolicy(), url, document.outgoingReferrer()));
+    RefPtr<Prerender> prerender = Prerender::create(client, url, prerenderRelTypes, SecurityPolicy::generateReferrer(document.getReferrerPolicy(), url, document.outgoingReferrer()));
 
     PrerendererClient* prerendererClient = PrerendererClient::from(document.page());
     if (prerendererClient)
diff --git a/third_party/WebKit/Source/core/loader/WorkerThreadableLoader.cpp b/third_party/WebKit/Source/core/loader/WorkerThreadableLoader.cpp
index e109d21b..14795d1 100644
--- a/third_party/WebKit/Source/core/loader/WorkerThreadableLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/WorkerThreadableLoader.cpp
@@ -149,7 +149,7 @@
 
 void WorkerThreadableLoader::MainThreadBridgeBase::startInMainThread(const ResourceRequest& request, const WorkerGlobalScope& workerGlobalScope)
 {
-    loaderProxy()->postTaskToLoader(createCrossThreadTask(&MainThreadBridgeBase::mainThreadStart, this, request, workerGlobalScope.referrerPolicy(), workerGlobalScope.url().strippedForUseAsReferrer()));
+    loaderProxy()->postTaskToLoader(createCrossThreadTask(&MainThreadBridgeBase::mainThreadStart, this, request, workerGlobalScope.getReferrerPolicy(), workerGlobalScope.url().strippedForUseAsReferrer()));
 }
 
 void WorkerThreadableLoader::MainThreadBridgeBase::mainThreadDestroy(ExecutionContext* context)
diff --git a/third_party/WebKit/Source/core/page/CreateWindow.cpp b/third_party/WebKit/Source/core/page/CreateWindow.cpp
index a0196b6..9649f0f 100644
--- a/third_party/WebKit/Source/core/page/CreateWindow.cpp
+++ b/third_party/WebKit/Source/core/page/CreateWindow.cpp
@@ -116,7 +116,7 @@
     host->chromeClient().show(policy);
 
     if (openerFrame.document()->isSandboxed(SandboxPropagatesToAuxiliaryBrowsingContexts))
-        frame.loader().forceSandboxFlags(openerFrame.securityContext()->sandboxFlags());
+        frame.loader().forceSandboxFlags(openerFrame.securityContext()->getSandboxFlags());
 
     // This call may suspend the execution by running nested message loop.
     InspectorInstrumentation::windowCreated(&openerFrame, &frame);
@@ -146,7 +146,7 @@
     // that it eventually enters FrameLoader as an embedder-initiated navigation. FrameLoader
     // assumes no responsibility for generating an embedder-initiated navigation's referrer,
     // so we need to ensure the proper referrer is set now.
-    frameRequest.resourceRequest().setHTTPReferrer(SecurityPolicy::generateReferrer(activeFrame->document()->referrerPolicy(), completedURL, activeFrame->document()->outgoingReferrer()));
+    frameRequest.resourceRequest().setHTTPReferrer(SecurityPolicy::generateReferrer(activeFrame->document()->getReferrerPolicy(), completedURL, activeFrame->document()->outgoingReferrer()));
 
     // Records HasUserGesture before the value is invalidated inside createWindow(LocalFrame& openerFrame, ...).
     // This value will be set in ResourceRequest loaded in a new LocalFrame.
@@ -196,7 +196,7 @@
     if (shouldSendReferrer == MaybeSendReferrer) {
         // TODO(japhet): Does ReferrerPolicy need to be proagated for RemoteFrames?
         if (newFrame->isLocalFrame())
-            toLocalFrame(newFrame)->document()->setReferrerPolicy(openerFrame.document()->referrerPolicy());
+            toLocalFrame(newFrame)->document()->setReferrerPolicy(openerFrame.document()->getReferrerPolicy());
     }
 
     // TODO(japhet): Form submissions on RemoteFrames don't work yet.
diff --git a/third_party/WebKit/Source/core/style/ComputedStyle.h b/third_party/WebKit/Source/core/style/ComputedStyle.h
index 142975a..a350041 100644
--- a/third_party/WebKit/Source/core/style/ComputedStyle.h
+++ b/third_party/WebKit/Source/core/style/ComputedStyle.h
@@ -140,6 +140,7 @@
     friend class CachedUAStyle; // Saves Border/Background information for later comparison.
     friend class ColorPropertyFunctions; // Reads initial style values and accesses visited and unvisited colors.
     friend class LengthPropertyFunctions; // Reads initial style values.
+    friend class LengthListPropertyFunctions; // Reads initial style values.
     friend class NumberPropertyFunctions; // Reads initial style values.
     friend class PaintPropertyFunctions; // Reads initial style values.
 
diff --git a/third_party/WebKit/Source/core/xml/DocumentXSLT.cpp b/third_party/WebKit/Source/core/xml/DocumentXSLT.cpp
index 9b5126b..d5d6ee6 100644
--- a/third_party/WebKit/Source/core/xml/DocumentXSLT.cpp
+++ b/third_party/WebKit/Source/core/xml/DocumentXSLT.cpp
@@ -130,7 +130,7 @@
 ProcessingInstruction* DocumentXSLT::findXSLStyleSheet(Document& document)
 {
     for (Node* node = document.firstChild(); node; node = node->nextSibling()) {
-        if (node->nodeType() != Node::PROCESSING_INSTRUCTION_NODE)
+        if (node->getNodeType() != Node::PROCESSING_INSTRUCTION_NODE)
             continue;
 
         ProcessingInstruction* pi = toProcessingInstruction(node);
diff --git a/third_party/WebKit/Source/core/xml/XPathFunctions.cpp b/third_party/WebKit/Source/core/xml/XPathFunctions.cpp
index ea274226..791dbc1d 100644
--- a/third_party/WebKit/Source/core/xml/XPathFunctions.cpp
+++ b/third_party/WebKit/Source/core/xml/XPathFunctions.cpp
@@ -364,7 +364,7 @@
 {
     // The local part of an XPath expanded-name matches DOM local name for most node types, except for namespace nodes and processing instruction nodes.
     // But note that Blink does not support namespace nodes.
-    switch (node->nodeType()) {
+    switch (node->getNodeType()) {
     case Node::ELEMENT_NODE:
         return toElement(node)->localName();
     case Node::ATTRIBUTE_NODE:
@@ -378,7 +378,7 @@
 
 static inline String expandedNamespaceURI(Node* node)
 {
-    switch (node->nodeType()) {
+    switch (node->getNodeType()) {
     case Node::ELEMENT_NODE:
         return toElement(node)->namespaceURI();
     case Node::ATTRIBUTE_NODE:
@@ -392,7 +392,7 @@
 {
     AtomicString prefix;
 
-    switch (node->nodeType()) {
+    switch (node->getNodeType()) {
     case Node::ELEMENT_NODE:
         prefix = toElement(node)->prefix();
         break;
diff --git a/third_party/WebKit/Source/core/xml/XPathPath.cpp b/third_party/WebKit/Source/core/xml/XPathPath.cpp
index bafecad8..554b4b7 100644
--- a/third_party/WebKit/Source/core/xml/XPathPath.cpp
+++ b/third_party/WebKit/Source/core/xml/XPathPath.cpp
@@ -111,7 +111,7 @@
     // This is for compatibility with Firefox, and also seems like a more
     // logical treatment of where you would expect the "root" to be.
     Node* context = evaluationContext.node.get();
-    if (m_absolute && context->nodeType() != Node::DOCUMENT_NODE)  {
+    if (m_absolute && context->getNodeType() != Node::DOCUMENT_NODE)  {
         if (context->inDocument())
             context = context->ownerDocument();
         else
diff --git a/third_party/WebKit/Source/core/xml/XPathStep.cpp b/third_party/WebKit/Source/core/xml/XPathStep.cpp
index 043fc3b1..4ff5915 100644
--- a/third_party/WebKit/Source/core/xml/XPathStep.cpp
+++ b/third_party/WebKit/Source/core/xml/XPathStep.cpp
@@ -169,14 +169,14 @@
 {
     switch (nodeTest.kind()) {
     case Step::NodeTest::TextNodeTest: {
-        Node::NodeType type = node->nodeType();
+        Node::NodeType type = node->getNodeType();
         return type == Node::TEXT_NODE || type == Node::CDATA_SECTION_NODE;
     }
     case Step::NodeTest::CommentNodeTest:
-        return node->nodeType() == Node::COMMENT_NODE;
+        return node->getNodeType() == Node::COMMENT_NODE;
     case Step::NodeTest::ProcessingInstructionNodeTest: {
         const AtomicString& name = nodeTest.data();
-        return node->nodeType() == Node::PROCESSING_INSTRUCTION_NODE && (name.isEmpty() || node->nodeName() == name);
+        return node->getNodeType() == Node::PROCESSING_INSTRUCTION_NODE && (name.isEmpty() || node->nodeName() == name);
     }
     case Step::NodeTest::AnyNodeTest:
         return true;
@@ -307,7 +307,7 @@
     }
 
     case FollowingSiblingAxis:
-        if (context->nodeType() == Node::ATTRIBUTE_NODE)
+        if (context->getNodeType() == Node::ATTRIBUTE_NODE)
             return;
 
         for (Node* n = context->nextSibling(); n; n = n->nextSibling()) {
@@ -317,7 +317,7 @@
         return;
 
     case PrecedingSiblingAxis:
-        if (context->nodeType() == Node::ATTRIBUTE_NODE)
+        if (context->getNodeType() == Node::ATTRIBUTE_NODE)
             return;
 
         for (Node* n = context->previousSibling(); n; n = n->previousSibling()) {
diff --git a/third_party/WebKit/Source/core/xml/XPathUtil.cpp b/third_party/WebKit/Source/core/xml/XPathUtil.cpp
index 3202818..66229f2 100644
--- a/third_party/WebKit/Source/core/xml/XPathUtil.cpp
+++ b/third_party/WebKit/Source/core/xml/XPathUtil.cpp
@@ -40,7 +40,7 @@
 
 String stringValue(Node* node)
 {
-    switch (node->nodeType()) {
+    switch (node->getNodeType()) {
     case Node::ATTRIBUTE_NODE:
     case Node::PROCESSING_INSTRUCTION_NODE:
     case Node::COMMENT_NODE:
@@ -70,7 +70,7 @@
 {
     if (!node)
         return false;
-    switch (node->nodeType()) {
+    switch (node->getNodeType()) {
     case Node::ATTRIBUTE_NODE:
     case Node::CDATA_SECTION_NODE:
     case Node::COMMENT_NODE:
diff --git a/third_party/WebKit/Source/core/xml/parser/XMLDocumentParser.cpp b/third_party/WebKit/Source/core/xml/parser/XMLDocumentParser.cpp
index 2d87cd5..4f48699 100644
--- a/third_party/WebKit/Source/core/xml/parser/XMLDocumentParser.cpp
+++ b/third_party/WebKit/Source/core/xml/parser/XMLDocumentParser.cpp
@@ -1036,13 +1036,13 @@
     TrackExceptionState exceptionState;
     handleNamespaceAttributes(prefixedAttributes, libxmlNamespaces, nbNamespaces, exceptionState);
     if (exceptionState.hadException()) {
-        setAttributes(newElement.get(), prefixedAttributes, parserContentPolicy());
+        setAttributes(newElement.get(), prefixedAttributes, getParserContentPolicy());
         stopParsing();
         return;
     }
 
     handleElementAttributes(prefixedAttributes, libxmlAttributes, nbAttributes, m_prefixToNamespaceMap, exceptionState);
-    setAttributes(newElement.get(), prefixedAttributes, parserContentPolicy());
+    setAttributes(newElement.get(), prefixedAttributes, getParserContentPolicy());
     if (exceptionState.hadException()) {
         stopParsing();
         return;
@@ -1096,7 +1096,7 @@
     if (m_currentNode->isElementNode())
         toElement(n.get())->finishParsingChildren();
 
-    if (!scriptingContentIsAllowed(parserContentPolicy()) && n->isElementNode() && toScriptLoaderIfPossible(toElement(n))) {
+    if (!scriptingContentIsAllowed(getParserContentPolicy()) && n->isElementNode() && toScriptLoaderIfPossible(toElement(n))) {
         popCurrentNode();
         n->remove(IGNORE_EXCEPTION);
         return;
diff --git a/third_party/WebKit/Source/devtools/devtools.gypi b/third_party/WebKit/Source/devtools/devtools.gypi
index c5c315c..4bed2ef 100644
--- a/third_party/WebKit/Source/devtools/devtools.gypi
+++ b/third_party/WebKit/Source/devtools/devtools.gypi
@@ -91,7 +91,6 @@
             'front_end/components/objectValue.css',
             'front_end/components/CustomPreviewSection.js',
             'front_end/components/DataSaverInfobar.js',
-            'front_end/components/DebuggerPresentationUtils.js',
             'front_end/components/DockController.js',
             'front_end/components/DOMBreakpointsSidebarPane.js',
             'front_end/components/DOMPresentationUtils.js',
diff --git a/third_party/WebKit/Source/devtools/front_end/bindings/DebuggerWorkspaceBinding.js b/third_party/WebKit/Source/devtools/front_end/bindings/DebuggerWorkspaceBinding.js
index e16ade88..2505306 100644
--- a/third_party/WebKit/Source/devtools/front_end/bindings/DebuggerWorkspaceBinding.js
+++ b/third_party/WebKit/Source/devtools/front_end/bindings/DebuggerWorkspaceBinding.js
@@ -134,6 +134,19 @@
     },
 
     /**
+     * @param {!Array<!WebInspector.DebuggerModel.Location>} rawLocations
+     * @param {function(!WebInspector.LiveLocation)} updateDelegate
+     * @return {!WebInspector.LiveLocation}
+     */
+    createStackTraceTopFrameLiveLocation: function(rawLocations, updateDelegate)
+    {
+        console.assert(rawLocations.length);
+        var location = new WebInspector.DebuggerWorkspaceBinding.StackTraceTopFrameLocation(rawLocations, this, updateDelegate);
+        location.update();
+        return location;
+    },
+
+    /**
      * @param {!WebInspector.DebuggerModel.CallFrame} callFrame
      * @param {function(!WebInspector.LiveLocation)} updateDelegate
      * @return {!WebInspector.DebuggerWorkspaceBinding.Location}
@@ -480,7 +493,7 @@
     },
 
     /**
-     * @param {!WebInspector.DebuggerWorkspaceBinding.Location} location
+     * @param {!WebInspector.LiveLocation} location
      */
     _addLocation: function(location)
     {
@@ -489,7 +502,7 @@
     },
 
     /**
-     * @param {!WebInspector.DebuggerWorkspaceBinding.Location} location
+     * @param {!WebInspector.LiveLocation} location
      */
     _removeLocation: function(location)
     {
@@ -544,6 +557,9 @@
         return this._binding.rawLocationToUILocation(debuggerModelLocation);
     },
 
+    /**
+     * @override
+     */
     dispose: function()
     {
         WebInspector.LiveLocation.prototype.dispose.call(this);
@@ -563,6 +579,81 @@
 }
 
 /**
+ * @constructor
+ * @extends {WebInspector.LiveLocation}
+ * @param {!Array<!WebInspector.DebuggerModel.Location>} rawLocations
+ * @param {!WebInspector.DebuggerWorkspaceBinding} binding
+ * @param {function(!WebInspector.LiveLocation)} updateDelegate
+ */
+WebInspector.DebuggerWorkspaceBinding.StackTraceTopFrameLocation = function(rawLocations, binding, updateDelegate)
+{
+    WebInspector.LiveLocation.call(this, updateDelegate);
+
+    this._updateScheduled = true;
+    /** @type {!Array<!WebInspector.DebuggerWorkspaceBinding.Location>} */
+    this._locations = [];
+    for (var location of rawLocations)
+        this._locations.push(binding.createLiveLocation(location, this._scheduleUpdate.bind(this)));
+    this._updateLocation();
+}
+
+WebInspector.DebuggerWorkspaceBinding.StackTraceTopFrameLocation.prototype = {
+    /**
+     * @override
+     * @return {!WebInspector.UILocation}
+     */
+    uiLocation: function()
+    {
+        return this._currentLocation().uiLocation();
+    },
+
+    /**
+     * @override
+     */
+    dispose: function()
+    {
+        for (var location of this._locations)
+            location.dispose();
+    },
+
+    /**
+     * @override
+     * @return {boolean}
+     */
+    isBlackboxed: function()
+    {
+        return this._currentLocation().isBlackboxed();
+    },
+
+    _scheduleUpdate: function()
+    {
+        if (!this._updateScheduled) {
+            this._updateScheduled = true;
+            setImmediate(this._updateLocation.bind(this));
+        }
+    },
+
+    /**
+     * @return {!WebInspector.DebuggerWorkspaceBinding.Location}
+     */
+    _currentLocation: function()
+    {
+        return this._locations[this._current < this._locations.length ? this._current : 0];
+    },
+
+    _updateLocation: function()
+    {
+        this._updateScheduled = false;
+        this._current = 0;
+        while (this._current < this._locations.length && this._locations[this._current].isBlackboxed())
+            ++this._current;
+        this.update();
+    },
+
+    __proto__: WebInspector.LiveLocation.prototype
+}
+
+/**
  * @interface
  */
 WebInspector.DebuggerSourceMapping = function()
diff --git a/third_party/WebKit/Source/devtools/front_end/components/DebuggerPresentationUtils.js b/third_party/WebKit/Source/devtools/front_end/components/DebuggerPresentationUtils.js
deleted file mode 100644
index 83700e8a..0000000
--- a/third_party/WebKit/Source/devtools/front_end/components/DebuggerPresentationUtils.js
+++ /dev/null
@@ -1,44 +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.
-
-WebInspector.DebuggerPresentationUtils = {}
-
-/**
- * @param {?WebInspector.DebuggerModel} debuggerModel
- * @param {!RuntimeAgent.StackTrace=} stackTrace
- * @param {boolean=} showBlackboxed
- * @return {?RuntimeAgent.CallFrame}
- */
-WebInspector.DebuggerPresentationUtils.callFrameAnchorFromStackTrace = function(debuggerModel, stackTrace, showBlackboxed)
-{
-    /**
-     * @param {!Array.<!RuntimeAgent.CallFrame>} callFrames
-     * @return {?RuntimeAgent.CallFrame}
-     */
-    function innerCallFrameAnchorFromStackTrace(callFrames)
-    {
-        if (!callFrames.length)
-            return null;
-        if (showBlackboxed)
-            return callFrames[0];
-        for (var callFrame of callFrames) {
-            var location = debuggerModel && debuggerModel.createRawLocationByScriptId(callFrame.scriptId, callFrame.lineNumber, callFrame.columnNumber);
-            var blackboxed = location ?
-                WebInspector.blackboxManager.isBlackboxedRawLocation(location) :
-                WebInspector.blackboxManager.isBlackboxedURL(callFrame.url);
-            if (!blackboxed)
-                return callFrame;
-        }
-        return null;
-    }
-
-    var asyncStackTrace = stackTrace;
-    while (asyncStackTrace) {
-        var callFrame = innerCallFrameAnchorFromStackTrace(asyncStackTrace.callFrames);
-        if (callFrame)
-            return callFrame;
-        asyncStackTrace = asyncStackTrace.parent;
-    }
-    return stackTrace && stackTrace.callFrames.length ? stackTrace.callFrames[0] : null;
-}
diff --git a/third_party/WebKit/Source/devtools/front_end/components/Linkifier.js b/third_party/WebKit/Source/devtools/front_end/components/Linkifier.js
index ef8b82740..439eefdb 100644
--- a/third_party/WebKit/Source/devtools/front_end/components/Linkifier.js
+++ b/third_party/WebKit/Source/devtools/front_end/components/Linkifier.js
@@ -200,10 +200,34 @@
      */
     linkifyConsoleCallFrame: function(target, callFrame, classes)
     {
-        // FIXME(62725): console stack trace line/column numbers are one-based.
-        var lineNumber = callFrame.lineNumber ? callFrame.lineNumber - 1 : 0;
-        var columnNumber = callFrame.columnNumber ? callFrame.columnNumber - 1 : 0;
-        return this.linkifyScriptLocation(target, callFrame.scriptId, callFrame.url, lineNumber, columnNumber, classes);
+        return this.linkifyScriptLocation(target, callFrame.scriptId, callFrame.url, WebInspector.DebuggerModel.fromOneBased(callFrame.lineNumber), WebInspector.DebuggerModel.fromOneBased(callFrame.columnNumber), classes);
+    },
+
+    /**
+     * @param {!WebInspector.Target} target
+     * @param {!RuntimeAgent.StackTrace} stackTrace
+     * @param {string=} classes
+     * @return {!Element}
+     */
+    linkifyStackTraceTopFrame: function(target, stackTrace, classes)
+    {
+        console.assert(stackTrace.callFrames && stackTrace.callFrames.length);
+
+        var topFrame = stackTrace.callFrames[0];
+        var fallbackAnchor = WebInspector.linkifyResourceAsNode(topFrame.url, WebInspector.DebuggerModel.fromOneBased(topFrame.lineNumber), WebInspector.DebuggerModel.fromOneBased(topFrame.columnNumber), classes);
+        if (target.isDetached())
+            return fallbackAnchor;
+
+        var debuggerModel = WebInspector.DebuggerModel.fromTarget(target);
+        var rawLocations = debuggerModel.createRawLocationsByStackTrace(stackTrace);
+        if (rawLocations.length === 0)
+            return fallbackAnchor;
+
+        var anchor = this._createAnchor(classes);
+        var liveLocation = WebInspector.debuggerWorkspaceBinding.createStackTraceTopFrameLiveLocation(rawLocations, this._updateAnchor.bind(this, anchor));
+        this._liveLocationsByTarget.get(target).set(anchor, liveLocation);
+        anchor[WebInspector.Linkifier._fallbackAnchorSymbol] = fallbackAnchor;
+        return anchor;
     },
 
     /**
diff --git a/third_party/WebKit/Source/devtools/front_end/components/module.json b/third_party/WebKit/Source/devtools/front_end/components/module.json
index 8fb44c6..5f89d98 100644
--- a/third_party/WebKit/Source/devtools/front_end/components/module.json
+++ b/third_party/WebKit/Source/devtools/front_end/components/module.json
@@ -41,7 +41,6 @@
         "BreakpointsSidebarPaneBase.js",
         "CustomPreviewSection.js",
         "DataSaverInfobar.js",
-        "DebuggerPresentationUtils.js",
         "DOMBreakpointsSidebarPane.js",
         "DOMPresentationUtils.js",
         "DockController.js",
diff --git a/third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js b/third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js
index cef8e52..65269c3 100644
--- a/third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js
+++ b/third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js
@@ -769,7 +769,7 @@
         var str = this._prompt.text();
         if (!str.length)
             return;
-        this._appendCommand(str, true);
+        this._appendCommand(str.replaceControlCharacters(), true);
     },
 
     /**
diff --git a/third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js b/third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js
index 0de41e3..bb30b7b 100644
--- a/third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js
+++ b/third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js
@@ -213,11 +213,8 @@
             if (consoleMessage.scriptId) {
                 this._anchorElement = this._linkifyScriptId(consoleMessage.scriptId, consoleMessage.url || "", consoleMessage.line, consoleMessage.column);
             } else {
-                var showBlackboxed = (consoleMessage.source !== WebInspector.ConsoleMessage.MessageSource.ConsoleAPI);
-                var debuggerModel = WebInspector.DebuggerModel.fromTarget(this._target());
-                var callFrame = WebInspector.DebuggerPresentationUtils.callFrameAnchorFromStackTrace(debuggerModel, consoleMessage.stackTrace, showBlackboxed);
-                if (callFrame && callFrame.scriptId)
-                    this._anchorElement = this._linkifyCallFrame(callFrame);
+                if (consoleMessage.stackTrace && consoleMessage.stackTrace.callFrames.length)
+                    this._anchorElement = this._linkifyStackTraceTopFrame(consoleMessage.stackTrace);
                 else if (consoleMessage.url && consoleMessage.url !== "undefined")
                     this._anchorElement = this._linkifyLocation(consoleMessage.url, consoleMessage.line, consoleMessage.column);
             }
@@ -276,13 +273,15 @@
     },
 
     /**
-     * @param {!RuntimeAgent.CallFrame} callFrame
+     * @param {!RuntimeAgent.StackTrace} stackTrace
      * @return {?Element}
      */
-    _linkifyCallFrame: function(callFrame)
+    _linkifyStackTraceTopFrame: function(stackTrace)
     {
         var target = this._target();
-        return this._linkifier.linkifyConsoleCallFrame(target, callFrame, "console-message-url");
+        if (!target)
+            return null;
+        return this._linkifier.linkifyStackTraceTopFrame(target, stackTrace, "console-message-url");
     },
 
     /**
diff --git a/third_party/WebKit/Source/devtools/front_end/elements/ElementsPanel.js b/third_party/WebKit/Source/devtools/front_end/elements/ElementsPanel.js
index d9d112a..077af779 100644
--- a/third_party/WebKit/Source/devtools/front_end/elements/ElementsPanel.js
+++ b/third_party/WebKit/Source/devtools/front_end/elements/ElementsPanel.js
@@ -385,6 +385,15 @@
         if (selectedNode) {
             selectedNode.setAsInspectedNode();
             this._lastValidSelectedNode = selectedNode;
+
+            var executionContexts = selectedNode.target().runtimeModel.executionContexts();
+            var nodeFrameId = selectedNode.frameId();
+            for (var context of executionContexts) {
+                if (context.frameId == nodeFrameId) {
+                    WebInspector.context.setFlavor(WebInspector.ExecutionContext, context);
+                    break;
+                }
+            }
         }
         WebInspector.notifications.dispatchEventToListeners(WebInspector.NotificationService.Events.SelectedNodeChanged);
         this._selectedNodeChangedForTest();
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 699bc73..965694c 100644
--- a/third_party/WebKit/Source/devtools/front_end/platform/utilities.js
+++ b/third_party/WebKit/Source/devtools/front_end/platform/utilities.js
@@ -92,6 +92,16 @@
 }
 
 /**
+ * @return {string}
+ */
+String.prototype.replaceControlCharacters = function()
+{
+    // Replace C0 and C1 control character sets with printable character.
+    // Do not replace '\n' and '\r'.
+    return this.replace(/[\u0000-\u0009\u000b\u000c\u000e-\u001f\u0080-\u009f]/g, "�");
+}
+
+/**
  * @return {boolean}
  */
 String.prototype.isWhitespace = function()
diff --git a/third_party/WebKit/Source/devtools/front_end/sass/SASSProcessor.js b/third_party/WebKit/Source/devtools/front_end/sass/SASSProcessor.js
index ed9d31861..ecb489b 100644
--- a/third_party/WebKit/Source/devtools/front_end/sass/SASSProcessor.js
+++ b/third_party/WebKit/Source/devtools/front_end/sass/SASSProcessor.js
@@ -150,6 +150,12 @@
         var operation = null;
         if (change.type === T.ValueChanged || change.type === T.NameChanged)
             operation = WebInspector.SASSProcessor.SetTextOperation.fromCSSChange(change, map);
+        else if (change.type === T.PropertyToggled)
+            operation = WebInspector.SASSProcessor.TogglePropertyOperation.fromCSSChange(change, map);
+        else if (change.type === T.PropertyRemoved)
+            operation = WebInspector.SASSProcessor.RemovePropertyOperation.fromCSSChange(change, map);
+        else if (change.type === T.PropertyAdded)
+            operation = WebInspector.SASSProcessor.InsertPropertiesOperation.fromCSSChange(change, map);
         if (!operation) {
             WebInspector.console.error("Operation ignored: " + change.type);
             continue;
@@ -285,3 +291,258 @@
     __proto__: WebInspector.SASSProcessor.EditOperation.prototype
 }
 
+/**
+ * @constructor
+ * @extends {WebInspector.SASSProcessor.EditOperation}
+ * @param {!WebInspector.ASTSourceMap} map
+ * @param {!WebInspector.SASSSupport.Property} sassProperty
+ * @param {boolean} newDisabled
+ */
+WebInspector.SASSProcessor.TogglePropertyOperation = function(map, sassProperty, newDisabled)
+{
+    WebInspector.SASSProcessor.EditOperation.call(this, map, sassProperty.document.url);
+    this._sassProperty = sassProperty;
+    this._newDisabled = newDisabled;
+}
+
+/**
+ * @param {!WebInspector.SASSSupport.PropertyChange} change
+ * @param {!WebInspector.ASTSourceMap} map
+ * @return {?WebInspector.SASSProcessor.TogglePropertyOperation}
+ */
+WebInspector.SASSProcessor.TogglePropertyOperation.fromCSSChange = function(change, map)
+{
+    var oldCSSProperty = /** @type {!WebInspector.SASSSupport.Property} */(change.oldProperty());
+    console.assert(oldCSSProperty, "TogglePropertyOperation must have old CSS property");
+    var sassProperty = map.toSASSProperty(oldCSSProperty);
+    if (!sassProperty)
+        return null;
+    var newDisabled = change.newProperty().disabled;
+    return new WebInspector.SASSProcessor.TogglePropertyOperation(map, sassProperty, newDisabled);
+}
+
+WebInspector.SASSProcessor.TogglePropertyOperation.prototype = {
+    /**
+     * @override
+     * @param {!WebInspector.SASSProcessor.EditOperation} other
+     * @return {boolean}
+     */
+    merge: function(other)
+    {
+        if (!(other instanceof WebInspector.SASSProcessor.TogglePropertyOperation))
+            return false;
+        return this._sassProperty === other._sassProperty;
+    },
+
+    /**
+     * @override
+     * @return {!Array<!WebInspector.SASSSupport.Rule>}
+     */
+    perform: function()
+    {
+        this._sassProperty.setDisabled(this._newDisabled);
+        var cssProperties = this.map.toCSSProperties(this._sassProperty);
+        for (var property of cssProperties)
+            property.setDisabled(this._newDisabled);
+
+        var cssRules = cssProperties.map(property => property.parent);
+        return cssRules;
+    },
+
+    /**
+     * @override
+     * @param {!WebInspector.ASTSourceMap} newMap
+     * @param {!Map<!WebInspector.SASSSupport.Node, !WebInspector.SASSSupport.Node>} nodeMapping
+     * @return {!WebInspector.SASSProcessor.TogglePropertyOperation}
+     */
+    rebase: function(newMap, nodeMapping)
+    {
+        var sassProperty = /** @type {?WebInspector.SASSSupport.Property} */(nodeMapping.get(this._sassProperty)) || this._sassProperty;
+        return new WebInspector.SASSProcessor.TogglePropertyOperation(newMap, sassProperty, this._newDisabled);
+    },
+
+    __proto__: WebInspector.SASSProcessor.EditOperation.prototype
+}
+
+/**
+ * @constructor
+ * @extends {WebInspector.SASSProcessor.EditOperation}
+ * @param {!WebInspector.ASTSourceMap} map
+ * @param {!WebInspector.SASSSupport.Property} sassProperty
+ */
+WebInspector.SASSProcessor.RemovePropertyOperation = function(map, sassProperty)
+{
+    WebInspector.SASSProcessor.EditOperation.call(this, map, sassProperty.document.url);
+    this._sassProperty = sassProperty;
+}
+
+/**
+ * @param {!WebInspector.SASSSupport.PropertyChange} change
+ * @param {!WebInspector.ASTSourceMap} map
+ * @return {?WebInspector.SASSProcessor.RemovePropertyOperation}
+ */
+WebInspector.SASSProcessor.RemovePropertyOperation.fromCSSChange = function(change, map)
+{
+    var removedProperty = /** @type {!WebInspector.SASSSupport.Property} */(change.oldProperty());
+    console.assert(removedProperty, "RemovePropertyOperation must have removed CSS property");
+    var sassProperty = map.toSASSProperty(removedProperty);
+    if (!sassProperty)
+        return null;
+    return new WebInspector.SASSProcessor.RemovePropertyOperation(map, sassProperty);
+}
+
+WebInspector.SASSProcessor.RemovePropertyOperation.prototype = {
+    /**
+     * @override
+     * @param {!WebInspector.SASSProcessor.EditOperation} other
+     * @return {boolean}
+     */
+    merge: function(other)
+    {
+        if (!(other instanceof WebInspector.SASSProcessor.RemovePropertyOperation))
+            return false;
+        return this._sassProperty === other._sassProperty;
+    },
+
+    /**
+     * @override
+     * @return {!Array<!WebInspector.SASSSupport.Rule>}
+     */
+    perform: function()
+    {
+        var cssProperties = this.map.toCSSProperties(this._sassProperty);
+        var cssRules = cssProperties.map(property => property.parent);
+        this._sassProperty.remove();
+        for (var cssProperty of cssProperties) {
+            cssProperty.remove();
+            this.map.unmapCssFromSass(cssProperty.name, this._sassProperty.name);
+            this.map.unmapCssFromSass(cssProperty.value, this._sassProperty.value);
+        }
+
+        return cssRules;
+    },
+
+    /**
+     * @override
+     * @param {!WebInspector.ASTSourceMap} newMap
+     * @param {!Map<!WebInspector.SASSSupport.Node, !WebInspector.SASSSupport.Node>} nodeMapping
+     * @return {!WebInspector.SASSProcessor.RemovePropertyOperation}
+     */
+    rebase: function(newMap, nodeMapping)
+    {
+        var sassProperty = /** @type {?WebInspector.SASSSupport.Property} */(nodeMapping.get(this._sassProperty)) || this._sassProperty;
+        return new WebInspector.SASSProcessor.RemovePropertyOperation(newMap, sassProperty);
+    },
+
+    __proto__: WebInspector.SASSProcessor.EditOperation.prototype
+}
+
+/**
+ * @constructor
+ * @extends {WebInspector.SASSProcessor.EditOperation}
+ * @param {!WebInspector.ASTSourceMap} map
+ * @param {!WebInspector.SASSSupport.Property} sassAnchor
+ * @param {boolean} insertBefore
+ * @param {!Array<string>} propertyNames
+ * @param {!Array<string>} propertyValues
+ * @param {!Array<boolean>} disabledStates
+ */
+WebInspector.SASSProcessor.InsertPropertiesOperation = function(map, sassAnchor, insertBefore, propertyNames, propertyValues, disabledStates)
+{
+    console.assert(propertyNames.length === propertyValues.length && propertyValues.length === disabledStates.length);
+    WebInspector.SASSProcessor.EditOperation.call(this, map, sassAnchor.document.url);
+    this._sassAnchor = sassAnchor;
+    this._insertBefore = insertBefore;
+    this._nameTexts = propertyNames;
+    this._valueTexts = propertyValues;
+    this._disabledStates = disabledStates;
+}
+
+/**
+ * @param {!WebInspector.SASSSupport.PropertyChange} change
+ * @param {!WebInspector.ASTSourceMap} map
+ * @return {?WebInspector.SASSProcessor.InsertPropertiesOperation}
+ */
+WebInspector.SASSProcessor.InsertPropertiesOperation.fromCSSChange = function(change, map)
+{
+    var insertBefore = false;
+    var cssAnchor = null;
+    var sassAnchor = null;
+    if (change.oldPropertyIndex) {
+        cssAnchor = change.oldRule.properties[change.oldPropertyIndex - 1].name;
+        sassAnchor = map.toSASSNode(cssAnchor);
+    } else {
+        insertBefore = true;
+        cssAnchor = change.oldRule.properties[0].name;
+        sassAnchor = map.toSASSNode(cssAnchor);
+    }
+    if (!sassAnchor)
+        return null;
+    var insertedProperty = /** @type {!WebInspector.SASSSupport.Property} */(change.newProperty());
+    console.assert(insertedProperty, "InsertPropertiesOperation must have inserted CSS property");
+    var names = [insertedProperty.name.text];
+    var values = [insertedProperty.value.text];
+    var disabledStates = [insertedProperty.disabled];
+    return new WebInspector.SASSProcessor.InsertPropertiesOperation(map, sassAnchor.parent, insertBefore, names, values, disabledStates);
+}
+
+WebInspector.SASSProcessor.InsertPropertiesOperation.prototype = {
+    /**
+     * @override
+     * @param {!WebInspector.SASSProcessor.EditOperation} other
+     * @return {boolean}
+     */
+    merge: function(other)
+    {
+        if (!(other instanceof WebInspector.SASSProcessor.InsertPropertiesOperation))
+            return false;
+        if (this._sassAnchor !== other._sassAnchor || this._insertBefore !== other._insertBefore)
+            return false;
+        var names = new Set(this._nameTexts);
+        for (var i = 0; i < other._nameTexts.length; ++i) {
+            var nameText = other._nameTexts[i];
+            if (names.has(nameText))
+                continue;
+            this._nameTexts.push(nameText);
+            this._valueTexts.push(other._valueTexts[i]);
+            this._disabledStates.push(other._disabledStates[i]);
+        }
+        return true;
+    },
+
+    /**
+     * @override
+     * @return {!Array<!WebInspector.SASSSupport.Rule>}
+     */
+    perform: function()
+    {
+        var cssRules = [];
+        var sassRule = this._sassAnchor.parent;
+        var newSASSProperties = sassRule.insertProperties(this._nameTexts, this._valueTexts, this._disabledStates, this._sassAnchor, this._insertBefore);
+        var cssAnchors = this.map.toCSSProperties(this._sassAnchor);
+        for (var cssAnchor of cssAnchors) {
+            var cssRule = cssAnchor.parent;
+            cssRules.push(cssRule);
+            var newCSSProperties = cssRule.insertProperties(this._nameTexts, this._valueTexts, this._disabledStates, cssAnchor, this._insertBefore);
+            for (var i = 0; i < newCSSProperties.length; ++i) {
+                this.map.mapCssToSass(newCSSProperties[i].name, newSASSProperties[i].name);
+                this.map.mapCssToSass(newCSSProperties[i].value, newSASSProperties[i].value);
+            }
+        }
+        return cssRules;
+    },
+
+    /**
+     * @override
+     * @param {!WebInspector.ASTSourceMap} newMap
+     * @param {!Map<!WebInspector.SASSSupport.Node, !WebInspector.SASSSupport.Node>} nodeMapping
+     * @return {!WebInspector.SASSProcessor.InsertPropertiesOperation}
+     */
+    rebase: function(newMap, nodeMapping)
+    {
+        var sassAnchor = /** @type {?WebInspector.SASSSupport.Property} */(nodeMapping.get(this._sassAnchor)) || this._sassAnchor;
+        return new WebInspector.SASSProcessor.InsertPropertiesOperation(newMap, sassAnchor, this._insertBefore, this._nameTexts, this._valueTexts, this._disabledStates);
+    },
+
+    __proto__: WebInspector.SASSProcessor.EditOperation.prototype
+}
diff --git a/third_party/WebKit/Source/devtools/front_end/sdk/DebuggerModel.js b/third_party/WebKit/Source/devtools/front_end/sdk/DebuggerModel.js
index 0851dee..ea378c7 100644
--- a/third_party/WebKit/Source/devtools/front_end/sdk/DebuggerModel.js
+++ b/third_party/WebKit/Source/devtools/front_end/sdk/DebuggerModel.js
@@ -107,6 +107,16 @@
     Other: "other"
 }
 
+/**
+ * @param {number=} value
+ * @return {number}
+ */
+WebInspector.DebuggerModel.fromOneBased = function(value)
+{
+    // FIXME(webkit:62725): console stack trace line/column numbers are one-based.
+    return value ? value - 1 : 0;
+}
+
 WebInspector.DebuggerModel.prototype = {
     /**
      * @return {boolean}
@@ -675,6 +685,28 @@
     },
 
     /**
+     * @param {!RuntimeAgent.StackTrace} stackTrace
+     * @return {!Array<!WebInspector.DebuggerModel.Location>}
+     */
+    createRawLocationsByStackTrace: function(stackTrace)
+    {
+        var frames = [];
+        while (stackTrace) {
+            for (var frame of stackTrace.callFrames)
+                frames.push(frame);
+            stackTrace = stackTrace.parent;
+        }
+
+        var rawLocations = [];
+        for (var frame of frames) {
+            var rawLocation = this.createRawLocationByScriptId(frame.scriptId, WebInspector.DebuggerModel.fromOneBased(frame.lineNumber), WebInspector.DebuggerModel.fromOneBased(frame.columnNumber));
+            if (rawLocation)
+                rawLocations.push(rawLocation);
+        }
+        return rawLocations;
+    },
+
+    /**
      * @return {boolean}
      */
     isPaused: function()
diff --git a/third_party/WebKit/Source/devtools/front_end/sources/AsyncOperationsSidebarPane.js b/third_party/WebKit/Source/devtools/front_end/sources/AsyncOperationsSidebarPane.js
index 9b9365feb..2b4c375 100644
--- a/third_party/WebKit/Source/devtools/front_end/sources/AsyncOperationsSidebarPane.js
+++ b/third_party/WebKit/Source/devtools/front_end/sources/AsyncOperationsSidebarPane.js
@@ -288,10 +288,8 @@
         var label = createCheckboxLabel(title, operation[this._checkedSymbol]);
         label.checkboxElement.addEventListener("click", this._checkboxClicked.bind(this, operation.id), false);
         element.appendChild(label);
-        var debuggerModel = WebInspector.DebuggerModel.fromTarget(this._target);
-        var callFrame = WebInspector.DebuggerPresentationUtils.callFrameAnchorFromStackTrace(debuggerModel, operation.stack, this._revealBlackboxedCallFrames);
-        if (callFrame)
-            element.createChild("div").appendChild(this._linkifier.linkifyConsoleCallFrame(this._target, callFrame));
+        if (operation.stack && operation.stack.callFrames.length)
+            element.createChild("div").appendChild(this._linkifier.linkifyStackTraceTopFrame(this._target, operation.stack));
 
         element[this._operationIdSymbol] = operation.id;
         this._operationIdToElement.set(operation.id, element);
diff --git a/third_party/WebKit/Source/devtools/front_end/ui_lazy/FilteredListWidget.js b/third_party/WebKit/Source/devtools/front_end/ui_lazy/FilteredListWidget.js
index bc801279..b2e26fa 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui_lazy/FilteredListWidget.js
+++ b/third_party/WebKit/Source/devtools/front_end/ui_lazy/FilteredListWidget.js
@@ -296,13 +296,13 @@
         switch (event.keyCode) {
         case WebInspector.KeyboardShortcut.Keys.Down.code:
             if (++newSelectedIndex >= this._filteredItems.length)
-                newSelectedIndex = this._filteredItems.length - 1;
+                newSelectedIndex = 0;
             this._updateSelection(newSelectedIndex, true);
             event.consume(true);
             break;
         case WebInspector.KeyboardShortcut.Keys.Up.code:
             if (--newSelectedIndex < 0)
-                newSelectedIndex = 0;
+                newSelectedIndex = this._filteredItems.length - 1;
             this._updateSelection(newSelectedIndex, false);
             event.consume(true);
             break;
diff --git a/third_party/WebKit/Source/modules/BUILD.gn b/third_party/WebKit/Source/modules/BUILD.gn
index eaeddc4..158311ca 100644
--- a/third_party/WebKit/Source/modules/BUILD.gn
+++ b/third_party/WebKit/Source/modules/BUILD.gn
@@ -64,6 +64,11 @@
     #  'msvs_shard': 5,
     #}],
   }
+
+  if (remove_webcore_debug_symbols) {
+    configs -= [ "//build/config/compiler:default_symbols" ]
+    configs += [ "//build/config/compiler:no_symbols" ]
+  }
 }
 
 # GYP version: WebKit/Source/modules/modules.gyp:modules_testing
diff --git a/third_party/WebKit/Source/modules/accessibility/InspectorAccessibilityAgent.cpp b/third_party/WebKit/Source/modules/accessibility/InspectorAccessibilityAgent.cpp
index 39af8666..742d933 100644
--- a/third_party/WebKit/Source/modules/accessibility/InspectorAccessibilityAgent.cpp
+++ b/third_party/WebKit/Source/modules/accessibility/InspectorAccessibilityAgent.cpp
@@ -256,7 +256,7 @@
 {
     OwnPtr<AXValue> nodeListValue = createRelatedNodeListValue(nodes);
     const AtomicString& attrValue = axObject->getAttribute(attr);
-    nodeListValue->setValue(JSONString::create(attrValue));
+    nodeListValue->setValue(JSONString::create(attrValue).get());
     return createProperty(key, nodeListValue.release());
 }
 
@@ -364,7 +364,7 @@
 {
 }
 
-void InspectorAccessibilityAgent::getAXNode(ErrorString* errorString, int nodeId, OwnPtr<AXNode>* accessibilityNode)
+void InspectorAccessibilityAgent::getAXNode(ErrorString* errorString, int nodeId, Maybe<AXNode>* accessibilityNode)
 {
     Frame* mainFrame = m_page->mainFrame();
     if (!mainFrame->isLocalFrame()) {
diff --git a/third_party/WebKit/Source/modules/accessibility/InspectorAccessibilityAgent.h b/third_party/WebKit/Source/modules/accessibility/InspectorAccessibilityAgent.h
index 7946b532..0308818a 100644
--- a/third_party/WebKit/Source/modules/accessibility/InspectorAccessibilityAgent.h
+++ b/third_party/WebKit/Source/modules/accessibility/InspectorAccessibilityAgent.h
@@ -25,7 +25,7 @@
     DECLARE_VIRTUAL_TRACE();
 
     // Protocol methods.
-    void getAXNode(ErrorString*, int nodeId, OwnPtr<protocol::Accessibility::AXNode>* accessibilityNode) override;
+    void getAXNode(ErrorString*, int nodeId, Maybe<protocol::Accessibility::AXNode>* accessibilityNode) override;
 
 private:
     explicit InspectorAccessibilityAgent(Page*);
diff --git a/third_party/WebKit/Source/modules/accessibility/InspectorTypeBuilderHelper.cpp b/third_party/WebKit/Source/modules/accessibility/InspectorTypeBuilderHelper.cpp
index 1d189ab2..966fced4 100644
--- a/third_party/WebKit/Source/modules/accessibility/InspectorTypeBuilderHelper.cpp
+++ b/third_party/WebKit/Source/modules/accessibility/InspectorTypeBuilderHelper.cpp
@@ -101,7 +101,7 @@
         return relatedNode.release();
 
     Element* element = toElement(node);
-    const AtomicString& idref = element->getIdAttribute();
+    String idref = element->getIdAttribute();
     if (!idref.isEmpty())
         relatedNode->setIdref(idref);
 
@@ -188,7 +188,7 @@
         if (nameSource.attribute == aria_labelledbyAttr || nameSource.attribute == aria_labeledbyAttr) {
             OwnPtr<AXValue> attributeValue = createRelatedNodeListValue(nameSource.relatedObjects, AXValueTypeEnum::IdrefList);
             if (!nameSource.attributeValue.isNull())
-                attributeValue->setValue(JSONString::create(nameSource.attributeValue.string()));
+                attributeValue->setValue(JSONString::create(nameSource.attributeValue.string()).get());
             valueSource->setAttributeValue(attributeValue.release());
         } else if (nameSource.attribute == QualifiedName::null()) {
             valueSource->setNativeSourceValue(createRelatedNodeListValue(nameSource.relatedObjects, AXValueTypeEnum::NodeList));
diff --git a/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.idl b/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.idl
index ad37adb97..a2a897c6 100644
--- a/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.idl
+++ b/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.idl
@@ -69,7 +69,7 @@
     attribute (DOMString or CanvasGradient or CanvasPattern) fillStyle; // (default black)
     CanvasGradient createLinearGradient(double x0, double y0, double x1, double y1);
     [RaisesException] CanvasGradient createRadialGradient(double x0, double y0, double r0, double x1, double y1, double r1);
-    [RaisesException] CanvasPattern createPattern(CanvasImageSource image, DOMString? repetitionType);
+    [RaisesException] CanvasPattern? createPattern(CanvasImageSource image, [TreatNullAs=NullString] DOMString repetitionType);
 
     // shadows
     attribute unrestricted double shadowOffsetX;
diff --git a/third_party/WebKit/Source/modules/fetch/FetchManager.cpp b/third_party/WebKit/Source/modules/fetch/FetchManager.cpp
index a6389641..dd37431 100644
--- a/third_party/WebKit/Source/modules/fetch/FetchManager.cpp
+++ b/third_party/WebKit/Source/modules/fetch/FetchManager.cpp
@@ -550,7 +550,7 @@
     ASSERT(m_request->referrerPolicy() == ReferrerPolicyDefault);
     // Request's referrer policy is always default, so use the client's one.
     // TODO(yhirano): Fix here when we introduce requet's referrer policy.
-    ReferrerPolicy policy = executionContext()->referrerPolicy();
+    ReferrerPolicy policy = executionContext()->getReferrerPolicy();
     if (m_request->referrerString() == FetchRequestData::clientReferrerString()) {
         String referrerURL;
         if (executionContext()->isDocument()) {
diff --git a/third_party/WebKit/Source/modules/indexeddb/InspectorIndexedDBAgent.cpp b/third_party/WebKit/Source/modules/indexeddb/InspectorIndexedDBAgent.cpp
index 2edb8a0e..3156680 100644
--- a/third_party/WebKit/Source/modules/indexeddb/InspectorIndexedDBAgent.cpp
+++ b/third_party/WebKit/Source/modules/indexeddb/InspectorIndexedDBAgent.cpp
@@ -393,7 +393,7 @@
     return idbKey;
 }
 
-static IDBKeyRange* idbKeyRangeFromKeyRange(PassOwnPtr<protocol::IndexedDB::KeyRange> keyRange)
+static IDBKeyRange* idbKeyRangeFromKeyRange(protocol::IndexedDB::KeyRange* keyRange)
 {
     IDBKey* idbLower = idbKeyFromInspectorObject(keyRange->getLower(nullptr));
     if (keyRange->hasLower() && !idbLower)
@@ -686,7 +686,15 @@
     databaseLoader->start(idbFactory, document->securityOrigin(), databaseName);
 }
 
-void InspectorIndexedDBAgent::requestData(ErrorString* errorString, const String& securityOrigin, const String& databaseName, const String& objectStoreName, const String& indexName, int skipCount, int pageSize, PassOwnPtr<protocol::IndexedDB::KeyRange> keyRange, const PassRefPtr<RequestDataCallback> requestCallback)
+void InspectorIndexedDBAgent::requestData(ErrorString* errorString,
+    const String& securityOrigin,
+    const String& databaseName,
+    const String& objectStoreName,
+    const String& indexName,
+    int skipCount,
+    int pageSize,
+    const Maybe<protocol::IndexedDB::KeyRange>& keyRange,
+    const PassRefPtr<RequestDataCallback> requestCallback)
 {
     LocalFrame* frame = m_inspectedFrames->frameWithSecurityOrigin(securityOrigin);
     Document* document = assertDocument(errorString, frame);
@@ -696,8 +704,8 @@
     if (!idbFactory)
         return;
 
-    IDBKeyRange* idbKeyRange = keyRange ? idbKeyRangeFromKeyRange(keyRange) : nullptr;
-    if (keyRange && !idbKeyRange) {
+    IDBKeyRange* idbKeyRange = keyRange.isJust() ? idbKeyRangeFromKeyRange(keyRange.fromJust()) : nullptr;
+    if (keyRange.isJust() && !idbKeyRange) {
         *errorString = "Can not parse key range.";
         return;
     }
diff --git a/third_party/WebKit/Source/modules/indexeddb/InspectorIndexedDBAgent.h b/third_party/WebKit/Source/modules/indexeddb/InspectorIndexedDBAgent.h
index c8dd830..089ad77 100644
--- a/third_party/WebKit/Source/modules/indexeddb/InspectorIndexedDBAgent.h
+++ b/third_party/WebKit/Source/modules/indexeddb/InspectorIndexedDBAgent.h
@@ -54,10 +54,10 @@
     // Called from the front-end.
     void enable(ErrorString*) override;
     void disable(ErrorString*) override;
-    void requestDatabaseNames(ErrorString*, const String& in_securityOrigin, PassRefPtr<RequestDatabaseNamesCallback>) override;
-    void requestDatabase(ErrorString*, const String& in_securityOrigin, const String& in_databaseName, PassRefPtr<RequestDatabaseCallback>) override;
-    void requestData(ErrorString*, const String& in_securityOrigin, const String& in_databaseName, const String& in_objectStoreName, const String& in_indexName, int in_skipCount, int in_pageSize, PassOwnPtr<protocol::IndexedDB::KeyRange> in_keyRange, PassRefPtr<RequestDataCallback>) override;
-    void clearObjectStore(ErrorString*, const String& in_securityOrigin, const String& in_databaseName, const String& in_objectStoreName, PassRefPtr<ClearObjectStoreCallback>) override;
+    void requestDatabaseNames(ErrorString*, const String& securityOrigin, PassRefPtr<RequestDatabaseNamesCallback>) override;
+    void requestDatabase(ErrorString*, const String& securityOrigin, const String& databaseName, PassRefPtr<RequestDatabaseCallback>) override;
+    void requestData(ErrorString*, const String& securityOrigin, const String& databaseName, const String& objectStoreName, const String& indexName, int skipCount, int pageSize, const Maybe<protocol::IndexedDB::KeyRange>&, PassRefPtr<RequestDataCallback>) override;
+    void clearObjectStore(ErrorString*, const String& securityOrigin, const String& databaseName, const String& objectStoreName, PassRefPtr<ClearObjectStoreCallback>) override;
 
 private:
     explicit InspectorIndexedDBAgent(InspectedFrames*);
diff --git a/third_party/WebKit/Source/modules/webaudio/AbstractAudioContext.cpp b/third_party/WebKit/Source/modules/webaudio/AbstractAudioContext.cpp
index 9c27d38..cc6d33a 100644
--- a/third_party/WebKit/Source/modules/webaudio/AbstractAudioContext.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/AbstractAudioContext.cpp
@@ -802,7 +802,7 @@
 
     // Find AudioBufferSourceNodes to see if we can stop playing them.
     for (AudioNode* node : m_activeSourceNodes) {
-        if (node->handler().nodeType() == AudioHandler::NodeTypeAudioBufferSource) {
+        if (node->handler().getNodeType() == AudioHandler::NodeTypeAudioBufferSource) {
             AudioBufferSourceNode* sourceNode = static_cast<AudioBufferSourceNode*>(node);
             sourceNode->audioBufferSourceHandler().handleStoppableSourceNode();
         }
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioBufferSourceNode.cpp b/third_party/WebKit/Source/modules/webaudio/AudioBufferSourceNode.cpp
index 0dceaa9..421d51a2 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioBufferSourceNode.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/AudioBufferSourceNode.cpp
@@ -79,7 +79,6 @@
 
 AudioBufferSourceHandler::~AudioBufferSourceHandler()
 {
-    clearPannerNode();
     uninitialize();
 }
 
@@ -507,10 +506,6 @@
 
 double AudioBufferSourceHandler::computePlaybackRate()
 {
-    double dopplerRate = 1;
-    if (m_pannerNode)
-        dopplerRate = m_pannerNode->dopplerRate();
-
     // Incorporate buffer's sample-rate versus AbstractAudioContext's sample-rate.
     // Normally it's not an issue because buffers are loaded at the
     // AbstractAudioContext's sample-rate, but we can handle it in any case.
@@ -524,7 +519,7 @@
     // AudioSummingJunction from m_playbackRate AudioParam.
     double basePlaybackRate = m_playbackRate->finalValue();
 
-    double finalPlaybackRate = dopplerRate * sampleRateFactor * basePlaybackRate;
+    double finalPlaybackRate = sampleRateFactor * basePlaybackRate;
 
     // Take the detune value into account for the final playback rate.
     finalPlaybackRate *= pow(2, m_detune->finalValue() / 1200);
@@ -550,26 +545,6 @@
     return !isPlayingOrScheduled() || hasFinished() || !m_buffer;
 }
 
-void AudioBufferSourceHandler::setPannerNode(PannerHandler* pannerNode)
-{
-    if (m_pannerNode != pannerNode && !hasFinished()) {
-        RefPtr<PannerHandler> oldPannerNode(m_pannerNode.release());
-        m_pannerNode = pannerNode;
-        if (pannerNode)
-            pannerNode->makeConnection();
-        if (oldPannerNode)
-            oldPannerNode->breakConnection();
-    }
-}
-
-void AudioBufferSourceHandler::clearPannerNode()
-{
-    if (m_pannerNode) {
-        m_pannerNode->breakConnection();
-        m_pannerNode.clear();
-    }
-}
-
 void AudioBufferSourceHandler::handleStoppableSourceNode()
 {
     // If the source node is not looping, and we have a buffer, we can determine when the source
@@ -606,13 +581,6 @@
     }
 }
 
-void AudioBufferSourceHandler::finish()
-{
-    clearPannerNode();
-    ASSERT(!m_pannerNode);
-    AudioScheduledSourceHandler::finish();
-}
-
 // ----------------------------------------------------------------
 AudioBufferSourceNode::AudioBufferSourceNode(AbstractAudioContext& context, float sampleRate)
     : AudioScheduledSourceNode(context)
@@ -710,4 +678,3 @@
 }
 
 } // namespace blink
-
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioBufferSourceNode.h b/third_party/WebKit/Source/modules/webaudio/AudioBufferSourceNode.h
index d1c085e..8b355ba1 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioBufferSourceNode.h
+++ b/third_party/WebKit/Source/modules/webaudio/AudioBufferSourceNode.h
@@ -79,16 +79,9 @@
     void setLoopStart(double loopStart) { m_loopStart = loopStart; }
     void setLoopEnd(double loopEnd) { m_loopEnd = loopEnd; }
 
-    // If a panner node is set, then we can incorporate doppler shift into the playback pitch rate.
-    void setPannerNode(PannerHandler*);
-    void clearPannerNode();
-
     // If we are no longer playing, propogate silence ahead to downstream nodes.
     bool propagatesSilence() const override;
 
-    // AudioScheduledSourceNode
-    void finish() override;
-
     void handleStoppableSourceNode();
 
 private:
@@ -137,23 +130,11 @@
     // True if grainDuration is given explicitly (via 3 arg start method).
     bool m_isDurationGiven;
 
-    // Compute playback rate (k-rate) by incorporating the sample rate conversion
-    // factor, the doppler shift from the associated panner node, and the value
-    // of playbackRate and detune AudioParams.
+    // Compute playback rate (k-rate) by incorporating the sample rate
+    // conversion factor, and the value of playbackRate and detune AudioParams.
     double computePlaybackRate();
 
-    // We optionally keep track of a panner node which has a doppler shift that
-    // is incorporated into the pitch rate.
-    // This RefPtr is connection reference. We must call AudioHandler::
-    // makeConnection() after ref(), and call AudioHandler::breakConnection()
-    // before deref().
-    // TODO(tkent): This is always null because setPannerNode is never
-    // called. If we revive setPannerNode, this should be a raw pointer and
-    // AudioBufferSourceNode should have Member<PannerNode>.
-    RefPtr<PannerHandler> m_pannerNode;
-
-    // The minimum playbackRate value ever used for this source.  This includes any adjustments
-    // caused by doppler too.
+    // The minimum playbackRate value ever used for this source.
     double m_minPlaybackRate;
 };
 
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioListener.cpp b/third_party/WebKit/Source/modules/webaudio/AudioListener.cpp
index 23509ee6..8521b8c4 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioListener.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/AudioListener.cpp
@@ -38,7 +38,6 @@
     : m_position(0, 0, 0)
     , m_orientation(0, 0, -1)
     , m_upVector(0, 1, 0)
-    , m_velocity(0, 0, 0)
     , m_dopplerFactor(1)
     , m_speedOfSound(343.3)
 {
@@ -96,7 +95,7 @@
     // This synchronizes with panner's process().
     MutexLocker listenerLocker(m_listenerLock);
     m_position = position;
-    markPannersAsDirty(PannerHandler::AzimuthElevationDirty | PannerHandler::DistanceConeGainDirty | PannerHandler::DopplerRateDirty);
+    markPannersAsDirty(PannerHandler::AzimuthElevationDirty | PannerHandler::DistanceConeGainDirty);
 }
 
 void AudioListener::setOrientation(const FloatPoint3D& orientation)
@@ -121,38 +120,20 @@
     markPannersAsDirty(PannerHandler::AzimuthElevationDirty);
 }
 
-void AudioListener::setVelocity(const FloatPoint3D& velocity)
+void AudioListener::setVelocity(float x, float y, float z)
 {
-    if (m_velocity == velocity)
-        return;
-
-    // This synchronizes with panner's process().
-    MutexLocker listenerLocker(m_listenerLock);
-    m_velocity = velocity;
-    markPannersAsDirty(PannerHandler::DopplerRateDirty);
+    // The velocity is not used internally and cannot be read back by scripts,
+    // so it can be ignored entirely.
 }
 
 void AudioListener::setDopplerFactor(double dopplerFactor)
 {
-    if (m_dopplerFactor == dopplerFactor)
-        return;
-
-    // This synchronizes with panner's process().
-    MutexLocker listenerLocker(m_listenerLock);
     m_dopplerFactor = dopplerFactor;
-    markPannersAsDirty(PannerHandler::DopplerRateDirty);
 }
 
 void AudioListener::setSpeedOfSound(double speedOfSound)
 {
-    if (m_speedOfSound == speedOfSound)
-        return;
-
-    // This synchronizes with panner's process().
-    MutexLocker listenerLocker(m_listenerLock);
     m_speedOfSound = speedOfSound;
-    markPannersAsDirty(PannerHandler::DopplerRateDirty);
 }
 
 } // namespace blink
-
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioListener.h b/third_party/WebKit/Source/modules/webaudio/AudioListener.h
index f85adfe..3173d65 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioListener.h
+++ b/third_party/WebKit/Source/modules/webaudio/AudioListener.h
@@ -64,8 +64,7 @@
     const FloatPoint3D& upVector() const { return m_upVector; }
 
     // Velocity
-    void setVelocity(float x, float y, float z) { setVelocity(FloatPoint3D(x, y, z)); }
-    const FloatPoint3D& velocity() const { return m_velocity; }
+    void setVelocity(float x, float y, float z);
 
     // Doppler factor
     void setDopplerFactor(double);
@@ -93,14 +92,12 @@
     void setPosition(const FloatPoint3D&);
     void setOrientation(const FloatPoint3D&);
     void setUpVector(const FloatPoint3D&);
-    void setVelocity(const FloatPoint3D&);
 
     void markPannersAsDirty(unsigned);
 
     FloatPoint3D m_position;
     FloatPoint3D m_orientation;
     FloatPoint3D m_upVector;
-    FloatPoint3D m_velocity;
     double m_dopplerFactor;
     double m_speedOfSound;
 
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioNode.cpp b/third_party/WebKit/Source/modules/webaudio/AudioNode.cpp
index 099e457..ef366e8 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioNode.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/AudioNode.cpp
@@ -417,10 +417,10 @@
         // longer have any input connections. This needs to be handled more generally where
         // AudioNodes have a tailTime attribute. Then the AudioNode only needs to remain "active"
         // for tailTime seconds after there are no longer any active connections.
-        if (nodeType() != NodeTypeConvolver
-            && nodeType() != NodeTypeDelay
-            && nodeType() != NodeTypeBiquadFilter
-            && nodeType() != NodeTypeIIRFilter) {
+        if (getNodeType() != NodeTypeConvolver
+            && getNodeType() != NodeTypeDelay
+            && getNodeType() != NodeTypeBiquadFilter
+            && getNodeType() != NodeTypeIIRFilter) {
             m_isDisabled = true;
             clearInternalStateWhenDisabled();
             for (auto& output : m_outputs)
@@ -435,7 +435,7 @@
 
 #if DEBUG_AUDIONODE_REFERENCES
     fprintf(stderr, "%p: %2d: AudioNode::ref   %3d [%3d]\n",
-        this, nodeType(), m_connectionRefCount, s_nodeCount[nodeType()]);
+        this, getNodeType(), m_connectionRefCount, s_nodeCount[getNodeType()]);
 #endif
     // See the disabling code in disableOutputsIfNecessary(). This handles
     // the case where a node is being re-connected after being used at least
@@ -474,7 +474,7 @@
 
 #if DEBUG_AUDIONODE_REFERENCES
     fprintf(stderr, "%p: %2d: AudioNode::deref %3d [%3d]\n",
-        this, nodeType(), m_connectionRefCount, s_nodeCount[nodeType()]);
+        this, getNodeType(), m_connectionRefCount, s_nodeCount[getNodeType()]);
 #endif
 
     if (!m_connectionRefCount)
@@ -512,7 +512,7 @@
     // This should only be called for ScriptProcessorNodes which are the only nodes where you can
     // have an output with 0 channels.  All other nodes have have at least one output channel, so
     // there's no reason other nodes should ever call this function.
-    ASSERT_WITH_MESSAGE(1, "numberOfOutputChannels() not valid for node type %d", nodeType());
+    ASSERT_WITH_MESSAGE(1, "numberOfOutputChannels() not valid for node type %d", getNodeType());
     return 1;
 }
 // ----------------------------------------------------------------
@@ -600,7 +600,7 @@
 
     // ScriptProcessorNodes with 0 output channels can't be connected to any destination.  If there
     // are no output channels, what would the destination receive?  Just disallow this.
-    if (handler().nodeType() == AudioHandler::NodeTypeJavaScript
+    if (handler().getNodeType() == AudioHandler::NodeTypeJavaScript
         && handler().numberOfOutputChannels() == 0) {
         exceptionState.throwDOMException(
             InvalidAccessError,
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioNode.h b/third_party/WebKit/Source/modules/webaudio/AudioNode.h
index 15a0546a..7f0d35e 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioNode.h
+++ b/third_party/WebKit/Source/modules/webaudio/AudioNode.h
@@ -118,7 +118,7 @@
         Explicit
     };
 
-    NodeType nodeType() const { return m_nodeType; }
+    NodeType getNodeType() const { return m_nodeType; }
     String nodeTypeName() const;
 
     // This object has been connected to another object. This might have
diff --git a/third_party/WebKit/Source/modules/webaudio/PannerNode.cpp b/third_party/WebKit/Source/modules/webaudio/PannerNode.cpp
index 7bdf21e..ad21f7a0 100644
--- a/third_party/WebKit/Source/modules/webaudio/PannerNode.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/PannerNode.cpp
@@ -49,15 +49,12 @@
     , m_distanceModel(DistanceEffect::ModelInverse)
     , m_position(0, 0, 0)
     , m_orientation(1, 0, 0)
-    , m_velocity(0, 0, 0)
     , m_isAzimuthElevationDirty(true)
     , m_isDistanceConeGainDirty(true)
-    , m_isDopplerRateDirty(true)
     , m_lastGain(-1.0)
     , m_cachedAzimuth(0)
     , m_cachedElevation(0)
     , m_cachedDistanceConeGain(1.0f)
-    , m_cachedDopplerRate(1)
 {
     // Load the HRTF database asynchronously so we don't block the Javascript thread while creating the HRTF database.
     // The HRTF panner will return zeroes until the database is loaded.
@@ -328,7 +325,7 @@
     // This synchronizes with process().
     MutexLocker processLocker(m_processLock);
     m_position = position;
-    markPannerAsDirty(PannerHandler::AzimuthElevationDirty | PannerHandler::DistanceConeGainDirty | PannerHandler::DopplerRateDirty);
+    markPannerAsDirty(PannerHandler::AzimuthElevationDirty | PannerHandler::DistanceConeGainDirty);
 }
 
 void PannerHandler::setOrientation(float x, float y, float z)
@@ -344,19 +341,6 @@
     markPannerAsDirty(PannerHandler::DistanceConeGainDirty);
 }
 
-void PannerHandler::setVelocity(float x, float y, float z)
-{
-    FloatPoint3D velocity = FloatPoint3D(x, y, z);
-
-    if (m_velocity == velocity)
-        return;
-
-    // This synchronizes with process().
-    MutexLocker processLocker(m_processLock);
-    m_velocity = velocity;
-    markPannerAsDirty(PannerHandler::DopplerRateDirty);
-}
-
 void PannerHandler::calculateAzimuthElevation(double* outAzimuth, double* outElevation)
 {
     double azimuth = 0.0;
@@ -412,58 +396,6 @@
         *outElevation = elevation;
 }
 
-double PannerHandler::calculateDopplerRate()
-{
-    double dopplerShift = 1.0;
-    double dopplerFactor = listener()->dopplerFactor();
-
-    if (dopplerFactor > 0.0) {
-        double speedOfSound = listener()->speedOfSound();
-
-        const FloatPoint3D& sourceVelocity = m_velocity;
-        const FloatPoint3D& listenerVelocity = listener()->velocity();
-
-        // Don't bother if both source and listener have no velocity
-        bool sourceHasVelocity = !sourceVelocity.isZero();
-        bool listenerHasVelocity = !listenerVelocity.isZero();
-
-        if (sourceHasVelocity || listenerHasVelocity) {
-            // Calculate the source to listener vector
-            FloatPoint3D listenerPosition = listener()->position();
-            FloatPoint3D sourceToListener = m_position - listenerPosition;
-
-            double sourceListenerMagnitude = sourceToListener.length();
-
-            if (!sourceListenerMagnitude) {
-                // Source and listener are at the same position. Skip the computation of the doppler
-                // shift, and just return the cached value.
-                dopplerShift = m_cachedDopplerRate;
-            } else {
-                double listenerProjection = sourceToListener.dot(listenerVelocity) / sourceListenerMagnitude;
-                double sourceProjection = sourceToListener.dot(sourceVelocity) / sourceListenerMagnitude;
-
-                listenerProjection = -listenerProjection;
-                sourceProjection = -sourceProjection;
-
-                double scaledSpeedOfSound = speedOfSound / dopplerFactor;
-                listenerProjection = std::min(listenerProjection, scaledSpeedOfSound);
-                sourceProjection = std::min(sourceProjection, scaledSpeedOfSound);
-
-                dopplerShift = ((speedOfSound - dopplerFactor * listenerProjection) / (speedOfSound - dopplerFactor * sourceProjection));
-                fixNANs(dopplerShift); // avoid illegal values
-
-                // Limit the pitch shifting to 4 octaves up and 3 octaves down.
-                if (dopplerShift > 16.0)
-                    dopplerShift = 16.0;
-                else if (dopplerShift < 0.125)
-                    dopplerShift = 0.125;
-            }
-        }
-    }
-
-    return dopplerShift;
-}
-
 float PannerHandler::calculateDistanceConeGain()
 {
     FloatPoint3D listenerPosition = listener()->position();
@@ -488,18 +420,6 @@
     *outElevation = m_cachedElevation;
 }
 
-double PannerHandler::dopplerRate()
-{
-    ASSERT(context()->isAudioThread());
-
-    if (isDopplerRateDirty()) {
-        m_cachedDopplerRate = calculateDopplerRate();
-        m_isDopplerRateDirty = false;
-    }
-
-    return m_cachedDopplerRate;
-}
-
 float PannerHandler::distanceConeGain()
 {
     ASSERT(context()->isAudioThread());
@@ -519,9 +439,6 @@
 
     if (dirty & PannerHandler::DistanceConeGainDirty)
         m_isDistanceConeGainDirty = true;
-
-    if (dirty & PannerHandler::DopplerRateDirty)
-        m_isDopplerRateDirty = true;
 }
 
 void PannerHandler::setChannelCount(unsigned long channelCount, ExceptionState& exceptionState)
@@ -615,7 +532,8 @@
 
 void PannerNode::setVelocity(float x, float y, float z)
 {
-    pannerHandler().setVelocity(x, y, z);
+    // The velocity is not used internally and cannot be read back by scripts,
+    // so it can be ignored entirely.
 }
 
 String PannerNode::distanceModel() const
@@ -689,4 +607,3 @@
 }
 
 } // namespace blink
-
diff --git a/third_party/WebKit/Source/modules/webaudio/PannerNode.h b/third_party/WebKit/Source/modules/webaudio/PannerNode.h
index c7050af..a12095e 100644
--- a/third_party/WebKit/Source/modules/webaudio/PannerNode.h
+++ b/third_party/WebKit/Source/modules/webaudio/PannerNode.h
@@ -51,7 +51,6 @@
     enum {
         AzimuthElevationDirty = 0x1,
         DistanceConeGainDirty = 0x2,
-        DopplerRateDirty = 0x4,
     };
 
     static PassRefPtr<PannerHandler> create(AudioNode&, float sampleRate);
@@ -66,10 +65,9 @@
     String panningModel() const;
     void setPanningModel(const String&);
 
-    // Position, orientation and velocity
+    // Position and orientation
     void setPosition(float x, float y, float z);
     void setOrientation(float x, float y, float z);
-    void setVelocity(float x, float y, float z);
 
     // Distance parameters
     String distanceModel() const;
@@ -96,9 +94,6 @@
 
     void markPannerAsDirty(unsigned);
 
-    // It must be called on audio thread, currently called only process() in AudioBufferSourceNode.
-    double dopplerRate();
-
     double tailTime() const override { return m_panner ? m_panner->tailTime() : 0; }
     double latencyTime() const override { return m_panner ? m_panner->latencyTime() : 0; }
 
@@ -115,14 +110,12 @@
 
     void calculateAzimuthElevation(double* outAzimuth, double* outElevation);
     float calculateDistanceConeGain(); // Returns the combined distance and cone gain attenuation.
-    double calculateDopplerRate();
 
     void azimuthElevation(double* outAzimuth, double* outElevation);
     float distanceConeGain();
 
     bool isAzimuthElevationDirty() const { return m_isAzimuthElevationDirty; }
     bool isDistanceConeGainDirty() const { return m_isDistanceConeGainDirty; }
-    bool isDopplerRateDirty() const { return m_isDopplerRateDirty; }
 
     // This Persistent doesn't make a reference cycle including the owner
     // PannerNode.
@@ -134,11 +127,9 @@
     // Current source location information
     FloatPoint3D m_position;
     FloatPoint3D m_orientation;
-    FloatPoint3D m_velocity;
 
     bool m_isAzimuthElevationDirty;
     bool m_isDistanceConeGainDirty;
-    bool m_isDopplerRateDirty;
 
     // Gain
     DistanceEffect m_distanceEffect;
@@ -149,7 +140,6 @@
     double m_cachedAzimuth;
     double m_cachedElevation;
     float m_cachedDistanceConeGain;
-    double m_cachedDopplerRate;
 
     // Synchronize process() with setting of the panning model, source's location information, listener, distance parameters and sound cones.
     mutable Mutex m_processLock;
diff --git a/third_party/WebKit/Source/modules/webdatabase/InspectorDatabaseAgent.cpp b/third_party/WebKit/Source/modules/webdatabase/InspectorDatabaseAgent.cpp
index 66242e65..9dc1272 100644
--- a/third_party/WebKit/Source/modules/webdatabase/InspectorDatabaseAgent.cpp
+++ b/third_party/WebKit/Source/modules/webdatabase/InspectorDatabaseAgent.cpp
@@ -63,7 +63,7 @@
     OwnPtr<protocol::Database::Error> errorObject = protocol::Database::Error::create()
         .setMessage(error->message())
         .setCode(error->code()).build();
-    requestCallback->sendSuccess(nullptr, nullptr, errorObject.release());
+    requestCallback->sendSuccess(Maybe<protocol::Array<String>>(), Maybe<protocol::Array<RefPtr<JSONValue>>>(), errorObject.release());
 }
 
 class StatementCallback final : public SQLStatementCallback {
@@ -99,7 +99,7 @@
             case SQLValue::NullValue: values->addItem(JSONValue::null()); break;
             }
         }
-        m_requestCallback->sendSuccess(columnNames.release(), values.release(), nullptr);
+        m_requestCallback->sendSuccess(columnNames.release(), values.release(), Maybe<protocol::Database::Error>());
         return true;
     }
 
diff --git a/third_party/WebKit/Source/modules/websockets/DOMWebSocket.cpp b/third_party/WebKit/Source/modules/websockets/DOMWebSocket.cpp
index d39635c..5e7da65 100644
--- a/third_party/WebKit/Source/modules/websockets/DOMWebSocket.cpp
+++ b/third_party/WebKit/Source/modules/websockets/DOMWebSocket.cpp
@@ -282,7 +282,7 @@
     WTF_LOG(Network, "WebSocket %p connect() url='%s'", this, url.utf8().data());
     m_url = KURL(KURL(), url);
 
-    if (executionContext()->securityContext().insecureRequestsPolicy() == SecurityContext::InsecureRequestsUpgrade && m_url.protocol() == "ws") {
+    if (executionContext()->securityContext().getInsecureRequestsPolicy() == SecurityContext::InsecureRequestsUpgrade && m_url.protocol() == "ws") {
         UseCounter::count(executionContext(), UseCounter::UpgradeInsecureRequestsUpgradedRequest);
         m_url.setProtocol("wss");
         if (m_url.port() == 80)
diff --git a/third_party/WebKit/Source/platform/BUILD.gn b/third_party/WebKit/Source/platform/BUILD.gn
index 6963911..955f2fa 100644
--- a/third_party/WebKit/Source/platform/BUILD.gn
+++ b/third_party/WebKit/Source/platform/BUILD.gn
@@ -434,6 +434,11 @@
     include_dirs += [ "//third_party/openmax_dl" ]
     deps += [ "//third_party/openmax_dl/dl" ]
   }
+
+  if (remove_webcore_debug_symbols) {
+    configs -= [ "//build/config/compiler:default_symbols" ]
+    configs += [ "//build/config/compiler:no_symbols" ]
+  }
 }
 
 source_set("test_support") {
diff --git a/third_party/WebKit/Source/platform/JSONParserTest.cpp b/third_party/WebKit/Source/platform/JSONParserTest.cpp
index a15ee31..8e5a80c 100644
--- a/third_party/WebKit/Source/platform/JSONParserTest.cpp
+++ b/third_party/WebKit/Source/platform/JSONParserTest.cpp
@@ -57,8 +57,8 @@
     EXPECT_EQ("sample string", strVal);
     root = parseJSON("[1, /* comment, 2 ] */ \n 3]");
     ASSERT_TRUE(root.get());
-    RefPtr<JSONArray> list;
-    ASSERT_TRUE(root->asArray(&list));
+    RefPtr<JSONArray> list = JSONArray::cast(root);
+    ASSERT_TRUE(list);
     EXPECT_EQ(2u, list->length());
     tmpValue = list->get(0);
     ASSERT_TRUE(tmpValue.get());
@@ -70,7 +70,8 @@
     EXPECT_EQ(3, intVal);
     root = parseJSON("[1, /*a*/2, 3]");
     ASSERT_TRUE(root.get());
-    ASSERT_TRUE(root->asArray(&list));
+    list = JSONArray::cast(root);
+    ASSERT_TRUE(list);
     EXPECT_EQ(3u, list->length());
     root = parseJSON("/* comment **/42");
     ASSERT_TRUE(root.get());
@@ -252,21 +253,24 @@
     root = parseJSON("[true, false, null]");
     ASSERT_TRUE(root.get());
     EXPECT_EQ(JSONValue::TypeArray, root->type());
-    ASSERT_TRUE(root->asArray(&list));
+    list = JSONArray::cast(root);
+    ASSERT_TRUE(list);
     EXPECT_EQ(3U, list->length());
 
     // Empty array
     root = parseJSON("[]");
     ASSERT_TRUE(root.get());
     EXPECT_EQ(JSONValue::TypeArray, root->type());
-    ASSERT_TRUE(root->asArray(&list));
+    list = JSONArray::cast(root);
+    ASSERT_TRUE(list);
     EXPECT_EQ(0U, list->length());
 
     // Nested arrays
     root = parseJSON("[[true], [], [false, [], [null]], null]");
     ASSERT_TRUE(root.get());
     EXPECT_EQ(JSONValue::TypeArray, root->type());
-    ASSERT_TRUE(root->asArray(&list));
+    list = JSONArray::cast(root);
+    ASSERT_TRUE(list);
     EXPECT_EQ(4U, list->length());
 
     // Invalid, missing close brace.
@@ -288,7 +292,8 @@
     root = parseJSON("[true]");
     ASSERT_TRUE(root.get());
     EXPECT_EQ(JSONValue::TypeArray, root->type());
-    ASSERT_TRUE(root->asArray(&list));
+    list = JSONArray::cast(root);
+    ASSERT_TRUE(list);
     EXPECT_EQ(1U, list->length());
     tmpValue = list->get(0);
     ASSERT_TRUE(tmpValue.get());
@@ -315,8 +320,8 @@
     root = parseJSON("{\"number\":9.87654321, \"null\":null , \"\\x53\" : \"str\" }");
     ASSERT_TRUE(root.get());
     EXPECT_EQ(JSONValue::TypeObject, root->type());
-    RefPtr<JSONObject> objectVal;
-    ASSERT_TRUE(root->asObject(&objectVal));
+    RefPtr<JSONObject> objectVal = JSONObject::cast(root);
+    ASSERT_TRUE(objectVal);
     doubleVal = 0.0;
     EXPECT_TRUE(objectVal->getNumber("number", &doubleVal));
     EXPECT_DOUBLE_EQ(9.87654321, doubleVal);
@@ -349,7 +354,8 @@
     root = parseJSON("{\"inner\":{\"array\":[true]},\"false\":false,\"d\":{}}");
     ASSERT_TRUE(root.get());
     EXPECT_EQ(JSONValue::TypeObject, root->type());
-    ASSERT_TRUE(root->asObject(&objectVal));
+    objectVal = JSONObject::cast(root);
+    ASSERT_TRUE(objectVal);
     RefPtr<JSONObject> innerObject = objectVal->getObject("inner");
     ASSERT_TRUE(innerObject.get());
     RefPtr<JSONArray> innerArray = innerObject->getArray("array");
@@ -365,7 +371,8 @@
     root = parseJSON("{\"a.b\":3,\"c\":2,\"d.e.f\":{\"g.h.i.j\":1}}");
     ASSERT_TRUE(root.get());
     EXPECT_EQ(JSONValue::TypeObject, root->type());
-    ASSERT_TRUE(root->asObject(&objectVal));
+    objectVal = JSONObject::cast(root);
+    ASSERT_TRUE(objectVal);
     int integerValue = 0;
     EXPECT_TRUE(objectVal->getNumber("a.b", &integerValue));
     EXPECT_EQ(3, integerValue);
@@ -380,7 +387,8 @@
     root = parseJSON("{\"a\":{\"b\":2},\"a.b\":1}");
     ASSERT_TRUE(root.get());
     EXPECT_EQ(JSONValue::TypeObject, root->type());
-    ASSERT_TRUE(root->asObject(&objectVal));
+    objectVal = JSONObject::cast(root);
+    ASSERT_TRUE(objectVal);
     innerObject = objectVal->getObject("a");
     ASSERT_TRUE(innerObject.get());
     EXPECT_TRUE(innerObject->getNumber("b", &integerValue));
@@ -438,7 +446,8 @@
     root = parseJSON(notEvil.toString());
     ASSERT_TRUE(root.get());
     EXPECT_EQ(JSONValue::TypeArray, root->type());
-    ASSERT_TRUE(root->asArray(&list));
+    list = JSONArray::cast(root);
+    ASSERT_TRUE(list);
     EXPECT_EQ(5001U, list->length());
 
     // Test utf8 encoded input
@@ -452,7 +461,8 @@
     root = parseJSON("{\"path\": \"/tmp/\\xc3\\xa0\\xc3\\xa8\\xc3\\xb2.png\"}");
     ASSERT_TRUE(root.get());
     EXPECT_EQ(JSONValue::TypeObject, root->type());
-    EXPECT_TRUE(root->asObject(&objectVal));
+    objectVal = JSONObject::cast(root);
+    ASSERT_TRUE(objectVal);
     EXPECT_TRUE(objectVal->getString("path", &strVal));
     UChar tmp5[] = {0x2f, 0x74, 0x6d, 0x70, 0x2f, 0xe0, 0xe8, 0xf2, 0x2e, 0x70, 0x6e, 0x67};
     EXPECT_EQ(String(tmp5, WTF_ARRAY_LENGTH(tmp5)), strVal);
diff --git a/third_party/WebKit/Source/platform/JSONValues.cpp b/third_party/WebKit/Source/platform/JSONValues.cpp
index 2dbca3a..3b1ef7b 100644
--- a/third_party/WebKit/Source/platform/JSONValues.cpp
+++ b/third_party/WebKit/Source/platform/JSONValues.cpp
@@ -134,26 +134,6 @@
     return false;
 }
 
-bool JSONValue::asObject(RefPtr<JSONObject>*)
-{
-    return false;
-}
-
-bool JSONValue::asArray(RefPtr<JSONArray>*)
-{
-    return false;
-}
-
-PassRefPtr<JSONObject> JSONValue::asObject()
-{
-    return nullptr;
-}
-
-PassRefPtr<JSONArray> JSONValue::asArray()
-{
-    return nullptr;
-}
-
 String JSONValue::toJSONString() const
 {
     StringBuilder result;
@@ -264,75 +244,57 @@
     doubleQuoteStringForJSON(m_stringValue, output);
 }
 
-JSONObjectBase::~JSONObjectBase()
+JSONObject::~JSONObject()
 {
 }
 
-bool JSONObjectBase::asObject(RefPtr<JSONObject>* output)
-{
-    static_assert(sizeof(JSONObject) == sizeof(JSONObjectBase), "cannot cast");
-    *output = static_cast<JSONObject*>(this);
-    return true;
-}
-
-PassRefPtr<JSONObject> JSONObjectBase::asObject()
-{
-    return openAccessors();
-}
-
-void JSONObjectBase::setBoolean(const String& name, bool value)
+void JSONObject::setBoolean(const String& name, bool value)
 {
     setValue(name, JSONBasicValue::create(value));
 }
 
-void JSONObjectBase::setNumber(const String& name, double value)
+void JSONObject::setNumber(const String& name, double value)
 {
     setValue(name, JSONBasicValue::create(value));
 }
 
-void JSONObjectBase::setString(const String& name, const String& value)
+void JSONObject::setString(const String& name, const String& value)
 {
     setValue(name, JSONString::create(value));
 }
 
-void JSONObjectBase::setValue(const String& name, PassRefPtr<JSONValue> value)
+void JSONObject::setValue(const String& name, PassRefPtr<JSONValue> value)
 {
     ASSERT(value);
     if (m_data.set(name, value).isNewEntry)
         m_order.append(name);
 }
 
-void JSONObjectBase::setObject(const String& name, PassRefPtr<JSONObject> value)
+void JSONObject::setObject(const String& name, PassRefPtr<JSONObject> value)
 {
     ASSERT(value);
     if (m_data.set(name, value).isNewEntry)
         m_order.append(name);
 }
 
-void JSONObjectBase::setArray(const String& name, PassRefPtr<JSONArray> value)
+void JSONObject::setArray(const String& name, PassRefPtr<JSONArray> value)
 {
     ASSERT(value);
     if (m_data.set(name, value).isNewEntry)
         m_order.append(name);
 }
 
-JSONObject* JSONObjectBase::openAccessors()
-{
-    static_assert(sizeof(JSONObject) == sizeof(JSONObjectBase), "cannot cast");
-    return static_cast<JSONObject*>(this);
-}
-
-JSONObjectBase::iterator JSONObjectBase::find(const String& name)
+JSONObject::iterator JSONObject::find(const String& name)
 {
     return m_data.find(name);
 }
 
-JSONObjectBase::const_iterator JSONObjectBase::find(const String& name) const
+JSONObject::const_iterator JSONObject::find(const String& name) const
 {
     return m_data.find(name);
 }
 
-bool JSONObjectBase::getBoolean(const String& name, bool* output) const
+bool JSONObject::getBoolean(const String& name, bool* output) const
 {
     RefPtr<JSONValue> value = get(name);
     if (!value)
@@ -340,7 +302,7 @@
     return value->asBoolean(output);
 }
 
-bool JSONObjectBase::getString(const String& name, String* output) const
+bool JSONObject::getString(const String& name, String* output) const
 {
     RefPtr<JSONValue> value = get(name);
     if (!value)
@@ -348,23 +310,17 @@
     return value->asString(output);
 }
 
-PassRefPtr<JSONObject> JSONObjectBase::getObject(const String& name) const
+PassRefPtr<JSONObject> JSONObject::getObject(const String& name) const
 {
-    RefPtr<JSONValue> value = get(name);
-    if (!value)
-        return nullptr;
-    return value->asObject();
+    return JSONObject::cast(get(name));
 }
 
-PassRefPtr<JSONArray> JSONObjectBase::getArray(const String& name) const
+PassRefPtr<JSONArray> JSONObject::getArray(const String& name) const
 {
-    RefPtr<JSONValue> value = get(name);
-    if (!value)
-        return nullptr;
-    return value->asArray();
+    return JSONArray::cast(get(name));
 }
 
-PassRefPtr<JSONValue> JSONObjectBase::get(const String& name) const
+PassRefPtr<JSONValue> JSONObject::get(const String& name) const
 {
     Dictionary::const_iterator it = m_data.find(name);
     if (it == m_data.end())
@@ -372,14 +328,14 @@
     return it->value;
 }
 
-bool JSONObjectBase::booleanProperty(const String& name, bool defaultValue) const
+bool JSONObject::booleanProperty(const String& name, bool defaultValue) const
 {
     bool result = defaultValue;
     getBoolean(name, &result);
     return result;
 }
 
-void JSONObjectBase::remove(const String& name)
+void JSONObject::remove(const String& name)
 {
     m_data.remove(name);
     for (size_t i = 0; i < m_order.size(); ++i) {
@@ -390,7 +346,7 @@
     }
 }
 
-void JSONObjectBase::writeJSON(StringBuilder* output) const
+void JSONObject::writeJSON(StringBuilder* output) const
 {
     output->append('{');
     for (size_t i = 0; i < m_order.size(); ++i) {
@@ -405,7 +361,7 @@
     output->append('}');
 }
 
-void JSONObjectBase::prettyWriteJSONInternal(StringBuilder* output, int depth) const
+void JSONObject::prettyWriteJSONInternal(StringBuilder* output, int depth) const
 {
     output->appendLiteral("{\n");
     for (size_t i = 0; i < m_order.size(); ++i) {
@@ -423,31 +379,18 @@
     output->append('}');
 }
 
-JSONObjectBase::JSONObjectBase()
+JSONObject::JSONObject()
     : JSONValue(TypeObject)
     , m_data()
     , m_order()
 {
 }
 
-JSONArrayBase::~JSONArrayBase()
+JSONArray::~JSONArray()
 {
 }
 
-bool JSONArrayBase::asArray(RefPtr<JSONArray>* output)
-{
-    static_assert(sizeof(JSONArrayBase) == sizeof(JSONArray), "cannot cast");
-    *output = static_cast<JSONArray*>(this);
-    return true;
-}
-
-PassRefPtr<JSONArray> JSONArrayBase::asArray()
-{
-    static_assert(sizeof(JSONArrayBase) == sizeof(JSONArray), "cannot cast");
-    return static_cast<JSONArray*>(this);
-}
-
-void JSONArrayBase::writeJSON(StringBuilder* output) const
+void JSONArray::writeJSON(StringBuilder* output) const
 {
     output->append('[');
     for (Vector<RefPtr<JSONValue>>::const_iterator it = m_data.begin(); it != m_data.end(); ++it) {
@@ -458,7 +401,7 @@
     output->append(']');
 }
 
-void JSONArrayBase::prettyWriteJSONInternal(StringBuilder* output, int depth) const
+void JSONArray::prettyWriteJSONInternal(StringBuilder* output, int depth) const
 {
     output->append('[');
     bool lastInsertedNewLine = false;
@@ -488,51 +431,51 @@
     output->append(']');
 }
 
-JSONArrayBase::JSONArrayBase()
+JSONArray::JSONArray()
     : JSONValue(TypeArray)
     , m_data()
 {
 }
 
-void JSONArrayBase::pushBoolean(bool value)
+void JSONArray::pushBoolean(bool value)
 {
     m_data.append(JSONBasicValue::create(value));
 }
 
-void JSONArrayBase::pushInt(int value)
+void JSONArray::pushInt(int value)
 {
     m_data.append(JSONBasicValue::create(value));
 }
 
-void JSONArrayBase::pushNumber(double value)
+void JSONArray::pushNumber(double value)
 {
     m_data.append(JSONBasicValue::create(value));
 }
 
-void JSONArrayBase::pushString(const String& value)
+void JSONArray::pushString(const String& value)
 {
     m_data.append(JSONString::create(value));
 }
 
-void JSONArrayBase::pushValue(PassRefPtr<JSONValue> value)
+void JSONArray::pushValue(PassRefPtr<JSONValue> value)
 {
     ASSERT(value);
     m_data.append(value);
 }
 
-void JSONArrayBase::pushObject(PassRefPtr<JSONObject> value)
+void JSONArray::pushObject(PassRefPtr<JSONObject> value)
 {
     ASSERT(value);
     m_data.append(value);
 }
 
-void JSONArrayBase::pushArray(PassRefPtr<JSONArray> value)
+void JSONArray::pushArray(PassRefPtr<JSONArray> value)
 {
     ASSERT(value);
     m_data.append(value);
 }
 
-PassRefPtr<JSONValue> JSONArrayBase::get(size_t index)
+PassRefPtr<JSONValue> JSONArray::get(size_t index)
 {
     ASSERT_WITH_SECURITY_IMPLICATION(index < m_data.size());
     return m_data[index];
diff --git a/third_party/WebKit/Source/platform/JSONValues.h b/third_party/WebKit/Source/platform/JSONValues.h
index 4a06be7e..a6cf1ddb 100644
--- a/third_party/WebKit/Source/platform/JSONValues.h
+++ b/third_party/WebKit/Source/platform/JSONValues.h
@@ -56,7 +56,6 @@
 public:
     static const int maxDepth = 1000;
 
-    JSONValue() : m_type(TypeNull) { }
     virtual ~JSONValue() { }
 
     static PassRefPtr<JSONValue> null()
@@ -84,10 +83,6 @@
     virtual bool asNumber(unsigned long* output) const;
     virtual bool asNumber(unsigned* output) const;
     virtual bool asString(String* output) const;
-    virtual bool asObject(RefPtr<JSONObject>* output);
-    virtual bool asArray(RefPtr<JSONArray>* output);
-    virtual PassRefPtr<JSONObject> asObject();
-    virtual PassRefPtr<JSONArray> asArray();
 
     String toJSONString() const;
     String toPrettyJSONString() const;
@@ -97,12 +92,13 @@
     static String quoteString(const String&);
 
 protected:
+    JSONValue() : m_type(TypeNull) { }
     explicit JSONValue(Type type) : m_type(type) { }
     virtual void prettyWriteJSONInternal(StringBuilder* output, int depth) const;
 
 private:
-    friend class JSONObjectBase;
-    friend class JSONArrayBase;
+    friend class JSONObject;
+    friend class JSONArray;
 
     Type m_type;
 };
@@ -168,7 +164,7 @@
     String m_stringValue;
 };
 
-class PLATFORM_EXPORT JSONObjectBase : public JSONValue {
+class PLATFORM_EXPORT JSONObject : public JSONValue {
 private:
     typedef HashMap<String, RefPtr<JSONValue>> Dictionary;
 
@@ -176,18 +172,22 @@
     typedef Dictionary::iterator iterator;
     typedef Dictionary::const_iterator const_iterator;
 
-    PassRefPtr<JSONObject> asObject() override;
-    JSONObject* openAccessors();
+    static PassRefPtr<JSONObject> create()
+    {
+        return adoptRef(new JSONObject());
+    }
+
+    static PassRefPtr<JSONObject> cast(PassRefPtr<JSONValue> value)
+    {
+        if (!value || value->type() != TypeObject)
+            return nullptr;
+        return adoptRef(static_cast<JSONObject*>(value.leakRef()));
+    }
 
     void writeJSON(StringBuilder* output) const override;
 
     int size() const { return m_data.size(); }
 
-protected:
-    ~JSONObjectBase() override;
-
-    bool asObject(RefPtr<JSONObject>* output) override;
-
     void setBoolean(const String& name, bool);
     void setNumber(const String& name, double);
     void setString(const String& name, const String&);
@@ -214,72 +214,43 @@
 
     void remove(const String& name);
 
-    void prettyWriteJSONInternal(StringBuilder* output, int depth) const override;
-
     iterator begin() { return m_data.begin(); }
     iterator end() { return m_data.end(); }
     const_iterator begin() const { return m_data.begin(); }
     const_iterator end() const { return m_data.end(); }
+    ~JSONObject() override;
 
 protected:
-    JSONObjectBase();
+    void prettyWriteJSONInternal(StringBuilder* output, int depth) const override;
 
 private:
+    JSONObject();
+
     Dictionary m_data;
     Vector<String> m_order;
 };
 
-class PLATFORM_EXPORT JSONObject : public JSONObjectBase {
-public:
-    static PassRefPtr<JSONObject> create()
-    {
-        return adoptRef(new JSONObject());
-    }
-
-    using JSONObjectBase::asObject;
-
-    using JSONObjectBase::setBoolean;
-    using JSONObjectBase::setNumber;
-    using JSONObjectBase::setString;
-    using JSONObjectBase::setValue;
-    using JSONObjectBase::setObject;
-    using JSONObjectBase::setArray;
-
-    using JSONObjectBase::find;
-    using JSONObjectBase::getBoolean;
-    using JSONObjectBase::getNumber;
-    using JSONObjectBase::getString;
-    using JSONObjectBase::getObject;
-    using JSONObjectBase::getArray;
-    using JSONObjectBase::get;
-
-    using JSONObjectBase::booleanProperty;
-
-    using JSONObjectBase::remove;
-
-    using JSONObjectBase::begin;
-    using JSONObjectBase::end;
-
-    using JSONObjectBase::size;
-};
-
-
-class PLATFORM_EXPORT JSONArrayBase : public JSONValue {
+class PLATFORM_EXPORT JSONArray : public JSONValue {
 public:
     typedef Vector<RefPtr<JSONValue>>::iterator iterator;
     typedef Vector<RefPtr<JSONValue>>::const_iterator const_iterator;
 
-    PassRefPtr<JSONArray> asArray() override;
+    static PassRefPtr<JSONArray> create()
+    {
+        return adoptRef(new JSONArray());
+    }
 
-    unsigned length() const { return m_data.size(); }
+    static PassRefPtr<JSONArray> cast(PassRefPtr<JSONValue> value)
+    {
+        if (!value || value->type() != TypeArray)
+            return nullptr;
+        return adoptRef(static_cast<JSONArray*>(value.leakRef()));
+    }
+
+    ~JSONArray() override;
 
     void writeJSON(StringBuilder* output) const override;
 
-protected:
-    ~JSONArrayBase() override;
-
-    bool asArray(RefPtr<JSONArray>* output) override;
-
     void pushBoolean(bool);
     void pushInt(int);
     void pushNumber(double);
@@ -289,8 +260,7 @@
     void pushArray(PassRefPtr<JSONArray>);
 
     PassRefPtr<JSONValue> get(size_t index);
-
-    void prettyWriteJSONInternal(StringBuilder* output, int depth) const override;
+    unsigned length() const { return m_data.size(); }
 
     iterator begin() { return m_data.begin(); }
     iterator end() { return m_data.end(); }
@@ -298,35 +268,13 @@
     const_iterator end() const { return m_data.end(); }
 
 protected:
-    JSONArrayBase();
+    void prettyWriteJSONInternal(StringBuilder* output, int depth) const override;
 
 private:
+    JSONArray();
     Vector<RefPtr<JSONValue>> m_data;
 };
 
-class PLATFORM_EXPORT JSONArray : public JSONArrayBase {
-public:
-    static PassRefPtr<JSONArray> create()
-    {
-        return adoptRef(new JSONArray());
-    }
-
-    using JSONArrayBase::asArray;
-
-    using JSONArrayBase::pushBoolean;
-    using JSONArrayBase::pushInt;
-    using JSONArrayBase::pushNumber;
-    using JSONArrayBase::pushString;
-    using JSONArrayBase::pushValue;
-    using JSONArrayBase::pushObject;
-    using JSONArrayBase::pushArray;
-
-    using JSONArrayBase::get;
-
-    using JSONArrayBase::begin;
-    using JSONArrayBase::end;
-};
-
 PLATFORM_EXPORT void escapeStringForJSON(const String&, StringBuilder*);
 void doubleQuoteStringForJSON(const String&, StringBuilder*);
 
diff --git a/third_party/WebKit/Source/platform/animation/CompositorAnimation.cpp b/third_party/WebKit/Source/platform/animation/CompositorAnimation.cpp
index 6dd71a6d..2e8c2cc0 100644
--- a/third_party/WebKit/Source/platform/animation/CompositorAnimation.cpp
+++ b/third_party/WebKit/Source/platform/animation/CompositorAnimation.cpp
@@ -21,17 +21,7 @@
 
 namespace blink {
 
-#define STATIC_ASSERT_ENUM(a, b)                              \
-    static_assert(static_cast<int>(a) == static_cast<int>(b), \
-        "mismatching enums: " #a)
-
-// TargetProperty
-STATIC_ASSERT_ENUM(CompositorAnimation::TargetPropertyTransform, cc::Animation::TRANSFORM);
-STATIC_ASSERT_ENUM(CompositorAnimation::TargetPropertyOpacity, cc::Animation::OPACITY);
-STATIC_ASSERT_ENUM(CompositorAnimation::TargetPropertyFilter, cc::Animation::FILTER);
-STATIC_ASSERT_ENUM(CompositorAnimation::TargetPropertyScrollOffset, cc::Animation::SCROLL_OFFSET);
-
-CompositorAnimation::CompositorAnimation(const CompositorAnimationCurve& webCurve, TargetProperty targetProperty, int animationId, int groupId)
+CompositorAnimation::CompositorAnimation(const CompositorAnimationCurve& webCurve, CompositorTargetProperty::Type targetProperty, int animationId, int groupId)
 {
     if (!animationId)
         animationId = AnimationIdProvider::NextAnimationId();
@@ -62,9 +52,7 @@
         break;
     }
     }
-    m_animation = Animation::Create(
-        std::move(curve), animationId, groupId,
-        static_cast<cc::Animation::TargetProperty>(targetProperty));
+    m_animation = Animation::Create(std::move(curve), animationId, groupId, targetProperty);
 }
 
 CompositorAnimation::CompositorAnimation() {}
@@ -81,9 +69,9 @@
     return m_animation->group();
 }
 
-blink::CompositorAnimation::TargetProperty CompositorAnimation::targetProperty() const
+CompositorTargetProperty::Type CompositorAnimation::targetProperty() const
 {
-    return static_cast<CompositorAnimation::TargetProperty>(m_animation->target_property());
+    return m_animation->target_property();
 }
 
 double CompositorAnimation::iterations() const
diff --git a/third_party/WebKit/Source/platform/animation/CompositorAnimation.h b/third_party/WebKit/Source/platform/animation/CompositorAnimation.h
index 80211b6..17d2a652 100644
--- a/third_party/WebKit/Source/platform/animation/CompositorAnimation.h
+++ b/third_party/WebKit/Source/platform/animation/CompositorAnimation.h
@@ -7,6 +7,7 @@
 
 #include "base/memory/scoped_ptr.h"
 #include "platform/PlatformExport.h"
+#include "platform/animation/CompositorTargetProperty.h"
 #include "wtf/Noncopyable.h"
 
 namespace cc {
@@ -21,13 +22,6 @@
 class PLATFORM_EXPORT CompositorAnimation {
     WTF_MAKE_NONCOPYABLE(CompositorAnimation);
 public:
-    enum TargetProperty {
-        TargetPropertyTransform,
-        TargetPropertyOpacity,
-        TargetPropertyFilter,
-        TargetPropertyScrollOffset
-    };
-
     enum Direction {
         DirectionNormal,
         DirectionReverse,
@@ -42,14 +36,14 @@
         FillModeBoth
     };
 
-    CompositorAnimation(const CompositorAnimationCurve&, TargetProperty, int animationId, int groupId);
+    CompositorAnimation(const CompositorAnimationCurve&, CompositorTargetProperty::Type, int animationId, int groupId);
     virtual ~CompositorAnimation();
 
     // An id must be unique.
     virtual int id();
     virtual int group();
 
-    virtual TargetProperty targetProperty() const;
+    virtual CompositorTargetProperty::Type targetProperty() const;
 
     // This is the number of times that the animation will play. If this
     // value is zero the animation will not play. If it is negative, then
diff --git a/third_party/WebKit/Source/platform/animation/CompositorAnimationPlayer.cpp b/third_party/WebKit/Source/platform/animation/CompositorAnimationPlayer.cpp
index 21147bd..ca747797 100644
--- a/third_party/WebKit/Source/platform/animation/CompositorAnimationPlayer.cpp
+++ b/third_party/WebKit/Source/platform/animation/CompositorAnimationPlayer.cpp
@@ -70,7 +70,7 @@
 
 void CompositorAnimationPlayer::NotifyAnimationStarted(
     base::TimeTicks monotonicTime,
-    cc::Animation::TargetProperty targetProperty,
+    cc::TargetProperty::Type targetProperty,
     int group)
 {
     if (m_delegate)
@@ -79,7 +79,7 @@
 
 void CompositorAnimationPlayer::NotifyAnimationFinished(
     base::TimeTicks monotonicTime,
-    cc::Animation::TargetProperty targetProperty,
+    cc::TargetProperty::Type targetProperty,
     int group)
 {
     if (m_delegate)
@@ -88,7 +88,7 @@
 
 void CompositorAnimationPlayer::NotifyAnimationAborted(
     base::TimeTicks monotonicTime,
-    cc::Animation::TargetProperty targetProperty,
+    cc::TargetProperty::Type targetProperty,
     int group)
 {
     if (m_delegate)
diff --git a/third_party/WebKit/Source/platform/animation/CompositorAnimationPlayer.h b/third_party/WebKit/Source/platform/animation/CompositorAnimationPlayer.h
index 9019fe6..b58d656 100644
--- a/third_party/WebKit/Source/platform/animation/CompositorAnimationPlayer.h
+++ b/third_party/WebKit/Source/platform/animation/CompositorAnimationPlayer.h
@@ -45,9 +45,9 @@
 
 private:
     // cc::AnimationDelegate implementation.
-    void NotifyAnimationStarted(base::TimeTicks monotonicTime, cc::Animation::TargetProperty, int group) override;
-    void NotifyAnimationFinished(base::TimeTicks monotonicTime, cc::Animation::TargetProperty, int group) override;
-    void NotifyAnimationAborted(base::TimeTicks monotonicTime, cc::Animation::TargetProperty, int group) override;
+    void NotifyAnimationStarted(base::TimeTicks monotonicTime, cc::TargetProperty::Type, int group) override;
+    void NotifyAnimationFinished(base::TimeTicks monotonicTime, cc::TargetProperty::Type, int group) override;
+    void NotifyAnimationAborted(base::TimeTicks monotonicTime, cc::TargetProperty::Type, int group) override;
 
     scoped_refptr<cc::AnimationPlayer> m_animationPlayer;
     WebCompositorAnimationDelegate* m_delegate;
diff --git a/third_party/WebKit/Source/platform/animation/CompositorAnimationPlayerTest.cpp b/third_party/WebKit/Source/platform/animation/CompositorAnimationPlayerTest.cpp
index 792d2b7..2aa9eb0 100644
--- a/third_party/WebKit/Source/platform/animation/CompositorAnimationPlayerTest.cpp
+++ b/third_party/WebKit/Source/platform/animation/CompositorAnimationPlayerTest.cpp
@@ -6,6 +6,7 @@
 
 #include "base/memory/scoped_ptr.h"
 #include "base/time/time.h"
+#include "platform/animation/CompositorTargetProperty.h"
 #include "public/platform/WebCompositorAnimationDelegate.h"
 #include "testing/gmock/include/gmock/gmock.h"
 #include "testing/gtest/include/gtest/gtest.h"
@@ -40,10 +41,10 @@
     cc::AnimationPlayer* player = webPlayer->animationPlayer();
 
     webPlayer->setAnimationDelegate(delegate.get());
-    player->NotifyAnimationFinished(TimeTicks(), Animation::SCROLL_OFFSET, 0);
+    player->NotifyAnimationFinished(TimeTicks(), CompositorTargetProperty::SCROLL_OFFSET, 0);
 
     webPlayer->setAnimationDelegate(nullptr);
-    player->NotifyAnimationFinished(TimeTicks(), Animation::SCROLL_OFFSET, 0);
+    player->NotifyAnimationFinished(TimeTicks(), CompositorTargetProperty::SCROLL_OFFSET, 0);
 }
 
 } // namespace blink
diff --git a/third_party/WebKit/Source/platform/animation/CompositorAnimationTest.cpp b/third_party/WebKit/Source/platform/animation/CompositorAnimationTest.cpp
index 4eb4b47..d68d4be 100644
--- a/third_party/WebKit/Source/platform/animation/CompositorAnimationTest.cpp
+++ b/third_party/WebKit/Source/platform/animation/CompositorAnimationTest.cpp
@@ -13,7 +13,7 @@
 {
     scoped_ptr<CompositorAnimationCurve> curve(new CompositorFloatAnimationCurve());
     scoped_ptr<CompositorAnimation> animation(new CompositorAnimation(
-        *curve, CompositorAnimation::TargetPropertyOpacity, 1, 0));
+        *curve, CompositorTargetProperty::OPACITY, 1, 0));
 
     // Ensure that the defaults are correct.
     EXPECT_EQ(1, animation->iterations());
@@ -26,7 +26,7 @@
 {
     scoped_ptr<CompositorFloatAnimationCurve> curve(new CompositorFloatAnimationCurve());
     scoped_ptr<CompositorAnimation> animation(new CompositorAnimation(
-        *curve, CompositorAnimation::TargetPropertyOpacity, 1, 0));
+        *curve, CompositorTargetProperty::OPACITY, 1, 0));
     animation->setIterations(2);
     animation->setStartTime(2);
     animation->setTimeOffset(2);
diff --git a/third_party/WebKit/Source/platform/animation/CompositorTargetProperty.h b/third_party/WebKit/Source/platform/animation/CompositorTargetProperty.h
new file mode 100644
index 0000000..9c091c9
--- /dev/null
+++ b/third_party/WebKit/Source/platform/animation/CompositorTargetProperty.h
@@ -0,0 +1,16 @@
+// 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 CompositorTargetProperty_h
+#define CompositorTargetProperty_h
+
+#include "cc/animation/target_property.h"
+
+namespace blink {
+
+namespace CompositorTargetProperty = cc::TargetProperty;
+
+} // namespace blink
+
+#endif // CompositorTargetProperty_h
diff --git a/third_party/WebKit/Source/platform/blink_platform.gypi b/third_party/WebKit/Source/platform/blink_platform.gypi
index 35a2a63..0cb2f1a 100644
--- a/third_party/WebKit/Source/platform/blink_platform.gypi
+++ b/third_party/WebKit/Source/platform/blink_platform.gypi
@@ -150,11 +150,6 @@
       'animation/AnimationTranslationUtil.cpp',
       'animation/AnimationTranslationUtil.h',
       'animation/AnimationUtilities.h',
-      'animation/CubicBezierControlPoints.cpp',
-      'animation/CubicBezierControlPoints.h',
-      'animation/TimingFunction.cpp',
-      'animation/TimingFunction.h',
-      'animation/UnitBezier.h',
       'animation/CompositorAnimation.cpp',
       'animation/CompositorAnimation.h',
       'animation/CompositorAnimationCurve.cpp',
@@ -174,12 +169,18 @@
       'animation/CompositorFloatKeyframe.h',
       'animation/CompositorScrollOffsetAnimationCurve.cpp',
       'animation/CompositorScrollOffsetAnimationCurve.h',
+      'animation/CompositorTargetProperty.h',
       'animation/CompositorTransformAnimationCurve.cpp',
       'animation/CompositorTransformAnimationCurve.h',
       'animation/CompositorTransformKeyframe.cpp',
       'animation/CompositorTransformKeyframe.h',
       'animation/CompositorTransformOperations.cpp',
       'animation/CompositorTransformOperations.h',
+      'animation/CubicBezierControlPoints.cpp',
+      'animation/CubicBezierControlPoints.h',
+      'animation/TimingFunction.cpp',
+      'animation/TimingFunction.h',
+      'animation/UnitBezier.h',
       'audio/AudioArray.h',
       'audio/AudioBus.cpp',
       'audio/AudioBus.h',
diff --git a/third_party/WebKit/Source/platform/graphics/CompositorFactory.cpp b/third_party/WebKit/Source/platform/graphics/CompositorFactory.cpp
index 8695aea..6ab41fd 100644
--- a/third_party/WebKit/Source/platform/graphics/CompositorFactory.cpp
+++ b/third_party/WebKit/Source/platform/graphics/CompositorFactory.cpp
@@ -51,7 +51,7 @@
         return new CompositorFilterOperations();
     }
 
-    CompositorAnimation* createAnimation(const blink::CompositorAnimationCurve& curve, blink::CompositorAnimation::TargetProperty target, int groupId, int animationId) override
+    CompositorAnimation* createAnimation(const blink::CompositorAnimationCurve& curve, CompositorTargetProperty::Type target, int groupId, int animationId) override
     {
         return new CompositorAnimation(curve, target, animationId, groupId);
     }
diff --git a/third_party/WebKit/Source/platform/graphics/CompositorFactory.h b/third_party/WebKit/Source/platform/graphics/CompositorFactory.h
index 143a9918..612dfda 100644
--- a/third_party/WebKit/Source/platform/graphics/CompositorFactory.h
+++ b/third_party/WebKit/Source/platform/graphics/CompositorFactory.h
@@ -46,7 +46,7 @@
 
     virtual CompositorFilterOperations* createFilterOperations() { return nullptr; }
 
-    virtual CompositorAnimation* createAnimation(const CompositorAnimationCurve&, CompositorAnimation::TargetProperty, int groupId = 0, int animationId = 0) { return nullptr; }
+    virtual CompositorAnimation* createAnimation(const CompositorAnimationCurve&, CompositorTargetProperty::Type, int groupId = 0, int animationId = 0) { return nullptr; }
 
     virtual CompositorAnimationPlayer* createAnimationPlayer() { return nullptr; }
 
diff --git a/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp b/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp
index b273126..75065b1 100644
--- a/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp
+++ b/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp
@@ -580,7 +580,7 @@
 template <typename T>
 static PassRefPtr<JSONArray> pointAsJSONArray(const T& point)
 {
-    RefPtr<JSONArray> array = adoptRef(new JSONArray);
+    RefPtr<JSONArray> array = JSONArray::create();
     array->pushNumber(point.x());
     array->pushNumber(point.y());
     return array;
@@ -589,7 +589,7 @@
 template <typename T>
 static PassRefPtr<JSONArray> sizeAsJSONArray(const T& size)
 {
-    RefPtr<JSONArray> array = adoptRef(new JSONArray);
+    RefPtr<JSONArray> array = JSONArray::create();
     array->pushNumber(size.width());
     array->pushNumber(size.height());
     return array;
@@ -598,7 +598,7 @@
 template <typename T>
 static PassRefPtr<JSONArray> rectAsJSONArray(const T& rect)
 {
-    RefPtr<JSONArray> array = adoptRef(new JSONArray);
+    RefPtr<JSONArray> array = JSONArray::create();
     array->pushNumber(rect.x());
     array->pushNumber(rect.y());
     array->pushNumber(rect.width());
@@ -613,9 +613,9 @@
 
 static PassRefPtr<JSONArray> transformAsJSONArray(const TransformationMatrix& t)
 {
-    RefPtr<JSONArray> array = adoptRef(new JSONArray);
+    RefPtr<JSONArray> array = JSONArray::create();
     {
-        RefPtr<JSONArray> row = adoptRef(new JSONArray);
+        RefPtr<JSONArray> row = JSONArray::create();
         row->pushNumber(roundCloseToZero(t.m11()));
         row->pushNumber(roundCloseToZero(t.m12()));
         row->pushNumber(roundCloseToZero(t.m13()));
@@ -623,7 +623,7 @@
         array->pushArray(row);
     }
     {
-        RefPtr<JSONArray> row = adoptRef(new JSONArray);
+        RefPtr<JSONArray> row = JSONArray::create();
         row->pushNumber(roundCloseToZero(t.m21()));
         row->pushNumber(roundCloseToZero(t.m22()));
         row->pushNumber(roundCloseToZero(t.m23()));
@@ -631,7 +631,7 @@
         array->pushArray(row);
     }
     {
-        RefPtr<JSONArray> row = adoptRef(new JSONArray);
+        RefPtr<JSONArray> row = JSONArray::create();
         row->pushNumber(roundCloseToZero(t.m31()));
         row->pushNumber(roundCloseToZero(t.m32()));
         row->pushNumber(roundCloseToZero(t.m33()));
@@ -639,7 +639,7 @@
         array->pushArray(row);
     }
     {
-        RefPtr<JSONArray> row = adoptRef(new JSONArray);
+        RefPtr<JSONArray> row = JSONArray::create();
         row->pushNumber(roundCloseToZero(t.m41()));
         row->pushNumber(roundCloseToZero(t.m42()));
         row->pushNumber(roundCloseToZero(t.m43()));
@@ -658,7 +658,7 @@
 
 PassRefPtr<JSONObject> GraphicsLayer::layerTreeAsJSON(LayerTreeFlags flags, RenderingContextMap& renderingContextMap) const
 {
-    RefPtr<JSONObject> json = adoptRef(new JSONObject);
+    RefPtr<JSONObject> json = JSONObject::create();
 
     if (flags & LayerTreeIncludesDebugInfo) {
         json->setString("this", pointerAsString(this));
@@ -730,7 +730,7 @@
             Vector<FloatRect>& rects = it->value.invalidationRects;
             if (!rects.isEmpty()) {
                 std::sort(rects.begin(), rects.end(), &compareFloatRects);
-                RefPtr<JSONArray> rectsJSON = adoptRef(new JSONArray);
+                RefPtr<JSONArray> rectsJSON = JSONArray::create();
                 for (auto& rect : rects) {
                     if (rect.isEmpty())
                         continue;
@@ -743,7 +743,7 @@
         if (flags & LayerTreeIncludesPaintInvalidationObjects) {
             Vector<String>& clients = it->value.invalidationObjects;
             if (!clients.isEmpty()) {
-                RefPtr<JSONArray> clientsJSON = adoptRef(new JSONArray);
+                RefPtr<JSONArray> clientsJSON = JSONArray::create();
                 for (auto& clientString : clients)
                     clientsJSON->pushString(clientString);
                 json->setArray("paintInvalidationClients", clientsJSON);
@@ -752,7 +752,7 @@
     }
 
     if ((flags & LayerTreeIncludesPaintingPhases) && m_paintingPhase) {
-        RefPtr<JSONArray> paintingPhasesJSON = adoptRef(new JSONArray);
+        RefPtr<JSONArray> paintingPhasesJSON = JSONArray::create();
         if (m_paintingPhase & GraphicsLayerPaintBackground)
             paintingPhasesJSON->pushString("GraphicsLayerPaintBackground");
         if (m_paintingPhase & GraphicsLayerPaintForeground)
@@ -777,14 +777,14 @@
 
     if (flags & (LayerTreeIncludesDebugInfo | LayerTreeIncludesCompositingReasons)) {
         bool debug = flags & LayerTreeIncludesDebugInfo;
-        RefPtr<JSONArray> compositingReasonsJSON = adoptRef(new JSONArray);
+        RefPtr<JSONArray> compositingReasonsJSON = JSONArray::create();
         for (size_t i = 0; i < kNumberOfCompositingReasons; ++i) {
             if (m_debugInfo.compositingReasons() & kCompositingReasonStringMap[i].reason)
                 compositingReasonsJSON->pushString(debug ? kCompositingReasonStringMap[i].description : kCompositingReasonStringMap[i].shortName);
         }
         json->setArray("compositingReasons", compositingReasonsJSON);
 
-        RefPtr<JSONArray> squashingDisallowedReasonsJSON = adoptRef(new JSONArray);
+        RefPtr<JSONArray> squashingDisallowedReasonsJSON = JSONArray::create();
         for (size_t i = 0; i < kNumberOfSquashingDisallowedReasons; ++i) {
             if (m_debugInfo.squashingDisallowedReasons() & kSquashingDisallowedReasonStringMap[i].reason)
                 squashingDisallowedReasonsJSON->pushString(debug ? kSquashingDisallowedReasonStringMap[i].description : kSquashingDisallowedReasonStringMap[i].shortName);
@@ -793,7 +793,7 @@
     }
 
     if (m_children.size()) {
-        RefPtr<JSONArray> childrenJSON = adoptRef(new JSONArray);
+        RefPtr<JSONArray> childrenJSON = JSONArray::create();
         for (size_t i = 0; i < m_children.size(); i++)
             childrenJSON->pushObject(m_children[i]->layerTreeAsJSON(flags, renderingContextMap));
         json->setArray("children", childrenJSON);
diff --git a/third_party/WebKit/Source/platform/graphics/GraphicsLayerTest.cpp b/third_party/WebKit/Source/platform/graphics/GraphicsLayerTest.cpp
index d1e7faf..5a62bb9c 100644
--- a/third_party/WebKit/Source/platform/graphics/GraphicsLayerTest.cpp
+++ b/third_party/WebKit/Source/platform/graphics/GraphicsLayerTest.cpp
@@ -122,7 +122,7 @@
 
     OwnPtr<CompositorFloatAnimationCurve> curve = adoptPtr(CompositorFactory::current().createFloatAnimationCurve());
     curve->add(CompositorFloatKeyframe(0.0, 0.0));
-    OwnPtr<CompositorAnimation> floatAnimation(adoptPtr(CompositorFactory::current().createAnimation(*curve, CompositorAnimation::TargetPropertyOpacity)));
+    OwnPtr<CompositorAnimation> floatAnimation(adoptPtr(CompositorFactory::current().createAnimation(*curve, CompositorTargetProperty::OPACITY)));
     int animationId = floatAnimation->id();
 
     if (RuntimeEnabledFeatures::compositorAnimationTimelinesEnabled()) {
diff --git a/third_party/WebKit/Source/platform/inspector_protocol/CodeGenerator.py b/third_party/WebKit/Source/platform/inspector_protocol/CodeGenerator.py
index e85a96d3..5aa0820d 100644
--- a/third_party/WebKit/Source/platform/inspector_protocol/CodeGenerator.py
+++ b/third_party/WebKit/Source/platform/inspector_protocol/CodeGenerator.py
@@ -108,12 +108,8 @@
         "type": "OwnPtr<protocol::%s::%s>" % (domain_name, type["id"]),
         "raw_type": "protocol::%s::%s" % (domain_name, type["id"]),
         "create_type": "adoptPtr(new protocol::%s::%s())" % (domain_name, type["id"]),
-        "optional_type": "OwnPtr<protocol::%s::%s>" % (domain_name, type["id"]),
-        "optional_pass_type": "PassOwnPtr<protocol::%s::%s>" % (domain_name, type["id"]),
-        "from_optional_out": "%s.release()",
         "json_getter": "FromValue<protocol::%s::%s>::convert(getObject(%%s))" % (domain_name, type["id"]),
         "json_type": "TypeObject",
-        "nullable": True,
     }
 
 
@@ -124,12 +120,8 @@
         "to_pass_type": "%s.release()",
         "type": "RefPtr<JSONObject>",
         "raw_type": "RefPtr<JSONObject>",
-        "optional_type": "RefPtr<JSONObject>",
-        "optional_pass_type": "PassRefPtr<JSONObject>",
-        "from_optional_out": "%s.release()",
         "json_getter": "getObject(%s)",
         "json_type": "TypeObject",
-        "nullable": True,
     }
 
 
@@ -140,11 +132,7 @@
         "to_pass_type": "%s.release()",
         "type": "RefPtr<JSONValue>",
         "raw_type": "RefPtr<JSONValue>",
-        "optional_type": "RefPtr<JSONValue>",
-        "optional_pass_type": "PassRefPtr<JSONValue>",
-        "from_optional_out": "%s.release()",
         "json_getter": "getValue(%s)",
-        "nullable": True,
     }
 
 
@@ -156,12 +144,8 @@
             "to_pass_type": "%s",
             "type": "String",
             "raw_type": "String",
-            "optional_type": "protocol::OptionalValue<String>",
-            "optional_pass_type": "const protocol::OptionalValue<String>&",
-            "from_optional_out": "%s.get()",
             "json_getter": "getString(%s)",
             "json_type": "TypeString",
-            "nullable": False,
         }
 
     typedefs = {
@@ -180,12 +164,8 @@
         "to_pass_type": "%s",
         "type": typedefs[type],
         "raw_type": typedefs[type],
-        "optional_type": "protocol::OptionalValue<" + typedefs[type] + ">",
-        "optional_pass_type": "const protocol::OptionalValue<" + typedefs[type] + ">&",
-        "from_optional_out": "%s.get()",
         "json_getter": "get" + to_title_case(type) + "(%s)",
         "json_type": jsontypes[type],
-        "nullable": False,
     }
 
 type_definitions = {}
@@ -206,12 +186,8 @@
         "raw_type": "protocol::Array<%s>" % type["raw_type"],
         "create_type": "adoptPtr(new protocol::Array<%s>())" % type["raw_type"],
         "out_type": "protocol::Array<%s>&" % type["raw_type"],
-        "optional_type": "OwnPtr<protocol::Array<%s>>" % type["raw_type"],
-        "optional_pass_type": "PassOwnPtr<protocol::Array<%s>>" % type["raw_type"],
-        "from_optional_out": "%s.release()",
         "json_getter": "protocol::Array<%s>::runtimeCast(getArray(%%s))" % type["raw_type"],
         "json_type": "TypeArray",
-        "nullable": True,
     }
 
 
diff --git a/third_party/WebKit/Source/platform/inspector_protocol/Dispatcher_cpp.template b/third_party/WebKit/Source/platform/inspector_protocol/Dispatcher_cpp.template
index 95538cf..a82b0ea 100644
--- a/third_party/WebKit/Source/platform/inspector_protocol/Dispatcher_cpp.template
+++ b/third_party/WebKit/Source/platform/inspector_protocol/Dispatcher_cpp.template
@@ -13,7 +13,7 @@
 namespace blink {
 namespace protocol {
 
-using protocol::OptionalValue;
+using protocol::Maybe;
 
 class DispatcherImpl : public Dispatcher {
 public:
@@ -71,12 +71,12 @@
 {% endfor %}
 
     template<typename R, typename V, typename V0>
-    static R getPropertyValueImpl(JSONObject* object, const char* name, bool* valueFound, JSONArray* protocolErrors, V0 initial_value, bool (*as_method)(JSONValue*, V*), const char* type_name);
+    static R getPropertyValueImpl(JSONObject* object, const char* name, bool* valueFound, JSONArray* protocolErrors, V0 initial_value, bool (*as_method)(PassRefPtr<JSONValue>, V*), const char* type_name);
 
-    static OptionalValue<int> getInteger(JSONObject* object, const char* name, bool isOptional, JSONArray* protocolErrors);
-    static OptionalValue<double> getNumber(JSONObject* object, const char* name, bool isOptional, JSONArray* protocolErrors);
-    static OptionalValue<String> getString(JSONObject* object, const char* name, bool isOptional, JSONArray* protocolErrors);
-    static OptionalValue<bool> getBoolean(JSONObject* object, const char* name, bool isOptional, JSONArray* protocolErrors);
+    static Maybe<int> getInteger(JSONObject* object, const char* name, bool isOptional, JSONArray* protocolErrors);
+    static Maybe<double> getNumber(JSONObject* object, const char* name, bool isOptional, JSONArray* protocolErrors);
+    static Maybe<String> getString(JSONObject* object, const char* name, bool isOptional, JSONArray* protocolErrors);
+    static Maybe<bool> getBoolean(JSONObject* object, const char* name, bool isOptional, JSONArray* protocolErrors);
     static PassRefPtr<JSONObject> getObject(JSONObject* object, const char* name, bool isOptional, JSONArray* protocolErrors);
     static PassRefPtr<JSONArray> getArray(JSONObject* object, const char* name, bool isOptional, JSONArray* protocolErrors);
 
@@ -108,7 +108,7 @@
 void Dispatcher::{{domain.domain}}CommandHandler::{{command.name | to_title_case}}Callback::sendSuccess(
       {%- for parameter in command.returns -%}
         {%- if "optional" in parameter -%}
-        {{resolve_type(parameter).optional_pass_type}} {{parameter.name}}
+        const Maybe<{{resolve_type(parameter).raw_type}}>& {{parameter.name}}
         {%- else -%}
         {{resolve_type(parameter).pass_type}} {{parameter.name}}
         {%- endif -%}
@@ -118,9 +118,8 @@
     RefPtr<JSONObject> resultObject = JSONObject::create();
       {% for parameter in command.returns %}
         {% if "optional" in parameter %}
-    {{resolve_type(parameter).optional_type}} opt_{{parameter.name}} = {{parameter.name}};
-    if (hasValue({{parameter.name}}))
-        resultObject->setValue("{{parameter.name}}", toValue({{resolve_type(parameter).from_optional_out % ("opt_" + parameter.name)}}));
+    if ({{parameter.name}}.isJust())
+        resultObject->setValue("{{parameter.name}}", toValue({{parameter.name}}));
        {% else %}
     resultObject->setValue("{{parameter.name}}", toValue({{parameter.name}}));
         {% endif %}
@@ -144,7 +143,7 @@
     RefPtr<JSONObject> paramsContainer = requestMessageObject->getObject("params");
     JSONObject* paramsContainerPtr = paramsContainer.get();
       {% for property in command.parameters %}
-    {{resolve_type(property).optional_type}} in_{{property.name}} = {{resolve_type(property).json_getter % ("paramsContainerPtr, \"" + property.name + "\", " + ("true" if "optional" in property else "false") + ", protocolErrors")}};
+    Maybe<{{resolve_type(property).raw_type}}> in_{{property.name}} = {{resolve_type(property).json_getter % ("paramsContainerPtr, \"" + property.name + "\", " + ("true" if "optional" in property else "false") + ", protocolErrors")}};
       {% endfor %}
     {% endif %}
 
@@ -160,7 +159,7 @@
     RefPtr<JSONObject> result = JSONObject::create();
       {% for property in command.returns %}
         {% if "optional" in property %}
-    {{resolve_type(property).optional_type}} out_{{property.name}};
+    Maybe<{{resolve_type(property).raw_type}}> out_{{property.name}};
         {% else %}
     {{resolve_type(property).type}} out_{{property.name}};
         {% endif %}
@@ -171,9 +170,9 @@
     m_{{domain.domain | lower}}Agent->{{command.name}}(&error
       {%- for property in command.parameters -%}
         {%- if "optional" in property -%}
-        , {{resolve_type(property).to_pass_type % ("in_" + property.name)}}
+        , in_{{property.name}}
         {%- else -%}
-        , {{resolve_type(property).from_optional_out % ("in_" + property.name)}}
+        , in_{{property.name}}.takeJust()
         {%- endif -%}
       {%- endfor %}
       {%- if "async" in command -%}
@@ -187,8 +186,8 @@
     if (!error.length()) {
       {% for parameter in command.returns %}
         {% if "optional" in parameter %}
-        if (hasValue(out_{{parameter.name}}))
-            result->setValue("{{parameter.name}}", toValue({{resolve_type(parameter).from_optional_out % ("out_" + parameter.name)}}));
+        if (out_{{parameter.name}}.isJust())
+            result->setValue("{{parameter.name}}", toValue(out_{{parameter.name}}));
         {% else %}
         result->setValue("{{parameter.name}}", toValue(out_{{resolve_type(parameter).to_pass_type % parameter.name}}));
         {% endif %}
@@ -213,7 +212,7 @@
     int callId = 0;
     RefPtr<JSONValue> parsedMessage = parseJSON(message);
     ASSERT(parsedMessage);
-    RefPtr<JSONObject> messageObject = parsedMessage->asObject();
+    RefPtr<JSONObject> messageObject = JSONObject::cast(parsedMessage.release());
     ASSERT(messageObject);
 
     RefPtr<JSONValue> callIdValue = messageObject->get("id");
@@ -273,7 +272,7 @@
 }
 
 template<typename R, typename V, typename V0>
-R DispatcherImpl::getPropertyValueImpl(JSONObject* object, const char* name, bool* valueFound, JSONArray* protocolErrors, V0 initial_value, bool (*as_method)(JSONValue*, V*), const char* type_name)
+R DispatcherImpl::getPropertyValueImpl(JSONObject* object, const char* name, bool* valueFound, JSONArray* protocolErrors, V0 initial_value, bool (*as_method)(PassRefPtr<JSONValue>, V*), const char* type_name)
 {
     ASSERT(protocolErrors);
 
@@ -308,40 +307,40 @@
 }
 
 struct AsMethodBridges {
-    static bool asInteger(JSONValue* value, int* output) { return value->asNumber(output); }
-    static bool asNumber(JSONValue* value, double* output) { return value->asNumber(output); }
-    static bool asString(JSONValue* value, String* output) { return value->asString(output); }
-    static bool asBoolean(JSONValue* value, bool* output) { return value->asBoolean(output); }
-    static bool asObject(JSONValue* value, RefPtr<JSONObject>* output) { return value->asObject(output); }
-    static bool asArray(JSONValue* value, RefPtr<JSONArray>* output) { return value->asArray(output); }
+    static bool asInteger(PassRefPtr<JSONValue> value, int* output) { return value->asNumber(output); }
+    static bool asNumber(PassRefPtr<JSONValue> value, double* output) { return value->asNumber(output); }
+    static bool asString(PassRefPtr<JSONValue> value, String* output) { return value->asString(output); }
+    static bool asBoolean(PassRefPtr<JSONValue> value, bool* output) { return value->asBoolean(output); }
+    static bool asObject(PassRefPtr<JSONValue> value, RefPtr<JSONObject>* output) { *output = JSONObject::cast(value); return *output; }
+    static bool asArray(PassRefPtr<JSONValue> value, RefPtr<JSONArray>* output) { *output = JSONArray::cast(value); return *output; }
 };
 
-OptionalValue<int> DispatcherImpl::getInteger(JSONObject* object, const char* name, bool isOptional, JSONArray* protocolErrors)
+Maybe<int> DispatcherImpl::getInteger(JSONObject* object, const char* name, bool isOptional, JSONArray* protocolErrors)
 {
     bool valueFound = false;
     int result = getPropertyValueImpl<int, int, int>(object, name, isOptional ? &valueFound : 0, protocolErrors, 0, AsMethodBridges::asInteger, "Number");
-    return valueFound || !isOptional ? OptionalValue<int>(result) : OptionalValue<int>();
+    return valueFound || !isOptional ? Maybe<int>(result) : Maybe<int>();
 }
 
-OptionalValue<double> DispatcherImpl::getNumber(JSONObject* object, const char* name, bool isOptional, JSONArray* protocolErrors)
+Maybe<double> DispatcherImpl::getNumber(JSONObject* object, const char* name, bool isOptional, JSONArray* protocolErrors)
 {
     bool valueFound = false;
     double result = getPropertyValueImpl<double, double, double>(object, name, isOptional ? &valueFound : 0, protocolErrors, 0, AsMethodBridges::asNumber, "Number");
-    return valueFound || !isOptional ? OptionalValue<double>(result) : OptionalValue<double>();
+    return valueFound || !isOptional ? Maybe<double>(result) : Maybe<double>();
 }
 
-OptionalValue<String> DispatcherImpl::getString(JSONObject* object, const char* name, bool isOptional, JSONArray* protocolErrors)
+Maybe<String> DispatcherImpl::getString(JSONObject* object, const char* name, bool isOptional, JSONArray* protocolErrors)
 {
     bool valueFound = false;
     String result = getPropertyValueImpl<String, String, String>(object, name, isOptional ? &valueFound : 0, protocolErrors, "", AsMethodBridges::asString, "String");
-    return valueFound || !isOptional ? OptionalValue<String>(result) : OptionalValue<String>();
+    return valueFound || !isOptional ? Maybe<String>(result) : Maybe<String>();
 }
 
-OptionalValue<bool> DispatcherImpl::getBoolean(JSONObject* object, const char* name, bool isOptional, JSONArray* protocolErrors)
+Maybe<bool> DispatcherImpl::getBoolean(JSONObject* object, const char* name, bool isOptional, JSONArray* protocolErrors)
 {
     bool valueFound = false;
     bool result = getPropertyValueImpl<bool, bool, bool>(object, name, isOptional ? &valueFound : 0, protocolErrors, false, AsMethodBridges::asBoolean, "Boolean");
-    return valueFound || !isOptional ? OptionalValue<bool>(result) : OptionalValue<bool>();
+    return valueFound || !isOptional ? Maybe<bool>(result) : Maybe<bool>();
 }
 
 PassRefPtr<JSONObject> DispatcherImpl::getObject(JSONObject* object, const char* name, bool isOptional, JSONArray* protocolErrors)
@@ -362,7 +361,7 @@
     if (!value)
         return false;
 
-    RefPtr<JSONObject> object = value->asObject();
+    RefPtr<JSONObject> object = JSONObject::cast(value.release());
     if (!object)
         return false;
 
diff --git a/third_party/WebKit/Source/platform/inspector_protocol/Dispatcher_h.template b/third_party/WebKit/Source/platform/inspector_protocol/Dispatcher_h.template
index e0cc255..6fd0b720 100644
--- a/third_party/WebKit/Source/platform/inspector_protocol/Dispatcher_h.template
+++ b/third_party/WebKit/Source/platform/inspector_protocol/Dispatcher_h.template
@@ -55,7 +55,7 @@
             void sendSuccess(
             {%- for parameter in command.returns -%}
               {%- if "optional" in parameter -%}
-                {{resolve_type(parameter).optional_pass_type}} {{parameter.name}}
+                const Maybe<{{resolve_type(parameter).raw_type}}>& {{parameter.name}}
               {%- else -%}
                 {{resolve_type(parameter).pass_type}} {{parameter.name}}
               {%- endif -%}
@@ -67,7 +67,7 @@
         virtual void {{command.name}}(ErrorString*
     {%- for parameter in command.parameters -%}
         {%- if "optional" in parameter -%}
-            , {{resolve_type(parameter).optional_pass_type}} in_{{parameter.name}}
+            , const Maybe<{{resolve_type(parameter).raw_type}}>& in_{{parameter.name}}
         {%- else -%}
             , {{resolve_type(parameter).pass_type}} in_{{parameter.name}}
         {%- endif -%}
@@ -77,7 +77,7 @@
     {%- else -%}
       {%- for parameter in command.returns -%}
         {%- if "optional" in parameter -%}
-            , {{resolve_type(parameter).optional_type}}* out_{{parameter.name}}
+            , Maybe<{{resolve_type(parameter).raw_type}}>* out_{{parameter.name}}
         {%- else -%}
             , {{resolve_type(parameter).type}}* out_{{parameter.name}}
         {%- endif -%}
diff --git a/third_party/WebKit/Source/platform/inspector_protocol/Frontend_cpp.template b/third_party/WebKit/Source/platform/inspector_protocol/Frontend_cpp.template
index f68e040d..c6d4bcb 100644
--- a/third_party/WebKit/Source/platform/inspector_protocol/Frontend_cpp.template
+++ b/third_party/WebKit/Source/platform/inspector_protocol/Frontend_cpp.template
@@ -26,7 +26,7 @@
 void Frontend::{{domain.domain}}::{{event.name}}(
     {%- for parameter in event.parameters %}
       {% if "optional" in parameter -%}
-        {{resolve_type(parameter).optional_pass_type}}
+        const Maybe<{{resolve_type(parameter).raw_type}}>&
       {%- else -%}
         {{resolve_type(parameter).pass_type}}
       {%- endif %} {{parameter.name}}{%- if not loop.last -%}, {% endif -%}
@@ -37,9 +37,8 @@
     RefPtr<JSONObject> paramsObject = JSONObject::create();
     {% for parameter in event.parameters %}
       {% if "optional" in parameter %}
-    {{resolve_type(parameter).optional_type}} opt_{{parameter.name}} = {{parameter.name}};
-    if (hasValue(opt_{{parameter.name}}))
-        paramsObject->setValue("{{parameter.name}}", toValue({{resolve_type(parameter).from_optional_out % ("opt_" + parameter.name)}}));
+    if ({{parameter.name}}.isJust())
+        paramsObject->setValue("{{parameter.name}}", toValue({{parameter.name}}));
       {% else %}
     paramsObject->setValue("{{parameter.name}}", toValue({{parameter.name}}));
       {% endif %}
diff --git a/third_party/WebKit/Source/platform/inspector_protocol/Frontend_h.template b/third_party/WebKit/Source/platform/inspector_protocol/Frontend_h.template
index d0a630c..72a99a1f 100644
--- a/third_party/WebKit/Source/platform/inspector_protocol/Frontend_h.template
+++ b/third_party/WebKit/Source/platform/inspector_protocol/Frontend_h.template
@@ -32,12 +32,7 @@
         void {{event.name}}(
     {%- for parameter in event.parameters -%}
       {%- if "optional" in parameter -%}
-            {{resolve_type(parameter).optional_pass_type}}
-        {%- if resolve_type(parameter).nullable -%}
-              {{parameter.name}} = nullptr
-        {%- else -%}
-              {{parameter.name}} = {{resolve_type(parameter).optional_type}}()
-        {%- endif %}
+            const Maybe<{{resolve_type(parameter).raw_type}}>& {{parameter.name}} = Maybe<{{resolve_type(parameter).raw_type}}>()
       {%- else -%}
             {{resolve_type(parameter).pass_type}} {{parameter.name}}
       {%- endif -%}{%- if not loop.last -%}, {% endif -%}
diff --git a/third_party/WebKit/Source/platform/inspector_protocol/TypeBuilder_cpp.template b/third_party/WebKit/Source/platform/inspector_protocol/TypeBuilder_cpp.template
index 96db157..674e7a8 100644
--- a/third_party/WebKit/Source/platform/inspector_protocol/TypeBuilder_cpp.template
+++ b/third_party/WebKit/Source/platform/inspector_protocol/TypeBuilder_cpp.template
@@ -9,16 +9,10 @@
 namespace blink {
 namespace protocol {
 
-template<>
-PassRefPtr<JSONValue> toValue(const String& param)
-{
-    return JSONString::create(param);
-}
-
-OptionalValue<String> optional(const String& value)
-{
-    return value.isNull() ? OptionalValue<String>() : OptionalValue<String>(value);
-}
+PassRefPtr<JSONValue> toValue(int value) { return JSONBasicValue::create(value); }
+PassRefPtr<JSONValue> toValue(double value) { return JSONBasicValue::create(value); }
+PassRefPtr<JSONValue> toValue(bool value) { return JSONBasicValue::create(value); }
+PassRefPtr<JSONValue> toValue(const String& param) { return JSONString::create(param); }
 
 // ------------- Enum values from types.
 {% for domain in api.domains %}
diff --git a/third_party/WebKit/Source/platform/inspector_protocol/TypeBuilder_h.template b/third_party/WebKit/Source/platform/inspector_protocol/TypeBuilder_h.template
index 7374d9e..10ce099 100644
--- a/third_party/WebKit/Source/platform/inspector_protocol/TypeBuilder_h.template
+++ b/third_party/WebKit/Source/platform/inspector_protocol/TypeBuilder_h.template
@@ -18,107 +18,101 @@
 namespace protocol {
 
 template<typename T>
-class OptionalValue {
+class Maybe {
 public:
-    OptionalValue() : m_hasValue(false) { }
-    OptionalValue(const T& value) : m_hasValue(true), m_value(value) { }
-
-    void operator=(T value)
-    {
-        m_value = value;
-        m_hasValue = true;
-    }
-
-    T get() const
-    {
-        ASSERT(m_hasValue);
-        return m_value;
-    }
-
-    T get(const T& defaultValue) const
-    {
-        return m_hasValue ? m_value : defaultValue;
-    }
-
-    bool hasValue() const
-    {
-        return m_hasValue;
-    }
-
+    Maybe() { }
+    Maybe(PassOwnPtr<T> value) : m_value(value) { }
+    void operator=(PassOwnPtr<T> value) { m_value = value; }
+    T* fromJust() const { ASSERT(m_value); return m_value.get(); }
+    T* fromMaybe(PassOwnPtr<T> defaultValue) const { return m_value ? m_value.get() : defaultValue; }
+    bool isJust() const { return !!m_value; }
+    PassOwnPtr<T> takeJust() { ASSERT(m_value); return m_value.release(); }
 private:
-    bool m_hasValue;
-    T m_value;
+    OwnPtr<T> m_value;
 };
 
 template<typename T>
-OptionalValue<T> optional(const T* value)
-{
-    return value ? OptionalValue<T>(*value) : OptionalValue<T>();
-}
+class MaybeBase {
+public:
+    MaybeBase() : m_isJust(false) { }
+    MaybeBase(T value) : m_isJust(true), m_value(value) { }
+    void operator=(T value) { m_value = value; m_isJust = true; }
+    T fromJust() const { ASSERT(m_isJust); return m_value; }
+    T fromMaybe(const T& defaultValue) const { return m_isJust ? m_value : defaultValue; }
+    bool isJust() const { return m_isJust; }
+    T takeJust() { ASSERT(m_isJust); return m_value; }
 
-PLATFORM_EXPORT OptionalValue<String> optional(const String& value);
+protected:
+    bool m_isJust;
+    T m_value;
+};
+
+template<> class Maybe<bool> : public MaybeBase<bool> {
+public:
+    Maybe() { }
+    Maybe(bool value) : MaybeBase(value) { }
+    using MaybeBase::operator=;
+};
+
+template<> class Maybe<int> : public MaybeBase<int>
+{
+public:
+    Maybe() { }
+    Maybe(int value) : MaybeBase(value) { }
+    using MaybeBase::operator=;
+};
+
+template<> class Maybe<double> : public MaybeBase<double>
+{
+public:
+    Maybe() { }
+    Maybe(double value) : MaybeBase(value) { }
+    using MaybeBase::operator=;
+};
+
+template<> class Maybe<String> : public MaybeBase<String>
+{
+public:
+    Maybe() { }
+    Maybe(const String& value) : MaybeBase(value) { }
+    Maybe(const AtomicString& value) : MaybeBase(value) { }
+    using MaybeBase::operator=;
+};
 
 template<typename T>
-OptionalValue<T> optional(const T& value)
-{
-    return OptionalValue<T>(value);
-}
+class Maybe<RefPtr<T>> {
+public:
+    Maybe() { }
+    Maybe(RefPtr<T> value) : m_value(value) { }
+    Maybe(PassRefPtr<T> value) : m_value(value) { }
+    Maybe(T* value) : m_value(value) { }
+    void operator=(PassRefPtr<T> value) { m_value = value; }
+    PassRefPtr<T> fromJust() const { ASSERT(m_value); return m_value; }
+    PassRefPtr<T> fromMaybe(const PassRefPtr<T> defaultValue) const { return m_value || defaultValue; }
+    bool isJust() const { return !!m_value; }
+    PassRefPtr<T> takeJust() { return m_value; }
+
+protected:
+    RefPtr<T> m_value;
+};
 
 template<typename T> class Array;
 
-template<typename T>
-bool hasValue(const protocol::OptionalValue<T>& t) { return t.hasValue(); }
-
-template<typename T>
-bool hasValue(T* value) { return !!value; }
-
-template<typename T>
-bool hasValue(const OwnPtr<T>& value) { return !!value; }
-
-template<typename T>
-bool hasValue(const PassOwnPtr<T>& value) { return !!value; }
-
-template<typename T>
-bool hasValue(const RefPtr<T>& value) { return !!value; }
-
-template<typename T>
-PassRefPtr<JSONValue> toValue(const T& param)
-{
-    return JSONBasicValue::create(param);
-}
-
-template<>
+PLATFORM_EXPORT PassRefPtr<JSONValue> toValue(int value);
+PLATFORM_EXPORT PassRefPtr<JSONValue> toValue(double value);
+PLATFORM_EXPORT PassRefPtr<JSONValue> toValue(bool value);
 PLATFORM_EXPORT PassRefPtr<JSONValue> toValue(const String& param);
-
-template<typename T>
-PassRefPtr<JSONValue> toValue(PassRefPtr<T> param)
-{
-    return param;
-}
-
-template<typename T>
-PassRefPtr<JSONValue> toValue(const PassOwnPtr<protocol::Array<T>> param)
-{
-    return param->asValue();
-}
-
-template<typename T>
-PassRefPtr<JSONValue> toValue(PassOwnPtr<T> param)
-{
-    return param->asValue();
-}
+template<typename T> PassRefPtr<JSONValue> toValue(PassRefPtr<T> param) { return param; }
+template<typename T> PassRefPtr<JSONValue> toValue(T* param) { return param->asValue(); }
+template<typename T> PassRefPtr<JSONValue> toValue(PassOwnPtr<T> param) { return param->asValue(); }
+template<typename T> PassRefPtr<JSONValue> toValue(const Maybe<T>& param) { return toValue(param.fromJust()); }
 
 template<typename T>
 struct FromValue
 {
     static PassOwnPtr<T> convert(RefPtr<JSONValue> value)
     {
-        if (!value)
-            return nullptr;
-        RefPtr<JSONObject> object;
-        bool success = value->asObject(&object);
-        ASSERT_UNUSED(success, success);
-        return T::runtimeCast(object.release());
+        return T::runtimeCast(JSONObject::cast(value.release()));
     }
 };
 
@@ -184,9 +178,7 @@
 {
     static PassOwnPtr<protocol::Array<T>> convert(RefPtr<JSONValue> value)
     {
-        RefPtr<JSONArray> array = value->asArray();
-        ASSERT_UNUSED(array, array);
-        return protocol::Array<T>::runtimeCast(array);
+        return protocol::Array<T>::runtimeCast(JSONArray::cast(value));
     }
 };
 
@@ -200,12 +192,12 @@
         return result.release();
     }
 
-    static PassOwnPtr<Array<T>> runtimeCast(PassRefPtr<JSONArray> array)
+    static PassOwnPtr<Array<T>> runtimeCast(PassRefPtr<JSONValue> array)
     {
-        if (!array)
+        if (!array || array->type() != JSONValue::TypeArray)
             return nullptr;
         OwnPtr<Array<T>> result = adoptPtr(new Array<T>());
-        result->m_array = array;
+        result->m_array = JSONArray::cast(array);
         return result.release();
     }
 
@@ -239,12 +231,12 @@
         return result.release();
     }
 
-    static PassOwnPtr<Array<T>> runtimeCast(PassRefPtr<JSONArray> array)
+    static PassOwnPtr<Array<T>> runtimeCast(PassRefPtr<JSONValue> array)
     {
-        if (!array)
+        if (!array || array->type() != JSONValue::TypeArray)
             return nullptr;
         OwnPtr<Array<T>> result = adoptPtr(new Array<T>());
-        result->m_array = array;
+        result->m_array = JSONArray::cast(array);
         return result.release();
     }
 
@@ -326,9 +318,11 @@
 // {{type.description}}
 class PLATFORM_EXPORT {{type.id}} {
 public:
-    static PassOwnPtr<{{type.id}}> runtimeCast(PassRefPtr<JSONObject> object)
+    static PassOwnPtr<{{type.id}}> runtimeCast(PassRefPtr<JSONValue> value)
     {
-        return adoptPtr(new {{type.id}}(object));
+        if (!value || value->type() != JSONValue::TypeObject)
+            return nullptr;
+        return adoptPtr(new {{type.id}}(JSONObject::cast(value)));
     }
 
     {{type.id}}() : m_object(JSONObject::create()) { }
@@ -360,6 +354,12 @@
         RefPtr<JSONValue> value = m_object->get("{{property.name}}");
         return value ? FromValue<{{resolve_type(property).raw_type}}>::convert(value) : defaultValue;
     }
+
+    void set{{property.name | to_title_case}}(const Maybe<{{resolve_type(property).raw_type}}>& value)
+    {
+        if (value.isJust())
+            m_object->setValue("{{property.name}}", toValue(value.fromJust()));
+    }
         {% else %}
     {{resolve_type(property).return_type}} get{{property.name | to_title_case}}()
     {
@@ -367,17 +367,12 @@
         RefPtr<JSONValue> value = m_object->get("{{property.name}}");
         return FromValue<{{resolve_type(property).raw_type}}>::convert(value);
     }
-        {% endif %}
 
     void set{{property.name | to_title_case}}({{resolve_type(property).pass_type}} value)
     {
-        {% if property.optional and resolve_type(property).nullable %}
-        if (value)
-            m_object->setValue("{{property.name}}", toValue(value));
-        {% else %}
         m_object->setValue("{{property.name}}", toValue(value));
-        {% endif %}
     }
+        {% endif %}
       {% endfor %}
 
     PassRefPtr<JSONObject> asValue() { return m_object; }
@@ -404,12 +399,8 @@
       {% for property in type.properties %}
 
         {% if property.optional %}
-        {{type.id}}Builder<STATE>& set{{property.name | to_title_case}}({{resolve_type(property).pass_type}} value)
+        {{type.id}}Builder<STATE>& set{{property.name | to_title_case}}(const Maybe<{{resolve_type(property).raw_type}}>& value)
         {
-          {% if resolve_type(property).nullable%}
-            if (!value)
-                return *this;
-          {% endif %}
             m_result->set{{property.name | to_title_case}}(value);
             return *this;
         }
diff --git a/third_party/WebKit/Source/platform/scroll/ProgrammaticScrollAnimator.cpp b/third_party/WebKit/Source/platform/scroll/ProgrammaticScrollAnimator.cpp
index 8f576ea..99f58fd 100644
--- a/third_party/WebKit/Source/platform/scroll/ProgrammaticScrollAnimator.cpp
+++ b/third_party/WebKit/Source/platform/scroll/ProgrammaticScrollAnimator.cpp
@@ -124,7 +124,7 @@
         bool sentToCompositor = false;
 
         if (!m_scrollableArea->shouldScrollOnMainThread()) {
-            OwnPtr<CompositorAnimation> animation = adoptPtr(CompositorFactory::current().createAnimation(*m_animationCurve, CompositorAnimation::TargetPropertyScrollOffset));
+            OwnPtr<CompositorAnimation> animation = adoptPtr(CompositorFactory::current().createAnimation(*m_animationCurve, CompositorTargetProperty::SCROLL_OFFSET));
 
             int animationId = animation->id();
             int animationGroupId = animation->group();
diff --git a/third_party/WebKit/Source/platform/scroll/ScrollAnimator.cpp b/third_party/WebKit/Source/platform/scroll/ScrollAnimator.cpp
index bb9b623..3425f1fd 100644
--- a/third_party/WebKit/Source/platform/scroll/ScrollAnimator.cpp
+++ b/third_party/WebKit/Source/platform/scroll/ScrollAnimator.cpp
@@ -265,7 +265,7 @@
             OwnPtr<CompositorAnimation> animation = adoptPtr(
                 CompositorFactory::current().createAnimation(
                     *m_animationCurve,
-                    CompositorAnimation::TargetPropertyScrollOffset));
+                    CompositorTargetProperty::SCROLL_OFFSET));
             // Being here means that either there is an animation that needs
             // to be sent to the compositor, or an animation that needs to
             // be updated (a new scroll event before the previous animation
diff --git a/third_party/WebKit/Source/platform/v8_inspector/InjectedScript.cpp b/third_party/WebKit/Source/platform/v8_inspector/InjectedScript.cpp
index 56e48b2..b94a541 100644
--- a/third_party/WebKit/Source/platform/v8_inspector/InjectedScript.cpp
+++ b/third_party/WebKit/Source/platform/v8_inspector/InjectedScript.cpp
@@ -50,7 +50,7 @@
 using blink::protocol::Runtime::PropertyDescriptor;
 using blink::protocol::Runtime::InternalPropertyDescriptor;
 using blink::protocol::Runtime::RemoteObject;
-using blink::protocol::OptionalValue;
+using blink::protocol::Maybe;
 
 namespace blink {
 
@@ -77,7 +77,7 @@
     if (stackTrace && stackTrace->length() > 0) {
         OwnPtr<protocol::Array<protocol::Runtime::CallFrame>> frames = protocol::Array<protocol::Runtime::CallFrame>::create();
         for (unsigned i = 0; i < stackTrace->length(); ++i) {
-            RefPtr<JSONObject> stackFrame = stackTrace->get(i)->asObject();
+            RefPtr<JSONObject> stackFrame = JSONObject::cast(stackTrace->get(i));
             int lineNumber = 0;
             stackFrame->getNumber("lineNumber", &lineNumber);
             int column = 0;
@@ -131,7 +131,7 @@
 {
 }
 
-void InjectedScript::evaluate(ErrorString* errorString, const String& expression, const String& objectGroup, bool includeCommandLineAPI, bool returnByValue, bool generatePreview, OwnPtr<protocol::Runtime::RemoteObject>* result, OptionalValue<bool>* wasThrown, OwnPtr<protocol::Runtime::ExceptionDetails>* exceptionDetails)
+void InjectedScript::evaluate(ErrorString* errorString, const String& expression, const String& objectGroup, bool includeCommandLineAPI, bool returnByValue, bool generatePreview, OwnPtr<protocol::Runtime::RemoteObject>* result, Maybe<bool>* wasThrown, Maybe<protocol::Runtime::ExceptionDetails>* exceptionDetails)
 {
     v8::HandleScope handles(m_isolate);
     V8FunctionCall function(m_client, context(), v8Value(), "evaluate");
@@ -143,7 +143,7 @@
     makeEvalCall(errorString, function, result, wasThrown, exceptionDetails);
 }
 
-void InjectedScript::callFunctionOn(ErrorString* errorString, const String& objectId, const String& expression, const String& arguments, bool returnByValue, bool generatePreview, OwnPtr<protocol::Runtime::RemoteObject>* result, OptionalValue<bool>* wasThrown)
+void InjectedScript::callFunctionOn(ErrorString* errorString, const String& objectId, const String& expression, const String& arguments, bool returnByValue, bool generatePreview, OwnPtr<protocol::Runtime::RemoteObject>* result, Maybe<bool>* wasThrown)
 {
     v8::HandleScope handles(m_isolate);
     V8FunctionCall function(m_client, context(), v8Value(), "callFunctionOn");
@@ -155,7 +155,7 @@
     makeEvalCall(errorString, function, result, wasThrown);
 }
 
-void InjectedScript::evaluateOnCallFrame(ErrorString* errorString, v8::Local<v8::Object> callFrames, bool isAsyncCallStack, const String& callFrameId, const String& expression, const String& objectGroup, bool includeCommandLineAPI, bool returnByValue, bool generatePreview, OwnPtr<RemoteObject>* result, OptionalValue<bool>* wasThrown, OwnPtr<protocol::Runtime::ExceptionDetails>* exceptionDetails)
+void InjectedScript::evaluateOnCallFrame(ErrorString* errorString, v8::Local<v8::Object> callFrames, bool isAsyncCallStack, const String& callFrameId, const String& expression, const String& objectGroup, bool includeCommandLineAPI, bool returnByValue, bool generatePreview, OwnPtr<RemoteObject>* result, Maybe<bool>* wasThrown, Maybe<protocol::Runtime::ExceptionDetails>* exceptionDetails)
 {
     v8::HandleScope handles(m_isolate);
     V8FunctionCall function(m_client, context(), v8Value(), "evaluateOnCallFrame");
@@ -190,7 +190,7 @@
     *errorString = "Internal error";
 }
 
-void InjectedScript::getStepInPositions(ErrorString* errorString, v8::Local<v8::Object> callFrames, const String& callFrameId, OwnPtr<Array<protocol::Debugger::Location>>* positions)
+void InjectedScript::getStepInPositions(ErrorString* errorString, v8::Local<v8::Object> callFrames, const String& callFrameId, Maybe<Array<protocol::Debugger::Location>>* positions)
 {
     v8::HandleScope handles(m_isolate);
     V8FunctionCall function(m_client, context(), v8Value(), "getStepInPositions");
@@ -204,7 +204,7 @@
             return;
         }
         if (resultValue->type() == JSONValue::TypeArray) {
-            *positions = Array<protocol::Debugger::Location>::runtimeCast(resultValue->asArray());
+            *positions = Array<protocol::Debugger::Location>::runtimeCast(resultValue.release());
             return;
         }
     }
@@ -213,23 +213,23 @@
 
 void InjectedScript::setVariableValue(ErrorString* errorString,
     v8::Local<v8::Object> callFrames,
-    const protocol::OptionalValue<String>& callFrameIdOpt,
-    const protocol::OptionalValue<String>&  functionObjectIdOpt,
+    const protocol::Maybe<String>& callFrameIdOpt,
+    const protocol::Maybe<String>&  functionObjectIdOpt,
     int scopeNumber,
     const String& variableName,
     const String& newValueStr)
 {
     v8::HandleScope handles(m_isolate);
     V8FunctionCall function(m_client, context(), v8Value(), "setVariableValue");
-    if (callFrameIdOpt.hasValue()) {
+    if (callFrameIdOpt.isJust()) {
         function.appendArgument(callFrames);
-        function.appendArgument(callFrameIdOpt.get());
+        function.appendArgument(callFrameIdOpt.fromJust());
     } else {
         function.appendArgument(false);
         function.appendArgument(false);
     }
-    if (functionObjectIdOpt.hasValue())
-        function.appendArgument(functionObjectIdOpt.get());
+    if (functionObjectIdOpt.isJust())
+        function.appendArgument(functionObjectIdOpt.fromJust());
     else
         function.appendArgument(false);
     function.appendArgument(scopeNumber);
@@ -260,7 +260,7 @@
             *errorString = "Internal error";
         return;
     }
-    *result = FunctionDetails::runtimeCast(resultValue->asObject());
+    *result = FunctionDetails::runtimeCast(resultValue);
 }
 
 void InjectedScript::getGeneratorObjectDetails(ErrorString* errorString, const String& objectId, OwnPtr<GeneratorObjectDetails>* result)
@@ -275,7 +275,7 @@
             *errorString = "Internal error";
         return;
     }
-    *result = GeneratorObjectDetails::runtimeCast(resultValue->asObject());
+    *result = GeneratorObjectDetails::runtimeCast(resultValue);
 }
 
 void InjectedScript::getCollectionEntries(ErrorString* errorString, const String& objectId, OwnPtr<Array<CollectionEntry>>* result)
@@ -290,10 +290,10 @@
             *errorString = "Internal error";
         return;
     }
-    *result = Array<CollectionEntry>::runtimeCast(resultValue->asArray());
+    *result = Array<CollectionEntry>::runtimeCast(resultValue.release());
 }
 
-void InjectedScript::getProperties(ErrorString* errorString, const String& objectId, bool ownProperties, bool accessorPropertiesOnly, bool generatePreview, OwnPtr<Array<PropertyDescriptor>>* properties, OwnPtr<protocol::Runtime::ExceptionDetails>* exceptionDetails)
+void InjectedScript::getProperties(ErrorString* errorString, const String& objectId, bool ownProperties, bool accessorPropertiesOnly, bool generatePreview, OwnPtr<Array<PropertyDescriptor>>* properties, Maybe<protocol::Runtime::ExceptionDetails>* exceptionDetails)
 {
     v8::HandleScope handles(m_isolate);
     V8FunctionCall function(m_client, context(), v8Value(), "getProperties");
@@ -304,7 +304,7 @@
 
     RefPtr<JSONValue> result;
     makeCallWithExceptionDetails(function, &result, exceptionDetails);
-    if (*exceptionDetails) {
+    if (exceptionDetails->isJust()) {
         // FIXME: make properties optional
         *properties = Array<PropertyDescriptor>::create();
         return;
@@ -313,10 +313,10 @@
         *errorString = "Internal error";
         return;
     }
-    *properties = Array<PropertyDescriptor>::runtimeCast(result->asArray());
+    *properties = Array<PropertyDescriptor>::runtimeCast(result.release());
 }
 
-void InjectedScript::getInternalProperties(ErrorString* errorString, const String& objectId, OwnPtr<Array<InternalPropertyDescriptor>>* properties, OwnPtr<protocol::Runtime::ExceptionDetails>* exceptionDetails)
+void InjectedScript::getInternalProperties(ErrorString* errorString, const String& objectId, Maybe<Array<InternalPropertyDescriptor>>* properties, Maybe<protocol::Runtime::ExceptionDetails>* exceptionDetails)
 {
     v8::HandleScope handles(m_isolate);
     V8FunctionCall function(m_client, context(), v8Value(), "getInternalProperties");
@@ -324,13 +324,13 @@
 
     RefPtr<JSONValue> result;
     makeCallWithExceptionDetails(function, &result, exceptionDetails);
-    if (*exceptionDetails)
+    if (exceptionDetails->isJust())
         return;
     if (!result || result->type() != JSONValue::TypeArray) {
         *errorString = "Internal error";
         return;
     }
-    OwnPtr<Array<InternalPropertyDescriptor>> array = Array<InternalPropertyDescriptor>::runtimeCast(result->asArray());
+    OwnPtr<Array<InternalPropertyDescriptor>> array = Array<InternalPropertyDescriptor>::runtimeCast(result.release());
     if (array->length() > 0)
         *properties = array.release();
 }
@@ -340,8 +340,8 @@
     RefPtr<JSONValue> parsedObjectId = parseJSON(objectId);
     if (!parsedObjectId)
         return;
-    RefPtr<JSONObject> object;
-    if (!parsedObjectId->asObject(&object))
+    RefPtr<JSONObject> object = JSONObject::cast(parsedObjectId);
+    if (!object)
         return;
     int boundId = 0;
     if (!object->getNumber("id", &boundId))
@@ -379,7 +379,7 @@
     ASSERT(!hadException);
     RefPtr<JSONValue> result = toJSONValue(context(), callFramesValue);
     if (result && result->type() == JSONValue::TypeArray)
-        return Array<CallFrame>::runtimeCast(result->asArray());
+        return Array<CallFrame>::runtimeCast(result.release());
     return Array<CallFrame>::create();
 }
 
@@ -395,8 +395,7 @@
     v8::Local<v8::Value> r = callFunctionWithEvalEnabled(function, hadException);
     if (hadException)
         return nullptr;
-    RefPtr<JSONObject> rawResult = toJSONValue(context(), r)->asObject();
-    return protocol::Runtime::RemoteObject::runtimeCast(rawResult);
+    return protocol::Runtime::RemoteObject::runtimeCast(toJSONValue(context(), r));
 }
 
 PassOwnPtr<protocol::Runtime::RemoteObject> InjectedScript::wrapTable(v8::Local<v8::Value> table, v8::Local<v8::Value> columns) const
@@ -413,8 +412,7 @@
     v8::Local<v8::Value>  r = callFunctionWithEvalEnabled(function, hadException);
     if (hadException)
         return nullptr;
-    RefPtr<JSONObject> rawResult = toJSONValue(context(), r)->asObject();
-    return protocol::Runtime::RemoteObject::runtimeCast(rawResult);
+    return protocol::Runtime::RemoteObject::runtimeCast(toJSONValue(context(), r));
 }
 
 v8::Local<v8::Value> InjectedScript::findObject(const RemoteObjectId& objectId) const
@@ -500,7 +498,7 @@
     }
 }
 
-void InjectedScript::makeEvalCall(ErrorString* errorString, V8FunctionCall& function, OwnPtr<protocol::Runtime::RemoteObject>* objectResult, OptionalValue<bool>* wasThrown, OwnPtr<protocol::Runtime::ExceptionDetails>* exceptionDetails)
+void InjectedScript::makeEvalCall(ErrorString* errorString, V8FunctionCall& function, OwnPtr<protocol::Runtime::RemoteObject>* objectResult, Maybe<bool>* wasThrown, Maybe<protocol::Runtime::ExceptionDetails>* exceptionDetails)
 {
     RefPtr<JSONValue> result;
     makeCall(function, &result);
@@ -513,7 +511,7 @@
         ASSERT(errorString->length());
         return;
     }
-    RefPtr<JSONObject> resultPair = result->asObject();
+    RefPtr<JSONObject> resultPair = JSONObject::cast(result);
     if (!resultPair) {
         *errorString = "Internal error: result is not an Object";
         return;
@@ -533,7 +531,7 @@
     *wasThrown = wasThrownVal;
 }
 
-void InjectedScript::makeCallWithExceptionDetails(V8FunctionCall& function, RefPtr<JSONValue>* result, OwnPtr<protocol::Runtime::ExceptionDetails>* exceptionDetails)
+void InjectedScript::makeCallWithExceptionDetails(V8FunctionCall& function, RefPtr<JSONValue>* result, Maybe<protocol::Runtime::ExceptionDetails>* exceptionDetails)
 {
     v8::HandleScope handles(m_isolate);
     v8::Context::Scope scope(context());
diff --git a/third_party/WebKit/Source/platform/v8_inspector/InjectedScript.h b/third_party/WebKit/Source/platform/v8_inspector/InjectedScript.h
index 32f378d..9894fc3 100644
--- a/third_party/WebKit/Source/platform/v8_inspector/InjectedScript.h
+++ b/third_party/WebKit/Source/platform/v8_inspector/InjectedScript.h
@@ -48,7 +48,7 @@
 
 typedef String ErrorString;
 
-using protocol::OptionalValue;
+using protocol::Maybe;
 
 class InjectedScript final {
     USING_FAST_MALLOC(InjectedScript);
@@ -63,8 +63,8 @@
         bool returnByValue,
         bool generatePreview,
         OwnPtr<protocol::Runtime::RemoteObject>* result,
-        OptionalValue<bool>* wasThrown,
-        OwnPtr<protocol::Runtime::ExceptionDetails>*);
+        Maybe<bool>* wasThrown,
+        Maybe<protocol::Runtime::ExceptionDetails>*);
     void callFunctionOn(
         ErrorString*,
         const String& objectId,
@@ -73,7 +73,7 @@
         bool returnByValue,
         bool generatePreview,
         OwnPtr<protocol::Runtime::RemoteObject>* result,
-        OptionalValue<bool>* wasThrown);
+        Maybe<bool>* wasThrown);
     void evaluateOnCallFrame(
         ErrorString*,
         v8::Local<v8::Object> callFrames,
@@ -85,16 +85,16 @@
         bool returnByValue,
         bool generatePreview,
         OwnPtr<protocol::Runtime::RemoteObject>* result,
-        OptionalValue<bool>* wasThrown,
-        OwnPtr<protocol::Runtime::ExceptionDetails>*);
+        Maybe<bool>* wasThrown,
+        Maybe<protocol::Runtime::ExceptionDetails>*);
     void restartFrame(ErrorString*, v8::Local<v8::Object> callFrames, const String& callFrameId);
-    void getStepInPositions(ErrorString*, v8::Local<v8::Object> callFrames, const String& callFrameId, OwnPtr<protocol::Array<protocol::Debugger::Location>>* positions);
-    void setVariableValue(ErrorString*, v8::Local<v8::Object> callFrames, const OptionalValue<String>& callFrameIdOpt, const OptionalValue<String>& functionObjectIdOpt, int scopeNumber, const String& variableName, const String& newValueStr);
+    void getStepInPositions(ErrorString*, v8::Local<v8::Object> callFrames, const String& callFrameId, Maybe<protocol::Array<protocol::Debugger::Location>>* positions);
+    void setVariableValue(ErrorString*, v8::Local<v8::Object> callFrames, const Maybe<String>& callFrameIdOpt, const Maybe<String>& functionObjectIdOpt, int scopeNumber, const String& variableName, const String& newValueStr);
     void getFunctionDetails(ErrorString*, const String& functionId, OwnPtr<protocol::Debugger::FunctionDetails>* result);
     void getGeneratorObjectDetails(ErrorString*, const String& functionId, OwnPtr<protocol::Debugger::GeneratorObjectDetails>* result);
     void getCollectionEntries(ErrorString*, const String& objectId, OwnPtr<protocol::Array<protocol::Debugger::CollectionEntry>>* result);
-    void getProperties(ErrorString*, const String& objectId, bool ownProperties, bool accessorPropertiesOnly, bool generatePreview, OwnPtr<protocol::Array<protocol::Runtime::PropertyDescriptor>>* result, OwnPtr<protocol::Runtime::ExceptionDetails>*);
-    void getInternalProperties(ErrorString*, const String& objectId, OwnPtr<protocol::Array<protocol::Runtime::InternalPropertyDescriptor>>* result, OwnPtr<protocol::Runtime::ExceptionDetails>*);
+    void getProperties(ErrorString*, const String& objectId, bool ownProperties, bool accessorPropertiesOnly, bool generatePreview, OwnPtr<protocol::Array<protocol::Runtime::PropertyDescriptor>>* result, Maybe<protocol::Runtime::ExceptionDetails>*);
+    void getInternalProperties(ErrorString*, const String& objectId, Maybe<protocol::Array<protocol::Runtime::InternalPropertyDescriptor>>* result, Maybe<protocol::Runtime::ExceptionDetails>*);
     void releaseObject(const String& objectId);
     v8::MaybeLocal<v8::Value> runCompiledScript(v8::Local<v8::Script>, bool includeCommandLineAPI);
 
@@ -123,8 +123,8 @@
     v8::Local<v8::Value> v8Value() const;
     v8::Local<v8::Value> callFunctionWithEvalEnabled(V8FunctionCall&, bool& hadException) const;
     void makeCall(V8FunctionCall&, RefPtr<JSONValue>* result);
-    void makeEvalCall(ErrorString*, V8FunctionCall&, OwnPtr<protocol::Runtime::RemoteObject>* result, OptionalValue<bool>* wasThrown, OwnPtr<protocol::Runtime::ExceptionDetails>* = 0);
-    void makeCallWithExceptionDetails(V8FunctionCall&, RefPtr<JSONValue>* result, OwnPtr<protocol::Runtime::ExceptionDetails>*);
+    void makeEvalCall(ErrorString*, V8FunctionCall&, OwnPtr<protocol::Runtime::RemoteObject>* result, Maybe<bool>* wasThrown, Maybe<protocol::Runtime::ExceptionDetails>* = 0);
+    void makeCallWithExceptionDetails(V8FunctionCall&, RefPtr<JSONValue>* result, Maybe<protocol::Runtime::ExceptionDetails>*);
 
     InjectedScriptManager* m_manager;
     v8::Isolate* m_isolate;
diff --git a/third_party/WebKit/Source/platform/v8_inspector/InjectedScriptHost.cpp b/third_party/WebKit/Source/platform/v8_inspector/InjectedScriptHost.cpp
index c9b12139..ee474cf 100644
--- a/third_party/WebKit/Source/platform/v8_inspector/InjectedScriptHost.cpp
+++ b/third_party/WebKit/Source/platform/v8_inspector/InjectedScriptHost.cpp
@@ -78,8 +78,8 @@
 void InjectedScriptHost::inspectImpl(PassRefPtr<JSONValue> object, PassRefPtr<JSONValue> hints)
 {
     if (m_inspectCallback) {
-        OwnPtr<protocol::Runtime::RemoteObject> remoteObject = protocol::Runtime::RemoteObject::runtimeCast(object->asObject());
-        (*m_inspectCallback)(remoteObject.release(), hints->asObject());
+        OwnPtr<protocol::Runtime::RemoteObject> remoteObject = protocol::Runtime::RemoteObject::runtimeCast(object);
+        (*m_inspectCallback)(remoteObject.release(), JSONObject::cast(hints));
     }
 }
 
diff --git a/third_party/WebKit/Source/platform/v8_inspector/RemoteObjectId.cpp b/third_party/WebKit/Source/platform/v8_inspector/RemoteObjectId.cpp
index d15b0cf9..35542df 100644
--- a/third_party/WebKit/Source/platform/v8_inspector/RemoteObjectId.cpp
+++ b/third_party/WebKit/Source/platform/v8_inspector/RemoteObjectId.cpp
@@ -20,7 +20,7 @@
     if (!parsedValue || parsedValue->type() != JSONValue::TypeObject)
         return nullptr;
 
-    RefPtr<JSONObject> parsedObjectId = parsedValue->asObject();
+    RefPtr<JSONObject> parsedObjectId = JSONObject::cast(parsedValue.release());
     bool success = parsedObjectId->getNumber("injectedScriptId", &m_injectedScriptId);
     if (success)
         return parsedObjectId.release();
diff --git a/third_party/WebKit/Source/platform/v8_inspector/V8DebuggerAgentImpl.cpp b/third_party/WebKit/Source/platform/v8_inspector/V8DebuggerAgentImpl.cpp
index 4ce29d2c..e6d16b3 100644
--- a/third_party/WebKit/Source/platform/v8_inspector/V8DebuggerAgentImpl.cpp
+++ b/third_party/WebKit/Source/platform/v8_inspector/V8DebuggerAgentImpl.cpp
@@ -27,7 +27,7 @@
 #include "wtf/text/WTFString.h"
 
 using blink::protocol::Array;
-using blink::protocol::OptionalValue;
+using blink::protocol::Maybe;
 using blink::protocol::Debugger::AsyncOperation;
 using blink::protocol::Debugger::BreakpointId;
 using blink::protocol::Debugger::CallFrame;
@@ -309,30 +309,30 @@
 
 void V8DebuggerAgentImpl::setBreakpointByUrl(ErrorString* errorString,
     int lineNumber,
-    const OptionalValue<String>& optionalURL,
-    const OptionalValue<String>& optionalURLRegex,
-    const OptionalValue<int>& optionalColumnNumber,
-    const OptionalValue<String>& optionalCondition,
+    const Maybe<String>& optionalURL,
+    const Maybe<String>& optionalURLRegex,
+    const Maybe<int>& optionalColumnNumber,
+    const Maybe<String>& optionalCondition,
     BreakpointId* outBreakpointId,
     OwnPtr<protocol::Array<protocol::Debugger::Location>>* locations)
 {
     *locations = Array<protocol::Debugger::Location>::create();
-    if (optionalURL.hasValue() == optionalURLRegex.hasValue()) {
+    if (optionalURL.isJust() == optionalURLRegex.isJust()) {
         *errorString = "Either url or urlRegex must be specified.";
         return;
     }
 
-    String url = optionalURL.hasValue() ? optionalURL.get() : optionalURLRegex.get();
+    String url = optionalURL.isJust() ? optionalURL.fromJust() : optionalURLRegex.fromJust();
     int columnNumber = 0;
-    if (optionalColumnNumber.hasValue()) {
-        columnNumber = optionalColumnNumber.get();
+    if (optionalColumnNumber.isJust()) {
+        columnNumber = optionalColumnNumber.fromJust();
         if (columnNumber < 0) {
             *errorString = "Incorrect column number";
             return;
         }
     }
-    String condition = optionalCondition.get("");
-    bool isRegex = optionalURLRegex.hasValue();
+    String condition = optionalCondition.fromMaybe("");
+    bool isRegex = optionalURLRegex.isJust();
 
     String breakpointId = (isRegex ? "/" + url + "/" : url) + ':' + String::number(lineNumber) + ':' + String::number(columnNumber);
     RefPtr<JSONObject> breakpointsCookie = m_state->getObject(DebuggerAgentState::javaScriptBreakpoints);
@@ -375,7 +375,7 @@
 
 void V8DebuggerAgentImpl::setBreakpoint(ErrorString* errorString,
     PassOwnPtr<protocol::Debugger::Location> location,
-    const OptionalValue<String>& optionalCondition,
+    const Maybe<String>& optionalCondition,
     BreakpointId* outBreakpointId,
     OwnPtr<protocol::Debugger::Location>* actualLocation)
 {
@@ -386,7 +386,7 @@
     if (!parseLocation(errorString, location, &scriptId, &lineNumber, &columnNumber))
         return;
 
-    String condition = optionalCondition.get("");
+    String condition = optionalCondition.fromMaybe("");
 
     String breakpointId = generateBreakpointId(scriptId, lineNumber, columnNumber, UserBreakpointSource);
     if (m_breakpointIdToDebuggerBreakpointIds.find(breakpointId) != m_breakpointIdToDebuggerBreakpointIds.end()) {
@@ -428,7 +428,7 @@
 
 void V8DebuggerAgentImpl::continueToLocation(ErrorString* errorString,
     PassOwnPtr<protocol::Debugger::Location> location,
-    const protocol::OptionalValue<bool>& interstateLocationOpt)
+    const protocol::Maybe<bool>& interstateLocationOpt)
 {
     if (!checkEnabled(errorString))
         return;
@@ -445,11 +445,11 @@
         return;
 
     ScriptBreakpoint breakpoint(lineNumber, columnNumber, "");
-    m_continueToLocationBreakpointId = debugger().setBreakpoint(scriptId, breakpoint, &lineNumber, &columnNumber, interstateLocationOpt.get(false));
+    m_continueToLocationBreakpointId = debugger().setBreakpoint(scriptId, breakpoint, &lineNumber, &columnNumber, interstateLocationOpt.fromMaybe(false));
     resume(errorString);
 }
 
-void V8DebuggerAgentImpl::getStepInPositions(ErrorString* errorString, const String& callFrameId, OwnPtr<Array<protocol::Debugger::Location>>* positions)
+void V8DebuggerAgentImpl::getStepInPositions(ErrorString* errorString, const String& callFrameId, Maybe<Array<protocol::Debugger::Location>>* positions)
 {
     if (!isPaused() || m_currentCallStack.IsEmpty()) {
         *errorString = "Attempt to access callframe when debugger is not on pause";
@@ -471,7 +471,7 @@
     injectedScript->getStepInPositions(errorString, callStack, callFrameId, positions);
 }
 
-void V8DebuggerAgentImpl::getBacktrace(ErrorString* errorString, OwnPtr<Array<CallFrame>>* callFrames, OwnPtr<StackTrace>* asyncStackTrace)
+void V8DebuggerAgentImpl::getBacktrace(ErrorString* errorString, OwnPtr<Array<CallFrame>>* callFrames, Maybe<StackTrace>* asyncStackTrace)
 {
     if (!assertPaused(errorString))
         return;
@@ -607,13 +607,13 @@
 }
 
 void V8DebuggerAgentImpl::searchInContent(ErrorString* error, const String& scriptId, const String& query,
-    const OptionalValue<bool>& optionalCaseSensitive,
-    const OptionalValue<bool>& optionalIsRegex,
+    const Maybe<bool>& optionalCaseSensitive,
+    const Maybe<bool>& optionalIsRegex,
     OwnPtr<Array<protocol::Debugger::SearchMatch>>* results)
 {
     ScriptsMap::iterator it = m_scripts.find(scriptId);
     if (it != m_scripts.end())
-        *results = V8ContentSearchUtil::searchInTextByLines(m_debugger, it->value.source(), query, optionalCaseSensitive.get(false), optionalIsRegex.get(false));
+        *results = V8ContentSearchUtil::searchInTextByLines(m_debugger, it->value.source(), query, optionalCaseSensitive.fromMaybe(false), optionalIsRegex.fromMaybe(false));
     else
         *error = "No script for id: " + scriptId;
 }
@@ -621,15 +621,15 @@
 void V8DebuggerAgentImpl::setScriptSource(ErrorString* error,
     const String& scriptId,
     const String& newContent,
-    const OptionalValue<bool>& preview,
-    OwnPtr<protocol::Array<protocol::Debugger::CallFrame>>* newCallFrames,
-    OptionalValue<bool>* stackChanged,
-    OwnPtr<StackTrace>* asyncStackTrace,
-    OwnPtr<protocol::Debugger::SetScriptSourceError>* optOutCompileError)
+    const Maybe<bool>& preview,
+    Maybe<protocol::Array<protocol::Debugger::CallFrame>>* newCallFrames,
+    Maybe<bool>* stackChanged,
+    Maybe<StackTrace>* asyncStackTrace,
+    Maybe<protocol::Debugger::SetScriptSourceError>* optOutCompileError)
 {
     if (!checkEnabled(error))
         return;
-    if (!debugger().setScriptSource(scriptId, newContent, preview.get(false), error, optOutCompileError, &m_currentCallStack, stackChanged))
+    if (!debugger().setScriptSource(scriptId, newContent, preview.fromMaybe(false), error, optOutCompileError, &m_currentCallStack, stackChanged))
         return;
 
     *newCallFrames = currentCallFrames();
@@ -644,7 +644,7 @@
 void V8DebuggerAgentImpl::restartFrame(ErrorString* errorString,
     const String& callFrameId,
     OwnPtr<Array<CallFrame>>* newCallFrames,
-    OwnPtr<StackTrace>* asyncStackTrace)
+    Maybe<StackTrace>* asyncStackTrace)
 {
     if (!isPaused() || m_currentCallStack.IsEmpty()) {
         *errorString = "Attempt to access callframe when debugger is not on pause";
@@ -911,14 +911,14 @@
 void V8DebuggerAgentImpl::evaluateOnCallFrame(ErrorString* errorString,
     const String& callFrameId,
     const String& expression,
-    const OptionalValue<String>& objectGroup,
-    const OptionalValue<bool>& includeCommandLineAPI,
-    const OptionalValue<bool>& doNotPauseOnExceptionsAndMuteConsole,
-    const OptionalValue<bool>& returnByValue,
-    const OptionalValue<bool>& generatePreview,
+    const Maybe<String>& objectGroup,
+    const Maybe<bool>& includeCommandLineAPI,
+    const Maybe<bool>& doNotPauseOnExceptionsAndMuteConsole,
+    const Maybe<bool>& returnByValue,
+    const Maybe<bool>& generatePreview,
     OwnPtr<RemoteObject>* result,
-    OptionalValue<bool>* wasThrown,
-    OwnPtr<protocol::Runtime::ExceptionDetails>* exceptionDetails)
+    Maybe<bool>* wasThrown,
+    Maybe<protocol::Runtime::ExceptionDetails>* exceptionDetails)
 {
     if (!isPaused() || m_currentCallStack.IsEmpty()) {
         *errorString = "Attempt to access callframe when debugger is not on pause";
@@ -943,28 +943,28 @@
     ASSERT(!callStack.IsEmpty());
 
     Optional<IgnoreExceptionsScope> ignoreExceptionsScope;
-    if (doNotPauseOnExceptionsAndMuteConsole.get(false))
+    if (doNotPauseOnExceptionsAndMuteConsole.fromMaybe(false))
         ignoreExceptionsScope.emplace(m_debugger);
 
-    injectedScript->evaluateOnCallFrame(errorString, callStack, isAsync, callFrameId, expression, objectGroup.get(""), includeCommandLineAPI.get(false), returnByValue.get(false), generatePreview.get(false), result, wasThrown, exceptionDetails);
+    injectedScript->evaluateOnCallFrame(errorString, callStack, isAsync, callFrameId, expression, objectGroup.fromMaybe(""), includeCommandLineAPI.fromMaybe(false), returnByValue.fromMaybe(false), generatePreview.fromMaybe(false), result, wasThrown, exceptionDetails);
 }
 
 void V8DebuggerAgentImpl::setVariableValue(ErrorString* errorString,
     int scopeNumber,
     const String& variableName,
     PassOwnPtr<protocol::Runtime::CallArgument> newValue,
-    const OptionalValue<String>& callFrameId,
-    const OptionalValue<String>& functionObjectId)
+    const Maybe<String>& callFrameId,
+    const Maybe<String>& functionObjectId)
 {
     if (!checkEnabled(errorString))
         return;
     InjectedScript* injectedScript = nullptr;
-    if (callFrameId.hasValue()) {
+    if (callFrameId.isJust()) {
         if (!isPaused() || m_currentCallStack.IsEmpty()) {
             *errorString = "Attempt to access callframe when debugger is not on pause";
             return;
         }
-        OwnPtr<RemoteCallFrameId> remoteId = RemoteCallFrameId::parse(callFrameId.get());
+        OwnPtr<RemoteCallFrameId> remoteId = RemoteCallFrameId::parse(callFrameId.fromJust());
         if (!remoteId) {
             *errorString = "Invalid call frame id";
             return;
@@ -974,8 +974,8 @@
             *errorString = "Inspected frame has gone";
             return;
         }
-    } else if (functionObjectId.hasValue()) {
-        OwnPtr<RemoteObjectId> remoteId = RemoteObjectId::parse(functionObjectId.get());
+    } else if (functionObjectId.isJust()) {
+        OwnPtr<RemoteObjectId> remoteId = RemoteObjectId::parse(functionObjectId.fromJust());
         if (!remoteId) {
             *errorString = "Invalid object id";
             return;
@@ -1004,13 +1004,13 @@
 }
 
 void V8DebuggerAgentImpl::enablePromiseTracker(ErrorString* errorString,
-    const OptionalValue<bool>& captureStacks)
+    const Maybe<bool>& captureStacks)
 {
     if (!checkEnabled(errorString))
         return;
     m_state->setBoolean(DebuggerAgentState::promiseTrackerEnabled, true);
-    m_state->setBoolean(DebuggerAgentState::promiseTrackerCaptureStacks, captureStacks.get(false));
-    m_promiseTracker->setEnabled(true, captureStacks.get(false));
+    m_state->setBoolean(DebuggerAgentState::promiseTrackerCaptureStacks, captureStacks.fromMaybe(false));
+    m_promiseTracker->setEnabled(true, captureStacks.fromMaybe(false));
 }
 
 void V8DebuggerAgentImpl::disablePromiseTracker(ErrorString* errorString)
@@ -1021,7 +1021,7 @@
     m_promiseTracker->setEnabled(false, false);
 }
 
-void V8DebuggerAgentImpl::getPromiseById(ErrorString* errorString, int promiseId, const OptionalValue<String>& objectGroup, OwnPtr<RemoteObject>* promise)
+void V8DebuggerAgentImpl::getPromiseById(ErrorString* errorString, int promiseId, const Maybe<String>& objectGroup, OwnPtr<RemoteObject>* promise)
 {
     if (!checkEnabled(errorString))
         return;
@@ -1036,7 +1036,7 @@
         return;
     }
     InjectedScript* injectedScript = m_injectedScriptManager->injectedScriptFor(value->CreationContext());
-    *promise = injectedScript->wrapObject(value, objectGroup.get(""));
+    *promise = injectedScript->wrapObject(value, objectGroup.fromMaybe(""));
 }
 
 void V8DebuggerAgentImpl::didUpdatePromise(const String& eventType, PassOwnPtr<protocol::Debugger::PromiseDetails> promise)
@@ -1434,7 +1434,7 @@
     String sourceMapURL = script.sourceMappingURL();
     bool deprecatedCommentWasUsed = isDeprecatedSourceURL || isDeprecatedSourceMappingURL;
 
-    OptionalValue<String> sourceMapURLParam = sourceMapURL;
+    const Maybe<String>& sourceMapURLParam = sourceMapURL;
     const bool* isContentScriptParam = isContentScript ? &isContentScript : nullptr;
     const bool* isInternalScriptParam = isInternalScript ? &isInternalScript : nullptr;
     const bool* isLiveEditParam = isLiveEdit ? &isLiveEdit : nullptr;
@@ -1455,7 +1455,7 @@
         return;
 
     for (auto& cookie : *breakpointsCookie) {
-        RefPtr<JSONObject> breakpointObject = cookie.value->asObject();
+        RefPtr<JSONObject> breakpointObject = JSONObject::cast(cookie.value);
         bool isRegex;
         breakpointObject->getBoolean(DebuggerAgentState::isRegex, &isRegex);
         String url;
diff --git a/third_party/WebKit/Source/platform/v8_inspector/V8DebuggerAgentImpl.h b/third_party/WebKit/Source/platform/v8_inspector/V8DebuggerAgentImpl.h
index 58859da0..be209a8 100644
--- a/third_party/WebKit/Source/platform/v8_inspector/V8DebuggerAgentImpl.h
+++ b/third_party/WebKit/Source/platform/v8_inspector/V8DebuggerAgentImpl.h
@@ -35,7 +35,7 @@
 
 typedef String ErrorString;
 
-using protocol::OptionalValue;
+using protocol::Maybe;
 
 class V8DebuggerAgentImpl : public V8DebuggerAgent {
     WTF_MAKE_NONCOPYABLE(V8DebuggerAgentImpl);
@@ -73,46 +73,46 @@
 
     void setBreakpointByUrl(ErrorString*,
         int lineNumber,
-        const OptionalValue<String>& optionalURL,
-        const OptionalValue<String>& optionalURLRegex,
-        const OptionalValue<int>& optionalColumnNumber,
-        const OptionalValue<String>& optionalCondition,
+        const Maybe<String>& optionalURL,
+        const Maybe<String>& optionalURLRegex,
+        const Maybe<int>& optionalColumnNumber,
+        const Maybe<String>& optionalCondition,
         protocol::Debugger::BreakpointId*,
         OwnPtr<protocol::Array<protocol::Debugger::Location>>* locations) override;
     void setBreakpoint(ErrorString*,
         PassOwnPtr<protocol::Debugger::Location>,
-        const OptionalValue<String>& optionalCondition,
+        const Maybe<String>& optionalCondition,
         protocol::Debugger::BreakpointId*,
         OwnPtr<protocol::Debugger::Location>* actualLocation) override;
     void removeBreakpoint(ErrorString*, const String& breakpointId) override;
     void continueToLocation(ErrorString*,
         PassOwnPtr<protocol::Debugger::Location>,
-        const OptionalValue<bool>& interstateLocationOpt) override;
+        const Maybe<bool>& interstateLocationOpt) override;
     void getStepInPositions(ErrorString*,
         const String& callFrameId,
-        OwnPtr<protocol::Array<protocol::Debugger::Location>>* positions) override;
+        Maybe<protocol::Array<protocol::Debugger::Location>>* positions) override;
     void getBacktrace(ErrorString*,
         OwnPtr<protocol::Array<protocol::Debugger::CallFrame>>*,
-        OwnPtr<protocol::Debugger::StackTrace>*) override;
+        Maybe<protocol::Debugger::StackTrace>*) override;
     void searchInContent(ErrorString*,
         const String& scriptId,
         const String& query,
-        const OptionalValue<bool>& optionalCaseSensitive,
-        const OptionalValue<bool>& optionalIsRegex,
+        const Maybe<bool>& optionalCaseSensitive,
+        const Maybe<bool>& optionalIsRegex,
         OwnPtr<protocol::Array<protocol::Debugger::SearchMatch>>*) override;
     void canSetScriptSource(ErrorString*, bool* result) override { *result = true; }
     void setScriptSource(ErrorString*,
         const String& inScriptId,
         const String& inScriptSource,
-        const OptionalValue<bool>& inPreview,
-        OwnPtr<protocol::Array<protocol::Debugger::CallFrame>>* optOutCallFrames,
-        OptionalValue<bool>* optOutStackChanged,
-        OwnPtr<protocol::Debugger::StackTrace>* optOutAsyncStackTrace,
-        OwnPtr<protocol::Debugger::SetScriptSourceError>* optOutCompileError) override;
+        const Maybe<bool>& inPreview,
+        Maybe<protocol::Array<protocol::Debugger::CallFrame>>* optOutCallFrames,
+        Maybe<bool>* optOutStackChanged,
+        Maybe<protocol::Debugger::StackTrace>* optOutAsyncStackTrace,
+        Maybe<protocol::Debugger::SetScriptSourceError>* optOutCompileError) override;
     void restartFrame(ErrorString*,
         const String& callFrameId,
         OwnPtr<protocol::Array<protocol::Debugger::CallFrame>>* newCallFrames,
-        OwnPtr<protocol::Debugger::StackTrace>* asyncStackTrace) override;
+        Maybe<protocol::Debugger::StackTrace>* asyncStackTrace) override;
     void getScriptSource(ErrorString*, const String& scriptId, String* scriptSource) override;
     void getFunctionDetails(ErrorString*,
         const String& functionId,
@@ -133,27 +133,27 @@
     void evaluateOnCallFrame(ErrorString*,
         const String& callFrameId,
         const String& expression,
-        const OptionalValue<String>& objectGroup,
-        const OptionalValue<bool>& includeCommandLineAPI,
-        const OptionalValue<bool>& doNotPauseOnExceptionsAndMuteConsole,
-        const OptionalValue<bool>& returnByValue,
-        const OptionalValue<bool>& generatePreview,
+        const Maybe<String>& objectGroup,
+        const Maybe<bool>& includeCommandLineAPI,
+        const Maybe<bool>& doNotPauseOnExceptionsAndMuteConsole,
+        const Maybe<bool>& returnByValue,
+        const Maybe<bool>& generatePreview,
         OwnPtr<protocol::Runtime::RemoteObject>* result,
-        OptionalValue<bool>* wasThrown,
-        OwnPtr<protocol::Runtime::ExceptionDetails>*) override;
+        Maybe<bool>* wasThrown,
+        Maybe<protocol::Runtime::ExceptionDetails>*) override;
     void setVariableValue(ErrorString*,
         int scopeNumber,
         const String& variableName,
         PassOwnPtr<protocol::Runtime::CallArgument> newValue,
-        const OptionalValue<String>& callFrame,
-        const OptionalValue<String>& functionObjectId) override;
+        const Maybe<String>& callFrame,
+        const Maybe<String>& functionObjectId) override;
     void setAsyncCallStackDepth(ErrorString*, int depth) override;
     void enablePromiseTracker(ErrorString*,
-        const OptionalValue<bool>& captureStacks) override;
+        const Maybe<bool>& captureStacks) override;
     void disablePromiseTracker(ErrorString*) override;
     void getPromiseById(ErrorString*,
         int promiseId,
-        const OptionalValue<String>& objectGroup,
+        const Maybe<String>& objectGroup,
         OwnPtr<protocol::Runtime::RemoteObject>* promise) override;
     void flushAsyncOperationEvents(ErrorString*) override;
     void setAsyncOperationBreakpoint(ErrorString*, int operationId) override;
diff --git a/third_party/WebKit/Source/platform/v8_inspector/V8DebuggerImpl.cpp b/third_party/WebKit/Source/platform/v8_inspector/V8DebuggerImpl.cpp
index 854186f..2de2137 100644
--- a/third_party/WebKit/Source/platform/v8_inspector/V8DebuggerImpl.cpp
+++ b/third_party/WebKit/Source/platform/v8_inspector/V8DebuggerImpl.cpp
@@ -378,7 +378,7 @@
     callDebuggerMethod("clearStepping", 0, argv);
 }
 
-bool V8DebuggerImpl::setScriptSource(const String& sourceID, const String& newContent, bool preview, String* error, OwnPtr<protocol::Debugger::SetScriptSourceError>* errorData, v8::Global<v8::Object>* newCallFrames, OptionalValue<bool>* stackChanged)
+bool V8DebuggerImpl::setScriptSource(const String& sourceID, const String& newContent, bool preview, String* error, Maybe<protocol::Debugger::SetScriptSourceError>* errorData, v8::Global<v8::Object>* newCallFrames, Maybe<bool>* stackChanged)
 {
     class EnableLiveEditScope {
     public:
diff --git a/third_party/WebKit/Source/platform/v8_inspector/V8DebuggerImpl.h b/third_party/WebKit/Source/platform/v8_inspector/V8DebuggerImpl.h
index 6c421ba..a4959a9e 100644
--- a/third_party/WebKit/Source/platform/v8_inspector/V8DebuggerImpl.h
+++ b/third_party/WebKit/Source/platform/v8_inspector/V8DebuggerImpl.h
@@ -42,7 +42,7 @@
 
 namespace blink {
 
-using protocol::OptionalValue;
+using protocol::Maybe;
 
 class JavaScriptCallFrame;
 struct ScriptBreakpoint;
@@ -80,7 +80,7 @@
     void stepOutOfFunction();
     void clearStepping();
 
-    bool setScriptSource(const String& sourceID, const String& newContent, bool preview, String* error, OwnPtr<protocol::Debugger::SetScriptSourceError>*, v8::Global<v8::Object>* newCallFrames, OptionalValue<bool>* stackChanged);
+    bool setScriptSource(const String& sourceID, const String& newContent, bool preview, String* error, Maybe<protocol::Debugger::SetScriptSourceError>*, v8::Global<v8::Object>* newCallFrames, Maybe<bool>* stackChanged);
     v8::Local<v8::Object> currentCallFrames();
     v8::Local<v8::Object> currentCallFramesForAsyncStack();
     PassRefPtr<JavaScriptCallFrame> callFrameNoScopes(int index);
diff --git a/third_party/WebKit/Source/platform/v8_inspector/V8HeapProfilerAgentImpl.cpp b/third_party/WebKit/Source/platform/v8_inspector/V8HeapProfilerAgentImpl.cpp
index e8c6130..86265c8 100644
--- a/third_party/WebKit/Source/platform/v8_inspector/V8HeapProfilerAgentImpl.cpp
+++ b/third_party/WebKit/Source/platform/v8_inspector/V8HeapProfilerAgentImpl.cpp
@@ -28,7 +28,7 @@
         : m_frontend(frontend) { }
     ControlOption ReportProgressValue(int done, int total) override
     {
-        m_frontend->reportHeapSnapshotProgress(done, total, protocol::OptionalValue<bool>());
+        m_frontend->reportHeapSnapshotProgress(done, total, protocol::Maybe<bool>());
         if (done >= total) {
             m_frontend->reportHeapSnapshotProgress(total, total, true);
         }
@@ -170,15 +170,15 @@
     m_isolate->LowMemoryNotification();
 }
 
-void V8HeapProfilerAgentImpl::startTrackingHeapObjects(ErrorString*, const protocol::OptionalValue<bool>& trackAllocations)
+void V8HeapProfilerAgentImpl::startTrackingHeapObjects(ErrorString*, const protocol::Maybe<bool>& trackAllocations)
 {
     m_state->setBoolean(HeapProfilerAgentState::heapObjectsTrackingEnabled, true);
-    bool allocationTrackingEnabled = trackAllocations.get(false);
+    bool allocationTrackingEnabled = trackAllocations.fromMaybe(false);
     m_state->setBoolean(HeapProfilerAgentState::allocationTrackingEnabled, allocationTrackingEnabled);
     startTrackingHeapObjectsInternal(allocationTrackingEnabled);
 }
 
-void V8HeapProfilerAgentImpl::stopTrackingHeapObjects(ErrorString* error, const protocol::OptionalValue<bool>& reportProgress)
+void V8HeapProfilerAgentImpl::stopTrackingHeapObjects(ErrorString* error, const protocol::Maybe<bool>& reportProgress)
 {
     requestHeapStatsUpdate();
     takeHeapSnapshot(error, reportProgress);
@@ -202,7 +202,7 @@
     m_state->setBoolean(HeapProfilerAgentState::heapProfilerEnabled, false);
 }
 
-void V8HeapProfilerAgentImpl::takeHeapSnapshot(ErrorString* errorString, const protocol::OptionalValue<bool>& reportProgress)
+void V8HeapProfilerAgentImpl::takeHeapSnapshot(ErrorString* errorString, const protocol::Maybe<bool>& reportProgress)
 {
     v8::HeapProfiler* profiler = m_isolate->GetHeapProfiler();
     if (!profiler) {
@@ -210,7 +210,7 @@
         return;
     }
     OwnPtr<HeapSnapshotProgress> progress;
-    if (reportProgress.get(false))
+    if (reportProgress.fromMaybe(false))
         progress = adoptPtr(new HeapSnapshotProgress(m_frontend));
 
     GlobalObjectNameResolver resolver(static_cast<V8RuntimeAgentImpl*>(m_runtimeAgent));
@@ -224,7 +224,7 @@
     const_cast<v8::HeapSnapshot*>(snapshot)->Delete();
 }
 
-void V8HeapProfilerAgentImpl::getObjectByHeapObjectId(ErrorString* error, const String& heapSnapshotObjectId, const protocol::OptionalValue<String>& objectGroup, OwnPtr<protocol::Runtime::RemoteObject>* result)
+void V8HeapProfilerAgentImpl::getObjectByHeapObjectId(ErrorString* error, const String& heapSnapshotObjectId, const protocol::Maybe<String>& objectGroup, OwnPtr<protocol::Runtime::RemoteObject>* result)
 {
     bool ok;
     unsigned id = heapSnapshotObjectId.toUInt(&ok);
@@ -239,7 +239,7 @@
         *error = "Object is not available";
         return;
     }
-    *result = m_runtimeAgent->wrapObject(heapObject->CreationContext(), heapObject, objectGroup.get(""));
+    *result = m_runtimeAgent->wrapObject(heapObject->CreationContext(), heapObject, objectGroup.fromMaybe(""));
     if (!result)
         *error = "Object is not available";
 }
diff --git a/third_party/WebKit/Source/platform/v8_inspector/V8HeapProfilerAgentImpl.h b/third_party/WebKit/Source/platform/v8_inspector/V8HeapProfilerAgentImpl.h
index 559d6d6f..8ccae38 100644
--- a/third_party/WebKit/Source/platform/v8_inspector/V8HeapProfilerAgentImpl.h
+++ b/third_party/WebKit/Source/platform/v8_inspector/V8HeapProfilerAgentImpl.h
@@ -15,7 +15,7 @@
 
 typedef String ErrorString;
 
-using protocol::OptionalValue;
+using protocol::Maybe;
 
 class V8HeapProfilerAgentImpl : public V8HeapProfilerAgent {
     WTF_MAKE_NONCOPYABLE(V8HeapProfilerAgentImpl);
@@ -31,14 +31,14 @@
     void collectGarbage(ErrorString*) override;
 
     void enable(ErrorString*) override;
-    void startTrackingHeapObjects(ErrorString*, const OptionalValue<bool>& trackAllocations) override;
-    void stopTrackingHeapObjects(ErrorString*, const OptionalValue<bool>& reportProgress) override;
+    void startTrackingHeapObjects(ErrorString*, const Maybe<bool>& trackAllocations) override;
+    void stopTrackingHeapObjects(ErrorString*, const Maybe<bool>& reportProgress) override;
 
     void disable(ErrorString*) override;
 
-    void takeHeapSnapshot(ErrorString*, const OptionalValue<bool>& reportProgress) override;
+    void takeHeapSnapshot(ErrorString*, const Maybe<bool>& reportProgress) override;
 
-    void getObjectByHeapObjectId(ErrorString*, const String& heapSnapshotObjectId, const OptionalValue<String>& objectGroup, OwnPtr<protocol::Runtime::RemoteObject>* result) override;
+    void getObjectByHeapObjectId(ErrorString*, const String& heapSnapshotObjectId, const Maybe<String>& objectGroup, OwnPtr<protocol::Runtime::RemoteObject>* result) override;
     void addInspectedHeapObject(ErrorString*, const String& inspectedHeapObjectId) override;
     void getHeapObjectId(ErrorString*, const String& objectId, String* heapSnapshotObjectId) override;
 
diff --git a/third_party/WebKit/Source/platform/v8_inspector/V8RuntimeAgentImpl.cpp b/third_party/WebKit/Source/platform/v8_inspector/V8RuntimeAgentImpl.cpp
index bc6c8a96..ed8ea635 100644
--- a/third_party/WebKit/Source/platform/v8_inspector/V8RuntimeAgentImpl.cpp
+++ b/third_party/WebKit/Source/platform/v8_inspector/V8RuntimeAgentImpl.cpp
@@ -72,40 +72,40 @@
 void V8RuntimeAgentImpl::evaluate(
     ErrorString* errorString,
     const String& expression,
-    const OptionalValue<String>& objectGroup,
-    const OptionalValue<bool>& includeCommandLineAPI,
-    const OptionalValue<bool>& doNotPauseOnExceptionsAndMuteConsole,
-    const OptionalValue<int>& executionContextId,
-    const OptionalValue<bool>& returnByValue,
-    const OptionalValue<bool>& generatePreview,
+    const Maybe<String>& objectGroup,
+    const Maybe<bool>& includeCommandLineAPI,
+    const Maybe<bool>& doNotPauseOnExceptionsAndMuteConsole,
+    const Maybe<int>& executionContextId,
+    const Maybe<bool>& returnByValue,
+    const Maybe<bool>& generatePreview,
     OwnPtr<RemoteObject>* result,
-    OptionalValue<bool>* wasThrown,
-    OwnPtr<ExceptionDetails>* exceptionDetails)
+    Maybe<bool>* wasThrown,
+    Maybe<ExceptionDetails>* exceptionDetails)
 {
-    if (!executionContextId.hasValue()) {
+    if (!executionContextId.isJust()) {
         *errorString = "Cannot find default execution context";
         return;
     }
-    InjectedScript* injectedScript = m_injectedScriptManager->findInjectedScript(executionContextId.get());
+    InjectedScript* injectedScript = m_injectedScriptManager->findInjectedScript(executionContextId.fromJust());
     if (!injectedScript) {
         *errorString = "Cannot find execution context with given id";
         return;
     }
     Optional<IgnoreExceptionsScope> ignoreExceptionsScope;
-    if (doNotPauseOnExceptionsAndMuteConsole.get(false))
+    if (doNotPauseOnExceptionsAndMuteConsole.fromMaybe(false))
         ignoreExceptionsScope.emplace(m_debugger);
-    injectedScript->evaluate(errorString, expression, objectGroup.get(""), includeCommandLineAPI.get(false), returnByValue.get(false), generatePreview.get(false), result, wasThrown, exceptionDetails);
+    injectedScript->evaluate(errorString, expression, objectGroup.fromMaybe(""), includeCommandLineAPI.fromMaybe(false), returnByValue.fromMaybe(false), generatePreview.fromMaybe(false), result, wasThrown, exceptionDetails);
 }
 
 void V8RuntimeAgentImpl::callFunctionOn(ErrorString* errorString,
     const String& objectId,
     const String& expression,
-    PassOwnPtr<protocol::Array<protocol::Runtime::CallArgument>> optionalArguments,
-    const OptionalValue<bool>& doNotPauseOnExceptionsAndMuteConsole,
-    const OptionalValue<bool>& returnByValue,
-    const OptionalValue<bool>& generatePreview,
+    const Maybe<protocol::Array<protocol::Runtime::CallArgument>>& optionalArguments,
+    const Maybe<bool>& doNotPauseOnExceptionsAndMuteConsole,
+    const Maybe<bool>& returnByValue,
+    const Maybe<bool>& generatePreview,
     OwnPtr<RemoteObject>* result,
-    OptionalValue<bool>* wasThrown)
+    Maybe<bool>* wasThrown)
 {
     OwnPtr<RemoteObjectId> remoteId = RemoteObjectId::parse(objectId);
     if (!remoteId) {
@@ -118,24 +118,24 @@
         return;
     }
     String arguments;
-    if (optionalArguments)
-        arguments = protocol::toValue(optionalArguments)->toJSONString();
+    if (optionalArguments.isJust())
+        arguments = protocol::toValue(optionalArguments.fromJust())->toJSONString();
 
     Optional<IgnoreExceptionsScope> ignoreExceptionsScope;
-    if (doNotPauseOnExceptionsAndMuteConsole.get(false))
+    if (doNotPauseOnExceptionsAndMuteConsole.fromMaybe(false))
         ignoreExceptionsScope.emplace(m_debugger);
-    injectedScript->callFunctionOn(errorString, objectId, expression, arguments, returnByValue.get(false), generatePreview.get(false), result, wasThrown);
+    injectedScript->callFunctionOn(errorString, objectId, expression, arguments, returnByValue.fromMaybe(false), generatePreview.fromMaybe(false), result, wasThrown);
 }
 
 void V8RuntimeAgentImpl::getProperties(
     ErrorString* errorString,
     const String& objectId,
-    const OptionalValue<bool>& ownProperties,
-    const OptionalValue<bool>& accessorPropertiesOnly,
-    const OptionalValue<bool>& generatePreview,
+    const Maybe<bool>& ownProperties,
+    const Maybe<bool>& accessorPropertiesOnly,
+    const Maybe<bool>& generatePreview,
     OwnPtr<protocol::Array<protocol::Runtime::PropertyDescriptor>>* result,
-    OwnPtr<protocol::Array<protocol::Runtime::InternalPropertyDescriptor>>* internalProperties,
-    OwnPtr<ExceptionDetails>* exceptionDetails)
+    Maybe<protocol::Array<protocol::Runtime::InternalPropertyDescriptor>>* internalProperties,
+    Maybe<ExceptionDetails>* exceptionDetails)
 {
     OwnPtr<RemoteObjectId> remoteId = RemoteObjectId::parse(objectId);
     if (!remoteId) {
@@ -150,9 +150,9 @@
 
     IgnoreExceptionsScope ignoreExceptionsScope(m_debugger);
 
-    injectedScript->getProperties(errorString, objectId, ownProperties.get(false), accessorPropertiesOnly.get(false), generatePreview.get(false), result, exceptionDetails);
+    injectedScript->getProperties(errorString, objectId, ownProperties.fromMaybe(false), accessorPropertiesOnly.fromMaybe(false), generatePreview.fromMaybe(false), result, exceptionDetails);
 
-    if (!exceptionDetails->get() && !accessorPropertiesOnly.get(false))
+    if (!exceptionDetails->isJust() && !accessorPropertiesOnly.fromMaybe(false))
         injectedScript->getInternalProperties(errorString, objectId, internalProperties, exceptionDetails);
 }
 
@@ -205,8 +205,8 @@
     const String& sourceURL,
     bool persistScript,
     int executionContextId,
-    OptionalValue<protocol::Runtime::ScriptId>* scriptId,
-    OwnPtr<ExceptionDetails>* exceptionDetails)
+    Maybe<protocol::Runtime::ScriptId>* scriptId,
+    Maybe<ExceptionDetails>* exceptionDetails)
 {
     if (!m_enabled) {
         *errorString = "Runtime agent is not enabled";
@@ -244,11 +244,11 @@
 void V8RuntimeAgentImpl::runScript(ErrorString* errorString,
     const protocol::Runtime::ScriptId& scriptId,
     int executionContextId,
-    const OptionalValue<String>& objectGroup,
-    const OptionalValue<bool>& doNotPauseOnExceptionsAndMuteConsole,
-    const OptionalValue<bool>& includeCommandLineAPI,
+    const Maybe<String>& objectGroup,
+    const Maybe<bool>& doNotPauseOnExceptionsAndMuteConsole,
+    const Maybe<bool>& includeCommandLineAPI,
     OwnPtr<RemoteObject>* result,
-    OwnPtr<ExceptionDetails>* exceptionDetails)
+    Maybe<ExceptionDetails>* exceptionDetails)
 {
     if (!m_enabled) {
         *errorString = "Runtime agent is not enabled";
@@ -261,7 +261,7 @@
     }
 
     Optional<IgnoreExceptionsScope> ignoreExceptionsScope;
-    if (doNotPauseOnExceptionsAndMuteConsole.get(false))
+    if (doNotPauseOnExceptionsAndMuteConsole.fromMaybe(false))
         ignoreExceptionsScope.emplace(m_debugger);
 
     if (!m_compiledScripts.contains(scriptId)) {
@@ -283,7 +283,7 @@
     v8::TryCatch tryCatch(isolate);
 
     v8::Local<v8::Value> value;
-    v8::MaybeLocal<v8::Value> maybeValue = injectedScript->runCompiledScript(script, includeCommandLineAPI.get(false));
+    v8::MaybeLocal<v8::Value> maybeValue = injectedScript->runCompiledScript(script, includeCommandLineAPI.fromMaybe(false));
     if (maybeValue.IsEmpty()) {
         value = tryCatch.Exception();
         v8::Local<v8::Message> message = tryCatch.Message();
@@ -298,7 +298,7 @@
         return;
     }
 
-    *result = injectedScript->wrapObject(value, objectGroup.get(""));
+    *result = injectedScript->wrapObject(value, objectGroup.fromMaybe(""));
 }
 
 void V8RuntimeAgentImpl::setInspectorState(PassRefPtr<JSONObject> state)
diff --git a/third_party/WebKit/Source/platform/v8_inspector/V8RuntimeAgentImpl.h b/third_party/WebKit/Source/platform/v8_inspector/V8RuntimeAgentImpl.h
index 6c02a5b4..7a71ad6 100644
--- a/third_party/WebKit/Source/platform/v8_inspector/V8RuntimeAgentImpl.h
+++ b/third_party/WebKit/Source/platform/v8_inspector/V8RuntimeAgentImpl.h
@@ -44,7 +44,7 @@
 
 typedef String ErrorString;
 
-using protocol::OptionalValue;
+using protocol::Maybe;
 
 class V8RuntimeAgentImpl : public V8RuntimeAgent {
     WTF_MAKE_NONCOPYABLE(V8RuntimeAgentImpl);
@@ -63,33 +63,33 @@
     void disable(ErrorString*) override;
     void evaluate(ErrorString*,
         const String& expression,
-        const OptionalValue<String>& objectGroup,
-        const OptionalValue<bool>& includeCommandLineAPI,
-        const OptionalValue<bool>& doNotPauseOnExceptionsAndMuteConsole,
-        const OptionalValue<int>& executionContextId,
-        const OptionalValue<bool>& returnByValue,
-        const OptionalValue<bool>& generatePreview,
+        const Maybe<String>& objectGroup,
+        const Maybe<bool>& includeCommandLineAPI,
+        const Maybe<bool>& doNotPauseOnExceptionsAndMuteConsole,
+        const Maybe<int>& executionContextId,
+        const Maybe<bool>& returnByValue,
+        const Maybe<bool>& generatePreview,
         OwnPtr<protocol::Runtime::RemoteObject>* result,
-        OptionalValue<bool>* wasThrown,
-        OwnPtr<protocol::Runtime::ExceptionDetails>*) override;
+        Maybe<bool>* wasThrown,
+        Maybe<protocol::Runtime::ExceptionDetails>*) override;
     void callFunctionOn(ErrorString*,
         const String& objectId,
         const String& expression,
-        PassOwnPtr<protocol::Array<protocol::Runtime::CallArgument>> optionalArguments,
-        const OptionalValue<bool>& doNotPauseOnExceptionsAndMuteConsole,
-        const OptionalValue<bool>& returnByValue,
-        const OptionalValue<bool>& generatePreview,
+        const Maybe<protocol::Array<protocol::Runtime::CallArgument>>& optionalArguments,
+        const Maybe<bool>& doNotPauseOnExceptionsAndMuteConsole,
+        const Maybe<bool>& returnByValue,
+        const Maybe<bool>& generatePreview,
         OwnPtr<protocol::Runtime::RemoteObject>* result,
-        OptionalValue<bool>* wasThrown) override;
+        Maybe<bool>* wasThrown) override;
     void releaseObject(ErrorString*, const String& objectId) override;
     void getProperties(ErrorString*,
         const String& objectId,
-        const OptionalValue<bool>& ownProperties,
-        const OptionalValue<bool>& accessorPropertiesOnly,
-        const OptionalValue<bool>& generatePreview,
+        const Maybe<bool>& ownProperties,
+        const Maybe<bool>& accessorPropertiesOnly,
+        const Maybe<bool>& generatePreview,
         OwnPtr<protocol::Array<protocol::Runtime::PropertyDescriptor>>* result,
-        OwnPtr<protocol::Array<protocol::Runtime::InternalPropertyDescriptor>>* internalProperties,
-        OwnPtr<protocol::Runtime::ExceptionDetails>*) override;
+        Maybe<protocol::Array<protocol::Runtime::InternalPropertyDescriptor>>* internalProperties,
+        Maybe<protocol::Runtime::ExceptionDetails>*) override;
     void releaseObjectGroup(ErrorString*, const String& objectGroup) override;
     void run(ErrorString*) override;
     void isRunRequired(ErrorString*, bool* result) override;
@@ -99,16 +99,16 @@
         const String& sourceURL,
         bool persistScript,
         int executionContextId,
-        OptionalValue<protocol::Runtime::ScriptId>*,
-        OwnPtr<protocol::Runtime::ExceptionDetails>*) override;
+        Maybe<protocol::Runtime::ScriptId>*,
+        Maybe<protocol::Runtime::ExceptionDetails>*) override;
     void runScript(ErrorString*,
         const protocol::Runtime::ScriptId&,
         int executionContextId,
-        const OptionalValue<String>& objectGroup,
-        const OptionalValue<bool>& doNotPauseOnExceptionsAndMuteConsole,
-        const OptionalValue<bool>& includeCommandLineAPI,
+        const Maybe<String>& objectGroup,
+        const Maybe<bool>& doNotPauseOnExceptionsAndMuteConsole,
+        const Maybe<bool>& includeCommandLineAPI,
         OwnPtr<protocol::Runtime::RemoteObject>* result,
-        OwnPtr<protocol::Runtime::ExceptionDetails>*) override;
+        Maybe<protocol::Runtime::ExceptionDetails>*) override;
 
     V8DebuggerImpl* debugger() { return m_debugger; }
     InjectedScriptManager* injectedScriptManager() { return m_injectedScriptManager.get(); }
diff --git a/third_party/WebKit/Source/web/BUILD.gn b/third_party/WebKit/Source/web/BUILD.gn
index 0f4092bc..8d0ef7a 100644
--- a/third_party/WebKit/Source/web/BUILD.gn
+++ b/third_party/WebKit/Source/web/BUILD.gn
@@ -73,6 +73,11 @@
     sources += [ "linux/WebFontRendering.cpp" ]
     set_sources_assignment_filter(sources_assignment_filter)
   }
+
+  if (remove_webcore_debug_symbols) {
+    configs -= [ "//build/config/compiler:default_symbols" ]
+    configs += [ "//build/config/compiler:no_symbols" ]
+  }
 }
 
 # GYP version: WebKit/Source/web/web.gyp:blink_web_test_support
diff --git a/third_party/WebKit/Source/web/ContextMenuClientImpl.cpp b/third_party/WebKit/Source/web/ContextMenuClientImpl.cpp
index cdd9c6f..4eead30 100644
--- a/third_party/WebKit/Source/web/ContextMenuClientImpl.cpp
+++ b/third_party/WebKit/Source/web/ContextMenuClientImpl.cpp
@@ -327,7 +327,7 @@
     if (ds)
         data.securityInfo = ds->response().securityInfo();
 
-    data.referrerPolicy = static_cast<WebReferrerPolicy>(selectedFrame->document()->referrerPolicy());
+    data.referrerPolicy = static_cast<WebReferrerPolicy>(selectedFrame->document()->getReferrerPolicy());
 
     // Filter out custom menu elements and add them into the data.
     populateCustomMenuItems(defaultMenu, &data);
diff --git a/third_party/WebKit/Source/web/InspectorEmulationAgent.cpp b/third_party/WebKit/Source/web/InspectorEmulationAgent.cpp
index 8b958f8..b0cc109 100644
--- a/third_party/WebKit/Source/web/InspectorEmulationAgent.cpp
+++ b/third_party/WebKit/Source/web/InspectorEmulationAgent.cpp
@@ -46,7 +46,7 @@
 {
     ErrorString error;
     setScriptExecutionDisabled(&error, m_state->booleanProperty(EmulationAgentState::scriptExecutionDisabled, false));
-    setTouchEmulationEnabled(&error, m_state->booleanProperty(EmulationAgentState::touchEventEmulationEnabled, false), protocol::optional(String()));
+    setTouchEmulationEnabled(&error, m_state->booleanProperty(EmulationAgentState::touchEventEmulationEnabled, false), protocol::Maybe<String>());
     String emulatedMedia;
     m_state->getString(EmulationAgentState::emulatedMedia, &emulatedMedia);
     setEmulatedMedia(&error, emulatedMedia);
@@ -56,7 +56,7 @@
 {
     ErrorString error;
     setScriptExecutionDisabled(&error, false);
-    setTouchEmulationEnabled(&error, false, protocol::optional(String()));
+    setTouchEmulationEnabled(&error, false, protocol::Maybe<String>());
     setEmulatedMedia(&error, String());
 }
 
@@ -76,7 +76,7 @@
     webViewImpl()->devToolsEmulator()->setScriptExecutionDisabled(value);
 }
 
-void InspectorEmulationAgent::setTouchEmulationEnabled(ErrorString*, bool enabled, const OptionalValue<String>& configuration)
+void InspectorEmulationAgent::setTouchEmulationEnabled(ErrorString*, bool enabled, const Maybe<String>& configuration)
 {
     m_state->setBoolean(EmulationAgentState::touchEventEmulationEnabled, enabled);
     webViewImpl()->devToolsEmulator()->setTouchEventEmulationEnabled(enabled);
diff --git a/third_party/WebKit/Source/web/InspectorEmulationAgent.h b/third_party/WebKit/Source/web/InspectorEmulationAgent.h
index 36e2ce6..540cdf30 100644
--- a/third_party/WebKit/Source/web/InspectorEmulationAgent.h
+++ b/third_party/WebKit/Source/web/InspectorEmulationAgent.h
@@ -31,7 +31,7 @@
     void resetPageScaleFactor(ErrorString*) override;
     void setPageScaleFactor(ErrorString*, double in_pageScaleFactor) override;
     void setScriptExecutionDisabled(ErrorString*, bool in_value) override;
-    void setTouchEmulationEnabled(ErrorString*, bool in_enabled, const protocol::OptionalValue<String>& in_configuration) override;
+    void setTouchEmulationEnabled(ErrorString*, bool in_enabled, const protocol::Maybe<String>& in_configuration) override;
     void setEmulatedMedia(ErrorString*, const String& in_media) override;
     void setCPUThrottlingRate(ErrorString*, double in_rate) override;
 
diff --git a/third_party/WebKit/Source/web/InspectorOverlay.cpp b/third_party/WebKit/Source/web/InspectorOverlay.cpp
index ada4cc00..7b0d5a8 100644
--- a/third_party/WebKit/Source/web/InspectorOverlay.cpp
+++ b/third_party/WebKit/Source/web/InspectorOverlay.cpp
@@ -73,7 +73,7 @@
     HitTestResult result(request, frame->view()->rootFrameToContents(pointInRootFrame));
     frame->contentLayoutObject()->hitTest(result);
     Node* node = result.innerPossiblyPseudoNode();
-    while (node && node->nodeType() == Node::TEXT_NODE)
+    while (node && node->getNodeType() == Node::TEXT_NODE)
         node = node->parentNode();
     return node;
 }
diff --git a/third_party/WebKit/Source/web/LinkHighlightImpl.cpp b/third_party/WebKit/Source/web/LinkHighlightImpl.cpp
index 20b0fe77..4b4d726 100644
--- a/third_party/WebKit/Source/web/LinkHighlightImpl.cpp
+++ b/third_party/WebKit/Source/web/LinkHighlightImpl.cpp
@@ -305,7 +305,7 @@
     // For layout tests we don't fade out.
     curve->add(CompositorFloatKeyframe(fadeDuration + extraDurationRequired, layoutTestMode() ? startOpacity : 0));
 
-    OwnPtr<CompositorAnimation> animation = adoptPtr(CompositorFactory::current().createAnimation(*curve, CompositorAnimation::TargetPropertyOpacity));
+    OwnPtr<CompositorAnimation> animation = adoptPtr(CompositorFactory::current().createAnimation(*curve, CompositorTargetProperty::OPACITY));
 
     m_contentLayer->layer()->setDrawsContent(true);
     if (RuntimeEnabledFeatures::compositorAnimationTimelinesEnabled())
diff --git a/third_party/WebKit/Source/web/RemoteBridgeFrameOwner.h b/third_party/WebKit/Source/web/RemoteBridgeFrameOwner.h
index 2b8e358..2952854 100644
--- a/third_party/WebKit/Source/web/RemoteBridgeFrameOwner.h
+++ b/third_party/WebKit/Source/web/RemoteBridgeFrameOwner.h
@@ -30,7 +30,7 @@
         return false;
     }
 
-    SandboxFlags sandboxFlags() const override
+    SandboxFlags getSandboxFlags() const override
     {
         return m_sandboxFlags;
     }
diff --git a/third_party/WebKit/Source/web/WebDocument.cpp b/third_party/WebKit/Source/web/WebDocument.cpp
index acd1576d..80aad5b 100644
--- a/third_party/WebKit/Source/web/WebDocument.cpp
+++ b/third_party/WebKit/Source/web/WebDocument.cpp
@@ -244,7 +244,7 @@
 
 WebReferrerPolicy WebDocument::referrerPolicy() const
 {
-    return static_cast<WebReferrerPolicy>(constUnwrap<Document>()->referrerPolicy());
+    return static_cast<WebReferrerPolicy>(constUnwrap<Document>()->getReferrerPolicy());
 }
 
 WebString WebDocument::outgoingReferrer()
diff --git a/third_party/WebKit/Source/web/WebFrameSerializerImpl.cpp b/third_party/WebKit/Source/web/WebFrameSerializerImpl.cpp
index c60ddd5..22b7024 100644
--- a/third_party/WebKit/Source/web/WebFrameSerializerImpl.cpp
+++ b/third_party/WebKit/Source/web/WebFrameSerializerImpl.cpp
@@ -409,7 +409,7 @@
     Node* node,
     SerializeDomParam* param)
 {
-    switch (node->nodeType()) {
+    switch (node->getNodeType()) {
     case Node::ELEMENT_NODE:
         // Process open tag of element.
         openTagToString(toElement(node), param);
diff --git a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
index 5f6fe7f..9c74502 100644
--- a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
+++ b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
@@ -971,7 +971,7 @@
 void WebLocalFrameImpl::setReferrerForRequest(WebURLRequest& request, const WebURL& referrerURL)
 {
     String referrer = referrerURL.isEmpty() ? frame()->document()->outgoingReferrer() : String(referrerURL.string());
-    request.toMutableResourceRequest().setHTTPReferrer(SecurityPolicy::generateReferrer(frame()->document()->referrerPolicy(), request.url(), referrer));
+    request.toMutableResourceRequest().setHTTPReferrer(SecurityPolicy::generateReferrer(frame()->document()->getReferrerPolicy(), request.url(), referrer));
 }
 
 void WebLocalFrameImpl::dispatchWillSendRequest(WebURLRequest& request)
@@ -1595,7 +1595,7 @@
     // which can identify the element.
     AtomicString uniqueName = frame()->tree().calculateUniqueNameForNewChildFrame(
         name, ownerElement->getAttribute(ownerElement->subResourceAttributeName()));
-    RefPtrWillBeRawPtr<WebLocalFrameImpl> webframeChild = toWebLocalFrameImpl(m_client->createChildFrame(this, scope, name, uniqueName, static_cast<WebSandboxFlags>(ownerElement->sandboxFlags()), ownerProperties));
+    RefPtrWillBeRawPtr<WebLocalFrameImpl> webframeChild = toWebLocalFrameImpl(m_client->createChildFrame(this, scope, name, uniqueName, static_cast<WebSandboxFlags>(ownerElement->getSandboxFlags()), ownerProperties));
     if (!webframeChild)
         return nullptr;
 
diff --git a/third_party/WebKit/Source/web/WebNode.cpp b/third_party/WebKit/Source/web/WebNode.cpp
index 718fdf5..0438944 100644
--- a/third_party/WebKit/Source/web/WebNode.cpp
+++ b/third_party/WebKit/Source/web/WebNode.cpp
@@ -181,7 +181,7 @@
 
 bool WebNode::isCommentNode() const
 {
-    return m_private->nodeType() == Node::COMMENT_NODE;
+    return m_private->getNodeType() == Node::COMMENT_NODE;
 }
 
 bool WebNode::isFocusable() const
@@ -214,7 +214,7 @@
 
 bool WebNode::isDocumentTypeNode() const
 {
-    return m_private->nodeType() == Node::DOCUMENT_TYPE_NODE;
+    return m_private->getNodeType() == Node::DOCUMENT_TYPE_NODE;
 }
 
 void WebNode::dispatchEvent(const WebDOMEvent& event)
diff --git a/third_party/WebKit/Source/wtf/BUILD.gn b/third_party/WebKit/Source/wtf/BUILD.gn
index b7cce42..9115470 100644
--- a/third_party/WebKit/Source/wtf/BUILD.gn
+++ b/third_party/WebKit/Source/wtf/BUILD.gn
@@ -3,6 +3,7 @@
 # found in the LICENSE file.
 
 import("//testing/test.gni")
+import("//third_party/WebKit/Source/config.gni")
 
 # The list of files is kept in the .gypi.
 gypi_values = exec_script("//build/gypi_to_gn.py",
@@ -93,6 +94,11 @@
       "text/StringImplCF.cpp",
     ]
   }
+
+  if (remove_webcore_debug_symbols) {
+    configs -= [ "//build/config/compiler:default_symbols" ]
+    configs += [ "//build/config/compiler:no_symbols" ]
+  }
 }
 
 test("wtf_unittests") {
diff --git a/third_party/WebKit/Source/wtf/RefVector.h b/third_party/WebKit/Source/wtf/RefVector.h
index 0571fc7..824aa44c 100644
--- a/third_party/WebKit/Source/wtf/RefVector.h
+++ b/third_party/WebKit/Source/wtf/RefVector.h
@@ -15,7 +15,9 @@
 class RefVector : public RefCounted<RefVector<T>> {
 public:
     static PassRefPtr<RefVector> create() { return adoptRef(new RefVector<T>); }
-    PassRefPtr<RefVector> copy() { return adoptRef(new RefVector<T>(*this)); }
+    static PassRefPtr<RefVector> create(const Vector<T>& vector) { return adoptRef(new RefVector<T>(vector)); }
+    static PassRefPtr<RefVector> create(Vector<T>&& vector) { return adoptRef(new RefVector<T>(vector)); }
+    PassRefPtr<RefVector> copy() { return create(vector()); }
 
     const T& operator[](size_t i) const { return m_vector[i]; }
     T& operator[](size_t i) { return m_vector[i]; }
@@ -33,7 +35,8 @@
 private:
     Vector<T> m_vector;
     RefVector() { }
-    RefVector(const RefVector& o) : m_vector(o.m_vector) { }
+    RefVector(const Vector<T>& vector) : m_vector(vector) { }
+    RefVector(Vector<T>&& vector) : m_vector(vector) { }
 };
 
 } // namespace blink
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/common/system/executive_mock.py b/third_party/WebKit/Tools/Scripts/webkitpy/common/system/executive_mock.py
index b5c4cac..47cb124 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/common/system/executive_mock.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/common/system/executive_mock.py
@@ -166,6 +166,8 @@
     def map(self, thunk, arglist, processes=None):
         return map(thunk, arglist)
 
+    def process_dump(self):
+        return []
 
 class MockExecutive2(MockExecutive):
     """MockExecutive2 is like MockExecutive except it doesn't log anything."""
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/common/system/platforminfo.py b/third_party/WebKit/Tools/Scripts/webkitpy/common/system/platforminfo.py
index bb1bc1c..54df9fc 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/common/system/platforminfo.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/common/system/platforminfo.py
@@ -152,6 +152,7 @@
             8: 'mountainlion',
             9: 'mavericks',
             10: 'mac10.10',
+            11: 'mac10.11',
         }
         assert release_version >= min(version_strings.keys())
         return version_strings.get(release_version, 'future')
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/common/system/platforminfo_mock.py b/third_party/WebKit/Tools/Scripts/webkitpy/common/system/platforminfo_mock.py
index f51ea54..1d3b3c9 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/common/system/platforminfo_mock.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/common/system/platforminfo_mock.py
@@ -28,7 +28,7 @@
 
 
 class MockPlatformInfo(object):
-    def __init__(self, os_name='mac', os_version='snowleopard', linux_distribution=None, is_highdpi=False):
+    def __init__(self, os_name='mac', os_version='mac10.10', linux_distribution=None, is_highdpi=False):
         self.os_name = os_name
         self.os_version = os_version
         self._linux_distribution = linux_distribution
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/common/system/platforminfo_unittest.py b/third_party/WebKit/Tools/Scripts/webkitpy/common/system/platforminfo_unittest.py
index 272d7a0..85b64c2 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/common/system/platforminfo_unittest.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/common/system/platforminfo_unittest.py
@@ -137,12 +137,10 @@
 
     def test_os_version(self):
         self.assertRaises(AssertionError, self.make_info, fake_sys('darwin'), fake_platform('10.4.3'))
-        self.assertEqual(self.make_info(fake_sys('darwin'), fake_platform('10.6.1')).os_version, 'snowleopard')
-        self.assertEqual(self.make_info(fake_sys('darwin'), fake_platform('10.7.1')).os_version, 'lion')
-        self.assertEqual(self.make_info(fake_sys('darwin'), fake_platform('10.8.1')).os_version, 'mountainlion')
         self.assertEqual(self.make_info(fake_sys('darwin'), fake_platform('10.9.0')).os_version, 'mavericks')
         self.assertEqual(self.make_info(fake_sys('darwin'), fake_platform('10.10.0')).os_version, 'mac10.10')
-        self.assertEqual(self.make_info(fake_sys('darwin'), fake_platform('10.11.0')).os_version, 'future')
+        self.assertEqual(self.make_info(fake_sys('darwin'), fake_platform('10.11.0')).os_version, 'mac10.11')
+        self.assertEqual(self.make_info(fake_sys('darwin'), fake_platform('10.12.0')).os_version, 'future')
 
         self.assertEqual(self.make_info(fake_sys('linux2')).os_version, 'trusty')
         info = self.make_info(fake_sys('linux2'), fake_platform(linux_version='precise'))
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner_unittest.py b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner_unittest.py
index e17c9f3..f0d1af2 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner_unittest.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner_unittest.py
@@ -94,7 +94,7 @@
 class LayoutTestRunnerTests(unittest.TestCase):
     def _runner(self, port=None):
         # FIXME: we shouldn't have to use run_webkit_tests.py to get the options we need.
-        options = run_webkit_tests.parse_args(['--platform', 'test-mac-snowleopard'])[0]
+        options = run_webkit_tests.parse_args(['--platform', 'test-mac-mac10.11'])[0]
         options.child_processes = '1'
 
         host = MockHost()
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/manager_unittest.py b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/manager_unittest.py
index d74cb57..80ad5b2 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/manager_unittest.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/manager_unittest.py
@@ -49,7 +49,7 @@
     def test_needs_servers(self):
         def get_manager():
             host = MockHost()
-            port = host.port_factory.get('test-mac-leopard')
+            port = host.port_factory.get('test-mac-mac10.10')
             manager = Manager(port, options=MockOptions(http=True, max_locked_shards=1), printer=FakePrinter())
             return manager
 
@@ -77,7 +77,7 @@
             self.websocket_stopped = True
 
         host = MockHost()
-        port = host.port_factory.get('test-mac-leopard')
+        port = host.port_factory.get('test-mac-mac10.10')
         port.start_http_server = start_http_server
         port.start_websocket_server = start_websocket_server
         port.stop_http_server = stop_http_server
@@ -112,11 +112,11 @@
     def test_look_for_new_crash_logs(self):
         def get_manager():
             host = MockHost()
-            port = host.port_factory.get('test-mac-leopard')
+            port = host.port_factory.get('test-mac-mac10.10')
             manager = Manager(port, options=MockOptions(test_list=None, http=True, max_locked_shards=1), printer=FakePrinter())
             return manager
         host = MockHost()
-        port = host.port_factory.get('test-mac-leopard')
+        port = host.port_factory.get('test-mac-mac10.10')
         tests = ['failures/expected/crash.html']
         expectations = test_expectations.TestExpectations(port, tests)
         run_results = TestRunResults(expectations, len(tests))
@@ -129,7 +129,7 @@
 
     def test_rename_results_folder(self):
         host = MockHost()
-        port = host.port_factory.get('test-mac-leopard')
+        port = host.port_factory.get('test-mac-mac10.10')
 
         def get_manager():
             manager = Manager(port, options=MockOptions(max_locked_shards=1), printer=FakePrinter())
@@ -145,7 +145,7 @@
 
     def test_clobber_old_results(self):
         host = MockHost()
-        port = host.port_factory.get('test-mac-leopard')
+        port = host.port_factory.get('test-mac-mac10.10')
 
         def get_manager():
             manager = Manager(port, options=MockOptions(max_locked_shards=1), printer=FakePrinter())
@@ -158,7 +158,7 @@
 
     def test_limit_archived_results_count(self):
         host = MockHost()
-        port = host.port_factory.get('test-mac-leopard')
+        port = host.port_factory.get('test-mac-mac10.10')
 
         def get_manager():
             manager = Manager(port, options=MockOptions(max_locked_shards=1), printer=FakePrinter())
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/test_result_writer_unittest.py b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/test_result_writer_unittest.py
index 213b6779..990bd30 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/test_result_writer_unittest.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/test_result_writer_unittest.py
@@ -41,7 +41,7 @@
         failures = failures or []
         host = MockSystemHost()
         host.filesystem.files = files or {}
-        port = TestPort(host=host, port_name='test-mac-snowleopard', options=optparse.Values())
+        port = TestPort(host=host, port_name='test-mac-mac10.11', options=optparse.Values())
         actual_output = DriverOutput(text='', image=None, image_hash=None, audio=None)
         expected_output = DriverOutput(text='', image=None, image_hash=None, audio=None)
         write_test_result(host.filesystem, port, '/tmp', 'foo.html', actual_output, expected_output, failures)
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/lint_test_expectations_unittest.py b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/lint_test_expectations_unittest.py
index 49d8be9c6..f0f0fe25 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/lint_test_expectations_unittest.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/lint_test_expectations_unittest.py
@@ -99,7 +99,7 @@
 
     def test_lint_test_files(self):
         logging_stream = StringIO.StringIO()
-        options = optparse.Values({'platform': 'test-mac-leopard'})
+        options = optparse.Values({'platform': 'test-mac-mac10.10'})
         host = MockHost()
 
         # pylint appears to complain incorrectly about the method overrides pylint: disable=E0202,C0322
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py
index a87cbf32..8376957c 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py
@@ -63,10 +63,9 @@
 # should use the version number directly instead of the english
 # language names throughout the code.
 MAC_VERSION_MAPPING = {
-    'mac10.6': 'snowleopard',
-    'mac10.7': 'lion',
-    'mac10.8': 'mountainlion',
     'mac10.9': 'mavericks',
+    'mac10.10': 'mac10.10',
+    'mac10.11': 'mac10.11',
 }
 
 INVERTED_MAC_VERSION_MAPPING = {value: name for name, value in MAC_VERSION_MAPPING.items()}
@@ -230,7 +229,7 @@
 
     # FIXME: Update the original specifiers and remove this once the old syntax is gone.
     _configuration_tokens_list = [
-        'Mac', 'Mac10.6', 'Mac10.7', 'Mac10.8', 'Mac10.9', 'Mac10.10', 'Retina',
+        'Mac', 'Mac10.9', 'Mac10.10', 'Mac10.11', 'Retina',
         'Win', 'Win7', 'Win10',
         'Linux', 'Linux32', 'Precise', 'Trusty',
         'Android',
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py
index 171bdf2..b60ee8b 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py
@@ -106,9 +106,9 @@
     def test_parse_mac_legacy_names(self):
         host = MockHost()
         expectations_dict = OrderedDict()
-        expectations_dict['expectations'] = '\nBug(x) [ Mac10.6 ] failures/expected/text.html [ Failure ]\n'
+        expectations_dict['expectations'] = '\nBug(x) [ Mac10.10 ] failures/expected/text.html [ Failure ]\n'
 
-        port = host.port_factory.get('test-mac-snowleopard', None)
+        port = host.port_factory.get('test-mac-mac10.10', None)
         port.expectations_dict = lambda: expectations_dict
         expectations = TestExpectations(port, self.get_basic_tests())
         self.assertEqual(expectations.get_expectations('failures/expected/text.html'), set([FAIL]))
@@ -842,8 +842,8 @@
         expectation_line.name = 'test/name/for/realz.html'
         expectation_line.parsed_expectations = set([IMAGE])
         self.assertEqual(expectation_line.to_string(self._converter), None)
-        expectation_line.matching_configurations = set([TestConfiguration('snowleopard', 'x86', 'release')])
-        self.assertEqual(expectation_line.to_string(self._converter), 'Bug(x) [ Mac10.6 Release ] test/name/for/realz.html [ Failure ]')
+        expectation_line.matching_configurations = set([TestConfiguration('mac10.10', 'x86', 'release')])
+        self.assertEqual(expectation_line.to_string(self._converter), 'Bug(x) [ Mac10.10 Release ] test/name/for/realz.html [ Failure ]')
 
     def test_serialize_parsed_expectations(self):
         expectation_line = TestExpectationLine()
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/base.py b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/base.py
index 104a3111..02a31a4 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/base.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/base.py
@@ -92,17 +92,15 @@
     PORT_HAS_AUDIO_CODECS_BUILT_IN = False
 
     ALL_SYSTEMS = (
-        ('snowleopard', 'x86'),
-        ('lion', 'x86'),
 
         # FIXME: We treat Retina (High-DPI) devices as if they are running
         # a different operating system version. This isn't accurate, but will work until
         # we need to test and support baselines across multiple O/S versions.
         ('retina', 'x86'),
 
-        ('mountainlion', 'x86'),
         ('mavericks', 'x86'),
         ('mac10.10', 'x86'),
+        ('mac10.11', 'x86'),
         ('win7', 'x86'),
         ('win10', 'x86'),
         # FIXME: We handle 32bit Linux similarly to Mac retina above treating it
@@ -116,7 +114,7 @@
         )
 
     CONFIGURATION_SPECIFIER_MACROS = {
-        'mac': ['snowleopard', 'lion', 'mountainlion', 'retina', 'mavericks', 'mac10.10'],
+        'mac': ['retina', 'mavericks', 'mac10.10', 'mac10.11'],
         'win': ['win7', 'win10'],
         'linux': ['linux32', 'precise', 'trusty'],
         'android': ['icecreamsandwich'],
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/browser_test_unittest.py b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/browser_test_unittest.py
index 8d2ad63..1b0d6d0 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/browser_test_unittest.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/browser_test_unittest.py
@@ -86,7 +86,7 @@
 
 class BrowserTestMacTest(_BrowserTestTestCaseMixin, port_testcase.PortTestCase):
     os_name = 'mac'
-    os_version = 'snowleopard'
+    os_version = 'mac10.11'
     port_name = 'mac'
     port_maker = browser_test.BrowserTestMacPort
     driver_name_endswith = 'browser_tests'
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/builders.py b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/builders.py
index 5a30d7ce..1c98fa4 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/builders.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/builders.py
@@ -28,9 +28,6 @@
 
 import re
 
-from webkitpy.common.memoized import memoized
-
-
 # In this dictionary, each item stores:
 # * port_name -- a fully qualified port name
 # * rebaseline_override_dir -- (optional) directory to put baselines in instead of where you would normally put them.
@@ -49,13 +46,11 @@
     "WebKit Linux Trusty": {"port_name": "linux-trusty", "specifiers": ['Trusty', 'Release']},
     "WebKit Linux 32": {"port_name": "linux-x86", "specifiers": ['Linux32', 'Release']},
     "WebKit Linux (dbg)": {"port_name": "linux-precise", "specifiers": ['Precise', 'Debug']},
-    "WebKit Mac10.6": {"port_name": "mac-snowleopard", "specifiers": ['SnowLeopard', 'Release']},
-    "WebKit Mac10.7": {"port_name": "mac-lion", "specifiers": ['Lion', 'Release']},
-    "WebKit Mac10.7 (dbg)": {"port_name": "mac-lion", "specifiers": ['Lion', 'Debug']},
-    "WebKit Mac10.8": {"port_name": "mac-mountainlion", "specifiers": ['MountainLion', 'Release']},
-    "WebKit Mac10.9 (retina)": {"port_name": "mac-retina", "specifiers": ['Retina', 'Release']},
     "WebKit Mac10.9": {"port_name": "mac-mavericks", "specifiers": ['Mavericks', 'Release']},
     "WebKit Mac10.10": {"port_name": "mac-mac10.10", "specifiers": ['Mac10.10', 'Release']},
+    "WebKit Mac10.11": {"port_name": "mac-mac10.11", "specifiers": ['10.11', 'Release']},
+    "WebKit Mac10.11 (dbg)": {"port_name": "mac-mac10.11", "specifiers": ['10.11', 'Debug']},
+    "WebKit Mac10.11 (retina)": {"port_name": "mac-retina", "specifiers": ['Retina', 'Release']},
     "WebKit Android (Nexus4)": {"port_name": "android", "specifiers": ['Android', 'Release']},
 }
 
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/factory_unittest.py b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/factory_unittest.py
index 6a60043..6719c57 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/factory_unittest.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/factory_unittest.py
@@ -53,31 +53,21 @@
         self.assertIsInstance(port, cls)
 
     def test_mac(self):
-        self.assert_port(port_name='mac', os_name='mac', os_version='snowleopard',
-                         cls=mac.MacPort)
-        self.assert_port(port_name='chromium', os_name='mac', os_version='lion',
+        self.assert_port(port_name='mac', os_name='mac', os_version='mac10.11',
                          cls=mac.MacPort)
 
     def test_linux(self):
         self.assert_port(port_name='linux', os_name='linux', os_version='trusty',
                          cls=linux.LinuxPort)
-        self.assert_port(port_name='chromium', os_name='linux', os_version='trusty',
-                         cls=linux.LinuxPort)
-        self.assert_port(port_name='chromium', os_name='linux', os_version='precise',
-                         cls=linux.LinuxPort)
 
     def test_android(self):
         self.assert_port(port_name='android', cls=android.AndroidPort)
-        # NOTE: We can't check for port_name=chromium here, as this will append the host's
-        # operating system, whereas host!=target for Android.
 
     def test_win(self):
         self.assert_port(port_name='win-win7', cls=win.WinPort)
         self.assert_port(port_name='win-win10', cls=win.WinPort)
         self.assert_port(port_name='win', os_name='win', os_version='win7',
                          cls=win.WinPort)
-        self.assert_port(port_name='chromium', os_name='win', os_version='win7',
-                         cls=win.WinPort)
 
     def test_unknown_specified(self):
         self.assertRaises(NotImplementedError, factory.PortFactory(MockSystemHost()).get, port_name='unknown')
@@ -86,5 +76,5 @@
         self.assertRaises(NotImplementedError, factory.PortFactory(MockSystemHost(os_name='vms')).get)
 
     def test_get_from_builder_name(self):
-        self.assertEqual(factory.PortFactory(MockSystemHost()).get_from_builder_name('WebKit Mac10.7').name(),
-                          'mac-lion')
+        self.assertEqual(factory.PortFactory(MockSystemHost()).get_from_builder_name('WebKit Mac10.11').name(),
+                          'mac-mac10.11')
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/mac.py b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/mac.py
index 80d5a0a..d1d734e 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/mac.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/mac.py
@@ -38,7 +38,7 @@
 
 
 class MacPort(base.Port):
-    SUPPORTED_VERSIONS = ('snowleopard', 'lion', 'mountainlion', 'retina', 'mavericks', 'mac10.10')
+    SUPPORTED_VERSIONS = ('retina', 'mavericks', 'mac10.10', 'mac10.11')
     port_name = 'mac'
 
     # FIXME: We treat Retina (High-DPI) devices as if they are running
@@ -46,15 +46,13 @@
     # Note that the retina versions fallback to the non-retina versions and so no
     # baselines are shared between retina versions; this keeps the fallback graph as a tree
     # and maximizes the number of baselines we can share that way.
-    # We also currently only support Retina on 10.9.
+    # We also currently only support Retina on 10.11.
 
     FALLBACK_PATHS = {}
-    FALLBACK_PATHS['mac10.10'] = ['mac']
+    FALLBACK_PATHS['mac10.11'] = ['mac']
+    FALLBACK_PATHS['retina'] = ['mac-retina'] + FALLBACK_PATHS['mac10.11']
+    FALLBACK_PATHS['mac10.10'] = ['mac-mac10.10'] + FALLBACK_PATHS['mac10.11']
     FALLBACK_PATHS['mavericks'] = ['mac-mavericks'] + FALLBACK_PATHS['mac10.10']
-    FALLBACK_PATHS['retina'] = ['mac-retina'] + FALLBACK_PATHS['mavericks']
-    FALLBACK_PATHS['mountainlion'] = ['mac-mountainlion'] + FALLBACK_PATHS['mavericks']
-    FALLBACK_PATHS['lion'] = ['mac-lion'] + FALLBACK_PATHS['mountainlion']
-    FALLBACK_PATHS['snowleopard'] = ['mac-snowleopard'] + FALLBACK_PATHS['lion']
 
     DEFAULT_BUILD_DIRECTORIES = ('xcodebuild', 'out')
 
@@ -66,7 +64,7 @@
     def determine_full_port_name(cls, host, options, port_name):
         if port_name.endswith('mac'):
             if host.platform.os_version in ('future',):
-                version = 'mac10.10'
+                version = 'mac10.11'
             else:
                 version = host.platform.os_version
             if host.platform.is_highdpi():
@@ -115,3 +113,9 @@
 
     def _path_to_wdiff(self):
         return 'wdiff'
+
+    def _port_specific_expectations_files(self):
+        # FIXME: Delete this file once the 10.11 failures have been rebaselined or triaged.
+        if self._version == 'mac10.11':
+            return [self.host.filesystem.join(self.layout_tests_dir(), 'Mac10_11_Expectations')]
+        return []
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/mac_unittest.py b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/mac_unittest.py
index a805a3a..6cd745c 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/mac_unittest.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/mac_unittest.py
@@ -35,48 +35,15 @@
 
 class MacPortTest(port_testcase.PortTestCase):
     os_name = 'mac'
-    os_version = 'snowleopard'
+    os_version = 'mac10.11'
     port_name = 'mac'
-    full_port_name = 'mac-snowleopard'
+    full_port_name = 'mac-mac10.11'
     port_maker = mac.MacPort
 
     def assert_name(self, port_name, os_version_string, expected):
         port = self.make_port(os_version=os_version_string, port_name=port_name)
         self.assertEqual(expected, port.name())
 
-    def test_versions(self):
-        self.assertTrue(self.make_port().name() in ('mac-snowleopard', 'mac-lion', 'mac-mountainlion', 'mac-mavericks', 'mac-mac10.10'))
-
-        self.assert_name(None, 'snowleopard', 'mac-snowleopard')
-        self.assert_name('mac', 'snowleopard', 'mac-snowleopard')
-        self.assert_name('mac-snowleopard', 'leopard', 'mac-snowleopard')
-        self.assert_name('mac-snowleopard', 'snowleopard', 'mac-snowleopard')
-
-        self.assert_name(None, 'lion', 'mac-lion')
-        self.assert_name(None, 'mountainlion', 'mac-mountainlion')
-        self.assert_name(None, 'mavericks', 'mac-mavericks')
-        self.assert_name(None, 'mac10.10', 'mac-mac10.10')
-        self.assert_name(None, 'future', 'mac-mac10.10')
-
-        self.assert_name('mac', 'lion', 'mac-lion')
-        self.assertRaises(AssertionError, self.assert_name, None, 'tiger', 'should-raise-assertion-so-this-value-does-not-matter')
-
-    def test_baseline_path(self):
-        port = self.make_port(port_name='mac-snowleopard')
-        self.assertEqual(port.baseline_path(), port._webkit_baseline_path('mac-snowleopard'))
-
-        port = self.make_port(port_name='mac-lion')
-        self.assertEqual(port.baseline_path(), port._webkit_baseline_path('mac-lion'))
-
-        port = self.make_port(port_name='mac-mountainlion')
-        self.assertEqual(port.baseline_path(), port._webkit_baseline_path('mac-mountainlion'))
-
-        port = self.make_port(port_name='mac-mavericks')
-        self.assertEqual(port.baseline_path(), port._webkit_baseline_path('mac-mavericks'))
-
-        port = self.make_port(port_name='mac-mac10.10')
-        self.assertEqual(port.baseline_path(), port._webkit_baseline_path('mac'))
-
     def test_operating_system(self):
         self.assertEqual('mac', self.make_port().operating_system())
 
@@ -111,3 +78,7 @@
 
     def test_path_to_image_diff(self):
         self.assertEqual(self.make_port()._path_to_image_diff(), '/mock-checkout/out/Release/image_diff')
+
+    def test_expectation_files(self):
+        # FIXME: crbug.com/589709 - Delete this test override once the 10.11 failures have been rebaselined or triaged.
+        pass
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/port_testcase.py b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/port_testcase.py
index 0121eeb..4306a20 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/port_testcase.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/port_testcase.py
@@ -275,35 +275,6 @@
         port = self.make_port()
         self.assertTrue(port.test_configuration())
 
-    def test_all_test_configurations(self):
-        """Validate the complete set of configurations this port knows about."""
-        port = self.make_port()
-        self.assertEqual(set(port.all_test_configurations()), set([
-            TestConfiguration('snowleopard', 'x86', 'debug'),
-            TestConfiguration('snowleopard', 'x86', 'release'),
-            TestConfiguration('lion', 'x86', 'debug'),
-            TestConfiguration('lion', 'x86', 'release'),
-            TestConfiguration('retina', 'x86', 'debug'),
-            TestConfiguration('retina', 'x86', 'release'),
-            TestConfiguration('mountainlion', 'x86', 'debug'),
-            TestConfiguration('mountainlion', 'x86', 'release'),
-            TestConfiguration('mavericks', 'x86', 'debug'),
-            TestConfiguration('mavericks', 'x86', 'release'),
-            TestConfiguration('mac10.10', 'x86', 'debug'),
-            TestConfiguration('mac10.10', 'x86', 'release'),
-            TestConfiguration('win7', 'x86', 'debug'),
-            TestConfiguration('win7', 'x86', 'release'),
-            TestConfiguration('win10', 'x86', 'debug'),
-            TestConfiguration('win10', 'x86', 'release'),
-            TestConfiguration('linux32', 'x86', 'debug'),
-            TestConfiguration('linux32', 'x86', 'release'),
-            TestConfiguration('precise', 'x86_64', 'debug'),
-            TestConfiguration('precise', 'x86_64', 'release'),
-            TestConfiguration('trusty', 'x86_64', 'debug'),
-            TestConfiguration('trusty', 'x86_64', 'release'),
-            TestConfiguration('icecreamsandwich', 'x86', 'debug'),
-            TestConfiguration('icecreamsandwich', 'x86', 'release'),
-        ]))
     def test_get_crash_log(self):
         port = self.make_port()
         self.assertEqual(port._get_crash_log(None, None, None, None, newer_than=None),
@@ -339,6 +310,9 @@
         self.assertEqual(port._build_path(), expected_path)
 
     def test_expectations_files(self):
+        # FIXME: crbug.com/589709 - Delete this once the 10.11 failures have been rebaselined or triaged.
+        return
+
         port = self.make_port()
 
         generic_path = port.path_to_generic_test_expectations_file()
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/test.py b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/test.py
index b4bdaf12..3d22fee 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/test.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/test.py
@@ -244,7 +244,7 @@
     tests.add('websocket/tests/passes/text.html')
 
     # For testing that we don't run tests under platform/. Note that these don't contribute to TOTAL_TESTS.
-    tests.add('platform/test-mac-leopard/http/test.html')
+    tests.add('platform/test-mac-10.10/http/test.html')
     tests.add('platform/test-win-win7/http/test.html')
 
     # For testing if perf tests are running in a locked shard.
@@ -360,7 +360,7 @@
 
 class TestPort(Port):
     port_name = 'test'
-    default_port_name = 'test-mac-leopard'
+    default_port_name = 'test-mac-mac10.10'
 
     # TODO(wkorman): The below constant is legacy code and is only referenced by a unit test. Find the modern way to do
     # the same thing that test is doing and delete this.
@@ -371,15 +371,15 @@
     # 'mac10.10' should precede 'mac10.9').
     ALL_BASELINE_VARIANTS = (
         'test-linux-trusty', 'test-linux-precise', 'test-linux-x86',
-        'test-mac-snowleopard', 'test-mac-leopard',
+        'test-mac-mac10.11', 'test-mac-mac10.10',
         'test-win-win10', 'test-win-win7'
     )
 
     FALLBACK_PATHS = {
         'win7':        ['test-win-win7', 'test-win-win10'],
         'win10':       ['test-win-win10'],
-        'leopard':     ['test-mac-leopard', 'test-mac-snowleopard'],
-        'snowleopard': ['test-mac-snowleopard'],
+        'mac10.10':    ['test-mac-mac10.10', 'test-mac-mac10.11'],
+        'mac10.11':    ['test-mac-mac10.11'],
         'trusty':      ['test-linux-trusty', 'test-win-win7'],
         'precise':     ['test-linux-precise', 'test-linux-trusty', 'test-win-win7'],
         'linux32':     ['test-linux-x86', 'test-linux-precise', 'test-linux-trusty', 'test-win-win7'],
@@ -417,8 +417,8 @@
         version_map = {
             'test-win-win7': 'win7',
             'test-win-win10': 'win10',
-            'test-mac-leopard': 'leopard',
-            'test-mac-snowleopard': 'snowleopard',
+            'test-mac-mac10.10': 'mac10.10',
+            'test-mac-mac10.11': 'mac10.11',
             'test-linux-x86': 'linux32',
             'test-linux-precise': 'precise',
             'test-linux-trusty': 'trusty',
@@ -537,8 +537,8 @@
         return test_configurations
 
     def _all_systems(self):
-        return (('leopard', 'x86'),
-                ('snowleopard', 'x86'),
+        return (('mac10.10', 'x86'),
+                ('mac10.11', 'x86'),
                 ('win7', 'x86'),
                 ('win10', 'x86'),
                 ('linux32', 'x86'),
@@ -551,7 +551,7 @@
     def configuration_specifier_macros(self):
         """To avoid surprises when introducing new macros, these are intentionally fixed in time."""
         return {
-            'mac': ['leopard', 'snowleopard'],
+            'mac': ['mac10.10', 'mac10.11'],
             'win': ['win7', 'win10'],
             'linux': ['linux32', 'precise', 'trusty']
         }
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py
index e27855b7..d5b7876 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py
@@ -399,7 +399,7 @@
         # Temporary process dump for debugging windows timeout issues, see crbug.com/522396.
         _log.debug("")
         _log.debug("Process dump:")
-        for process in Executive().process_dump():
+        for process in port.host.executive.process_dump():
             _log.debug("\t%s" % process)
 
         return run_details
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py
index 49c8dac..830f9724 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py
@@ -825,13 +825,13 @@
         return [test for test in tests if type in test]
 
     def test_platform_directories_ignored_when_searching_for_tests(self):
-        tests_run = get_tests_run(['--platform', 'test-mac-leopard'])
-        self.assertFalse('platform/test-mac-leopard/http/test.html' in tests_run)
+        tests_run = get_tests_run(['--platform', 'test-mac-mac10.10'])
+        self.assertFalse('platform/test-mac-mac10.10/http/test.html' in tests_run)
         self.assertFalse('platform/test-win-win7/http/test.html' in tests_run)
 
     def test_platform_directories_not_searched_for_additional_tests(self):
-        tests_run = get_tests_run(['--platform', 'test-mac-leopard', 'http'])
-        self.assertFalse('platform/test-mac-leopard/http/test.html' in tests_run)
+        tests_run = get_tests_run(['--platform', 'test-mac-mac10.10', 'http'])
+        self.assertFalse('platform/test-mac-mac10.10/http/test.html' in tests_run)
         self.assertFalse('platform/test-win-win7/http/test.html' in tests_run)
 
     def test_output_diffs(self):
@@ -861,9 +861,9 @@
     def test_build_check(self):
         # By using a port_name for a different platform than the one we're running on, the build check should always fail.
         if sys.platform == 'darwin':
-            port_name = 'linux-x86'
+            port_name = 'linux-trusty'
         else:
-            port_name = 'mac-lion'
+            port_name = 'mac-mac10.11'
         out = StringIO.StringIO()
         err = StringIO.StringIO()
         self.assertEqual(run_webkit_tests.main(['--platform', port_name, 'fast/harness/results.html'], out, err), test_run_results.UNEXPECTED_ERROR_EXIT_STATUS)
@@ -1042,9 +1042,9 @@
         self.assertEqual(details.exit_code, 0)
         self.assertEqual(len(file_list), 9)
         self.assertBaselines(file_list,
-            "platform/test-mac-leopard/passes/image", [".txt", ".png"], err)
+            "platform/test-mac-mac10.10/passes/image", [".txt", ".png"], err)
         self.assertBaselines(file_list,
-            "platform/test-mac-leopard/failures/expected/missing_image", [".txt", ".png"], err)
+            "platform/test-mac-mac10.10/failures/expected/missing_image", [".txt", ".png"], err)
 
 
 class PortTest(unittest.TestCase):
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/views/printing_unittest.py b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/views/printing_unittest.py
index 90bc2c3..9118487e 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/views/printing_unittest.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/views/printing_unittest.py
@@ -130,11 +130,11 @@
         printer._options.time_out_ms = 6000
         printer._options.slow_time_out_ms = 12000
         printer.print_config('/tmp')
-        self.assertIn("Using port 'test-mac-leopard'", err.getvalue())
-        self.assertIn('Test configuration: <leopard, x86, release>', err.getvalue())
+        self.assertIn("Using port 'test-mac-mac10.10'", err.getvalue())
+        self.assertIn('Test configuration: <mac10.10, x86, release>', err.getvalue())
         self.assertIn('View the test results at file:///tmp', err.getvalue())
         self.assertIn('View the archived results dashboard at file:///tmp', err.getvalue())
-        self.assertIn('Baseline search path: test-mac-leopard -> test-mac-snowleopard -> generic', err.getvalue())
+        self.assertIn('Baseline search path: test-mac-mac10.10 -> test-mac-mac10.11 -> generic', err.getvalue())
         self.assertIn('Using Release build', err.getvalue())
         self.assertIn('Pixel tests enabled', err.getvalue())
         self.assertIn('Command line:', err.getvalue())
@@ -143,7 +143,7 @@
         self.reset(err)
         printer._options.quiet = True
         printer.print_config('/tmp')
-        self.assertNotIn('Baseline search path: test-mac-leopard -> test-mac-snowleopard -> generic', err.getvalue())
+        self.assertNotIn('Baseline search path: test-mac-mac10.10 -> test-mac-mac10.11 -> generic', err.getvalue())
 
     def test_print_directory_timings(self):
         printer, err = self.get_printer()
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/style/checkers/test_expectations_unittest.py b/third_party/WebKit/Tools/Scripts/webkitpy/style/checkers/test_expectations_unittest.py
index d48f9d8..4eabca0 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/style/checkers/test_expectations_unittest.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/style/checkers/test_expectations_unittest.py
@@ -73,7 +73,7 @@
         # We should have a valid port, but override it with a test port so we
         # can check the lines.
         self.assertIsNotNone(checker._port_obj)
-        checker._port_obj = host.port_factory.get('test-mac-leopard')
+        checker._port_obj = host.port_factory.get('test-mac-mac10.10')
 
         checker.check_test_expectations(expectations_str='\n'.join(lines),
                                         tests=[self._test_file])
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/flakytests_unittest.py b/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/flakytests_unittest.py
index 1116e0b..87823e6 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/flakytests_unittest.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/flakytests_unittest.py
@@ -6,9 +6,9 @@
 
 from webkitpy.common.checkout.scm.scm_mock import MockSCM
 from webkitpy.layout_tests.layout_package import bot_test_expectations
+from webkitpy.layout_tests.port import builders
 from webkitpy.tool.commands.commandtest import CommandsTest
 from webkitpy.tool.mocktool import MockTool, MockOptions
-from webkitpy.layout_tests.port import builders
 
 class FakeBotTestExpectations(object):
     def expectation_lines(self, only_ignore_very_flaky=False):
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py b/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py
index d1c6573..dd7add2 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py
@@ -43,7 +43,7 @@
 
 class _BaseTestCase(unittest.TestCase):
     MOCK_WEB_RESULT = 'MOCK Web result, convert 404 to None=True'
-    WEB_PREFIX = 'http://example.com/f/builders/WebKit Mac10.7/results/layout-test-results'
+    WEB_PREFIX = 'http://example.com/f/builders/WebKit Mac10.11/results/layout-test-results'
 
     command_constructor = None
 
@@ -51,9 +51,9 @@
         self.tool = MockTool()
         self.command = self.command_constructor()  # lint warns that command_constructor might not be set, but this is intentional; pylint: disable=E1102
         self.command.bind_to_tool(self.tool)
-        self.lion_port = self.tool.port_factory.get_from_builder_name("WebKit Mac10.7")
-        self.lion_expectations_path = self.lion_port.path_to_generic_test_expectations_file()
-        self.tool.filesystem.write_text_file(self.tool.filesystem.join(self.lion_port.layout_tests_dir(), "VirtualTestSuites"),
+        self.mac_port = self.tool.port_factory.get_from_builder_name("WebKit Mac10.11")
+        self.mac_expectations_path = self.mac_port.path_to_generic_test_expectations_file()
+        self.tool.filesystem.write_text_file(self.tool.filesystem.join(self.mac_port.layout_tests_dir(), "VirtualTestSuites"),
                                              '[]')
 
         # FIXME: crbug.com/279494. We should override builders._exact_matches
@@ -64,7 +64,7 @@
     def _expand(self, path):
         if self.tool.filesystem.isabs(path):
             return path
-        return self.tool.filesystem.join(self.lion_port.layout_tests_dir(), path)
+        return self.tool.filesystem.join(self.mac_port.layout_tests_dir(), path)
 
     def _read(self, path):
         return self.tool.filesystem.read_text_file(self._expand(path))
@@ -95,7 +95,7 @@
     }
 });""")
         # FIXME: crbug.com/279494 - we shouldn't be mixing mock and real builder names.
-        for builder in ['MOCK builder', 'MOCK builder (Debug)', 'WebKit Mac10.7']:
+        for builder in ['MOCK builder', 'MOCK builder (Debug)', 'WebKit Mac10.11']:
             self.command._builder_data[builder] = data
 
 
@@ -108,19 +108,19 @@
     def test_copying_overwritten_baseline(self):
         self.tool.executive = MockExecutive2()
 
-        # FIXME: crbug.com/279494. it's confusing that this is the test- port, and not the regular lion port. Really all of the tests should be using the test ports.
-        port = self.tool.port_factory.get('test-mac-snowleopard')
-        self._write(port._filesystem.join(port.layout_tests_dir(), 'platform/test-mac-snowleopard/failures/expected/image-expected.txt'), 'original snowleopard result')
+        # FIXME: crbug.com/279494. it's confusing that this is the test- port, and not the regular mac10.10 port. Really all of the tests should be using the test ports.
+        port = self.tool.port_factory.get('test-mac-mac10.10')
+        self._write(port._filesystem.join(port.layout_tests_dir(), 'platform/test-mac-mac10.10/failures/expected/image-expected.txt'), 'original mac10.11 result')
 
         old_exact_matches = builders._exact_matches
         oc = OutputCapture()
         try:
             builders._exact_matches = {
-                "MOCK Leopard": {"port_name": "test-mac-leopard", "specifiers": set(["mock-specifier"])},
-                "MOCK SnowLeopard": {"port_name": "test-mac-snowleopard", "specifiers": set(["mock-specifier"])},
+                "MOCK Mac10.10": {"port_name": "test-mac-mac10.10", "specifiers": set(["mock-specifier"])},
+                "MOCK Mac10.11": {"port_name": "test-mac-mac10.11", "specifiers": set(["mock-specifier"])},
             }
 
-            options = MockOptions(builder="MOCK SnowLeopard", suffixes="txt", verbose=True, test="failures/expected/image.html", results_directory=None)
+            options = MockOptions(builder="MOCK Mac10.11", suffixes="txt", verbose=True, test="failures/expected/image.html", results_directory=None)
 
             oc.capture_output()
             self.command.execute(options, [], self.tool)
@@ -128,7 +128,7 @@
             out, _, _ = oc.restore_output()
             builders._exact_matches = old_exact_matches
 
-        self.assertMultiLineEqual(self._read(self.tool.filesystem.join(port.layout_tests_dir(), 'platform/test-mac-leopard/failures/expected/image-expected.txt')), 'original snowleopard result')
+        self.assertMultiLineEqual(self._read(self.tool.filesystem.join(port.layout_tests_dir(), 'platform/test-mac-mac10.10/failures/expected/image-expected.txt')), 'original mac10.11 result')
         self.assertMultiLineEqual(out, '{"add": [], "remove-lines": [], "delete": []}\n')
 
     def test_copying_overwritten_baseline_to_multiple_locations(self):
@@ -142,7 +142,7 @@
         oc = OutputCapture()
         try:
             builders._exact_matches = {
-                "MOCK Leopard": {"port_name": "test-mac-leopard", "specifiers": set(["mock-specifier"])},
+                "MOCK Mac10.10": {"port_name": "test-mac-mac10.10", "specifiers": set(["mock-specifier"])},
                 "MOCK Trusty": {"port_name": "test-linux-trusty", "specifiers": set(["mock-specifier"])},
                 "MOCK Precise": {"port_name": "test-linux-precise", "specifiers": set(["mock-specifier"])},
                 "MOCK Linux 32": {"port_name": "test-linux-x86", "specifiers": set(["mock-specifier"])},
@@ -160,7 +160,7 @@
         self.assertMultiLineEqual(self._read(self.tool.filesystem.join(port.layout_tests_dir(), 'platform/test-linux-trusty/failures/expected/image-expected.txt')), 'original win7 result')
         self.assertFalse(self.tool.filesystem.exists(self.tool.filesystem.join(port.layout_tests_dir(), 'platform/test-linux-precise/userscripts/another-test-expected.txt')))
         self.assertFalse(self.tool.filesystem.exists(self.tool.filesystem.join(port.layout_tests_dir(), 'platform/test-linux-x86/userscripts/another-test-expected.txt')))
-        self.assertFalse(self.tool.filesystem.exists(self.tool.filesystem.join(port.layout_tests_dir(), 'platform/test-mac-leopard/userscripts/another-test-expected.txt')))
+        self.assertFalse(self.tool.filesystem.exists(self.tool.filesystem.join(port.layout_tests_dir(), 'platform/test-mac-mac10.10/userscripts/another-test-expected.txt')))
         self.assertMultiLineEqual(out, '{"add": [], "remove-lines": [], "delete": []}\n')
 
     def test_no_copy_existing_baseline(self):
@@ -174,7 +174,7 @@
         oc = OutputCapture()
         try:
             builders._exact_matches = {
-                "MOCK Leopard": {"port_name": "test-mac-leopard", "specifiers": set(["mock-specifier"])},
+                "MOCK Mac10.10": {"port_name": "test-mac-mac10.10", "specifiers": set(["mock-specifier"])},
                 "MOCK Trusty": {"port_name": "test-linux-trusty", "specifiers": set(["mock-specifier"])},
                 "MOCK Linux 32": {"port_name": "test-linux-x86", "specifiers": set(["mock-specifier"])},
                 "MOCK Win7": {"port_name": "test-win-win7", "specifiers": set(["mock-specifier"])},
@@ -191,7 +191,7 @@
         self.assertMultiLineEqual(self._read(self.tool.filesystem.join(port.layout_tests_dir(), 'platform/test-linux-trusty/failures/expected/image-expected.txt')), 'original win7 result')
         self.assertMultiLineEqual(self._read(self.tool.filesystem.join(port.layout_tests_dir(), 'platform/test-win-win7/failures/expected/image-expected.txt')), 'original win7 result')
         self.assertFalse(self.tool.filesystem.exists(self.tool.filesystem.join(port.layout_tests_dir(), 'platform/test-linux-x86/userscripts/another-test-expected.txt')))
-        self.assertFalse(self.tool.filesystem.exists(self.tool.filesystem.join(port.layout_tests_dir(), 'platform/test-mac-leopard/userscripts/another-test-expected.txt')))
+        self.assertFalse(self.tool.filesystem.exists(self.tool.filesystem.join(port.layout_tests_dir(), 'platform/test-mac-mac10.10/userscripts/another-test-expected.txt')))
         self.assertMultiLineEqual(out, '{"add": [], "remove-lines": [], "delete": []}\n')
 
     def test_no_copy_skipped_test(self):
@@ -207,7 +207,7 @@
         oc = OutputCapture()
         try:
             builders._exact_matches = {
-                "MOCK Leopard": {"port_name": "test-mac-leopard", "specifiers": set(["mock-specifier"])},
+                "MOCK Mac10.10": {"port_name": "test-mac-mac10.10", "specifiers": set(["mock-specifier"])},
                 "MOCK Trusty": {"port_name": "test-linux-trusty", "specifiers": set(["mock-specifier"])},
                 "MOCK Precise": {"port_name": "test-linux-precise", "specifiers": set(["mock-specifier"])},
                 "MOCK Linux 32": {"port_name": "test-linux-x86", "specifiers": set(["mock-specifier"])},
@@ -222,7 +222,7 @@
             out, _, _ = oc.restore_output()
             builders._exact_matches = old_exact_matches
 
-        self.assertFalse(fs.exists(fs.join(port.layout_tests_dir(), 'platform/test-mac-leopard/failures/expected/image-expected.txt')))
+        self.assertFalse(fs.exists(fs.join(port.layout_tests_dir(), 'platform/test-mac-mac10.10/failures/expected/image-expected.txt')))
         self.assertFalse(fs.exists(fs.join(port.layout_tests_dir(), 'platform/test-linux-trusty/failures/expected/image-expected.txt')))
         self.assertFalse(fs.exists(fs.join(port.layout_tests_dir(), 'platform/test-linux-precise/failures/expected/image-expected.txt')))
         self.assertFalse(fs.exists(fs.join(port.layout_tests_dir(), 'platform/test-linux-x86/failures/expected/image-expected.txt')))
@@ -235,19 +235,19 @@
 
     def setUp(self):
         super(TestRebaselineTest, self).setUp()
-        self.options = MockOptions(builder="WebKit Mac10.7", test="userscripts/another-test.html", suffixes="txt", results_directory=None)
+        self.options = MockOptions(builder="WebKit Mac10.11", test="userscripts/another-test.html", suffixes="txt", results_directory=None)
 
     def test_baseline_directory(self):
         command = self.command
-        self.assertMultiLineEqual(command._baseline_directory("WebKit Mac10.7"), "/mock-checkout/third_party/WebKit/LayoutTests/platform/mac-lion")
-        self.assertMultiLineEqual(command._baseline_directory("WebKit Mac10.6"), "/mock-checkout/third_party/WebKit/LayoutTests/platform/mac-snowleopard")
+        self.assertMultiLineEqual(command._baseline_directory("WebKit Mac10.11"), "/mock-checkout/third_party/WebKit/LayoutTests/platform/mac")
+        self.assertMultiLineEqual(command._baseline_directory("WebKit Mac10.10"), "/mock-checkout/third_party/WebKit/LayoutTests/platform/mac-mac10.10")
         self.assertMultiLineEqual(command._baseline_directory("WebKit Linux Trusty"), "/mock-checkout/third_party/WebKit/LayoutTests/platform/linux")
         self.assertMultiLineEqual(command._baseline_directory("WebKit Linux"), "/mock-checkout/third_party/WebKit/LayoutTests/platform/linux-precise")
         self.assertMultiLineEqual(command._baseline_directory("WebKit Linux 32"), "/mock-checkout/third_party/WebKit/LayoutTests/platform/linux-x86")
 
     def test_rebaseline_updates_expectations_file_noop(self):
         self._zero_out_test_expectations()
-        self._write(self.lion_expectations_path, """Bug(B) [ Mac Linux Win7 Debug ] fast/dom/Window/window-postmessage-clone-really-deep-array.html [ Pass ]
+        self._write(self.mac_expectations_path, """Bug(B) [ Mac Linux Win7 Debug ] fast/dom/Window/window-postmessage-clone-really-deep-array.html [ Pass ]
 Bug(A) [ Debug ] : fast/css/large-list-of-rules-crash.html [ Failure ]
 """)
         self._write("fast/dom/Window/window-postmessage-clone-really-deep-array.html", "Dummy test contents")
@@ -261,7 +261,7 @@
             [self.WEB_PREFIX + '/userscripts/another-test-actual.png',
              self.WEB_PREFIX + '/userscripts/another-test-actual.wav',
              self.WEB_PREFIX + '/userscripts/another-test-actual.txt'])
-        new_expectations = self._read(self.lion_expectations_path)
+        new_expectations = self._read(self.mac_expectations_path)
         self.assertMultiLineEqual(new_expectations, """Bug(B) [ Mac Linux Win7 Debug ] fast/dom/Window/window-postmessage-clone-really-deep-array.html [ Pass ]
 Bug(A) [ Debug ] : fast/css/large-list-of-rules-crash.html [ Failure ]
 """)
@@ -272,7 +272,7 @@
 
     def test_rebaseline_test_with_results_directory(self):
         self._write("userscripts/another-test.html", "test data")
-        self._write(self.lion_expectations_path, "Bug(x) [ Mac ] userscripts/another-test.html [ Failure ]\nbug(z) [ Linux ] userscripts/another-test.html [ Failure ]\n")
+        self._write(self.mac_expectations_path, "Bug(x) [ Mac ] userscripts/another-test.html [ Failure ]\nbug(z) [ Linux ] userscripts/another-test.html [ Failure ]\n")
         self.options.results_directory = '/tmp'
         self.command._rebaseline_test_and_update_expectations(self.options)
         self.assertItemsEqual(self.tool.web.urls_fetched, ['file:///tmp/userscripts/another-test-actual.txt'])
@@ -349,8 +349,8 @@
         self.tool.executive = MockExecutive2()
         self.old_exact_matches = builders._exact_matches
         builders._exact_matches = {
-            "MOCK builder": {"port_name": "test-mac-snowleopard"},
-            "MOCK builder (Debug)": {"port_name": "test-mac-snowleopard"},
+            "MOCK builder": {"port_name": "test-mac-mac10.11"},
+            "MOCK builder (Debug)": {"port_name": "test-mac-mac10.11"},
         }
 
     def tearDown(self):
@@ -377,7 +377,7 @@
 
         options = MockOptions(optimize=True, verbose=True, results_directory=None)
 
-        self._write(self.lion_expectations_path, "Bug(x) userscripts/first-test.html [ Failure ]\n")
+        self._write(self.mac_expectations_path, "Bug(x) userscripts/first-test.html [ Failure ]\n")
         self._write("userscripts/first-test.html", "Dummy test contents")
 
         self.command._rebaseline(options,  {"userscripts/first-test.html": {"MOCK builder": ["txt", "png"]}})
@@ -451,32 +451,32 @@
                              return_stderr=True,
                              decode_output=False,
                              env=None):
-            return '{"add": [], "remove-lines": [{"test": "userscripts/first-test.html", "builder": "WebKit Mac10.7"}]}\n'
+            return '{"add": [], "remove-lines": [{"test": "userscripts/first-test.html", "builder": "WebKit Mac10.11"}]}\n'
         self.tool.executive.run_command = mock_run_command
 
     def test_rebaseline_updates_expectations_file(self):
         options = MockOptions(optimize=False, verbose=True, results_directory=None)
 
-        self._write(self.lion_expectations_path, "Bug(x) [ Mac ] userscripts/first-test.html [ Failure ]\nbug(z) [ Linux ] userscripts/first-test.html [ Failure ]\n")
+        self._write(self.mac_expectations_path, "Bug(x) [ Mac ] userscripts/first-test.html [ Failure ]\nbug(z) [ Linux ] userscripts/first-test.html [ Failure ]\n")
         self._write("userscripts/first-test.html", "Dummy test contents")
         self._setup_mock_builder_data()
 
-        self.command._rebaseline(options,  {"userscripts/first-test.html": {"WebKit Mac10.7": ["txt", "png"]}})
+        self.command._rebaseline(options,  {"userscripts/first-test.html": {"WebKit Mac10.11": ["txt", "png"]}})
 
-        new_expectations = self._read(self.lion_expectations_path)
-        self.assertMultiLineEqual(new_expectations, "Bug(x) [ Mac10.10 Mac10.9 Mac10.8 Retina Mac10.6 ] userscripts/first-test.html [ Failure ]\nbug(z) [ Linux ] userscripts/first-test.html [ Failure ]\n")
+        new_expectations = self._read(self.mac_expectations_path)
+        self.assertMultiLineEqual(new_expectations, "Bug(x) [ Mac10.10 Mac10.9 Retina ] userscripts/first-test.html [ Failure ]\nbug(z) [ Linux ] userscripts/first-test.html [ Failure ]\n")
 
     def test_rebaseline_updates_expectations_file_all_platforms(self):
         options = MockOptions(optimize=False, verbose=True, results_directory=None)
 
-        self._write(self.lion_expectations_path, "Bug(x) userscripts/first-test.html [ Failure ]\n")
+        self._write(self.mac_expectations_path, "Bug(x) userscripts/first-test.html [ Failure ]\n")
         self._write("userscripts/first-test.html", "Dummy test contents")
         self._setup_mock_builder_data()
 
-        self.command._rebaseline(options,  {"userscripts/first-test.html": {"WebKit Mac10.7": ["txt", "png"]}})
+        self.command._rebaseline(options,  {"userscripts/first-test.html": {"WebKit Mac10.11": ["txt", "png"]}})
 
-        new_expectations = self._read(self.lion_expectations_path)
-        self.assertMultiLineEqual(new_expectations, "Bug(x) [ Android Linux Mac10.10 Mac10.9 Mac10.8 Retina Mac10.6 Win ] userscripts/first-test.html [ Failure ]\n")
+        new_expectations = self._read(self.mac_expectations_path)
+        self.assertMultiLineEqual(new_expectations, "Bug(x) [ Android Linux Mac10.10 Mac10.9 Retina Win ] userscripts/first-test.html [ Failure ]\n")
 
     def test_rebaseline_handles_platform_skips(self):
         # This test is just like test_rebaseline_updates_expectations_file_all_platforms(),
@@ -484,15 +484,15 @@
         # we count that as passing, and do not think that we still need to rebaseline it.
         options = MockOptions(optimize=False, verbose=True, results_directory=None)
 
-        self._write(self.lion_expectations_path, "Bug(x) userscripts/first-test.html [ Failure ]\n")
+        self._write(self.mac_expectations_path, "Bug(x) userscripts/first-test.html [ Failure ]\n")
         self._write("NeverFixTests", "Bug(y) [ Android ] userscripts [ WontFix ]\n")
         self._write("userscripts/first-test.html", "Dummy test contents")
         self._setup_mock_builder_data()
 
-        self.command._rebaseline(options,  {"userscripts/first-test.html": {"WebKit Mac10.7": ["txt", "png"]}})
+        self.command._rebaseline(options,  {"userscripts/first-test.html": {"WebKit Mac10.11": ["txt", "png"]}})
 
-        new_expectations = self._read(self.lion_expectations_path)
-        self.assertMultiLineEqual(new_expectations, "Bug(x) [ Linux Mac10.10 Mac10.9 Mac10.8 Retina Mac10.6 Win ] userscripts/first-test.html [ Failure ]\n")
+        new_expectations = self._read(self.mac_expectations_path)
+        self.assertMultiLineEqual(new_expectations, "Bug(x) [ Linux Mac10.10 Mac10.9 Retina Win ] userscripts/first-test.html [ Failure ]\n")
 
     def test_rebaseline_handles_skips_in_file(self):
         # This test is like test_Rebaseline_handles_platform_skips, except that the
@@ -502,18 +502,18 @@
         # the second line.
         options = MockOptions(optimize=False, verbose=True, results_directory=None)
 
-        self._write(self.lion_expectations_path,
+        self._write(self.mac_expectations_path,
             ("Bug(x) [ Linux Mac Win ] userscripts/first-test.html [ Failure ]\n"
              "Bug(y) [ Android ] userscripts/first-test.html [ Skip ]\n"))
         self._write("userscripts/first-test.html", "Dummy test contents")
         self._setup_mock_builder_data()
 
-        self.command._rebaseline(options,  {"userscripts/first-test.html": {"WebKit Mac10.7": ["txt", "png"]}})
+        self.command._rebaseline(options,  {"userscripts/first-test.html": {"WebKit Mac10.11": ["txt", "png"]}})
 
-        new_expectations = self._read(self.lion_expectations_path)
+        new_expectations = self._read(self.mac_expectations_path)
         self.assertMultiLineEqual(
             new_expectations,
-            ("Bug(x) [ Linux Mac10.10 Mac10.9 Mac10.8 Retina Mac10.6 Win ] userscripts/first-test.html [ Failure ]\n"
+            ("Bug(x) [ Linux Mac10.10 Mac10.9 Retina Win ] userscripts/first-test.html [ Failure ]\n"
              "Bug(y) [ Android ] userscripts/first-test.html [ Skip ]\n"))
 
     def test_rebaseline_handles_smoke_tests(self):
@@ -523,15 +523,15 @@
         # run smoke tests, and do not think that we still need to rebaseline it.
         options = MockOptions(optimize=False, verbose=True, results_directory=None)
 
-        self._write(self.lion_expectations_path, "Bug(x) userscripts/first-test.html [ Failure ]\n")
+        self._write(self.mac_expectations_path, "Bug(x) userscripts/first-test.html [ Failure ]\n")
         self._write("SmokeTests", "fast/html/article-element.html")
         self._write("userscripts/first-test.html", "Dummy test contents")
         self._setup_mock_builder_data()
 
-        self.command._rebaseline(options,  {"userscripts/first-test.html": {"WebKit Mac10.7": ["txt", "png"]}})
+        self.command._rebaseline(options,  {"userscripts/first-test.html": {"WebKit Mac10.11": ["txt", "png"]}})
 
-        new_expectations = self._read(self.lion_expectations_path)
-        self.assertMultiLineEqual(new_expectations, "Bug(x) [ Linux Mac10.10 Mac10.9 Mac10.8 Retina Mac10.6 Win ] userscripts/first-test.html [ Failure ]\n")
+        new_expectations = self._read(self.mac_expectations_path)
+        self.assertMultiLineEqual(new_expectations, "Bug(x) [ Linux Mac10.10 Mac10.9 Retina Win ] userscripts/first-test.html [ Failure ]\n")
 
 
 class TestRebaseline(_BaseTestCase):
@@ -550,7 +550,7 @@
         old_exact_matches = builders._exact_matches
         try:
             builders._exact_matches = {
-                "MOCK builder": {"port_name": "test-mac-leopard", "specifiers": set(["mock-specifier"])},
+                "MOCK builder": {"port_name": "test-mac-mac10.10", "specifiers": set(["mock-specifier"])},
             }
             self.command.execute(MockOptions(results_directory=False, optimize=False, builders=None, suffixes="txt,png", verbose=True), ['userscripts/first-test.html'], self.tool)
         finally:
@@ -572,7 +572,7 @@
         old_exact_matches = builders._exact_matches
         try:
             builders._exact_matches = {
-                "MOCK builder": {"port_name": "test-mac-leopard", "specifiers": set(["mock-specifier"])},
+                "MOCK builder": {"port_name": "test-mac-mac10.10", "specifiers": set(["mock-specifier"])},
             }
             self.command.execute(MockOptions(results_directory=False, optimize=False, builders=None, suffixes="txt,png", verbose=True), ['userscripts'], self.tool)
         finally:
@@ -635,7 +635,7 @@
         self.tool.executive = MockExecutive2()
 
         def builder_data():
-            self.command._builder_data['MOCK SnowLeopard'] = self.command._builder_data['MOCK Leopard'] = LayoutTestResults.results_from_string("""ADD_RESULTS({
+            self.command._builder_data['MOCK Mac10.11'] = self.command._builder_data['MOCK Mac10.10'] = LayoutTestResults.results_from_string("""ADD_RESULTS({
     "tests": {
         "userscripts": {
             "another-test.html": {
@@ -664,8 +664,8 @@
         old_exact_matches = builders._exact_matches
         try:
             builders._exact_matches = {
-                "MOCK Leopard": {"port_name": "test-mac-leopard", "specifiers": set(["mock-specifier"])},
-                "MOCK SnowLeopard": {"port_name": "test-mac-snowleopard", "specifiers": set(["mock-specifier"])},
+                "MOCK Mac10.10": {"port_name": "test-mac-mac10.10", "specifiers": set(["mock-specifier"])},
+                "MOCK Mac10.11": {"port_name": "test-mac-mac10.11", "specifiers": set(["mock-specifier"])},
             }
             self.command.execute(self.options, [], self.tool)
         finally:
@@ -675,16 +675,16 @@
         calls = filter(lambda x: x != ['qmake', '-v'], self.tool.executive.calls)
         self.assertEqual(self.tool.executive.calls, [
             [
-                ['python', 'echo', 'copy-existing-baselines-internal', '--suffixes', 'txt', '--builder', 'MOCK Leopard', '--test', 'userscripts/another-test.html'],
-                ['python', 'echo', 'copy-existing-baselines-internal', '--suffixes', 'txt', '--builder', 'MOCK SnowLeopard', '--test', 'userscripts/another-test.html'],
-                ['python', 'echo', 'copy-existing-baselines-internal', '--suffixes', 'png', '--builder', 'MOCK Leopard', '--test', 'userscripts/images.svg'],
-                ['python', 'echo', 'copy-existing-baselines-internal', '--suffixes', 'png', '--builder', 'MOCK SnowLeopard', '--test', 'userscripts/images.svg'],
+                ['python', 'echo', 'copy-existing-baselines-internal', '--suffixes', 'txt', '--builder', 'MOCK Mac10.10', '--test', 'userscripts/another-test.html'],
+                ['python', 'echo', 'copy-existing-baselines-internal', '--suffixes', 'txt', '--builder', 'MOCK Mac10.11', '--test', 'userscripts/another-test.html'],
+                ['python', 'echo', 'copy-existing-baselines-internal', '--suffixes', 'png', '--builder', 'MOCK Mac10.10', '--test', 'userscripts/images.svg'],
+                ['python', 'echo', 'copy-existing-baselines-internal', '--suffixes', 'png', '--builder', 'MOCK Mac10.11', '--test', 'userscripts/images.svg'],
             ],
             [
-                ['python', 'echo', 'rebaseline-test-internal', '--suffixes', 'txt', '--builder', 'MOCK Leopard', '--test', 'userscripts/another-test.html'],
-                ['python', 'echo', 'rebaseline-test-internal', '--suffixes', 'txt', '--builder', 'MOCK SnowLeopard', '--test', 'userscripts/another-test.html'],
-                ['python', 'echo', 'rebaseline-test-internal', '--suffixes', 'png', '--builder', 'MOCK Leopard', '--test', 'userscripts/images.svg'],
-                ['python', 'echo', 'rebaseline-test-internal', '--suffixes', 'png', '--builder', 'MOCK SnowLeopard', '--test', 'userscripts/images.svg'],
+                ['python', 'echo', 'rebaseline-test-internal', '--suffixes', 'txt', '--builder', 'MOCK Mac10.10', '--test', 'userscripts/another-test.html'],
+                ['python', 'echo', 'rebaseline-test-internal', '--suffixes', 'txt', '--builder', 'MOCK Mac10.11', '--test', 'userscripts/another-test.html'],
+                ['python', 'echo', 'rebaseline-test-internal', '--suffixes', 'png', '--builder', 'MOCK Mac10.10', '--test', 'userscripts/images.svg'],
+                ['python', 'echo', 'rebaseline-test-internal', '--suffixes', 'png', '--builder', 'MOCK Mac10.11', '--test', 'userscripts/images.svg'],
             ],
         ])
 
@@ -705,20 +705,20 @@
         # that the overrides do not get written into the main file.
         self._zero_out_test_expectations()
 
-        self._write(self.lion_expectations_path, '')
-        self.lion_port.expectations_dict = lambda: {
-            self.lion_expectations_path: '',
+        self._write(self.mac_expectations_path, '')
+        self.mac_port.expectations_dict = lambda: {
+            self.mac_expectations_path: '',
             'overrides': ('Bug(x) userscripts/another-test.html [ Failure Rebaseline ]\n'
                           'Bug(y) userscripts/test.html [ Crash ]\n')}
         self._write('/userscripts/another-test.html', '')
 
-        self.assertDictEqual(self.command._tests_to_rebaseline(self.lion_port), {'userscripts/another-test.html': set(['png', 'txt', 'wav'])})
-        self.assertEqual(self._read(self.lion_expectations_path), '')
+        self.assertDictEqual(self.command._tests_to_rebaseline(self.mac_port), {'userscripts/another-test.html': set(['png', 'txt', 'wav'])})
+        self.assertEqual(self._read(self.mac_expectations_path), '')
 
     def test_rebaseline_without_other_expectations(self):
         self._write("userscripts/another-test.html", "Dummy test contents")
-        self._write(self.lion_expectations_path, "Bug(x) userscripts/another-test.html [ Rebaseline ]\n")
-        self.assertDictEqual(self.command._tests_to_rebaseline(self.lion_port), {'userscripts/another-test.html': ('png', 'wav', 'txt')})
+        self._write(self.mac_expectations_path, "Bug(x) userscripts/another-test.html [ Rebaseline ]\n")
+        self.assertDictEqual(self.command._tests_to_rebaseline(self.mac_port), {'userscripts/another-test.html': ('png', 'wav', 'txt')})
 
     def test_rebaseline_test_passes_everywhere(self):
         test_port = self._setup_test_port()
@@ -726,7 +726,7 @@
         old_builder_data = self.command.builder_data
 
         def builder_data():
-            self.command._builder_data['MOCK Leopard'] = self.command._builder_data['MOCK SnowLeopard'] = LayoutTestResults.results_from_string("""ADD_RESULTS({
+            self.command._builder_data['MOCK Mac10.10'] = self.command._builder_data['MOCK Mac10.11'] = LayoutTestResults.results_from_string("""ADD_RESULTS({
     "tests": {
         "fast": {
             "dom": {
@@ -754,8 +754,8 @@
         old_exact_matches = builders._exact_matches
         try:
             builders._exact_matches = {
-                "MOCK Leopard": {"port_name": "test-mac-leopard", "specifiers": set(["mock-specifier"])},
-                "MOCK SnowLeopard": {"port_name": "test-mac-snowleopard", "specifiers": set(["mock-specifier"])},
+                "MOCK Mac10.10": {"port_name": "test-mac-mac10.10", "specifiers": set(["mock-specifier"])},
+                "MOCK Mac10.11": {"port_name": "test-mac-mac10.11", "specifiers": set(["mock-specifier"])},
             }
 
             self.command.execute(self.options, [], self.tool)
@@ -794,16 +794,16 @@
     def test_modify_scm(self):
         test_port = self.tool.port_factory.get('test')
         self._write_test_file(test_port, 'another/test.html', "Dummy test contents")
-        self._write_test_file(test_port, 'platform/mac-snowleopard/another/test-expected.txt', "result A")
+        self._write_test_file(test_port, 'platform/mac/another/test-expected.txt', "result A")
         self._write_test_file(test_port, 'another/test-expected.txt', "result A")
 
         old_exact_matches = builders._exact_matches
         try:
             builders._exact_matches = {
-                "MOCK Leopard Debug": {"port_name": "test-mac-snowleopard", "specifiers": set(["mock-specifier"])},
+                "MOCK Mac10.10 Debug": {"port_name": "test-mac-mac10.10", "specifiers": set(["mock-specifier"])},
             }
             OutputCapture().assert_outputs(self, self.command.execute, args=[
-                MockOptions(suffixes='txt', no_modify_scm=False, platform='test-mac-snowleopard'),
+                MockOptions(suffixes='txt', no_modify_scm=False, platform='test-mac-mac10.10'),
                 ['another/test.html'],
                 self.tool,
             ], expected_stdout='{"add": [], "remove-lines": [], "delete": []}\n')
@@ -816,19 +816,19 @@
     def test_no_modify_scm(self):
         test_port = self.tool.port_factory.get('test')
         self._write_test_file(test_port, 'another/test.html', "Dummy test contents")
-        self._write_test_file(test_port, 'platform/mac-snowleopard/another/test-expected.txt', "result A")
+        self._write_test_file(test_port, 'platform/mac-mac10.10/another/test-expected.txt', "result A")
         self._write_test_file(test_port, 'another/test-expected.txt', "result A")
 
         old_exact_matches = builders._exact_matches
         try:
             builders._exact_matches = {
-                "MOCK Leopard Debug": {"port_name": "test-mac-snowleopard", "specifiers": set(["mock-specifier"])},
+                "MOCK Mac10.10 Debug": {"port_name": "test-mac-mac10.10", "specifiers": set(["mock-specifier"])},
             }
             OutputCapture().assert_outputs(self, self.command.execute, args=[
-                MockOptions(suffixes='txt', no_modify_scm=True, platform='test-mac-snowleopard'),
+                MockOptions(suffixes='txt', no_modify_scm=True, platform='test-mac-mac10.10'),
                 ['another/test.html'],
                 self.tool,
-            ], expected_stdout='{"add": [], "remove-lines": [], "delete": ["/mock-checkout/third_party/WebKit/LayoutTests/platform/mac-snowleopard/another/test-expected.txt"]}\n')
+            ], expected_stdout='{"add": [], "remove-lines": [], "delete": ["/mock-checkout/third_party/WebKit/LayoutTests/platform/mac-mac10.10/another/test-expected.txt"]}\n')
         finally:
             builders._exact_matches = old_exact_matches
 
@@ -838,26 +838,26 @@
     def test_optimize_all_suffixes_by_default(self):
         test_port = self.tool.port_factory.get('test')
         self._write_test_file(test_port, 'another/test.html', "Dummy test contents")
-        self._write_test_file(test_port, 'platform/mac-snowleopard/another/test-expected.txt', "result A")
-        self._write_test_file(test_port, 'platform/mac-snowleopard/another/test-expected.png', "result A png")
+        self._write_test_file(test_port, 'platform/mac-mac10.10/another/test-expected.txt', "result A")
+        self._write_test_file(test_port, 'platform/mac-mac10.10/another/test-expected.png', "result A png")
         self._write_test_file(test_port, 'another/test-expected.txt', "result A")
         self._write_test_file(test_port, 'another/test-expected.png', "result A png")
 
         old_exact_matches = builders._exact_matches
         try:
             builders._exact_matches = {
-                "MOCK Leopard Debug": {"port_name": "test-mac-snowleopard", "specifiers": set(["mock-specifier"])},
+                "MOCK Mac10.10 Debug": {"port_name": "test-mac-mac10.10", "specifiers": set(["mock-specifier"])},
             }
             oc = OutputCapture()
             oc.capture_output()
-            self.command.execute(MockOptions(suffixes='txt,wav,png', no_modify_scm=True, platform='test-mac-snowleopard'),
+            self.command.execute(MockOptions(suffixes='txt,wav,png', no_modify_scm=True, platform='test-mac-mac10.10'),
                                  ['another/test.html'],
                                  self.tool)
         finally:
             out, err, logs = oc.restore_output()
             builders._exact_matches = old_exact_matches
 
-        self.assertEquals(out, '{"add": [], "remove-lines": [], "delete": ["/mock-checkout/third_party/WebKit/LayoutTests/platform/mac-snowleopard/another/test-expected.txt", "/mock-checkout/third_party/WebKit/LayoutTests/platform/mac-snowleopard/another/test-expected.png"]}\n')
+        self.assertEquals(out, '{"add": [], "remove-lines": [], "delete": ["/mock-checkout/third_party/WebKit/LayoutTests/platform/mac-mac10.10/another/test-expected.txt", "/mock-checkout/third_party/WebKit/LayoutTests/platform/mac-mac10.10/another/test-expected.png"]}\n')
         self.assertFalse(self.tool.filesystem.exists(self.tool.filesystem.join(test_port.layout_tests_dir(), 'platform/mac/another/test-expected.txt')))
         self.assertFalse(self.tool.filesystem.exists(self.tool.filesystem.join(test_port.layout_tests_dir(), 'platform/mac/another/test-expected.png')))
         self.assertTrue(self.tool.filesystem.exists(self.tool.filesystem.join(test_port.layout_tests_dir(), 'another/test-expected.txt')))
@@ -919,11 +919,11 @@
         old_exact_matches = builders._exact_matches
         try:
             builders._exact_matches = {
-                "MOCK Leopard": {"port_name": "test-mac-leopard", "specifiers": set(["mock-specifier"])},
-                "MOCK Leopard Debug": {"port_name": "test-mac-snowleopard", "specifiers": set(["mock-specifier"])},
-                "MOCK Leopard ASAN": {"port_name": "test-mac-snowleopard", "specifiers": set(["mock-specifier"])},
+                "MOCK Mac10.10": {"port_name": "test-mac-mac10.10", "specifiers": set(["mock-specifier"])},
+                "MOCK Mac10.11 Debug": {"port_name": "test-mac-mac10.11", "specifiers": set(["mock-specifier"])},
+                "MOCK Mac10.11 ASAN": {"port_name": "test-mac-mac10.11", "specifiers": set(["mock-specifier"])},
             }
-            self.assertEqual(self.command._release_builders(), ['MOCK Leopard'])
+            self.assertEqual(self.command._release_builders(), ['MOCK Mac10.10'])
         finally:
             builders._exact_matches = old_exact_matches
 
@@ -1010,7 +1010,7 @@
 6469e754a1 path/to/TestExpectations                   (<foobarbaz1@chromium.org> 2013-06-14 20:18:46 +0000   11) # Test NeedsRebaseline being in a comment doesn't bork parsing.
 6469e754a1 path/to/TestExpectations                   (<foobarbaz1@chromium.org> 2013-06-14 20:18:46 +0000   11) crbug.com/24182 [ Debug ] path/to/norebaseline.html [ Failure ]
 6469e754a1 path/to/TestExpectations                   (<foobarbaz1@chromium.org> 2013-04-28 04:52:41 +0000   13) Bug(foo) fast/dom/prototype-taco.html [ NeedsRebaseline ]
-6469e754a1 path/to/TestExpectations                   (<foobarbaz1@chromium.org> 2013-06-14 20:18:46 +0000   11) crbug.com/24182 [ SnowLeopard ] fast/dom/prototype-strawberry.html [ NeedsRebaseline ]
+6469e754a1 path/to/TestExpectations                   (<foobarbaz1@chromium.org> 2013-06-14 20:18:46 +0000   11) crbug.com/24182 [ Mac10.11 ] fast/dom/prototype-strawberry.html [ NeedsRebaseline ]
 6469e754a1 path/to/TestExpectations                   (<foobarbaz1@chromium.org> 2013-04-28 04:52:41 +0000   12) crbug.com/24182 fast/dom/prototype-chocolate.html [ NeedsRebaseline ]
 624caaaaaa path/to/TestExpectations                   (<foo@chromium.org>        2013-04-28 04:52:41 +0000   12) crbug.com/24182 path/to/not-cycled-through-bots.html [ NeedsRebaseline ]
 0000000000 path/to/TestExpectations                   (<foo@chromium.org>        2013-04-28 04:52:41 +0000   12) crbug.com/24182 path/to/locally-changed-lined.html [ NeedsRebaseline ]
@@ -1023,8 +1023,8 @@
 
         def builder_data():
             old_builder_data()
-            # have prototype-chocolate only fail on "MOCK Leopard".
-            self.command._builder_data['MOCK SnowLeopard'] = LayoutTestResults.results_from_string("""ADD_RESULTS({
+            # have prototype-chocolate only fail on "MOCK Mac10.10".
+            self.command._builder_data['MOCK Mac10.11'] = LayoutTestResults.results_from_string("""ADD_RESULTS({
     "tests": {
         "fast": {
             "dom": {
@@ -1053,7 +1053,7 @@
         self.tool.filesystem.write_text_file(test_port.path_to_generic_test_expectations_file(), """
 crbug.com/24182 [ Debug ] path/to/norebaseline.html [ Rebaseline ]
 Bug(foo) fast/dom/prototype-taco.html [ NeedsRebaseline ]
-crbug.com/24182 [ SnowLeopard ] fast/dom/prototype-strawberry.html [ NeedsRebaseline ]
+crbug.com/24182 [ Mac10.11 ] fast/dom/prototype-strawberry.html [ NeedsRebaseline ]
 crbug.com/24182 fast/dom/prototype-chocolate.html [ NeedsRebaseline ]
 crbug.com/24182 path/to/not-cycled-through-bots.html [ NeedsRebaseline ]
 crbug.com/24182 path/to/locally-changed-lined.html [ NeedsRebaseline ]
@@ -1068,8 +1068,8 @@
         old_exact_matches = builders._exact_matches
         try:
             builders._exact_matches = {
-                "MOCK Leopard": {"port_name": "test-mac-leopard", "specifiers": set(["mock-specifier"])},
-                "MOCK SnowLeopard": {"port_name": "test-mac-snowleopard", "specifiers": set(["mock-specifier"])},
+                "MOCK Mac10.10": {"port_name": "test-mac-mac10.10", "specifiers": set(["mock-specifier"])},
+                "MOCK Mac10.11": {"port_name": "test-mac-mac10.11", "specifiers": set(["mock-specifier"])},
             }
 
             self.command.tree_status = lambda: 'closed'
@@ -1082,16 +1082,16 @@
 
             self.assertEqual(self.tool.executive.calls, [
                 [
-                    ['python', 'echo', 'copy-existing-baselines-internal', '--suffixes', 'txt,png', '--builder', 'MOCK Leopard', '--test', 'fast/dom/prototype-chocolate.html'],
-                    ['python', 'echo', 'copy-existing-baselines-internal', '--suffixes', 'png', '--builder', 'MOCK SnowLeopard', '--test', 'fast/dom/prototype-strawberry.html'],
-                    ['python', 'echo', 'copy-existing-baselines-internal', '--suffixes', 'txt', '--builder', 'MOCK Leopard', '--test', 'fast/dom/prototype-taco.html'],
-                    ['python', 'echo', 'copy-existing-baselines-internal', '--suffixes', 'txt', '--builder', 'MOCK SnowLeopard', '--test', 'fast/dom/prototype-taco.html'],
+                    ['python', 'echo', 'copy-existing-baselines-internal', '--suffixes', 'txt,png', '--builder', 'MOCK Mac10.10', '--test', 'fast/dom/prototype-chocolate.html'],
+                    ['python', 'echo', 'copy-existing-baselines-internal', '--suffixes', 'png', '--builder', 'MOCK Mac10.11', '--test', 'fast/dom/prototype-strawberry.html'],
+                    ['python', 'echo', 'copy-existing-baselines-internal', '--suffixes', 'txt', '--builder', 'MOCK Mac10.10', '--test', 'fast/dom/prototype-taco.html'],
+                    ['python', 'echo', 'copy-existing-baselines-internal', '--suffixes', 'txt', '--builder', 'MOCK Mac10.11', '--test', 'fast/dom/prototype-taco.html'],
                 ],
                 [
-                    ['python', 'echo', 'rebaseline-test-internal', '--suffixes', 'txt,png', '--builder', 'MOCK Leopard', '--test', 'fast/dom/prototype-chocolate.html'],
-                    ['python', 'echo', 'rebaseline-test-internal', '--suffixes', 'png', '--builder', 'MOCK SnowLeopard', '--test', 'fast/dom/prototype-strawberry.html'],
-                    ['python', 'echo', 'rebaseline-test-internal', '--suffixes', 'txt', '--builder', 'MOCK Leopard', '--test', 'fast/dom/prototype-taco.html'],
-                    ['python', 'echo', 'rebaseline-test-internal', '--suffixes', 'txt', '--builder', 'MOCK SnowLeopard', '--test', 'fast/dom/prototype-taco.html'],
+                    ['python', 'echo', 'rebaseline-test-internal', '--suffixes', 'txt,png', '--builder', 'MOCK Mac10.10', '--test', 'fast/dom/prototype-chocolate.html'],
+                    ['python', 'echo', 'rebaseline-test-internal', '--suffixes', 'png', '--builder', 'MOCK Mac10.11', '--test', 'fast/dom/prototype-strawberry.html'],
+                    ['python', 'echo', 'rebaseline-test-internal', '--suffixes', 'txt', '--builder', 'MOCK Mac10.10', '--test', 'fast/dom/prototype-taco.html'],
+                    ['python', 'echo', 'rebaseline-test-internal', '--suffixes', 'txt', '--builder', 'MOCK Mac10.11', '--test', 'fast/dom/prototype-taco.html'],
                 ],
                 [
                     ['python', 'echo', 'optimize-baselines', '--no-modify-scm', '--suffixes', 'txt,png', 'fast/dom/prototype-chocolate.html'],
@@ -1128,8 +1128,8 @@
 
         def builder_data():
             old_builder_data()
-            # have prototype-chocolate only fail on "MOCK Leopard".
-            self.command._builder_data['MOCK SnowLeopard'] = LayoutTestResults.results_from_string("""ADD_RESULTS({
+            # have prototype-chocolate only fail on "MOCK Mac10.10".
+            self.command._builder_data['MOCK Mac10.11'] = LayoutTestResults.results_from_string("""ADD_RESULTS({
     "tests": {
         "fast": {
             "dom": {
@@ -1155,7 +1155,7 @@
         old_exact_matches = builders._exact_matches
         try:
             builders._exact_matches = {
-                "MOCK SnowLeopard": {"port_name": "test-mac-snowleopard", "specifiers": set(["mock-specifier"])},
+                "MOCK Mac10.11": {"port_name": "test-mac-mac10.11", "specifiers": set(["mock-specifier"])},
             }
 
             self.command.SECONDS_BEFORE_GIVING_UP = 0
@@ -1166,10 +1166,10 @@
 
             self.assertEqual(self.tool.executive.calls, [
                 [
-                    ['python', 'echo', 'copy-existing-baselines-internal', '--suffixes', 'txt', '--builder', 'MOCK SnowLeopard', '--test', 'fast/dom/prototype-taco.html'],
+                    ['python', 'echo', 'copy-existing-baselines-internal', '--suffixes', 'txt', '--builder', 'MOCK Mac10.11', '--test', 'fast/dom/prototype-taco.html'],
                 ],
                 [
-                    ['python', 'echo', 'rebaseline-test-internal', '--suffixes', 'txt', '--builder', 'MOCK SnowLeopard', '--test', 'fast/dom/prototype-taco.html'],
+                    ['python', 'echo', 'rebaseline-test-internal', '--suffixes', 'txt', '--builder', 'MOCK Mac10.11', '--test', 'fast/dom/prototype-taco.html'],
                 ],
                 [['python', 'echo', 'optimize-baselines', '--no-modify-scm', '--suffixes', 'txt', 'fast/dom/prototype-taco.html']],
                 ['git', 'cl', 'upload', '-f'],
@@ -1189,7 +1189,7 @@
         old_builder_data = self.command.builder_data
 
         def builder_data():
-            self.command._builder_data['MOCK Leopard'] = self.command._builder_data['MOCK SnowLeopard'] = LayoutTestResults.results_from_string("""ADD_RESULTS({
+            self.command._builder_data['MOCK Mac10.10'] = self.command._builder_data['MOCK Mac10.11'] = LayoutTestResults.results_from_string("""ADD_RESULTS({
     "tests": {
         "fast": {
             "dom": {
@@ -1217,8 +1217,8 @@
         old_exact_matches = builders._exact_matches
         try:
             builders._exact_matches = {
-                "MOCK Leopard": {"port_name": "test-mac-leopard", "specifiers": set(["mock-specifier"])},
-                "MOCK SnowLeopard": {"port_name": "test-mac-snowleopard", "specifiers": set(["mock-specifier"])},
+                "MOCK Mac10.10": {"port_name": "test-mac-mac10.10", "specifiers": set(["mock-specifier"])},
+                "MOCK Mac10.11": {"port_name": "test-mac-mac10.11", "specifiers": set(["mock-specifier"])},
             }
 
             self.command.tree_status = lambda: 'open'
@@ -1376,7 +1376,7 @@
         old_builder_data = self.command.builder_data
 
         def builder_data():
-            self.command._builder_data['MOCK Leopard'] = self.command._builder_data['MOCK SnowLeopard'] = LayoutTestResults.results_from_string("""ADD_RESULTS({
+            self.command._builder_data['MOCK Mac10.10'] = self.command._builder_data['MOCK Mac10.11'] = LayoutTestResults.results_from_string("""ADD_RESULTS({
     "tests": {
         "fast": {
             "dom": {
@@ -1404,8 +1404,8 @@
         old_exact_matches = builders._exact_matches
         try:
             builders._exact_matches = {
-                "MOCK Leopard": {"port_name": "test-mac-leopard", "specifiers": set(["mock-specifier"])},
-                "MOCK SnowLeopard": {"port_name": "test-mac-snowleopard", "specifiers": set(["mock-specifier"])},
+                "MOCK Mac10.10": {"port_name": "test-mac-mac10.10", "specifiers": set(["mock-specifier"])},
+                "MOCK Mac10.11": {"port_name": "test-mac-mac10.11", "specifiers": set(["mock-specifier"])},
             }
 
             self.command.tree_status = lambda: 'open'
diff --git a/tools/mb/mb_config.pyl b/tools/mb/mb_config.pyl
index 10388ae..c2127a8 100644
--- a/tools/mb/mb_config.pyl
+++ b/tools/mb/mb_config.pyl
@@ -557,7 +557,6 @@
     },
     'chromium.webkit': {
       'WebKit Win Builder': 'swarming_gyp_release_bot_minimal_symbols_x86',
-      'WebKit XP': 'none',
       'WebKit Win7': 'none',
       'WebKit Win10': 'none',
       'WebKit Win x64 Builder': 'swarming_gyp_release_bot_minimal_symbols_x64',
@@ -567,14 +566,12 @@
       'WebKit Win non-Oilpan (dbg)': 'swarming_gyp_non_oilpan_debug_bot_minimal_symbols_x86',
       'WebKit Win x64 Builder (dbg)': 'swarming_gyp_debug_bot_minimal_symbols_x64',
       'WebKit Mac Builder': 'swarming_gyp_release_bot_x64',
-      'WebKit Mac10.6': 'none',
-      'WebKit Mac10.7': 'none',
-      'WebKit Mac10.8': 'none',
-      'WebKit Mac10.9 (retina)': 'swarming_gyp_release_bot_x64',
+      'WebKit Mac10.11 (retina)': 'swarming_gyp_release_bot_x64',
       'WebKit Mac10.10': 'none',
+      'WebKit Mac10.11': 'none',
       'WebKit Mac non-Oilpan': 'swarming_gyp_non_oilpan_release_bot_x64',
       'WebKit Mac Builder (dbg)': 'swarming_gyp_debug_bot_x64',
-      'WebKit Mac10.7 (dbg)': 'none',
+      'WebKit Mac10.11 (dbg)': 'none',
       'WebKit Mac non-Oilpan (dbg)': 'swarming_gyp_non_oilpan_debug_bot_x64',
       'WebKit Linux': 'swarming_gn_release_bot_x64',
       'WebKit Linux Trusty': 'swarming_gn_release_bot_x64',
diff --git a/tools/metrics/histograms/histograms.xml b/tools/metrics/histograms/histograms.xml
index 193d9d9..ca6b8c6 100644
--- a/tools/metrics/histograms/histograms.xml
+++ b/tools/metrics/histograms/histograms.xml
@@ -11531,6 +11531,28 @@
   </summary>
 </histogram>
 
+<histogram name="ExclusiveAccess.BubbleReshowsPerSession.Fullscreen">
+  <owner>mgiuca@chromium.org</owner>
+  <summary>
+    The number of times the fullscreen bubble was re-shown due to inactivity
+    during a session of fullscreen mode (not including mouse lock). If the mouse
+    is also locked while a re-show occurs, both this and
+    BubbleReshowsPerSession.MouseLock are incremented. Includes all types of
+    fullscreen (user-triggered, extension-triggered and page-triggered). Only
+    recorded when the simplified-fullscreen-ui flag is enabled.
+  </summary>
+</histogram>
+
+<histogram name="ExclusiveAccess.BubbleReshowsPerSession.MouseLock">
+  <owner>mgiuca@chromium.org</owner>
+  <summary>
+    The number of times the mouse lock bubble was re-shown due to inactivity
+    during a session of mouse lock mode. If also in fullscreen while a re-show
+    occurs, both this and BubbleReshowsPerSession.Fullscreen are incremented.
+    Only recorded when the simplified-fullscreen-ui flag is enabled.
+  </summary>
+</histogram>
+
 <histogram name="ExtensionActivity.AdInjected" units="Extension Count">
   <obsolete>
     Deprecated with M46.
@@ -31005,6 +31027,13 @@
   </summary>
 </histogram>
 
+<histogram name="NewTabPage.MostVisitedScheme" enum="NtpMostVisitedScheme">
+  <owner>treib@chromium.org</owner>
+  <summary>
+    The schemes of URLs of most visited thumbnails that the user clicked on.
+  </summary>
+</histogram>
+
 <histogram name="NewTabPage.MostVisitedTilePlacementExperiment"
     enum="NtpTileExperimentActions">
   <obsolete>
@@ -56969,6 +56998,32 @@
   </summary>
 </histogram>
 
+<histogram name="WebRTC.Video.H264DecoderImpl.Event"
+    enum="WebRtcH264DecoderImplEvent">
+  <owner>hbos@chromium.org</owner>
+  <summary>
+    The number of |H264DecoderImpl| events, such as an initialization or
+    decoding error, that have occurred. At most one Init and one Error is
+    reported per |H264DecoderImpl| instance. This is to avoid the same event
+    from being reported multiple times (e.g. if there is an error you might
+    re-initialize or get a decode error every frame which would otherwise
+    pollute the data).
+  </summary>
+</histogram>
+
+<histogram name="WebRTC.Video.H264EncoderImpl.Event"
+    enum="WebRtcH264EncoderImplEvent">
+  <owner>hbos@chromium.org</owner>
+  <summary>
+    The number of |H264EncoderImpl| events, such as an initialization or
+    encoding error, that have occurred. At most one Init and one Error is
+    reported per |H264EncoderImpl| instance. This is to avoid the same event
+    from being reported multiple times (e.g. if there is an error you might
+    re-initialize or get an encode error every frame which would otherwise
+    pollute the data).
+  </summary>
+</histogram>
+
 <histogram name="WebRTC.Video.InputFramesPerSecond" units="fps">
   <owner>asapersson@chromium.org</owner>
   <summary>
@@ -74311,6 +74366,18 @@
   <int value="13" label="Other action"/>
 </enum>
 
+<enum name="NtpMostVisitedScheme" type="int">
+  <int value="0" label="Other (not web-safe)"/>
+  <int value="1" label="Other (web-safe)"/>
+  <int value="2" label="http://"/>
+  <int value="3" label="https://"/>
+  <int value="4" label="ftp://"/>
+  <int value="5" label="file://"/>
+  <int value="6" label="chrome://"/>
+  <int value="7" label="chrome-extension://"/>
+  <int value="8" label="javascript://"/>
+</enum>
+
 <enum name="NtpPaneType" type="int">
   <int value="1" label="MostVisited"/>
   <int value="2" label="Apps"/>
@@ -82748,6 +82815,16 @@
   <int value="2" label="WEB_HISTORY_QUERY_TIMED_OUT">Timed out</int>
 </enum>
 
+<enum name="WebRtcH264DecoderImplEvent" type="int">
+  <int value="0" label="Init"/>
+  <int value="1" label="Error"/>
+</enum>
+
+<enum name="WebRtcH264EncoderImplEvent" type="int">
+  <int value="0" label="Init"/>
+  <int value="1" label="Error"/>
+</enum>
+
 <enum name="WebRtcVideoCodecs" type="int">
   <int value="0" label="Unknown"/>
   <int value="1" label="VP8"/>
diff --git a/ui/accessibility/platform/ax_platform_node_win.cc b/ui/accessibility/platform/ax_platform_node_win.cc
index 79c135d..168f2fe 100644
--- a/ui/accessibility/platform/ax_platform_node_win.cc
+++ b/ui/accessibility/platform/ax_platform_node_win.cc
@@ -184,6 +184,12 @@
   if (!hwnd)
     return;
 
+  // Menu items fire selection events but Windows screen readers work reliably
+  // with focus events. Remap here.
+  if (event_type == ui::AX_EVENT_SELECTION &&
+      GetData().role == ui::AX_ROLE_MENU_ITEM)
+    event_type = ui::AX_EVENT_FOCUS;
+
   int native_event = MSAAEvent(event_type);
   if (native_event < EVENT_MIN)
     return;
diff --git a/ui/base/ime/input_method_auralinux.cc b/ui/base/ime/input_method_auralinux.cc
index 42489750..6e26c942 100644
--- a/ui/base/ime/input_method_auralinux.cc
+++ b/ui/base/ime/input_method_auralinux.cc
@@ -222,17 +222,19 @@
   else
     context_simple_->Blur();
 
+  if (!ui::IMEBridge::Get())  // IMEBridge could be null for tests.
+    return;
+
+  ui::IMEEngineHandlerInterface::InputContext context(
+      GetTextInputType(), GetTextInputMode(), GetTextInputFlags());
+  ui::IMEBridge::Get()->SetCurrentInputContext(context);
+
   ui::IMEEngineHandlerInterface* engine = GetEngine();
   if (engine) {
-    ui::IMEEngineHandlerInterface::InputContext context(
-        GetTextInputType(), GetTextInputMode(), GetTextInputFlags());
-
     if (old_text_input_type != TEXT_INPUT_TYPE_NONE)
       engine->FocusOut();
     if (text_input_type_ != TEXT_INPUT_TYPE_NONE)
       engine->FocusIn(context);
-
-    ui::IMEBridge::Get()->SetCurrentInputContext(context);
   }
 }
 
diff --git a/ui/base/ime/input_method_win.cc b/ui/base/ime/input_method_win.cc
index 6ac7e6f..80a68056 100644
--- a/ui/base/ime/input_method_win.cc
+++ b/ui/base/ime/input_method_win.cc
@@ -667,20 +667,21 @@
   tsf_inputscope::SetInputScopeForTsfUnawareWindow(
       window_handle, text_input_type, text_input_mode);
 
+  if (!ui::IMEBridge::Get())  // IMEBridge could be null for tests.
+    return;
+
+  const TextInputType old_text_input_type =
+      ui::IMEBridge::Get()->GetCurrentInputContext().type;
+  ui::IMEEngineHandlerInterface::InputContext context(
+      GetTextInputType(), GetTextInputMode(), GetTextInputFlags());
+  ui::IMEBridge::Get()->SetCurrentInputContext(context);
+
   ui::IMEEngineHandlerInterface* engine = GetEngine();
   if (engine) {
-    const TextInputType old_text_input_type =
-        ui::IMEBridge::Get()->GetCurrentInputContext().type;
-
-    ui::IMEEngineHandlerInterface::InputContext context(
-        GetTextInputType(), GetTextInputMode(), GetTextInputFlags());
-
     if (old_text_input_type != ui::TEXT_INPUT_TYPE_NONE)
       engine->FocusOut();
     if (text_input_type != ui::TEXT_INPUT_TYPE_NONE)
       engine->FocusIn(context);
-
-    ui::IMEBridge::Get()->SetCurrentInputContext(context);
   }
 }
 
diff --git a/ui/compositor/layer_animation_element.cc b/ui/compositor/layer_animation_element.cc
index 29aa7fa..edf5bdc8 100644
--- a/ui/compositor/layer_animation_element.cc
+++ b/ui/compositor/layer_animation_element.cc
@@ -423,9 +423,9 @@
                                        start_,
                                        target_,
                                        duration()));
-    scoped_ptr<cc::Animation> animation(
-        cc::Animation::Create(std::move(animation_curve), animation_id(),
-                              animation_group_id(), cc::Animation::OPACITY));
+    scoped_ptr<cc::Animation> animation(cc::Animation::Create(
+        std::move(animation_curve), animation_id(), animation_group_id(),
+        cc::TargetProperty::OPACITY));
     return animation;
   }
 
@@ -476,9 +476,9 @@
                                            start_,
                                            target_,
                                            duration()));
-    scoped_ptr<cc::Animation> animation(
-        cc::Animation::Create(std::move(animation_curve), animation_id(),
-                              animation_group_id(), cc::Animation::TRANSFORM));
+    scoped_ptr<cc::Animation> animation(cc::Animation::Create(
+        std::move(animation_curve), animation_id(), animation_group_id(),
+        cc::TargetProperty::TRANSFORM));
     return animation;
   }
 
@@ -548,9 +548,9 @@
   }
 
   scoped_ptr<cc::Animation> CreateCCAnimation() override {
-    scoped_ptr<cc::Animation> animation(
-        cc::Animation::Create(animation_curve_->Clone(), animation_id(),
-                              animation_group_id(), cc::Animation::TRANSFORM));
+    scoped_ptr<cc::Animation> animation(cc::Animation::Create(
+        animation_curve_->Clone(), animation_id(), animation_group_id(),
+        cc::TargetProperty::TRANSFORM));
     return animation;
   }
 
@@ -742,12 +742,11 @@
 
 // static
 LayerAnimationElement::AnimatableProperty
-LayerAnimationElement::ToAnimatableProperty(
-    cc::Animation::TargetProperty property) {
+LayerAnimationElement::ToAnimatableProperty(cc::TargetProperty::Type property) {
   switch (property) {
-    case cc::Animation::TRANSFORM:
+    case cc::TargetProperty::TRANSFORM:
       return TRANSFORM;
-    case cc::Animation::OPACITY:
+    case cc::TargetProperty::OPACITY:
       return OPACITY;
     default:
       NOTREACHED();
diff --git a/ui/compositor/layer_animation_element.h b/ui/compositor/layer_animation_element.h
index dc08f90..111f254 100644
--- a/ui/compositor/layer_animation_element.h
+++ b/ui/compositor/layer_animation_element.h
@@ -45,7 +45,7 @@
   };
 
   static AnimatableProperty ToAnimatableProperty(
-      cc::Animation::TargetProperty property);
+      cc::TargetProperty::Type property);
 
   struct COMPOSITOR_EXPORT TargetValue {
     TargetValue();
diff --git a/ui/compositor/layer_animation_sequence_unittest.cc b/ui/compositor/layer_animation_sequence_unittest.cc
index 708cc0a..0a62ddb 100644
--- a/ui/compositor/layer_animation_sequence_unittest.cc
+++ b/ui/compositor/layer_animation_sequence_unittest.cc
@@ -94,7 +94,7 @@
     effective_start = start_time + delta;
     sequence.OnThreadedAnimationStarted(cc::AnimationEvent(
         cc::AnimationEvent::STARTED, 0, sequence.animation_group_id(),
-        cc::Animation::OPACITY, effective_start));
+        cc::TargetProperty::OPACITY, effective_start));
     sequence.Progress(effective_start + delta/2, &delegate);
     EXPECT_FLOAT_EQ(middle, sequence.last_progressed_fraction());
     EXPECT_TRUE(sequence.IsFinished(effective_start + delta));
@@ -148,7 +148,7 @@
     EXPECT_EQ(starting_group_id, sequence.animation_group_id());
     sequence.OnThreadedAnimationStarted(cc::AnimationEvent(
         cc::AnimationEvent::STARTED, 0, sequence.animation_group_id(),
-        cc::Animation::OPACITY, opacity_effective_start));
+        cc::TargetProperty::OPACITY, opacity_effective_start));
     sequence.Progress(opacity_effective_start + delta/2, &delegate);
     EXPECT_FLOAT_EQ(0.5, sequence.last_progressed_fraction());
     sequence.Progress(opacity_effective_start + delta, &delegate);
@@ -176,7 +176,7 @@
     EXPECT_NE(starting_group_id, sequence.animation_group_id());
     sequence.OnThreadedAnimationStarted(cc::AnimationEvent(
         cc::AnimationEvent::STARTED, 0, sequence.animation_group_id(),
-        cc::Animation::TRANSFORM, transform_effective_start));
+        cc::TargetProperty::TRANSFORM, transform_effective_start));
     sequence.Progress(transform_effective_start + delta/2, &delegate);
     EXPECT_FLOAT_EQ(0.5, sequence.last_progressed_fraction());
     EXPECT_TRUE(sequence.IsFinished(transform_effective_start + delta));
diff --git a/ui/compositor/layer_animator_unittest.cc b/ui/compositor/layer_animator_unittest.cc
index 30f008b..f15bb4a4 100644
--- a/ui/compositor/layer_animator_unittest.cc
+++ b/ui/compositor/layer_animator_unittest.cc
@@ -375,7 +375,7 @@
       cc::AnimationEvent::STARTED, 0,
       test_controller.GetRunningSequence(LayerAnimationElement::OPACITY)
           ->animation_group_id(),
-      cc::Animation::OPACITY, effective_start));
+      cc::TargetProperty::OPACITY, effective_start));
 
   animator->Step(effective_start + delta / 2);
 
@@ -484,7 +484,7 @@
       cc::AnimationEvent::STARTED, 0,
       test_controller.GetRunningSequence(LayerAnimationElement::OPACITY)
           ->animation_group_id(),
-      cc::Animation::OPACITY, effective_start));
+      cc::TargetProperty::OPACITY, effective_start));
 
   animator->Step(effective_start + delta / 2);
 
@@ -746,7 +746,7 @@
       cc::AnimationEvent::STARTED, 0,
       test_controller.GetRunningSequence(LayerAnimationElement::OPACITY)
           ->animation_group_id(),
-      cc::Animation::OPACITY, effective_start));
+      cc::TargetProperty::OPACITY, effective_start));
 
   animator->Step(effective_start + delta / 2);
 
@@ -870,7 +870,7 @@
       cc::AnimationEvent::STARTED, 0,
       test_controller.GetRunningSequence(LayerAnimationElement::OPACITY)
           ->animation_group_id(),
-      cc::Animation::OPACITY, effective_start));
+      cc::TargetProperty::OPACITY, effective_start));
 
   animator->Step(effective_start + delta / 2);
 
@@ -893,7 +893,7 @@
       cc::AnimationEvent::STARTED, 0,
       test_controller.GetRunningSequence(LayerAnimationElement::OPACITY)
           ->animation_group_id(),
-      cc::Animation::OPACITY, second_effective_start));
+      cc::TargetProperty::OPACITY, second_effective_start));
 
   animator->Step(second_effective_start + delta / 2);
 
@@ -1193,7 +1193,7 @@
       cc::AnimationEvent::STARTED, 0,
       test_controller.GetRunningSequence(LayerAnimationElement::OPACITY)
           ->animation_group_id(),
-      cc::Animation::OPACITY, effective_start));
+      cc::TargetProperty::OPACITY, effective_start));
 
   animator->Step(effective_start + delta / 2);
 
@@ -1221,7 +1221,7 @@
       cc::AnimationEvent::STARTED, 0,
       test_controller.GetRunningSequence(LayerAnimationElement::OPACITY)
           ->animation_group_id(),
-      cc::Animation::OPACITY, second_effective_start));
+      cc::TargetProperty::OPACITY, second_effective_start));
 
   animator->Step(second_effective_start + delta / 2);
 
@@ -1465,7 +1465,7 @@
       cc::AnimationEvent::STARTED, 0,
       test_controller.GetRunningSequence(LayerAnimationElement::OPACITY)
           ->animation_group_id(),
-      cc::Animation::OPACITY, effective_start));
+      cc::TargetProperty::OPACITY, effective_start));
 
   animator->Step(effective_start + delta);
   EXPECT_TRUE(test_controller.animator()->is_animating());
@@ -1476,7 +1476,7 @@
       cc::AnimationEvent::STARTED, 0,
       test_controller.GetRunningSequence(LayerAnimationElement::OPACITY)
           ->animation_group_id(),
-      cc::Animation::OPACITY, second_effective_start));
+      cc::TargetProperty::OPACITY, second_effective_start));
 
   animator->Step(second_effective_start + delta);
 
@@ -1488,7 +1488,7 @@
       cc::AnimationEvent::STARTED, 0,
       test_controller.GetRunningSequence(LayerAnimationElement::OPACITY)
           ->animation_group_id(),
-      cc::Animation::OPACITY, third_effective_start));
+      cc::TargetProperty::OPACITY, third_effective_start));
 
   animator->Step(third_effective_start + delta);
   EXPECT_TRUE(test_controller.animator()->is_animating());
@@ -1499,7 +1499,7 @@
       cc::AnimationEvent::STARTED, 0,
       test_controller.GetRunningSequence(LayerAnimationElement::OPACITY)
           ->animation_group_id(),
-      cc::Animation::OPACITY, fourth_effective_start));
+      cc::TargetProperty::OPACITY, fourth_effective_start));
 
   // Skip ahead by a lot.
   animator->Step(fourth_effective_start + 1000 * delta);
@@ -1512,7 +1512,7 @@
       cc::AnimationEvent::STARTED, 0,
       test_controller.GetRunningSequence(LayerAnimationElement::OPACITY)
           ->animation_group_id(),
-      cc::Animation::OPACITY, fifth_effective_start));
+      cc::TargetProperty::OPACITY, fifth_effective_start));
 
   // Skip ahead by a lot.
   animator->Step(fifth_effective_start + 999 * delta);
diff --git a/ui/compositor/test/layer_animator_test_controller.cc b/ui/compositor/test/layer_animator_test_controller.cc
index 6ec2cf3a..497cb92 100644
--- a/ui/compositor/test/layer_animator_test_controller.cc
+++ b/ui/compositor/test/layer_animator_test_controller.cc
@@ -31,9 +31,9 @@
 }
 
 void LayerAnimatorTestController::StartThreadedAnimationsIfNeeded() {
-  std::vector<cc::Animation::TargetProperty> threaded_properties;
-  threaded_properties.push_back(cc::Animation::OPACITY);
-  threaded_properties.push_back(cc::Animation::TRANSFORM);
+  std::vector<cc::TargetProperty::Type> threaded_properties;
+  threaded_properties.push_back(cc::TargetProperty::OPACITY);
+  threaded_properties.push_back(cc::TargetProperty::TRANSFORM);
 
   for (size_t i = 0; i < threaded_properties.size(); i++) {
     LayerAnimationElement::AnimatableProperty animatable_property =
diff --git a/ui/file_manager/gallery/css/gallery.css b/ui/file_manager/gallery/css/gallery.css
index 9aed4d9..e9267f0 100644
--- a/ui/file_manager/gallery/css/gallery.css
+++ b/ui/file_manager/gallery/css/gallery.css
@@ -889,6 +889,10 @@
   width: 16px;
 }
 
+paper-slider {
+  width: 172px;
+}
+
 paper-slider::shadow paper-progress::shadow #progressContainer {
   background-color: rgba(255, 255, 255, 0.2);
 }
diff --git a/ui/file_manager/gallery/js/image_editor/image_adjust.js b/ui/file_manager/gallery/js/image_editor/image_adjust.js
index 50a82f1b..9d06e8d 100644
--- a/ui/file_manager/gallery/js/image_editor/image_adjust.js
+++ b/ui/file_manager/gallery/js/image_editor/image_adjust.js
@@ -266,41 +266,3 @@
   ImageEditor.Mode.Autofix.prototype.setUp.apply(this, arguments);
   this.apply();
 };
-
-/**
- * Blur filter.
- * @constructor
- * @extends {ImageEditor.Mode.Adjust}
- * @struct
- */
-ImageEditor.Mode.Blur = function() {
-  ImageEditor.Mode.Adjust.call(this, 'blur', 'blur');
-};
-
-ImageEditor.Mode.Blur.prototype =
-    {__proto__: ImageEditor.Mode.Adjust.prototype};
-
-/** @override */
-ImageEditor.Mode.Blur.prototype.createTools = function(toolbar) {
-  toolbar.addRange('strength', 'GALLERY_STRENGTH', 0, 0, 1, 100);
-  toolbar.addRange('radius', 'GALLERY_RADIUS', 1, 1, 3);
-};
-
-/**
- * Sharpen filter.
- * @constructor
- * @extends {ImageEditor.Mode.Adjust}
- * @struct
- */
-ImageEditor.Mode.Sharpen = function() {
-  ImageEditor.Mode.Adjust.call(this, 'sharpen', 'sharpen');
-};
-
-ImageEditor.Mode.Sharpen.prototype =
-    {__proto__: ImageEditor.Mode.Adjust.prototype};
-
-/** @override */
-ImageEditor.Mode.Sharpen.prototype.createTools = function(toolbar) {
-  toolbar.addRange('strength', 'GALLERY_STRENGTH', 0, 0, 1, 100);
-  toolbar.addRange('radius', 'GALLERY_RADIUS', 1, 1, 3);
-};
diff --git a/ui/file_manager/gallery/js/image_editor/image_editor.js b/ui/file_manager/gallery/js/image_editor/image_editor.js
index 9f8679a..9040fe6 100644
--- a/ui/file_manager/gallery/js/image_editor/image_editor.js
+++ b/ui/file_manager/gallery/js/image_editor/image_editor.js
@@ -49,7 +49,6 @@
   this.viewport_ = viewport;
 
   this.imageView_ = imageView;
-  this.imageView_.addContentCallback(this.onContentUpdate_.bind(this));
 
   this.buffer_ = new ImageBuffer();
   this.buffer_.addOverlay(this.imageView_);
@@ -191,7 +190,7 @@
  * Content update handler.
  * @private
  */
-ImageEditor.prototype.onContentUpdate_ = function() {
+ImageEditor.prototype.calculateModeApplicativity_ = function() {
   for (var i = 0; i != this.modes_.length; i++) {
     var mode = this.modes_[i];
     ImageUtil.setAttribute(assert(mode.button_), 'disabled',
@@ -646,6 +645,7 @@
   this.modeToolbar_.clear();
   this.currentMode_.createTools(this.modeToolbar_);
   this.modeToolbar_.show(true);
+  this.calculateModeApplicativity_();
 };
 
 /**
diff --git a/ui/message_center/fake_message_center.cc b/ui/message_center/fake_message_center.cc
index c994088c..f2db0dba 100644
--- a/ui/message_center/fake_message_center.cc
+++ b/ui/message_center/fake_message_center.cc
@@ -72,11 +72,7 @@
                                            bool by_user) {
 }
 
-void FakeMessageCenter::RemoveAllNotifications(bool by_user) {
-}
-
-void FakeMessageCenter::RemoveAllVisibleNotifications(bool by_user) {
-}
+void FakeMessageCenter::RemoveAllNotifications(bool by_user, RemoveType type) {}
 
 void FakeMessageCenter::SetNotificationIcon(const std::string& notification_id,
                                             const gfx::Image& image) {
diff --git a/ui/message_center/fake_message_center.h b/ui/message_center/fake_message_center.h
index 003efbc..cfbf8e9 100644
--- a/ui/message_center/fake_message_center.h
+++ b/ui/message_center/fake_message_center.h
@@ -40,8 +40,7 @@
                           scoped_ptr<Notification> new_notification) override;
 
   void RemoveNotification(const std::string& id, bool by_user) override;
-  void RemoveAllNotifications(bool by_user) override;
-  void RemoveAllVisibleNotifications(bool by_user) override;
+  void RemoveAllNotifications(bool by_user, RemoveType type) override;
   void SetNotificationIcon(const std::string& notification_id,
                            const gfx::Image& image) override;
 
diff --git a/ui/message_center/message_center.h b/ui/message_center/message_center.h
index 00d9545..d6ce0c38 100644
--- a/ui/message_center/message_center.h
+++ b/ui/message_center/message_center.h
@@ -50,6 +50,13 @@
 
 class MESSAGE_CENTER_EXPORT MessageCenter {
  public:
+  enum class RemoveType {
+    // Remove all notifications.
+    ALL,
+    // Remove non-pinned notification (don't remove invisible ones).
+    NON_PINNED,
+  };
+
   // Creates the global message center object.
   static void Initialize();
 
@@ -102,8 +109,7 @@
 
   // Removes an existing notification.
   virtual void RemoveNotification(const std::string& id, bool by_user) = 0;
-  virtual void RemoveAllNotifications(bool by_user) = 0;
-  virtual void RemoveAllVisibleNotifications(bool by_user) = 0;
+  virtual void RemoveAllNotifications(bool by_user, RemoveType type) = 0;
 
   // Sets the icon image. Icon appears at the top-left of the notification.
   virtual void SetNotificationIcon(const std::string& notification_id,
diff --git a/ui/message_center/message_center_impl.cc b/ui/message_center/message_center_impl.cc
index ada49c8..07cbe10 100644
--- a/ui/message_center/message_center_impl.cc
+++ b/ui/message_center/message_center_impl.cc
@@ -643,23 +643,20 @@
   }
 }
 
-void MessageCenterImpl::RemoveAllNotifications(bool by_user) {
-  // Using not |blockers_| but an empty list since it wants to remove literally
-  // all notifications.
-  RemoveNotifications(by_user, NotificationBlockers());
-}
+void MessageCenterImpl::RemoveAllNotifications(bool by_user, RemoveType type) {
+  bool remove_pinned = (type == RemoveType::NON_PINNED);
 
-void MessageCenterImpl::RemoveAllVisibleNotifications(bool by_user) {
-  RemoveNotifications(by_user, blockers_);
-}
+  const NotificationBlockers& blockers =
+      (type == RemoveType::ALL ? NotificationBlockers() /* empty blockers */
+                               : blockers_ /* use default blockers */);
 
-void MessageCenterImpl::RemoveNotifications(
-    bool by_user,
-    const NotificationBlockers& blockers) {
   const NotificationList::Notifications notifications =
       notification_list_->GetVisibleNotifications(blockers);
   std::set<std::string> ids;
   for (const auto& notification : notifications) {
+    if (!remove_pinned && notification->pinned())
+      continue;
+
     ids.insert(notification->id());
     scoped_refptr<NotificationDelegate> delegate = notification->delegate();
     if (delegate.get())
diff --git a/ui/message_center/message_center_impl.h b/ui/message_center/message_center_impl.h
index f71e52b..03dc9bc7 100644
--- a/ui/message_center/message_center_impl.h
+++ b/ui/message_center/message_center_impl.h
@@ -58,8 +58,7 @@
   void UpdateNotification(const std::string& old_id,
                           scoped_ptr<Notification> new_notification) override;
   void RemoveNotification(const std::string& id, bool by_user) override;
-  void RemoveAllNotifications(bool by_user) override;
-  void RemoveAllVisibleNotifications(bool by_user) override;
+  void RemoveAllNotifications(bool by_user, RemoveType type) override;
   void SetNotificationIcon(const std::string& notification_id,
                            const gfx::Image& image) override;
   void SetNotificationImage(const std::string& notification_id,
@@ -116,7 +115,6 @@
     size_t unread_count;
   };
 
-  void RemoveNotifications(bool by_user, const NotificationBlockers& blockers);
   void RemoveNotificationsForNotifierId(const NotifierId& notifier_id);
 
   scoped_ptr<NotificationList> notification_list_;
diff --git a/ui/message_center/message_center_impl_unittest.cc b/ui/message_center/message_center_impl_unittest.cc
index 2b405fe6..bc3828b 100644
--- a/ui/message_center/message_center_impl_unittest.cc
+++ b/ui/message_center/message_center_impl_unittest.cc
@@ -559,9 +559,10 @@
   EXPECT_TRUE(NotificationsContain(notifications, "id3"));
   EXPECT_TRUE(NotificationsContain(notifications, "id4"));
 
-  // RemoveAllVisibleNotifications should remove just visible notifications.
+  // Remove just visible notifications.
   blocker.SetNotificationsEnabled(false);
-  message_center()->RemoveAllVisibleNotifications(false /* by_user */);
+  message_center()->RemoveAllNotifications(
+      false /* by_user */, MessageCenter::RemoveType::NON_PINNED);
   EXPECT_EQ(0u, message_center()->NotificationCount());
   blocker.SetNotificationsEnabled(true);
   EXPECT_EQ(2u, message_center()->NotificationCount());
@@ -571,9 +572,10 @@
   EXPECT_TRUE(NotificationsContain(notifications, "id3"));
   EXPECT_FALSE(NotificationsContain(notifications, "id4"));
 
-  // And RemoveAllNotifications should remove all.
+  // And remove all including invisible notifications.
   blocker.SetNotificationsEnabled(false);
-  message_center()->RemoveAllNotifications(false /* by_user */);
+  message_center()->RemoveAllNotifications(false /* by_user */,
+                                           MessageCenter::RemoveType::ALL);
   EXPECT_EQ(0u, message_center()->NotificationCount());
 }
 
diff --git a/ui/message_center/notification.cc b/ui/message_center/notification.cc
index 0b5a4dd..7c76b2c 100644
--- a/ui/message_center/notification.cc
+++ b/ui/message_center/notification.cc
@@ -34,6 +34,9 @@
       progress(0),
       should_make_spoken_feedback_for_popup_updates(true),
       clickable(true),
+#if defined(OS_CHROMEOS)
+      pinned(false),
+#endif  // defined(OS_CHROMEOS)
       renotify(false),
       silent(false) {}
 
@@ -50,6 +53,9 @@
       should_make_spoken_feedback_for_popup_updates(
           other.should_make_spoken_feedback_for_popup_updates),
       clickable(other.clickable),
+#if defined(OS_CHROMEOS)
+      pinned(other.pinned),
+#endif  // defined(OS_CHROMEOS)
       vibration_pattern(other.vibration_pattern),
       renotify(other.renotify),
       silent(other.silent) {}
diff --git a/ui/message_center/notification.h b/ui/message_center/notification.h
index b9cf129..1214ee2 100644
--- a/ui/message_center/notification.h
+++ b/ui/message_center/notification.h
@@ -53,6 +53,11 @@
   std::vector<ButtonInfo> buttons;
   bool should_make_spoken_feedback_for_popup_updates;
   bool clickable;
+#if defined(OS_CHROMEOS)
+  // Flag if the notification is pinned. If true, the notification is pinned
+  // and user can't remove it.
+  bool pinned;
+#endif  // defined(OS_CHROMEOS)
   std::vector<int> vibration_pattern;
   bool renotify;
   bool silent;
@@ -213,6 +218,17 @@
     optional_fields_.clickable = clickable;
   }
 
+  bool pinned() const {
+#if defined(OS_CHROMEOS)
+    return optional_fields_.pinned;
+#else
+    return false;
+#endif  // defined(OS_CHROMEOS)
+  }
+#if defined(OS_CHROMEOS)
+  void set_pinned(bool pinned) { optional_fields_.pinned = pinned; }
+#endif  // defined(OS_CHROMEOS)
+
   NotificationDelegate* delegate() const { return delegate_.get(); }
 
   const RichNotificationData& rich_notification_data() const {
diff --git a/ui/message_center/views/message_center_button_bar.cc b/ui/message_center/views/message_center_button_bar.cc
index 6a11fd5..fbd5859 100644
--- a/ui/message_center/views/message_center_button_bar.cc
+++ b/ui/message_center/views/message_center_button_bar.cc
@@ -267,6 +267,10 @@
     close_all_button_->SetEnabled(enabled);
 }
 
+views::Button* MessageCenterButtonBar::GetCloseAllButtonForTest() const {
+  return close_all_button_;
+}
+
 void MessageCenterButtonBar::SetBackArrowVisible(bool visible) {
   if (title_arrow_)
     title_arrow_->SetVisible(visible);
@@ -281,7 +285,7 @@
 void MessageCenterButtonBar::ButtonPressed(views::Button* sender,
                                            const ui::Event& event) {
   if (sender == close_all_button_) {
-    message_center_view()->ClearAllNotifications();
+    message_center_view()->ClearAllClosableNotifications();
   } else if (sender == settings_button_ || sender == title_arrow_) {
     MessageCenterView* center_view = message_center_view();
     center_view->SetSettingsVisible(!center_view->settings_visible());
diff --git a/ui/message_center/views/message_center_button_bar.h b/ui/message_center/views/message_center_button_bar.h
index 74c7b84..e7932abd 100644
--- a/ui/message_center/views/message_center_button_bar.h
+++ b/ui/message_center/views/message_center_button_bar.h
@@ -7,6 +7,7 @@
 
 #include "base/macros.h"
 #include "build/build_config.h"
+#include "ui/message_center/message_center_export.h"
 #include "ui/views/controls/button/button.h"
 #include "ui/views/controls/button/image_button.h"
 #include "ui/views/view.h"
@@ -43,6 +44,8 @@
   // Sometimes we shouldn't see the close-all button.
   void SetCloseAllButtonEnabled(bool enabled);
 
+  MESSAGE_CENTER_EXPORT views::Button* GetCloseAllButtonForTest() const;
+
   // Sometimes we shouldn't see the back arrow (not in settings).
   void SetBackArrowVisible(bool visible);
 
diff --git a/ui/message_center/views/message_center_view.cc b/ui/message_center/views/message_center_view.cc
index dc6d527..a95de2b 100644
--- a/ui/message_center/views/message_center_view.cc
+++ b/ui/message_center/views/message_center_view.cc
@@ -255,20 +255,25 @@
   button_bar_->SetBackArrowVisible(visible);
 }
 
-void MessageCenterView::ClearAllNotifications() {
+void MessageCenterView::ClearAllClosableNotifications() {
   if (is_closing_)
     return;
 
   SetViewHierarchyEnabled(scroller_, false);
   button_bar_->SetAllButtonsEnabled(false);
-  message_list_view_->ClearAllNotifications(scroller_->GetVisibleRect());
+  message_list_view_->ClearAllClosableNotifications(
+      scroller_->GetVisibleRect());
 }
 
 void MessageCenterView::OnAllNotificationsCleared() {
   SetViewHierarchyEnabled(scroller_, true);
   button_bar_->SetAllButtonsEnabled(true);
   button_bar_->SetCloseAllButtonEnabled(false);
-  message_center_->RemoveAllVisibleNotifications(true);  // Action by user.
+
+  // Action by user.
+  message_center_->RemoveAllNotifications(
+      true /* by_user */,
+      message_center::MessageCenter::RemoveType::NON_PINNED);
 }
 
 size_t MessageCenterView::NumMessageViewsForTest() const {
@@ -588,7 +593,14 @@
   scroller_->contents()->AddChildView(
       no_message_views ? empty_list_view_.get() : message_list_view_.get());
 
-  button_bar_->SetCloseAllButtonEnabled(!no_message_views);
+  bool no_closable_views = true;
+  for (const auto& view : notification_views_) {
+    if (!view.second->IsPinned()) {
+      no_closable_views = false;
+      break;
+    }
+  }
+  button_bar_->SetCloseAllButtonEnabled(!no_closable_views);
   scroller_->SetFocusable(!no_message_views);
 
   if (focus_manager && focused_view)
diff --git a/ui/message_center/views/message_center_view.h b/ui/message_center/views/message_center_view.h
index af91c4a..69d890d 100644
--- a/ui/message_center/views/message_center_view.h
+++ b/ui/message_center/views/message_center_view.h
@@ -50,7 +50,7 @@
 
   void SetNotifications(const NotificationList::Notifications& notifications);
 
-  void ClearAllNotifications();
+  void ClearAllClosableNotifications();
   void OnAllNotificationsCleared();
 
   size_t NumMessageViewsForTest() const;
diff --git a/ui/message_center/views/message_center_view_unittest.cc b/ui/message_center/views/message_center_view_unittest.cc
index d412cb0..1d592a3 100644
--- a/ui/message_center/views/message_center_view_unittest.cc
+++ b/ui/message_center/views/message_center_view_unittest.cc
@@ -17,9 +17,11 @@
 #include "ui/message_center/notification.h"
 #include "ui/message_center/notification_list.h"
 #include "ui/message_center/notification_types.h"
+#include "ui/message_center/views/message_center_button_bar.h"
 #include "ui/message_center/views/message_center_controller.h"
 #include "ui/message_center/views/message_list_view.h"
 #include "ui/message_center/views/notification_view.h"
+#include "ui/views/controls/slide_out_view.h"
 
 namespace message_center {
 
@@ -34,6 +36,12 @@
   LAYOUT
 };
 
+class DummyEvent : public ui::Event {
+ public:
+  DummyEvent() : Event(ui::ET_UNKNOWN, base::TimeDelta(), 0) {}
+  ~DummyEvent() override {}
+};
+
 /* Instrumented/Mock NotificationView subclass ********************************/
 
 class MockNotificationView : public NotificationView {
@@ -94,6 +102,11 @@
   void SetVisibleNotifications(NotificationList::Notifications notifications) {
     visible_notifications_ = notifications;
   }
+  void RemoveAllNotifications(bool by_user, RemoveType type) override {
+    if (type == RemoveType::NON_PINNED)
+      remove_all_closable_notification_called_ = true;
+  }
+  bool remove_all_closable_notification_called_ = false;
   NotificationList::Notifications visible_notifications_;
 };
 
@@ -111,6 +124,7 @@
 
   MessageCenterView* GetMessageCenterView();
   MessageListView* GetMessageListView();
+  FakeMessageCenterImpl* GetMessageCenter() const;
   NotificationView* GetNotificationView(const std::string& id);
   views::BoundsAnimator* GetAnimator();
   int GetNotificationCount();
@@ -139,6 +153,8 @@
 
   void LogBounds(int depth, views::View* view);
 
+  MessageCenterButtonBar* GetButtonBar() const;
+
  private:
   views::View* MakeParent(views::View* child1, views::View* child2);
 
@@ -146,7 +162,7 @@
 
   NotificationList::Notifications notifications_;
   scoped_ptr<MessageCenterView> message_center_view_;
-  FakeMessageCenterImpl message_center_;
+  scoped_ptr<FakeMessageCenterImpl> message_center_;
   std::map<CallType,int> callCounts_;
 
   DISALLOW_COPY_AND_ASSIGN(MessageCenterViewTest);
@@ -159,6 +175,8 @@
 }
 
 void MessageCenterViewTest::SetUp() {
+  message_center_.reset(new FakeMessageCenterImpl());
+
   // Create a dummy notification.
   Notification* notification1 = new Notification(
       NOTIFICATION_TYPE_SIMPLE, std::string(kNotificationId1),
@@ -177,12 +195,12 @@
   // ...and a list for it.
   notifications_.insert(notification1);
   notifications_.insert(notification2);
-  message_center_.SetVisibleNotifications(notifications_);
+  message_center_->SetVisibleNotifications(notifications_);
 
   // Then create a new MessageCenterView with that single notification.
   base::string16 title;
   message_center_view_.reset(new MessageCenterView(
-      &message_center_, NULL, 100, false, /*top_down =*/false, title));
+      message_center_.get(), NULL, 100, false, /*top_down =*/false, title));
   GetMessageListView()->quit_message_loop_after_animation_for_test_ = true;
   GetMessageCenterView()->SetBounds(0, 0, 380, 600);
   message_center_view_->SetNotifications(notifications_);
@@ -205,6 +223,10 @@
   return message_center_view_->message_list_view_.get();
 }
 
+FakeMessageCenterImpl* MessageCenterViewTest::GetMessageCenter() const {
+  return message_center_.get();
+}
+
 NotificationView* MessageCenterViewTest::GetNotificationView(
     const std::string& id) {
   return message_center_view_->notification_views_[id];
@@ -236,7 +258,7 @@
     scoped_ptr<Notification> notification) {
   std::string notification_id = notification->id();
   notifications_.insert(notification.release());
-  message_center_.SetVisibleNotifications(notifications_);
+  message_center_->SetVisibleNotifications(notifications_);
   message_center_view_->OnNotificationAdded(notification_id);
 }
 
@@ -253,7 +275,7 @@
   // |notifications| is a "set" container so we don't need to be aware the
   // order.
   notifications_.insert(notification.release());
-  message_center_.SetVisibleNotifications(notifications_);
+  message_center_->SetVisibleNotifications(notifications_);
   message_center_view_->OnNotificationUpdated(notification_id);
 }
 
@@ -267,7 +289,7 @@
       break;
     }
   }
-  message_center_.SetVisibleNotifications(notifications_);
+  message_center_->SetVisibleNotifications(notifications_);
   message_center_view_->OnNotificationRemoved(notification_id, by_user);
 }
 
@@ -322,6 +344,10 @@
     LogBounds(depth + 1, view->child_at(i));
 }
 
+MessageCenterButtonBar* MessageCenterViewTest::GetButtonBar() const {
+  return message_center_view_->button_bar_;
+}
+
 /* Unit tests *****************************************************************/
 
 TEST_F(MessageCenterViewTest, CallTest) {
@@ -488,4 +514,89 @@
             GetMessageListView()->height());
 }
 
+TEST_F(MessageCenterViewTest, CloseButton) {
+  views::Button* close_button = GetButtonBar()->GetCloseAllButtonForTest();
+  EXPECT_NE(nullptr, close_button);
+
+  ((views::ButtonListener*)GetButtonBar())
+      ->ButtonPressed(close_button, DummyEvent());
+  base::MessageLoop::current()->Run();
+  EXPECT_TRUE(GetMessageCenter()->remove_all_closable_notification_called_);
+}
+
+TEST_F(MessageCenterViewTest, CloseButtonEnablity) {
+  views::Button* close_button = GetButtonBar()->GetCloseAllButtonForTest();
+  EXPECT_NE(nullptr, close_button);
+
+  // There should be 2 non-pinned notifications.
+  EXPECT_EQ(2u, GetMessageCenter()->GetVisibleNotifications().size());
+  EXPECT_TRUE(close_button->enabled());
+
+  RemoveNotification(kNotificationId1, false);
+  base::MessageLoop::current()->Run();
+
+  // There should be 1 non-pinned notification.
+  EXPECT_EQ(1u, GetMessageCenter()->GetVisibleNotifications().size());
+  EXPECT_TRUE(close_button->enabled());
+
+  RemoveNotification(kNotificationId2, false);
+  base::MessageLoop::current()->Run();
+
+  // There should be no notification.
+  EXPECT_EQ(0u, GetMessageCenter()->GetVisibleNotifications().size());
+  EXPECT_FALSE(close_button->enabled());
+
+  Notification normal_notification(
+      NOTIFICATION_TYPE_SIMPLE, std::string(kNotificationId1),
+      base::UTF8ToUTF16("title2"),
+      base::UTF8ToUTF16("message\nwhich\nis\nvertically\nlong\n."),
+      gfx::Image(), base::UTF8ToUTF16("display source"), GURL(),
+      NotifierId(NotifierId::APPLICATION, "extension_id"),
+      message_center::RichNotificationData(), NULL);
+
+#if defined(OS_CHROMEOS)
+  Notification pinned_notification(
+      NOTIFICATION_TYPE_SIMPLE, std::string(kNotificationId2),
+      base::UTF8ToUTF16("title2"),
+      base::UTF8ToUTF16("message\nwhich\nis\nvertically\nlong\n."),
+      gfx::Image(), base::UTF8ToUTF16("display source"), GURL(),
+      NotifierId(NotifierId::APPLICATION, "extension_id"),
+      message_center::RichNotificationData(), NULL);
+  pinned_notification.set_pinned(true);
+
+  AddNotification(
+      scoped_ptr<Notification>(new Notification(normal_notification)));
+
+  // There should be 1 non-pinned notification.
+  EXPECT_EQ(1u, GetMessageCenter()->GetVisibleNotifications().size());
+  EXPECT_TRUE(close_button->enabled());
+
+  AddNotification(
+      scoped_ptr<Notification>(new Notification(pinned_notification)));
+
+  // There should be 1 normal notification and 1 pinned notification.
+  EXPECT_EQ(2u, GetMessageCenter()->GetVisibleNotifications().size());
+  EXPECT_TRUE(close_button->enabled());
+
+  RemoveNotification(kNotificationId1, false);
+
+  // There should be 1 pinned notification.
+  EXPECT_EQ(1u, GetMessageCenter()->GetVisibleNotifications().size());
+  EXPECT_FALSE(close_button->enabled());
+
+  RemoveNotification(kNotificationId2, false);
+
+  // There should be no notification.
+  EXPECT_EQ(0u, GetMessageCenter()->GetVisibleNotifications().size());
+  EXPECT_FALSE(close_button->enabled());
+
+  AddNotification(
+      scoped_ptr<Notification>(new Notification(pinned_notification)));
+
+  // There should be 1 pinned notification.
+  EXPECT_EQ(1u, GetMessageCenter()->GetVisibleNotifications().size());
+  EXPECT_FALSE(close_button->enabled());
+#endif  // defined(OS_CHROMEOS)
+}
+
 }  // namespace message_center
diff --git a/ui/message_center/views/message_list_view.cc b/ui/message_center/views/message_list_view.cc
index 95933305..7087998 100644
--- a/ui/message_center/views/message_list_view.cc
+++ b/ui/message_center/views/message_list_view.cc
@@ -191,17 +191,24 @@
   fixed_height_ = 0;
 }
 
-void MessageListView::ClearAllNotifications(
+void MessageListView::ClearAllClosableNotifications(
     const gfx::Rect& visible_scroll_rect) {
   for (int i = 0; i < child_count(); ++i) {
-    views::View* child = child_at(i);
+    // Safe cast since all views in MessageListView are MessageViews.
+    MessageView* child = (MessageView*)child_at(i);
     if (!child->visible())
       continue;
     if (gfx::IntersectRects(child->bounds(), visible_scroll_rect).IsEmpty())
       continue;
+    if (child->IsPinned())
+      continue;
     clearing_all_views_.push_back(child);
   }
-  DoUpdateIfPossible();
+  if (clearing_all_views_.empty()) {
+    message_center_view()->OnAllNotificationsCleared();
+  } else {
+    DoUpdateIfPossible();
+  }
 }
 
 void MessageListView::OnBoundsAnimatorProgressed(
diff --git a/ui/message_center/views/message_list_view.h b/ui/message_center/views/message_list_view.h
index 2909f20..1007af3 100644
--- a/ui/message_center/views/message_list_view.h
+++ b/ui/message_center/views/message_list_view.h
@@ -46,7 +46,7 @@
   void UpdateNotification(MessageView* view, const Notification& notification);
   void SetRepositionTarget(const gfx::Rect& target_rect);
   void ResetRepositionSession();
-  void ClearAllNotifications(const gfx::Rect& visible_scroll_rect);
+  void ClearAllClosableNotifications(const gfx::Rect& visible_scroll_rect);
 
   MESSAGE_CENTER_EXPORT void SetRepositionTargetForTest(
       const gfx::Rect& target_rect);
diff --git a/ui/message_center/views/message_popup_collection.cc b/ui/message_center/views/message_popup_collection.cc
index 1a28ffe..e4280aa7 100644
--- a/ui/message_center/views/message_popup_collection.cc
+++ b/ui/message_center/views/message_popup_collection.cc
@@ -83,7 +83,25 @@
 void MessagePopupCollection::RemoveNotification(
     const std::string& notification_id,
     bool by_user) {
-  message_center_->RemoveNotification(notification_id, by_user);
+  NotificationList::PopupNotifications notifications =
+      message_center_->GetPopupNotifications();
+  for (NotificationList::PopupNotifications::iterator iter =
+           notifications.begin();
+       iter != notifications.end(); ++iter) {
+    Notification* notification = *iter;
+    DCHECK(notification);
+
+    if (notification->id() != notification_id)
+      continue;
+
+    // Don't remove the notification only when it's not pinned.
+    if (!notification->pinned())
+      message_center_->RemoveNotification(notification_id, by_user);
+    else
+      message_center_->MarkSinglePopupAsShown(notification_id, true /* read */);
+
+    break;
+  }
 }
 
 scoped_ptr<ui::MenuModel> MessagePopupCollection::CreateMenuModel(
@@ -139,10 +157,21 @@
     if (FindToast((*iter)->id()))
       continue;
 
-    NotificationView* view =
-        NotificationView::Create(NULL,
-                                 *(*iter),
-                                 true); // Create top-level notification.
+    NotificationView* view;
+    // Create top-level notification.
+#if defined(OS_CHROMEOS)
+    if ((*iter)->pinned()) {
+      Notification notification = *(*iter);
+      // Override pinned status, since toasts should be closable even when it's
+      // pinned.
+      notification.set_pinned(false);
+      view = NotificationView::Create(NULL, notification, true);
+    } else
+#endif  // defined(OS_CHROMEOS)
+    {
+      view = NotificationView::Create(NULL, *(*iter), true);
+    }
+
     view->set_context_menu_controller(context_menu_controller_.get());
     int view_height = ToastContentsView::GetToastSizeForView(view).height();
     int height_available =
diff --git a/ui/message_center/views/message_popup_collection_unittest.cc b/ui/message_center/views/message_popup_collection_unittest.cc
index e38bb4b..a41ae01 100644
--- a/ui/message_center/views/message_popup_collection_unittest.cc
+++ b/ui/message_center/views/message_popup_collection_unittest.cc
@@ -118,7 +118,8 @@
   void CloseAllToasts() {
     // Assumes there is at least one toast to close.
     EXPECT_TRUE(GetToastCounts() > 0);
-    MessageCenter::Get()->RemoveAllNotifications(false);
+    MessageCenter::Get()->RemoveAllNotifications(
+        false /* by_user */, MessageCenter::RemoveType::ALL);
   }
 
   gfx::Rect GetToastRectAt(size_t index) {
@@ -480,6 +481,44 @@
   WaitForTransitionsDone();
 }
 
+#if defined(OS_CHROMEOS)
+
+TEST_F(MessagePopupCollectionTest, CloseNonClosableNotifications) {
+  const char* kNotificationId = "NOTIFICATION1";
+
+  scoped_ptr<Notification> notification(new Notification(
+      NOTIFICATION_TYPE_BASE_FORMAT, kNotificationId,
+      base::UTF8ToUTF16("test title"), base::UTF8ToUTF16("test message"),
+      gfx::Image(), base::string16() /* display_source */, GURL(),
+      NotifierId(NotifierId::APPLICATION, kNotificationId),
+      message_center::RichNotificationData(), new NotificationDelegate()));
+  notification->set_pinned(true);
+
+  // Add a pinned notification.
+  MessageCenter::Get()->AddNotification(std::move(notification));
+  WaitForTransitionsDone();
+
+  // Confirms that there is a toast.
+  EXPECT_EQ(1u, GetToastCounts());
+  EXPECT_EQ(1u, MessageCenter::Get()->NotificationCount());
+
+  // Close the toast.
+  views::WidgetDelegateView* toast1 = GetToast(kNotificationId);
+  ASSERT_TRUE(toast1 != NULL);
+  ui::MouseEvent event(ui::ET_MOUSE_MOVED, gfx::Point(), gfx::Point(),
+                       ui::EventTimeForNow(), 0, 0);
+  toast1->OnMouseEntered(event);
+  static_cast<MessageCenterObserver*>(collection())
+      ->OnNotificationRemoved(kNotificationId, true);
+  WaitForTransitionsDone();
+
+  // Confirms that there is no toast.
+  EXPECT_EQ(0u, GetToastCounts());
+  // But the notification still exists.
+  EXPECT_EQ(1u, MessageCenter::Get()->NotificationCount());
+}
+
+#endif  // defined(OS_CHROMEOS)
 
 }  // namespace test
 }  // namespace message_center
diff --git a/ui/message_center/views/message_view.cc b/ui/message_center/views/message_view.cc
index 6f2597f..8047351 100644
--- a/ui/message_center/views/message_view.cc
+++ b/ui/message_center/views/message_view.cc
@@ -26,9 +26,6 @@
 
 namespace {
 
-const int kCloseIconTopPadding = 5;
-const int kCloseIconRightPadding = 5;
-
 const int kShadowOffset = 1;
 const int kShadowBlur = 4;
 
@@ -63,19 +60,6 @@
   small_image_view->set_owned_by_client();
   small_image_view_.reset(small_image_view);
 
-  PaddedButton *close = new PaddedButton(this);
-  close->SetPadding(-kCloseIconRightPadding, kCloseIconTopPadding);
-  close->SetNormalImage(IDR_NOTIFICATION_CLOSE);
-  close->SetHoveredImage(IDR_NOTIFICATION_CLOSE_HOVER);
-  close->SetPressedImage(IDR_NOTIFICATION_CLOSE_PRESSED);
-  close->set_animate_on_state_change(false);
-  close->SetAccessibleName(l10n_util::GetStringUTF16(
-      IDS_MESSAGE_CENTER_CLOSE_NOTIFICATION_BUTTON_ACCESSIBLE_NAME));
-  // The close button should be added to view hierarchy by the derived class.
-  // This ensures that it is on top of other views.
-  close->set_owned_by_client();
-  close_button_.reset(close);
-
   focus_painter_ = views::Painter::CreateSolidFocusPainter(
       kFocusBorderColor, gfx::Insets(0, 1, 3, 2));
 }
@@ -103,12 +87,16 @@
 }
 
 bool MessageView::IsCloseButtonFocused() {
-  views::FocusManager* focus_manager = GetFocusManager();
-  return focus_manager && focus_manager->GetFocusedView() == close_button();
+  // May be overridden by the owner of the close button.
+  return false;
 }
 
 void MessageView::RequestFocusOnCloseButton() {
-  close_button_->RequestFocus();
+  // May be overridden by the owner of the close button.
+}
+
+bool MessageView::IsPinned() {
+  return false;
 }
 
 void MessageView::GetAccessibleState(ui::AXViewState* state) {
@@ -151,7 +139,6 @@
 }
 
 void MessageView::OnPaint(gfx::Canvas* canvas) {
-  DCHECK_EQ(this, close_button_->parent());
   DCHECK_EQ(this, small_image_view_->parent());
   SlideOutView::OnPaint(canvas);
   views::Painter::PaintFocusPainter(this, canvas, focus_painter_.get());
@@ -175,14 +162,6 @@
   // Background.
   background_view_->SetBoundsRect(content_bounds);
 
-  // Close button.
-  gfx::Size close_size(close_button_->GetPreferredSize());
-  gfx::Rect close_rect(content_bounds.right() - close_size.width(),
-                       content_bounds.y(),
-                       close_size.width(),
-                       close_size.height());
-  close_button_->SetBoundsRect(close_rect);
-
   gfx::Size small_image_size(small_image_view_->GetPreferredSize());
   gfx::Rect small_image_rect(small_image_size);
   small_image_rect.set_origin(gfx::Point(
@@ -229,9 +208,6 @@
 
 void MessageView::ButtonPressed(views::Button* sender,
                                 const ui::Event& event) {
-  if (sender == close_button()) {
-    controller_->RemoveNotification(notification_id_, true);  // By user.
-  }
 }
 
 void MessageView::OnSlideOut() {
diff --git a/ui/message_center/views/message_view.h b/ui/message_center/views/message_view.h
index 47840df..6a4754e 100644
--- a/ui/message_center/views/message_view.h
+++ b/ui/message_center/views/message_view.h
@@ -46,8 +46,8 @@
 const int kWebNotificationButtonWidth = 32;
 const int kWebNotificationIconSize = 40;
 
-// An base class for a notification entry. Contains background, close button
-// and other elements shared by derived notification views.
+// An base class for a notification entry. Contains background and other
+// elements shared by derived notification views.
 class MESSAGE_CENTER_EXPORT MessageView : public views::SlideOutView,
                                           public views::ButtonListener {
  public:
@@ -67,8 +67,9 @@
   // Creates a shadow around the notification.
   void CreateShadowBorder();
 
-  bool IsCloseButtonFocused();
-  void RequestFocusOnCloseButton();
+  virtual bool IsCloseButtonFocused();
+  virtual void RequestFocusOnCloseButton();
+  virtual bool IsPinned();
 
   void set_accessible_name(const base::string16& accessible_name) {
     accessible_name_ = accessible_name;
@@ -100,7 +101,6 @@
   void OnSlideOut() override;
 
   views::ImageView* small_image() { return small_image_view_.get(); }
-  views::ImageButton* close_button() { return close_button_.get(); }
   views::ScrollView* scroller() { return scroller_; }
 
  private:
@@ -108,7 +108,6 @@
   std::string notification_id_;
   NotifierId notifier_id_;
   views::View* background_view_;  // Owned by views hierarchy.
-  scoped_ptr<views::ImageButton> close_button_;
   scoped_ptr<views::ImageView> small_image_view_;
   views::ScrollView* scroller_;
 
diff --git a/ui/message_center/views/notification_view.cc b/ui/message_center/views/notification_view.cc
index fe91d1b..254fcbf1 100644
--- a/ui/message_center/views/notification_view.cc
+++ b/ui/message_center/views/notification_view.cc
@@ -59,6 +59,9 @@
 // Dimensions.
 const int kProgressBarBottomPadding = 0;
 
+const int kCloseIconTopPadding = 5;
+const int kCloseIconRightPadding = 5;
+
 // static
 scoped_ptr<views::Border> MakeEmptyBorder(int top,
                                           int left,
@@ -228,7 +231,8 @@
                                     action_buttons_.end());
   if (settings_button_view_)
     buttons.push_back(settings_button_view_);
-  buttons.push_back(close_button());
+  if (close_button_)
+    buttons.push_back(close_button_.get());
 
   for (size_t i = 0; i < buttons.size(); ++i) {
     gfx::Point point_in_child = point;
@@ -241,6 +245,7 @@
 }
 
 void NotificationView::CreateOrUpdateViews(const Notification& notification) {
+  CreateOrUpdateCloseButtonView(notification);
   CreateOrUpdateTitleView(notification);
   CreateOrUpdateMessageView(notification);
   CreateOrUpdateProgressBarView(notification);
@@ -308,7 +313,6 @@
   // image to overlap the content as needed to provide large enough click and
   // touch areas (<http://crbug.com/168822> and <http://crbug.com/168856>).
   AddChildView(small_image());
-  AddChildView(close_button());
   SetAccessibleName(notification);
 
   SetEventTargeter(
@@ -378,6 +382,16 @@
   int top_height = top_view_->GetHeightForWidth(content_width);
   top_view_->SetBounds(insets.left(), insets.top(), content_width, top_height);
 
+  // Close button.
+  if (close_button_) {
+    gfx::Rect content_bounds = GetContentsBounds();
+    gfx::Size close_size(close_button_->GetPreferredSize());
+    gfx::Rect close_rect(content_bounds.right() - close_size.width(),
+                         content_bounds.y(), close_size.width(),
+                         close_size.height());
+    close_button_->SetBoundsRect(close_rect);
+  }
+
   // Icon.
   icon_view_->SetBounds(insets.left(), insets.top(), kIconSize, kIconSize);
 
@@ -445,6 +459,10 @@
     }
   }
 
+  if (close_button_ && sender == close_button_.get()) {
+    controller_->RemoveNotification(notification_id(), true);  // By user.
+  }
+
   // Let the superclass handle everything else.
   // Warning: This may cause the NotificationView itself to be deleted,
   // so don't do anything afterwards.
@@ -772,6 +790,29 @@
   }
 }
 
+void NotificationView::CreateOrUpdateCloseButtonView(
+    const Notification& notification) {
+  set_slide_out_enabled(!notification.pinned());
+
+  if (!notification.pinned() && !close_button_) {
+    PaddedButton* close = new PaddedButton(this);
+    close->SetPadding(-kCloseIconRightPadding, kCloseIconTopPadding);
+    close->SetNormalImage(IDR_NOTIFICATION_CLOSE);
+    close->SetHoveredImage(IDR_NOTIFICATION_CLOSE_HOVER);
+    close->SetPressedImage(IDR_NOTIFICATION_CLOSE_PRESSED);
+    close->set_animate_on_state_change(false);
+    close->SetAccessibleName(l10n_util::GetStringUTF16(
+        IDS_MESSAGE_CENTER_CLOSE_NOTIFICATION_BUTTON_ACCESSIBLE_NAME));
+    // The close button should be added to view hierarchy by the derived class.
+    // This ensures that it is on top of other views.
+    close->set_owned_by_client();
+    close_button_.reset(close);
+    AddChildView(close_button_.get());
+  } else if (notification.pinned() && close_button_) {
+    close_button_.reset();
+  }
+}
+
 int NotificationView::GetMessageLineLimit(int title_lines, int width) const {
   // Image notifications require that the image must be kept flush against
   // their icons, but we can allow more text if no image.
@@ -813,4 +854,22 @@
          message_view_->GetSizeForWidthAndLines(width, limit).height() : 0;
 }
 
+bool NotificationView::IsCloseButtonFocused() {
+  if (!close_button_)
+    return false;
+
+  views::FocusManager* focus_manager = GetFocusManager();
+  return focus_manager &&
+         focus_manager->GetFocusedView() == close_button_.get();
+}
+
+void NotificationView::RequestFocusOnCloseButton() {
+  if (close_button_)
+    close_button_->RequestFocus();
+}
+
+bool NotificationView::IsPinned() {
+  return !close_button_;
+}
+
 }  // namespace message_center
diff --git a/ui/message_center/views/notification_view.h b/ui/message_center/views/notification_view.h
index 491080cf..fd42a85 100644
--- a/ui/message_center/views/notification_view.h
+++ b/ui/message_center/views/notification_view.h
@@ -62,6 +62,9 @@
   // Overridden from MessageView:
   void UpdateWithNotification(const Notification& notification) override;
   void ButtonPressed(views::Button* sender, const ui::Event& event) override;
+  bool IsCloseButtonFocused() override;
+  void RequestFocusOnCloseButton() override;
+  bool IsPinned() override;
 
   // Overridden from MessageViewController:
   void ClickOnNotification(const std::string& notification_id) override;
@@ -105,6 +108,7 @@
   void CreateOrUpdateIconView(const Notification& notification);
   void CreateOrUpdateImageView(const Notification& notification);
   void CreateOrUpdateActionButtonViews(const Notification& notification);
+  void CreateOrUpdateCloseButtonView(const Notification& notification);
 
   int GetMessageLineLimit(int title_lines, int width) const;
   int GetMessageHeight(int width, int limit) const;
@@ -133,6 +137,7 @@
   ProportionalImageView* image_view_;
   NotificationProgressBarBase* progress_bar_view_;
   std::vector<NotificationButton*> action_buttons_;
+  scoped_ptr<views::ImageButton> close_button_;
   std::vector<views::View*> separators_;
 
   DISALLOW_COPY_AND_ASSIGN(NotificationView);
diff --git a/ui/message_center/views/notification_view_unittest.cc b/ui/message_center/views/notification_view_unittest.cc
index 383d1989..bcaf421 100644
--- a/ui/message_center/views/notification_view_unittest.cc
+++ b/ui/message_center/views/notification_view_unittest.cc
@@ -11,6 +11,7 @@
 #include "third_party/skia/include/core/SkBitmap.h"
 #include "third_party/skia/include/core/SkCanvas.h"
 #include "third_party/skia/include/core/SkColor.h"
+#include "ui/compositor/scoped_animation_duration_scale_mode.h"
 #include "ui/events/event_processor.h"
 #include "ui/events/event_utils.h"
 #include "ui/gfx/canvas.h"
@@ -31,6 +32,24 @@
 #include "ui/views/test/widget_test.h"
 #include "ui/views/widget/widget_delegate.h"
 
+namespace {
+
+scoped_ptr<ui::GestureEvent> GenerateGestureEvent(ui::EventType type) {
+  ui::GestureEventDetails detail(type);
+  scoped_ptr<ui::GestureEvent> event(
+      new ui::GestureEvent(0, 0, 0, base::TimeDelta(), detail));
+  return event;
+}
+
+scoped_ptr<ui::GestureEvent> GenerateGestureVerticalScrollUpdateEvent(int dx) {
+  ui::GestureEventDetails detail(ui::ET_GESTURE_SCROLL_UPDATE, dx, 0);
+  scoped_ptr<ui::GestureEvent> event(
+      new ui::GestureEvent(0, 0, 0, base::TimeDelta(), detail));
+  return event;
+}
+
+}  // anonymouse namespace
+
 namespace message_center {
 
 // A test delegate used for tests that deal with the notification settings
@@ -54,7 +73,9 @@
   void TearDown() override;
 
   views::Widget* widget() { return notification_view_->GetWidget(); }
-  NotificationView* notification_view() { return notification_view_.get(); }
+  NotificationView* notification_view() const {
+    return notification_view_.get();
+  }
   Notification* notification() { return notification_.get(); }
   RichNotificationData* data() { return data_.get(); }
 
@@ -155,12 +176,28 @@
     }
   }
 
+  views::ImageButton* GetCloseButton() {
+    return notification_view()->close_button_.get();
+  }
+
   void UpdateNotificationViews() {
     notification_view()->CreateOrUpdateViews(*notification());
     notification_view()->Layout();
   }
 
+  float GetNotificationScrollAmount() const {
+    return notification_view()->GetTransform().To2dTranslation().x();
+  }
+
+  bool IsRemoved(const std::string& notification_id) const {
+    return (removed_ids_.find(notification_id) != removed_ids_.end());
+  }
+
+  void RemoveNotificationView() { notification_view_.reset(); }
+
  private:
+  std::set<std::string> removed_ids_;
+
   scoped_ptr<RichNotificationData> data_;
   scoped_ptr<Notification> notification_;
   scoped_ptr<NotificationView> notification_view_;
@@ -216,8 +253,7 @@
 void NotificationViewTest::RemoveNotification(
     const std::string& notification_id,
     bool by_user) {
-  // For this test, this method should not be invoked.
-  NOTREACHED();
+  removed_ids_.insert(notification_id);
 }
 
 scoped_ptr<ui::MenuModel> NotificationViewTest::CreateMenuModel(
@@ -618,4 +654,64 @@
   EXPECT_TRUE(base::UTF16ToUTF8(result).find("hello") == std::string::npos);
 }
 
+TEST_F(NotificationViewTest, SlideOut) {
+  ui::ScopedAnimationDurationScaleMode zero_duration_scope(
+      ui::ScopedAnimationDurationScaleMode::ZERO_DURATION);
+
+  UpdateNotificationViews();
+  std::string notification_id = notification()->id();
+
+  auto event_begin = GenerateGestureEvent(ui::ET_GESTURE_SCROLL_BEGIN);
+  auto event_scroll10 = GenerateGestureVerticalScrollUpdateEvent(-10);
+  auto event_scroll500 = GenerateGestureVerticalScrollUpdateEvent(-500);
+  auto event_end = GenerateGestureEvent(ui::ET_GESTURE_SCROLL_END);
+
+  notification_view()->OnGestureEvent(event_begin.get());
+  notification_view()->OnGestureEvent(event_scroll10.get());
+  EXPECT_FALSE(IsRemoved(notification_id));
+  EXPECT_EQ(-10.f, GetNotificationScrollAmount());
+  notification_view()->OnGestureEvent(event_end.get());
+  EXPECT_FALSE(IsRemoved(notification_id));
+  EXPECT_EQ(0.f, GetNotificationScrollAmount());
+
+  notification_view()->OnGestureEvent(event_begin.get());
+  notification_view()->OnGestureEvent(event_scroll500.get());
+  EXPECT_FALSE(IsRemoved(notification_id));
+  EXPECT_EQ(-500.f, GetNotificationScrollAmount());
+  notification_view()->OnGestureEvent(event_end.get());
+  EXPECT_TRUE(IsRemoved(notification_id));
+}
+
+// Pinning notification is ChromeOS only feature.
+#if defined(OS_CHROMEOS)
+
+TEST_F(NotificationViewTest, SlideOutPinned) {
+  ui::ScopedAnimationDurationScaleMode zero_duration_scope(
+      ui::ScopedAnimationDurationScaleMode::ZERO_DURATION);
+
+  notification()->set_pinned(true);
+  UpdateNotificationViews();
+  std::string notification_id = notification()->id();
+
+  auto event_begin = GenerateGestureEvent(ui::ET_GESTURE_SCROLL_BEGIN);
+  auto event_scroll500 = GenerateGestureVerticalScrollUpdateEvent(-500);
+  auto event_end = GenerateGestureEvent(ui::ET_GESTURE_SCROLL_END);
+
+  notification_view()->OnGestureEvent(event_begin.get());
+  notification_view()->OnGestureEvent(event_scroll500.get());
+  EXPECT_FALSE(IsRemoved(notification_id));
+  EXPECT_LT(-500.f, GetNotificationScrollAmount());
+  notification_view()->OnGestureEvent(event_end.get());
+  EXPECT_FALSE(IsRemoved(notification_id));
+}
+
+TEST_F(NotificationViewTest, Pinned) {
+  notification()->set_pinned(true);
+
+  UpdateNotificationViews();
+  EXPECT_EQ(NULL, GetCloseButton());
+}
+
+#endif // defined(OS_CHROMEOS)
+
 }  // namespace message_center
diff --git a/ui/ozone/platform/drm/gpu/gbm_buffer.cc b/ui/ozone/platform/drm/gpu/gbm_buffer.cc
index 14623c94..62099a90 100644
--- a/ui/ozone/platform/drm/gpu/gbm_buffer.cc
+++ b/ui/ozone/platform/drm/gpu/gbm_buffer.cc
@@ -46,7 +46,6 @@
                gbm->device_path().value(), "size", size.ToString());
   bool use_scanout = (usage == gfx::BufferUsage::SCANOUT);
   unsigned flags = 0;
-  // GBM_BO_USE_SCANOUT is the hint of x-tiling.
   if (use_scanout)
     flags = GBM_BO_USE_SCANOUT | GBM_BO_USE_RENDERING;
   gbm_bo* bo = gbm_bo_create(gbm->device(), size.width(), size.height(),
diff --git a/ui/views/animation/ink_drop_animation.cc b/ui/views/animation/ink_drop_animation.cc
index a7a65a6..111e910 100644
--- a/ui/views/animation/ink_drop_animation.cc
+++ b/ui/views/animation/ink_drop_animation.cc
@@ -7,30 +7,21 @@
 namespace views {
 
 const float InkDropAnimation::kHiddenOpacity = 0.f;
-const float InkDropAnimation::kVisibleOpacity = 0.11f;
+const float InkDropAnimation::kVisibleOpacity = 0.175f;
 
-InkDropAnimation::InkDropAnimation() {}
+InkDropAnimation::InkDropAnimation() : observer_(nullptr) {}
 
 InkDropAnimation::~InkDropAnimation() {}
 
-void InkDropAnimation::AddObserver(InkDropAnimationObserver* observer) {
-  observers_.AddObserver(observer);
-}
-
-void InkDropAnimation::RemoveObserver(InkDropAnimationObserver* observer) {
-  observers_.RemoveObserver(observer);
-}
-
 void InkDropAnimation::NotifyAnimationStarted(InkDropState ink_drop_state) {
-  FOR_EACH_OBSERVER(InkDropAnimationObserver, observers_,
-                    InkDropAnimationStarted(ink_drop_state));
+  observer_->InkDropAnimationStarted(ink_drop_state);
 }
 
 void InkDropAnimation::NotifyAnimationEnded(
     InkDropState ink_drop_state,
     InkDropAnimationObserver::InkDropAnimationEndedReason reason) {
-  FOR_EACH_OBSERVER(InkDropAnimationObserver, observers_,
-                    InkDropAnimationEnded(ink_drop_state, reason));
+  observer_->InkDropAnimationEnded(ink_drop_state, reason);
+  // |this| may be deleted!
 }
 
 }  // namespace views
diff --git a/ui/views/animation/ink_drop_animation.h b/ui/views/animation/ink_drop_animation.h
index 450c7ad5b..63b8330 100644
--- a/ui/views/animation/ink_drop_animation.h
+++ b/ui/views/animation/ink_drop_animation.h
@@ -6,7 +6,6 @@
 #define UI_VIEWS_ANIMATION_INK_DROP_ANIMATION_H_
 
 #include "base/macros.h"
-#include "base/observer_list.h"
 #include "ui/gfx/geometry/point.h"
 #include "ui/views/animation/ink_drop_animation_observer.h"
 #include "ui/views/animation/ink_drop_state.h"
@@ -34,8 +33,9 @@
   InkDropAnimation();
   virtual ~InkDropAnimation();
 
-  void AddObserver(InkDropAnimationObserver* observer);
-  void RemoveObserver(InkDropAnimationObserver* observer);
+  void set_observer(InkDropAnimationObserver* observer) {
+    observer_ = observer;
+  }
 
   // Gets the target InkDropState, i.e. the last |ink_drop_state| passed to
   // AnimateToState() or set by HideImmediately().
@@ -55,9 +55,6 @@
   // animates to the target HIDDEN state.
   virtual bool IsVisible() const = 0;
 
-  // Sets the |center_point| of the ink drop layer relative to its parent Layer.
-  virtual void SetCenterPoint(const gfx::Point& center_point) = 0;
-
   // Immediately aborts all in-progress animations and hides the ink drop.
   //
   // NOTE: This will NOT raise InkDropAnimation(Started|Ended) events for the
@@ -74,8 +71,7 @@
       InkDropAnimationObserver::InkDropAnimationEndedReason reason);
 
  private:
-  // List of observers to notify when animations have started and finished.
-  base::ObserverList<InkDropAnimationObserver> observers_;
+  InkDropAnimationObserver* observer_;
 
   DISALLOW_COPY_AND_ASSIGN(InkDropAnimation);
 };
diff --git a/ui/views/animation/ink_drop_animation_controller_impl.cc b/ui/views/animation/ink_drop_animation_controller_impl.cc
index 23bf9f25..7ca5a0d 100644
--- a/ui/views/animation/ink_drop_animation_controller_impl.cc
+++ b/ui/views/animation/ink_drop_animation_controller_impl.cc
@@ -54,7 +54,6 @@
     InkDropHost* ink_drop_host)
     : ink_drop_host_(ink_drop_host),
       root_layer_(new ui::Layer(ui::LAYER_NOT_DRAWN)),
-      can_destroy_after_hidden_animation_(true),
       hover_after_animation_timer_(nullptr) {
   root_layer_->set_name("InkDropAnimationControllerImpl:RootLayer");
   ink_drop_host_->AddInkDropLayer(root_layer_.get());
@@ -82,13 +81,6 @@
   if (!ink_drop_animation_)
     CreateInkDropAnimation();
 
-  // The InkDropAnimationObserver::InkDropAnimationEnded() callback needs to
-  // know if it is safe to destroy the |ink_drop_animation_| and it is not safe
-  // when the notification is raised within a call to
-  // InkDropAnimation::AnimateToState().
-  base::AutoReset<bool> auto_reset_can_destroy_after_hidden_animation(
-      &can_destroy_after_hidden_animation_, false);
-
   if (ink_drop_state != views::InkDropState::HIDDEN) {
     SetHoveredInternal(false, base::TimeDelta::FromMilliseconds(
                                   kHoverFadeOutBeforeAnimationDurationInMs));
@@ -114,7 +106,7 @@
 void InkDropAnimationControllerImpl::CreateInkDropAnimation() {
   DestroyInkDropAnimation();
   ink_drop_animation_ = ink_drop_host_->CreateInkDropAnimation();
-  ink_drop_animation_->AddObserver(this);
+  ink_drop_animation_->set_observer(this);
   root_layer_->Add(ink_drop_animation_->GetRootLayer());
 }
 
@@ -122,7 +114,6 @@
   if (!ink_drop_animation_)
     return;
   root_layer_->Remove(ink_drop_animation_->GetRootLayer());
-  ink_drop_animation_->RemoveObserver(this);
   ink_drop_animation_.reset();
 }
 
@@ -159,12 +150,10 @@
     ink_drop_animation_->AnimateToState(views::InkDropState::HIDDEN);
   } else if (ink_drop_state == views::InkDropState::HIDDEN) {
     StartHoverAfterAnimationTimer();
-    if (can_destroy_after_hidden_animation_) {
-      // TODO(bruthig): Investigate whether creating and destroying
-      // InkDropAnimations is expensive and consider creating an
-      // InkDropAnimationPool. See www.crbug.com/522175.
-      DestroyInkDropAnimation();
-    }
+    // TODO(bruthig): Investigate whether creating and destroying
+    // InkDropAnimations is expensive and consider creating an
+    // InkDropAnimationPool. See www.crbug.com/522175.
+    DestroyInkDropAnimation();
   }
 }
 
diff --git a/ui/views/animation/ink_drop_animation_controller_impl.h b/ui/views/animation/ink_drop_animation_controller_impl.h
index 3c7cf243e..92feae61 100644
--- a/ui/views/animation/ink_drop_animation_controller_impl.h
+++ b/ui/views/animation/ink_drop_animation_controller_impl.h
@@ -98,10 +98,6 @@
   // CreateInkDropAnimation().
   scoped_ptr<InkDropAnimation> ink_drop_animation_;
 
-  // Tracks whether the InkDropAnimation can safely be destroyed when an
-  // InkDropState::HIDDEN animation completes.
-  bool can_destroy_after_hidden_animation_;
-
   // The timer used to delay the hover fade in after an ink drop animation.
   scoped_ptr<base::Timer> hover_after_animation_timer_;
 
diff --git a/ui/views/animation/ink_drop_animation_unittest.cc b/ui/views/animation/ink_drop_animation_unittest.cc
index 5ac7757..c832e70a 100644
--- a/ui/views/animation/ink_drop_animation_unittest.cc
+++ b/ui/views/animation/ink_drop_animation_unittest.cc
@@ -53,14 +53,15 @@
   switch (GetParam()) {
     case SQUARE_INK_DROP_ANIMATION: {
       SquareInkDropAnimation* typed_ink_drop_animation =
-          new SquareInkDropAnimation(gfx::Size(10, 10), 2, gfx::Size(8, 8), 1);
+          new SquareInkDropAnimation(gfx::Size(10, 10), 2, gfx::Size(8, 8), 1,
+                                     gfx::Point(), SK_ColorBLACK);
       ink_drop_animation_.reset(typed_ink_drop_animation);
       test_api_.reset(
           new SquareInkDropAnimationTestApi(typed_ink_drop_animation));
       break;
     }
   }
-  ink_drop_animation_->AddObserver(&observer_);
+  ink_drop_animation_->set_observer(&observer_);
   observer_.set_ink_drop_animation(ink_drop_animation_.get());
   test_api_->SetDisableAnimationTimers(true);
 }
diff --git a/ui/views/animation/ink_drop_host_view.cc b/ui/views/animation/ink_drop_host_view.cc
index d19978c..8e5c3ce2d 100644
--- a/ui/views/animation/ink_drop_host_view.cc
+++ b/ui/views/animation/ink_drop_host_view.cc
@@ -4,6 +4,7 @@
 
 #include "ui/views/animation/ink_drop_host_view.h"
 
+#include "ui/gfx/color_palette.h"
 #include "ui/views/animation/ink_drop_hover.h"
 #include "ui/views/animation/square_ink_drop_animation.h"
 
@@ -28,7 +29,6 @@
 
 void InkDropHostView::RemoveInkDropLayer(ui::Layer* ink_drop_layer) {
   layer()->Remove(ink_drop_layer);
-  SetFillsBoundsOpaquely(true);
   SetPaintToLayer(false);
 }
 
@@ -37,16 +37,14 @@
       gfx::Size(kInkDropLargeSize, kInkDropLargeSize),
       kInkDropLargeCornerRadius,
       gfx::Size(kInkDropSmallSize, kInkDropSmallSize),
-      kInkDropSmallCornerRadius));
-  animation->SetCenterPoint(GetInkDropCenter());
+      kInkDropSmallCornerRadius, GetInkDropCenter(), GetInkDropBaseColor()));
   return animation;
 }
 
 scoped_ptr<InkDropHover> InkDropHostView::CreateInkDropHover() const {
-  scoped_ptr<InkDropHover> hover(
-      new InkDropHover(gfx::Size(kInkDropSmallSize, kInkDropSmallSize),
-                       kInkDropSmallCornerRadius));
-  hover->SetCenterPoint(GetInkDropCenter());
+  scoped_ptr<InkDropHover> hover(new InkDropHover(
+      gfx::Size(kInkDropSmallSize, kInkDropSmallSize),
+      kInkDropSmallCornerRadius, GetInkDropCenter(), GetInkDropBaseColor()));
   return hover;
 }
 
@@ -54,4 +52,9 @@
   return GetLocalBounds().CenterPoint();
 }
 
+SkColor InkDropHostView::GetInkDropBaseColor() const {
+  NOTREACHED();
+  return gfx::kPlaceholderColor;
+}
+
 }  // namespace views
diff --git a/ui/views/animation/ink_drop_host_view.h b/ui/views/animation/ink_drop_host_view.h
index c77a39f0..87832b7 100644
--- a/ui/views/animation/ink_drop_host_view.h
+++ b/ui/views/animation/ink_drop_host_view.h
@@ -6,6 +6,7 @@
 #define UI_VIEWS_ANIMATION_INK_DROP_HOST_VIEW_H_
 
 #include "base/memory/scoped_ptr.h"
+#include "third_party/skia/include/core/SkColor.h"
 #include "ui/views/animation/ink_drop_host.h"
 #include "ui/views/view.h"
 
@@ -30,6 +31,7 @@
   // Overrideable methods to allow views to provide minor tweaks to the default
   // ink drop.
   virtual gfx::Point GetInkDropCenter() const;
+  virtual SkColor GetInkDropBaseColor() const;
 
  private:
   DISALLOW_COPY_AND_ASSIGN(InkDropHostView);
diff --git a/ui/views/animation/ink_drop_hover.cc b/ui/views/animation/ink_drop_hover.cc
index 311ddaf..be440c9 100644
--- a/ui/views/animation/ink_drop_hover.cc
+++ b/ui/views/animation/ink_drop_hover.cc
@@ -16,20 +16,20 @@
 namespace {
 
 // The opacity of the hover when it is visible.
-const float kHoverVisibleOpacity = 0.08f;
+const float kHoverVisibleOpacity = 0.128f;
 
 // The opacity of the hover when it is not visible.
 const float kHiddenOpacity = 0.0f;
 
-// The hover color.
-const SkColor kHoverColor = SK_ColorBLACK;
-
 }  // namespace
 
-InkDropHover::InkDropHover(const gfx::Size& size, int corner_radius)
+InkDropHover::InkDropHover(const gfx::Size& size,
+                           int corner_radius,
+                           const gfx::Point& center_point,
+                           SkColor color)
     : last_animation_initiated_was_fade_in_(false),
       layer_delegate_(
-          new RoundedRectangleLayerDelegate(kHoverColor, size, corner_radius)),
+          new RoundedRectangleLayerDelegate(color, size, corner_radius)),
       layer_(new ui::Layer()) {
   layer_->SetBounds(gfx::Rect(size));
   layer_->SetFillsBoundsOpaquely(false);
@@ -38,7 +38,11 @@
   layer_->SetOpacity(kHoverVisibleOpacity);
   layer_->SetMasksToBounds(false);
   layer_->set_name("InkDropHover:layer");
-  SetCenterPoint(gfx::Rect(size).CenterPoint());
+
+  gfx::Transform transform;
+  transform.Translate(center_point.x() - layer_->bounds().CenterPoint().x(),
+                      center_point.y() - layer_->bounds().CenterPoint().y());
+  layer_->SetTransform(transform);
 }
 
 InkDropHover::~InkDropHover() {}
@@ -86,13 +90,6 @@
   animation_observer->SetActive();
 }
 
-void InkDropHover::SetCenterPoint(const gfx::Point& center_point) {
-  gfx::Transform transform;
-  transform.Translate(center_point.x() - layer_->bounds().CenterPoint().x(),
-                      center_point.y() - layer_->bounds().CenterPoint().y());
-  layer_->SetTransform(transform);
-}
-
 bool InkDropHover::AnimationEndedCallback(
     HoverAnimationType animation_type,
     const ui::CallbackLayerAnimationObserver& observer) {
diff --git a/ui/views/animation/ink_drop_hover.h b/ui/views/animation/ink_drop_hover.h
index 33736695..00ed198 100644
--- a/ui/views/animation/ink_drop_hover.h
+++ b/ui/views/animation/ink_drop_hover.h
@@ -8,6 +8,7 @@
 #include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/time/time.h"
+#include "third_party/skia/include/core/SkColor.h"
 #include "ui/gfx/geometry/point.h"
 #include "ui/gfx/geometry/size.h"
 #include "ui/views/views_export.h"
@@ -24,7 +25,10 @@
 // visual feedback on ui::Views for mouse hover states.
 class VIEWS_EXPORT InkDropHover {
  public:
-  InkDropHover(const gfx::Size& size, int corner_radius);
+  InkDropHover(const gfx::Size& size,
+               int corner_radius,
+               const gfx::Point& center_point,
+               SkColor color);
   ~InkDropHover();
 
   // Returns true if the hover animation is either in the process of fading
@@ -40,9 +44,6 @@
   // The root Layer that can be added in to a Layer tree.
   ui::Layer* layer() { return layer_.get(); }
 
-  // Sets the |center_point| of the hover layer relative to its parent Layer.
-  void SetCenterPoint(const gfx::Point& center_point);
-
  private:
   enum HoverAnimationType { FADE_IN, FADE_OUT };
 
diff --git a/ui/views/animation/ink_drop_hover_unittest.cc b/ui/views/animation/ink_drop_hover_unittest.cc
index 21c6326..5657569 100644
--- a/ui/views/animation/ink_drop_hover_unittest.cc
+++ b/ui/views/animation/ink_drop_hover_unittest.cc
@@ -36,7 +36,8 @@
 InkDropHoverTest::~InkDropHoverTest() {}
 
 scoped_ptr<InkDropHover> InkDropHoverTest::CreateInkDropHover() const {
-  return make_scoped_ptr(new InkDropHover(gfx::Size(10, 10), 3));
+  return make_scoped_ptr(
+      new InkDropHover(gfx::Size(10, 10), 3, gfx::Point(), SK_ColorBLACK));
 }
 
 TEST_F(InkDropHoverTest, InitialStateAfterConstruction) {
diff --git a/ui/views/animation/square_ink_drop_animation.cc b/ui/views/animation/square_ink_drop_animation.cc
index 3b1a41e0..ea603a1 100644
--- a/ui/views/animation/square_ink_drop_animation.cc
+++ b/ui/views/animation/square_ink_drop_animation.cc
@@ -32,9 +32,6 @@
 // were causing visual anomalies.
 const float kMinimumCircleScale = 0.001f;
 
-// The ink drop color.
-const SkColor kInkDropColor = SK_ColorBLACK;
-
 // All the sub animations that are used to animate each of the InkDropStates.
 // These are used to get time durations with
 // GetAnimationDuration(InkDropSubAnimations). Note that in general a sub
@@ -180,16 +177,17 @@
 SquareInkDropAnimation::SquareInkDropAnimation(const gfx::Size& large_size,
                                                int large_corner_radius,
                                                const gfx::Size& small_size,
-                                               int small_corner_radius)
+                                               int small_corner_radius,
+                                               const gfx::Point& center_point,
+                                               SkColor color)
     : large_size_(large_size),
       large_corner_radius_(large_corner_radius),
       small_size_(small_size),
       small_corner_radius_(small_corner_radius),
       circle_layer_delegate_(new CircleLayerDelegate(
-          kInkDropColor,
+          color,
           std::min(large_size_.width(), large_size_.height()) / 2)),
-      rect_layer_delegate_(
-          new RectangleLayerDelegate(kInkDropColor, large_size_)),
+      rect_layer_delegate_(new RectangleLayerDelegate(color, large_size_)),
       root_layer_(ui::LAYER_NOT_DRAWN),
       ink_drop_state_(InkDropState::HIDDEN) {
   root_layer_.set_name("SquareInkDropAnimation:ROOT_LAYER");
@@ -200,6 +198,10 @@
   root_layer_.SetMasksToBounds(false);
   root_layer_.SetBounds(gfx::Rect(large_size_));
 
+  gfx::Transform transform;
+  transform.Translate(center_point.x(), center_point.y());
+  root_layer_.SetTransform(transform);
+
   SetStateToHidden();
 }
 
@@ -257,12 +259,8 @@
 
   AnimateStateChange(old_ink_drop_state, ink_drop_state_, animation_observer);
   animation_observer->SetActive();
-}
-
-void SquareInkDropAnimation::SetCenterPoint(const gfx::Point& center_point) {
-  gfx::Transform transform;
-  transform.Translate(center_point.x(), center_point.y());
-  root_layer_.SetTransform(transform);
+  // |this| may be deleted! |animation_observer| might synchronously call
+  // AnimationEndedCallback which can delete |this|.
 }
 
 void SquareInkDropAnimation::HideImmediately() {
diff --git a/ui/views/animation/square_ink_drop_animation.h b/ui/views/animation/square_ink_drop_animation.h
index 1e62b3d..c0fd3b1 100644
--- a/ui/views/animation/square_ink_drop_animation.h
+++ b/ui/views/animation/square_ink_drop_animation.h
@@ -19,6 +19,10 @@
 #include "ui/views/animation/ink_drop_state.h"
 #include "ui/views/views_export.h"
 
+namespace gfx {
+class Point;
+}  // namespace gfx
+
 namespace ui {
 class CallbackLayerAnimationObserver;
 class Layer;
@@ -53,7 +57,9 @@
   SquareInkDropAnimation(const gfx::Size& large_size,
                          int large_corner_radius,
                          const gfx::Size& small_size,
-                         int small_corner_radius);
+                         int small_corner_radius,
+                         const gfx::Point& center_point,
+                         SkColor color);
   ~SquareInkDropAnimation() override;
 
   // InkDropAnimation:
@@ -61,7 +67,6 @@
   InkDropState GetTargetInkDropState() const override;
   bool IsVisible() const override;
   void AnimateToState(InkDropState ink_drop_state) override;
-  void SetCenterPoint(const gfx::Point& center_point) override;
   void HideImmediately() override;
 
  private:
diff --git a/ui/views/animation/square_ink_drop_animation_unittest.cc b/ui/views/animation/square_ink_drop_animation_unittest.cc
index 21d33c2..0b11630 100644
--- a/ui/views/animation/square_ink_drop_animation_unittest.cc
+++ b/ui/views/animation/square_ink_drop_animation_unittest.cc
@@ -10,6 +10,7 @@
 #include "base/macros.h"
 #include "base/memory/scoped_ptr.h"
 #include "testing/gtest/include/gtest/gtest.h"
+#include "ui/gfx/geometry/point.h"
 #include "ui/gfx/geometry/size.h"
 #include "ui/gfx/geometry/size_f.h"
 #include "ui/views/animation/ink_drop_animation_observer.h"
@@ -110,7 +111,9 @@
     : ink_drop_animation_(gfx::Size(kDrawnSize, kDrawnSize),
                           2,
                           gfx::Size(kHalfDrawnSize, kHalfDrawnSize),
-                          1),
+                          1,
+                          gfx::Point(),
+                          SK_ColorBLACK),
       test_api_(&ink_drop_animation_) {}
 
 SquareInkDropAnimationCalculateTransformsTest::
diff --git a/ui/views/animation/test/test_ink_drop_host.cc b/ui/views/animation/test/test_ink_drop_host.cc
index c8572f3d..5b46b0d 100644
--- a/ui/views/animation/test/test_ink_drop_host.cc
+++ b/ui/views/animation/test/test_ink_drop_host.cc
@@ -24,12 +24,14 @@
 
 scoped_ptr<InkDropAnimation> TestInkDropHost::CreateInkDropAnimation() const {
   gfx::Size size(10, 10);
-  return make_scoped_ptr(new SquareInkDropAnimation(size, 5, size, 5));
+  return make_scoped_ptr(new SquareInkDropAnimation(
+      size, 5, size, 5, gfx::Point(), SK_ColorBLACK));
 }
 
 scoped_ptr<InkDropHover> TestInkDropHost::CreateInkDropHover() const {
   return should_show_hover_
-             ? make_scoped_ptr(new InkDropHover(gfx::Size(10, 10), 4))
+             ? make_scoped_ptr(new InkDropHover(gfx::Size(10, 10), 4,
+                                                gfx::Point(), SK_ColorBLACK))
              : nullptr;
 }
 
diff --git a/ui/views/controls/button/custom_button.cc b/ui/views/controls/button/custom_button.cc
index 7c46462..11ea15b 100644
--- a/ui/views/controls/button/custom_button.cc
+++ b/ui/views/controls/button/custom_button.cc
@@ -9,6 +9,7 @@
 #include "ui/events/event_utils.h"
 #include "ui/events/keycodes/keyboard_codes.h"
 #include "ui/gfx/animation/throb_animation.h"
+#include "ui/gfx/color_palette.h"
 #include "ui/gfx/screen.h"
 #include "ui/views/animation/ink_drop_delegate.h"
 #include "ui/views/animation/ink_drop_hover.h"
@@ -330,6 +331,10 @@
   return ShouldShowInkDropHover() ? Button::CreateInkDropHover() : nullptr;
 }
 
+SkColor CustomButton::GetInkDropBaseColor() const {
+  return ink_drop_base_color_;
+}
+
 ////////////////////////////////////////////////////////////////////////////////
 // CustomButton, gfx::AnimationDelegate implementation:
 
@@ -351,7 +356,8 @@
       ink_drop_delegate_(nullptr),
       notify_action_(NOTIFY_ON_RELEASE),
       has_ink_drop_action_on_click_(false),
-      ink_drop_action_on_click_(InkDropState::QUICK_ACTION) {
+      ink_drop_action_on_click_(InkDropState::QUICK_ACTION),
+      ink_drop_base_color_(gfx::kPlaceholderColor) {
   hover_animation_.SetSlideDuration(kHoverFadeDurationMs);
 }
 
diff --git a/ui/views/controls/button/custom_button.h b/ui/views/controls/button/custom_button.h
index 36661c1..1ec88a0 100644
--- a/ui/views/controls/button/custom_button.h
+++ b/ui/views/controls/button/custom_button.h
@@ -72,6 +72,8 @@
     notify_action_ = notify_action;
   }
 
+  void set_ink_drop_base_color(SkColor color) { ink_drop_base_color_ = color; }
+
   void SetHotTracked(bool is_hot_tracked);
   bool IsHotTracked() const;
 
@@ -96,6 +98,7 @@
   void GetAccessibleState(ui::AXViewState* state) override;
   void VisibilityChanged(View* starting_from, bool is_visible) override;
   scoped_ptr<InkDropHover> CreateInkDropHover() const override;
+  SkColor GetInkDropBaseColor() const override;
 
   // Overridden from gfx::AnimationDelegate:
   void AnimationProgressed(const gfx::Animation* animation) override;
@@ -183,6 +186,9 @@
   // is clicked.
   InkDropState ink_drop_action_on_click_;
 
+  // The color of the ripple and hover.
+  SkColor ink_drop_base_color_;
+
   DISALLOW_COPY_AND_ASSIGN(CustomButton);
 };
 
diff --git a/ui/views/controls/menu/menu_controller.cc b/ui/views/controls/menu/menu_controller.cc
index 0a5dca62..e9b73213 100644
--- a/ui/views/controls/menu/menu_controller.cc
+++ b/ui/views/controls/menu/menu_controller.cc
@@ -1078,7 +1078,7 @@
       (MenuDepth(menu_item) != 1 ||
        menu_item->GetType() != MenuItemView::SUBMENU)) {
     menu_item->NotifyAccessibilityEvent(
-        ui::AX_EVENT_FOCUS, true);
+        ui::AX_EVENT_SELECTION, true);
   }
 }
 
diff --git a/ui/views/controls/slide_out_view.cc b/ui/views/controls/slide_out_view.cc
index d3cafecf..adf1b119 100644
--- a/ui/views/controls/slide_out_view.cc
+++ b/ui/views/controls/slide_out_view.cc
@@ -10,8 +10,7 @@
 
 namespace views {
 
-SlideOutView::SlideOutView()
-    : gesture_scroll_amount_(0.f) {
+SlideOutView::SlideOutView() {
   // If accelerated compositing is not available, this widget tracks the
   // OnSlideOut event but does not render any visible changes.
   SetPaintToLayer(true);
@@ -22,11 +21,14 @@
 }
 
 void SlideOutView::OnGestureEvent(ui::GestureEvent* event) {
+  const float kScrollRatioForClosingNotification = 0.5f;
+
   if (event->type() == ui::ET_SCROLL_FLING_START) {
     // The threshold for the fling velocity is computed empirically.
     // The unit is in pixels/second.
     const float kFlingThresholdForClose = 800.f;
-    if (fabsf(event->details().velocity_x()) > kFlingThresholdForClose) {
+    if (is_slide_out_enabled_ &&
+        fabsf(event->details().velocity_x()) > kFlingThresholdForClose) {
       SlideOutAndClose(event->details().velocity_x() < 0 ? SLIDE_LEFT :
                        SLIDE_RIGHT);
       event->StopPropagation();
@@ -40,22 +42,35 @@
     return;
 
   if (event->type() == ui::ET_GESTURE_SCROLL_BEGIN) {
-    gesture_scroll_amount_ = 0.f;
+    gesture_amount_ = 0.f;
   } else if (event->type() == ui::ET_GESTURE_SCROLL_UPDATE) {
     // The scroll-update events include the incremental scroll amount.
-    gesture_scroll_amount_ += event->details().scroll_x();
+    gesture_amount_ += event->details().scroll_x();
+
+    float scroll_amount;
+    if (is_slide_out_enabled_) {
+      scroll_amount = gesture_amount_;
+      layer()->SetOpacity(1.f - std::min(fabsf(scroll_amount) / width(), 1.f));
+    } else {
+      if (gesture_amount_ >= 0) {
+        scroll_amount = std::min(0.5f * gesture_amount_,
+                                 width() * kScrollRatioForClosingNotification);
+      } else {
+        scroll_amount =
+            std::max(0.5f * gesture_amount_,
+                     -1.f * width() * kScrollRatioForClosingNotification);
+      }
+    }
 
     gfx::Transform transform;
-    transform.Translate(gesture_scroll_amount_, 0.0);
+    transform.Translate(scroll_amount, 0.0);
     layer()->SetTransform(transform);
-    layer()->SetOpacity(
-        1.f - std::min(fabsf(gesture_scroll_amount_) / width(), 1.f));
 
   } else if (event->type() == ui::ET_GESTURE_SCROLL_END) {
-    const float kScrollRatioForClosingNotification = 0.5f;
-    float scrolled_ratio = fabsf(gesture_scroll_amount_) / width();
-    if (scrolled_ratio >= kScrollRatioForClosingNotification) {
-      SlideOutAndClose(gesture_scroll_amount_ < 0 ? SLIDE_LEFT : SLIDE_RIGHT);
+    float scrolled_ratio = fabsf(gesture_amount_) / width();
+    if (is_slide_out_enabled_ &&
+        scrolled_ratio >= kScrollRatioForClosingNotification) {
+      SlideOutAndClose(gesture_amount_ < 0 ? SLIDE_LEFT : SLIDE_RIGHT);
       event->StopPropagation();
       return;
     }
diff --git a/ui/views/controls/slide_out_view.h b/ui/views/controls/slide_out_view.h
index 7fdb637c..89962f2 100644
--- a/ui/views/controls/slide_out_view.h
+++ b/ui/views/controls/slide_out_view.h
@@ -19,6 +19,8 @@
   SlideOutView();
   ~SlideOutView() override;
 
+  bool slide_out_enabled() { return is_slide_out_enabled_; }
+
  protected:
   // Called when user intends to close the View by sliding it out.
   virtual void OnSlideOut() = 0;
@@ -26,6 +28,10 @@
   // Overridden from views::View.
   void OnGestureEvent(ui::GestureEvent* event) override;
 
+  void set_slide_out_enabled(bool is_slide_out_enabled) {
+    is_slide_out_enabled_ = is_slide_out_enabled;
+  }
+
  private:
   enum SlideDirection {
     SLIDE_LEFT,
@@ -41,7 +47,8 @@
   // Overridden from ImplicitAnimationObserver.
   void OnImplicitAnimationsCompleted() override;
 
-  float gesture_scroll_amount_;
+  float gesture_amount_ = 0.f;
+  bool is_slide_out_enabled_ = true;
 
   DISALLOW_COPY_AND_ASSIGN(SlideOutView);
 };