diff --git a/DEPS b/DEPS
index d91ec47f..1fca9cf 100644
--- a/DEPS
+++ b/DEPS
@@ -40,11 +40,11 @@
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling Skia
   # and whatever else without interference from each other.
-  'skia_revision': '68ce7ce9ec8ab161dd39352d97e54d9b4367224a',
+  'skia_revision': '775663f2d2da3990a7d78c208fe5bb4c8fac7fc2',
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling V8
   # and whatever else without interference from each other.
-  'v8_revision': 'ce84a6c91105676a4d85a70772645e531bf942ed',
+  'v8_revision': '4cba40134b7bb9cbf18e191c373986cb7373943c',
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling swarming_client
   # and whatever else without interference from each other.
diff --git a/ash/BUILD.gn b/ash/BUILD.gn
index 7fd1372..c03f65406 100644
--- a/ash/BUILD.gn
+++ b/ash/BUILD.gn
@@ -997,6 +997,8 @@
     "shell/toplevel_window.cc",
     "shell/toplevel_window.h",
     "shell/widgets.cc",
+    "shell/window_type_launcher.cc",
+    "shell/window_type_launcher.h",
     "shell/window_watcher.cc",
     "shell/window_watcher.h",
     "shell/window_watcher_shelf_item_delegate.cc",
@@ -1023,6 +1025,7 @@
     "//ui/base",
     "//ui/gfx",
     "//ui/gfx/geometry",
+    "//ui/message_center",
     "//ui/views",
     "//ui/views:test_support",
     "//ui/views/examples:views_examples_lib",
@@ -1041,8 +1044,6 @@
     "shell/content/client/shell_main_delegate.h",
     "shell/content/shell_content_state_impl.cc",
     "shell/content/shell_content_state_impl.h",
-    "shell/window_type_launcher.cc",
-    "shell/window_type_launcher.h",
   ]
 
   deps = [
diff --git a/ash/mus/top_level_window_factory.cc b/ash/mus/top_level_window_factory.cc
index 0a92119..7fa50bd 100644
--- a/ash/mus/top_level_window_factory.cc
+++ b/ash/mus/top_level_window_factory.cc
@@ -187,9 +187,7 @@
                   .bounds()
                   .OffsetFromOrigin();
     gfx::Rect bounds_in_screen(origin, bounds.size());
-    ash::wm::GetDefaultParent(WmWindow::Get(window), bounds_in_screen)
-        ->aura_window()
-        ->AddChild(window);
+    ash::wm::GetDefaultParent(window, bounds_in_screen)->AddChild(window);
   }
   return window;
 }
diff --git a/ash/mus/window_manager.cc b/ash/mus/window_manager.cc
index a8e3e2d5..003dc5d 100644
--- a/ash/mus/window_manager.cc
+++ b/ash/mus/window_manager.cc
@@ -356,12 +356,11 @@
   if (type != ui::MODAL_TYPE_SYSTEM && old_type != ui::MODAL_TYPE_SYSTEM)
     return;
 
-  WmWindow* new_parent =
-      wm::GetDefaultParent(WmWindow::Get(window), window->bounds());
+  aura::Window* new_parent = wm::GetDefaultParent(window, window->bounds());
   DCHECK(new_parent);
   if (window->parent())
     window->parent()->RemoveChild(window);
-  new_parent->aura_window()->AddChild(window);
+  new_parent->AddChild(window);
 }
 
 void WindowManager::OnWmSetCanFocus(aura::Window* window, bool can_focus) {
diff --git a/ash/root_window_controller.cc b/ash/root_window_controller.cc
index eded7406..84c9912 100644
--- a/ash/root_window_controller.cc
+++ b/ash/root_window_controller.cc
@@ -389,9 +389,10 @@
 RootWindowController::GetSystemModalLayoutManager(WmWindow* window) {
   WmWindow* modal_container = nullptr;
   if (window) {
-    WmWindow* window_container = wm::GetContainerForWindow(window);
-    if (window_container && window_container->aura_window()->id() >=
-                                kShellWindowId_LockScreenContainer) {
+    aura::Window* window_container =
+        wm::GetContainerForWindow(window->aura_window());
+    if (window_container &&
+        window_container->id() >= kShellWindowId_LockScreenContainer) {
       modal_container = GetWmContainer(kShellWindowId_LockSystemModalContainer);
     } else {
       modal_container = GetWmContainer(kShellWindowId_SystemModalContainer);
diff --git a/ash/shell.cc b/ash/shell.cc
index 3a2b370..a58793a 100644
--- a/ash/shell.cc
+++ b/ash/shell.cc
@@ -957,7 +957,9 @@
   toplevel_window_event_handler_ =
       base::MakeUnique<ToplevelWindowEventHandler>();
 
-  if (config != Config::MASH) {
+  // TODO: get working in Config::MUS. This uses InputDeviceManager, which is
+  // not created in mus. http://crbug.com/712290.
+  if (config == Config::CLASSIC) {
     system_gesture_filter_.reset(new SystemGestureEventFilter);
     AddPreTargetHandler(system_gesture_filter_.get());
   }
@@ -1051,7 +1053,9 @@
 
   // Needs to be created after InitDisplays() since it may cause the virtual
   // keyboard to be deployed.
-  if (config != Config::MASH)
+  // TODO: get working in Config::MUS. This uses InputDeviceManager, which is
+  // not created in mus. http://crbug.com/712290.
+  if (config == Config::CLASSIC)
     virtual_keyboard_controller_.reset(new VirtualKeyboardController);
 
   audio_a11y_controller_.reset(new chromeos::AudioA11yController);
diff --git a/ash/shell/content/client/shell_browser_main_parts.cc b/ash/shell/content/client/shell_browser_main_parts.cc
index 34878340..e3ec2f4 100644
--- a/ash/shell/content/client/shell_browser_main_parts.cc
+++ b/ash/shell/content/client/shell_browser_main_parts.cc
@@ -11,6 +11,7 @@
 #include "ash/shell/example_app_list_presenter.h"
 #include "ash/shell/example_session_controller_client.h"
 #include "ash/shell/shell_delegate_impl.h"
+#include "ash/shell/window_type_launcher.h"
 #include "ash/shell/window_watcher.h"
 #include "ash/shell_init_params.h"
 #include "base/bind.h"
@@ -39,6 +40,7 @@
 #include "ui/compositor/compositor.h"
 #include "ui/display/screen.h"
 #include "ui/message_center/message_center.h"
+#include "ui/views/examples/examples_window_with_content.h"
 #include "ui/views/test/test_views_delegate.h"
 #include "ui/wm/core/wm_state.h"
 
@@ -48,7 +50,6 @@
 
 namespace ash {
 namespace shell {
-void InitWindowTypeLauncher();
 
 namespace {
 
@@ -142,7 +143,10 @@
   window_watcher_.reset(new ash::shell::WindowWatcher);
   display::Screen::GetScreen()->AddObserver(window_watcher_.get());
 
-  ash::shell::InitWindowTypeLauncher();
+  ash::shell::InitWindowTypeLauncher(base::Bind(
+      &views::examples::ShowExamplesWindowWithContent,
+      views::examples::DO_NOTHING_ON_CLOSE,
+      ShellContentState::GetInstance()->GetActiveBrowserContext(), nullptr));
 
   // Initialize the example app list presenter.
   example_app_list_presenter_ = base::MakeUnique<ExampleAppListPresenter>();
diff --git a/ash/shell/window_type_launcher.cc b/ash/shell/window_type_launcher.cc
index 0d1da32..564d0d11 100644
--- a/ash/shell/window_type_launcher.cc
+++ b/ash/shell/window_type_launcher.cc
@@ -6,7 +6,6 @@
 
 #include <utility>
 
-#include "ash/content/shell_content_state.h"
 #include "ash/public/cpp/shell_window_ids.h"
 #include "ash/root_window_controller.h"
 #include "ash/session/session_controller.h"
@@ -27,7 +26,6 @@
 #include "ui/views/controls/button/md_text_button.h"
 #include "ui/views/controls/menu/menu_item_view.h"
 #include "ui/views/controls/menu/menu_runner.h"
-#include "ui/views/examples/examples_window_with_content.h"
 #include "ui/views/layout/grid_layout.h"
 #include "ui/views/widget/widget.h"
 #include "ui/wm/core/shadow_types.h"
@@ -159,17 +157,18 @@
 
 }  // namespace
 
-void InitWindowTypeLauncher() {
+void InitWindowTypeLauncher(const base::Closure& show_views_examples_callback) {
   views::Widget* widget = views::Widget::CreateWindowWithContextAndBounds(
-      new WindowTypeLauncher, Shell::GetPrimaryRootWindow(),
-      gfx::Rect(120, 150, 300, 410));
+      new WindowTypeLauncher(show_views_examples_callback),
+      Shell::GetPrimaryRootWindow(), gfx::Rect(120, 150, 300, 410));
   widget->GetNativeView()->SetName("WindowTypeLauncher");
   ::wm::SetShadowElevation(widget->GetNativeView(),
                            ::wm::ShadowElevation::MEDIUM);
   widget->Show();
 }
 
-WindowTypeLauncher::WindowTypeLauncher()
+WindowTypeLauncher::WindowTypeLauncher(
+    const base::Closure& show_views_examples_callback)
     : create_button_(
           MdTextButton::Create(this, base::ASCIIToUTF16("Create Window"))),
       panel_button_(
@@ -204,7 +203,8 @@
           MdTextButton::Create(this, base::ASCIIToUTF16("Show/Hide a Window"))),
       show_web_notification_(MdTextButton::Create(
           this,
-          base::ASCIIToUTF16("Show a web/app notification"))) {
+          base::ASCIIToUTF16("Show a web/app notification"))),
+      show_views_examples_callback_(show_views_examples_callback) {
   views::GridLayout* layout = new views::GridLayout(this);
   layout->SetInsets(5, 5, 5, 5);
   SetLayoutManager(layout);
@@ -300,16 +300,14 @@
         ->message_center()
         ->AddNotification(std::move(notification));
   } else if (sender == examples_button_) {
-    views::examples::ShowExamplesWindowWithContent(
-        views::examples::DO_NOTHING_ON_CLOSE,
-        ShellContentState::GetInstance()->GetActiveBrowserContext(), NULL);
+    show_views_examples_callback_.Run();
   }
 }
 
 void WindowTypeLauncher::ExecuteCommand(int id, int event_flags) {
   switch (id) {
     case COMMAND_NEW_WINDOW:
-      InitWindowTypeLauncher();
+      InitWindowTypeLauncher(show_views_examples_callback_);
       break;
     case COMMAND_TOGGLE_FULLSCREEN:
       GetWidget()->SetFullscreen(!GetWidget()->IsFullscreen());
diff --git a/ash/shell/window_type_launcher.h b/ash/shell/window_type_launcher.h
index 2a32b4c..1c93364e 100644
--- a/ash/shell/window_type_launcher.h
+++ b/ash/shell/window_type_launcher.h
@@ -7,6 +7,7 @@
 
 #include <memory>
 
+#include "base/callback_forward.h"
 #include "base/macros.h"
 #include "ui/views/context_menu_controller.h"
 #include "ui/views/controls/button/button.h"
@@ -20,6 +21,12 @@
 namespace ash {
 namespace shell {
 
+// Creates a Widget to host WindowTypeLauncher. |show_views_examples_callback|
+// is Run() when the user clicks on the views examples button. This should
+// be bound to either views::examples::ShowExamplesWindow() or
+// views::examples::ShowExamplesWindowWithContent().
+void InitWindowTypeLauncher(const base::Closure& show_views_examples_callback);
+
 // The contents view/delegate of a window that shows some buttons that create
 // various window types.
 class WindowTypeLauncher : public views::WidgetDelegateView,
@@ -27,7 +34,8 @@
                            public views::MenuDelegate,
                            public views::ContextMenuController {
  public:
-  WindowTypeLauncher();
+  explicit WindowTypeLauncher(
+      const base::Closure& show_views_examples_callback);
   ~WindowTypeLauncher() override;
 
  private:
@@ -73,6 +81,7 @@
   views::Button* show_hide_window_button_;
   views::Button* show_web_notification_;
   std::unique_ptr<views::MenuRunner> menu_runner_;
+  base::Closure show_views_examples_callback_;
 
   DISALLOW_COPY_AND_ASSIGN(WindowTypeLauncher);
 };
diff --git a/ash/system/ime_menu/ime_list_view.cc b/ash/system/ime_menu/ime_list_view.cc
index 9833811..334b42e 100644
--- a/ash/system/ime_menu/ime_list_view.cc
+++ b/ash/system/ime_menu/ime_list_view.cc
@@ -119,8 +119,9 @@
   void GetAccessibleNodeData(ui::AXNodeData* node_data) override {
     ActionableView::GetAccessibleNodeData(node_data);
     node_data->role = ui::AX_ROLE_CHECK_BOX;
-    node_data->AddStateFlag(selected_ ? ui::AX_STATE_CHECKED
-                                      : ui::AX_STATE_NONE);
+    const ui::AXCheckedState checked_state =
+        selected_ ? ui::AX_CHECKED_STATE_TRUE : ui::AX_CHECKED_STATE_FALSE;
+    node_data->AddIntAttribute(ui::AX_ATTR_CHECKED_STATE, checked_state);
   }
 
  private:
diff --git a/ash/system/ime_menu/ime_menu_tray.cc b/ash/system/ime_menu/ime_menu_tray.cc
index d8ba180..daa09b1 100644
--- a/ash/system/ime_menu/ime_menu_tray.cc
+++ b/ash/system/ime_menu/ime_menu_tray.cc
@@ -98,7 +98,12 @@
 
 class ImeMenuLabel : public views::Label {
  public:
-  ImeMenuLabel() {}
+  ImeMenuLabel() {
+    // Sometimes the label will be more than 2 characters, e.g. INTL and EXTD.
+    // This border makes sure we only leave room for ~2 and the others are
+    // truncated.
+    SetBorder(views::CreateEmptyBorder(gfx::Insets(0, 6)));
+  }
   ~ImeMenuLabel() override {}
 
   // views:Label:
@@ -281,6 +286,7 @@
       show_bubble_after_keyboard_hidden_(false) {
   SetInkDropMode(InkDropMode::ON);
   SetupLabelForTray(label_);
+  label_->SetElideBehavior(gfx::TRUNCATE);
   tray_container()->AddChildView(label_);
   SystemTrayNotifier* tray_notifier = Shell::Get()->system_tray_notifier();
   tray_notifier->AddIMEObserver(this);
diff --git a/ash/system/ime_menu/ime_menu_tray_unittest.cc b/ash/system/ime_menu/ime_menu_tray_unittest.cc
index 87f1448..5de04e8 100644
--- a/ash/system/ime_menu/ime_menu_tray_unittest.cc
+++ b/ash/system/ime_menu/ime_menu_tray_unittest.cc
@@ -72,7 +72,9 @@
       ui::AXNodeData node_data;
       node_data.state = 0;
       ime.first->GetAccessibleNodeData(&node_data);
-      if (node_data.HasStateFlag(ui::AX_STATE_CHECKED)) {
+      const auto checked_state = static_cast<ui::AXCheckedState>(
+          node_data.GetIntAttribute(ui::AX_ATTR_CHECKED_STATE));
+      if (checked_state == ui::AX_CHECKED_STATE_TRUE) {
         if (ime.second != expected_current_ime.id)
           return false;
       }
diff --git a/ash/system/tray/hover_highlight_view.cc b/ash/system/tray/hover_highlight_view.cc
index a89c996d..50ce0bc1 100644
--- a/ash/system/tray/hover_highlight_view.cc
+++ b/ash/system/tray/hover_highlight_view.cc
@@ -213,13 +213,18 @@
 void HoverHighlightView::GetAccessibleNodeData(ui::AXNodeData* node_data) {
   ActionableView::GetAccessibleNodeData(node_data);
 
-  if (accessibility_state_ == AccessibilityState::CHECKED_CHECKBOX ||
-      accessibility_state_ == AccessibilityState::UNCHECKED_CHECKBOX) {
-    node_data->role = ui::AX_ROLE_CHECK_BOX;
-  }
+  ui::AXCheckedState checked_state;
 
   if (accessibility_state_ == AccessibilityState::CHECKED_CHECKBOX)
-    node_data->AddStateFlag(ui::AX_STATE_CHECKED);
+    checked_state = ui::AX_CHECKED_STATE_TRUE;
+  else if (accessibility_state_ == AccessibilityState::UNCHECKED_CHECKBOX)
+    checked_state = ui::AX_CHECKED_STATE_FALSE;
+  else
+    return;  // Not a checkbox
+
+  // Checkbox
+  node_data->role = ui::AX_ROLE_CHECK_BOX;
+  node_data->AddIntAttribute(ui::AX_ATTR_CHECKED_STATE, checked_state);
 }
 
 gfx::Size HoverHighlightView::GetPreferredSize() const {
diff --git a/ash/system/tray/system_tray.cc b/ash/system/tray/system_tray.cc
index 6f6892a..d6a15e8 100644
--- a/ash/system/tray/system_tray.cc
+++ b/ash/system/tray/system_tray.cc
@@ -178,9 +178,7 @@
     if (!tray_->HasSystemBubble() || !gained_active)
       return;
 
-    WmWindow* wm_gained_active = WmWindow::Get(gained_active);
-    int container_id =
-        wm::GetContainerForWindow(wm_gained_active)->aura_window()->id();
+    int container_id = wm::GetContainerForWindow(gained_active)->id();
 
     // Don't close the bubble if a popup notification is activated.
     if (container_id == kShellWindowId_StatusContainer)
diff --git a/ash/system/tray/tray_event_filter.cc b/ash/system/tray/tray_event_filter.cc
index df42c1b..f537d77 100644
--- a/ash/system/tray/tray_event_filter.cc
+++ b/ash/system/tray/tray_event_filter.cc
@@ -9,7 +9,6 @@
 #include "ash/system/tray/tray_background_view.h"
 #include "ash/system/tray/tray_bubble_wrapper.h"
 #include "ash/wm/container_finder.h"
-#include "ash/wm_window.h"
 #include "ui/aura/window.h"
 #include "ui/views/widget/widget.h"
 
@@ -47,8 +46,8 @@
 void TrayEventFilter::ProcessPressedEvent(const gfx::Point& location_in_screen,
                                           views::Widget* target) {
   if (target) {
-    WmWindow* window = WmWindow::Get(target->GetNativeWindow());
-    int container_id = wm::GetContainerForWindow(window)->aura_window()->id();
+    aura::Window* window = target->GetNativeWindow();
+    int container_id = wm::GetContainerForWindow(window)->id();
     // Don't process events that occurred inside an embedded menu, for example
     // the right-click menu in a popup notification.
     if (container_id == kShellWindowId_MenuContainer)
@@ -56,7 +55,7 @@
     // Don't process events that occurred inside a popup notification
     // from message center.
     if (container_id == kShellWindowId_StatusContainer &&
-        window->GetType() == ui::wm::WINDOW_TYPE_POPUP &&
+        window->type() == ui::wm::WINDOW_TYPE_POPUP &&
         target->IsAlwaysOnTop()) {
       return;
     }
diff --git a/ash/wm/container_finder.cc b/ash/wm/container_finder.cc
index 1371655..3b4a99c 100644
--- a/ash/wm/container_finder.cc
+++ b/ash/wm/container_finder.cc
@@ -13,65 +13,72 @@
 #include "ash/wm/root_window_finder.h"
 #include "ash/wm/window_state.h"
 #include "ash/wm_window.h"
+#include "ui/aura/client/aura_constants.h"
 #include "ui/aura/window.h"
 #include "ui/gfx/geometry/rect.h"
+#include "ui/wm/core/window_util.h"
 
 namespace ash {
 namespace wm {
 namespace {
 
-WmWindow* FindContainerRoot(const gfx::Rect& bounds) {
+aura::Window* FindContainerRoot(const gfx::Rect& bounds) {
   if (bounds == gfx::Rect())
-    return Shell::GetWmRootWindowForNewWindows();
-  return GetRootWindowMatching(bounds);
+    return Shell::GetRootWindowForNewWindows();
+  WmWindow* root = GetRootWindowMatching(bounds);
+  return root ? root->aura_window() : nullptr;
 }
 
-bool HasTransientParentWindow(const WmWindow* window) {
-  return window->GetTransientParent() &&
-         window->GetTransientParent()->GetType() != ui::wm::WINDOW_TYPE_UNKNOWN;
+bool HasTransientParentWindow(const aura::Window* window) {
+  const aura::Window* transient_parent = ::wm::GetTransientParent(window);
+  return transient_parent &&
+         transient_parent->type() != ui::wm::WINDOW_TYPE_UNKNOWN;
 }
 
-WmWindow* GetSystemModalContainer(WmWindow* root, WmWindow* window) {
-  DCHECK(window->IsSystemModal());
+aura::Window* GetSystemModalContainer(aura::Window* root,
+                                      aura::Window* window) {
+  aura::Window* transient_parent = ::wm::GetTransientParent(window);
+  DCHECK_EQ(ui::MODAL_TYPE_SYSTEM,
+            window->GetProperty(aura::client::kModalKey));
 
   // If screen lock is not active and user session is active,
   // all modal windows are placed into the normal modal container.
   // In case of missing transient parent (it could happen for alerts from
   // background pages) assume that the window belongs to user session.
   if (!Shell::Get()->session_controller()->IsUserSessionBlocked() ||
-      !window->GetTransientParent()) {
-    return root->GetChildByShellWindowId(kShellWindowId_SystemModalContainer);
+      !transient_parent) {
+    return root->GetChildById(kShellWindowId_SystemModalContainer);
   }
 
   // Otherwise those that originate from LockScreen container and above are
   // placed in the screen lock modal container.
-  int window_container_id =
-      window->GetTransientParent()->GetParent()->aura_window()->id();
+  int window_container_id = transient_parent->parent()->id();
   if (window_container_id < kShellWindowId_LockScreenContainer)
-    return root->GetChildByShellWindowId(kShellWindowId_SystemModalContainer);
-  return root->GetChildByShellWindowId(kShellWindowId_LockSystemModalContainer);
+    return root->GetChildById(kShellWindowId_SystemModalContainer);
+  return root->GetChildById(kShellWindowId_LockSystemModalContainer);
 }
 
-WmWindow* GetContainerFromAlwaysOnTopController(WmWindow* root,
-                                                WmWindow* window) {
-  return root->GetRootWindowController()
-      ->always_on_top_controller()
-      ->GetContainer(window);
+aura::Window* GetContainerFromAlwaysOnTopController(aura::Window* root,
+                                                    aura::Window* window) {
+  WmWindow* result = RootWindowController::ForWindow(root)
+                         ->always_on_top_controller()
+                         ->GetContainer(WmWindow::Get(window));
+  return result ? result->aura_window() : nullptr;
 }
 
 }  // namespace
 
-WmWindow* GetContainerForWindow(WmWindow* window) {
-  WmWindow* parent = window->GetParent();
+aura::Window* GetContainerForWindow(aura::Window* window) {
+  aura::Window* parent = window->parent();
   // The first parent with an explicit shell window ID is the container.
-  while (parent && parent->aura_window()->id() == kShellWindowId_Invalid)
-    parent = parent->GetParent();
+  while (parent && parent->id() == kShellWindowId_Invalid)
+    parent = parent->parent();
   return parent;
 }
 
-WmWindow* GetDefaultParent(WmWindow* window, const gfx::Rect& bounds) {
-  WmWindow* target_root = nullptr;
-  WmWindow* transient_parent = window->GetTransientParent();
+aura::Window* GetDefaultParent(aura::Window* window, const gfx::Rect& bounds) {
+  aura::Window* target_root = nullptr;
+  aura::Window* transient_parent = ::wm::GetTransientParent(window);
   if (transient_parent) {
     // Transient window should use the same root as its transient parent.
     target_root = transient_parent->GetRootWindow();
@@ -79,30 +86,29 @@
     target_root = FindContainerRoot(bounds);
   }
 
-  switch (window->GetType()) {
+  switch (window->type()) {
     case ui::wm::WINDOW_TYPE_NORMAL:
     case ui::wm::WINDOW_TYPE_POPUP:
-      if (window->IsSystemModal())
+      if (window->GetProperty(aura::client::kModalKey) == ui::MODAL_TYPE_SYSTEM)
         return GetSystemModalContainer(target_root, window);
       if (HasTransientParentWindow(window))
-        return GetContainerForWindow(window->GetTransientParent());
+        return GetContainerForWindow(transient_parent);
       return GetContainerFromAlwaysOnTopController(target_root, window);
     case ui::wm::WINDOW_TYPE_CONTROL:
-      return target_root->GetChildByShellWindowId(
+      return target_root->GetChildById(
           kShellWindowId_UnparentedControlContainer);
     case ui::wm::WINDOW_TYPE_PANEL:
-      if (window->aura_window()->GetProperty(kPanelAttachedKey))
-        return target_root->GetChildByShellWindowId(
-            kShellWindowId_PanelContainer);
+      if (window->GetProperty(kPanelAttachedKey))
+        return target_root->GetChildById(kShellWindowId_PanelContainer);
       return GetContainerFromAlwaysOnTopController(target_root, window);
     case ui::wm::WINDOW_TYPE_MENU:
-      return target_root->GetChildByShellWindowId(kShellWindowId_MenuContainer);
+      return target_root->GetChildById(kShellWindowId_MenuContainer);
     case ui::wm::WINDOW_TYPE_TOOLTIP:
-      return target_root->GetChildByShellWindowId(
+      return target_root->GetChildById(
           kShellWindowId_DragImageAndTooltipContainer);
     default:
-      NOTREACHED() << "Window " << window->aura_window()->id()
-                   << " has unhandled type " << window->GetType();
+      NOTREACHED() << "Window " << window->id() << " has unhandled type "
+                   << window->type();
       break;
   }
   return nullptr;
diff --git a/ash/wm/container_finder.h b/ash/wm/container_finder.h
index 4d0f0e5..f7d0c93 100644
--- a/ash/wm/container_finder.h
+++ b/ash/wm/container_finder.h
@@ -18,18 +18,15 @@
 }
 
 namespace ash {
-
-class WmWindow;
-
 namespace wm {
 
 // Returns the first ancestor of |window| that has a known container ID.
-ASH_EXPORT WmWindow* GetContainerForWindow(WmWindow* window);
+ASH_EXPORT aura::Window* GetContainerForWindow(aura::Window* window);
 
 // Returns the parent to add |window| to. This is generally used when a window
 // is moved from one root to another.
-ASH_EXPORT WmWindow* GetDefaultParent(WmWindow* window,
-                                      const gfx::Rect& bounds);
+ASH_EXPORT aura::Window* GetDefaultParent(aura::Window* window,
+                                          const gfx::Rect& bounds);
 
 // Returns the list of containers that match |container_id| in all root windows.
 // If |priority_root| is non-null, the container in |priority_root| is placed at
diff --git a/ash/wm/container_finder_unittest.cc b/ash/wm/container_finder_unittest.cc
index 44b8261..36c2f8e 100644
--- a/ash/wm/container_finder_unittest.cc
+++ b/ash/wm/container_finder_unittest.cc
@@ -7,29 +7,28 @@
 #include <memory>
 
 #include "ash/public/cpp/shell_window_ids.h"
-#include "ash/test/ash_test.h"
-#include "ash/wm_window.h"
+#include "ash/test/ash_test_base.h"
 #include "ui/aura/window.h"
 #include "ui/gfx/geometry/rect.h"
 #include "ui/views/widget/widget.h"
 
 namespace ash {
 
-using ContainerFinderTest = AshTest;
+using ContainerFinderTest = test::AshTestBase;
 
 TEST_F(ContainerFinderTest, GetContainerForWindow) {
   // Create a normal widget in the default container.
-  std::unique_ptr<views::Widget> widget =
-      CreateTestWidget(gfx::Rect(1, 2, 3, 4));
+  std::unique_ptr<views::Widget> widget = CreateTestWidget(
+      nullptr, kShellWindowId_DefaultContainer, gfx::Rect(1, 2, 3, 4));
   aura::Window* window = widget->GetNativeWindow();
 
   // The window itself is not a container.
   EXPECT_EQ(kShellWindowId_Invalid, window->id());
 
   // Container lookup finds the default container.
-  WmWindow* container = wm::GetContainerForWindow(WmWindow::Get(window));
+  aura::Window* container = wm::GetContainerForWindow(window);
   ASSERT_TRUE(container);
-  EXPECT_EQ(kShellWindowId_DefaultContainer, container->aura_window()->id());
+  EXPECT_EQ(kShellWindowId_DefaultContainer, container->id());
 }
 
 }  // namespace ash
diff --git a/ash/wm/stacking_controller.cc b/ash/wm/stacking_controller.cc
index 6dfa608..27c8a562 100644
--- a/ash/wm/stacking_controller.cc
+++ b/ash/wm/stacking_controller.cc
@@ -5,7 +5,7 @@
 #include "ash/wm/stacking_controller.h"
 
 #include "ash/wm/container_finder.h"
-#include "ash/wm_window.h"
+#include "ui/aura/window.h"
 
 namespace ash {
 
@@ -21,8 +21,7 @@
 
 aura::Window* StackingController::GetDefaultParent(aura::Window* window,
                                                    const gfx::Rect& bounds) {
-  return WmWindow::GetAuraWindow(
-      wm::GetDefaultParent(WmWindow::Get(window), bounds));
+  return wm::GetDefaultParent(window, bounds);
 }
 
 }  // namespace ash
diff --git a/base/BUILD.gn b/base/BUILD.gn
index 7a971d9..78953be 100644
--- a/base/BUILD.gn
+++ b/base/BUILD.gn
@@ -2593,7 +2593,10 @@
       "test/android/javatests/src/org/chromium/base/test/BaseJUnit4ClassRunner.java",
       "test/android/javatests/src/org/chromium/base/test/BaseChromiumAndroidJUnitRunner.java",
       "test/android/javatests/src/org/chromium/base/test/BaseTestResult.java",
+      "test/android/javatests/src/org/chromium/base/test/SetUpTestRule.java",
+      "test/android/javatests/src/org/chromium/base/test/SetUpStatement.java",
       "test/android/javatests/src/org/chromium/base/test/util/AdvancedMockContext.java",
+      "test/android/javatests/src/org/chromium/base/test/util/AnnotationProcessor.java",
       "test/android/javatests/src/org/chromium/base/test/util/CallbackHelper.java",
       "test/android/javatests/src/org/chromium/base/test/util/CommandLineFlags.java",
       "test/android/javatests/src/org/chromium/base/test/util/DisableIf.java",
@@ -2634,6 +2637,7 @@
       "android/junit/src/org/chromium/base/LogTest.java",
       "android/junit/src/org/chromium/base/NonThreadSafeTest.java",
       "android/junit/src/org/chromium/base/PromiseTest.java",
+      "test/android/junit/src/org/chromium/base/test/SetUpStatementTest.java",
       "test/android/junit/src/org/chromium/base/test/util/DisableIfTest.java",
       "test/android/junit/src/org/chromium/base/test/util/MinAndroidSdkLevelSkipCheckTest.java",
       "test/android/junit/src/org/chromium/base/test/util/RestrictionSkipCheckTest.java",
diff --git a/base/android/java/src/org/chromium/base/PathUtils.java b/base/android/java/src/org/chromium/base/PathUtils.java
index 00977d5..1cadb25 100644
--- a/base/android/java/src/org/chromium/base/PathUtils.java
+++ b/base/android/java/src/org/chromium/base/PathUtils.java
@@ -25,12 +25,14 @@
 @MainDex
 public abstract class PathUtils {
     private static final String THUMBNAIL_DIRECTORY_NAME = "textures";
+    private static final String DOWNLOAD_INTERNAL_DIRECTORY_NAME = "download_internal";
 
     private static final int DATA_DIRECTORY = 0;
     private static final int THUMBNAIL_DIRECTORY = 1;
     private static final int DATABASE_DIRECTORY = 2;
     private static final int CACHE_DIRECTORY = 3;
-    private static final int NUM_DIRECTORIES = 4;
+    private static final int DOWNLOAD_INTERNAL_DIRECTORY = 4;
+    private static final int NUM_DIRECTORIES = 5;
     private static final AtomicBoolean sInitializationStarted = new AtomicBoolean();
     private static AsyncTask<Void, Void, String[]> sDirPathFetchTask;
 
@@ -102,6 +104,8 @@
                 sDataDirectorySuffix, Context.MODE_PRIVATE).getPath();
         paths[THUMBNAIL_DIRECTORY] = appContext.getDir(
                 THUMBNAIL_DIRECTORY_NAME, Context.MODE_PRIVATE).getPath();
+        paths[DOWNLOAD_INTERNAL_DIRECTORY] =
+                appContext.getDir(DOWNLOAD_INTERNAL_DIRECTORY_NAME, Context.MODE_PRIVATE).getPath();
         paths[DATABASE_DIRECTORY] = appContext.getDatabasePath("foo").getParent();
         if (appContext.getCacheDir() != null) {
             paths[CACHE_DIRECTORY] = appContext.getCacheDir().getPath();
@@ -177,6 +181,12 @@
         return getDirectoryPath(THUMBNAIL_DIRECTORY);
     }
 
+    @CalledByNative
+    public static String getDownloadInternalDirectory() {
+        assert sDirPathFetchTask != null : "setDataDirectorySuffix must be called first.";
+        return getDirectoryPath(DOWNLOAD_INTERNAL_DIRECTORY);
+    }
+
     /**
      * @return the public downloads directory.
      */
diff --git a/base/android/path_utils.cc b/base/android/path_utils.cc
index 89ab833..c4aa4198 100644
--- a/base/android/path_utils.cc
+++ b/base/android/path_utils.cc
@@ -48,6 +48,15 @@
   return true;
 }
 
+bool GetDownloadInternalDirectory(FilePath* result) {
+  JNIEnv* env = AttachCurrentThread();
+  ScopedJavaLocalRef<jstring> path =
+      Java_PathUtils_getDownloadInternalDirectory(env);
+  FilePath download_internal_path(ConvertJavaStringToUTF8(path));
+  *result = download_internal_path;
+  return true;
+}
+
 bool GetDownloadsDirectory(FilePath* result) {
   JNIEnv* env = AttachCurrentThread();
   ScopedJavaLocalRef<jstring> path = Java_PathUtils_getDownloadsDirectory(env);
diff --git a/base/android/path_utils.h b/base/android/path_utils.h
index 7402644..4fbc0c3 100644
--- a/base/android/path_utils.h
+++ b/base/android/path_utils.h
@@ -35,6 +35,10 @@
 // in the FilePath pointed to by 'result'.
 BASE_EXPORT bool GetThumbnailCacheDirectory(FilePath* result);
 
+// Retrieves the path to the downloads internal directory. The result is placed
+// in the FilePath pointed to by 'result'.
+BASE_EXPORT bool GetDownloadInternalDirectory(FilePath* result);
+
 // Retrieves the path to the public downloads directory. The result is placed
 // in the FilePath pointed to by 'result'.
 BASE_EXPORT bool GetDownloadsDirectory(FilePath* result);
diff --git a/base/test/android/javatests/src/org/chromium/base/test/SetUpStatement.java b/base/test/android/javatests/src/org/chromium/base/test/SetUpStatement.java
new file mode 100644
index 0000000..30ac2b6
--- /dev/null
+++ b/base/test/android/javatests/src/org/chromium/base/test/SetUpStatement.java
@@ -0,0 +1,35 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+package org.chromium.base.test;
+
+import org.junit.rules.TestRule;
+import org.junit.runners.model.Statement;
+
+/**
+ * Custom Statement for SetUpTestRules.
+ *
+ * Calls {@link SetUpTestRule#setUp} before evaluating {@link SetUpTestRule#base} if
+ * {@link SetUpTestRule#shouldSetUp} is true
+ */
+public class SetUpStatement extends Statement {
+    private final Statement mBase;
+    private final SetUpTestRule<? extends TestRule> mSetUpTestRule;
+    private final boolean mShouldSetUp;
+
+    public SetUpStatement(
+            final Statement base, SetUpTestRule<? extends TestRule> callback, boolean shouldSetUp) {
+        mBase = base;
+        mSetUpTestRule = callback;
+        mShouldSetUp = shouldSetUp;
+    }
+
+    @Override
+    public void evaluate() throws Throwable {
+        if (mShouldSetUp) {
+            mSetUpTestRule.setUp();
+        }
+        mBase.evaluate();
+    }
+}
diff --git a/base/test/android/javatests/src/org/chromium/base/test/SetUpTestRule.java b/base/test/android/javatests/src/org/chromium/base/test/SetUpTestRule.java
new file mode 100644
index 0000000..57dd8db5
--- /dev/null
+++ b/base/test/android/javatests/src/org/chromium/base/test/SetUpTestRule.java
@@ -0,0 +1,35 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+package org.chromium.base.test;
+
+import org.junit.rules.TestRule;
+
+/**
+ * An interface for TestRules that can be configured to automatically run set-up logic prior
+ * to &#064;Before.
+ *
+ * TestRules that implement this interface should return a {@link SetUpStatement} from their {@link
+ * TestRule#apply} method
+ *
+ * @param <T> TestRule type that implements this SetUpTestRule
+ */
+public interface SetUpTestRule<T extends TestRule> {
+    /**
+     * Set whether the TestRule should run setUp automatically.
+     *
+     * So TestRule can be declared in test like this:
+     * <code>
+     * &#064;Rule TestRule mRule = new MySetUpTestRule().shouldSetUp(true);
+     * </code>
+     *
+     * @return itself to chain up the calls for convenience
+     */
+    T shouldSetUp(boolean runSetUp);
+
+    /**
+     * Specify setUp action in this method
+     */
+    void setUp();
+}
diff --git a/base/test/android/javatests/src/org/chromium/base/test/util/AnnotationProcessor.java b/base/test/android/javatests/src/org/chromium/base/test/util/AnnotationProcessor.java
new file mode 100644
index 0000000..191af003
--- /dev/null
+++ b/base/test/android/javatests/src/org/chromium/base/test/util/AnnotationProcessor.java
@@ -0,0 +1,74 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+package org.chromium.base.test.util;
+
+import org.junit.rules.ExternalResource;
+import org.junit.runner.Description;
+import org.junit.runners.model.Statement;
+
+import java.lang.annotation.Annotation;
+
+/**
+ * Test rule that is activated when a test has a specific annotation. It allows to run some code
+ * before the test (and the {@link org.junit.Before}) runs, and guarantees to also run code after.
+ *
+ * Usage:
+ *
+ * <pre>
+ * public class Test {
+ *    &#64;Rule
+ *    public AnnotationProcessor<Foo> rule = new AnnotationProcessor(Foo.class) {
+ *          &#64;Override
+ *          protected void before() { ... }
+ *
+ *          &#64;Override
+ *          protected void after() { ... }
+ *    };
+ *
+ *    &#64;Test
+ *    &#64;Foo
+ *    public void myTest() { ... }
+ * }
+ * </pre>
+ *
+ * @param <T> type of the annotation to match on the test case.
+ */
+public abstract class AnnotationProcessor<T extends Annotation> extends ExternalResource {
+    private final Class<T> mAnnotationClass;
+    private Description mTestDescription;
+    private T mAnnotation;
+
+    public AnnotationProcessor(Class<T> annotationClass) {
+        mAnnotationClass = annotationClass;
+    }
+
+    @Override
+    public Statement apply(Statement base, Description description) {
+        mTestDescription = description;
+        mAnnotation = getAnnotation(description);
+        if (mAnnotation == null) return base;
+
+        // Return the wrapped statement to execute before() and after().
+        return super.apply(base, description);
+    }
+
+    /** @return {@link Description} of the current test. */
+    protected Description getTestDescription() {
+        return mTestDescription;
+    }
+
+    /** @return the annotation that caused the test to be processed. */
+    protected T getAnnotation() {
+        return mAnnotation;
+    }
+
+    private T getAnnotation(Description description) {
+        T annotation = description.getAnnotation(mAnnotationClass);
+        if (annotation != null) return annotation;
+
+        annotation = description.getTestClass().getAnnotation(mAnnotationClass);
+        return annotation;
+    }
+}
diff --git a/base/test/android/junit/src/org/chromium/base/test/SetUpStatementTest.java b/base/test/android/junit/src/org/chromium/base/test/SetUpStatementTest.java
new file mode 100644
index 0000000..722bd1a
--- /dev/null
+++ b/base/test/android/junit/src/org/chromium/base/test/SetUpStatementTest.java
@@ -0,0 +1,64 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+package org.chromium.base.test;
+
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.rules.TestRule;
+import org.junit.runner.RunWith;
+import org.junit.runners.BlockJUnit4ClassRunner;
+import org.junit.runners.model.Statement;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Test SetUpStatement is working as intended with SetUpTestRule.
+ */
+@RunWith(BlockJUnit4ClassRunner.class)
+public class SetUpStatementTest {
+    private Statement mBase;
+    private SetUpTestRule<TestRule> mRule;
+    private List<Integer> mList;
+
+    @Before
+    public void setUp() {
+        mBase = new Statement() {
+            @Override
+            public void evaluate() {
+                mList.add(1);
+            }
+        };
+        mList = new ArrayList<>();
+        mRule = new SetUpTestRule<TestRule>() {
+            @Override
+            public void setUp() {
+                mList.add(0);
+            }
+
+            @Override
+            public TestRule shouldSetUp(boolean toSetUp) {
+                return null;
+            }
+        };
+    }
+
+    @Test
+    public void testSetUpStatementShouldSetUp() throws Throwable {
+        SetUpStatement statement = new SetUpStatement(mBase, mRule, true);
+        statement.evaluate();
+        Integer[] expected = {0, 1};
+        Assert.assertArrayEquals(expected, mList.toArray());
+    }
+
+    @Test
+    public void testSetUpStatementShouldNotSetUp() throws Throwable {
+        SetUpStatement statement = new SetUpStatement(mBase, mRule, false);
+        statement.evaluate();
+        Integer[] expected = {1};
+        Assert.assertArrayEquals(expected, mList.toArray());
+    }
+}
diff --git a/build/android/binary_size/apk_downloader.py b/build/android/binary_size/apk_downloader.py
index b90fe5f..dcea458c 100755
--- a/build/android/binary_size/apk_downloader.py
+++ b/build/android/binary_size/apk_downloader.py
@@ -15,7 +15,7 @@
 import find_depot_tools  # pylint: disable=import-error,unused-import
 import download_from_google_storage
 
-CURRENT_MILESTONE = '58'
+CURRENT_MILESTONE = '59'
 DEFAULT_BUCKET = 'gs://chromium-android-tools/apks'
 DEFAULT_DOWNLOAD_PATH = os.path.join(os.path.dirname(__file__), 'apks')
 DEFAULT_BUILDER = 'Android_Builder'
diff --git a/build/android/binary_size/apks/Android_Builder/59/ChromeModernPublic.apk.sha1 b/build/android/binary_size/apks/Android_Builder/59/ChromeModernPublic.apk.sha1
new file mode 100644
index 0000000..2e24ec0
--- /dev/null
+++ b/build/android/binary_size/apks/Android_Builder/59/ChromeModernPublic.apk.sha1
@@ -0,0 +1 @@
+286671da954e55a708481042276d209f769d3af8
\ No newline at end of file
diff --git a/build/android/binary_size/apks/Android_Builder/59/ChromePublic.apk.sha1 b/build/android/binary_size/apks/Android_Builder/59/ChromePublic.apk.sha1
new file mode 100644
index 0000000..4ed75c8c
--- /dev/null
+++ b/build/android/binary_size/apks/Android_Builder/59/ChromePublic.apk.sha1
@@ -0,0 +1 @@
+b7d2c8299b263d33e76b9d845bfea7631cca1fc2
\ No newline at end of file
diff --git a/build/android/binary_size/apks/Android_Builder/59/MonochromePublic.apk.sha1 b/build/android/binary_size/apks/Android_Builder/59/MonochromePublic.apk.sha1
new file mode 100644
index 0000000..caee66c
--- /dev/null
+++ b/build/android/binary_size/apks/Android_Builder/59/MonochromePublic.apk.sha1
@@ -0,0 +1 @@
+e292bd4db30461f755188059a5ca31053b6720b8
\ No newline at end of file
diff --git a/build/android/binary_size/apks/Android_arm64_Builder/59/ChromeModernPublic.apk.sha1 b/build/android/binary_size/apks/Android_arm64_Builder/59/ChromeModernPublic.apk.sha1
new file mode 100644
index 0000000..1026ad71
--- /dev/null
+++ b/build/android/binary_size/apks/Android_arm64_Builder/59/ChromeModernPublic.apk.sha1
@@ -0,0 +1 @@
+62897dbec4761546b9c94e258c99c51dc816c1a9
\ No newline at end of file
diff --git a/build/android/binary_size/apks/Android_arm64_Builder/59/ChromePublic.apk.sha1 b/build/android/binary_size/apks/Android_arm64_Builder/59/ChromePublic.apk.sha1
new file mode 100644
index 0000000..05052bd
--- /dev/null
+++ b/build/android/binary_size/apks/Android_arm64_Builder/59/ChromePublic.apk.sha1
@@ -0,0 +1 @@
+9f2e5aee1ca7d8a88e05587137a0f4859e76296b
\ No newline at end of file
diff --git a/build/android/binary_size/apks/README.md b/build/android/binary_size/apks/README.md
index 474ba93..8bbe635 100644
--- a/build/android/binary_size/apks/README.md
+++ b/build/android/binary_size/apks/README.md
@@ -4,21 +4,24 @@
 latest builds are m59, we want to compare to the commit before the m58 branch
 point).
 
-2. Download and unzip build artifacts from the relevant perf builder. You can
-use this link:
-[https<nolink>://storage.cloud.google.com/chrome-perf/**Android%20Builder**/full-build-linux_**3a87aecc31cd1ffe751dd72c04e5a96a1fc8108a**.zip](https://storage.cloud.google.com/chrome-perf/Android%20Builder/full-build-linux_3a87aecc31cd1ffe751dd72c04e5a96a1fc8108a.zip)
-, replacing the bolded parts with your info OR from the
-"gsutil upload_build_product" step on the bot page (both are Googlers only).
+2. Download and unzip build artifacts from the relevant perf builder.
 
-3. Upload the apk: _upload_to_google_storage.py --bucket
-'chromium-android-tools/apks/**Android_Builder**/**58**'
-**path/to/ApkTarget.apk**_ replacing the bolded parts again.
-  * Note that we use **Android_Builder** instead of **Android Builder** (replace
-spaces with underscores)
+    gsutil.py cp 'gs://chrome-perf/Android Builder/full-build-linux_COMMITHASH.zip' /dest/dir
 
-4. Move the generated .sha1 file to the corresponding place in
-//build/android/binary_size/apks/. In this case, the path would be
-//build/android/binary_size/apks/Android_Builder/58
+3. Unzip. Steps 4, 5, and 6 must be done for MonochromePublic.apk for
+`gs://chrome-perf/Android Builder` and ChromeModernPublic.apk for
+`gs://chrome-perf/Android arm64 Builder` (and can be done for additional APKS,
+but these are the ones used by `build/android/resource_sizes.py`)
 
-5. Commit the added .sha1 files and (optionally) update the `CURRENT_MILESTONE`
+4. Upload the apk (replacing the bolded parts again - note that we use
+**Android_Builder** instead of **Android Builder** (replace spaces with
+underscores):
+
+    upload_to_google_storage.py --bucket 'chromium-android-tools/apks/Android_Builder/58' dest/dir/MonochromePublic.apk
+
+5. Move the generated .sha1 file to the corresponding place in
+`//build/android/binary_size/apks/`. In this case, the path would be
+`//build/android/binary_size/apks/Android_Builder/58`
+
+6. Commit the added .sha1 files and (optionally) update the `CURRENT_MILESTONE`
 in apk_downloader.py
diff --git a/cc/base/resource_id.h b/cc/base/resource_id.h
index 2b25ea5..5ae6189 100644
--- a/cc/base/resource_id.h
+++ b/cc/base/resource_id.h
@@ -6,12 +6,13 @@
 #define CC_BASE_RESOURCE_ID_H_
 
 #include <stdint.h>
-#include <unordered_set>
+
+#include "base/containers/flat_set.h"
 
 namespace cc {
 
 using ResourceId = uint32_t;
-using ResourceIdSet = std::unordered_set<ResourceId>;
+using ResourceIdSet = base::flat_set<ResourceId>;
 
 }  // namespace cc
 
diff --git a/cc/output/gl_renderer.cc b/cc/output/gl_renderer.cc
index 612c315..3446cc7 100644
--- a/cc/output/gl_renderer.cc
+++ b/cc/output/gl_renderer.cc
@@ -1005,6 +1005,11 @@
   if (quad->material != DrawQuad::TILED_CONTENT)
     return nullptr;
 
+  // TODO(chrishtr): support could be added for opacity, but care needs
+  // to be taken to make sure it is correct w.r.t. non-commutative filters etc.
+  if (quad->shared_quad_state->opacity != 1.0f)
+    return nullptr;
+
   const TileDrawQuad* tile_quad = TileDrawQuad::MaterialCast(quad);
   // Hack: this could be supported by passing in a subrectangle to draw
   // render pass, although in practice if there is only one quad there
diff --git a/cc/resources/resource_provider.cc b/cc/resources/resource_provider.cc
index 5275af92d..86fd5ae 100644
--- a/cc/resources/resource_provider.cc
+++ b/cc/resources/resource_provider.cc
@@ -1623,7 +1623,7 @@
     // Don't allocate a texture for a child.
     resource->allocated = true;
     resource->imported_count = 1;
-    child_info.parent_to_child_map[local_id] = it->id;
+    resource->id_in_child = it->id;
     child_info.child_to_parent_map[it->id] = local_id;
   }
 }
@@ -1835,9 +1835,8 @@
     Resource& resource = it->second;
 
     DCHECK(!resource.locked_for_write);
-    DCHECK(child_info->parent_to_child_map.count(local_id));
 
-    ResourceId child_id = child_info->parent_to_child_map[local_id];
+    ResourceId child_id = resource.id_in_child;
     DCHECK(child_info->child_to_parent_map.count(child_id));
 
     bool is_lost = resource.lost ||
@@ -1892,7 +1891,6 @@
       }
     }
 
-    child_info->parent_to_child_map.erase(local_id);
     child_info->child_to_parent_map.erase(child_id);
     resource.imported_count = 0;
     DeleteResourceInternal(it, style);
@@ -1924,8 +1922,7 @@
                                     blocking_main_thread_task_runner_);
 
   if (child_info->marked_for_deletion &&
-      child_info->parent_to_child_map.empty()) {
-    DCHECK(child_info->child_to_parent_map.empty());
+      child_info->child_to_parent_map.empty()) {
     children_.erase(child_it);
   }
 }
diff --git a/cc/resources/resource_provider.h b/cc/resources/resource_provider.h
index c323d42..2ca4ba19 100644
--- a/cc/resources/resource_provider.h
+++ b/cc/resources/resource_provider.h
@@ -619,6 +619,7 @@
     void WaitSyncToken(gpu::gles2::GLES2Interface* gl);
 
     int child_id;
+    ResourceId id_in_child;
     unsigned gl_id;
     // Pixel buffer used for set pixels without unnecessary copying.
     unsigned gl_pixel_buffer_id;
@@ -696,7 +697,6 @@
     ~Child();
 
     ResourceIdMap child_to_parent_map;
-    ResourceIdMap parent_to_child_map;
     ReturnCallback return_callback;
     bool marked_for_deletion;
     bool needs_sync_tokens;
diff --git a/cc/surfaces/surface_aggregator.cc b/cc/surfaces/surface_aggregator.cc
index db1366d..a5e31dd 100644
--- a/cc/surfaces/surface_aggregator.cc
+++ b/cc/surfaces/surface_aggregator.cc
@@ -617,7 +617,7 @@
   }
   CHECK(debug_weak_this.get());
 
-  ResourceIdSet referenced_resources;
+  std::vector<ResourceId> referenced_resources;
   size_t reserve_size = frame.resource_list.size();
   referenced_resources.reserve(reserve_size);
 
@@ -701,7 +701,7 @@
           invalid_frame = true;
           break;
         }
-        referenced_resources.insert(resource_id);
+        referenced_resources.push_back(resource_id);
       }
     }
   }
@@ -711,8 +711,10 @@
   CHECK(debug_weak_this.get());
   valid_surfaces_.insert(surface->surface_id());
 
+  ResourceIdSet resource_set(std::move(referenced_resources),
+                             base::KEEP_FIRST_OF_DUPES);
   if (provider_)
-    provider_->DeclareUsedResourcesFromChild(child_id, referenced_resources);
+    provider_->DeclareUsedResourcesFromChild(child_id, resource_set);
   CHECK(debug_weak_this.get());
 
   gfx::Rect damage_rect;
diff --git a/chrome/android/java/res/color/bottom_nav_tint.xml b/chrome/android/java/res/color/bottom_nav_tint.xml
index 147dff525..b6a20bd4 100644
--- a/chrome/android/java/res/color/bottom_nav_tint.xml
+++ b/chrome/android/java/res/color/bottom_nav_tint.xml
@@ -5,5 +5,5 @@
 -->
 <selector xmlns:android="http://schemas.android.com/apk/res/android">
     <item android:state_checked="true" android:color="@color/google_blue_700" />
-    <item android:color="@color/google_grey_600"/>
+    <item android:color="@color/google_grey_600" />
 </selector>
\ No newline at end of file
diff --git a/chrome/android/java/res/color/bottom_nav_tint_incognito.xml b/chrome/android/java/res/color/bottom_nav_tint_incognito.xml
new file mode 100644
index 0000000..1acb9df
--- /dev/null
+++ b/chrome/android/java/res/color/bottom_nav_tint_incognito.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright 2017 The Chromium Authors. All rights reserved.
+     Use of this source code is governed by a BSD-style license that can be
+     found in the LICENSE file.
+-->
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:state_checked="true" android:color="@android:color/white" />
+    <item android:color="@color/white_alpha_70" />
+</selector>
\ No newline at end of file
diff --git a/chrome/android/java/res/layout/chrome_home_incognito_new_tab_page.xml b/chrome/android/java/res/layout/chrome_home_incognito_new_tab_page.xml
new file mode 100644
index 0000000..346a586
--- /dev/null
+++ b/chrome/android/java/res/layout/chrome_home_incognito_new_tab_page.xml
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright 2017 The Chromium Authors. All rights reserved.
+     Use of this source code is governed by a BSD-style license that can be
+     found in the LICENSE file. -->
+
+<FrameLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:chrome="http://schemas.android.com/apk/res-auto"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:focusable="true"
+    android:focusableInTouchMode="true"
+    android:background="@color/ntp_bg_incognito" >
+
+    <org.chromium.chrome.browser.widget.TintedImageButton
+        android:id="@+id/close_button"
+        android:layout_width="40dp"
+        android:layout_height="40dp"
+        android:layout_gravity="top|end"
+        android:src="@drawable/btn_close"
+        android:scaleType="center"
+        android:background="@android:color/transparent"
+        chrome:tint="@color/light_mode_tint" />
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:orientation="vertical"
+        android:clipChildren="false" >
+
+        <FrameLayout
+            android:layout_width="match_parent"
+            android:layout_height="0dp"
+            android:layout_weight="0.5"
+            android:layout_marginTop="10dp" >
+
+            <ImageView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:contentDescription="@null"
+                android:layout_gravity="center"
+                android:src="@drawable/incognito_splash"/>
+
+        </FrameLayout>
+
+        <!-- This extra empty frame layout is used to ensure the FrameLayout
+             above is half of the parent view's height.  -->
+        <FrameLayout
+            android:layout_width="match_parent"
+            android:layout_height="0dp"
+            android:layout_weight="0.5"
+            android:background="@android:color/transparent" />
+
+    </LinearLayout>
+
+</FrameLayout>
diff --git a/chrome/android/java/res/layout/chrome_home_new_tab_page.xml b/chrome/android/java/res/layout/chrome_home_new_tab_page.xml
index 082e7a696..559617f 100644
--- a/chrome/android/java/res/layout/chrome_home_new_tab_page.xml
+++ b/chrome/android/java/res/layout/chrome_home_new_tab_page.xml
@@ -16,7 +16,7 @@
         android:id="@+id/close_button"
         android:layout_width="40dp"
         android:layout_height="40dp"
-        android:layout_gravity="top|start"
+        android:layout_gravity="top|end"
         android:src="@drawable/btn_close"
         android:scaleType="center"
         android:background="@android:color/transparent"
@@ -25,7 +25,8 @@
     <LinearLayout
         android:layout_width="match_parent"
         android:layout_height="match_parent"
-        android:orientation="vertical" >
+        android:orientation="vertical"
+        android:clipChildren="false" >
 
         <FrameLayout
             android:layout_width="match_parent"
@@ -42,13 +43,13 @@
 
         </FrameLayout>
 
-        <!-- This extra empty frame layout is used to ensure the FrameLayout above
-             is half of the parent view's height.  -->
+        <!-- This extra empty frame layout is used to ensure the FrameLayout
+             above is half of the parent view's height.  -->
         <FrameLayout
             android:layout_width="match_parent"
             android:layout_height="0dp"
             android:layout_weight="0.5"
-            android:background="@android:color/white" />
+            android:background="@android:color/transparent" />
 
     </LinearLayout>
 
diff --git a/chrome/android/java/res/layout/incognito_bottom_sheet_content.xml b/chrome/android/java/res/layout/incognito_bottom_sheet_content.xml
new file mode 100644
index 0000000..8d4cef6
--- /dev/null
+++ b/chrome/android/java/res/layout/incognito_bottom_sheet_content.xml
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright 2017 The Chromium Authors. All rights reserved.
+     Use of this source code is governed by a BSD-style license that can be
+     found in the LICENSE file. -->
+
+<FrameLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:chrome="http://schemas.android.com/apk/res-auto"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:background="@color/incognito_primary_color" >
+
+    <ScrollView
+        android:id="@+id/scroll_view"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent" >
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:gravity="center_horizontal"
+            android:orientation="vertical"
+            android:paddingStart="16dp"
+            android:paddingEnd="16dp"
+            android:paddingTop="16dp"
+            android:paddingBottom="16dp" >
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="@string/new_tab_incognito_header"
+                android:textColor="@color/locationbar_light_hint_text"
+                android:textSize="24sp" />
+
+            <TextView
+                android:id="@+id/new_tab_incognito_message"
+                style="@style/IncognitoNewTabMessage"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginTop="16dp"
+                android:layout_marginBottom="10dp"
+                android:text="@string/new_tab_incognito_message"
+                android:textColor="@color/locationbar_light_hint_text" />
+
+            <TextView
+                android:id="@+id/learn_more"
+                style="@style/IncognitoNewTabLearnMoreLink"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="@string/learn_more"
+                android:textColor="@color/google_blue_300" />
+
+        </LinearLayout>
+
+    </ScrollView>
+
+    <org.chromium.chrome.browser.widget.FadingShadowView
+        android:id="@+id/shadow"
+        android:layout_width="match_parent"
+        android:layout_height="@dimen/action_bar_shadow_height"
+        android:visibility="gone" />
+
+</FrameLayout>
+
diff --git a/chrome/android/java/res/layout/new_tab_page_incognito.xml b/chrome/android/java/res/layout/new_tab_page_incognito.xml
index 2c0c9e0..84f44dcf 100644
--- a/chrome/android/java/res/layout/new_tab_page_incognito.xml
+++ b/chrome/android/java/res/layout/new_tab_page_incognito.xml
@@ -51,30 +51,22 @@
 
             <TextView
                 android:id="@+id/new_tab_incognito_message"
+                style="@style/IncognitoNewTabMessage"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 android:layout_marginTop="32dp"
                 android:layout_marginBottom="10dp"
-                android:maxWidth="660dp"
-                android:singleLine="false"
                 android:text="@null"
-                android:textColor="#bdbdbd"
-                android:textSize="14sp"
-                android:lineSpacingMultiplier="1.2" />
+                android:textColor="#bdbdbd" />
 
             <TextView
                 android:id="@+id/learn_more"
+                style="@style/IncognitoNewTabLearnMoreLink"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
-                android:background="?attr/listChoiceBackgroundIndicator"
-                android:clickable="true"
-                android:focusable="true"
                 android:fontFamily="sans-serif-medium"
-                android:padding="16dp"
                 android:text="@string/learn_more"
-                android:textAllCaps="true"
-                android:textColor="#03a9f4"
-                android:textSize="14sp" />
+                android:textColor="#03a9f4" />
 
         </LinearLayout>
 
diff --git a/chrome/android/java/res/values-v17/styles.xml b/chrome/android/java/res/values-v17/styles.xml
index a88aab4c8..bfb8e10 100644
--- a/chrome/android/java/res/values-v17/styles.xml
+++ b/chrome/android/java/res/values-v17/styles.xml
@@ -583,13 +583,8 @@
         <item name="android:textColor">@android:color/white</item>
         <item name="android:textSize">20sp</item>
     </style>
-    <style name="PrivacyDisclaimerText">
-        <item name="android:layout_width">match_parent</item>
-        <item name="android:layout_height">wrap_content</item>
-        <item name="android:layout_marginTop">6dp</item>
-        <item name="android:lineSpacingExtra">6sp</item>
-        <item name="android:textSize">14sp</item>
-        <item name="android:visibility">gone</item>
+    <style name="BottomSheetContentTitle" parent="TextAppearance.Widget.AppCompat.Toolbar.Title">
+        <item name="android:textSize">20sp</item>
     </style>
 
     <!-- New tab page RecyclerView overscroll color -->
@@ -611,6 +606,14 @@
         <item name="android:scaleType">center</item>
         <item name="android:paddingEnd">@dimen/selectable_list_layout_row_end_padding</item>
     </style>
+    <style name="PrivacyDisclaimerText">
+        <item name="android:layout_width">match_parent</item>
+        <item name="android:layout_height">wrap_content</item>
+        <item name="android:layout_marginTop">6dp</item>
+        <item name="android:lineSpacingExtra">6sp</item>
+        <item name="android:textSize">14sp</item>
+        <item name="android:visibility">gone</item>
+    </style>
 
     <!-- Download Home -->
     <style name="DownloadHomeStatusText">
@@ -703,8 +706,19 @@
         <item name="android:textSize">12sp</item>
     </style>
 
-    <!-- Miscellaneous -->
-    <style name="BottomSheetContentTitle" parent="TextAppearance.Widget.AppCompat.Toolbar.Title">
-        <item name="android:textSize">20sp</item>
+    <!-- Incognito New Tab Page -->
+    <style name="IncognitoNewTabMessage">
+        <item name="android:maxWidth">660dp</item>
+        <item name="android:textSize">14sp</item>
+        <item name="android:lineSpacingMultiplier">1.2</item>
     </style>
+    <style name="IncognitoNewTabLearnMoreLink">
+        <item name="android:background">?attr/listChoiceBackgroundIndicator</item>
+        <item name="android:clickable">true</item>
+        <item name="android:focusable">true</item>
+        <item name="android:textSize">14sp</item>
+        <item name="android:textAllCaps">true</item>
+        <item name="android:padding">16dp</item>
+    </style>
+
 </resources>
diff --git a/chrome/android/java/res/values/colors.xml b/chrome/android/java/res/values/colors.xml
index b30dcd7..9b79693 100644
--- a/chrome/android/java/res/values/colors.xml
+++ b/chrome/android/java/res/values/colors.xml
@@ -16,6 +16,7 @@
     <color name="descriptive_text_color">#646464</color>
     <color name="error_text_color">#c53929</color>
     <color name="google_blue_200">#90caf9</color>
+    <color name="google_blue_300">#7BAAF7</color>
     <color name="google_blue_500">#4285f4</color>
     <color name="google_blue_700">#3367d6</color>
     <color name="google_blue_grey_500">#607D8B</color>
@@ -29,6 +30,7 @@
     <color name="google_grey_600">#757575</color>
     <color name="toolbar_shadow_color">#1d000000</color>
     <color name="white_alpha_50">#80ffffff</color>
+    <color name="white_alpha_70">#B3FFFFFF</color>
     <color name="black_alpha_30">#4d000000</color>
     <color name="black_alpha_40">#66000000</color>
     <color name="toolbar_light_tint">#A3000000</color>
@@ -137,11 +139,11 @@
     <color name="progress_bar_background_white">@color/black_alpha_30</color>
 
     <!-- Theme colors. Also used for toolbar background -->
-    <color name="incognito_primary_color">#505050</color>
+    <color name="incognito_primary_color">#424242</color>
 
     <!-- LocationBar colors -->
     <color name="locationbar_dark_hint_text">#969696</color>
-    <color name="locationbar_light_hint_text">#80ffffff</color>
+    <color name="locationbar_light_hint_text">@color/white_alpha_70</color>
     <color name="locationbar_light_selection_color">#cc5595fe</color>
     <color name="locationbar_status_color">@color/light_normal_color</color>
     <color name="locationbar_status_color_light">#ffffff</color>
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/BluetoothChooserDialog.java b/chrome/android/java/src/org/chromium/chrome/browser/BluetoothChooserDialog.java
index d4b0236..13b491a 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/BluetoothChooserDialog.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/BluetoothChooserDialog.java
@@ -372,17 +372,12 @@
     }
 
     @VisibleForTesting
-    Drawable getConnectedIcon() {
-        return mConnectedIcon.getConstantState().newDrawable().mutate();
-    }
-
-    @VisibleForTesting
     @CalledByNative
     void addOrUpdateDevice(String deviceId, String deviceName, boolean isGATTConnected) {
         Drawable icon = null;
         String iconDescription = null;
         if (isGATTConnected) {
-            icon = getConnectedIcon();
+            icon = mConnectedIcon.getConstantState().newDrawable();
             iconDescription = mConnectedIconDescription;
         }
 
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ItemChooserDialog.java b/chrome/android/java/src/org/chromium/chrome/browser/ItemChooserDialog.java
index 96a9e8c..5318960 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/ItemChooserDialog.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ItemChooserDialog.java
@@ -90,8 +90,13 @@
                 @Nullable String iconDescription) {
             if (!TextUtils.equals(mKey, key)) return false;
             if (!TextUtils.equals(mDescription, description)) return false;
-            if (!ApiCompatibilityUtils.objectEquals(mIcon, icon)) return false;
             if (!TextUtils.equals(mIconDescription, iconDescription)) return false;
+
+            if (icon == null ^ mIcon == null) return false;
+            if (mIcon != null && !mIcon.getConstantState().equals(icon.getConstantState())) {
+                return false;
+            }
+
             return true;
         }
     }
@@ -575,7 +580,8 @@
      *
      * @param key Unique identifier for that item.
      * @param description Text in the row.
-     * @param icon Drawable to show left of the description.
+     * @param icon Drawable to show left of the description. The drawable provided should
+     *        be stateful and handle the selected state to be rendered correctly.
      * @param iconDescription Description of the icon.
      */
     public void addOrUpdateItem(String key, String description, @Nullable Drawable icon,
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/Layout.java b/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/Layout.java
index 67763c3e..52fa4931 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/Layout.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/Layout.java
@@ -1076,4 +1076,9 @@
             LayerTitleCache layerTitleCache, TabContentManager tabContentManager,
             ResourceManager resourceManager, ChromeFullscreenManager fullscreenManager) {
     }
+
+    @VisibleForTesting
+    public void finishAnimationsForTests() {
+        if (mLayoutAnimations != null) mLayoutAnimations.updateAndFinish();
+    }
 }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/crash/MinidumpDirectoryObserver.java b/chrome/android/java/src/org/chromium/chrome/browser/crash/MinidumpDirectoryObserver.java
index 0fe3f77..033af29 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/crash/MinidumpDirectoryObserver.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/crash/MinidumpDirectoryObserver.java
@@ -38,7 +38,8 @@
     @Override
     public void onEvent(int event, String path) {
         // This is executed on a thread dedicated to FileObserver.
-        if (CrashFileManager.isMinidumpMIMEFirstTry(path)) {
+        // Note: It's possible for |path| to be null: http://crbug.com/711404
+        if (path != null && CrashFileManager.isMinidumpMIMEFirstTry(path)) {
             // Note that the logcat extraction might fail. This is ok; in that case, the minidump
             // will be found and uploaded upon the next browser launch.
             File minidump = mFileManager.getCrashFile(path);
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/ChromeHomeIncognitoNewTabPage.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/ChromeHomeIncognitoNewTabPage.java
new file mode 100644
index 0000000..55f379e
--- /dev/null
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/ChromeHomeIncognitoNewTabPage.java
@@ -0,0 +1,64 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+package org.chromium.chrome.browser.ntp;
+
+import android.content.Context;
+import android.content.res.Resources;
+import android.support.annotation.Nullable;
+import android.view.LayoutInflater;
+import android.view.View;
+
+import org.chromium.base.ApiCompatibilityUtils;
+import org.chromium.chrome.R;
+import org.chromium.chrome.browser.compositor.layouts.LayoutManagerChrome;
+import org.chromium.chrome.browser.tab.Tab;
+import org.chromium.chrome.browser.tabmodel.TabModelSelector;
+
+/**
+ * The incognito new tab page to display when Chrome Home is enabled.
+ */
+public class ChromeHomeIncognitoNewTabPage extends ChromeHomeNewTabPageBase {
+    private final View mView;
+    private final int mBackgroundColor;
+    private final int mThemeColor;
+
+    /**
+     * Constructs a ChromeHomeIncognitoNewTabPage.
+     * @param context The context used to inflate the view.
+     * @param tab The {@link Tab} that is showing this new tab page.
+     * @param tabModelSelector The {@link TabModelSelector} used to open tabs.
+     * @param layoutManager The {@link LayoutManagerChrome} used to observe overview mode changes.
+     *                      This may be null if the NTP is created on startup due to
+     *                      PartnerBrowserCustomizations.
+     */
+    public ChromeHomeIncognitoNewTabPage(final Context context, final Tab tab,
+            final TabModelSelector tabModelSelector,
+            @Nullable final LayoutManagerChrome layoutManager) {
+        super(context, tab, tabModelSelector, layoutManager);
+
+        mView = LayoutInflater.from(context).inflate(
+                R.layout.chrome_home_incognito_new_tab_page, null);
+        initializeCloseButton(mView.findViewById(R.id.close_button));
+
+        Resources res = context.getResources();
+        mBackgroundColor = ApiCompatibilityUtils.getColor(res, R.color.ntp_bg_incognito);
+        mThemeColor = ApiCompatibilityUtils.getColor(res, R.color.incognito_primary_color);
+    }
+
+    @Override
+    public View getView() {
+        return mView;
+    }
+
+    @Override
+    public int getBackgroundColor() {
+        return mBackgroundColor;
+    }
+
+    @Override
+    public int getThemeColor() {
+        return mThemeColor;
+    }
+}
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/ChromeHomeNewTabPage.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/ChromeHomeNewTabPage.java
index 4583a22..9e722b2 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/ChromeHomeNewTabPage.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/ChromeHomeNewTabPage.java
@@ -9,57 +9,34 @@
 import android.support.annotation.Nullable;
 import android.view.LayoutInflater;
 import android.view.View;
-import android.view.View.OnClickListener;
 
 import org.chromium.base.ApiCompatibilityUtils;
-import org.chromium.base.VisibleForTesting;
 import org.chromium.chrome.R;
-import org.chromium.chrome.browser.ChromeTabbedActivity;
-import org.chromium.chrome.browser.NativePage;
-import org.chromium.chrome.browser.UrlConstants;
-import org.chromium.chrome.browser.compositor.layouts.EmptyOverviewModeObserver;
 import org.chromium.chrome.browser.compositor.layouts.LayoutManagerChrome;
-import org.chromium.chrome.browser.compositor.layouts.OverviewModeBehavior.OverviewModeObserver;
 import org.chromium.chrome.browser.ntp.LogoBridge.Logo;
 import org.chromium.chrome.browser.ntp.LogoBridge.LogoObserver;
 import org.chromium.chrome.browser.search_engines.TemplateUrlService;
 import org.chromium.chrome.browser.search_engines.TemplateUrlService.TemplateUrlServiceObserver;
-import org.chromium.chrome.browser.tab.EmptyTabObserver;
 import org.chromium.chrome.browser.tab.Tab;
-import org.chromium.chrome.browser.tab.TabObserver;
 import org.chromium.chrome.browser.tabmodel.TabModelSelector;
-import org.chromium.chrome.browser.widget.TintedImageButton;
-import org.chromium.chrome.browser.widget.bottomsheet.BottomSheet;
-import org.chromium.chrome.browser.widget.bottomsheet.BottomSheetMetrics;
 
 /**
  * The new tab page to display when Chrome Home is enabled.
  */
-public class ChromeHomeNewTabPage implements NativePage, TemplateUrlServiceObserver {
-    private final Tab mTab;
-    private final TabObserver mTabObserver;
-    private final TabModelSelector mTabModelSelector;
+public class ChromeHomeNewTabPage
+        extends ChromeHomeNewTabPageBase implements TemplateUrlServiceObserver {
     private final LogoView.Delegate mLogoDelegate;
-    private final OverviewModeObserver mOverviewModeObserver;
-    @Nullable
-    private final LayoutManagerChrome mLayoutManager;
-    private final BottomSheet mBottomSheet;
 
     private final View mView;
     private final LogoView mLogoView;
-    private final TintedImageButton mCloseButton;
-    private final View mFadingBackgroundView;
 
-    private final String mTitle;
     private final int mBackgroundColor;
     private final int mThemeColor;
 
-    private boolean mShowOverviewOnClose;
-
     /**
      * Constructs a ChromeHomeNewTabPage.
      * @param context The context used to inflate the view.
-     * @param tab The Tab that is showing this new tab page.
+     * @param tab The {@link Tab} that is showing this new tab page.
      * @param tabModelSelector The {@link TabModelSelector} used to open tabs.
      * @param layoutManager The {@link LayoutManagerChrome} used to observe overview mode changes.
      *                      This may be null if the NTP is created on startup due to
@@ -68,63 +45,18 @@
     public ChromeHomeNewTabPage(final Context context, final Tab tab,
             final TabModelSelector tabModelSelector,
             @Nullable final LayoutManagerChrome layoutManager) {
-        mTab = tab;
-        mTabModelSelector = tabModelSelector;
-        mLayoutManager = layoutManager;
-        mFadingBackgroundView = mTab.getActivity().getFadingBackgroundView();
-        mBottomSheet = mTab.getActivity().getBottomSheet();
+        super(context, tab, tabModelSelector, layoutManager);
 
         mView = LayoutInflater.from(context).inflate(R.layout.chrome_home_new_tab_page, null);
         mLogoView = (LogoView) mView.findViewById(R.id.search_provider_logo);
-        mCloseButton = (TintedImageButton) mView.findViewById(R.id.close_button);
+        initializeCloseButton(mView.findViewById(R.id.close_button));
 
         Resources res = context.getResources();
-        mTitle = res.getString(R.string.button_new_tab);
         mBackgroundColor = ApiCompatibilityUtils.getColor(res, R.color.ntp_bg);
         mThemeColor = ApiCompatibilityUtils.getColor(res, R.color.default_primary_color);
 
-        // A new tab may be created on startup due to PartnerBrowserCustomizations before the
-        // LayoutManagerChrome has been created (see ChromeTabbedActivity#initializeState()).
-        if (mLayoutManager != null) {
-            mShowOverviewOnClose = mLayoutManager.overviewVisible();
-
-            // TODO(twellington): Long term we will not allow NTPs to remain open after the user
-            // navigates away from them. Remove this observer after that happens.
-            mOverviewModeObserver = new EmptyOverviewModeObserver() {
-                @Override
-                public void onOverviewModeFinishedHiding() {
-                    mShowOverviewOnClose = mTabModelSelector.getCurrentTab() == mTab;
-                }
-            };
-            mLayoutManager.addOverviewModeObserver(mOverviewModeObserver);
-        } else {
-            mOverviewModeObserver = null;
-        }
-
-        mTabObserver = new EmptyTabObserver() {
-            @Override
-            public void onShown(Tab tab) {
-                onNewTabPageShown();
-            }
-
-            @Override
-            public void onHidden(Tab tab) {
-                mFadingBackgroundView.setEnabled(true);
-                if (!mTab.isClosing()) mShowOverviewOnClose = false;
-            }
-        };
-        mTab.addObserver(mTabObserver);
-
         mLogoDelegate = initializeLogoView();
-        initializeCloseButton();
 
-        // If the tab is already showing TabObserver#onShown() won't be called, so we need to call
-        // #onNewTabPageShown() directly.
-        boolean tabAlreadyShowing = mTabModelSelector.getCurrentTab() == mTab;
-        if (tabAlreadyShowing) onNewTabPageShown();
-
-        // TODO(twellington): disallow moving the NTP to the other window in Android N+
-        //                    multi-window mode.
     }
 
     @Override
@@ -133,21 +65,6 @@
     }
 
     @Override
-    public String getTitle() {
-        return mTitle;
-    }
-
-    @Override
-    public String getUrl() {
-        return UrlConstants.NTP_URL;
-    }
-
-    @Override
-    public String getHost() {
-        return UrlConstants.NTP_HOST;
-    }
-
-    @Override
     public int getBackgroundColor() {
         return mBackgroundColor;
     }
@@ -167,17 +84,8 @@
 
     @Override
     public void destroy() {
+        super.destroy();
         mLogoDelegate.destroy();
-
-        // The next tab will be selected before this one is destroyed. If the currently selected
-        // tab is a Chrome Home new tab page, the FadingBackgroundView should not be enabled.
-        mFadingBackgroundView.setEnabled(
-                !isTabChromeHomeNewTabPage(mTabModelSelector.getCurrentTab()));
-
-        if (mLayoutManager != null) {
-            mLayoutManager.removeOverviewModeObserver(mOverviewModeObserver);
-        }
-        mTab.removeObserver(mTabObserver);
     }
 
     private void updateSearchProviderLogoVisibility() {
@@ -185,25 +93,6 @@
         mLogoView.setVisibility(hasLogo ? View.VISIBLE : View.GONE);
     }
 
-    private void onNewTabPageShown() {
-        mFadingBackgroundView.setEnabled(false);
-
-        // This method may be called when an NTP is selected due to the user switching tab models.
-        // In this case, we do not want the bottom sheet to open. Unfortunately, without observing
-        // OverviewModeBehavior, we have no good signal to show the BottomSheet when an NTP is
-        // selected in the tab switcher. Eventually this won't matter because we will not allow
-        // NTPs to remain open after the user leaves them.
-        if (getLayoutManager() != null && getLayoutManager().overviewVisible()) return;
-
-        mBottomSheet.setSheetState(BottomSheet.SHEET_STATE_HALF, true);
-        mBottomSheet.getBottomSheetMetrics().recordSheetOpenReason(
-                BottomSheetMetrics.OPENED_BY_NEW_TAB_CREATION);
-    }
-
-    private boolean isTabChromeHomeNewTabPage(Tab tab) {
-        return tab != null && tab.getUrl().equals(getUrl()) && !tab.isIncognito();
-    }
-
     private LogoView.Delegate initializeLogoView() {
         TemplateUrlService.getInstance().addObserver(this);
 
@@ -222,40 +111,10 @@
         return logoDelegate;
     }
 
-    private void initializeCloseButton() {
-        mCloseButton.setOnClickListener(new OnClickListener() {
-            @Override
-            public void onClick(View v) {
-                mBottomSheet.setSheetState(BottomSheet.SHEET_STATE_PEEK, true);
-                if (mShowOverviewOnClose && getLayoutManager() != null) {
-                    getLayoutManager().showOverview(false);
-                }
-
-                // Close the tab after showing the overview mode so the bottom sheet doesn't open
-                // if another NTP is selected when this one is closed.
-                // TODO(twellington): remove this comment after only one NTP may be open at a time.
-                mTabModelSelector.closeTab(mTab);
-            }
-        });
-    }
-
-    private LayoutManagerChrome getLayoutManager() {
-        if (mLayoutManager != null) return mLayoutManager;
-
-        return ((ChromeTabbedActivity) mTab.getActivity()).getLayoutManager();
-    }
-
     // TemplateUrlServiceObserver overrides.
 
     @Override
     public void onTemplateURLServiceChanged() {
         updateSearchProviderLogoVisibility();
     }
-
-    // Methods for testing.
-
-    @VisibleForTesting
-    public TintedImageButton getCloseButtonForTests() {
-        return mCloseButton;
-    }
 }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/ChromeHomeNewTabPageBase.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/ChromeHomeNewTabPageBase.java
new file mode 100644
index 0000000..4515d97
--- /dev/null
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/ChromeHomeNewTabPageBase.java
@@ -0,0 +1,191 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+package org.chromium.chrome.browser.ntp;
+
+import android.content.Context;
+import android.support.annotation.CallSuper;
+import android.support.annotation.Nullable;
+import android.view.View;
+import android.view.View.OnClickListener;
+
+import org.chromium.base.VisibleForTesting;
+import org.chromium.chrome.R;
+import org.chromium.chrome.browser.ChromeTabbedActivity;
+import org.chromium.chrome.browser.NativePage;
+import org.chromium.chrome.browser.UrlConstants;
+import org.chromium.chrome.browser.compositor.layouts.EmptyOverviewModeObserver;
+import org.chromium.chrome.browser.compositor.layouts.LayoutManagerChrome;
+import org.chromium.chrome.browser.compositor.layouts.OverviewModeBehavior.OverviewModeObserver;
+import org.chromium.chrome.browser.tab.EmptyTabObserver;
+import org.chromium.chrome.browser.tab.Tab;
+import org.chromium.chrome.browser.tab.TabObserver;
+import org.chromium.chrome.browser.tabmodel.TabModelSelector;
+import org.chromium.chrome.browser.widget.bottomsheet.BottomSheet;
+import org.chromium.chrome.browser.widget.bottomsheet.BottomSheetMetrics;
+
+/**
+ * The base class for the new tab pages displayed in Chrome Home.
+ */
+public abstract class ChromeHomeNewTabPageBase implements NativePage {
+    final Tab mTab;
+    final TabObserver mTabObserver;
+    final TabModelSelector mTabModelSelector;
+    final OverviewModeObserver mOverviewModeObserver;
+    @Nullable
+    final LayoutManagerChrome mLayoutManager;
+    final BottomSheet mBottomSheet;
+    final View mFadingBackgroundView;
+    final String mTitle;
+
+    private boolean mShowOverviewOnClose;
+    private View mCloseButton;
+
+    /**
+     * Constructs a ChromeHomeNewTabPageBase.
+     * @param context The context used to inflate the view.
+     * @param tab The {@link Tab} that is showing this new tab page.
+     * @param tabModelSelector The {@link TabModelSelector} used to open tabs.
+     * @param layoutManager The {@link LayoutManagerChrome} used to observe overview mode changes.
+     *                      This may be null if the NTP is created on startup due to
+     *                      PartnerBrowserCustomizations.
+     */
+    public ChromeHomeNewTabPageBase(final Context context, final Tab tab,
+            final TabModelSelector tabModelSelector,
+            @Nullable final LayoutManagerChrome layoutManager) {
+        mTab = tab;
+        mTabModelSelector = tabModelSelector;
+        mLayoutManager = layoutManager;
+        mFadingBackgroundView = mTab.getActivity().getFadingBackgroundView();
+        mBottomSheet = mTab.getActivity().getBottomSheet();
+        mTitle = context.getResources().getString(R.string.button_new_tab);
+
+        // A new tab may be created on startup due to PartnerBrowserCustomizations before the
+        // LayoutManagerChrome has been created (see ChromeTabbedActivity#initializeState()).
+        if (mLayoutManager != null) {
+            mShowOverviewOnClose = mLayoutManager.overviewVisible();
+
+            // TODO(twellington): Long term we will not allow NTPs to remain open after the user
+            // navigates away from them. Remove this observer after that happens.
+            mOverviewModeObserver = new EmptyOverviewModeObserver() {
+                @Override
+                public void onOverviewModeFinishedHiding() {
+                    mShowOverviewOnClose = mTabModelSelector.getCurrentTab() == mTab;
+                }
+            };
+            mLayoutManager.addOverviewModeObserver(mOverviewModeObserver);
+        } else {
+            mOverviewModeObserver = null;
+        }
+
+        mTabObserver = new EmptyTabObserver() {
+            @Override
+            public void onShown(Tab tab) {
+                onNewTabPageShown();
+            }
+
+            @Override
+            public void onHidden(Tab tab) {
+                mFadingBackgroundView.setEnabled(true);
+                if (!mTab.isClosing()) mShowOverviewOnClose = false;
+            }
+        };
+        mTab.addObserver(mTabObserver);
+
+        // If the tab is already showing TabObserver#onShown() won't be called, so we need to call
+        // #onNewTabPageShown() directly.
+        boolean tabAlreadyShowing = mTabModelSelector.getCurrentTab() == mTab;
+        if (tabAlreadyShowing) onNewTabPageShown();
+
+        // TODO(twellington): disallow moving the NTP to the other window in Android N+
+        //                    multi-window mode.
+    }
+
+    @Override
+    public String getTitle() {
+        return mTitle;
+    }
+
+    @Override
+    public String getUrl() {
+        return UrlConstants.NTP_URL;
+    }
+
+    @Override
+    public String getHost() {
+        return UrlConstants.NTP_HOST;
+    }
+
+    @Override
+    public boolean needsToolbarShadow() {
+        return false;
+    }
+
+    @Override
+    public void updateForUrl(String url) {}
+
+    @Override
+    @CallSuper
+    public void destroy() {
+        // The next tab will be selected before this one is destroyed. If the currently selected
+        // tab is a Chrome Home new tab page, the FadingBackgroundView should not be enabled.
+        mFadingBackgroundView.setEnabled(
+                !isTabChromeHomeNewTabPage(mTabModelSelector.getCurrentTab()));
+
+        if (mLayoutManager != null) {
+            mLayoutManager.removeOverviewModeObserver(mOverviewModeObserver);
+        }
+        mTab.removeObserver(mTabObserver);
+    }
+
+    private void onNewTabPageShown() {
+        mFadingBackgroundView.setEnabled(false);
+
+        // This method may be called when an NTP is selected due to the user switching tab models.
+        // In this case, we do not want the bottom sheet to open. Unfortunately, without observing
+        // OverviewModeBehavior, we have no good signal to show the BottomSheet when an NTP is
+        // selected in the tab switcher. Eventually this won't matter because we will not allow
+        // NTPs to remain open after the user leaves them.
+        if (getLayoutManager() != null && getLayoutManager().overviewVisible()) return;
+
+        mBottomSheet.setSheetState(BottomSheet.SHEET_STATE_HALF, true);
+        mBottomSheet.getBottomSheetMetrics().recordSheetOpenReason(
+                BottomSheetMetrics.OPENED_BY_NEW_TAB_CREATION);
+    }
+
+    private boolean isTabChromeHomeNewTabPage(Tab tab) {
+        return tab != null && tab.getUrl().equals(getUrl());
+    }
+
+    void initializeCloseButton(View closeButton) {
+        mCloseButton = closeButton;
+        mCloseButton.setOnClickListener(new OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                mBottomSheet.setSheetState(BottomSheet.SHEET_STATE_PEEK, true);
+                if (mShowOverviewOnClose && getLayoutManager() != null) {
+                    getLayoutManager().showOverview(false);
+                }
+
+                // Close the tab after showing the overview mode so the bottom sheet doesn't open
+                // if another NTP is selected when this one is closed.
+                // TODO(twellington): remove this comment after only one NTP may be open at a time.
+                mTabModelSelector.closeTab(mTab);
+            }
+        });
+    }
+
+    private LayoutManagerChrome getLayoutManager() {
+        if (mLayoutManager != null) return mLayoutManager;
+
+        return ((ChromeTabbedActivity) mTab.getActivity()).getLayoutManager();
+    }
+
+    // Methods for testing.
+
+    @VisibleForTesting
+    public View getCloseButtonForTests() {
+        return mCloseButton;
+    }
+}
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/IncognitoBottomSheetContent.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/IncognitoBottomSheetContent.java
new file mode 100644
index 0000000..465102a
--- /dev/null
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/IncognitoBottomSheetContent.java
@@ -0,0 +1,85 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+package org.chromium.chrome.browser.ntp;
+
+import android.app.Activity;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.View.OnClickListener;
+import android.view.ViewTreeObserver.OnScrollChangedListener;
+import android.widget.ScrollView;
+
+import org.chromium.base.ApiCompatibilityUtils;
+import org.chromium.chrome.R;
+import org.chromium.chrome.browser.help.HelpAndFeedback;
+import org.chromium.chrome.browser.profiles.Profile;
+import org.chromium.chrome.browser.widget.FadingShadow;
+import org.chromium.chrome.browser.widget.FadingShadowView;
+import org.chromium.chrome.browser.widget.bottomsheet.BottomSheet.BottomSheetContent;
+import org.chromium.chrome.browser.widget.bottomsheet.BottomSheetContentController;
+
+/**
+ * Provides content to be displayed inside the Home tab of the bottom sheet in incognito mode.
+ */
+public class IncognitoBottomSheetContent implements BottomSheetContent {
+    private final View mView;
+    private final ScrollView mScrollView;
+
+    /**
+     * Constructs a new IncognitoBottomSheetContent.
+     * @param activity The {@link Activity} displaying this bottom sheet content.
+     */
+    public IncognitoBottomSheetContent(final Activity activity) {
+        LayoutInflater inflater = LayoutInflater.from(activity);
+        mView = inflater.inflate(R.layout.incognito_bottom_sheet_content, null);
+
+        View learnMore = mView.findViewById(R.id.learn_more);
+        learnMore.setOnClickListener(new OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                HelpAndFeedback.getInstance(activity).show(activity,
+                        activity.getString(R.string.help_context_incognito_learn_more),
+                        Profile.getLastUsedProfile(), null);
+            }
+        });
+
+        final FadingShadowView shadow = (FadingShadowView) mView.findViewById(R.id.shadow);
+        shadow.init(
+                ApiCompatibilityUtils.getColor(mView.getResources(), R.color.toolbar_shadow_color),
+                FadingShadow.POSITION_TOP);
+
+        mScrollView = (ScrollView) mView.findViewById(R.id.scroll_view);
+        mScrollView.getViewTreeObserver().addOnScrollChangedListener(new OnScrollChangedListener() {
+            @Override
+            public void onScrollChanged() {
+                boolean shadowVisible = mScrollView.canScrollVertically(-1);
+                shadow.setVisibility(shadowVisible ? View.VISIBLE : View.GONE);
+            }
+        });
+    }
+
+    @Override
+    public View getContentView() {
+        return mView;
+    }
+
+    @Override
+    public View getToolbarView() {
+        return null;
+    }
+
+    @Override
+    public int getVerticalScrollOffset() {
+        return mScrollView.getScrollY();
+    }
+
+    @Override
+    public void destroy() {}
+
+    @Override
+    public int getType() {
+        return BottomSheetContentController.TYPE_INCOGNITO_HOME;
+    }
+}
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/NativePageFactory.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/NativePageFactory.java
index ca7c1ab5..76a1e02 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/NativePageFactory.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/NativePageFactory.java
@@ -36,9 +36,14 @@
     static class NativePageBuilder {
         protected NativePage buildNewTabPage(ChromeActivity activity, Tab tab,
                 TabModelSelector tabModelSelector) {
-            if (FeatureUtilities.isChromeHomeEnabled() && !tab.isIncognito()) {
-                return new ChromeHomeNewTabPage(activity, tab, tabModelSelector,
-                        ((ChromeTabbedActivity) activity).getLayoutManager());
+            if (FeatureUtilities.isChromeHomeEnabled()) {
+                if (tab.isIncognito()) {
+                    return new ChromeHomeIncognitoNewTabPage(activity, tab, tabModelSelector,
+                            ((ChromeTabbedActivity) activity).getLayoutManager());
+                } else {
+                    return new ChromeHomeNewTabPage(activity, tab, tabModelSelector,
+                            ((ChromeTabbedActivity) activity).getLayoutManager());
+                }
             } else if (tab.isIncognito()) {
                 return new IncognitoNewTabPage(activity);
             } else {
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/widget/bottomsheet/BottomSheetContentController.java b/chrome/android/java/src/org/chromium/chrome/browser/widget/bottomsheet/BottomSheetContentController.java
index ea7871d..d62f1ed 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/widget/bottomsheet/BottomSheetContentController.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/widget/bottomsheet/BottomSheetContentController.java
@@ -6,6 +6,7 @@
 
 import android.app.Activity;
 import android.content.Context;
+import android.content.res.ColorStateList;
 import android.content.res.Resources;
 import android.support.annotation.IntDef;
 import android.support.design.internal.BottomNavigationItemView;
@@ -18,15 +19,20 @@
 import android.view.ViewGroup;
 
 import org.chromium.base.ActivityState;
+import org.chromium.base.ApiCompatibilityUtils;
 import org.chromium.base.ApplicationStatus;
 import org.chromium.base.ApplicationStatus.ActivityStateListener;
 import org.chromium.base.VisibleForTesting;
 import org.chromium.chrome.R;
+import org.chromium.chrome.browser.ChromeActivity;
 import org.chromium.chrome.browser.bookmarks.BookmarkSheetContent;
 import org.chromium.chrome.browser.download.DownloadSheetContent;
 import org.chromium.chrome.browser.history.HistorySheetContent;
+import org.chromium.chrome.browser.ntp.IncognitoBottomSheetContent;
 import org.chromium.chrome.browser.snackbar.SnackbarManager;
 import org.chromium.chrome.browser.suggestions.SuggestionsBottomSheetContent;
+import org.chromium.chrome.browser.tabmodel.EmptyTabModelSelectorObserver;
+import org.chromium.chrome.browser.tabmodel.TabModel;
 import org.chromium.chrome.browser.tabmodel.TabModelSelector;
 import org.chromium.chrome.browser.util.MathUtils;
 import org.chromium.chrome.browser.widget.bottomsheet.BottomSheet.BottomSheetContent;
@@ -46,13 +52,18 @@
 public class BottomSheetContentController extends BottomNavigationView
         implements OnNavigationItemSelectedListener {
     /** The different types of content that may be displayed in the bottom sheet. */
-    @IntDef({TYPE_SUGGESTIONS, TYPE_DOWNLOADS, TYPE_BOOKMARKS, TYPE_HISTORY})
+    @IntDef({TYPE_SUGGESTIONS, TYPE_DOWNLOADS, TYPE_BOOKMARKS, TYPE_HISTORY, TYPE_INCOGNITO_HOME})
     @Retention(RetentionPolicy.SOURCE)
     public @interface ContentType {}
     public static final int TYPE_SUGGESTIONS = 0;
     public static final int TYPE_DOWNLOADS = 1;
     public static final int TYPE_BOOKMARKS = 2;
     public static final int TYPE_HISTORY = 3;
+    public static final int TYPE_INCOGNITO_HOME = 4;
+
+    // R.id.action_home is overloaded, so an invalid ID is used to reference the incognito version
+    // of the home content.
+    private static final int INCOGNITO_HOME_ID = -1;
 
     private final Map<Integer, BottomSheetContent> mBottomSheetContents = new HashMap<>();
 
@@ -76,21 +87,24 @@
 
         @Override
         public void onSheetClosed() {
+            if (mSelectedItemId != 0 && mSelectedItemId != R.id.action_home) {
+                showBottomSheetContent(R.id.action_home);
+            }
+
             Iterator<Entry<Integer, BottomSheetContent>> contentIterator =
                     mBottomSheetContents.entrySet().iterator();
             while (contentIterator.hasNext()) {
                 Entry<Integer, BottomSheetContent> entry = contentIterator.next();
-                if (entry.getKey() == R.id.action_home) continue;
+                if (entry.getKey() == R.id.action_home || entry.getKey() == INCOGNITO_HOME_ID) {
+                    continue;
+                }
 
                 entry.getValue().destroy();
                 contentIterator.remove();
             }
+
             // TODO(twellington): determine a policy for destroying the
             //                    SuggestionsBottomSheetContent.
-
-            if (mSelectedItemId == 0 || mSelectedItemId == R.id.action_home) return;
-
-            showBottomSheetContent(R.id.action_home);
         }
     };
 
@@ -117,6 +131,20 @@
         mBottomSheet = bottomSheet;
         mBottomSheet.addObserver(mBottomSheetObserver);
         mTabModelSelector = tabModelSelector;
+        mTabModelSelector.addObserver(new EmptyTabModelSelectorObserver() {
+            @Override
+            public void onTabModelSelected(TabModel newModel, TabModel oldModel) {
+                updateVisuals(newModel.isIncognito());
+                showBottomSheetContent(R.id.action_home);
+
+                // Release incognito bottom sheet content so that it can be garbage collected.
+                if (!newModel.isIncognito()
+                        && mBottomSheetContents.containsKey(INCOGNITO_HOME_ID)) {
+                    mBottomSheetContents.get(INCOGNITO_HOME_ID).destroy();
+                    mBottomSheetContents.remove(INCOGNITO_HOME_ID);
+                }
+            }
+        });
 
         Resources res = getContext().getResources();
         mDistanceBelowToolbarPx = controlContainerHeight
@@ -178,22 +206,27 @@
     }
 
     private BottomSheetContent getSheetContentForId(int navItemId) {
+        if (mTabModelSelector.isIncognitoSelected() && navItemId == R.id.action_home) {
+            navItemId = INCOGNITO_HOME_ID;
+        }
+
         BottomSheetContent content = mBottomSheetContents.get(navItemId);
         if (content != null) return content;
 
+        ChromeActivity activity = mTabModelSelector.getCurrentTab().getActivity();
+
         if (navItemId == R.id.action_home) {
             content = new SuggestionsBottomSheetContent(
-                    mTabModelSelector.getCurrentTab().getActivity(), mBottomSheet,
-                    mTabModelSelector, mSnackbarManager);
+                    activity, mBottomSheet, mTabModelSelector, mSnackbarManager);
         } else if (navItemId == R.id.action_downloads) {
-            content = new DownloadSheetContent(mTabModelSelector.getCurrentTab().getActivity(),
-                    mTabModelSelector.getCurrentModel().isIncognito(), mSnackbarManager);
+            content = new DownloadSheetContent(
+                    activity, mTabModelSelector.getCurrentModel().isIncognito(), mSnackbarManager);
         } else if (navItemId == R.id.action_bookmarks) {
-            content = new BookmarkSheetContent(
-                    mTabModelSelector.getCurrentTab().getActivity(), mSnackbarManager);
+            content = new BookmarkSheetContent(activity, mSnackbarManager);
         } else if (navItemId == R.id.action_history) {
-            content = new HistorySheetContent(
-                    mTabModelSelector.getCurrentTab().getActivity(), mSnackbarManager);
+            content = new HistorySheetContent(activity, mSnackbarManager);
+        } else if (navItemId == INCOGNITO_HOME_ID) {
+            content = new IncognitoBottomSheetContent(activity);
         }
         mBottomSheetContents.put(navItemId, content);
         return content;
@@ -210,6 +243,17 @@
         mBottomSheet.showContent(getSheetContentForId(mSelectedItemId));
     }
 
+    private void updateVisuals(boolean isIncognitoTabModelSelected) {
+        setBackgroundResource(isIncognitoTabModelSelected ? R.color.incognito_primary_color
+                                                          : R.color.appbar_background);
+
+        ColorStateList tint = ApiCompatibilityUtils.getColorStateList(getResources(),
+                isIncognitoTabModelSelected ? R.color.bottom_nav_tint_incognito
+                                            : R.color.bottom_nav_tint);
+        setItemIconTintList(tint);
+        setItemTextColor(tint);
+    }
+
     /**
      * @param itemId The id of the MenuItem to select.
      */
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/widget/bottomsheet/BottomSheetMetrics.java b/chrome/android/java/src/org/chromium/chrome/browser/widget/bottomsheet/BottomSheetMetrics.java
index 73845aa..05b33ef 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/widget/bottomsheet/BottomSheetMetrics.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/widget/bottomsheet/BottomSheetMetrics.java
@@ -104,6 +104,8 @@
             RecordUserAction.record("Android.ChromeHome.ShowBookmarks");
         } else if (newContent.getType() == BottomSheetContentController.TYPE_HISTORY) {
             RecordUserAction.record("Android.ChromeHome.ShowHistory");
+        } else if (newContent.getType() == BottomSheetContentController.TYPE_INCOGNITO_HOME) {
+            RecordUserAction.record("Android.ChromeHome.ShowIncognitoHome");
         } else {
             assert false;
         }
diff --git a/chrome/android/java_sources.gni b/chrome/android/java_sources.gni
index 2c1ccb7..4115e74 100644
--- a/chrome/android/java_sources.gni
+++ b/chrome/android/java_sources.gni
@@ -583,11 +583,14 @@
   "java/src/org/chromium/chrome/browser/notifications/NotificationUmaTracker.java",
   "java/src/org/chromium/chrome/browser/notifications/StandardNotificationBuilder.java",
   "java/src/org/chromium/chrome/browser/notifications/WebApkNotificationClient.java",
+  "java/src/org/chromium/chrome/browser/ntp/ChromeHomeIncognitoNewTabPage.java",
   "java/src/org/chromium/chrome/browser/ntp/ChromeHomeNewTabPage.java",
+  "java/src/org/chromium/chrome/browser/ntp/ChromeHomeNewTabPageBase.java",
   "java/src/org/chromium/chrome/browser/ntp/ContentSuggestionsNotificationHelper.java",
   "java/src/org/chromium/chrome/browser/ntp/ContextMenuManager.java",
   "java/src/org/chromium/chrome/browser/ntp/FakeRecentlyClosedTabManager.java",
   "java/src/org/chromium/chrome/browser/ntp/ForeignSessionHelper.java",
+  "java/src/org/chromium/chrome/browser/ntp/IncognitoBottomSheetContent.java",
   "java/src/org/chromium/chrome/browser/ntp/IncognitoNewTabPage.java",
   "java/src/org/chromium/chrome/browser/ntp/IncognitoNewTabPageView.java",
   "java/src/org/chromium/chrome/browser/ntp/LogoBridge.java",
@@ -1619,7 +1622,6 @@
   "junit/src/org/chromium/chrome/browser/ChromeBackgroundServiceWaiterTest.java",
   "junit/src/org/chromium/chrome/browser/DelayedScreenLockIntentHandlerTest.java",
   "junit/src/org/chromium/chrome/browser/DisableHistogramsRule.java",
-  "junit/src/org/chromium/chrome/browser/Features.java",
   "junit/src/org/chromium/chrome/browser/ShortcutHelperTest.java",
   "junit/src/org/chromium/chrome/browser/SSLClientCertificateRequestTest.java",
   "junit/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutHelperTest.java",
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/BluetoothChooserDialogTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/BluetoothChooserDialogTest.java
index b66ff74..8d62138 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/BluetoothChooserDialogTest.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/BluetoothChooserDialogTest.java
@@ -8,7 +8,6 @@
 import android.app.Dialog;
 import android.content.Intent;
 import android.content.pm.PackageManager;
-import android.graphics.drawable.Drawable;
 import android.location.LocationManager;
 import android.support.test.filters.LargeTest;
 import android.test.MoreAsserts;
@@ -53,11 +52,6 @@
         }
 
         @Override
-        Drawable getConnectedIcon() {
-            return super.mConnectedIcon;
-        }
-
-        @Override
         void nativeOnDialogFinished(
                 long nativeBluetoothChooserAndroid, int eventType, String deviceId) {
             assertEquals(nativeBluetoothChooserAndroid, mNativeBluetoothChooserDialogPtr);
@@ -252,7 +246,7 @@
         assertTrue(itemAdapter.getItem(0).hasSameContents(
                 "id-1", "Name 1", null /* icon */, null /* iconDescription */));
         assertTrue(itemAdapter.getItem(1).hasSameContents("id-2", "Name 2",
-                mChooserDialog.getConnectedIcon(), mChooserDialog.mConnectedIconDescription));
+                mChooserDialog.mConnectedIcon, mChooserDialog.mConnectedIconDescription));
 
         selectItem(mChooserDialog, 2);
 
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/ntp/ChromeHomeNewTabPageTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/ntp/ChromeHomeNewTabPageTest.java
index fd42bae..05144ff7 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/ntp/ChromeHomeNewTabPageTest.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/ntp/ChromeHomeNewTabPageTest.java
@@ -10,6 +10,7 @@
 import org.chromium.base.test.util.CallbackHelper;
 import org.chromium.chrome.browser.UrlConstants;
 import org.chromium.chrome.browser.tab.Tab;
+import org.chromium.chrome.browser.tabmodel.EmptyTabModelObserver;
 import org.chromium.chrome.browser.tabmodel.TabModel.TabSelectionType;
 import org.chromium.chrome.browser.widget.FadingBackgroundView;
 import org.chromium.chrome.browser.widget.bottomsheet.BottomSheet;
@@ -25,7 +26,8 @@
  */
 public class ChromeHomeNewTabPageTest extends BottomSheetTestCaseBase {
     private FadingBackgroundView mFadingBackgroundView;
-    private StateChangeBottomSheetObserver mObserver;
+    private StateChangeBottomSheetObserver mBottomSheetObserver;
+    private TestTabModelObserver mTabModelObserver;
     private int mStateChangeCurrentCalls;
 
     /** On observer used to record state change events on the bottom sheet. */
@@ -39,17 +41,31 @@
         }
     }
 
+    /** An observer used to detect changes in the tab model. */
+    private static class TestTabModelObserver extends EmptyTabModelObserver {
+        private final CallbackHelper mDidCloseTabCallbackHelper = new CallbackHelper();
+
+        @Override
+        public void didCloseTab(int tabId, boolean incognito) {
+            mDidCloseTabCallbackHelper.notifyCalled();
+        }
+    }
+
     @Override
     public void setUp() throws Exception {
         super.setUp();
 
-        mObserver = new StateChangeBottomSheetObserver();
-        mBottomSheet.addObserver(mObserver);
+        mBottomSheetObserver = new StateChangeBottomSheetObserver();
+        mBottomSheet.addObserver(mBottomSheetObserver);
+
+        mTabModelObserver = new TestTabModelObserver();
+        getActivity().getTabModelSelector().getModel(false).addObserver(mTabModelObserver);
+        getActivity().getTabModelSelector().getModel(true).addObserver(mTabModelObserver);
 
         mFadingBackgroundView = getActivity().getFadingBackgroundView();
 
         // Once setup is done, get the initial call count for onStateChanged().
-        mStateChangeCurrentCalls = mObserver.mStateChangedCallbackHelper.getCallCount();
+        mStateChangeCurrentCalls = mBottomSheetObserver.mStateChangedCallbackHelper.getCallCount();
     }
 
     @SmallTest
@@ -65,7 +81,7 @@
         // Close the new tab.
         closeNewTab();
         assertEquals(0, getActivity().getTabModelSelector().getTotalTabCount());
-        assertFalse("Overview mode should not be showing",
+        assertTrue("Overview mode should be showing",
                 getActivity().getLayoutManager().overviewVisible());
     }
 
@@ -73,7 +89,7 @@
     public void testCloseNTP_TwoTabs()
             throws IllegalArgumentException, InterruptedException, TimeoutException {
         // Create a new tab.
-        createNewTab();
+        createNewTab(false);
 
         // Close the new tab.
         closeNewTab();
@@ -94,7 +110,7 @@
         });
 
         // Create a new tab.
-        createNewTab();
+        createNewTab(false);
 
         // Close the new tab.
         closeNewTab();
@@ -104,10 +120,23 @@
     }
 
     @SmallTest
+    public void testCloseNTP_Incognito()
+            throws IllegalArgumentException, InterruptedException, TimeoutException {
+        // Create new incognito NTP.
+        createNewTab(true);
+
+        // Close the new tab.
+        closeNewTab();
+        assertEquals(1, getActivity().getTabModelSelector().getTotalTabCount());
+        assertFalse("Overview mode should not be showing",
+                getActivity().getLayoutManager().overviewVisible());
+    }
+
+    @SmallTest
     public void testToggleSelectedTab()
             throws IllegalArgumentException, InterruptedException, TimeoutException {
         // Create a new tab.
-        createNewTab();
+        createNewTab(false);
 
         // Select the original tab.
         ThreadUtils.runOnUiThreadBlocking(new Runnable() {
@@ -133,22 +162,27 @@
         validateState(true, true);
     }
 
-    private void createNewTab() throws InterruptedException, TimeoutException {
+    private void createNewTab(boolean incognito) throws InterruptedException, TimeoutException {
         ChromeTabUtils.fullyLoadUrlInNewTab(
-                getInstrumentation(), getActivity(), UrlConstants.NTP_URL, false);
+                getInstrumentation(), getActivity(), UrlConstants.NTP_URL, incognito);
         validateState(true, true);
     }
 
     private void closeNewTab() throws InterruptedException, TimeoutException {
+        int currentCallCount = mTabModelObserver.mDidCloseTabCallbackHelper.getCallCount();
         Tab tab = getActivity().getActivityTab();
-        final ChromeHomeNewTabPage mNewTabPage = (ChromeHomeNewTabPage) tab.getNativePage();
+        final ChromeHomeNewTabPageBase mNewTabPage = (ChromeHomeNewTabPageBase) tab.getNativePage();
+
         ThreadUtils.runOnUiThreadBlocking(new Runnable() {
             @Override
             public void run() {
                 mNewTabPage.getCloseButtonForTests().callOnClick();
+                getActivity().getLayoutManager().getActiveLayout().finishAnimationsForTests();
             }
         });
 
+        mTabModelObserver.mDidCloseTabCallbackHelper.waitForCallback(currentCallCount, 1);
+
         validateState(false, true);
     }
 
@@ -156,7 +190,7 @@
             throws InterruptedException, TimeoutException {
         // Wait for two calls if animating; one is to SHEET_STATE_SCROLLING and the other is to the
         // final state.
-        mObserver.mStateChangedCallbackHelper.waitForCallback(
+        mBottomSheetObserver.mStateChangedCallbackHelper.waitForCallback(
                 mStateChangeCurrentCalls, animatesToState ? 2 : 1);
 
         if (newTabPageSelected) {
@@ -171,6 +205,6 @@
         }
 
         // Once the state is validated, update the call count.
-        mStateChangeCurrentCalls = mObserver.mStateChangedCallbackHelper.getCallCount();
+        mStateChangeCurrentCalls = mBottomSheetObserver.mStateChangedCallbackHelper.getCallCount();
     }
 }
diff --git a/chrome/android/junit/src/org/chromium/chrome/browser/Features.java b/chrome/android/junit/src/org/chromium/chrome/browser/Features.java
deleted file mode 100644
index fe766f03..0000000
--- a/chrome/android/junit/src/org/chromium/chrome/browser/Features.java
+++ /dev/null
@@ -1,75 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-package org.chromium.chrome.browser;
-
-import org.chromium.testing.local.AnnotationProcessor;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Annotation used to set Feature flags during JUnit tests. To have an effect, the associated
- * {@link Processor} rule needs to be registered on the test class.
- *
- * Use {@link Features.Register} to specify the features to register and whether they should be
- * enabled.
- *
- * Sample code:
- *
- * <pre>
- * public class Test {
- *    &#64;Rule
- *    public Features.Processor processor = new Features.Processor();
- *
- *    &#64;Features(&#64;Features.Register(ChromeFeatureList.CHROME_HOME))
- *    public void testFoo() { ... }
- * }
- * </pre>
- * // TODO(dgn): Use repeatable annotations (Requires Java 8 / Android N SDK)
- */
-@Inherited
-@Retention(RetentionPolicy.RUNTIME)
-@Target({ElementType.METHOD, ElementType.TYPE})
-public @interface Features {
-    Register[] value();
-
-    @interface Register {
-        String value();
-        boolean enabled() default true;
-    }
-
-    /**
-     * Add this rule to tests to activate the {@link Features} annotations and choose flags
-     * to enable, or get rid of exceptions when the production code tries to check for enabled
-     * features.
-     */
-    class Processor extends AnnotationProcessor<Features> {
-        public Processor() {
-            super(Features.class);
-        }
-
-        @Override
-        protected void before() throws Throwable {
-            Map<String, Boolean> registeredFeatures = new HashMap<>();
-            Register[] values = getAnnotation().value();
-
-            for (Register featureState : values) {
-                registeredFeatures.put(featureState.value(), featureState.enabled());
-            }
-
-            ChromeFeatureList.setTestFeatures(registeredFeatures);
-        }
-
-        @Override
-        protected void after() {
-            ChromeFeatureList.setTestFeatures(null);
-        }
-    }
-    }
\ No newline at end of file
diff --git a/chrome/android/junit/src/org/chromium/chrome/browser/ntp/cards/NewTabPageAdapterTest.java b/chrome/android/junit/src/org/chromium/chrome/browser/ntp/cards/NewTabPageAdapterTest.java
index daa2374..e8796b7 100644
--- a/chrome/android/junit/src/org/chromium/chrome/browser/ntp/cards/NewTabPageAdapterTest.java
+++ b/chrome/android/junit/src/org/chromium/chrome/browser/ntp/cards/NewTabPageAdapterTest.java
@@ -53,7 +53,6 @@
 import org.chromium.chrome.R;
 import org.chromium.chrome.browser.ChromeFeatureList;
 import org.chromium.chrome.browser.DisableHistogramsRule;
-import org.chromium.chrome.browser.Features;
 import org.chromium.chrome.browser.ntp.ContextMenuManager;
 import org.chromium.chrome.browser.ntp.cards.SignInPromo.SigninObserver;
 import org.chromium.chrome.browser.ntp.snippets.CategoryInt;
@@ -68,6 +67,7 @@
 import org.chromium.chrome.browser.suggestions.DestructionObserver;
 import org.chromium.chrome.browser.suggestions.SuggestionsMetricsReporter;
 import org.chromium.chrome.browser.suggestions.SuggestionsUiDelegate;
+import org.chromium.chrome.test.util.browser.Features;
 import org.chromium.chrome.test.util.browser.suggestions.ContentSuggestionsTestUtils.CategoryInfoBuilder;
 import org.chromium.chrome.test.util.browser.suggestions.FakeSuggestionsSource;
 import org.chromium.testing.local.LocalRobolectricTestRunner;
diff --git a/chrome/android/junit/src/org/chromium/chrome/browser/suggestions/TileGroupTest.java b/chrome/android/junit/src/org/chromium/chrome/browser/suggestions/TileGroupTest.java
index 4d2bec2a..46eb508 100644
--- a/chrome/android/junit/src/org/chromium/chrome/browser/suggestions/TileGroupTest.java
+++ b/chrome/android/junit/src/org/chromium/chrome/browser/suggestions/TileGroupTest.java
@@ -50,10 +50,10 @@
 import org.chromium.base.Callback;
 import org.chromium.chrome.R;
 import org.chromium.chrome.browser.ChromeFeatureList;
-import org.chromium.chrome.browser.Features;
 import org.chromium.chrome.browser.favicon.LargeIconBridge.LargeIconCallback;
 import org.chromium.chrome.browser.ntp.ContextMenuManager;
 import org.chromium.chrome.browser.offlinepages.OfflinePageBridge;
+import org.chromium.chrome.test.util.browser.Features;
 import org.chromium.testing.local.LocalRobolectricTestRunner;
 
 /**
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd
index 12af2df7..ef46b9f 100644
--- a/chrome/app/generated_resources.grd
+++ b/chrome/app/generated_resources.grd
@@ -1402,12 +1402,20 @@
         Anti-virus software failed unexpectedly while scanning this file.
       </message>
       <message name="IDS_DOWNLOAD_INTERRUPTED_STATUS_FILE_TOO_SHORT"
-              desc="A download resumption was attempted, but the file didn't exist or wasn't as large as expected">
-       File truncated
+               desc="A download resumption was attempted, but the file didn't exist or wasn't as large as expected">
+        File truncated
       </message>
       <message name="IDS_DOWNLOAD_INTERRUPTED_DESCRIPTION_FILE_TOO_SHORT"
-              desc="Download page message: A download resumption was attempted, but the file didn't exist or wasn't as large as expected">
-       Destination file was truncated or removed since last download.
+               desc="Download page message: A download resumption was attempted, but the file didn't exist or wasn't as large as expected">
+        Destination file was truncated or removed since last download.
+      </message>
+      <message name="IDS_DOWNLOAD_INTERRUPTED_STATUS_FILE_SAME_AS_SOURCE"
+               desc="The source and the target of the download file were the same. I.e. the user attempted to download the file onto itself.">
+        Already downloaded
+      </message>
+      <message name="IDS_DOWNLOAD_INTERRUPTED_DESCRIPTION_FILE_SAME_AS_SOURCE"
+               desc="Download page message: The source and the target of the download were the same.">
+        The file already exists in your download folder.
       </message>
       <message name="IDS_DOWNLOAD_INTERRUPTED_STATUS_NETWORK_TIMEOUT"
                desc="Network Timeout.">
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
index 39e83d9..cda77e2 100644
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -3312,6 +3312,8 @@
       "lifetime/keep_alive_types.h",
       "lifetime/scoped_keep_alive.cc",
       "lifetime/scoped_keep_alive.h",
+      "lifetime/termination_notification.cc",
+      "lifetime/termination_notification.h",
       "media/webrtc/tab_desktop_media_list.cc",
       "media/webrtc/tab_desktop_media_list.h",
       "media_galleries/chromeos/mtp_device_delegate_impl_chromeos.cc",
diff --git a/chrome/browser/browser_shutdown.cc b/chrome/browser/browser_shutdown.cc
index 33c5ee6..08043d25 100644
--- a/chrome/browser/browser_shutdown.cc
+++ b/chrome/browser/browser_shutdown.cc
@@ -49,22 +49,23 @@
 #include "chrome/browser/first_run/upgrade_util.h"
 #endif
 
+#if defined(OS_CHROMEOS)
+#include "chrome/browser/chromeos/boot_times_recorder.h"
+#include "chrome/browser/lifetime/termination_notification.h"
+#endif
+
 #if BUILDFLAG(ENABLE_BACKGROUND)
 #include "chrome/browser/background/background_mode_manager.h"
 #endif
 
-#if BUILDFLAG(ENABLE_RLZ)
-#include "components/rlz/rlz_tracker.h"
-#endif
-
-#if defined(OS_CHROMEOS)
-#include "chrome/browser/chromeos/boot_times_recorder.h"
-#endif
-
 #if BUILDFLAG(ENABLE_PRINT_PREVIEW)
 #include "chrome/browser/service_process/service_process_control.h"
 #endif
 
+#if BUILDFLAG(ENABLE_RLZ)
+#include "components/rlz/rlz_tracker.h"
+#endif
+
 using base::Time;
 using base::TimeDelta;
 using content::BrowserThread;
@@ -276,7 +277,7 @@
   }
 
 #if defined(OS_CHROMEOS)
-  chrome::NotifyAndTerminate(false);
+  NotifyAndTerminate(false /* fast_path */);
 #endif
 }
 #endif  // !defined(OS_ANDROID)
diff --git a/chrome/browser/chromeos/arc/accessibility/ax_tree_source_arc.cc b/chrome/browser/chromeos/arc/accessibility/ax_tree_source_arc.cc
index 4534fcd7..ef70c62 100644
--- a/chrome/browser/chromeos/arc/accessibility/ax_tree_source_arc.cc
+++ b/chrome/browser/chromeos/arc/accessibility/ax_tree_source_arc.cc
@@ -178,7 +178,6 @@
   // sources.
   // The FOCUSABLE state is not mapped because Android places focusability on
   // many ancestor nodes.
-  MAP_STATE(AXBooleanProperty::CHECKED, ui::AX_STATE_CHECKED);
   MAP_STATE(AXBooleanProperty::EDITABLE, ui::AX_STATE_EDITABLE);
   MAP_STATE(AXBooleanProperty::MULTI_LINE, ui::AX_STATE_MULTILINE);
   MAP_STATE(AXBooleanProperty::PASSWORD, ui::AX_STATE_PROTECTED);
@@ -186,6 +185,14 @@
 
 #undef MAP_STATE
 
+  if (GetBooleanProperty(node, AXBooleanProperty::CHECKABLE)) {
+    const bool is_checked =
+        GetBooleanProperty(node, AXBooleanProperty::CHECKED);
+    const ui::AXCheckedState checked_state =
+        is_checked ? ui::AX_CHECKED_STATE_TRUE : ui::AX_CHECKED_STATE_FALSE;
+    out_data->AddIntAttribute(ui::AX_ATTR_CHECKED_STATE, checked_state);
+  }
+
   if (!GetBooleanProperty(node, AXBooleanProperty::ENABLED))
     out_data->AddStateFlag(ui::AX_STATE_DISABLED);
 }
diff --git a/chrome/browser/download/download_browsertest.cc b/chrome/browser/download/download_browsertest.cc
index 0696283..a2c2eb9 100644
--- a/chrome/browser/download/download_browsertest.cc
+++ b/chrome/browser/download/download_browsertest.cc
@@ -2214,7 +2214,6 @@
       DownloadUrlParameters::CreateForWebContentsMainFrame(
           web_contents, url));
   params->set_file_path(target_file_full_path);
-  params->set_transient(true);
   DownloadManagerForBrowser(browser())->DownloadUrl(std::move(params));
   observer->WaitForFinished();
   EXPECT_EQ(1u, observer->NumDownloadsSeenInState(DownloadItem::COMPLETE));
@@ -2232,7 +2231,39 @@
   ASSERT_EQ(1u, downloads.size());
   content::DownloadUpdatedObserver(
       downloads[0], base::Bind(&WasAutoOpened)).WaitForEvent();
+}
+
+IN_PROC_BROWSER_TEST_F(DownloadTest, TransientDownload) {
+  GURL url(URLRequestMockHTTPJob::GetMockUrl(kDownloadTest1Path));
+
+  WebContents* web_contents =
+      browser()->tab_strip_model()->GetActiveWebContents();
+  ASSERT_TRUE(web_contents);
+
+  base::FilePath file(FILE_PATH_LITERAL("download-test1.lib"));
+  base::ScopedTempDir other_directory;
+  ASSERT_TRUE(other_directory.CreateUniqueTempDir());
+  base::FilePath target_file_full_path =
+      other_directory.GetPath().Append(file.BaseName());
+  content::DownloadTestObserver* observer(CreateWaiter(browser(), 1));
+  std::unique_ptr<DownloadUrlParameters> params(
+      DownloadUrlParameters::CreateForWebContentsMainFrame(web_contents, url));
+  params->set_file_path(target_file_full_path);
+  params->set_transient(true);
+  DownloadManagerForBrowser(browser())->DownloadUrl(std::move(params));
+  observer->WaitForFinished();
+  EXPECT_EQ(1u, observer->NumDownloadsSeenInState(DownloadItem::COMPLETE));
+
+  // Check state.
+  EXPECT_EQ(1, browser()->tab_strip_model()->count());
+  ASSERT_TRUE(CheckDownloadFullPaths(browser(), target_file_full_path,
+                                     OriginFile(file)));
+
+  std::vector<DownloadItem*> downloads;
+  DownloadManagerForBrowser(browser())->GetAllDownloads(&downloads);
+  ASSERT_EQ(1u, downloads.size());
   ASSERT_TRUE(downloads[0]->IsTransient());
+  ASSERT_FALSE(downloads[0]->IsTemporary());
 }
 
 IN_PROC_BROWSER_TEST_F(DownloadTest, SavePageNonHTMLViaGet) {
diff --git a/chrome/browser/download/download_item_model.cc b/chrome/browser/download/download_item_model.cc
index 51ff68d..8537abc 100644
--- a/chrome/browser/download/download_item_model.cc
+++ b/chrome/browser/download/download_item_model.cc
@@ -137,6 +137,9 @@
     case content::DOWNLOAD_INTERRUPT_REASON_FILE_TOO_SHORT:
       string_id = IDS_DOWNLOAD_INTERRUPTED_STATUS_FILE_TOO_SHORT;
       break;
+    case content::DOWNLOAD_INTERRUPT_REASON_FILE_SAME_AS_SOURCE:
+      string_id = IDS_DOWNLOAD_INTERRUPTED_STATUS_FILE_SAME_AS_SOURCE;
+      break;
     case content::DOWNLOAD_INTERRUPT_REASON_NETWORK_INVALID_REQUEST:
     case content::DOWNLOAD_INTERRUPT_REASON_NETWORK_FAILED:
       string_id = IDS_DOWNLOAD_INTERRUPTED_STATUS_NETWORK_ERROR;
@@ -222,6 +225,9 @@
     case content::DOWNLOAD_INTERRUPT_REASON_FILE_TOO_SHORT:
       string_id = IDS_DOWNLOAD_INTERRUPTED_DESCRIPTION_FILE_TOO_SHORT;
       break;
+    case content::DOWNLOAD_INTERRUPT_REASON_FILE_SAME_AS_SOURCE:
+      string_id = IDS_DOWNLOAD_INTERRUPTED_DESCRIPTION_FILE_SAME_AS_SOURCE;
+      break;
     case content::DOWNLOAD_INTERRUPT_REASON_NETWORK_INVALID_REQUEST:
     case content::DOWNLOAD_INTERRUPT_REASON_NETWORK_FAILED:
       string_id = IDS_DOWNLOAD_INTERRUPTED_DESCRIPTION_NETWORK_ERROR;
diff --git a/chrome/browser/download/download_item_model_unittest.cc b/chrome/browser/download/download_item_model_unittest.cc
index 7325f00..d39a6c37 100644
--- a/chrome/browser/download/download_item_model_unittest.cc
+++ b/chrome/browser/download/download_item_model_unittest.cc
@@ -143,6 +143,8 @@
        "Failed - Virus scan failed"},
       {content::DOWNLOAD_INTERRUPT_REASON_FILE_TOO_SHORT,
        "Failed - File truncated"},
+      {content::DOWNLOAD_INTERRUPT_REASON_FILE_SAME_AS_SOURCE,
+       "Failed - Already downloaded"},
       {content::DOWNLOAD_INTERRUPT_REASON_FILE_TRANSIENT_ERROR,
        "Failed - System busy"},
       {content::DOWNLOAD_INTERRUPT_REASON_FILE_HASH_MISMATCH,
@@ -217,6 +219,8 @@
        "foo.bar\nVirus scan failed"},
       {content::DOWNLOAD_INTERRUPT_REASON_FILE_TOO_SHORT,
        "foo.bar\nFile truncated"},
+      {content::DOWNLOAD_INTERRUPT_REASON_FILE_SAME_AS_SOURCE,
+       "foo.bar\nAlready downloaded"},
       {content::DOWNLOAD_INTERRUPT_REASON_FILE_TRANSIENT_ERROR,
        "foo.bar\nSystem busy"},
       {content::DOWNLOAD_INTERRUPT_REASON_FILE_HASH_MISMATCH,
diff --git a/chrome/browser/download/download_path_reservation_tracker.cc b/chrome/browser/download/download_path_reservation_tracker.cc
index 60f0a22..a165ea93 100644
--- a/chrome/browser/download/download_path_reservation_tracker.cc
+++ b/chrome/browser/download/download_path_reservation_tracker.cc
@@ -219,6 +219,13 @@
       return PathValidationResult::NAME_TOO_LONG;
   }
 
+  // Disallow downloading a file onto itself. Assume that downloading a file
+  // onto another file that differs only by case is not enough of a legitimate
+  // edge case to justify determining the case sensitivity of the underlying
+  // filesystem.
+  if (*target_path == info.source_path)
+    return PathValidationResult::SAME_AS_SOURCE;
+
   if (!IsPathInUse(*target_path))
     return PathValidationResult::SUCCESS;
 
diff --git a/chrome/browser/download/download_path_reservation_tracker.h b/chrome/browser/download/download_path_reservation_tracker.h
index 673e629..d13d845 100644
--- a/chrome/browser/download/download_path_reservation_tracker.h
+++ b/chrome/browser/download/download_path_reservation_tracker.h
@@ -19,7 +19,8 @@
   SUCCESS,
   PATH_NOT_WRITABLE,
   NAME_TOO_LONG,
-  CONFLICT
+  CONFLICT,
+  SAME_AS_SOURCE
 };
 
 // Chrome attempts to uniquify filenames that are assigned to downloads in order
diff --git a/chrome/browser/download/download_path_reservation_tracker_unittest.cc b/chrome/browser/download/download_path_reservation_tracker_unittest.cc
index 1f64d19..8ccc6f1 100644
--- a/chrome/browser/download/download_path_reservation_tracker_unittest.cc
+++ b/chrome/browser/download/download_path_reservation_tracker_unittest.cc
@@ -308,6 +308,31 @@
   base::RunLoop().RunUntilIdle();
 }
 
+// If the source is a file:// URL that is in the download directory, then Chrome
+// could download the file onto itself. Test that this is flagged by DPRT.
+TEST_F(DownloadPathReservationTrackerTest, ConflictWithSource) {
+  std::unique_ptr<MockDownloadItem> item(CreateDownloadItem(1));
+  base::FilePath path(
+      GetPathInDownloadsDirectory(FILE_PATH_LITERAL("foo.txt")));
+  ASSERT_EQ(0, base::WriteFile(path, "", 0));
+  ASSERT_TRUE(IsPathInUse(path));
+  EXPECT_CALL(*item, GetURL())
+      .WillRepeatedly(ReturnRefOfCopy(net::FilePathToFileURL(path)));
+
+  base::FilePath reserved_path;
+  PathValidationResult result = PathValidationResult::NAME_TOO_LONG;
+  bool create_directory = false;
+  DownloadPathReservationTracker::FilenameConflictAction conflict_action =
+      DownloadPathReservationTracker::UNIQUIFY;
+  CallGetReservedPath(item.get(), path, create_directory, conflict_action,
+                      &reserved_path, &result);
+  EXPECT_EQ(PathValidationResult::SAME_AS_SOURCE, result);
+
+  SetDownloadItemState(item.get(), DownloadItem::COMPLETE);
+  item.reset();
+  base::RunLoop().RunUntilIdle();
+}
+
 // Multiple reservations for the same path should uniquify around each other.
 TEST_F(DownloadPathReservationTrackerTest, ConflictingReservations) {
   std::unique_ptr<MockDownloadItem> item1(CreateDownloadItem(1));
diff --git a/chrome/browser/download/download_target_determiner.cc b/chrome/browser/download/download_target_determiner.cc
index 47820a5..0364334 100644
--- a/chrome/browser/download/download_target_determiner.cc
+++ b/chrome/browser/download/download_target_determiner.cc
@@ -316,6 +316,7 @@
 
   switch (result) {
     case PathValidationResult::SUCCESS:
+    case PathValidationResult::SAME_AS_SOURCE:
       break;
 
     case PathValidationResult::PATH_NOT_WRITABLE:
diff --git a/chrome/browser/download/download_target_determiner_unittest.cc b/chrome/browser/download/download_target_determiner_unittest.cc
index 06c410d..f369e88 100644
--- a/chrome/browser/download/download_target_determiner_unittest.cc
+++ b/chrome/browser/download/download_target_determiner_unittest.cc
@@ -890,6 +890,7 @@
     RunTestCasesWithActiveItem(&kSaveAsToVirtualDir, 1);
   }
 
+  // "Save as" is not supported on Android.
   {
     SCOPED_TRACE(testing::Message() << "Save As to local directory");
     const DownloadTestCase kSaveAsToLocalDir = {
diff --git a/chrome/browser/extensions/process_manager_browsertest.cc b/chrome/browser/extensions/process_manager_browsertest.cc
index adaf411..e7022f0 100644
--- a/chrome/browser/extensions/process_manager_browsertest.cc
+++ b/chrome/browser/extensions/process_manager_browsertest.cc
@@ -1220,4 +1220,55 @@
   VerifyPostMessageToOpener(popup->GetMainFrame(), extension_frame);
 }
 
+// Test that when a web site has an extension iframe, navigating that iframe to
+// a different web site without --site-per-process will place it in the parent
+// frame's process.  See https://crbug.com/711006.
+IN_PROC_BROWSER_TEST_F(ProcessManagerBrowserTest,
+                       ExtensionFrameNavigatesToParentSiteInstance) {
+  // This test matters only *without* --site-per-process.
+  if (content::AreAllSitesIsolatedForTesting())
+    return;
+
+  host_resolver()->AddRule("*", "127.0.0.1");
+
+  // Create a simple extension without a background page.
+  const Extension* extension = CreateExtension("Extension", false);
+  embedded_test_server()->ServeFilesFromDirectory(extension->path());
+  ASSERT_TRUE(embedded_test_server()->Start());
+
+  // Navigate main tab to a web page with a blank iframe.  There should be no
+  // extension frames yet.
+  NavigateToURL(embedded_test_server()->GetURL("a.com", "/blank_iframe.html"));
+  ProcessManager* pm = ProcessManager::Get(profile());
+  EXPECT_EQ(0u, pm->GetAllFrames().size());
+  EXPECT_EQ(0u, pm->GetRenderFrameHostsForExtension(extension->id()).size());
+
+  content::WebContents* tab =
+      browser()->tab_strip_model()->GetActiveWebContents();
+
+  // Navigate subframe to an extension URL.  This should go into a new
+  // extension process.
+  const GURL extension_url(extension->url().Resolve("empty.html"));
+  EXPECT_TRUE(content::NavigateIframeToURL(tab, "frame0", extension_url));
+  EXPECT_EQ(1u, pm->GetRenderFrameHostsForExtension(extension->id()).size());
+  EXPECT_EQ(1u, pm->GetAllFrames().size());
+
+  content::RenderFrameHost* main_frame = tab->GetMainFrame();
+  {
+    content::RenderFrameHost* subframe = ChildFrameAt(main_frame, 0);
+    EXPECT_NE(subframe->GetProcess(), main_frame->GetProcess());
+    EXPECT_NE(subframe->GetSiteInstance(), main_frame->GetSiteInstance());
+  }
+
+  // Navigate subframe to b.com.  This should be brought back to the parent
+  // frame's (a.com) process.
+  GURL b_url(embedded_test_server()->GetURL("b.com", "/empty.html"));
+  EXPECT_TRUE(content::NavigateIframeToURL(tab, "frame0", b_url));
+  {
+    content::RenderFrameHost* subframe = ChildFrameAt(main_frame, 0);
+    EXPECT_EQ(subframe->GetProcess(), main_frame->GetProcess());
+    EXPECT_EQ(subframe->GetSiteInstance(), main_frame->GetSiteInstance());
+  }
+}
+
 }  // namespace extensions
diff --git a/chrome/browser/io_thread_unittest.cc b/chrome/browser/io_thread_unittest.cc
index 118a20c..48be0096 100644
--- a/chrome/browser/io_thread_unittest.cc
+++ b/chrome/browser/io_thread_unittest.cc
@@ -300,7 +300,6 @@
   variations::testing::ClearAllVariationParams();
 
   std::map<std::string, std::string> field_trial_params;
-  field_trial_params["always_require_handshake_confirmation"] = "true";
   field_trial_params["disable_delay_tcp_race"] = "true";
   variations::AssociateVariationParams("QUIC", "Enabled", field_trial_params);
   base::FieldTrialList::CreateFieldTrial("QUIC", "Enabled");
@@ -310,7 +309,6 @@
   ConfigureParamsFromFieldTrialsAndCommandLine();
 
   EXPECT_FALSE(params_.enable_quic);
-  EXPECT_FALSE(params_.quic_always_require_handshake_confirmation);
   EXPECT_TRUE(params_.quic_delay_tcp_race);
 }
 
diff --git a/chrome/browser/lifetime/application_lifetime.cc b/chrome/browser/lifetime/application_lifetime.cc
index e6578f0..a744e083 100644
--- a/chrome/browser/lifetime/application_lifetime.cc
+++ b/chrome/browser/lifetime/application_lifetime.cc
@@ -27,11 +27,6 @@
 #include "chrome/browser/metrics/thread_watcher.h"
 #include "chrome/browser/profiles/profile.h"
 #include "chrome/browser/profiles/profile_manager.h"
-#include "chrome/browser/ui/browser.h"
-#include "chrome/browser/ui/browser_finder.h"
-#include "chrome/browser/ui/browser_list.h"
-#include "chrome/browser/ui/browser_tabstrip.h"
-#include "chrome/browser/ui/browser_window.h"
 #include "chrome/browser/ui/tabs/tab_strip_model.h"
 #include "chrome/browser/ui/user_manager.h"
 #include "chrome/common/chrome_constants.h"
@@ -43,16 +38,20 @@
 #include "content/public/browser/navigation_details.h"
 #include "content/public/browser/notification_service.h"
 
+#if !defined(OS_ANDROID)
+#include "chrome/browser/lifetime/termination_notification.h"
+#include "chrome/browser/ui/browser.h"
+#include "chrome/browser/ui/browser_finder.h"
+#include "chrome/browser/ui/browser_list.h"
+#include "chrome/browser/ui/browser_tabstrip.h"
+#include "chrome/browser/ui/browser_window.h"
+#endif
+
 #if defined(OS_CHROMEOS)
-#include "base/sys_info.h"
 #include "chrome/browser/chromeos/boot_times_recorder.h"
 #include "chrome/browser/chromeos/settings/cros_settings.h"
 #include "chromeos/dbus/dbus_thread_manager.h"
 #include "chromeos/dbus/power_policy_controller.h"
-#include "chromeos/dbus/session_manager_client.h"
-#include "chromeos/dbus/update_engine_client.h"
-#include "chromeos/settings/cros_settings_names.h"
-#include "ui/base/l10n/l10n_util.h"
 #endif
 
 #if defined(OS_WIN)
@@ -136,7 +135,7 @@
 #endif
 
   content::NotificationService::current()->Notify(
-      chrome::NOTIFICATION_CLOSE_ALL_BROWSERS_REQUEST,
+      NOTIFICATION_CLOSE_ALL_BROWSERS_REQUEST,
       content::NotificationService::AllSources(),
       content::NotificationService::NoDetails());
 
@@ -150,7 +149,7 @@
 }
 
 void ShutdownIfNoBrowsers() {
-  if (chrome::GetTotalBrowserCount() > 0)
+  if (GetTotalBrowserCount() > 0)
     return;
 
   // Tell everyone that we are shutting down.
@@ -163,15 +162,15 @@
   ProfileManager::ShutdownSessionServices();
 #endif
 
-  chrome::NotifyAndTerminate(true);
-  chrome::OnAppExiting();
+  browser_shutdown::NotifyAndTerminate(true /* fast_path */);
+  OnAppExiting();
 }
 
 void CloseAllBrowsers() {
   // If there are no browsers and closing the last browser would quit the
   // application, send the APP_TERMINATING action here. Otherwise, it will be
   // sent by RemoveBrowser() when the last browser has closed.
-  if (chrome::GetTotalBrowserCount() == 0 &&
+  if (GetTotalBrowserCount() == 0 &&
       (browser_shutdown::IsTryingToQuit() ||
        !KeepAliveRegistry::GetInstance()->IsKeepingAlive())) {
     ShutdownIfNoBrowsers();
@@ -207,7 +206,7 @@
   g_send_stop_request_to_session_manager = true;
   // On ChromeOS, always terminate the browser, regardless of the result of
   // AreAllBrowsersCloseable(). See crbug.com/123107.
-  chrome::NotifyAndTerminate(true);
+  browser_shutdown::NotifyAndTerminate(true /* fast_path */);
 #else
   // Reset the restart bit that might have been set in cancelled restart
   // request.
@@ -229,7 +228,7 @@
   // before restarting, as the restarted processes will inherit their
   // environment variables from ours, thus suppressing crash uploads.
   if (!ChromeMetricsServiceAccessor::IsMetricsAndCrashReportingEnabled()) {
-    HMODULE exe_module = GetModuleHandle(chrome::kBrowserProcessExecutableName);
+    HMODULE exe_module = GetModuleHandle(kBrowserProcessExecutableName);
     if (exe_module) {
       typedef void (__cdecl *ClearBreakpadPipeEnvVar)();
       ClearBreakpadPipeEnvVar clear = reinterpret_cast<ClearBreakpadPipeEnvVar>(
@@ -269,7 +268,7 @@
   chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->RequestRestart();
   // If running the Chrome OS build, but we're not on the device, fall through.
 #endif
-  chrome::AttemptRestart();
+  AttemptRestart();
 }
 
 void AttemptExit() {
@@ -306,6 +305,10 @@
     browser_shutdown::OnShutdownStarting(browser_shutdown::BROWSER_EXIT);
   AttemptExitInternal(true);
 }
+
+bool IsAttemptingShutdown() {
+  return g_send_stop_request_to_session_manager;
+}
 #endif
 
 #if !defined(OS_ANDROID)
@@ -346,7 +349,7 @@
   browser_shutdown::RecordShutdownInfoPrefs();
 
   content::NotificationService::current()->Notify(
-      chrome::NOTIFICATION_CLOSE_ALL_BROWSERS_REQUEST,
+      NOTIFICATION_CLOSE_ALL_BROWSERS_REQUEST,
       content::NotificationService::AllSources(),
       content::NotificationService::NoDetails());
 
@@ -370,67 +373,6 @@
   ShutdownIfNoBrowsers();
 }
 
-#endif  // !defined(OS_ANDROID)
-
-void NotifyAppTerminating() {
-  static bool notified = false;
-  if (notified)
-    return;
-  notified = true;
-  content::NotificationService::current()->Notify(
-      chrome::NOTIFICATION_APP_TERMINATING,
-      content::NotificationService::AllSources(),
-      content::NotificationService::NoDetails());
-}
-
-void NotifyAndTerminate(bool fast_path) {
-  NotifyAndTerminate(fast_path, RebootPolicy::kOptionalReboot);
-}
-
-void NotifyAndTerminate(bool fast_path, RebootPolicy reboot_policy) {
-#if defined(OS_CHROMEOS)
-  static bool notified = false;
-  // Return if a shutdown request has already been sent.
-  if (notified)
-    return;
-  notified = true;
-#endif
-
-  if (fast_path)
-    NotifyAppTerminating();
-
-#if defined(OS_CHROMEOS)
-  if (chromeos::PowerPolicyController::IsInitialized())
-    chromeos::PowerPolicyController::Get()->NotifyChromeIsExiting();
-
-  if (base::SysInfo::IsRunningOnChromeOS()) {
-    // If we're on a ChromeOS device, reboot if an update has been applied,
-    // or else signal the session manager to log out.
-    chromeos::UpdateEngineClient* update_engine_client =
-        chromeos::DBusThreadManager::Get()->GetUpdateEngineClient();
-    if (update_engine_client->GetLastStatus().status ==
-            chromeos::UpdateEngineClient::UPDATE_STATUS_UPDATED_NEED_REBOOT ||
-        reboot_policy == RebootPolicy::kForceReboot) {
-      update_engine_client->RebootAfterUpdate();
-    } else if (g_send_stop_request_to_session_manager) {
-      // Don't ask SessionManager to stop session if the shutdown request comes
-      // from session manager.
-      chromeos::DBusThreadManager::Get()
-          ->GetSessionManagerClient()
-          ->StopSession();
-    }
-  } else {
-    if (g_send_stop_request_to_session_manager) {
-      // If running the Chrome OS build, but we're not on the device, act
-      // as if we received signal from SessionManager.
-      content::BrowserThread::PostTask(content::BrowserThread::UI, FROM_HERE,
-                                       base::Bind(&ExitCleanly));
-    }
-  }
-#endif
-}
-
-#if !defined(OS_ANDROID)
 void OnAppExiting() {
   static bool notified = false;
   if (notified)
diff --git a/chrome/browser/lifetime/application_lifetime.h b/chrome/browser/lifetime/application_lifetime.h
index cccbe17..29157dd 100644
--- a/chrome/browser/lifetime/application_lifetime.h
+++ b/chrome/browser/lifetime/application_lifetime.h
@@ -49,6 +49,9 @@
 // If you need to exit or restart in your code on ChromeOS,
 // use AttemptExit or AttemptRestart respectively.
 void ExitCleanly();
+
+// Returns true if any of the above Attempt calls have been called.
+bool IsAttemptingShutdown();
 #endif
 
 #if !defined(OS_ANDROID)
@@ -68,23 +71,6 @@
 // Begins shutdown of the application when the desktop session is ending.
 void SessionEnding();
 
-#endif  // !defined(OS_ANDROID)
-
-// Emits APP_TERMINATING notification. It is guaranteed that the
-// notification is sent only once.
-void NotifyAppTerminating();
-
-// Send out notifications.
-// For ChromeOS, also request session manager to end the session.
-// |lifetime| is used to signal whether or not a reboot should be forced. By
-// default, the functions only reboot the system if an update is available. When
-// a component flash update is present, but not a system update, the
-// kForceReboot flag is passed.
-enum class RebootPolicy { kForceReboot, kOptionalReboot };
-void NotifyAndTerminate(bool fast_path);
-void NotifyAndTerminate(bool fast_path, RebootPolicy reboot_policy);
-
-#if !defined(OS_ANDROID)
 // Called once the application is exiting.
 void OnAppExiting();
 
diff --git a/chrome/browser/lifetime/application_lifetime_aura.cc b/chrome/browser/lifetime/application_lifetime_aura.cc
index 03d55c1d..d6fb7ec5 100644
--- a/chrome/browser/lifetime/application_lifetime_aura.cc
+++ b/chrome/browser/lifetime/application_lifetime_aura.cc
@@ -8,6 +8,7 @@
 #include "build/build_config.h"
 #include "chrome/browser/browser_process.h"
 #include "chrome/browser/browser_process_platform_part.h"
+#include "chrome/browser/lifetime/termination_notification.h"
 #include "chrome/browser/notifications/notification_ui_manager.h"
 #include "chrome/common/chrome_switches.h"
 #include "ui/aura/client/capture_client.h"
@@ -48,7 +49,7 @@
     // if something prevents a browser from closing before SetTryingToQuit()
     // gets called (e.g. browser->TabsNeedBeforeUnloadFired() is true).
     // NotifyAndTerminate does nothing if called more than once.
-    NotifyAndTerminate(true);
+    browser_shutdown::NotifyAndTerminate(true /* fast_path */);
   }
 #endif
 }
diff --git a/chrome/browser/lifetime/termination_notification.cc b/chrome/browser/lifetime/termination_notification.cc
new file mode 100644
index 0000000..9b3de4ef
--- /dev/null
+++ b/chrome/browser/lifetime/termination_notification.cc
@@ -0,0 +1,80 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/lifetime/termination_notification.h"
+
+#include "chrome/browser/chrome_notification_types.h"
+#include "chrome/browser/lifetime/application_lifetime.h"
+#include "content/public/browser/browser_thread.h"
+#include "content/public/browser/notification_service.h"
+
+#if defined(OS_CHROMEOS)
+#include "base/sys_info.h"
+#include "chromeos/dbus/dbus_thread_manager.h"
+#include "chromeos/dbus/power_policy_controller.h"
+#include "chromeos/dbus/session_manager_client.h"
+#include "chromeos/dbus/update_engine_client.h"
+#endif
+
+namespace browser_shutdown {
+
+void NotifyAppTerminating() {
+  static bool notified = false;
+  if (notified)
+    return;
+  notified = true;
+  content::NotificationService::current()->Notify(
+      chrome::NOTIFICATION_APP_TERMINATING,
+      content::NotificationService::AllSources(),
+      content::NotificationService::NoDetails());
+}
+
+void NotifyAndTerminate(bool fast_path) {
+  NotifyAndTerminate(fast_path, RebootPolicy::kOptionalReboot);
+}
+
+void NotifyAndTerminate(bool fast_path, RebootPolicy reboot_policy) {
+#if defined(OS_CHROMEOS)
+  static bool notified = false;
+  // Return if a shutdown request has already been sent.
+  if (notified)
+    return;
+  notified = true;
+#endif
+
+  if (fast_path)
+    NotifyAppTerminating();
+
+#if defined(OS_CHROMEOS)
+  if (chromeos::PowerPolicyController::IsInitialized())
+    chromeos::PowerPolicyController::Get()->NotifyChromeIsExiting();
+
+  if (base::SysInfo::IsRunningOnChromeOS()) {
+    // If we're on a ChromeOS device, reboot if an update has been applied,
+    // or else signal the session manager to log out.
+    chromeos::UpdateEngineClient* update_engine_client =
+        chromeos::DBusThreadManager::Get()->GetUpdateEngineClient();
+    if (update_engine_client->GetLastStatus().status ==
+            chromeos::UpdateEngineClient::UPDATE_STATUS_UPDATED_NEED_REBOOT ||
+        reboot_policy == RebootPolicy::kForceReboot) {
+      update_engine_client->RebootAfterUpdate();
+    } else if (chrome::IsAttemptingShutdown()) {
+      // Don't ask SessionManager to stop session if the shutdown request comes
+      // from session manager.
+      chromeos::DBusThreadManager::Get()
+          ->GetSessionManagerClient()
+          ->StopSession();
+    }
+  } else {
+    if (chrome::IsAttemptingShutdown()) {
+      // If running the Chrome OS build, but we're not on the device, act
+      // as if we received signal from SessionManager.
+      content::BrowserThread::PostTask(content::BrowserThread::UI, FROM_HERE,
+                                       base::Bind(&chrome::ExitCleanly));
+    }
+  }
+#endif
+}
+
+}  // namespace browser_shutdown
diff --git a/chrome/browser/lifetime/termination_notification.h b/chrome/browser/lifetime/termination_notification.h
new file mode 100644
index 0000000..39f550aa
--- /dev/null
+++ b/chrome/browser/lifetime/termination_notification.h
@@ -0,0 +1,26 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_LIFETIME_TERMINATION_NOTIFICATION_H_
+#define CHROME_BROWSER_LIFETIME_TERMINATION_NOTIFICATION_H_
+
+namespace browser_shutdown {
+
+// Emits APP_TERMINATING notification. It is guaranteed that the
+// notification is sent only once.
+void NotifyAppTerminating();
+
+// Send out notifications.
+// For ChromeOS, also request session manager to end the session.
+// |reboot_policy| is used to signal whether or not a reboot should be forced.
+// By default, the functions only reboot the system if an update is available.
+// When a component flash update is present, but not a system update, the
+// kForceReboot flag is passed.
+enum class RebootPolicy { kForceReboot, kOptionalReboot };
+void NotifyAndTerminate(bool fast_path);
+void NotifyAndTerminate(bool fast_path, RebootPolicy reboot_policy);
+
+}  // namespace browser_shutdown
+
+#endif  // CHROME_BROWSER_LIFETIME_TERMINATION_NOTIFICATION_H_
diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc
index 126c287..f0b7344a 100644
--- a/chrome/browser/prefs/browser_prefs.cc
+++ b/chrome/browser/prefs/browser_prefs.cc
@@ -136,6 +136,7 @@
 #include "chrome/browser/signin/easy_unlock_service.h"
 #include "chrome/browser/ui/toolbar/toolbar_actions_bar.h"
 #include "chrome/browser/ui/webui/extensions/extension_settings_handler.h"
+#include "extensions/browser/api/audio/audio_api.h"
 #include "extensions/browser/api/runtime/runtime_api.h"
 #include "extensions/browser/extension_prefs.h"
 #if defined(ENABLE_MEDIA_ROUTER)
@@ -530,6 +531,7 @@
   RegisterAnimationPolicyPrefs(registry);
   ToolbarActionsBar::RegisterProfilePrefs(registry);
   extensions::ActivityLog::RegisterProfilePrefs(registry);
+  extensions::AudioAPI::RegisterUserPrefs(registry);
   extensions::ExtensionPrefs::RegisterProfilePrefs(registry);
   extensions::launch_util::RegisterProfilePrefs(registry);
   extensions::RuntimeAPI::RegisterPrefs(registry);
diff --git a/chrome/browser/previews/previews_infobar_delegate.cc b/chrome/browser/previews/previews_infobar_delegate.cc
index 1a1a9e1..2444cde5 100644
--- a/chrome/browser/previews/previews_infobar_delegate.cc
+++ b/chrome/browser/previews/previews_infobar_delegate.cc
@@ -49,6 +49,8 @@
 PreviewsInfoBarDelegate::~PreviewsInfoBarDelegate() {
   if (!on_dismiss_callback_.is_null())
     on_dismiss_callback_.Run(false);
+
+  RecordPreviewsInfoBarAction(infobar_type_, infobar_dismissed_action_);
 }
 
 // static
@@ -93,6 +95,7 @@
     const OnDismissPreviewsInfobarCallback& on_dismiss_callback)
     : ConfirmInfoBarDelegate(),
       infobar_type_(infobar_type),
+      infobar_dismissed_action_(INFOBAR_DISMISSED_BY_TAB_CLOSURE),
       message_text_(l10n_util::GetStringUTF16(
           is_data_saver_user ? IDS_PREVIEWS_INFOBAR_SAVED_DATA_TITLE
                              : IDS_PREVIEWS_INFOBAR_FASTER_PAGE_TITLE)),
@@ -113,14 +116,14 @@
 
 bool PreviewsInfoBarDelegate::ShouldExpire(
     const NavigationDetails& details) const {
-  RecordPreviewsInfoBarAction(
-      infobar_type_, details.is_reload ? INFOBAR_DISMISSED_BY_RELOAD
-                                       : INFOBAR_DISMISSED_BY_NAVIGATION);
+  infobar_dismissed_action_ = details.is_reload
+                                  ? INFOBAR_DISMISSED_BY_RELOAD
+                                  : INFOBAR_DISMISSED_BY_NAVIGATION;
   return InfoBarDelegate::ShouldExpire(details);
 }
 
 void PreviewsInfoBarDelegate::InfoBarDismissed() {
-  RecordPreviewsInfoBarAction(infobar_type_, INFOBAR_DISMISSED_BY_USER);
+  infobar_dismissed_action_ = INFOBAR_DISMISSED_BY_USER;
 }
 
 base::string16 PreviewsInfoBarDelegate::GetMessageText() const {
@@ -136,7 +139,7 @@
 }
 
 bool PreviewsInfoBarDelegate::LinkClicked(WindowOpenDisposition disposition) {
-  RecordPreviewsInfoBarAction(infobar_type_, INFOBAR_LOAD_ORIGINAL_CLICKED);
+  infobar_dismissed_action_ = INFOBAR_LOAD_ORIGINAL_CLICKED;
   if (!on_dismiss_callback_.is_null())
     on_dismiss_callback_.Run(true);
   on_dismiss_callback_.Reset();
diff --git a/chrome/browser/previews/previews_infobar_delegate.h b/chrome/browser/previews/previews_infobar_delegate.h
index cc35b24..f362be5 100644
--- a/chrome/browser/previews/previews_infobar_delegate.h
+++ b/chrome/browser/previews/previews_infobar_delegate.h
@@ -37,6 +37,7 @@
     INFOBAR_DISMISSED_BY_USER = 2,
     INFOBAR_DISMISSED_BY_NAVIGATION = 3,
     INFOBAR_DISMISSED_BY_RELOAD = 4,
+    INFOBAR_DISMISSED_BY_TAB_CLOSURE = 5,
     INFOBAR_INDEX_BOUNDARY
   };
 
@@ -68,6 +69,7 @@
   bool LinkClicked(WindowOpenDisposition disposition) override;
 
   PreviewsInfoBarType infobar_type_;
+  mutable PreviewsInfoBarAction infobar_dismissed_action_;
 
   const base::string16 message_text_;
 
diff --git a/chrome/browser/previews/previews_infobar_delegate_unittest.cc b/chrome/browser/previews/previews_infobar_delegate_unittest.cc
index dfcc45d3..c4fb5754 100644
--- a/chrome/browser/previews/previews_infobar_delegate_unittest.cc
+++ b/chrome/browser/previews/previews_infobar_delegate_unittest.cc
@@ -223,6 +223,23 @@
   EXPECT_FALSE(user_opt_out_.value());
 }
 
+TEST_F(PreviewsInfoBarDelegateUnitTest, InfobarTestTabClosedDismissal) {
+  base::HistogramTester tester;
+
+  CreateInfoBar(PreviewsInfoBarDelegate::LOFI, true /* is_data_saver_user */);
+
+  // Delete the infobar without any other infobar actions.
+  infobar_service()->infobar_at(0)->RemoveSelf();
+  EXPECT_EQ(0U, infobar_service()->infobar_count());
+
+  tester.ExpectBucketCount(
+      kUMAPreviewsInfoBarActionLoFi,
+      PreviewsInfoBarDelegate::INFOBAR_DISMISSED_BY_TAB_CLOSURE, 1);
+  EXPECT_EQ(0, drp_test_context_->pref_service()->GetInteger(
+                   data_reduction_proxy::prefs::kLoFiLoadImagesPerSession));
+  EXPECT_FALSE(user_opt_out_.value());
+}
+
 TEST_F(PreviewsInfoBarDelegateUnitTest, InfobarTestClickLinkLoFi) {
   base::HistogramTester tester;
 
diff --git a/chrome/browser/resources/chromeos/chromevox/common/aria_util.js b/chrome/browser/resources/chromeos/chromevox/common/aria_util.js
index b73ab77..435c968 100644
--- a/chrome/browser/resources/chromeos/chromevox/common/aria_util.js
+++ b/chrome/browser/resources/chromeos/chromevox/common/aria_util.js
@@ -111,9 +111,9 @@
        'list' : 'aria_autocomplete_list',
        'both' : 'aria_autocomplete_both'} },
   { name: 'aria-checked', values:
-      {'true' : 'aria_checked_true',
-       'false' : 'aria_checked_false',
-       'mixed' : 'aria_checked_mixed'} },
+      {'true' : 'checked_true',
+       'false' : 'checked_false',
+       'mixed' : 'checked_mixed'} },
   { name: 'aria-disabled', values:
       {'true' : 'aria_disabled_true'} },
   { name: 'aria-expanded', values:
diff --git a/chrome/browser/resources/chromeos/chromevox/common/msgs.js b/chrome/browser/resources/chromeos/chromevox/common/msgs.js
index 98f0995a..afb7720a 100644
--- a/chrome/browser/resources/chromeos/chromevox/common/msgs.js
+++ b/chrome/browser/resources/chromeos/chromevox/common/msgs.js
@@ -152,12 +152,12 @@
   ROLE_OPTION: ' ',
   /** Braille of element with the ARIA role option. */
   ROLE_OPTION_BRL: ' ',
-  /** Braille of element with the ARIA attribute aria-checked=true. */
-  ARIA_CHECKED_TRUE_BRL: '(x)',
-  /** Braille of element with the ARIA attribute aria-checked=false. */
-  ARIA_CHECKED_FALSE_BRL: '( )',
-  /** Braille of element with the ARIA attribute aria-checked=mixed. */
-  ARIA_CHECKED_MIXED_BRL: '(-)',
+  /** Braille of element that is checked. */
+  CHECKED_TRUE_BRL: '(x)',
+  /** Braille of element that is unchecked. */
+  CHECKED_FALSE_BRL: '( )',
+  /** Braille of element where the checked state is mixed or indeterminate. */
+  CHECKED_MIXED_BRL: '(-)',
   /** Braille of element with the ARIA attribute aria-disabled=true. */
   ARIA_DISABLED_TRUE_BRL: 'xx',
   /** Braille of element with the ARIA attribute aria-expanded=true. */
diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/output.js b/chrome/browser/resources/chromeos/chromevox/cvox2/background/output.js
index d3fd9de..3ce0930 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/output.js
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/output.js
@@ -724,6 +724,21 @@
   Output.forceModeForNextSpeechUtterance_ = mode;
 };
 
+/**
+ * For a given automation property, return true if the value
+ * represents something 'truthy', e.g.: for checked:
+ * 'true'|'mixed' -> true
+ * 'false'|undefined -> false
+ */
+Output.isTruthy = function(node, attrib) {
+  switch(attrib) {
+    case 'checked':
+      return node.checked && node.checked !== 'false';
+    default:
+      return node[attrib] !== undefined || node.state[attrib];
+  }
+};
+
 Output.prototype = {
   /**
    * @return {boolean} True if there's any speech that will be output.
@@ -1156,20 +1171,16 @@
           }
         } else if (token == 'checked') {
           var msg;
-          var ariaChecked = node.htmlAttributes['aria-checked'];
-          switch (ariaChecked) {
+          switch (node.checked) {
             case 'mixed':
-              msg = 'aria_checked_mixed';
+              msg = 'checked_mixed';
               break;
             case 'true':
-              msg = 'aria_checked_true';
-              break;
-            case 'false':
-              msg = 'aria_checked_false';
+              msg = 'checked_true';
               break;
             default:
-              msg = node.state[StateType.CHECKED] ?
-                  'aria_checked_true' : 'aria_checked_false';
+              msg = 'checked_false';
+              break;
           }
           this.format_(node, '@' + msg, buff);
         } else if (token == 'state') {
@@ -1301,7 +1312,7 @@
           if (token == 'if') {
             var cond = tree.firstChild;
             var attrib = cond.value.slice(1);
-            if (node[attrib] !== undefined || node.state[attrib])
+            if (Output.isTruthy(node, attrib))
               this.format_(node, cond.nextSibling, buff);
             else
               this.format_(node, cond.nextSibling.nextSibling, buff);
diff --git a/chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings.grd b/chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings.grd
index 2761bda..7ed86e8 100644
--- a/chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings.grd
+++ b/chrome/browser/resources/chromeos/chromevox/strings/chromevox_strings.grd
@@ -1381,13 +1381,13 @@
       <message desc="Shown on a braille display as a suffix to text fields and combo boxes when suggestions on how to complete the field are shown in a list and the currently selected value is shown as text after the caret in the input field. When translating, try to find a contracted form of the translation for 'autocomplete inline and list' according to local conventions. If reasonable, use all lowercase and avoid punctuation to keep the number of characters as low as possible." name="IDS_CHROMEVOX_ARIA_AUTOCOMPLETE_BOTH_BRL">
         autoinl+lst
       </message>
-      <message desc="Describes an element with the ARIA attribute aria-checked=true." name="IDS_CHROMEVOX_ARIA_CHECKED_TRUE">
+      <message desc="Describes an element that is checked." name="IDS_CHROMEVOX_CHECKED_TRUE">
         Checked
       </message>
-      <message desc="Describes an element with the ARIA attribute aria-checked=false." name="IDS_CHROMEVOX_ARIA_CHECKED_FALSE">
+      <message desc="Describes an element that is unchecked." name="IDS_CHROMEVOX_CHECKED_FALSE">
         Not checked
       </message>
-      <message desc="Describes an element with the ARIA attribute aria-checked=mixed." name="IDS_CHROMEVOX_ARIA_CHECKED_MIXED">
+      <message desc="Describes an element where the checked state is mixed or indeterminate." name="IDS_CHROMEVOX_CHECKED_MIXED">
         Partially checked
       </message>
       <message desc="Describes an element with the ARIA attribute aria-disabled=true." name="IDS_CHROMEVOX_ARIA_DISABLED_TRUE">
diff --git a/chrome/browser/resources/feedback/html/default.html b/chrome/browser/resources/feedback/html/default.html
index 5b03af1..debe0a53 100644
--- a/chrome/browser/resources/feedback/html/default.html
+++ b/chrome/browser/resources/feedback/html/default.html
@@ -49,7 +49,7 @@
       <input id="page-url-text" aria-labelledby="page-url-label" type="text">
     </div>
     <!-- User e-mail -->
-    <div id="user-email" class="text-field-container">
+    <div id="user-email" class="text-field-container" hidden>
       <label id="user-email-label" i18n-content="user-email"></label>
       <select id="user-email-drop-down" aria-labelledby="user-email-label">
         <option id="anonymous-user-option" value="anonymous_user"
diff --git a/chrome/browser/resources/feedback/js/feedback.js b/chrome/browser/resources/feedback/js/feedback.js
index cb51b962..a60b24a 100644
--- a/chrome/browser/resources/feedback/js/feedback.js
+++ b/chrome/browser/resources/feedback/js/feedback.js
@@ -354,6 +354,9 @@
         // Make sure the "Report anonymously" option comes last.
         $('user-email-drop-down').insertBefore(optionElement,
             $('anonymous-user-option'));
+
+        // Now we can unhide the user email section:
+        $('user-email').hidden = false;
       });
 
       // Initiate getting the system info.
diff --git a/chrome/browser/resources/settings/appearance_page/appearance_fonts_page.html b/chrome/browser/resources/settings/appearance_page/appearance_fonts_page.html
index 7b2fc2ff..72fac98 100644
--- a/chrome/browser/resources/settings/appearance_page/appearance_fonts_page.html
+++ b/chrome/browser/resources/settings/appearance_page/appearance_fonts_page.html
@@ -111,13 +111,11 @@
       </div>
       <div class="list-item"
           style="
-              font-size:[[prefs.webkit.webprefs.default_font_size.value]]px;
+              font-size:
+                  [[prefs.webkit.webprefs.default_fixed_font_size.value]]px;
               font-family:
                   '[[prefs.webkit.webprefs.fonts.fixed.Zyyy.value]]';">
-        <span>
-          [[prefs.webkit.webprefs.default_font_size.value]]:
-          $i18n{quickBrownFox}
-        </span>
+        $i18n{quickBrownFox}
       </div>
     </div>
     <template is="dom-if" if="[[!isGuest_]]">
diff --git a/chrome/browser/resources/settings/appearance_page/appearance_fonts_page.js b/chrome/browser/resources/settings/appearance_page/appearance_fonts_page.js
index ca60421..f70b9e8 100644
--- a/chrome/browser/resources/settings/appearance_page/appearance_fonts_page.js
+++ b/chrome/browser/resources/settings/appearance_page/appearance_fonts_page.js
@@ -5,13 +5,6 @@
 (function() {
   'use strict';
 
-  /**
-   * This is the absolute difference maintained between standard and
-   * fixed-width font sizes. http://crbug.com/91922.
-   * @const @private {number}
-   */
-  var SIZE_DIFFERENCE_FIXED_STANDARD_ = 3;
-
   /** @const @private {!Array<number>} */
   var FONT_SIZE_RANGE_ = [
     9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36,
@@ -26,11 +19,6 @@
   /**
    * 'settings-appearance-fonts-page' is the settings page containing appearance
    * settings.
-   *
-   * Example:
-   *
-   *   <settings-appearance-fonts-page prefs="{{prefs}}">
-   *   </settings-appearance-fonts-page>
    */
   Polymer({
     is: 'settings-appearance-fonts-page',
@@ -88,10 +76,6 @@
     /** @private {?string} */
     advancedExtensionUrl_: null,
 
-    observers: [
-      'fontSizeChanged_(prefs.webkit.webprefs.default_font_size.value)',
-    ],
-
     /** @override */
     created: function() {
       this.browserProxy_ = settings.FontsBrowserProxyImpl.getInstance();
@@ -144,18 +128,6 @@
     },
 
     /**
-     * @param {number} value The changed font size slider value.
-     * @private
-     */
-    fontSizeChanged_: function(value) {
-      // TODO(michaelpg): Whitelist this pref in prefs_utils.cc so it is
-      // included in the <settings-prefs> getAllPrefs call, otherwise this path
-      // is invalid and nothing happens. See crbug.com/612535.
-      this.set('prefs.webkit.webprefs.default_fixed_font_size.value',
-          value - SIZE_DIFFERENCE_FIXED_STANDARD_);
-    },
-
-    /**
      * Get the minimum font size, accounting for unset prefs.
      * @return {?}
      * @private
diff --git a/chrome/browser/resources/settings/appearance_page/appearance_page.html b/chrome/browser/resources/settings/appearance_page/appearance_page.html
index 387c7b367..06b4e12e 100644
--- a/chrome/browser/resources/settings/appearance_page/appearance_page.html
+++ b/chrome/browser/resources/settings/appearance_page/appearance_page.html
@@ -173,8 +173,7 @@
           <button class="subpage-arrow" is="paper-icon-button-light"
               aria-label="$i18n{customizeFonts}"></button>
         </div>
-        <div class="settings-box"
-            hidden="[[!pageVisibility.pageZoom]]">
+        <div class="settings-box" hidden="[[!pageVisibility.pageZoom]]">
           <div id="pageZoom" class="start">$i18n{pageZoom}</div>
           <div class="md-select-wrapper">
             <select id="zoomLevel" class="md-select" aria-labelledy="pageZoom"
diff --git a/chrome/browser/resources/settings/appearance_page/appearance_page.js b/chrome/browser/resources/settings/appearance_page/appearance_page.js
index 9039741b3..5571b2d 100644
--- a/chrome/browser/resources/settings/appearance_page/appearance_page.js
+++ b/chrome/browser/resources/settings/appearance_page/appearance_page.js
@@ -2,6 +2,15 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+
+/**
+ * This is the absolute difference maintained between standard and
+ * fixed-width font sizes. http://crbug.com/91922.
+ * @const @private {number}
+ */
+var SIZE_DIFFERENCE_FIXED_STANDARD_ = 3;
+
+
 /**
  * 'settings-appearance-page' is the settings page containing appearance
  * settings.
@@ -110,12 +119,13 @@
   themeUrl_: '',
 
   observers: [
+    'defaultFontSizeChanged_(prefs.webkit.webprefs.default_font_size.value)',
     'themeChanged_(prefs.extensions.theme.id.value, useSystemTheme_)',
 
-// <if expr="is_linux and not chromeos">
+    // <if expr="is_linux and not chromeos">
     // NOTE: this pref only exists on Linux.
     'useSystemThemePrefChanged_(prefs.extensions.theme.use_system.value)',
-// </if>
+    // </if>
   ],
 
   created: function() {
@@ -165,6 +175,18 @@
     this.fire('refresh-pref', 'homepage');
   },
 
+  /**
+   * @param {number} value The changed font size slider value.
+   * @private
+   */
+  defaultFontSizeChanged_: function(value) {
+    // This pref is handled separately in some extensions, but here it is tied
+    // to default_font_size (to simplify the UI).
+    this.set(
+        'prefs.webkit.webprefs.default_fixed_font_size.value',
+        value - SIZE_DIFFERENCE_FIXED_STANDARD_);
+  },
+
   /** @private */
   onThemesTap_: function() {
     window.open(this.themeUrl_ || loadTimeData.getString('themesGalleryUrl'));
@@ -250,12 +272,12 @@
     }
 
     var i18nId;
-// <if expr="is_linux and not chromeos">
+    // <if expr="is_linux and not chromeos">
     i18nId = useSystemTheme ? 'systemTheme' : 'classicTheme';
-// </if>
-// <if expr="not is_linux or chromeos">
+    // </if>
+    // <if expr="not is_linux or chromeos">
     i18nId = 'chooseFromWebStore';
-// </if>
+    // </if>
     this.themeSublabel_ = this.i18n(i18nId);
     this.themeUrl_ = '';
   },
diff --git a/chrome/browser/resources/settings/passwords_and_forms_page/address_edit_dialog.html b/chrome/browser/resources/settings/passwords_and_forms_page/address_edit_dialog.html
index 37f31c76..e27f3a9 100644
--- a/chrome/browser/resources/settings/passwords_and_forms_page/address_edit_dialog.html
+++ b/chrome/browser/resources/settings/passwords_and_forms_page/address_edit_dialog.html
@@ -31,6 +31,8 @@
 
       #select-row {
         display: block;
+        /* Fix issue with focus animation making labels wiggle. */
+        transform: translate3d(0, 0, 0);
       }
 
       .md-select-wrapper {
@@ -82,6 +84,8 @@
         --layout-relative : {
           line-height: 1;
         };
+        /* Fix issue with focus animation making labels wiggle. */
+        transform: translate3d(0, 0, 0);
       }
     </style>
     <dialog is="cr-dialog" id="dialog" close-text="$i18n{close}"
diff --git a/chrome/browser/resources/settings/settings_shared_css.html b/chrome/browser/resources/settings/settings_shared_css.html
index aa9e0ae..23f175b 100644
--- a/chrome/browser/resources/settings/settings_shared_css.html
+++ b/chrome/browser/resources/settings/settings_shared_css.html
@@ -132,6 +132,11 @@
         -webkit-margin-start: var(--checkbox-margin-start);
       }
 
+      paper-input {
+        /* Fix issue with focus animation making labels wiggle. */
+        transform: translate3d(0, 0, 0);
+      }
+
       controlled-radio-button,
       paper-radio-button {
         --paper-radio-button-checked-color: var(--google-blue-500);
diff --git a/chrome/browser/ui/ash/system_tray_client.cc b/chrome/browser/ui/ash/system_tray_client.cc
index 36110ab..36ef7933 100644
--- a/chrome/browser/ui/ash/system_tray_client.cc
+++ b/chrome/browser/ui/ash/system_tray_client.cc
@@ -23,6 +23,7 @@
 #include "chrome/browser/chromeos/system/system_clock.h"
 #include "chrome/browser/chromeos/ui/choose_mobile_network_dialog.h"
 #include "chrome/browser/lifetime/application_lifetime.h"
+#include "chrome/browser/lifetime/termination_notification.h"
 #include "chrome/browser/profiles/profile_manager.h"
 #include "chrome/browser/ui/ash/ash_util.h"
 #include "chrome/browser/ui/ash/system_tray_delegate_chromeos.h"
@@ -370,11 +371,11 @@
 
 void SystemTrayClient::RequestRestartForUpdate() {
   // Flash updates on Chrome OS require device reboot.
-  const chrome::RebootPolicy reboot_policy =
-      flash_update_available_ ? chrome::RebootPolicy::kForceReboot
-                              : chrome::RebootPolicy::kOptionalReboot;
+  const browser_shutdown::RebootPolicy reboot_policy =
+      flash_update_available_ ? browser_shutdown::RebootPolicy::kForceReboot
+                              : browser_shutdown::RebootPolicy::kOptionalReboot;
 
-  chrome::NotifyAndTerminate(true /* fast_path */, reboot_policy);
+  browser_shutdown::NotifyAndTerminate(true /* fast_path */, reboot_policy);
 }
 
 void SystemTrayClient::HandleUpdateAvailable() {
diff --git a/chrome/browser/ui/browser_list.cc b/chrome/browser/ui/browser_list.cc
index 17489d1..8e7a084 100644
--- a/chrome/browser/ui/browser_list.cc
+++ b/chrome/browser/ui/browser_list.cc
@@ -13,6 +13,7 @@
 #include "chrome/browser/browser_shutdown.h"
 #include "chrome/browser/chrome_notification_types.h"
 #include "chrome/browser/lifetime/application_lifetime.h"
+#include "chrome/browser/lifetime/termination_notification.h"
 #include "chrome/browser/profiles/profile.h"
 #include "chrome/browser/ui/browser.h"
 #include "chrome/browser/ui/browser_finder.h"
@@ -106,7 +107,7 @@
     // to call ProfileManager::ShutdownSessionServices() as part of the
     // shutdown, because Browser::WindowClosing() already makes sure that the
     // SessionService is created and notified.
-    chrome::NotifyAppTerminating();
+    browser_shutdown::NotifyAppTerminating();
     chrome::OnAppExiting();
   }
 }
diff --git a/chrome/browser/ui/views/BUILD.gn b/chrome/browser/ui/views/BUILD.gn
index 47aa8b5b..d198a01 100644
--- a/chrome/browser/ui/views/BUILD.gn
+++ b/chrome/browser/ui/views/BUILD.gn
@@ -27,6 +27,7 @@
   deps = [
     "//base",
     "//chrome/app:command_ids",
+    "//content/public/browser",
     "//printing/features",
     "//skia",
     "//ui/base",
diff --git a/chrome/browser/ui/views/translate/translate_bubble_view.cc b/chrome/browser/ui/views/translate/translate_bubble_view.cc
index f8a39d5..58295dc 100644
--- a/chrome/browser/ui/views/translate/translate_bubble_view.cc
+++ b/chrome/browser/ui/views/translate/translate_bubble_view.cc
@@ -189,6 +189,10 @@
   HandleButtonPressed(static_cast<ButtonID>(sender->id()));
 }
 
+views::View* TranslateBubbleView::GetInitiallyFocusedView() {
+  return GetCurrentView()->GetNextFocusableView();
+}
+
 bool TranslateBubbleView::ShouldShowCloseButton() const {
   return Use2016Q2UI();
 }
diff --git a/chrome/browser/ui/views/translate/translate_bubble_view.h b/chrome/browser/ui/views/translate/translate_bubble_view.h
index a8b9a13..d34322c 100644
--- a/chrome/browser/ui/views/translate/translate_bubble_view.h
+++ b/chrome/browser/ui/views/translate/translate_bubble_view.h
@@ -87,6 +87,7 @@
   void ButtonPressed(views::Button* sender, const ui::Event& event) override;
 
   // views::WidgetDelegate methods.
+  View* GetInitiallyFocusedView() override;
   bool ShouldShowCloseButton() const override;
   void WindowClosing() override;
 
diff --git a/chrome/common/extensions/api/automation.idl b/chrome/common/extensions/api/automation.idl
index b10bf511..08fc1863 100644
--- a/chrome/common/extensions/api/automation.idl
+++ b/chrome/common/extensions/api/automation.idl
@@ -200,7 +200,6 @@
   // Describes characteristics of an $(ref:automation.AutomationNode).
   enum StateType {
     busy,
-    checked,
     collapsed,
     default,
     disabled,
@@ -638,8 +637,9 @@
     // The language code for this subtree.
     DOMString? language;
 
-    // If a checkbox or toggle button is in the mixed state.
-    boolean? buttonMixed;
+    // Tri-state describing checkbox or radio button:
+    // 'false' | 'true' | 'mixed'
+    DOMString? checked;
 
     // The RGBA foreground color of this subtree, as an integer.
     long? color;
diff --git a/chrome/common/extensions/api/downloads.idl b/chrome/common/extensions/api/downloads.idl
index e715da80..0de0a376 100644
--- a/chrome/common/extensions/api/downloads.idl
+++ b/chrome/common/extensions/api/downloads.idl
@@ -49,6 +49,7 @@
     FILE_SECURITY_CHECK_FAILED,
     FILE_TOO_SHORT,
     FILE_HASH_MISMATCH,
+    FILE_SAME_AS_SOURCE,
     NETWORK_FAILED,
     NETWORK_TIMEOUT,
     NETWORK_DISCONNECTED,
diff --git a/chrome/renderer/extensions/automation_internal_custom_bindings.cc b/chrome/renderer/extensions/automation_internal_custom_bindings.cc
index ac63b58..5c7fe9c 100644
--- a/chrome/renderer/extensions/automation_internal_custom_bindings.cc
+++ b/chrome/renderer/extensions/automation_internal_custom_bindings.cc
@@ -723,6 +723,16 @@
         std::string name_from_str = ui::ToString(name_from);
         result.Set(v8::String::NewFromUtf8(isolate, name_from_str.c_str()));
       });
+  RouteNodeIDFunction("GetChecked", [](v8::Isolate* isolate,
+                                       v8::ReturnValue<v8::Value> result,
+                                       TreeCache* cache, ui::AXNode* node) {
+    const ui::AXCheckedState checked_state = static_cast<ui::AXCheckedState>(
+        node->data().GetIntAttribute(ui::AX_ATTR_CHECKED_STATE));
+    if (checked_state) {
+      const std::string checked_str = ui::ToString(checked_state);
+      result.Set(v8::String::NewFromUtf8(isolate, checked_str.c_str()));
+    }
+  });
 }
 
 AutomationInternalCustomBindings::~AutomationInternalCustomBindings() {}
diff --git a/chrome/renderer/resources/extensions/automation/automation_node.js b/chrome/renderer/resources/extensions/automation/automation_node.js
index d1173dd..543ed83 100644
--- a/chrome/renderer/resources/extensions/automation/automation_node.js
+++ b/chrome/renderer/resources/extensions/automation/automation_node.js
@@ -135,6 +135,13 @@
 /**
  * @param {number} axTreeID The id of the accessibility tree.
  * @param {number} nodeID The id of a node.
+ * @return {string} The checked state, as undefined, "true", "false" or "mixed".
+ */
+var GetChecked = requireNative('automationInternal').GetChecked;
+
+/**
+ * @param {number} axTreeID The id of the accessibility tree.
+ * @param {number} nodeID The id of a node.
  * @return {string} The role of the node, or undefined if the tree or
  *     node wasn't found.
  */
@@ -283,6 +290,10 @@
     return GetRole(this.treeID, this.id);
   },
 
+  get checked() {
+    return GetChecked(this.treeID, this.id);
+  },
+
   get location() {
     return GetLocation(this.treeID, this.id);
   },
@@ -705,7 +716,6 @@
 
 var boolAttributes = [
     'ariaReadonly',
-    'buttonMixed',
     'containerLiveAtomic',
     'containerLiveBusy',
     'liveAtomic',
@@ -1113,6 +1123,7 @@
       'nextSibling',
       'isRootNode',
       'role',
+      'checked',
       'state',
       'location',
       'indexInParent',
diff --git a/chrome/test/android/BUILD.gn b/chrome/test/android/BUILD.gn
index 89e6b148..e747858 100644
--- a/chrome/test/android/BUILD.gn
+++ b/chrome/test/android/BUILD.gn
@@ -26,6 +26,7 @@
     "javatests/src/org/chromium/chrome/test/util/ApplicationTestUtils.java",
     "javatests/src/org/chromium/chrome/test/util/BookmarkTestUtil.java",
     "javatests/src/org/chromium/chrome/test/util/browser/contextmenu/ContextMenuUtils.java",
+    "javatests/src/org/chromium/chrome/test/util/browser/Features.java",
     "javatests/src/org/chromium/chrome/test/util/browser/LocationSettingsTestUtil.java",
     "javatests/src/org/chromium/chrome/test/util/browser/notifications/MockNotificationManagerProxy.java",
     "javatests/src/org/chromium/chrome/test/util/browser/signin/MockChangeEventChecker.java",
diff --git a/chrome/test/android/javatests/src/org/chromium/chrome/test/util/browser/Features.java b/chrome/test/android/javatests/src/org/chromium/chrome/test/util/browser/Features.java
new file mode 100644
index 0000000..12482ef
--- /dev/null
+++ b/chrome/test/android/javatests/src/org/chromium/chrome/test/util/browser/Features.java
@@ -0,0 +1,76 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+package org.chromium.chrome.test.util.browser;
+
+import org.chromium.base.test.util.AnnotationProcessor;
+import org.chromium.chrome.browser.ChromeFeatureList;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Annotation used to set Feature flags during JUnit tests. To have an effect, the associated
+ * {@link Processor} rule needs to be registered on the test class.
+ *
+ * Use {@link Features.Register} to specify the features to register and whether they should be
+ * enabled.
+ *
+ * Sample code:
+ *
+ * <pre>
+ * public class Test {
+ *    &#64;Rule
+ *    public Features.Processor processor = new Features.Processor();
+ *
+ *    &#64;Features(&#64;Features.Register(ChromeFeatureList.CHROME_HOME))
+ *    public void testFoo() { ... }
+ * }
+ * </pre>
+ * // TODO(dgn): Use repeatable annotations (Requires Java 8 / Android N SDK)
+ */
+@Inherited
+@Retention(RetentionPolicy.RUNTIME)
+@Target({ElementType.METHOD, ElementType.TYPE})
+public @interface Features {
+    Register[] value();
+
+    @interface Register {
+        String value();
+        boolean enabled() default true;
+    }
+
+    /**
+     * Add this rule to tests to activate the {@link Features} annotations and choose flags
+     * to enable, or get rid of exceptions when the production code tries to check for enabled
+     * features.
+     */
+    class Processor extends AnnotationProcessor<Features> {
+        public Processor() {
+            super(Features.class);
+        }
+
+        @Override
+        protected void before() throws Throwable {
+            Map<String, Boolean> registeredFeatures = new HashMap<>();
+            Register[] values = getAnnotation().value();
+
+            for (Register featureState : values) {
+                registeredFeatures.put(featureState.value(), featureState.enabled());
+            }
+
+            ChromeFeatureList.setTestFeatures(registeredFeatures);
+        }
+
+        @Override
+        protected void after() {
+            ChromeFeatureList.setTestFeatures(null);
+        }
+    }
+    }
\ No newline at end of file
diff --git a/chrome/test/base/in_process_browser_test.cc b/chrome/test/base/in_process_browser_test.cc
index 45c8e2d..9af204a 100644
--- a/chrome/test/base/in_process_browser_test.cc
+++ b/chrome/test/base/in_process_browser_test.cc
@@ -26,6 +26,7 @@
 #include "chrome/browser/chrome_notification_types.h"
 #include "chrome/browser/devtools/devtools_window.h"
 #include "chrome/browser/lifetime/application_lifetime.h"
+#include "chrome/browser/lifetime/termination_notification.h"
 #include "chrome/browser/net/net_error_tab_helper.h"
 #include "chrome/browser/profiles/profile.h"
 #include "chrome/browser/profiles/profile_manager.h"
@@ -602,7 +603,7 @@
 
 void InProcessBrowserTest::QuitBrowsers() {
   if (chrome::GetTotalBrowserCount() == 0) {
-    chrome::NotifyAppTerminating();
+    browser_shutdown::NotifyAppTerminating();
     return;
   }
 
diff --git a/chrome/test/data/extensions/api_test/automation/sites/attributes.html b/chrome/test/data/extensions/api_test/automation/sites/attributes.html
index 22e85b7..cb9713c0 100644
--- a/chrome/test/data/extensions/api_test/automation/sites/attributes.html
+++ b/chrome/test/data/extensions/api_test/automation/sites/attributes.html
@@ -70,6 +70,10 @@
 
   <p id="Spanish" lang="es-ES">Hola</p>
 
-
+  <!-- checked attribute -->
+  <div id="check-test-1" aria-label="check-test-1" role="checkbox" aria-checked="true">Checked</div>
+  <div id="check-test-2" aria-label="check-test-2" role="checkbox" aria-checked="false">Unchecked</div>
+  <div id="check-test-3" aria-label="check-test-3" role="checkbox" aria-checked="mixed">Mixed</div>
+  <div id="check-test-4" aria-label="check-test-4" aria-checked="true">Not a checkbox</div>
 </body>
 </html>
diff --git a/chrome/test/data/extensions/api_test/automation/tests/tabs/attributes.js b/chrome/test/data/extensions/api_test/automation/tests/tabs/attributes.js
index 5e464a5..92f65aeb 100644
--- a/chrome/test/data/extensions/api_test/automation/tests/tabs/attributes.js
+++ b/chrome/test/data/extensions/api_test/automation/tests/tabs/attributes.js
@@ -258,6 +258,28 @@
     assertEq(chrome.automation.NameFromType.ATTRIBUTE, textarea.nameFrom);
     chrome.test.succeed();
   },
+
+  function testCheckedAttribute() {
+    // Checkbox can use all 3 checked attribute values: true|false|mixed
+    var checkTest1 = rootNode.find({ attributes: { name: 'check-test-1' } });
+    assertTrue(Boolean(checkTest1));
+    assertEq(checkTest1.checked, 'true');
+
+    var checkTest2 = rootNode.find({ attributes: { name: 'check-test-2' } });
+    assertTrue(Boolean(checkTest2));
+    assertEq(checkTest2.checked, 'false');
+
+    var checkTest3 = rootNode.find({ attributes: { name: 'check-test-3' } });
+    assertTrue(Boolean(checkTest3));
+    assertEq(checkTest3.checked, 'mixed');
+
+    // Uncheckable nodes have a checked attribute of undefined
+    var checkTest4 = rootNode.find({ attributes: { name: 'check-test-4' } });
+    assertTrue(Boolean(checkTest4));
+    assertEq(checkTest4.checked, undefined);
+
+    chrome.test.succeed();
+  },
 ];
 
 setUpAndRunTests(allTests, 'attributes.html');
diff --git a/components/content_settings/core/common/content_settings.cc b/components/content_settings/core/common/content_settings.cc
index ec16215..59fc9c6 100644
--- a/components/content_settings/core/common/content_settings.cc
+++ b/components/content_settings/core/common/content_settings.cc
@@ -16,50 +16,46 @@
       CONTENT_SETTING_DEFAULT : static_cast<ContentSetting>(content_setting);
 }
 
-// WARNING: This array should not be reordered or removed as it is used for
-// histogram values. If a ContentSettingsType value has been removed, the entry
-// must be replaced by a placeholder. It should correspond directly to the
-// ContentType enum in histograms.xml.
+struct HistogramValue {
+  ContentSettingsType type;
+  int value;
+};
+
+// WARNING: The value specified here for a type should match exactly the value
+// specified in the ContentType enum in histograms.xml. Since these values are
+// used for histograms, please do not reuse the same value for a different
+// content setting. Always append to the end and increment.
 // TODO(raymes): We should use a sparse histogram here on the hash of the
 // content settings type name instead.
-ContentSettingsType kHistogramOrder[] = {
-    CONTENT_SETTINGS_TYPE_COOKIES,
-    CONTENT_SETTINGS_TYPE_IMAGES,
-    CONTENT_SETTINGS_TYPE_JAVASCRIPT,
-    CONTENT_SETTINGS_TYPE_PLUGINS,
-    CONTENT_SETTINGS_TYPE_POPUPS,
-    CONTENT_SETTINGS_TYPE_GEOLOCATION,
-    CONTENT_SETTINGS_TYPE_NOTIFICATIONS,
-    CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE,
-    CONTENT_SETTINGS_TYPE_DEFAULT,  // FULLSCREEN (removed).
-    CONTENT_SETTINGS_TYPE_DEFAULT,  // MOUSELOCK (removed).
-    CONTENT_SETTINGS_TYPE_MIXEDSCRIPT,
-    CONTENT_SETTINGS_TYPE_DEFAULT,  // MEDIASTREAM (removed).
-    CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC,
-    CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA,
-    CONTENT_SETTINGS_TYPE_PROTOCOL_HANDLERS,
-    CONTENT_SETTINGS_TYPE_PPAPI_BROKER,
-    CONTENT_SETTINGS_TYPE_AUTOMATIC_DOWNLOADS,
-    CONTENT_SETTINGS_TYPE_MIDI_SYSEX,
-    CONTENT_SETTINGS_TYPE_DEFAULT,  // PUSH_MESSAGING (removed).
-    CONTENT_SETTINGS_TYPE_SSL_CERT_DECISIONS,
-    CONTENT_SETTINGS_TYPE_DEFAULT,  // METRO_SWITCH_TO_DESKTOP (removed).
+HistogramValue kHistogramValue[] = {
+    {CONTENT_SETTINGS_TYPE_COOKIES, 0},
+    {CONTENT_SETTINGS_TYPE_IMAGES, 1},
+    {CONTENT_SETTINGS_TYPE_JAVASCRIPT, 2},
+    {CONTENT_SETTINGS_TYPE_PLUGINS, 3},
+    {CONTENT_SETTINGS_TYPE_POPUPS, 4},
+    {CONTENT_SETTINGS_TYPE_GEOLOCATION, 5},
+    {CONTENT_SETTINGS_TYPE_NOTIFICATIONS, 6},
+    {CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE, 7},
+    {CONTENT_SETTINGS_TYPE_MIXEDSCRIPT, 10},
+    {CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC, 12},
+    {CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA, 13},
+    {CONTENT_SETTINGS_TYPE_PROTOCOL_HANDLERS, 14},
+    {CONTENT_SETTINGS_TYPE_PPAPI_BROKER, 15},
+    {CONTENT_SETTINGS_TYPE_AUTOMATIC_DOWNLOADS, 16},
+    {CONTENT_SETTINGS_TYPE_MIDI_SYSEX, 17},
+    {CONTENT_SETTINGS_TYPE_SSL_CERT_DECISIONS, 19},
 #if defined(OS_ANDROID) || defined(OS_CHROMEOS)
-    CONTENT_SETTINGS_TYPE_PROTECTED_MEDIA_IDENTIFIER,
-#else
-    CONTENT_SETTINGS_TYPE_DEFAULT,  // PROTECTED_MEDIA_IDENTIFIER (mobile only).
+    {CONTENT_SETTINGS_TYPE_PROTECTED_MEDIA_IDENTIFIER, 21},
 #endif
-    CONTENT_SETTINGS_TYPE_APP_BANNER,
-    CONTENT_SETTINGS_TYPE_SITE_ENGAGEMENT,
-    CONTENT_SETTINGS_TYPE_DURABLE_STORAGE,
-    CONTENT_SETTINGS_TYPE_DEFAULT,  // KEYGEN (removed).
-    CONTENT_SETTINGS_TYPE_BLUETOOTH_GUARD,
-    CONTENT_SETTINGS_TYPE_BACKGROUND_SYNC,
-    CONTENT_SETTINGS_TYPE_AUTOPLAY,
-    CONTENT_SETTINGS_TYPE_DEFAULT,  // PROMPT_NO_DECISION_COUNT (migrated).
-    CONTENT_SETTINGS_TYPE_IMPORTANT_SITE_INFO,
-    CONTENT_SETTINGS_TYPE_PERMISSION_AUTOBLOCKER_DATA,
-    CONTENT_SETTINGS_TYPE_SUBRESOURCE_FILTER,
+    {CONTENT_SETTINGS_TYPE_APP_BANNER, 22},
+    {CONTENT_SETTINGS_TYPE_SITE_ENGAGEMENT, 23},
+    {CONTENT_SETTINGS_TYPE_DURABLE_STORAGE, 24},
+    {CONTENT_SETTINGS_TYPE_BLUETOOTH_GUARD, 26},
+    {CONTENT_SETTINGS_TYPE_BACKGROUND_SYNC, 27},
+    {CONTENT_SETTINGS_TYPE_AUTOPLAY, 28},
+    {CONTENT_SETTINGS_TYPE_IMPORTANT_SITE_INFO, 30},
+    {CONTENT_SETTINGS_TYPE_PERMISSION_AUTOBLOCKER_DATA, 31},
+    {CONTENT_SETTINGS_TYPE_SUBRESOURCE_FILTER, 32},
 };
 
 int ContentSettingTypeToHistogramValue(ContentSettingsType content_setting,
@@ -68,14 +64,12 @@
   typedef base::hash_map<int, int> Map;
   CR_DEFINE_STATIC_LOCAL(Map, kMap, ());
   if (kMap.empty()) {
-    for (size_t i = 0; i < arraysize(kHistogramOrder); ++i) {
-      if (kHistogramOrder[i] != CONTENT_SETTINGS_TYPE_DEFAULT)
-        kMap[kHistogramOrder[i]] = static_cast<int>(i);
-    }
+    for (const HistogramValue& histogram_value : kHistogramValue)
+      kMap[histogram_value.type] = histogram_value.value;
   }
 
   DCHECK(base::ContainsKey(kMap, content_setting));
-  *num_values = arraysize(kHistogramOrder);
+  *num_values = arraysize(kHistogramValue);
   return kMap[content_setting];
 }
 
diff --git a/components/history/content/browser/content_history_backend_db_unittest.cc b/components/history/content/browser/content_history_backend_db_unittest.cc
index 623e9ec4..790491ec 100644
--- a/components/history/content/browser/content_history_backend_db_unittest.cc
+++ b/components/history/content/browser/content_history_backend_db_unittest.cc
@@ -62,6 +62,7 @@
     {"FILE_SECURITY_CHECK_FAILED", 12},
     {"FILE_TOO_SHORT", 13},
     {"FILE_HASH_MISMATCH", 14},
+    {"FILE_SAME_AS_SOURCE", 15},
     {"NETWORK_FAILED", 20},
     {"NETWORK_TIMEOUT", 21},
     {"NETWORK_DISCONNECTED", 22},
diff --git a/components/network_session_configurator/network_session_configurator.cc b/components/network_session_configurator/network_session_configurator.cc
index b5a4c864..5822adf 100644
--- a/components/network_session_configurator/network_session_configurator.cc
+++ b/components/network_session_configurator/network_session_configurator.cc
@@ -142,14 +142,6 @@
   return net::ParseQuicConnectionOptions(it->second);
 }
 
-bool ShouldQuicAlwaysRequireHandshakeConfirmation(
-    const VariationParameters& quic_trial_params) {
-  return base::LowerCaseEqualsASCII(
-      GetVariationParam(quic_trial_params,
-                        "always_require_handshake_confirmation"),
-      "true");
-}
-
 float GetQuicLoadServerInfoTimeoutSrttMultiplier(
     const VariationParameters& quic_trial_params) {
   double value;
@@ -246,13 +238,6 @@
       GetVariationParam(quic_trial_params, "estimate_initial_rtt"), "true");
 }
 
-bool ShouldQuicDisablePreConnectIfZeroRtt(
-    const VariationParameters& quic_trial_params) {
-  return base::LowerCaseEqualsASCII(
-      GetVariationParam(quic_trial_params, "disable_preconnect_if_0rtt"),
-      "true");
-}
-
 bool ShouldQuicMigrateSessionsOnNetworkChange(
     const VariationParameters& quic_trial_params) {
   return base::LowerCaseEqualsASCII(
@@ -325,8 +310,6 @@
       ShouldQuicEnableAlternativeServicesForDifferentHost(quic_trial_params);
 
   if (params->enable_quic) {
-    params->quic_always_require_handshake_confirmation =
-        ShouldQuicAlwaysRequireHandshakeConfirmation(quic_trial_params);
     params->quic_delay_tcp_race = ShouldQuicDelayTcpRace(quic_trial_params);
     float load_server_info_timeout_srtt_multiplier =
         GetQuicLoadServerInfoTimeoutSrttMultiplier(quic_trial_params);
@@ -369,8 +352,6 @@
         ShouldQuicDoNotFragment(quic_trial_params);
     params->quic_estimate_initial_rtt =
         ShouldQuicEstimateInitialRtt(quic_trial_params);
-    params->quic_disable_preconnect_if_0rtt =
-        ShouldQuicDisablePreConnectIfZeroRtt(quic_trial_params);
     params->quic_migrate_sessions_on_network_change =
         ShouldQuicMigrateSessionsOnNetworkChange(quic_trial_params);
     params->quic_migrate_sessions_early =
diff --git a/components/network_session_configurator/network_session_configurator_unittest.cc b/components/network_session_configurator/network_session_configurator_unittest.cc
index a0a8bb1..8e5a7d2 100644
--- a/components/network_session_configurator/network_session_configurator_unittest.cc
+++ b/components/network_session_configurator/network_session_configurator_unittest.cc
@@ -71,7 +71,6 @@
   EXPECT_FALSE(params_.retry_without_alt_svc_on_quic_errors);
   EXPECT_EQ(1350u, params_.quic_max_packet_length);
   EXPECT_EQ(net::QuicTagVector(), params_.quic_connection_options);
-  EXPECT_FALSE(params_.quic_always_require_handshake_confirmation);
   EXPECT_EQ(0.25f, params_.quic_load_server_info_timeout_srtt_multiplier);
   EXPECT_FALSE(params_.quic_enable_connection_racing);
   EXPECT_FALSE(params_.enable_server_push_cancellation);
@@ -88,7 +87,6 @@
   EXPECT_FALSE(params_.quic_race_cert_verification);
   EXPECT_FALSE(params_.quic_do_not_fragment);
   EXPECT_FALSE(params_.quic_estimate_initial_rtt);
-  EXPECT_FALSE(params_.quic_disable_preconnect_if_0rtt);
   EXPECT_FALSE(params_.quic_migrate_sessions_on_network_change);
   EXPECT_FALSE(params_.quic_migrate_sessions_early);
   EXPECT_FALSE(params_.quic_allow_server_migration);
@@ -253,17 +251,6 @@
   EXPECT_TRUE(params_.quic_estimate_initial_rtt);
 }
 
-TEST_F(NetworkSessionConfiguratorTest, QuicDisablePreConnectIfZeroRtt) {
-  std::map<std::string, std::string> field_trial_params;
-  field_trial_params["disable_preconnect_if_0rtt"] = "true";
-  variations::AssociateVariationParams("QUIC", "Enabled", field_trial_params);
-  base::FieldTrialList::CreateFieldTrial("QUIC", "Enabled");
-
-  ParseFieldTrials();
-
-  EXPECT_TRUE(params_.quic_disable_preconnect_if_0rtt);
-}
-
 TEST_F(NetworkSessionConfiguratorTest,
        QuicMigrateSessionsOnNetworkChangeFromFieldTrialParams) {
   std::map<std::string, std::string> field_trial_params;
@@ -356,18 +343,6 @@
 }
 
 TEST_F(NetworkSessionConfiguratorTest,
-       QuicAlwaysRequireHandshakeConfirmationFromFieldTrialParams) {
-  std::map<std::string, std::string> field_trial_params;
-  field_trial_params["always_require_handshake_confirmation"] = "true";
-  variations::AssociateVariationParams("QUIC", "Enabled", field_trial_params);
-  base::FieldTrialList::CreateFieldTrial("QUIC", "Enabled");
-
-  ParseFieldTrials();
-
-  EXPECT_TRUE(params_.quic_always_require_handshake_confirmation);
-}
-
-TEST_F(NetworkSessionConfiguratorTest,
        QuicLoadServerInfoTimeToSmoothedRttFromFieldTrialParams) {
   std::map<std::string, std::string> field_trial_params;
   field_trial_params["load_server_info_time_to_srtt"] = "0.5";
diff --git a/components/policy/core/common/preg_parser.cc b/components/policy/core/common/preg_parser.cc
index 8126199..06ff1f16c 100644
--- a/components/policy/core/common/preg_parser.cc
+++ b/components/policy/core/common/preg_parser.cc
@@ -31,7 +31,7 @@
 #include "components/policy/core/common/registry_dict.h"
 
 #if defined(OS_WIN)
-#include "windows.h"
+#include <windows.h>
 #else
 // Registry data type constants.
 #define REG_NONE 0
@@ -63,7 +63,7 @@
 const base::char16 kDelimSemicolon = L';';
 
 // Registry path separator.
-const base::string16 kRegistryPathSeparator = base::ASCIIToUTF16("\\");
+const base::char16 kRegistryPathSeparator[] = {L'\\', L'\0'};
 
 // Magic strings for the PReg value field to trigger special actions.
 const char kActionTriggerPrefix[] = "**";
diff --git a/components/sync/engine_impl/directory_commit_contribution_unittest.cc b/components/sync/engine_impl/directory_commit_contribution_unittest.cc
index 5676145..f23b435 100644
--- a/components/sync/engine_impl/directory_commit_contribution_unittest.cc
+++ b/components/sync/engine_impl/directory_commit_contribution_unittest.cc
@@ -320,6 +320,35 @@
   EXPECT_FALSE(commit_message.entries(0).parent_id_string().empty());
 }
 
+TEST_F(DirectoryCommitContributionTest,
+       HierarchySupport_BookmarkMissingParent) {
+  // Create a bookmark item that references an unknown client parent id.
+  int64_t bm1;
+  {
+    syncable::WriteTransaction trans(FROM_HERE, syncable::UNITTEST, dir());
+    bm1 = CreateSyncedItem(&trans, BOOKMARKS, "bm1");
+    syncable::MutableEntry e(&trans, syncable::GET_BY_HANDLE, bm1);
+
+    sync_pb::EntitySpecifics specifics;
+    sync_pb::BookmarkSpecifics* bm_specifics = specifics.mutable_bookmark();
+    bm_specifics->set_url("http://www.chrome.com");
+    bm_specifics->set_title("Chrome");
+    e.PutSpecifics(specifics);
+    e.PutIsDel(false);
+    e.PutIsUnsynced(true);
+    e.PutParentId(syncable::Id::CreateFromClientString("does not exist"));
+
+    EXPECT_TRUE(e.ShouldMaintainHierarchy());
+  }
+
+  DirectoryTypeDebugInfoEmitter emitter(BOOKMARKS, &type_observers_);
+  // Because the above bookmark is skipped, there are no contributions and so
+  // expect a null DirectoryCommitContribution back.
+  EXPECT_EQ(
+      nullptr,
+      DirectoryCommitContribution::Build(dir(), BOOKMARKS, 25, &emitter).get());
+}
+
 // Test that preferences do not support hierarchy.
 TEST_F(DirectoryCommitContributionTest, HierarchySupport_Preferences) {
   // Create a normal-looking prefs item.
diff --git a/components/sync/engine_impl/get_commit_ids.cc b/components/sync/engine_impl/get_commit_ids.cc
index 171830f..23e92f3 100644
--- a/components/sync/engine_impl/get_commit_ids.cc
+++ b/components/sync/engine_impl/get_commit_ids.cc
@@ -163,9 +163,9 @@
  private:
   // The following functions do not modify the traversal directly. They return
   // their results in the |result| vector instead.
-  void AddUncommittedParents(const std::set<int64_t>& ready_unsynced_set,
-                             const Entry& item,
-                             Directory::Metahandles* result) const;
+  bool TryAddUncommittedParents(const std::set<int64_t>& ready_unsynced_set,
+                                const Entry& item,
+                                Directory::Metahandles* result) const;
 
   bool TryAddItem(const std::set<int64_t>& ready_unsynced_set,
                   const Entry& item,
@@ -203,7 +203,7 @@
 
 Traversal::~Traversal() {}
 
-void Traversal::AddUncommittedParents(
+bool Traversal::TryAddUncommittedParents(
     const std::set<int64_t>& ready_unsynced_set,
     const Entry& item,
     Directory::Metahandles* result) const {
@@ -214,7 +214,16 @@
   // Climb the tree adding entries leaf -> root.
   while (!parent_id.ServerKnows()) {
     Entry parent(trans_, syncable::GET_BY_ID, parent_id);
-    CHECK(parent.good()) << "Bad user-only parent in item path.";
+
+    // This apparently does happen, see crbug.com/711381. Someone is violating
+    // some constraint and some ancestor isn't current present in the directory
+    // while the child is. Because we do not know where this comes from, be
+    // defensive and skip this inclusion instead.
+    if (!parent.good()) {
+      DVLOG(1) << "Bad user-only parent in item path with id " << parent_id;
+      return false;
+    }
+
     int64_t handle = parent.GetMetahandle();
     if (HaveItem(handle)) {
       // We've already added this parent (and therefore all of its parents).
@@ -232,6 +241,7 @@
 
   // Reverse what we added to get the correct order.
   result->insert(result->end(), dependencies.rbegin(), dependencies.rend());
+  return true;
 }
 
 // Adds the given item to the list if it is unsynced and ready for commit.
@@ -338,7 +348,14 @@
         // We only commit an item + its dependencies if it and all its
         // dependencies are not in conflict.
         Directory::Metahandles item_dependencies;
-        AddUncommittedParents(ready_unsynced_set, entry, &item_dependencies);
+
+        // If we fail to add a required parent, give up on this entry.
+        if (!TryAddUncommittedParents(ready_unsynced_set, entry,
+                                      &item_dependencies)) {
+          continue;
+        }
+
+        // Okay if this fails, the parents were still valid.
         TryAddItem(ready_unsynced_set, entry, &item_dependencies);
         AppendManyToTraversal(item_dependencies);
       } else {
@@ -399,8 +416,7 @@
     out_->resize(max_entries_);
 }
 
-// Excludes ancestors of deleted conflicted items from
-// |ready_unsynced_set|.
+// Excludes ancestors of deleted conflicted items from |ready_unsynced_set|.
 void ExcludeDeletedAncestors(
     syncable::BaseTransaction* trans,
     const std::vector<int64_t>& deleted_conflicted_items,
diff --git a/content/browser/accessibility/browser_accessibility_android.cc b/content/browser/accessibility/browser_accessibility_android.cc
index 32b9e425..85acf003 100644
--- a/content/browser/accessibility/browser_accessibility_android.cc
+++ b/content/browser/accessibility/browser_accessibility_android.cc
@@ -145,13 +145,17 @@
       is_aria_pressed_defined) {
     checkable = true;
   }
-  if (HasState(ui::AX_STATE_CHECKED))
+  // TODO(aleventhal) does this ever happen when checkable is not true yet?
+  if (HasIntAttribute(ui::AX_ATTR_CHECKED_STATE))
     checkable = true;
   return checkable;
 }
 
 bool BrowserAccessibilityAndroid::IsChecked() const {
-  return (HasState(ui::AX_STATE_CHECKED) || HasState(ui::AX_STATE_PRESSED));
+  const auto checked_state = static_cast<ui::AXCheckedState>(
+      GetIntAttribute(ui::AX_ATTR_CHECKED_STATE));
+  return (checked_state == ui::AX_CHECKED_STATE_TRUE ||
+          HasState(ui::AX_STATE_PRESSED));
 }
 
 bool BrowserAccessibilityAndroid::IsClickable() const {
diff --git a/content/browser/accessibility/browser_accessibility_cocoa.mm b/content/browser/accessibility/browser_accessibility_cocoa.mm
index 89fe4d98..aeb6092 100644
--- a/content/browser/accessibility/browser_accessibility_cocoa.mm
+++ b/content/browser/accessibility/browser_accessibility_cocoa.mm
@@ -1885,16 +1885,19 @@
              [role isEqualToString:NSAccessibilityRadioButtonRole] ||
              [self internalRole] == ui::AX_ROLE_MENU_ITEM_CHECK_BOX ||
              [self internalRole] == ui::AX_ROLE_MENU_ITEM_RADIO) {
-    int value = 0;
-    value = GetState(
-        browserAccessibility_, ui::AX_STATE_CHECKED) ? 1 : 0;
-    value = GetState(
-        browserAccessibility_, ui::AX_STATE_SELECTED) ?
-            1 :
-            value;
-
-    if (browserAccessibility_->GetBoolAttribute(ui::AX_ATTR_STATE_MIXED)) {
-      value = 2;
+    int value;
+    const auto checkedState = static_cast<ui::AXCheckedState>(
+        browserAccessibility_->GetIntAttribute(ui::AX_ATTR_CHECKED_STATE));
+    switch (checkedState) {
+      case ui::AX_CHECKED_STATE_TRUE:
+        value = 1;
+        break;
+      case ui::AX_CHECKED_STATE_MIXED:
+        value = 2;
+        break;
+      default:
+        value = GetState(browserAccessibility_, ui::AX_STATE_SELECTED) ? 1 : 0;
+        break;
     }
     return [NSNumber numberWithInt:value];
   } else if ([role isEqualToString:NSAccessibilityProgressIndicatorRole] ||
diff --git a/content/browser/accessibility/browser_accessibility_win.cc b/content/browser/accessibility/browser_accessibility_win.cc
index ed2742c0..045aad7 100644
--- a/content/browser/accessibility/browser_accessibility_win.cc
+++ b/content/browser/accessibility/browser_accessibility_win.cc
@@ -5073,8 +5073,20 @@
 
   if (HasState(ui::AX_STATE_BUSY))
     ia_state |= STATE_SYSTEM_BUSY;
-  if (HasState(ui::AX_STATE_CHECKED))
-    ia_state |= STATE_SYSTEM_CHECKED;
+
+  const auto checked_state = static_cast<ui::AXCheckedState>(
+      GetIntAttribute(ui::AX_ATTR_CHECKED_STATE));
+  switch (checked_state) {
+    case ui::AX_CHECKED_STATE_TRUE:
+      ia_state |= STATE_SYSTEM_CHECKED;
+      break;
+    case ui::AX_CHECKED_STATE_MIXED:
+      ia_state |= STATE_SYSTEM_MIXED;
+      break;
+    default:
+      break;
+  }
+
   if (HasState(ui::AX_STATE_COLLAPSED))
     ia_state |= STATE_SYSTEM_COLLAPSED;
   if (HasState(ui::AX_STATE_EXPANDED))
@@ -5131,9 +5143,6 @@
   if (HasState(ui::AX_STATE_EDITABLE))
     ia2_state |= IA2_STATE_EDITABLE;
 
-  if (GetBoolAttribute(ui::AX_ATTR_STATE_MIXED))
-    ia_state |= STATE_SYSTEM_MIXED;
-
   if (GetBoolAttribute(ui::AX_ATTR_CAN_SET_VALUE))
     ia2_state |= IA2_STATE_EDITABLE;
 
diff --git a/content/browser/accessibility/browser_accessibility_win_unittest.cc b/content/browser/accessibility/browser_accessibility_win_unittest.cc
index 2aea2d3f..8fcfa6be 100644
--- a/content/browser/accessibility/browser_accessibility_win_unittest.cc
+++ b/content/browser/accessibility/browser_accessibility_win_unittest.cc
@@ -600,7 +600,9 @@
   ui::AXNodeData check_box;
   check_box.id = 14;
   check_box.role = ui::AX_ROLE_CHECK_BOX;
-  check_box.state = 1 << ui::AX_STATE_CHECKED;
+  check_box.state = 0;
+  check_box.AddIntAttribute(ui::AX_ATTR_CHECKED_STATE,
+                            ui::AX_CHECKED_STATE_TRUE);
   check_box.SetName(base::UTF16ToUTF8(check_box_name));
   check_box.SetValue(base::UTF16ToUTF8(check_box_value));
 
@@ -839,7 +841,9 @@
   checkbox.id = 3;
   checkbox.SetName("Checkbox");
   checkbox.role = ui::AX_ROLE_CHECK_BOX;
-  checkbox.state = 1 << ui::AX_STATE_CHECKED;
+  checkbox.state = 0;
+  checkbox.AddIntAttribute(ui::AX_ATTR_CHECKED_STATE,
+                           ui::AX_CHECKED_STATE_TRUE);
 
   ui::AXNodeData root;
   root.id = 1;
diff --git a/content/browser/download/download_item_impl.cc b/content/browser/download/download_item_impl.cc
index b4a1d46d..1dab653e 100644
--- a/content/browser/download/download_item_impl.cc
+++ b/content/browser/download/download_item_impl.cc
@@ -229,7 +229,7 @@
       state_(INITIAL_INTERNAL),
       start_time_(info.start_time),
       delegate_(delegate),
-      is_temporary_(!info.save_info->file_path.empty()),
+      is_temporary_(!info.transient && !info.save_info->file_path.empty()),
       transient_(info.transient),
       last_modified_time_(info.last_modified),
       etag_(info.etag),
@@ -994,7 +994,7 @@
     case DOWNLOAD_INTERRUPT_REASON_SERVER_UNAUTHORIZED:
     case DOWNLOAD_INTERRUPT_REASON_SERVER_CERT_PROBLEM:
     case DOWNLOAD_INTERRUPT_REASON_SERVER_FORBIDDEN:
-      // Unhandled.
+    case DOWNLOAD_INTERRUPT_REASON_FILE_SAME_AS_SOURCE:
       return RESUME_MODE_INVALID;
   }
 
@@ -1364,18 +1364,23 @@
     return;
   }
 
-  target_path_ = target_path;
-  target_disposition_ = disposition;
-  SetDangerType(danger_type);
-
   // There were no other pending errors, and we just failed to determined the
-  // download target.
+  // download target. The target path, if it is non-empty, should be considered
+  // suspect. The safe option here is to interrupt the download without doing an
+  // intermediate rename. In the case of a new download, we'll lose the partial
+  // data that may have been downloaded, but that should be a small loss.
   if (state_ == TARGET_PENDING_INTERNAL &&
       interrupt_reason != DOWNLOAD_INTERRUPT_REASON_NONE) {
     deferred_interrupt_reason_ = interrupt_reason;
     TransitionTo(INTERRUPTED_TARGET_PENDING_INTERNAL);
+    OnTargetResolved();
+    return;
   }
 
+  target_path_ = target_path;
+  target_disposition_ = disposition;
+  SetDangerType(danger_type);
+
   // This was an interrupted download that was looking for a filename. Resolve
   // early without performing the intermediate rename. If there is a
   // DownloadFile, then that should be renamed to the intermediate name before
diff --git a/content/browser/download/download_item_impl_unittest.cc b/content/browser/download/download_item_impl_unittest.cc
index 5b87bfb..6c97c2f 100644
--- a/content/browser/download/download_item_impl_unittest.cc
+++ b/content/browser/download/download_item_impl_unittest.cc
@@ -16,6 +16,7 @@
 #include "base/callback.h"
 #include "base/callback_helpers.h"
 #include "base/feature_list.h"
+#include "base/files/file_util.h"
 #include "base/memory/ptr_util.h"
 #include "base/message_loop/message_loop.h"
 #include "base/run_loop.h"
@@ -1380,6 +1381,21 @@
   EXPECT_EQ(DownloadItem::CANCELLED, item->GetState());
 }
 
+TEST_F(DownloadItemTest, DownloadTargetDetermined_Conflict) {
+  DownloadItemImpl* item = CreateDownloadItem();
+  DownloadTargetCallback callback;
+  MockDownloadFile* download_file = CallDownloadItemStart(item, &callback);
+  base::FilePath target_path(FILE_PATH_LITERAL("/foo/bar"));
+
+  EXPECT_CALL(*download_file, Cancel());
+  callback.Run(target_path, DownloadItem::TARGET_DISPOSITION_OVERWRITE,
+               DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, target_path,
+               DOWNLOAD_INTERRUPT_REASON_FILE_SAME_AS_SOURCE);
+  EXPECT_EQ(DownloadItem::INTERRUPTED, item->GetState());
+  EXPECT_EQ(DOWNLOAD_INTERRUPT_REASON_FILE_SAME_AS_SOURCE,
+            item->GetLastReason());
+}
+
 TEST_F(DownloadItemTest, FileRemoved) {
   DownloadItemImpl* item = CreateDownloadItem();
 
diff --git a/content/browser/frame_host/render_frame_host_manager.cc b/content/browser/frame_host/render_frame_host_manager.cc
index 5ae522b..99c60f66 100644
--- a/content/browser/frame_host/render_frame_host_manager.cc
+++ b/content/browser/frame_host/render_frame_host_manager.cc
@@ -1454,6 +1454,33 @@
         SiteInstanceRelation::RELATED_DEFAULT_SUBFRAME);
   }
 
+  // Keep subframes in the parent's SiteInstance unless a dedicated process is
+  // required for either the parent or the subframe's destination URL.  This
+  // isn't a strict invariant but rather a heuristic to avoid unnecessary
+  // OOPIFs; see https://crbug.com/711006.  Note that this shouldn't apply to
+  // TopDocumentIsolation, so do this after TDI checks above.
+  if (!frame_tree_node_->IsMainFrame()) {
+    RenderFrameHostImpl* parent =
+        frame_tree_node_->parent()->current_frame_host();
+    bool dest_url_requires_dedicated_process =
+        SiteInstanceImpl::DoesSiteRequireDedicatedProcess(browser_context,
+                                                          dest_url);
+    // Web iframes embedded in DevTools extensions should not reuse the parent
+    // SiteInstance, but DevTools extensions are currently kept in the DevTools
+    // SiteInstance, which is not considered to require a dedicated process.
+    // Work around this by also checking whether the parent's URL requires a
+    // dedicated process.
+    // TODO(alexmos, nick): Remove this once https://crbug.com/706169 is fixed.
+    bool parent_url_requires_dedicated_process =
+        SiteInstanceImpl::DoesSiteRequireDedicatedProcess(
+            browser_context, parent->last_successful_url());
+    if (!parent->GetSiteInstance()->RequiresDedicatedProcess() &&
+        !dest_url_requires_dedicated_process &&
+        !parent_url_requires_dedicated_process) {
+      return SiteInstanceDescriptor(parent->GetSiteInstance());
+    }
+  }
+
   // Start the new renderer in a new SiteInstance, but in the current
   // BrowsingInstance.
   return SiteInstanceDescriptor(browser_context, dest_url,
diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc
index 2fd9d0b..3bf34b9b 100644
--- a/content/gpu/gpu_main.cc
+++ b/content/gpu/gpu_main.cc
@@ -191,9 +191,6 @@
       SEM_FAILCRITICALERRORS |
       SEM_NOGPFAULTERRORBOX |
       SEM_NOOPENFILEERRORBOX);
-#elif defined(USE_X11)
-  ui::SetDefaultX11ErrorHandlers();
-
 #endif
 
   logging::SetLogMessageHandler(GpuProcessLogMessageHandler);
@@ -218,6 +215,9 @@
 #elif defined(USE_X11)
     // We need a UI loop so that we can grab the Expose events. See GLSurfaceGLX
     // and https://crbug.com/326995.
+    ui::SetDefaultX11ErrorHandlers();
+    if (!gfx::GetXDisplay())
+      return RESULT_CODE_GPU_DEAD_ON_ARRIVAL;
     main_message_loop.reset(new base::MessageLoop(base::MessageLoop::TYPE_UI));
     event_source = ui::PlatformEventSource::CreateDefault();
 #elif defined(USE_OZONE)
diff --git a/content/public/browser/download_interrupt_reason_values.h b/content/public/browser/download_interrupt_reason_values.h
index bfffa12..2db302d 100644
--- a/content/public/browser/download_interrupt_reason_values.h
+++ b/content/public/browser/download_interrupt_reason_values.h
@@ -54,6 +54,9 @@
 // The partial file didn't match the expected hash.
 INTERRUPT_REASON(FILE_HASH_MISMATCH, 14)
 
+// The source and the target of the download were the same.
+INTERRUPT_REASON(FILE_SAME_AS_SOURCE, 15)
+
 // Network errors.
 
 // Generic network failure.
diff --git a/content/renderer/accessibility/blink_ax_enum_conversion.cc b/content/renderer/accessibility/blink_ax_enum_conversion.cc
index 8f4bb0e..59d3e3d8 100644
--- a/content/renderer/accessibility/blink_ax_enum_conversion.cc
+++ b/content/renderer/accessibility/blink_ax_enum_conversion.cc
@@ -10,8 +10,6 @@
 
 uint32_t AXStateFromBlink(const blink::WebAXObject& o) {
   uint32_t state = 0;
-  if (o.IsChecked())
-    state |= (1 << ui::AX_STATE_CHECKED);
 
   blink::WebAXExpanded expanded = o.IsExpanded();
   if (expanded) {
@@ -527,6 +525,20 @@
   return ui::AX_INVALID_STATE_NONE;
 }
 
+ui::AXCheckedState AXCheckedStateFromBlink(
+    blink::WebAXCheckedState checked_state) {
+  switch (checked_state) {
+    case blink::WebAXCheckedFalse:
+      return ui::AX_CHECKED_STATE_FALSE;
+    case blink::WebAXCheckedTrue:
+      return ui::AX_CHECKED_STATE_TRUE;
+    case blink::WebAXCheckedMixed:
+      return ui::AX_CHECKED_STATE_MIXED;
+  }
+  NOTREACHED();
+  return ui::AX_CHECKED_STATE_FALSE;
+}
+
 ui::AXSortDirection AXSortDirectionFromBlink(
     blink::WebAXSortDirection sort_direction) {
   switch (sort_direction) {
diff --git a/content/renderer/accessibility/blink_ax_enum_conversion.h b/content/renderer/accessibility/blink_ax_enum_conversion.h
index e324989..6701324 100644
--- a/content/renderer/accessibility/blink_ax_enum_conversion.h
+++ b/content/renderer/accessibility/blink_ax_enum_conversion.h
@@ -40,6 +40,9 @@
 ui::AXInvalidState AXInvalidStateFromBlink(
     blink::WebAXInvalidState invalid_state);
 
+ui::AXCheckedState AXCheckedStateFromBlink(
+    blink::WebAXCheckedState checked_state);
+
 ui::AXSortDirection AXSortDirectionFromBlink(
     blink::WebAXSortDirection sort_direction);
 
diff --git a/content/renderer/accessibility/blink_ax_tree_source.cc b/content/renderer/accessibility/blink_ax_tree_source.cc
index 4e20199..1c89507 100644
--- a/content/renderer/accessibility/blink_ax_tree_source.cc
+++ b/content/renderer/accessibility/blink_ax_tree_source.cc
@@ -427,9 +427,6 @@
     dst->AddStringAttribute(ui::AX_ATTR_VALUE, src.StringValue().Utf8());
   }
 
-  if (src.IsButtonStateMixed())
-    dst->AddBoolAttribute(ui::AX_ATTR_STATE_MIXED, true);
-
   if (src.CanSetValueAttribute())
     dst->AddBoolAttribute(ui::AX_ATTR_CAN_SET_VALUE, true);
 
@@ -493,6 +490,12 @@
                               src.AriaInvalidValue().Utf8());
     }
 
+    if (src.IsCheckable()) {
+      const blink::WebAXCheckedState checked_state = src.CheckedState();
+      dst->AddIntAttribute(ui::AX_ATTR_CHECKED_STATE,
+                           AXCheckedStateFromBlink(checked_state));
+    }
+
     if (src.GetTextDirection()) {
       dst->AddIntAttribute(ui::AX_ATTR_TEXT_DIRECTION,
                            AXTextDirectionFromBlink(src.GetTextDirection()));
diff --git a/content/shell/test_runner/web_ax_object_proxy.cc b/content/shell/test_runner/web_ax_object_proxy.cc
index 36242d0..7ef4798 100644
--- a/content/shell/test_runner/web_ax_object_proxy.cc
+++ b/content/shell/test_runner/web_ax_object_proxy.cc
@@ -1020,7 +1020,7 @@
 
 bool WebAXObjectProxy::IsChecked() {
   accessibility_object_.UpdateLayoutAndCheckValidity();
-  return accessibility_object_.IsChecked();
+  return accessibility_object_.CheckedState() != blink::WebAXCheckedFalse;
 }
 
 bool WebAXObjectProxy::IsCollapsed() {
@@ -1233,7 +1233,7 @@
 
 bool WebAXObjectProxy::IsButtonStateMixed() {
   accessibility_object_.UpdateLayoutAndCheckValidity();
-  return accessibility_object_.IsButtonStateMixed();
+  return accessibility_object_.CheckedState() == blink::WebAXCheckedMixed;
 }
 
 v8::Local<v8::Object> WebAXObjectProxy::AriaControlsElementAtIndex(
diff --git a/content/test/data/accessibility/aom/aom-checked-expected-blink.txt b/content/test/data/accessibility/aom/aom-checked-expected-blink.txt
index bc211fd..09b23c7 100644
--- a/content/test/data/accessibility/aom/aom-checked-expected-blink.txt
+++ b/content/test/data/accessibility/aom/aom-checked-expected-blink.txt
@@ -1,5 +1,5 @@
 rootWebArea
-++checkBox
-++checkBox checked
-++checkBox
-++checkBox STATEMixed=true
+++checkBox checkedState=1
+++checkBox checkedState=2
+++checkBox checkedState=1
+++checkBox checkedState=3
diff --git a/content/test/data/accessibility/aom/aom-checked.html b/content/test/data/accessibility/aom/aom-checked.html
index e29bf281..6707ef7 100644
--- a/content/test/data/accessibility/aom/aom-checked.html
+++ b/content/test/data/accessibility/aom/aom-checked.html
@@ -1,7 +1,6 @@
 <!DOCTYPE html>
 <!--
-@BLINK-ALLOW:checked
-@BLINK-ALLOW:*Mixed*
+@BLINK-ALLOW:checkedState=*
 @MAC-ALLOW:AXRole*
 @WIN-ALLOW:CHECKED*
 @WIN-ALLOW:MIXED*
diff --git a/content/test/data/accessibility/aria/aria-menuitemradio-expected-mac.txt b/content/test/data/accessibility/aria/aria-menuitemradio-expected-mac.txt
index 732802b..459793f 100644
--- a/content/test/data/accessibility/aria/aria-menuitemradio-expected-mac.txt
+++ b/content/test/data/accessibility/aria/aria-menuitemradio-expected-mac.txt
@@ -4,5 +4,5 @@
 ++++++AXStaticText AXRoleDescription='text' AXValue='Menu item 1'
 ++++AXMenuItem AXRoleDescription='menu item' AXTitle='Menu item 2' AXValue='1'
 ++++++AXStaticText AXRoleDescription='text' AXValue='Menu item 2'
-++++AXMenuItem AXRoleDescription='menu item' AXTitle='Menu item 3' AXValue='0'
+++++AXMenuItem AXRoleDescription='menu item' AXTitle='Menu item 3' AXValue='2'
 ++++++AXStaticText AXRoleDescription='text' AXValue='Menu item 3'
diff --git a/content/test/data/accessibility/aria/aria-menuitemradio-expected-win.txt b/content/test/data/accessibility/aria/aria-menuitemradio-expected-win.txt
index aa3adc7a..78b6191 100644
--- a/content/test/data/accessibility/aria/aria-menuitemradio-expected-win.txt
+++ b/content/test/data/accessibility/aria/aria-menuitemradio-expected-win.txt
@@ -4,5 +4,5 @@
 ++++++ROLE_SYSTEM_STATICTEXT name='Menu item 1' ia2_hypertext='Menu item 1'
 ++++IA2_ROLE_RADIO_MENU_ITEM name='Menu item 2' CHECKED xml-roles:menuitemradio checkable:true ia2_hypertext='Menu item 2'
 ++++++ROLE_SYSTEM_STATICTEXT name='Menu item 2' ia2_hypertext='Menu item 2'
-++++IA2_ROLE_RADIO_MENU_ITEM name='Menu item 3' xml-roles:menuitemradio checkable:true ia2_hypertext='Menu item 3'
+++++IA2_ROLE_RADIO_MENU_ITEM name='Menu item 3' MIXED xml-roles:menuitemradio checkable:true ia2_hypertext='Menu item 3'
 ++++++ROLE_SYSTEM_STATICTEXT name='Menu item 3' ia2_hypertext='Menu item 3'
diff --git a/content/test/data/accessibility/aria/aria-posinset-expected-mac.txt b/content/test/data/accessibility/aria/aria-posinset-expected-mac.txt
index 0027c71..34903d46 100644
--- a/content/test/data/accessibility/aria/aria-posinset-expected-mac.txt
+++ b/content/test/data/accessibility/aria/aria-posinset-expected-mac.txt
@@ -6,15 +6,15 @@
 ++++AXStaticText AXRoleDescription='text' AXValue='Item 1' AXARIASetSize='2' AXARIAPosInSet='1'
 ++++AXStaticText AXRoleDescription='text' AXValue='Item 2' AXARIASetSize='2' AXARIAPosInSet='2'
 ++AXGroup AXRoleDescription='form'
-++++AXRadioButton AXRoleDescription='radio button' AXValue='0' AXARIASetSize='4' AXARIAPosInSet='3'
+++++AXRadioButton AXRoleDescription='radio button' AXValue='2' AXARIASetSize='4' AXARIAPosInSet='3'
 ++++AXStaticText AXRoleDescription='text' AXValue='1'
 ++++AXUnknown AXRoleDescription='unknown' AXTitle='<newline>'
-++++AXRadioButton AXRoleDescription='radio button' AXValue='0' AXARIASetSize='4' AXARIAPosInSet='4'
+++++AXRadioButton AXRoleDescription='radio button' AXValue='2' AXARIASetSize='4' AXARIAPosInSet='4'
 ++++AXStaticText AXRoleDescription='text' AXValue='2'
-++AXRadioButton AXRoleDescription='radio button' AXValue='0' AXARIASetSize='2' AXARIAPosInSet='1'
+++AXRadioButton AXRoleDescription='radio button' AXValue='2' AXARIASetSize='2' AXARIAPosInSet='1'
 ++AXStaticText AXRoleDescription='text' AXValue='Apple'
 ++AXUnknown AXRoleDescription='unknown' AXTitle='<newline>'
-++AXRadioButton AXRoleDescription='radio button' AXValue='0' AXARIASetSize='2' AXARIAPosInSet='2'
+++AXRadioButton AXRoleDescription='radio button' AXValue='2' AXARIASetSize='2' AXARIAPosInSet='2'
 ++AXStaticText AXRoleDescription='text' AXValue='Banana'
 ++AXGroup AXRoleDescription='group' AXTitle='Cake'
 ++++AXGroup AXRoleDescription='group'
@@ -28,5 +28,5 @@
 ++++++AXGroup AXRoleDescription='group'
 ++++++++AXStaticText AXRoleDescription='text' AXValue='red'
 ++++++AXUnknown AXRoleDescription='unknown' AXTitle='<newline>'
-++++++AXRadioButton AXRoleDescription='radio button' AXTitle='blue' AXValue='0' AXARIASetSize='1' AXARIAPosInSet='1'
+++++++AXRadioButton AXRoleDescription='radio button' AXTitle='blue' AXValue='2' AXARIASetSize='1' AXARIAPosInSet='1'
 ++AXStaticText AXRoleDescription='text' AXValue='Done'
diff --git a/content/test/data/accessibility/aria/aria-switch-expected-android.txt b/content/test/data/accessibility/aria/aria-switch-expected-android.txt
index 1dfebf9..77c6b91e 100644
--- a/content/test/data/accessibility/aria/aria-switch-expected-android.txt
+++ b/content/test/data/accessibility/aria/aria-switch-expected-android.txt
@@ -1,4 +1,4 @@
 android.webkit.WebView focusable focused scrollable
-++android.widget.CheckBox role_description='switch' clickable name='Switch1'
+++android.widget.CheckBox role_description='switch' checkable clickable name='Switch1'
 ++android.widget.CheckBox role_description='switch' checkable checked clickable name='Switch2'
-++android.widget.CheckBox role_description='switch' clickable name='Switch3'
\ No newline at end of file
+++android.widget.CheckBox role_description='switch' checkable clickable name='Switch3'
diff --git a/content/test/data/accessibility/html/action-verbs-expected-blink.txt b/content/test/data/accessibility/html/action-verbs-expected-blink.txt
index c588e67..d2b2618 100644
--- a/content/test/data/accessibility/html/action-verbs-expected-blink.txt
+++ b/content/test/data/accessibility/html/action-verbs-expected-blink.txt
@@ -10,10 +10,10 @@
 ++++staticText name='Link' action=3
 ++++++inlineTextBox name='Link'
 ++textField
-++checkBox action=8
 ++checkBox action=2
+++checkBox action=8
 ++radioButton action=7
-++switch name='ARIA Switch' action=8
+++switch name='ARIA Switch' action=2
 ++popUpButton action=5
 ++++menuListPopup
 ++++++menuListOption name='Pop-up button' action=3
diff --git a/content/test/data/accessibility/html/input-checkbox-expected-android.txt b/content/test/data/accessibility/html/input-checkbox-expected-android.txt
index cd0d80c..4407d550 100644
--- a/content/test/data/accessibility/html/input-checkbox-expected-android.txt
+++ b/content/test/data/accessibility/html/input-checkbox-expected-android.txt
@@ -1,6 +1,7 @@
 android.webkit.WebView focusable focused scrollable
 ++android.view.View
+++++android.widget.CheckBox role_description='checkbox' checkable clickable focusable name='Checkbox0'
 ++++android.widget.CheckBox role_description='checkbox' checkable checked clickable focusable name='Checkbox1'
-++++android.widget.CheckBox role_description='checkbox' checkable clickable focusable name='Checkbox2'
-++++android.widget.CheckBox role_description='checkbox' checkable clickable focusable name='Checkbox3'
-++++android.widget.CheckBox role_description='checkbox' checkable clickable focusable name='Checkbox4'
\ No newline at end of file
+++++android.widget.CheckBox role_description='checkbox' checkable checked clickable focusable name='Checkbox2'
+++++android.widget.CheckBox role_description='checkbox' checkable checked clickable focusable name='Checkbox3'
+++++android.widget.CheckBox role_description='checkbox' checkable clickable focusable name='Checkbox4'
diff --git a/content/test/data/accessibility/html/input-checkbox-expected-mac.txt b/content/test/data/accessibility/html/input-checkbox-expected-mac.txt
index c91a85ad..aa4df8d 100644
--- a/content/test/data/accessibility/html/input-checkbox-expected-mac.txt
+++ b/content/test/data/accessibility/html/input-checkbox-expected-mac.txt
@@ -1,6 +1,7 @@
 AXWebArea AXRoleDescription='HTML content'
 ++AXGroup AXRoleDescription='group'
+++++AXCheckBox AXRoleDescription='checkbox' AXTitle='Checkbox0' AXValue='0'
 ++++AXCheckBox AXRoleDescription='checkbox' AXTitle='Checkbox1' AXValue='1'
-++++AXCheckBox AXRoleDescription='checkbox' AXTitle='Checkbox2' AXValue='0'
-++++AXCheckBox AXRoleDescription='checkbox' AXTitle='Checkbox3' AXValue='0'
+++++AXCheckBox AXRoleDescription='checkbox' AXTitle='Checkbox2' AXValue='1'
+++++AXCheckBox AXRoleDescription='checkbox' AXTitle='Checkbox3' AXValue='1'
 ++++AXCheckBox AXRoleDescription='checkbox' AXTitle='Checkbox4' AXValue='2'
diff --git a/content/test/data/accessibility/html/input-checkbox-expected-win.txt b/content/test/data/accessibility/html/input-checkbox-expected-win.txt
index 75aab32f..76039b2 100644
--- a/content/test/data/accessibility/html/input-checkbox-expected-win.txt
+++ b/content/test/data/accessibility/html/input-checkbox-expected-win.txt
@@ -1,6 +1,7 @@
 ROLE_SYSTEM_DOCUMENT READONLY FOCUSABLE ia2_hypertext='<obj0>'
-++IA2_ROLE_SECTION ia2_hypertext='<obj0><obj1><obj2><obj3>'
+++IA2_ROLE_SECTION ia2_hypertext='<obj0><obj1><obj2><obj3><obj4>'
+++++ROLE_SYSTEM_CHECKBUTTON name='Checkbox0' FOCUSABLE IA2_STATE_CHECKABLE checkable:true ia2_hypertext='Checkbox0'
 ++++ROLE_SYSTEM_CHECKBUTTON name='Checkbox1' CHECKED FOCUSABLE IA2_STATE_CHECKABLE checkable:true ia2_hypertext='Checkbox1'
-++++ROLE_SYSTEM_CHECKBUTTON name='Checkbox2' FOCUSABLE IA2_STATE_CHECKABLE checkable:true ia2_hypertext='Checkbox2'
-++++ROLE_SYSTEM_CHECKBUTTON name='Checkbox3' FOCUSABLE IA2_STATE_CHECKABLE xml-roles:checkbox checkable:true ia2_hypertext='Checkbox3'
+++++ROLE_SYSTEM_CHECKBUTTON name='Checkbox2' CHECKED FOCUSABLE IA2_STATE_CHECKABLE checkable:true ia2_hypertext='Checkbox2'
+++++ROLE_SYSTEM_CHECKBUTTON name='Checkbox3' CHECKED FOCUSABLE IA2_STATE_CHECKABLE xml-roles:checkbox checkable:true ia2_hypertext='Checkbox3'
 ++++ROLE_SYSTEM_CHECKBUTTON name='Checkbox4' MIXED FOCUSABLE IA2_STATE_CHECKABLE checkable:true ia2_hypertext='Checkbox4'
diff --git a/content/test/data/accessibility/html/input-checkbox.html b/content/test/data/accessibility/html/input-checkbox.html
index 86a5a40..b884e31 100644
--- a/content/test/data/accessibility/html/input-checkbox.html
+++ b/content/test/data/accessibility/html/input-checkbox.html
@@ -9,6 +9,7 @@
 -->
 <html>
 <body>
+  <label><input type="checkbox" value="Checked0">Checkbox0</label>
   <label><input type="checkbox" checked value="Checked1">Checkbox1</label>
   <label><input type="checkbox" aria-checked="true" value="Checked2">Checkbox2</label>
   <label><input type="checkbox" role="checkbox" aria-checked="true" value="Checked3">Checkbox3</label>
diff --git a/content/test/data/accessibility/html/input-radio-expected-android.txt b/content/test/data/accessibility/html/input-radio-expected-android.txt
index 4e67ca9..05d98f0 100644
--- a/content/test/data/accessibility/html/input-radio-expected-android.txt
+++ b/content/test/data/accessibility/html/input-radio-expected-android.txt
@@ -8,3 +8,6 @@
 ++android.view.View
 ++++android.widget.RadioButton role_description='radio button' checkable clickable focusable name='Radio3'
 ++++android.widget.RadioButton role_description='radio button' checkable checked clickable focusable name='Radio4'
+++android.view.View
+++++android.widget.RadioButton role_description='radio button' checkable clickable focusable name='Radio5'
+++++android.widget.RadioButton role_description='radio button' checkable checked clickable focusable name='Radio6'
diff --git a/content/test/data/accessibility/html/input-radio-expected-blink.txt b/content/test/data/accessibility/html/input-radio-expected-blink.txt
index 649ef1f..2df1d55 100644
--- a/content/test/data/accessibility/html/input-radio-expected-blink.txt
+++ b/content/test/data/accessibility/html/input-radio-expected-blink.txt
@@ -11,3 +11,6 @@
 ++form
 ++++radioButton name='Radio3' radioGroupIds=radioButton,radioButton
 ++++radioButton name='Radio4' radioGroupIds=radioButton,radioButton
+++form
+++++radioButton name='Radio5' radioGroupIds=radioButton
+++++radioButton name='Radio6' radioGroupIds=radioButton
diff --git a/content/test/data/accessibility/html/input-radio-expected-mac.txt b/content/test/data/accessibility/html/input-radio-expected-mac.txt
index 628eddb..c54984b 100644
--- a/content/test/data/accessibility/html/input-radio-expected-mac.txt
+++ b/content/test/data/accessibility/html/input-radio-expected-mac.txt
@@ -1,10 +1,13 @@
 AXWebArea
 ++AXGroup
-++++AXRadioButton AXValue='0' AXLinkedUIElements=["AXRadioButton 0"]
+++++AXRadioButton AXValue='2' AXLinkedUIElements=["AXRadioButton 2"]
 ++++AXStaticText AXValue='Radio1'
 ++++AXUnknown AXTitle='<newline>'
-++++AXRadioButton AXValue='0' AXLinkedUIElements=["AXRadioButton 0"]
+++++AXRadioButton AXValue='2' AXLinkedUIElements=["AXRadioButton 2"]
 ++++AXStaticText AXValue='Radio2'
 ++AXGroup
 ++++AXRadioButton AXTitle='Radio3' AXValue='0' AXLinkedUIElements=["AXRadioButton Radio3","AXRadioButton Radio4"]
 ++++AXRadioButton AXTitle='Radio4' AXValue='1' AXLinkedUIElements=["AXRadioButton Radio3","AXRadioButton Radio4"]
+++AXGroup
+++++AXRadioButton AXTitle='Radio5' AXValue='2' AXLinkedUIElements=["AXRadioButton Radio5"]
+++++AXRadioButton AXTitle='Radio6' AXValue='1' AXLinkedUIElements=["AXRadioButton Radio6"]
\ No newline at end of file
diff --git a/content/test/data/accessibility/html/input-radio-expected-win.txt b/content/test/data/accessibility/html/input-radio-expected-win.txt
index b8c8be3..188dcd9 100644
--- a/content/test/data/accessibility/html/input-radio-expected-win.txt
+++ b/content/test/data/accessibility/html/input-radio-expected-win.txt
@@ -1,10 +1,13 @@
-ROLE_SYSTEM_DOCUMENT READONLY FOCUSABLE ia2_hypertext='<obj0><obj1>'
+ROLE_SYSTEM_DOCUMENT READONLY FOCUSABLE ia2_hypertext='<obj0><obj1><obj2>'
 ++IA2_ROLE_FORM ia2_hypertext='<obj0>Radio1<newline><obj3>Radio2'
-++++ROLE_SYSTEM_RADIOBUTTON FOCUSABLE IA2_STATE_CHECKABLE checkable:true
+++++ROLE_SYSTEM_RADIOBUTTON MIXED FOCUSABLE IA2_STATE_CHECKABLE checkable:true
 ++++ROLE_SYSTEM_STATICTEXT name='Radio1' ia2_hypertext='Radio1'
 ++++ROLE_SYSTEM_WHITESPACE name='<newline>' ia2_hypertext='<newline>'
-++++ROLE_SYSTEM_RADIOBUTTON FOCUSABLE IA2_STATE_CHECKABLE checkable:true
+++++ROLE_SYSTEM_RADIOBUTTON MIXED FOCUSABLE IA2_STATE_CHECKABLE checkable:true
 ++++ROLE_SYSTEM_STATICTEXT name='Radio2' ia2_hypertext='Radio2'
 ++IA2_ROLE_FORM ia2_hypertext='<obj0><obj1>'
 ++++ROLE_SYSTEM_RADIOBUTTON name='Radio3' FOCUSABLE IA2_STATE_CHECKABLE checkable:true ia2_hypertext='Radio3'
-++++ROLE_SYSTEM_RADIOBUTTON name='Radio4' CHECKED FOCUSABLE IA2_STATE_CHECKABLE checkable:true ia2_hypertext='Radio4'
\ No newline at end of file
+++++ROLE_SYSTEM_RADIOBUTTON name='Radio4' CHECKED FOCUSABLE IA2_STATE_CHECKABLE checkable:true ia2_hypertext='Radio4'
+++IA2_ROLE_FORM ia2_hypertext='<obj0><obj1>'
+++++ROLE_SYSTEM_RADIOBUTTON name='Radio5' MIXED FOCUSABLE IA2_STATE_CHECKABLE checkable:true ia2_hypertext='Radio5'
+++++ROLE_SYSTEM_RADIOBUTTON name='Radio6' CHECKED FOCUSABLE IA2_STATE_CHECKABLE checkable:true ia2_hypertext='Radio6'
diff --git a/content/test/data/accessibility/html/input-radio-in-menu-expected-android.txt b/content/test/data/accessibility/html/input-radio-in-menu-expected-android.txt
index 422d261..b382bf3 100644
--- a/content/test/data/accessibility/html/input-radio-in-menu-expected-android.txt
+++ b/content/test/data/accessibility/html/input-radio-in-menu-expected-android.txt
@@ -1,8 +1,11 @@
 android.webkit.WebView focusable focused scrollable
 ++android.view.View
+++++android.view.MenuItem role_description='radio button' checkable checked clickable focusable
+++++android.view.View name='Radio0 '
 ++++android.view.MenuItem role_description='radio button' checkable clickable focusable
 ++++android.view.View name='Radio1 '
 ++++android.widget.RadioButton role_description='radio button' checkable clickable focusable name='Radio2'
 ++android.view.View role_description='menu'
 ++++android.widget.RadioButton role_description='radio button' checkable clickable focusable name='Radio3'
-++++android.view.MenuItem role_description='radio button' checkable clickable focusable
\ No newline at end of file
+++++android.view.MenuItem role_description='radio button' checkable clickable focusable
+++++android.view.MenuItem role_description='radio button' checkable checked clickable focusable
diff --git a/content/test/data/accessibility/html/input-radio-in-menu-expected-win.txt b/content/test/data/accessibility/html/input-radio-in-menu-expected-win.txt
index 85a5433..6d15c2cc 100644
--- a/content/test/data/accessibility/html/input-radio-in-menu-expected-win.txt
+++ b/content/test/data/accessibility/html/input-radio-in-menu-expected-win.txt
@@ -1,8 +1,11 @@
 ROLE_SYSTEM_DOCUMENT READONLY FOCUSABLE ia2_hypertext='<obj0><obj1>'
-++IA2_ROLE_SECTION ia2_hypertext='<obj0>Radio1 <obj2>'
+++IA2_ROLE_SECTION ia2_hypertext='<obj0>Radio0 <obj2>Radio1 <obj4>'
+++++IA2_ROLE_RADIO_MENU_ITEM CHECKED FOCUSABLE checkable:true
+++++ROLE_SYSTEM_STATICTEXT name='Radio0 ' ia2_hypertext='Radio0 '
 ++++IA2_ROLE_RADIO_MENU_ITEM FOCUSABLE checkable:true
 ++++ROLE_SYSTEM_STATICTEXT name='Radio1 ' ia2_hypertext='Radio1 '
 ++++ROLE_SYSTEM_RADIOBUTTON name='Radio2' FOCUSABLE checkable:true ia2_hypertext='Radio2'
-++ROLE_SYSTEM_MENUPOPUP ia2_hypertext='<obj0><obj1>'
+++ROLE_SYSTEM_MENUPOPUP ia2_hypertext='<obj0><obj1><obj2>'
 ++++ROLE_SYSTEM_RADIOBUTTON name='Radio3' FOCUSABLE checkable:true ia2_hypertext='Radio3'
 ++++IA2_ROLE_RADIO_MENU_ITEM FOCUSABLE checkable:true
+++++IA2_ROLE_RADIO_MENU_ITEM CHECKED FOCUSABLE checkable:true
diff --git a/content/test/data/accessibility/html/input-radio-in-menu.html b/content/test/data/accessibility/html/input-radio-in-menu.html
index 5648220..3b82375 100644
--- a/content/test/data/accessibility/html/input-radio-in-menu.html
+++ b/content/test/data/accessibility/html/input-radio-in-menu.html
@@ -1,5 +1,5 @@
 <!--
-@MAC-ALLOW:AXLinkedUIElements*
+@WIN-ALLOW:CHECKED*
 @WIN-ALLOW:MIXED*
 @WIN-ALLOW:checkable*
 @WIN-ALLOW:ia2_hypertext=*
@@ -7,12 +7,14 @@
 <html>
   <body>
     <menu type="list">
-      <input type="radio" value="r1">Radio1
-      <label><input type="radio" name="r" value="r2">Radio2</label>
+      <input type="radio" name="rg1" value="r0" checked>Radio0
+      <input type="radio" name="rg1" value="r1">Radio1
+      <label><input type="radio" name="rg1" value="r2">Radio2</label>
     </menu>
     <div role="menu">
-      <label><input type="radio" name="r" value="r3">Radio3</label>
-      <input type="radio" value="r4">
+      <label><input type="radio" name="rg2" value="r3">Radio3</label>
+      <input type="radio" name="rg2" value="r4">
+      <input type="radio" name="rg2" value="r5" checked>
     </div>
   </body>
 </html>
diff --git a/content/test/data/accessibility/html/input-radio.html b/content/test/data/accessibility/html/input-radio.html
index 2032c611..dadba4d8 100644
--- a/content/test/data/accessibility/html/input-radio.html
+++ b/content/test/data/accessibility/html/input-radio.html
@@ -17,5 +17,9 @@
       <label><input type="radio" name="rGroup" value="r3">Radio3</label>
       <label><input type="radio" name="rGroup" checked value="r4">Radio4</label>
     </form>
+    <form>
+      <label><input type="radio" name="r1" value="r3">Radio5</label>
+      <label><input type="radio" name="r2" checked value="r4">Radio6</label>
+    </form>
   </body>
 </html>
diff --git a/device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothAdapter.java b/device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothAdapter.java
index d6a3eb06..dbe0e697 100644
--- a/device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothAdapter.java
+++ b/device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothAdapter.java
@@ -29,7 +29,7 @@
  * Lifetime is controlled by device::BluetoothAdapterAndroid.
  */
 @JNINamespace("device")
-@TargetApi(Build.VERSION_CODES.LOLLIPOP)
+@TargetApi(Build.VERSION_CODES.M)
 final class ChromeBluetoothAdapter extends BroadcastReceiver {
     private static final String TAG = "Bluetooth";
 
diff --git a/device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothDevice.java b/device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothDevice.java
index 05f44837..52f1991 100644
--- a/device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothDevice.java
+++ b/device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothDevice.java
@@ -23,7 +23,7 @@
  * Lifetime is controlled by device::BluetoothDeviceAndroid.
  */
 @JNINamespace("device")
-@TargetApi(Build.VERSION_CODES.LOLLIPOP)
+@TargetApi(Build.VERSION_CODES.M)
 final class ChromeBluetoothDevice {
     private static final String TAG = "Bluetooth";
 
@@ -108,7 +108,9 @@
         // autoConnect set to false as under experimentation using autoConnect failed to complete
         // connections.
         mBluetoothGatt =
-                mDevice.connectGatt(context, false /* autoConnect */, mBluetoothGattCallbackImpl);
+                mDevice.connectGatt(context, false /* autoConnect */, mBluetoothGattCallbackImpl,
+                        // Prefer LE for dual-mode devices due to lower energy consumption.
+                        BluetoothDevice.TRANSPORT_LE);
     }
 
     // Implements BluetoothDeviceAndroid::DisconnectGatt.
diff --git a/device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothRemoteGattCharacteristic.java b/device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothRemoteGattCharacteristic.java
index fdf6c7b..f824cf7c 100644
--- a/device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothRemoteGattCharacteristic.java
+++ b/device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothRemoteGattCharacteristic.java
@@ -21,7 +21,7 @@
  * device::BluetoothRemoteGattCharacteristicAndroid.
  */
 @JNINamespace("device")
-@TargetApi(Build.VERSION_CODES.LOLLIPOP)
+@TargetApi(Build.VERSION_CODES.M)
 final class ChromeBluetoothRemoteGattCharacteristic {
     private static final String TAG = "Bluetooth";
 
diff --git a/device/bluetooth/android/java/src/org/chromium/device/bluetooth/Wrappers.java b/device/bluetooth/android/java/src/org/chromium/device/bluetooth/Wrappers.java
index 4b3b3a8..e389baa 100644
--- a/device/bluetooth/android/java/src/org/chromium/device/bluetooth/Wrappers.java
+++ b/device/bluetooth/android/java/src/org/chromium/device/bluetooth/Wrappers.java
@@ -42,7 +42,7 @@
  * pass through to the Android object and instead provide fake implementations.
  */
 @JNINamespace("device")
-@TargetApi(Build.VERSION_CODES.LOLLIPOP)
+@TargetApi(Build.VERSION_CODES.M)
 class Wrappers {
     private static final String TAG = "Bluetooth";
 
@@ -110,7 +110,7 @@
          */
         @CalledByNative("BluetoothAdapterWrapper")
         public static BluetoothAdapterWrapper createWithDefaultAdapter(Context context) {
-            final boolean hasMinAPI = Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP;
+            final boolean hasMinAPI = Build.VERSION.SDK_INT >= Build.VERSION_CODES.M;
             if (!hasMinAPI) {
                 Log.i(TAG, "BluetoothAdapterWrapper.create failed: SDK version (%d) too low.",
                         Build.VERSION.SDK_INT);
@@ -315,11 +315,11 @@
                     new HashMap<BluetoothGattDescriptor, BluetoothGattDescriptorWrapper>();
         }
 
-        public BluetoothGattWrapper connectGatt(
-                Context context, boolean autoConnect, BluetoothGattCallbackWrapper callback) {
+        public BluetoothGattWrapper connectGatt(Context context, boolean autoConnect,
+                BluetoothGattCallbackWrapper callback, int transport) {
             return new BluetoothGattWrapper(
                     mDevice.connectGatt(context, autoConnect,
-                            new ForwardBluetoothGattCallbackToWrapper(callback, this)),
+                            new ForwardBluetoothGattCallbackToWrapper(callback, this), transport),
                     this);
         }
 
diff --git a/device/bluetooth/test/android/java/src/org/chromium/device/bluetooth/Fakes.java b/device/bluetooth/test/android/java/src/org/chromium/device/bluetooth/Fakes.java
index b4a1b34..5dc82771 100644
--- a/device/bluetooth/test/android/java/src/org/chromium/device/bluetooth/Fakes.java
+++ b/device/bluetooth/test/android/java/src/org/chromium/device/bluetooth/Fakes.java
@@ -39,7 +39,7 @@
  * each of these classes.
  */
 @JNINamespace("device")
-@TargetApi(Build.VERSION_CODES.LOLLIPOP)
+@TargetApi(Build.VERSION_CODES.M)
 class Fakes {
     private static final String TAG = "cr.Bluetooth";
 
@@ -412,7 +412,7 @@
 
         @Override
         public Wrappers.BluetoothGattWrapper connectGatt(Context context, boolean autoConnect,
-                Wrappers.BluetoothGattCallbackWrapper callback) {
+                Wrappers.BluetoothGattCallbackWrapper callback, int transport) {
             if (mGattCallback != null && mGattCallback != callback) {
                 throw new IllegalArgumentException(
                         "BluetoothGattWrapper doesn't support calls to connectGatt() with "
diff --git a/device/u2f/u2f_device.h b/device/u2f/u2f_device.h
index 3a7e916..06b9d2f 100644
--- a/device/u2f/u2f_device.h
+++ b/device/u2f/u2f_device.h
@@ -39,7 +39,7 @@
                           std::unique_ptr<U2fApduResponse> response)>;
   using WinkCallback = base::Callback<void()>;
 
-  ~U2fDevice();
+  virtual ~U2fDevice();
 
   // Raw messages parameters are defined by the specification at
   // https://fidoalliance.org/specs/fido-u2f-v1.0-nfc-bt-amendment-20150514/fido-u2f-raw-message-formats.html
diff --git a/device/u2f/u2f_hid_device.cc b/device/u2f/u2f_hid_device.cc
index c313b96e..62eda92 100644
--- a/device/u2f/u2f_hid_device.cc
+++ b/device/u2f/u2f_hid_device.cc
@@ -7,6 +7,7 @@
 #include "base/bind.h"
 #include "base/bind_helpers.h"
 #include "base/command_line.h"
+#include "base/threading/thread_task_runner_handle.h"
 #include "crypto/random.h"
 #include "device/base/device_client.h"
 #include "device/hid/hid_connection.h"
@@ -29,7 +30,7 @@
 
 U2fHidDevice::~U2fHidDevice() {
   // Cleanup connection
-  if (connection_)
+  if (connection_ && !connection_->closed())
     connection_->Close();
 }
 
@@ -43,17 +44,22 @@
   switch (state_) {
     case State::INIT:
       state_ = State::BUSY;
+      ArmTimeout(callback);
       Connect(base::Bind(&U2fHidDevice::OnConnect, weak_factory_.GetWeakPtr(),
                          base::Passed(&command), callback));
       break;
     case State::CONNECTED:
       state_ = State::BUSY;
+      ArmTimeout(callback);
       AllocateChannel(std::move(command), callback);
       break;
     case State::IDLE: {
       state_ = State::BUSY;
       std::unique_ptr<U2fMessage> msg = U2fMessage::Create(
           channel_id_, U2fMessage::Type::CMD_MSG, command->GetEncodedCommand());
+
+      ArmTimeout(callback);
+      // Write message to the device
       WriteMessage(std::move(msg), true,
                    base::Bind(&U2fHidDevice::MessageReceived,
                               weak_factory_.GetWeakPtr(), callback));
@@ -86,6 +92,10 @@
 void U2fHidDevice::OnConnect(std::unique_ptr<U2fApduCommand> command,
                              const DeviceCallback& callback,
                              scoped_refptr<HidConnection> connection) {
+  if (state_ == State::DEVICE_ERROR)
+    return;
+  timeout_callback_.Cancel();
+
   if (connection) {
     connection_ = connection;
     state_ = State::CONNECTED;
@@ -114,6 +124,10 @@
                                      const DeviceCallback& callback,
                                      bool success,
                                      std::unique_ptr<U2fMessage> message) {
+  if (state_ == State::DEVICE_ERROR)
+    return;
+  timeout_callback_.Cancel();
+
   if (!success || !message) {
     state_ = State::DEVICE_ERROR;
     Transition(nullptr, callback);
@@ -254,11 +268,16 @@
 void U2fHidDevice::MessageReceived(const DeviceCallback& callback,
                                    bool success,
                                    std::unique_ptr<U2fMessage> message) {
+  if (state_ == State::DEVICE_ERROR)
+    return;
+  timeout_callback_.Cancel();
+
   if (!success) {
     state_ = State::DEVICE_ERROR;
     Transition(nullptr, callback);
     return;
   }
+
   std::unique_ptr<U2fApduResponse> response = nullptr;
   if (message)
     response = U2fApduResponse::CreateFromMessage(message->GetMessagePayload());
@@ -297,8 +316,23 @@
   callback.Run();
 }
 
+void U2fHidDevice::ArmTimeout(const DeviceCallback& callback) {
+  DCHECK(timeout_callback_.IsCancelled());
+  timeout_callback_.Reset(base::Bind(&U2fHidDevice::OnTimeout,
+                                     weak_factory_.GetWeakPtr(), callback));
+  // Setup timeout task for 3 seconds
+  base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
+      FROM_HERE, timeout_callback_.callback(),
+      base::TimeDelta::FromMilliseconds(3000));
+}
+
+void U2fHidDevice::OnTimeout(const DeviceCallback& callback) {
+  state_ = State::DEVICE_ERROR;
+  Transition(nullptr, callback);
+}
+
 std::string U2fHidDevice::GetId() {
-  std::ostringstream id("hid:");
+  std::ostringstream id("hid:", std::ios::ate);
   id << device_info_->device_id();
   return id.str();
 }
diff --git a/device/u2f/u2f_hid_device.h b/device/u2f/u2f_hid_device.h
index 527c0b3..84694f4b 100644
--- a/device/u2f/u2f_hid_device.h
+++ b/device/u2f/u2f_hid_device.h
@@ -7,6 +7,7 @@
 
 #include <list>
 
+#include "base/cancelable_callback.h"
 #include "device/hid/hid_service.h"
 #include "u2f_device.h"
 
@@ -23,7 +24,7 @@
 class U2fHidDevice : public U2fDevice {
  public:
   U2fHidDevice(scoped_refptr<HidDeviceInfo>);
-  ~U2fHidDevice();
+  ~U2fHidDevice() final;
 
   // Send a U2f command to this device
   void DeviceTransact(std::unique_ptr<U2fApduCommand> command,
@@ -85,8 +86,13 @@
   void OnWink(const WinkCallback& callback,
               bool success,
               std::unique_ptr<U2fMessage> response);
+  void ArmTimeout(const DeviceCallback& callback);
+  void OnTimeout(const DeviceCallback& callback);
+  void OnDeviceTransact(bool success,
+                        std::unique_ptr<U2fApduResponse> response);
 
   State state_;
+  base::CancelableClosure timeout_callback_;
   std::list<std::pair<std::unique_ptr<U2fApduCommand>, DeviceCallback>>
       pending_transactions_;
   scoped_refptr<HidDeviceInfo> device_info_;
diff --git a/extensions/browser/BUILD.gn b/extensions/browser/BUILD.gn
index 73d31fec..1185fbd 100644
--- a/extensions/browser/BUILD.gn
+++ b/extensions/browser/BUILD.gn
@@ -504,7 +504,11 @@
   ]
 
   if (is_chromeos) {
-    sources += [ "api/webcam_private/visca_webcam_unittest.cc" ]
+    sources += [
+      "api/audio/audio_device_id_calculator_unittest.cc",
+      "api/webcam_private/visca_webcam_unittest.cc",
+    ]
+
     deps += [ "//chromeos:test_support" ]
   }
 }
diff --git a/extensions/browser/api/audio/BUILD.gn b/extensions/browser/api/audio/BUILD.gn
index 00581fa..3822b10d 100644
--- a/extensions/browser/api/audio/BUILD.gn
+++ b/extensions/browser/api/audio/BUILD.gn
@@ -6,7 +6,11 @@
   sources = [
     "audio_api.cc",
     "audio_api.h",
+    "audio_device_id_calculator.cc",
+    "audio_device_id_calculator.h",
     "audio_service.h",
+    "pref_names.cc",
+    "pref_names.h",
   ]
 
   if (is_chromeos) {
@@ -16,6 +20,7 @@
   }
 
   deps = [
+    "//components/prefs",
     "//extensions/common/api",
   ]
 }
diff --git a/extensions/browser/api/audio/audio_api.cc b/extensions/browser/api/audio/audio_api.cc
index c81921c..764b03c7 100644
--- a/extensions/browser/api/audio/audio_api.cc
+++ b/extensions/browser/api/audio/audio_api.cc
@@ -7,7 +7,11 @@
 #include <utility>
 
 #include "base/lazy_instance.h"
+#include "base/memory/ptr_util.h"
 #include "base/values.h"
+#include "components/prefs/pref_registry_simple.h"
+#include "extensions/browser/api/audio/audio_device_id_calculator.h"
+#include "extensions/browser/api/audio/pref_names.h"
 #include "extensions/browser/event_router.h"
 #include "extensions/common/api/audio.h"
 #include "extensions/common/extension.h"
@@ -20,6 +24,11 @@
 
 namespace {
 
+std::unique_ptr<AudioDeviceIdCalculator> CreateIdCalculator(
+    content::BrowserContext* context) {
+  return base::MakeUnique<AudioDeviceIdCalculator>(context);
+}
+
 // Checks if an extension is whitelisted to use deprecated version of audio API.
 // TODO(tbarzic): Retire this whitelist and remove the deprecated API methods,
 //     properties and events. This is currently targeted for M-60
@@ -51,24 +60,27 @@
     BrowserContextKeyedAPIFactory<AudioAPI>>::DestructorAtExit g_factory =
     LAZY_INSTANCE_INITIALIZER;
 
+void AudioAPI::RegisterUserPrefs(PrefRegistrySimple* registry) {
+  registry->RegisterListPref(kAudioApiStableDeviceIds);
+}
+
 // static
 BrowserContextKeyedAPIFactory<AudioAPI>* AudioAPI::GetFactoryInstance() {
   return g_factory.Pointer();
 }
 
 AudioAPI::AudioAPI(content::BrowserContext* context)
-    : browser_context_(context), service_(AudioService::CreateInstance()) {
-  service_->AddObserver(this);
+    : browser_context_(context),
+      stable_id_calculator_(CreateIdCalculator(context)),
+      service_(AudioService::CreateInstance(stable_id_calculator_.get())),
+      audio_service_observer_(this) {
+  audio_service_observer_.Add(service_.get());
 }
 
-AudioAPI::~AudioAPI() {
-  service_->RemoveObserver(this);
-  delete service_;
-  service_ = NULL;
-}
+AudioAPI::~AudioAPI() {}
 
 AudioService* AudioAPI::GetService() const {
-  return service_;
+  return service_.get();
 }
 
 void AudioAPI::OnDeviceChanged() {
diff --git a/extensions/browser/api/audio/audio_api.h b/extensions/browser/api/audio/audio_api.h
index 0e176e2e..4758fd50 100644
--- a/extensions/browser/api/audio/audio_api.h
+++ b/extensions/browser/api/audio/audio_api.h
@@ -5,16 +5,25 @@
 #ifndef EXTENSIONS_BROWSER_API_AUDIO_AUDIO_API_H_
 #define EXTENSIONS_BROWSER_API_AUDIO_AUDIO_API_H_
 
+#include <memory>
+#include <string>
+
+#include "base/scoped_observer.h"
 #include "extensions/browser/api/audio/audio_service.h"
 #include "extensions/browser/browser_context_keyed_api_factory.h"
 #include "extensions/browser/extension_function.h"
 
+class PrefRegistrySimple;
+
 namespace extensions {
 
 class AudioService;
+class AudioDeviceIdCalculator;
 
 class AudioAPI : public BrowserContextKeyedAPI, public AudioService::Observer {
  public:
+  static void RegisterUserPrefs(PrefRegistrySimple* registry);
+
   explicit AudioAPI(content::BrowserContext* context);
   ~AudioAPI() override;
 
@@ -38,7 +47,12 @@
   }
 
   content::BrowserContext* const browser_context_;
-  AudioService* service_;
+  std::unique_ptr<AudioDeviceIdCalculator> stable_id_calculator_;
+  std::unique_ptr<AudioService> service_;
+
+  ScopedObserver<AudioService, AudioService::Observer> audio_service_observer_;
+
+  DISALLOW_COPY_AND_ASSIGN(AudioAPI);
 };
 
 class AudioGetInfoFunction : public UIThreadExtensionFunction {
diff --git a/extensions/browser/api/audio/audio_device_id_calculator.cc b/extensions/browser/api/audio/audio_device_id_calculator.cc
new file mode 100644
index 0000000..94a4c6c
--- /dev/null
+++ b/extensions/browser/api/audio/audio_device_id_calculator.cc
@@ -0,0 +1,66 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "extensions/browser/api/audio/audio_device_id_calculator.h"
+
+#include "base/strings/string_number_conversions.h"
+#include "components/prefs/pref_service.h"
+#include "components/prefs/scoped_user_pref_update.h"
+#include "extensions/browser/api/audio/pref_names.h"
+#include "extensions/browser/extensions_browser_client.h"
+
+namespace extensions {
+
+AudioDeviceIdCalculator::AudioDeviceIdCalculator(
+    content::BrowserContext* context)
+    : context_(context) {}
+
+AudioDeviceIdCalculator::~AudioDeviceIdCalculator() {}
+
+std::string AudioDeviceIdCalculator::GetStableDeviceId(
+    uint64_t audio_service_stable_id) {
+  if (!stable_id_map_loaded_)
+    LoadStableIdMap();
+  std::string audio_service_stable_id_str =
+      base::Uint64ToString(audio_service_stable_id);
+  const auto& it = stable_id_map_.find(audio_service_stable_id_str);
+  if (it != stable_id_map_.end())
+    return it->second;
+  return GenerateNewStableDeviceId(audio_service_stable_id_str);
+}
+
+void AudioDeviceIdCalculator::LoadStableIdMap() {
+  DCHECK(!stable_id_map_loaded_);
+
+  PrefService* pref_service =
+      ExtensionsBrowserClient::Get()->GetPrefServiceForContext(context_);
+  const base::ListValue* audio_service_stable_ids =
+      pref_service->GetList(kAudioApiStableDeviceIds);
+  for (size_t i = 0; i < audio_service_stable_ids->GetSize(); ++i) {
+    std::string audio_service_stable_id;
+    if (!audio_service_stable_ids->GetString(i, &audio_service_stable_id)) {
+      NOTREACHED() << "Non string stable device ID.";
+      continue;
+    }
+    stable_id_map_[audio_service_stable_id] = base::SizeTToString(i);
+  }
+  stable_id_map_loaded_ = true;
+}
+
+std::string AudioDeviceIdCalculator::GenerateNewStableDeviceId(
+    const std::string& audio_service_stable_id) {
+  DCHECK(stable_id_map_loaded_);
+  DCHECK_EQ(0u, stable_id_map_.count(audio_service_stable_id));
+
+  ListPrefUpdate update(
+      ExtensionsBrowserClient::Get()->GetPrefServiceForContext(context_),
+      kAudioApiStableDeviceIds);
+
+  std::string api_stable_id = base::SizeTToString(update.Get()->GetSize());
+  stable_id_map_[audio_service_stable_id] = api_stable_id;
+  update->AppendString(audio_service_stable_id);
+  return api_stable_id;
+}
+
+}  // namespace extensions
diff --git a/extensions/browser/api/audio/audio_device_id_calculator.h b/extensions/browser/api/audio/audio_device_id_calculator.h
new file mode 100644
index 0000000..9d28581
--- /dev/null
+++ b/extensions/browser/api/audio/audio_device_id_calculator.h
@@ -0,0 +1,60 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef EXTENSIONS_BROWSER_API_AUDIO_AUDIO_DEVICE_ID_CALCULATOR_H_
+#define EXTENSIONS_BROWSER_API_AUDIO_AUDIO_DEVICE_ID_CALCULATOR_H_
+
+#include <map>
+#include <string>
+
+#include "base/macros.h"
+
+namespace content {
+class BrowserContext;
+}
+
+namespace extensions {
+
+// Helper class used to translate stable device IDs provided by audio service
+// to stable ID values exposable to apps using chrome.audio API.
+// Problem with stable device IDs provided by audio service is that they can be
+// globally unique for audio devices and thus can be used by apps to identify a
+// particular device. |AudioDeviceCalculator| provides stable mapping (saved in
+// user prefs) from potentially globally unique ID to an ordinal ID (devices are
+// assigned IDs incrementally, as they are added to the mapping) scoped to a
+// browser context.
+class AudioDeviceIdCalculator {
+ public:
+  explicit AudioDeviceIdCalculator(content::BrowserContext* context);
+  virtual ~AudioDeviceIdCalculator();
+
+  // Gets audio API stable device ID for the audio device whose stable device ID
+  // equals |audio_service_stable_id|.
+  std::string GetStableDeviceId(uint64_t audio_service_stable_id);
+
+ private:
+  // Loads stable ID mapping saved in user prefs.
+  // Stable device ID map is saved in prefs as list of stable IDs provided by
+  // audio service - stable ID at index i in the list is mapped to the ID "i".
+  void LoadStableIdMap();
+
+  // Generates and persists audio API stable device ID for the device whose
+  // audio service stable device ID equals |audio_service_stable_id|.
+  // Returns the generated ID.
+  std::string GenerateNewStableDeviceId(
+      const std::string& audio_service_stable_id);
+
+  content::BrowserContext* context_;
+
+  // Maps a stable device ID as exposed by audio service to the associated
+  // stable device ID that should be exposed to apps via chrome.audio API.
+  std::map<std::string, std::string> stable_id_map_;
+  bool stable_id_map_loaded_ = false;
+
+  DISALLOW_COPY_AND_ASSIGN(AudioDeviceIdCalculator);
+};
+
+}  // namespace extensions
+
+#endif  // EXTENSIONS_BROWSER_API_AUDIO_AUDIO_API_ID_CALCULATOR_H_
diff --git a/extensions/browser/api/audio/audio_device_id_calculator_unittest.cc b/extensions/browser/api/audio/audio_device_id_calculator_unittest.cc
new file mode 100644
index 0000000..d4ecd1a
--- /dev/null
+++ b/extensions/browser/api/audio/audio_device_id_calculator_unittest.cc
@@ -0,0 +1,88 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "extensions/browser/api/audio/audio_device_id_calculator.h"
+#include "components/prefs/testing_pref_service.h"
+#include "content/public/test/test_browser_context.h"
+#include "extensions/browser/api/audio/audio_api.h"
+#include "extensions/browser/test_extensions_browser_client.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+namespace extensions {
+
+namespace {
+
+class TestExtensionsBrowserClientWithPrefService
+    : public TestExtensionsBrowserClient {
+ public:
+  explicit TestExtensionsBrowserClientWithPrefService(
+      content::BrowserContext* main_context)
+      : TestExtensionsBrowserClient(main_context) {}
+  ~TestExtensionsBrowserClientWithPrefService() override {}
+
+  // ExtensionsBrowserClient override:
+  PrefService* GetPrefServiceForContext(
+      content::BrowserContext* context) override {
+    return &pref_service_;
+  }
+
+  TestingPrefServiceSimple* pref_service() { return &pref_service_; }
+
+ private:
+  TestingPrefServiceSimple pref_service_;
+
+  DISALLOW_COPY_AND_ASSIGN(TestExtensionsBrowserClientWithPrefService);
+};
+
+class AudioDeviceIdCalculatorTest : public testing::Test {
+ public:
+  AudioDeviceIdCalculatorTest() : test_browser_client_(&browser_context_) {}
+  ~AudioDeviceIdCalculatorTest() override {}
+
+  void SetUp() override {
+    AudioAPI::RegisterUserPrefs(
+        test_browser_client_.pref_service()->registry());
+    ExtensionsBrowserClient::Set(&test_browser_client_);
+  }
+
+  void TearDown() override { ExtensionsBrowserClient::Set(nullptr); }
+
+  content::BrowserContext* browser_context() { return &browser_context_; }
+
+ private:
+  content::TestBrowserContext browser_context_;
+  TestExtensionsBrowserClientWithPrefService test_browser_client_;
+
+  DISALLOW_COPY_AND_ASSIGN(AudioDeviceIdCalculatorTest);
+};
+
+}  // namespace
+
+TEST_F(AudioDeviceIdCalculatorTest, Test) {
+  std::unique_ptr<AudioDeviceIdCalculator> calculator(
+      new AudioDeviceIdCalculator(browser_context()));
+
+  // Generating new IDs.
+  EXPECT_EQ("0", calculator->GetStableDeviceId(12345));
+  EXPECT_EQ("1", calculator->GetStableDeviceId(54321));
+  EXPECT_EQ("2", calculator->GetStableDeviceId(11111));
+
+  // Test getting IDs generated so far.
+  EXPECT_EQ("1", calculator->GetStableDeviceId(54321));
+  EXPECT_EQ("0", calculator->GetStableDeviceId(12345));
+  EXPECT_EQ("2", calculator->GetStableDeviceId(11111));
+
+  // Reset the calculator and test adding stable IDs does not produce ID
+  // conflicting with previously added ones.
+  calculator.reset(new AudioDeviceIdCalculator(browser_context()));
+  EXPECT_EQ("3", calculator->GetStableDeviceId(22222));
+  EXPECT_EQ("4", calculator->GetStableDeviceId(33333));
+
+  // Test that ID mapping from before calculator reset is not lost.
+  EXPECT_EQ("1", calculator->GetStableDeviceId(54321));
+  EXPECT_EQ("2", calculator->GetStableDeviceId(11111));
+  EXPECT_EQ("0", calculator->GetStableDeviceId(12345));
+}
+
+}  // namespace extensions
diff --git a/extensions/browser/api/audio/audio_service.cc b/extensions/browser/api/audio/audio_service.cc
index 6bce2847..55fe0eab 100644
--- a/extensions/browser/api/audio/audio_service.cc
+++ b/extensions/browser/api/audio/audio_service.cc
@@ -39,7 +39,8 @@
   // TODO: implement this for platforms other than Chrome OS.
 }
 
-AudioService* AudioService::CreateInstance() {
+AudioService* AudioService::CreateInstance(
+    AudioDeviceIdCalculator* id_calculator) {
   return new AudioServiceImpl;
 }
 
diff --git a/extensions/browser/api/audio/audio_service.h b/extensions/browser/api/audio/audio_service.h
index 02d19fa..3983927 100644
--- a/extensions/browser/api/audio/audio_service.h
+++ b/extensions/browser/api/audio/audio_service.h
@@ -20,6 +20,8 @@
 using DeviceIdList = std::vector<std::string>;
 using DeviceInfoList = std::vector<api::audio::AudioDeviceInfo>;
 
+class AudioDeviceIdCalculator;
+
 class AudioService {
  public:
   class Observer {
@@ -42,7 +44,7 @@
   };
 
   // Creates a platform-specific AudioService instance.
-  static AudioService* CreateInstance();
+  static AudioService* CreateInstance(AudioDeviceIdCalculator* id_calculator);
 
   virtual ~AudioService() {}
 
diff --git a/extensions/browser/api/audio/audio_service_chromeos.cc b/extensions/browser/api/audio/audio_service_chromeos.cc
index 16124141..d8d12c2 100644
--- a/extensions/browser/api/audio/audio_service_chromeos.cc
+++ b/extensions/browser/api/audio/audio_service_chromeos.cc
@@ -9,12 +9,14 @@
 
 #include "base/callback.h"
 #include "base/macros.h"
+#include "base/memory/ptr_util.h"
 #include "base/memory/weak_ptr.h"
 #include "base/stl_util.h"
 #include "base/strings/string_number_conversions.h"
 #include "chromeos/audio/audio_device.h"
 #include "chromeos/audio/cras_audio_handler.h"
 #include "content/public/browser/browser_thread.h"
+#include "extensions/browser/api/audio/audio_device_id_calculator.h"
 
 using content::BrowserThread;
 
@@ -69,7 +71,7 @@
 class AudioServiceImpl : public AudioService,
                          public chromeos::CrasAudioHandler::AudioObserver {
  public:
-  AudioServiceImpl();
+  explicit AudioServiceImpl(AudioDeviceIdCalculator* id_calculator);
   ~AudioServiceImpl() override;
 
   // Called by listeners to this service to add/remove themselves as observers.
@@ -118,6 +120,8 @@
 
   chromeos::CrasAudioHandler* cras_audio_handler_;
 
+  AudioDeviceIdCalculator* id_calculator_;
+
   // Note: This should remain the last member so it'll be destroyed and
   // invalidate the weak pointers before any other members are destroyed.
   base::WeakPtrFactory<AudioServiceImpl> weak_ptr_factory_;
@@ -125,9 +129,12 @@
   DISALLOW_COPY_AND_ASSIGN(AudioServiceImpl);
 };
 
-AudioServiceImpl::AudioServiceImpl()
+AudioServiceImpl::AudioServiceImpl(AudioDeviceIdCalculator* id_calculator)
     : cras_audio_handler_(NULL),
+      id_calculator_(id_calculator),
       weak_ptr_factory_(this) {
+  CHECK(id_calculator_);
+
   if (chromeos::CrasAudioHandler::IsInitialized()) {
     cras_audio_handler_ = chromeos::CrasAudioHandler::Get();
     cras_audio_handler_->AddAudioObserver(this);
@@ -359,8 +366,8 @@
       device.is_input
           ? cras_audio_handler_->GetOutputVolumePercentForDevice(device.id)
           : cras_audio_handler_->GetInputGainPercentForDevice(device.id);
-  info.stable_device_id.reset(
-      new std::string(base::Uint64ToString(device.stable_device_id)));
+  info.stable_device_id = base::MakeUnique<std::string>(
+      id_calculator_->GetStableDeviceId(device.stable_device_id));
 
   return info;
 }
@@ -435,8 +442,9 @@
   NotifyDeviceChanged();
 }
 
-AudioService* AudioService::CreateInstance() {
-  return new AudioServiceImpl;
+AudioService* AudioService::CreateInstance(
+    AudioDeviceIdCalculator* id_calculator) {
+  return new AudioServiceImpl(id_calculator);
 }
 
 }  // namespace extensions
diff --git a/extensions/browser/api/audio/pref_names.cc b/extensions/browser/api/audio/pref_names.cc
new file mode 100644
index 0000000..ced4aa2
--- /dev/null
+++ b/extensions/browser/api/audio/pref_names.cc
@@ -0,0 +1,11 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "extensions/browser/api/audio/pref_names.h"
+
+namespace extensions {
+
+const char kAudioApiStableDeviceIds[] = "extensions.audio.stable_device_ids";
+
+}  // namespace extensions
diff --git a/extensions/browser/api/audio/pref_names.h b/extensions/browser/api/audio/pref_names.h
new file mode 100644
index 0000000..ae31504
--- /dev/null
+++ b/extensions/browser/api/audio/pref_names.h
@@ -0,0 +1,18 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef EXTENSIONS_BROWSER_API_AUDIO_PREF_NAMES_H_
+#define EXTENSIONS_BROWSER_API_AUDIO_PREF_NAMES_H_
+
+namespace extensions {
+
+// List of known audio device stable IDs. The list will be used to generate
+// stable device ID exposed to apps via chrome.audio API (in order to reduce
+// the possibility of apps globally identifying audio devices from their stable
+// IDs).
+extern const char kAudioApiStableDeviceIds[];
+
+}  // namespace extensions
+
+#endif  // EXTENSIONS_BROWSER_API_AUDIO_PREF_NAMES_H_
diff --git a/extensions/common/api/_permission_features.json b/extensions/common/api/_permission_features.json
index 80c5489a..b64d0c40 100644
--- a/extensions/common/api/_permission_features.json
+++ b/extensions/common/api/_permission_features.json
@@ -78,6 +78,12 @@
   },
   "audio": [
     {
+      "channel": "stable",
+      "extension_types": ["platform_app"],
+      "platforms": ["chromeos"],
+      "session_types": ["kiosk"]
+    },
+    {
       "channel": "dev",
       "extension_types": ["platform_app"]
     },
diff --git a/extensions/shell/browser/shell_extensions_browser_client.cc b/extensions/shell/browser/shell_extensions_browser_client.cc
index 1244f4a..8030a14e 100644
--- a/extensions/shell/browser/shell_extensions_browser_client.cc
+++ b/extensions/shell/browser/shell_extensions_browser_client.cc
@@ -93,6 +93,8 @@
 #if defined(OS_CHROMEOS)
 std::string ShellExtensionsBrowserClient::GetUserIdHashFromContext(
     content::BrowserContext* context) {
+  if (!chromeos::LoginState::IsInitialized())
+    return "";
   return chromeos::LoginState::Get()->primary_user_hash();
 }
 #endif
diff --git a/extensions/shell/browser/shell_prefs.cc b/extensions/shell/browser/shell_prefs.cc
index eea12aee..861ac7bb 100644
--- a/extensions/shell/browser/shell_prefs.cc
+++ b/extensions/shell/browser/shell_prefs.cc
@@ -14,6 +14,7 @@
 #include "components/user_prefs/user_prefs.h"
 #include "content/public/browser/browser_context.h"
 #include "content/public/browser/browser_thread.h"
+#include "extensions/browser/api/audio/audio_api.h"
 #include "extensions/browser/extension_prefs.h"
 
 #if defined(OS_CHROMEOS)
@@ -80,6 +81,7 @@
   // Prefs should be registered before the PrefService is created.
   PrefRegistrySyncable* pref_registry = new PrefRegistrySyncable;
   ExtensionPrefs::RegisterProfilePrefs(pref_registry);
+  AudioAPI::RegisterUserPrefs(pref_registry);
 
   std::unique_ptr<PrefService> pref_service = factory.Create(pref_registry);
   user_prefs::UserPrefs::Set(browser_context, pref_service.get());
diff --git a/extensions/test/data/api_test/audio/add_nodes/background.js b/extensions/test/data/api_test/audio/add_nodes/background.js
index 59a5add6..d2174e80 100644
--- a/extensions/test/data/api_test/audio/add_nodes/background.js
+++ b/extensions/test/data/api_test/audio/add_nodes/background.js
@@ -20,21 +20,21 @@
 
      chrome.test.assertEq([{
         id: '30001',
-        stableDeviceId: '116606' /* 80001 ^ 0xFFFF */,
+        stableDeviceId: '0',
         streamType: 'OUTPUT',
         deviceType: 'USB',
         deviceName: 'Jabra Speaker',
         displayName: 'Jabra Speaker 1'
       }, {
         id: '30002',
-        stableDeviceId: '116605' /* 80002 ^ 0xFFFF */,
+        stableDeviceId: '1',
         streamType: 'OUTPUT',
         deviceType: 'USB',
         deviceName: 'Jabra Speaker',
         displayName: 'Jabra Speaker 2'
       }, {
         id: '30003',
-        stableDeviceId: '116604' /* 80003 ^ 0xFFFF */,
+        stableDeviceId: '2',
         streamType: 'OUTPUT',
         deviceType: 'HDMI',
         deviceName: 'HDMI output',
diff --git a/extensions/test/data/api_test/audio/remove_nodes/background.js b/extensions/test/data/api_test/audio/remove_nodes/background.js
index 82778a44f..2ea46c1f 100644
--- a/extensions/test/data/api_test/audio/remove_nodes/background.js
+++ b/extensions/test/data/api_test/audio/remove_nodes/background.js
@@ -20,14 +20,14 @@
 
       chrome.test.assertEq([{
         id: '40001',
-        stableDeviceId: '106606' /* 90001 ^ 0xFFFF */,
+        stableDeviceId: '0',
         streamType: 'INPUT',
         deviceType: 'USB',
         deviceName: 'Jabra Mic',
         displayName: 'Jabra Mic 1'
       }, {
         id: '40002',
-        stableDeviceId: '106605' /* 90002 ^ 0xFFFF */,
+        stableDeviceId: '1',
         streamType: 'INPUT',
         deviceType: 'USB',
         deviceName: 'Jabra Mic',
diff --git a/extensions/test/data/api_test/audio/test.js b/extensions/test/data/api_test/audio/test.js
index 22cfc2b..eeb5d8db 100644
--- a/extensions/test/data/api_test/audio/test.js
+++ b/extensions/test/data/api_test/audio/test.js
@@ -97,42 +97,42 @@
     var kTestDevices = {
       '30001': {
         id: '30001',
-        stableDeviceId: '116606',
+        stableDeviceId: '0',
         displayName: 'Jabra Speaker 1',
         deviceName: 'Jabra Speaker',
         streamType: 'OUTPUT'
       },
       '30002': {
         id: '30002',
-        stableDeviceId: '116605',
+        stableDeviceId: '1',
         displayName: 'Jabra Speaker 2',
         deviceName: 'Jabra Speaker',
         streamType: 'OUTPUT'
       },
       '30003': {
         id: '30003',
-        stableDeviceId: '116604',
+        stableDeviceId: '2',
         displayName: 'HDA Intel MID',
         deviceName: 'HDMI output',
         streamType: 'OUTPUT'
       },
       '40001': {
         id: '40001',
-        stableDeviceId: '106606',
+        stableDeviceId: '3',
         displayName: 'Jabra Mic 1',
         deviceName: 'Jabra Mic',
         streamType: 'INPUT'
       },
       '40002': {
         id: '40002',
-        stableDeviceId: '106605',
+        stableDeviceId: '4',
         displayName: 'Jabra Mic 2',
         deviceName: 'Jabra Mic',
         streamType: 'INPUT'
       },
       '40003': {
         id: '40003',
-        stableDeviceId: '106604',
+        stableDeviceId: '5',
         displayName: 'Logitech Webcam',
         deviceName: 'Webcam Mic',
         streamType: 'INPUT'
@@ -149,42 +149,42 @@
     var kTestDevices = {
       '30001': {
         id: '30001',
-        stableDeviceId: '116606',
+        stableDeviceId: '0',
         displayName: 'Jabra Speaker 1',
         deviceName: 'Jabra Speaker',
         streamType: 'OUTPUT'
       },
       '30002': {
         id: '30002',
-        stableDeviceId: '116605',
+        stableDeviceId: '1',
         displayName: 'Jabra Speaker 2',
         deviceName: 'Jabra Speaker',
         streamType: 'OUTPUT'
       },
       '30003': {
         id: '30003',
-        stableDeviceId: '116604',
+        stableDeviceId: '2',
         displayName: 'HDA Intel MID',
         deviceName: 'HDMI output',
         streamType: 'OUTPUT'
       },
       '40001': {
         id: '40001',
-        stableDeviceId: '106606',
+        stableDeviceId: '3',
         displayName: 'Jabra Mic 1',
         deviceName: 'Jabra Mic',
         streamType: 'INPUT'
       },
       '40002': {
         id: '40002',
-        stableDeviceId: '106605',
+        stableDeviceId: '4',
         displayName: 'Jabra Mic 2',
         deviceName: 'Jabra Mic',
         streamType: 'INPUT'
       },
       '40003': {
         id: '40003',
-        stableDeviceId: '106604',
+        stableDeviceId: '5',
         displayName: 'Logitech Webcam',
         deviceName: 'Webcam Mic',
         streamType: 'INPUT'
diff --git a/ios/chrome/browser/tabs/tab.mm b/ios/chrome/browser/tabs/tab.mm
index a574e6c..f6f011d 100644
--- a/ios/chrome/browser/tabs/tab.mm
+++ b/ios/chrome/browser/tabs/tab.mm
@@ -1377,9 +1377,6 @@
 }
 
 - (void)reloadWithUserAgentType:(web::UserAgentType)userAgentType {
-  // This removes the web view, which will be recreated at the end of this.
-  [self.webController requirePageReconstruction];
-
   // TODO(crbug.com/228171): A hack in session_controller -addPendingItem
   // discusses making tab responsible for distinguishing history stack
   // navigation from new navigations.
diff --git a/ios/web/web_state/ui/crw_web_controller.h b/ios/web/web_state/ui/crw_web_controller.h
index b770627..0b227410 100644
--- a/ios/web/web_state/ui/crw_web_controller.h
+++ b/ios/web/web_state/ui/crw_web_controller.h
@@ -191,14 +191,6 @@
 // Dismisses the soft keyboard.
 - (void)dismissKeyboard;
 
-// Requires that the next load rebuild the UIWebView. This is expensive, and
-// should be used only in the case where something has changed that UIWebView
-// only checks on creation, such that the whole object needs to be rebuilt.
-// TODO(stuartmorgan): Merge this and reinitializeWebViewAndReload:. They are
-// currently subtly different in terms of implementation, but are for
-// fundamentally the same purpose.
-- (void)requirePageReconstruction;
-
 - (void)reinitializeWebViewAndReload:(BOOL)reload;
 
 // Requires that the next display reload the page, using a placeholder while
diff --git a/ios/web/web_state/ui/crw_web_controller.mm b/ios/web/web_state/ui/crw_web_controller.mm
index 495820f1..a11db2c 100644
--- a/ios/web/web_state/ui/crw_web_controller.mm
+++ b/ios/web/web_state/ui/crw_web_controller.mm
@@ -476,8 +476,10 @@
 // Returns YES if the user interacted with the page recently.
 @property(nonatomic, readonly) BOOL userClickedRecently;
 
-// Whether or not desktop user agent is used for the currentItem.
-@property(nonatomic, readonly) BOOL usesDesktopUserAgent;
+// User agent type of the transient item if any, the pending item if a
+// navigation is in progress or the last committed item otherwise.
+// Returns MOBILE, the default type, if navigation manager is nullptr or empty.
+@property(nonatomic, readonly) web::UserAgentType userAgentType;
 
 // Facade for Mojo API.
 @property(nonatomic, readonly) web::MojoFacade* mojoFacade;
@@ -494,10 +496,18 @@
 // unless the request was a POST.
 @property(nonatomic, readonly) NSDictionary* currentHTTPHeaders;
 
-// Requires page reconstruction if |item| has a non-NONE UserAgentType and it
-// differs from that of |fromItem|.
-- (void)updateDesktopUserAgentForItem:(web::NavigationItem*)item
-                previousUserAgentType:(web::UserAgentType)userAgentType;
+// Updates web view's user agent according to |userAgentType|. It is no-op if
+// |userAgentType| is NONE.
+- (void)updateWebViewUserAgentFromUserAgentType:
+    (web::UserAgentType)userAgentType;
+
+// Requires that the next load rebuild the web view. This is expensive, and
+// should be used only in the case where something has changed that web view
+// only checks on creation, such that the whole object needs to be rebuilt.
+// TODO(stuartmorgan): Merge this and reinitializeWebViewAndReload:. They are
+// currently subtly different in terms of implementation, but are for
+// fundamentally the same purpose.
+- (void)requirePageReconstruction;
 
 // Removes the container view from the hierarchy and resets the ivar.
 - (void)resetContainerView;
@@ -1636,6 +1646,13 @@
 
   [self ensureWebViewCreated];
 
+  // Update web view's user agent is called for every load, which may have
+  // performance implications because update web view's user agent may
+  // potentially send a message to a separate thread. However, this is not an
+  // issue for WKWebView because WKWebView's |setCustomUserAgent| is non-op if
+  // user agent stays thesame.
+  [self updateWebViewUserAgentFromUserAgentType:self.userAgentType];
+
   [self loadRequestForCurrentNavigationItem];
 }
 
@@ -2046,15 +2063,11 @@
 
   // Update the user agent before attempting the navigation.
   web::NavigationItem* toItem = items[index].get();
-  web::NavigationItem* previousItem = sessionController.currentItem;
-  web::UserAgentType previousUserAgentType =
-      previousItem ? previousItem->GetUserAgentType()
-                   : web::UserAgentType::NONE;
-  [self updateDesktopUserAgentForItem:toItem
-                previousUserAgentType:previousUserAgentType];
+  [self updateWebViewUserAgentFromUserAgentType:toItem->GetUserAgentType()];
 
+  web::NavigationItem* fromItem = sessionController.currentItem;
   BOOL sameDocumentNavigation =
-      [sessionController isSameDocumentNavigationBetweenItem:previousItem
+      [sessionController isSameDocumentNavigationBetweenItem:fromItem
                                                      andItem:toItem];
   if (sameDocumentNavigation) {
     [sessionController goToItemAtIndex:index];
@@ -2209,9 +2222,9 @@
   return rendererInitiatedWithoutInteraction || noNavigationItems;
 }
 
-- (BOOL)usesDesktopUserAgent {
+- (web::UserAgentType)userAgentType {
   web::NavigationItem* item = self.currentNavItem;
-  return item && item->GetUserAgentType() == web::UserAgentType::DESKTOP;
+  return item ? item->GetUserAgentType() : web::UserAgentType::MOBILE;
 }
 
 - (web::MojoFacade*)mojoFacade {
@@ -2250,15 +2263,14 @@
   return _passKitDownloader.get();
 }
 
-- (void)updateDesktopUserAgentForItem:(web::NavigationItem*)item
-                previousUserAgentType:(web::UserAgentType)userAgentType {
-  if (!item)
+- (void)updateWebViewUserAgentFromUserAgentType:
+    (web::UserAgentType)userAgentType {
+  if (userAgentType == web::UserAgentType::NONE)
     return;
-  web::UserAgentType itemUserAgentType = item->GetUserAgentType();
-  if (itemUserAgentType == web::UserAgentType::NONE)
-    return;
-  if (itemUserAgentType != userAgentType)
-    [self requirePageReconstruction];
+
+  NSString* userAgent =
+      base::SysUTF8ToNSString(web::GetWebClient()->GetUserAgent(userAgentType));
+  [_webView setCustomUserAgent:userAgent];
 }
 
 #pragma mark -
@@ -4055,7 +4067,7 @@
   // delegate must be specified.
   return web::BuildWKWebView(CGRectZero, config,
                              self.webStateImpl->GetBrowserState(),
-                             self.usesDesktopUserAgent);
+                             self.userAgentType);
 }
 
 - (void)setWebView:(WKWebView*)webView {
diff --git a/ios/web/web_state/web_view_internal_creation_util.h b/ios/web/web_state/web_view_internal_creation_util.h
index 68e8912..38226bf 100644
--- a/ios/web/web_state/web_view_internal_creation_util.h
+++ b/ios/web/web_state/web_view_internal_creation_util.h
@@ -8,6 +8,8 @@
 #import <CoreGraphics/CoreGraphics.h>
 #import <WebKit/WebKit.h>
 
+#include "ios/web/public/user_agent.h"
+
 @protocol CRWContextMenuDelegate;
 
 // This file is a collection of functions that vend web views.
@@ -26,7 +28,7 @@
 WKWebView* BuildWKWebView(CGRect frame,
                           WKWebViewConfiguration* configuration,
                           BrowserState* browser_state,
-                          BOOL use_desktop_user_agent,
+                          UserAgentType user_agent_type,
                           id<CRWContextMenuDelegate> context_menu_delegate);
 
 // Creates and returns a new WKWebView for displaying regular web content.
@@ -35,7 +37,7 @@
 WKWebView* BuildWKWebView(CGRect frame,
                           WKWebViewConfiguration* configuration,
                           BrowserState* browser_state,
-                          BOOL use_desktop_user_agent);
+                          UserAgentType user_agent_type);
 
 // Creates and returns a new WKWebView for displaying regular web content.
 // The preconditions for the creation of a WKWebView are the same as the
diff --git a/ios/web/web_state/web_view_internal_creation_util.mm b/ios/web/web_state/web_view_internal_creation_util.mm
index c13b8b7..5095110f 100644
--- a/ios/web/web_state/web_view_internal_creation_util.mm
+++ b/ios/web/web_state/web_view_internal_creation_util.mm
@@ -36,7 +36,7 @@
 WKWebView* BuildWKWebView(CGRect frame,
                           WKWebViewConfiguration* configuration,
                           BrowserState* browser_state,
-                          BOOL use_desktop_user_agent,
+                          UserAgentType user_agent_type,
                           id<CRWContextMenuDelegate> context_menu_delegate) {
   VerifyWKWebViewCreationPreConditions(browser_state, configuration);
 
@@ -44,11 +44,10 @@
   WKWebView* web_view =
       [[WKWebView alloc] initWithFrame:frame configuration:configuration];
 
-  // Set the user agent.
-  UserAgentType user_agent_type =
-      use_desktop_user_agent ? UserAgentType::DESKTOP : UserAgentType::MOBILE;
-  web_view.customUserAgent = base::SysUTF8ToNSString(
-      web::GetWebClient()->GetUserAgent(user_agent_type));
+  if (user_agent_type != web::UserAgentType::NONE) {
+    web_view.customUserAgent = base::SysUTF8ToNSString(
+        web::GetWebClient()->GetUserAgent(user_agent_type));
+  }
 
   // By default the web view uses a very sluggish scroll speed. Set it to a more
   // reasonable value.
@@ -77,17 +76,16 @@
 WKWebView* BuildWKWebView(CGRect frame,
                           WKWebViewConfiguration* configuration,
                           BrowserState* browser_state,
-                          BOOL use_desktop_user_agent) {
-  return BuildWKWebView(frame, configuration, browser_state,
-                        use_desktop_user_agent, nil);
+                          UserAgentType user_agent_type) {
+  return BuildWKWebView(frame, configuration, browser_state, user_agent_type,
+                        nil);
 }
 
 WKWebView* BuildWKWebView(CGRect frame,
                           WKWebViewConfiguration* configuration,
                           BrowserState* browser_state) {
-  BOOL use_desktop_user_agent = NO;
   return BuildWKWebView(frame, configuration, browser_state,
-                        use_desktop_user_agent);
+                        UserAgentType::MOBILE);
 }
 
 }  // namespace web
diff --git a/ios/web/web_view_creation_util.mm b/ios/web/web_view_creation_util.mm
index d3023e06..0edd5c4 100644
--- a/ios/web/web_view_creation_util.mm
+++ b/ios/web/web_view_creation_util.mm
@@ -5,6 +5,7 @@
 #import "ios/web/public/web_view_creation_util.h"
 
 #include "base/logging.h"
+#include "ios/web/public/user_agent.h"
 #import "ios/web/web_state/ui/wk_web_view_configuration_provider.h"
 #import "ios/web/web_state/web_view_internal_creation_util.h"
 
@@ -27,7 +28,8 @@
   WKWebViewConfigurationProvider& config_provider =
       WKWebViewConfigurationProvider::FromBrowserState(browser_state);
   return BuildWKWebView(frame, config_provider.GetWebViewConfiguration(),
-                        browser_state, NO, context_menu_delegate);
+                        browser_state, UserAgentType::MOBILE,
+                        context_menu_delegate);
 }
 
 }  // namespace web
diff --git a/net/http/http_network_session.cc b/net/http/http_network_session.cc
index eb8dd8e..2bf81e63 100644
--- a/net/http/http_network_session.cc
+++ b/net/http/http_network_session.cc
@@ -124,7 +124,6 @@
       enable_quic(false),
       mark_quic_broken_when_network_blackholes(false),
       retry_without_alt_svc_on_quic_errors(false),
-      quic_always_require_handshake_confirmation(false),
       quic_load_server_info_timeout_srtt_multiplier(0.25f),
       quic_enable_connection_racing(false),
       quic_enable_non_blocking_io(false),
@@ -142,7 +141,6 @@
       quic_reduced_ping_timeout_seconds(kPingTimeoutSecs),
       quic_packet_reader_yield_after_duration_milliseconds(
           kQuicYieldAfterDurationMilliseconds),
-      quic_disable_preconnect_if_0rtt(false),
       quic_migrate_sessions_on_network_change(false),
       quic_migrate_sessions_early(false),
       quic_allow_server_migration(false),
@@ -194,7 +192,6 @@
           params.quic_max_packet_length,
           params.quic_user_agent_id,
           params.quic_supported_versions,
-          params.quic_always_require_handshake_confirmation,
           params.quic_load_server_info_timeout_srtt_multiplier,
           params.quic_enable_connection_racing,
           params.quic_enable_non_blocking_io,
@@ -347,8 +344,6 @@
   dict->SetInteger(
       "packet_reader_yield_after_duration_milliseconds",
       params_.quic_packet_reader_yield_after_duration_milliseconds);
-  dict->SetBoolean("disable_preconnect_if_0rtt",
-                   params_.quic_disable_preconnect_if_0rtt);
   dict->SetBoolean("force_hol_blocking", params_.quic_force_hol_blocking);
   dict->SetBoolean("race_cert_verification",
                    params_.quic_race_cert_verification);
diff --git a/net/http/http_network_session.h b/net/http/http_network_session.h
index cfcccbe..b0061da 100644
--- a/net/http/http_network_session.h
+++ b/net/http/http_network_session.h
@@ -125,8 +125,6 @@
     // Retry requests which fail with QUIC_PROTOCOL_ERROR, and mark QUIC
     // broken if the retry succeeds.
     bool retry_without_alt_svc_on_quic_errors;
-    // Disables QUIC's 0-RTT behavior.
-    bool quic_always_require_handshake_confirmation;
     // If not zero, the task to load QUIC server configs from the disk cache
     // will timeout after this value multiplied by the smoothed RTT for the
     // server.
@@ -172,8 +170,6 @@
     // Specifies the maximum time duration that QUIC packet reader can perform
     // consecutive packets reading.
     int quic_packet_reader_yield_after_duration_milliseconds;
-    // If true, disable preconnections if QUIC can do 0RTT.
-    bool quic_disable_preconnect_if_0rtt;
     // If true, active QUIC sessions may be migrated onto a new network when
     // the platform indicates that the default network is changing.
     bool quic_migrate_sessions_on_network_change;
diff --git a/net/http/http_stream_factory_impl_job_controller.cc b/net/http/http_stream_factory_impl_job_controller.cc
index 9d24f97..fc6d3e14 100644
--- a/net/http/http_stream_factory_impl_job_controller.cc
+++ b/net/http/http_stream_factory_impl_job_controller.cc
@@ -136,13 +136,6 @@
       request_info, nullptr, HttpStreamRequest::HTTP_STREAM);
 
   if (alternative_service.protocol != kProtoUnknown) {
-    if (session_->params().quic_disable_preconnect_if_0rtt &&
-        alternative_service.protocol == kProtoQUIC &&
-        session_->quic_stream_factory()->ZeroRTTEnabledFor(QuicServerId(
-            alternative_service.host_port_pair(), request_info.privacy_mode))) {
-      MaybeNotifyFactoryOfCompletion();
-      return;
-    }
     destination = alternative_service.host_port_pair();
     ignore_result(ApplyHostMappingRules(request_info.url, &destination));
   }
diff --git a/net/http/http_stream_factory_impl_unittest.cc b/net/http/http_stream_factory_impl_unittest.cc
index 188680a7..90b0c229 100644
--- a/net/http/http_stream_factory_impl_unittest.cc
+++ b/net/http/http_stream_factory_impl_unittest.cc
@@ -738,7 +738,6 @@
 
     HttpNetworkSession::Params params;
     params.enable_quic = true;
-    params.quic_disable_preconnect_if_0rtt = false;
     scoped_refptr<SSLConfigServiceDefaults> ssl_config_service(
         new SSLConfigServiceDefaults);
     HttpServerPropertiesImpl http_server_properties;
@@ -875,7 +874,6 @@
     TransportSecurityState* transport_security_state,
     bool set_alternative_proxy_server) {
   params->enable_quic = true;
-  params->quic_disable_preconnect_if_0rtt = false;
   params->client_socket_factory = socket_factory;
   params->host_resolver = host_resolver;
   params->transport_security_state = transport_security_state;
@@ -1142,7 +1140,6 @@
     HttpNetworkSession::Params params =
         SpdySessionDependencies::CreateSessionParams(&session_deps);
     params.enable_quic = true;
-    params.quic_disable_preconnect_if_0rtt = true;
     params.http_server_properties = &http_server_properties;
 
     std::unique_ptr<HttpNetworkSession> session(new HttpNetworkSession(params));
@@ -1172,63 +1169,6 @@
   }
 }
 
-TEST_F(HttpStreamFactoryTest, QuicDisablePreConnectIfZeroRtt) {
-  for (int num_streams = 1; num_streams < 3; ++num_streams) {
-    GURL url = GURL("https://www.google.com");
-
-    // Set up QUIC as alternative_service.
-    HttpServerPropertiesImpl http_server_properties;
-    const AlternativeService alternative_service(kProtoQUIC, "www.google.com",
-                                                 443);
-    AlternativeServiceInfoVector alternative_service_info_vector;
-    base::Time expiration = base::Time::Now() + base::TimeDelta::FromDays(1);
-    alternative_service_info_vector.push_back(
-        AlternativeServiceInfo(alternative_service, expiration));
-    HostPortPair host_port_pair(alternative_service.host_port_pair());
-    url::SchemeHostPort server("https", host_port_pair.host(),
-                               host_port_pair.port());
-    http_server_properties.SetAlternativeServices(
-        server, alternative_service_info_vector);
-
-    SpdySessionDependencies session_deps;
-
-    // Setup params to disable preconnect, but QUIC does 0RTT.
-    HttpNetworkSession::Params params =
-        SpdySessionDependencies::CreateSessionParams(&session_deps);
-    params.enable_quic = true;
-    params.quic_disable_preconnect_if_0rtt = true;
-    params.http_server_properties = &http_server_properties;
-
-    std::unique_ptr<HttpNetworkSession> session(new HttpNetworkSession(params));
-
-    // Setup 0RTT for QUIC.
-    QuicStreamFactory* factory = session->quic_stream_factory();
-    factory->set_require_confirmation(false);
-    test::QuicStreamFactoryPeer::CacheDummyServerConfig(
-        factory, QuicServerId(host_port_pair, PRIVACY_MODE_DISABLED));
-
-    HttpNetworkSessionPeer peer(session.get());
-    CapturePreconnectsTransportSocketPool* transport_conn_pool =
-        new CapturePreconnectsTransportSocketPool(
-            session_deps.host_resolver.get(), session_deps.cert_verifier.get(),
-            session_deps.transport_security_state.get(),
-            session_deps.cert_transparency_verifier.get(),
-            session_deps.ct_policy_enforcer.get());
-    std::unique_ptr<MockClientSocketPoolManager> mock_pool_manager(
-        new MockClientSocketPoolManager);
-    mock_pool_manager->SetTransportSocketPool(transport_conn_pool);
-    peer.SetClientSocketPoolManager(std::move(mock_pool_manager));
-
-    HttpRequestInfo request;
-    request.method = "GET";
-    request.url = url;
-    request.load_flags = 0;
-
-    session->http_stream_factory()->PreconnectStreams(num_streams, request);
-    EXPECT_EQ(-1, transport_conn_pool->last_num_streams());
-  }
-}
-
 // Verify that only one preconnect job succeeds to a proxy server that supports
 // request priorities.
 TEST_F(HttpStreamFactoryTest, OnlyOnePreconnectToProxyServer) {
diff --git a/net/http/transport_security_state.cc b/net/http/transport_security_state.cc
index 2e829ad4..c5fb02e4 100644
--- a/net/http/transport_security_state.cc
+++ b/net/http/transport_security_state.cc
@@ -56,6 +56,11 @@
 //   1: Unless a delegate says otherwise, require CT.
 int g_ct_required_for_testing = 0;
 
+bool IsDynamicExpectCTEnabled() {
+  return base::FeatureList::IsEnabled(
+      TransportSecurityState::kDynamicExpectCTFeature);
+}
+
 // LessThan comparator for use with std::binary_search() in determining
 // whether a SHA-256 HashValue appears within a sorted array of
 // SHA256HashValues.
@@ -726,6 +731,10 @@
 
 }  // namespace
 
+// static
+const base::Feature TransportSecurityState::kDynamicExpectCTFeature{
+    "DynamicExpectCT", base::FEATURE_DISABLED_BY_DEFAULT};
+
 void SetTransportSecurityStateSourceForTesting(
     const TransportSecurityStateSource* source) {
   g_hsts_source = source ? source : &kHSTSSource;
@@ -988,6 +997,23 @@
   EnablePKPHost(host, pkp_state);
 }
 
+void TransportSecurityState::AddExpectCTInternal(
+    const std::string& host,
+    const base::Time& last_observed,
+    const base::Time& expiry,
+    bool enforce,
+    const GURL& report_uri) {
+  DCHECK(CalledOnValidThread());
+
+  ExpectCTState expect_ct_state;
+  expect_ct_state.last_observed = last_observed;
+  expect_ct_state.expiry = expiry;
+  expect_ct_state.enforce = enforce;
+  expect_ct_state.report_uri = report_uri;
+
+  EnableExpectCTHost(host, expect_ct_state);
+}
+
 void TransportSecurityState::
     SetEnablePublicKeyPinningBypassForLocalTrustAnchors(bool value) {
   enable_pkp_bypass_for_local_trust_anchors_ = value;
@@ -1043,6 +1069,33 @@
   DirtyNotify();
 }
 
+void TransportSecurityState::EnableExpectCTHost(const std::string& host,
+                                                const ExpectCTState& state) {
+  DCHECK(CalledOnValidThread());
+  if (!IsDynamicExpectCTEnabled())
+    return;
+
+  const std::string canonicalized_host = CanonicalizeHost(host);
+  if (canonicalized_host.empty())
+    return;
+
+  // Only store new state when Expect-CT is explicitly enabled. If it is
+  // disabled, remove the state from the enabled hosts.
+  if (state.enforce || !state.report_uri.is_empty()) {
+    ExpectCTState expect_ct_state(state);
+    // No need to store this value since it is redundant. (|canonicalized_host|
+    // is the map key.)
+    expect_ct_state.domain.clear();
+
+    enabled_expect_ct_hosts_[HashHost(canonicalized_host)] = expect_ct_state;
+  } else {
+    const std::string hashed_host = HashHost(canonicalized_host);
+    enabled_expect_ct_hosts_.erase(hashed_host);
+  }
+
+  DirtyNotify();
+}
+
 TransportSecurityState::PKPStatus
 TransportSecurityState::CheckPinsAndMaybeSendReport(
     const HostPortPair& host_port_pair,
@@ -1164,6 +1217,13 @@
     deleted = true;
   }
 
+  ExpectCTStateMap::iterator expect_ct_iterator =
+      enabled_expect_ct_hosts_.find(hashed_host);
+  if (expect_ct_iterator != enabled_expect_ct_hosts_.end()) {
+    enabled_expect_ct_hosts_.erase(expect_ct_iterator);
+    deleted = true;
+  }
+
   if (deleted)
     DirtyNotify();
   return deleted;
@@ -1173,6 +1233,7 @@
   DCHECK(CalledOnValidThread());
   enabled_sts_hosts_.clear();
   enabled_pkp_hosts_.clear();
+  enabled_expect_ct_hosts_.clear();
 }
 
 void TransportSecurityState::DeleteAllDynamicDataSince(const base::Time& time) {
@@ -1201,6 +1262,18 @@
     ++pkp_iterator;
   }
 
+  ExpectCTStateMap::iterator expect_ct_iterator =
+      enabled_expect_ct_hosts_.begin();
+  while (expect_ct_iterator != enabled_expect_ct_hosts_.end()) {
+    if (expect_ct_iterator->second.last_observed >= time) {
+      dirtied = true;
+      enabled_expect_ct_hosts_.erase(expect_ct_iterator++);
+      continue;
+    }
+
+    ++expect_ct_iterator;
+  }
+
   if (dirtied)
     DirtyNotify();
 }
@@ -1279,6 +1352,14 @@
                   report_uri);
 }
 
+void TransportSecurityState::AddExpectCT(const std::string& host,
+                                         const base::Time& expiry,
+                                         bool enforce,
+                                         const GURL& report_uri) {
+  DCHECK(CalledOnValidThread());
+  AddExpectCTInternal(host, base::Time::Now(), expiry, enforce, report_uri);
+}
+
 bool TransportSecurityState::ProcessHPKPReportOnlyHeader(
     const std::string& value,
     const HostPortPair& host_port_pair,
@@ -1571,6 +1652,30 @@
   return false;
 }
 
+bool TransportSecurityState::GetDynamicExpectCTState(const std::string& host,
+                                                     ExpectCTState* result) {
+  DCHECK(CalledOnValidThread());
+
+  const std::string canonicalized_host = CanonicalizeHost(host);
+  if (canonicalized_host.empty())
+    return false;
+
+  base::Time current_time(base::Time::Now());
+  ExpectCTStateMap::iterator j =
+      enabled_expect_ct_hosts_.find(HashHost(canonicalized_host));
+  if (j == enabled_expect_ct_hosts_.end())
+    return false;
+  // If the entry is invalid, drop it.
+  if (current_time > j->second.expiry) {
+    enabled_expect_ct_hosts_.erase(j);
+    DirtyNotify();
+    return false;
+  }
+
+  *result = j->second;
+  return true;
+}
+
 void TransportSecurityState::AddOrUpdateEnabledSTSHosts(
     const std::string& hashed_host,
     const STSState& state) {
@@ -1587,6 +1692,14 @@
   enabled_pkp_hosts_[hashed_host] = state;
 }
 
+void TransportSecurityState::AddOrUpdateEnabledExpectCTHosts(
+    const std::string& hashed_host,
+    const ExpectCTState& state) {
+  DCHECK(CalledOnValidThread());
+  DCHECK(state.enforce || !state.report_uri.is_empty());
+  enabled_expect_ct_hosts_[hashed_host] = state;
+}
+
 TransportSecurityState::STSState::STSState()
     : upgrade_mode(MODE_DEFAULT), include_subdomains(false) {
 }
@@ -1615,10 +1728,19 @@
 TransportSecurityState::PKPState::~PKPState() {
 }
 
-TransportSecurityState::ExpectCTState::ExpectCTState() {}
+TransportSecurityState::ExpectCTState::ExpectCTState() : enforce(false) {}
 
 TransportSecurityState::ExpectCTState::~ExpectCTState() {}
 
+TransportSecurityState::ExpectCTStateIterator::ExpectCTStateIterator(
+    const TransportSecurityState& state)
+    : iterator_(state.enabled_expect_ct_hosts_.begin()),
+      end_(state.enabled_expect_ct_hosts_.end()) {
+  DCHECK(state.CalledOnValidThread());
+}
+
+TransportSecurityState::ExpectCTStateIterator::~ExpectCTStateIterator() {}
+
 TransportSecurityState::ExpectStapleState::ExpectStapleState()
     : include_subdomains(false) {}
 
diff --git a/net/http/transport_security_state.h b/net/http/transport_security_state.h
index 5d3c126..e469d70 100644
--- a/net/http/transport_security_state.h
+++ b/net/http/transport_security_state.h
@@ -11,6 +11,7 @@
 #include <string>
 
 #include "base/callback.h"
+#include "base/feature_list.h"
 #include "base/gtest_prod_util.h"
 #include "base/macros.h"
 #include "base/strings/string_piece.h"
@@ -235,6 +236,29 @@
     // The URI to which reports should be sent if valid CT info is not
     // provided.
     GURL report_uri;
+    // True if connections should be closed if they do not comply with the CT
+    // policy. If false, noncompliant connections will be allowed but reports
+    // will be sent about the violation.
+    bool enforce;
+    // The absolute time (UTC) when the Expect-CT state was last observed.
+    base::Time last_observed;
+    // The absolute time (UTC) when the Expect-CT state expires.
+    base::Time expiry;
+  };
+
+  class NET_EXPORT ExpectCTStateIterator {
+   public:
+    explicit ExpectCTStateIterator(const TransportSecurityState& state);
+    ~ExpectCTStateIterator();
+
+    bool HasNext() const { return iterator_ != end_; }
+    void Advance() { ++iterator_; }
+    const std::string& hostname() const { return iterator_->first; }
+    const ExpectCTState& domain_state() const { return iterator_->second; }
+
+   private:
+    std::map<std::string, ExpectCTState>::const_iterator iterator_;
+    std::map<std::string, ExpectCTState>::const_iterator end_;
   };
 
   // An ExpectStapleState describes a site that expects valid OCSP information
@@ -293,6 +317,10 @@
   // report if a violation is detected.
   enum PublicKeyPinReportStatus { ENABLE_PIN_REPORTS, DISABLE_PIN_REPORTS };
 
+  // Feature that controls whether Expect-CT HTTP headers are parsed, processed,
+  // and stored.
+  static const base::Feature kDynamicExpectCTFeature;
+
   TransportSecurityState();
   ~TransportSecurityState();
 
@@ -382,6 +410,13 @@
   void AddOrUpdateEnabledPKPHosts(const std::string& hashed_host,
                                   const PKPState& state);
 
+  // Inserts |state| into |enabled_expect_ct_hosts_| under the key
+  // |hashed_host|. |hashed_host| is already in the internal representation.
+  // Note: This is only used for serializing/deserializing the
+  // TransportSecurityState.
+  void AddOrUpdateEnabledExpectCTHosts(const std::string& hashed_host,
+                                       const ExpectCTState& state);
+
   // Deletes all dynamic data (e.g. HSTS or HPKP data) created since a given
   // time.
   //
@@ -411,14 +446,15 @@
   // deployed.
   bool IsGooglePinnedHost(const std::string& host) const;
 
-  // Returns true and updates |*result| iff |host| has HSTS (respectively, HPKP)
-  // state. If multiple HSTS (respectively, HPKP) entries match |host|,  the
-  // most specific match determines the HSTS (respectively, HPKP) return value.
+  // Returns true and updates |*result| iff |host| has HSTS/HPKP/Expect-CT
+  // (respectively) state. If multiple entries match |host|, the most specific
+  // match determines the return value.
   //
   // Note that these methods are not const because they opportunistically remove
   // entries that have expired.
   bool GetDynamicSTSState(const std::string& host, STSState* result);
   bool GetDynamicPKPState(const std::string& host, PKPState* result);
+  bool GetDynamicExpectCTState(const std::string& host, ExpectCTState* result);
 
   // Processes an HSTS header value from the host, adding entries to
   // dynamic state if necessary.
@@ -446,6 +482,16 @@
                const HashValueVector& hashes,
                const GURL& report_uri);
 
+  // Adds explicitly-specified data as if it was processed from an Expect-CT
+  // header.
+  // Note: This method will persist the Expect-CT data if a Delegate is present.
+  //       Make sure that the delegate is nullptr if the persistence is not
+  //       desired. See |SetDelegate| method for more details.
+  void AddExpectCT(const std::string& host,
+                   const base::Time& expiry,
+                   bool enforce,
+                   const GURL& report_uri);
+
   // Enables or disables public key pinning bypass for local trust anchors.
   // Disabling the bypass for local trust anchors is highly discouraged.
   // This method is used by Cronet only and *** MUST NOT *** be used by any
@@ -489,6 +535,7 @@
 
   typedef std::map<std::string, STSState> STSStateMap;
   typedef std::map<std::string, PKPState> PKPStateMap;
+  typedef std::map<std::string, ExpectCTState> ExpectCTStateMap;
 
   // Send an UMA report on pin validation failure, if the host is in a
   // statically-defined list of domains.
@@ -533,12 +580,20 @@
                        const HashValueVector& hashes,
                        const GURL& report_uri);
 
+  // Adds Expect-CT state to |host|.
+  void AddExpectCTInternal(const std::string& host,
+                           const base::Time& last_observed,
+                           const base::Time& expiry,
+                           bool enforce,
+                           const GURL& report_uri);
+
   // Enable TransportSecurity for |host|. |state| supercedes any previous
   // state for the |host|, including static entries.
   //
   // The new state for |host| is persisted using the Delegate (if any).
   void EnableSTSHost(const std::string& host, const STSState& state);
   void EnablePKPHost(const std::string& host, const PKPState& state);
+  void EnableExpectCTHost(const std::string& host, const ExpectCTState& state);
 
   // Returns true if a request to |host_port_pair| with the given
   // SubjectPublicKeyInfo |hashes| satisfies the pins in |pkp_state|,
@@ -571,12 +626,13 @@
       ExpectStapleState* expect_staple_result) const;
 
   // The sets of hosts that have enabled TransportSecurity. |domain| will always
-  // be empty for a STSState or PKPState in these maps; the domain
-  // comes from the map keys instead. In addition, |upgrade_mode| in the
+  // be empty for a STSState, PKPState, or ExpectCTState in these maps; the
+  // domain comes from the map keys instead. In addition, |upgrade_mode| in the
   // STSState is never MODE_DEFAULT and |HasPublicKeyPins| in the PKPState
   // always returns true.
   STSStateMap enabled_sts_hosts_;
   PKPStateMap enabled_pkp_hosts_;
+  ExpectCTStateMap enabled_expect_ct_hosts_;
 
   Delegate* delegate_ = nullptr;
 
diff --git a/net/http/transport_security_state_unittest.cc b/net/http/transport_security_state_unittest.cc
index be41ec32..88492c7 100644
--- a/net/http/transport_security_state_unittest.cc
+++ b/net/http/transport_security_state_unittest.cc
@@ -18,6 +18,7 @@
 #include "base/strings/string_piece.h"
 #include "base/test/histogram_tester.h"
 #include "base/test/mock_entropy_provider.h"
+#include "base/test/scoped_feature_list.h"
 #include "base/values.h"
 #include "crypto/openssl_util.h"
 #include "crypto/sha2.h"
@@ -786,6 +787,11 @@
 }
 
 TEST_F(TransportSecurityStateTest, DeleteAllDynamicDataSince) {
+  base::test::ScopedFeatureList feature_list;
+  feature_list.InitAndEnableFeature(
+      TransportSecurityState::kDynamicExpectCTFeature);
+  TransportSecurityState::ExpectCTState expect_ct_state;
+
   TransportSecurityState state;
   const base::Time current_time(base::Time::Now());
   const base::Time expiry = current_time + base::TimeDelta::FromSeconds(1000);
@@ -793,24 +799,32 @@
 
   EXPECT_FALSE(state.ShouldUpgradeToSSL("example.com"));
   EXPECT_FALSE(state.HasPublicKeyPins("example.com"));
+  EXPECT_FALSE(state.GetDynamicExpectCTState("example.com", &expect_ct_state));
   bool include_subdomains = false;
   state.AddHSTS("example.com", expiry, include_subdomains);
   state.AddHPKP("example.com", expiry, include_subdomains,
                 GetSampleSPKIHashes(), GURL());
+  state.AddExpectCT("example.com", expiry, true, GURL());
 
   state.DeleteAllDynamicDataSince(expiry);
   EXPECT_TRUE(state.ShouldUpgradeToSSL("example.com"));
   EXPECT_TRUE(state.HasPublicKeyPins("example.com"));
+  EXPECT_TRUE(state.GetDynamicExpectCTState("example.com", &expect_ct_state));
   state.DeleteAllDynamicDataSince(older);
   EXPECT_FALSE(state.ShouldUpgradeToSSL("example.com"));
   EXPECT_FALSE(state.HasPublicKeyPins("example.com"));
+  EXPECT_FALSE(state.GetDynamicExpectCTState("example.com", &expect_ct_state));
 
-  // STS and PKP data in |state| should be empty now.
+  // Dynamic data in |state| should be empty now.
   EXPECT_FALSE(TransportSecurityState::STSStateIterator(state).HasNext());
   EXPECT_FALSE(TransportSecurityState::PKPStateIterator(state).HasNext());
+  EXPECT_FALSE(TransportSecurityState::ExpectCTStateIterator(state).HasNext());
 }
 
 TEST_F(TransportSecurityStateTest, DeleteDynamicDataForHost) {
+  base::test::ScopedFeatureList feature_list;
+  feature_list.InitAndEnableFeature(
+      TransportSecurityState::kDynamicExpectCTFeature);
   TransportSecurityState state;
   const base::Time current_time(base::Time::Now());
   const base::Time expiry = current_time + base::TimeDelta::FromSeconds(1000);
@@ -819,14 +833,22 @@
   state.AddHSTS("example1.test", expiry, include_subdomains);
   state.AddHPKP("example1.test", expiry, include_subdomains,
                 GetSampleSPKIHashes(), GURL());
+  state.AddExpectCT("example1.test", expiry, true, GURL());
 
   EXPECT_TRUE(state.ShouldUpgradeToSSL("example1.test"));
   EXPECT_FALSE(state.ShouldUpgradeToSSL("example2.test"));
   EXPECT_TRUE(state.HasPublicKeyPins("example1.test"));
   EXPECT_FALSE(state.HasPublicKeyPins("example2.test"));
+  TransportSecurityState::ExpectCTState expect_ct_state;
+  EXPECT_TRUE(state.GetDynamicExpectCTState("example1.test", &expect_ct_state));
+  EXPECT_FALSE(
+      state.GetDynamicExpectCTState("example2.test", &expect_ct_state));
+
   EXPECT_TRUE(state.DeleteDynamicDataForHost("example1.test"));
   EXPECT_FALSE(state.ShouldUpgradeToSSL("example1.test"));
   EXPECT_FALSE(state.HasPublicKeyPins("example1.test"));
+  EXPECT_FALSE(
+      state.GetDynamicExpectCTState("example1.test", &expect_ct_state));
 }
 
 TEST_F(TransportSecurityStateTest, EnableStaticPins) {
@@ -2600,4 +2622,74 @@
       state.ShouldRequireCT("www.example.com", after_cert.get(), hashes));
 }
 
+// Tests that dynamic Expect-CT state is cleared from ClearDynamicData().
+TEST_F(TransportSecurityStateTest, DynamicExpectCTStateCleared) {
+  base::test::ScopedFeatureList feature_list;
+  feature_list.InitAndEnableFeature(
+      TransportSecurityState::kDynamicExpectCTFeature);
+  const std::string host("example.test");
+  TransportSecurityState state;
+  TransportSecurityState::ExpectCTState expect_ct_state;
+  const base::Time current_time = base::Time::Now();
+  const base::Time expiry = current_time + base::TimeDelta::FromSeconds(1000);
+
+  state.AddExpectCT(host, expiry, true, GURL());
+  EXPECT_TRUE(state.GetDynamicExpectCTState(host, &expect_ct_state));
+  EXPECT_TRUE(expect_ct_state.enforce);
+  EXPECT_TRUE(expect_ct_state.report_uri.is_empty());
+  EXPECT_EQ(expiry, expect_ct_state.expiry);
+
+  state.ClearDynamicData();
+  EXPECT_FALSE(state.GetDynamicExpectCTState(host, &expect_ct_state));
+}
+
+// Tests that dynamic Expect-CT state can be added and retrieved.
+TEST_F(TransportSecurityStateTest, DynamicExpectCTState) {
+  base::test::ScopedFeatureList feature_list;
+  feature_list.InitAndEnableFeature(
+      TransportSecurityState::kDynamicExpectCTFeature);
+  const std::string host("example.test");
+  TransportSecurityState state;
+  TransportSecurityState::ExpectCTState expect_ct_state;
+  const base::Time current_time = base::Time::Now();
+  const base::Time expiry = current_time + base::TimeDelta::FromSeconds(1000);
+
+  // Test that Expect-CT state can be added and retrieved.
+  state.AddExpectCT(host, expiry, true, GURL());
+  EXPECT_TRUE(state.GetDynamicExpectCTState(host, &expect_ct_state));
+  EXPECT_TRUE(expect_ct_state.enforce);
+  EXPECT_TRUE(expect_ct_state.report_uri.is_empty());
+  EXPECT_EQ(expiry, expect_ct_state.expiry);
+
+  // Test that Expect-CT can be updated (e.g. by changing |enforce| to false and
+  // adding a report-uri).
+  const GURL report_uri("https://example-report.test");
+  state.AddExpectCT(host, expiry, false, report_uri);
+  EXPECT_TRUE(state.GetDynamicExpectCTState(host, &expect_ct_state));
+  EXPECT_FALSE(expect_ct_state.enforce);
+  EXPECT_EQ(report_uri, expect_ct_state.report_uri);
+  EXPECT_EQ(expiry, expect_ct_state.expiry);
+
+  // Test that Expect-CT state is discarded when expired.
+  state.AddExpectCT(host, current_time - base::TimeDelta::FromSeconds(1000),
+                    true, report_uri);
+  EXPECT_FALSE(state.GetDynamicExpectCTState(host, &expect_ct_state));
+}
+
+// Tests that dynamic Expect-CT state cannot be added when the feature is not
+// enabled.
+TEST_F(TransportSecurityStateTest, DynamicExpectCTStateDisabled) {
+  base::test::ScopedFeatureList feature_list;
+  feature_list.InitAndDisableFeature(
+      TransportSecurityState::kDynamicExpectCTFeature);
+  const std::string host("example.test");
+  TransportSecurityState state;
+  TransportSecurityState::ExpectCTState expect_ct_state;
+  const base::Time current_time = base::Time::Now();
+  const base::Time expiry = current_time + base::TimeDelta::FromSeconds(1000);
+
+  state.AddExpectCT(host, expiry, true, GURL());
+  EXPECT_FALSE(state.GetDynamicExpectCTState(host, &expect_ct_state));
+}
+
 }  // namespace net
diff --git a/net/quic/chromium/quic_stream_factory.cc b/net/quic/chromium/quic_stream_factory.cc
index 5715dcb..c3bd2fb 100644
--- a/net/quic/chromium/quic_stream_factory.cc
+++ b/net/quic/chromium/quic_stream_factory.cc
@@ -771,7 +771,6 @@
     size_t max_packet_length,
     const std::string& user_agent_id,
     const QuicVersionVector& supported_versions,
-    bool always_require_handshake_confirmation,
     float load_server_info_timeout_srtt_multiplier,
     bool enable_connection_racing,
     bool enable_non_blocking_io,
@@ -815,8 +814,6 @@
                                     transport_security_state,
                                     cert_transparency_verifier))),
       supported_versions_(supported_versions),
-      always_require_handshake_confirmation_(
-          always_require_handshake_confirmation),
       load_server_info_timeout_srtt_multiplier_(
           load_server_info_timeout_srtt_multiplier),
       enable_connection_racing_(enable_connection_racing),
@@ -920,10 +917,6 @@
   }
 }
 
-bool QuicStreamFactory::ZeroRTTEnabledFor(const QuicServerId& quic_server_id) {
-  return !(require_confirmation_ || CryptoConfigCacheIsEmpty(quic_server_id));
-}
-
 base::TimeDelta QuicStreamFactory::GetTimeDelayForWaitingJob(
     const QuicServerId& server_id) {
   if (!delay_tcp_race_ || require_confirmation_)
@@ -1192,8 +1185,7 @@
       job_requests_map_.find(server_id);
   DCHECK(requests_iter != job_requests_map_.end());
   if (rv == OK) {
-    if (!always_require_handshake_confirmation_)
-      set_require_confirmation(false);
+    set_require_confirmation(false);
 
     if (!requests_iter->second.empty()) {
       SessionMap::iterator session_it = active_sessions_.find(server_id);
diff --git a/net/quic/chromium/quic_stream_factory.h b/net/quic/chromium/quic_stream_factory.h
index ab0f7f3..6606f7c4 100644
--- a/net/quic/chromium/quic_stream_factory.h
+++ b/net/quic/chromium/quic_stream_factory.h
@@ -208,7 +208,6 @@
       size_t max_packet_length,
       const std::string& user_agent_id,
       const QuicVersionVector& supported_versions,
-      bool always_require_handshake_confirmation,
       float load_server_info_timeout_srtt_multiplier,
       bool enable_connection_racing,
       bool enable_non_blocking_io,
@@ -363,8 +362,6 @@
 
   void set_require_confirmation(bool require_confirmation);
 
-  bool ZeroRTTEnabledFor(const QuicServerId& server_id);
-
   // It returns the amount of time waiting job should be delayed.
   base::TimeDelta GetTimeDelayForWaitingJob(const QuicServerId& server_id);
 
@@ -564,10 +561,6 @@
 
   const QuicVersionVector supported_versions_;
 
-  // Set if we always require handshake confirmation. If true, this will
-  // introduce at least one RTT for the handshake before the client sends data.
-  bool always_require_handshake_confirmation_;
-
   // Specifies the ratio between time to load QUIC server information from disk
   // cache to 'smoothed RTT'. This ratio is used to calculate the timeout in
   // milliseconds to wait for loading of QUIC server information. If we don't
diff --git a/net/quic/chromium/quic_stream_factory_test.cc b/net/quic/chromium/quic_stream_factory_test.cc
index e155e57..4422c2d 100644
--- a/net/quic/chromium/quic_stream_factory_test.cc
+++ b/net/quic/chromium/quic_stream_factory_test.cc
@@ -243,7 +243,6 @@
         url3_(kServer3Url),
         url4_(kServer4Url),
         privacy_mode_(PRIVACY_MODE_DISABLED),
-        always_require_handshake_confirmation_(false),
         load_server_info_timeout_srtt_multiplier_(0.0f),
         enable_connection_racing_(enable_connection_racing),
         enable_non_blocking_io_(true),
@@ -273,7 +272,6 @@
         /*SocketPerformanceWatcherFactory*/ nullptr,
         &crypto_client_stream_factory_, &random_generator_, &clock_,
         kDefaultMaxPacketSize, string(), SupportedVersions(version_),
-        always_require_handshake_confirmation_,
         load_server_info_timeout_srtt_multiplier_, enable_connection_racing_,
         enable_non_blocking_io_, disable_disk_cache_, delay_tcp_race_,
         /*max_server_configs_stored_in_properties*/ 0,
@@ -772,7 +770,6 @@
   TestCompletionCallback callback_;
 
   // Variables to configure QuicStreamFactory.
-  bool always_require_handshake_confirmation_;
   double load_server_info_timeout_srtt_multiplier_;
   bool enable_connection_racing_;
   bool enable_non_blocking_io_;
@@ -4729,21 +4726,6 @@
   EXPECT_FALSE(HasActiveCertVerifierJob(quic_server_id));
 }
 
-TEST_P(QuicStreamFactoryTest, QuicDoingZeroRTT) {
-  Initialize();
-
-  factory_->set_require_confirmation(true);
-  QuicServerId quic_server_id(host_port_pair_, PRIVACY_MODE_DISABLED);
-  EXPECT_FALSE(factory_->ZeroRTTEnabledFor(quic_server_id));
-
-  factory_->set_require_confirmation(false);
-  EXPECT_FALSE(factory_->ZeroRTTEnabledFor(quic_server_id));
-
-  // Load server config and verify QUIC will do 0RTT.
-  QuicStreamFactoryPeer::CacheDummyServerConfig(factory_.get(), quic_server_id);
-  EXPECT_TRUE(factory_->ZeroRTTEnabledFor(quic_server_id));
-}
-
 TEST_P(QuicStreamFactoryTest, YieldAfterPackets) {
   Initialize();
   ProofVerifyDetailsChromium verify_details = DefaultProofVerifyDetails();
diff --git a/testing/android/junit/BUILD.gn b/testing/android/junit/BUILD.gn
index bb2438f..22d17f5b 100644
--- a/testing/android/junit/BUILD.gn
+++ b/testing/android/junit/BUILD.gn
@@ -11,7 +11,6 @@
   bypass_platform_checks = true
   testonly = true
   java_files = [
-    "java/src/org/chromium/testing/local/AnnotationProcessor.java",
     "java/src/org/chromium/testing/local/BackgroundShadowAsyncTask.java",
     "java/src/org/chromium/testing/local/CustomShadowAsyncTask.java",
     "java/src/org/chromium/testing/local/GtestComputer.java",
diff --git a/testing/android/junit/java/src/org/chromium/testing/local/AnnotationProcessor.java b/testing/android/junit/java/src/org/chromium/testing/local/AnnotationProcessor.java
deleted file mode 100644
index 8b60b1a..0000000
--- a/testing/android/junit/java/src/org/chromium/testing/local/AnnotationProcessor.java
+++ /dev/null
@@ -1,74 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-package org.chromium.testing.local;
-
-import org.junit.rules.ExternalResource;
-import org.junit.runner.Description;
-import org.junit.runners.model.Statement;
-
-import java.lang.annotation.Annotation;
-
-/**
- * Test rule that is activated when a test has a specific annotation. It allows to run some code
- * before the test (and the {@link org.junit.Before}) runs, and guarantees to also run code after.
- *
- * Usage:
- *
- * <pre>
- * public class Test {
- *    &#64;Rule
- *    public AnnotationProcessor<Foo> rule = new AnnotationProcessor(Foo.class) {
- *          &#64;Override
- *          protected void before() { ... }
- *
- *          &#64;Override
- *          protected void after() { ... }
- *    };
- *
- *    &#64;Test
- *    &#64;Foo
- *    public void myTest() { ... }
- * }
- * </pre>
- *
- * @param <T> type of the annotation to match on the test case.
- */
-public abstract class AnnotationProcessor<T extends Annotation> extends ExternalResource {
-    private final Class<T> mAnnotationClass;
-    private Description mTestDescription;
-    private T mAnnotation;
-
-    public AnnotationProcessor(Class<T> annotationClass) {
-        mAnnotationClass = annotationClass;
-    }
-
-    @Override
-    public Statement apply(Statement base, Description description) {
-        mTestDescription = description;
-        mAnnotation = getAnnotation(description);
-        if (mAnnotation == null) return base;
-
-        // Return the wrapped statement to execute before() and after().
-        return super.apply(base, description);
-    }
-
-    /** @return {@link Description} of the current test. */
-    protected Description getTestDescription() {
-        return mTestDescription;
-    }
-
-    /** @return the annotation that caused the test to be processed. */
-    protected T getAnnotation() {
-        return mAnnotation;
-    }
-
-    private T getAnnotation(Description description) {
-        T annotation = description.getAnnotation(mAnnotationClass);
-        if (annotation != null) return annotation;
-
-        annotation = description.getTestClass().getAnnotation(mAnnotationClass);
-        return annotation;
-    }
-}
diff --git a/testing/buildbot/filters/ash_mus_unittests.filter b/testing/buildbot/filters/ash_mus_unittests.filter
index f19a780..2fe9763c 100644
--- a/testing/buildbot/filters/ash_mus_unittests.filter
+++ b/testing/buildbot/filters/ash_mus_unittests.filter
@@ -158,6 +158,7 @@
 -MaximizeModeControllerTest.MaximizeModeAfterExitingDockedMode
 -MaximizeModeControllerTest.MaximizeModeTest
 -MaximizeModeControllerTest.NoMaximizeModeWithDisabledInternalDisplay
+-MaximizeModeControllerTest.RestoreAfterExit
 -MaximizeModeControllerTest.StableHingeAnglesWithLidOpened
 -MaximizeModeControllerTest.TabletModeTransition
 -MaximizeModeControllerTest.TabletModeTransitionNoKeyboardAccelerometer
@@ -183,6 +184,9 @@
 -NormalPanelPopup/PanelWindowResizerTransientTest.PanelWithTransientChild/1
 -NormalPanelPopup/PanelWindowResizerTransientTest.PanelWithTransientChild/2
 -OverviewButtonTrayTest.HideAnimationAlwaysCompletes
+-OverviewGestureHandlerTest.HorizontalScrollInOverview
+-OverviewGestureHandlerTest.ScrollUpDownWithoutReleasing
+-OverviewGestureHandlerTest.VerticalScrolls
 -PanelLayoutManagerTest.DockUndockTest
 -PanelLayoutManagerTest.UndockTest
 -PanelWindowResizerTest.AttachToSecondDisplay
@@ -321,6 +325,8 @@
 -TouchHudProjectionTest.DoubleTouch
 -TouchHudProjectionTest.TouchMoveCancel
 -TouchHudProjectionTest.TouchMoveRelease
+-TrayIMETest.HidesOnA11yEnabled
+-TrayIMETest.PerformActionOnDetailedView
 -TrayRotationLockTest.CreateDefaultView
 -TrayRotationLockTest.CreateDefaultViewDuringMaximizeMode
 -TrayRotationLockTest.CreateTrayViewDuringMaximizeModeAndRotationLock
@@ -330,8 +336,10 @@
 -TrayRotationLockTest.TrayViewVisibilityChangesDuringMaximizeMode
 -UnifiedMouseWarpControllerTest.BoundaryTest
 -UnifiedMouseWarpControllerTest.WarpMouse
--VirtualKeyboardRootWindowControllerTest.FollowInputFocus
--VirtualKeyboardRootWindowControllerTest.VirtualKeyboardOnTouchableDisplayOnly
+-VirtualKeyboardControllerAlwaysEnabledTest.*
+-VirtualKeyboardControllerAutoTest.*
+-VirtualKeyboardRootWindowControllerTest.*
+-VirtualKeyboardControllerTest.*
 -WallpaperControllerTest.GetMaxDisplaySize
 -WebNotificationTrayTest.PopupShownOnBothDisplays
 -WindowCycleControllerTest.MultiDisplayPositioning
diff --git a/third_party/WebKit/LayoutTests/FlagExpectations/enable-slimming-paint-v2 b/third_party/WebKit/LayoutTests/FlagExpectations/enable-slimming-paint-v2
index 81177480..e5cb856 100644
--- a/third_party/WebKit/LayoutTests/FlagExpectations/enable-slimming-paint-v2
+++ b/third_party/WebKit/LayoutTests/FlagExpectations/enable-slimming-paint-v2
@@ -1360,8 +1360,8 @@
 
 # Some work remains to fully support composited animation and scrolling.
 Bug(none) virtual/threaded/animations/composited-animation-style-update.html [ Failure ]
-crbug.com/702350 transitions/opacity-transform-transitions-inside-iframe.html [ Timeout Crash ]
-crbug.com/702350 virtual/threaded/transitions/opacity-transform-transitions-inside-iframe.html [ Timeout Crash ]
+crbug.com/702350 transitions/opacity-transform-transitions-inside-iframe.html [ Timeout ]
+crbug.com/702350 virtual/threaded/transitions/opacity-transform-transitions-inside-iframe.html [ Timeout ]
 crbug.com/702353 transitions/transition-end-event-destroy-iframe.html [ Timeout ]
 crbug.com/702353 virtual/threaded/transitions/transition-end-event-destroy-iframe.html [ Timeout ]
 crbug.com/702353 virtual/threaded/transitions/extra-transition.html [ Timeout ]
@@ -1413,14 +1413,8 @@
 # The following debug crashes have not been triaged.
 crbug.com/702805 css3/blending/svg-isolation-add-masking.html [ Crash ]
 crbug.com/702805 css3/blending/svg-blend-layer-filter.html [ Crash ]
-crbug.com/702805 virtual/threaded/transitions/opacity-transition-zindex.html [ Crash ]
 crbug.com/702805 virtual/threaded/compositing/visibility/overlays-persist-on-navigation.html [ Crash ]
 crbug.com/702805 virtual/threaded/animations/responsive-neutral-keyframe.html [ Crash ]
-crbug.com/702805 virtual/threaded/animations/timing-functions.html [ Crash ]
-crbug.com/702805 virtual/threaded/animations/animation-offscreen-to-onscreen.html [ Crash ]
-crbug.com/702805 virtual/threaded/animations/3d/matrix-transform-type-animation.html [ Crash ]
-crbug.com/702805 virtual/threaded/animations/viewport-unit-animation-responsive.html [ Crash ]
-crbug.com/702805 virtual/threaded/animations/composited-animation-independent-transform-cancel.html [ Crash ]
 crbug.com/702805 svg/text/removing-id-on-path.html [ Failure ]
 crbug.com/702805 svg/text/selection-style-within-mask-crash.html [ Crash ]
 crbug.com/702805 svg/custom/mask-with-all-units.svg [ Crash ]
@@ -1447,10 +1441,6 @@
 crbug.com/702805 svg/hixie/perf/002.xml [ Crash ]
 crbug.com/702805 svg/hixie/perf/004.xml [ Crash ]
 crbug.com/702805 animations/responsive-neutral-keyframe.html [ Crash ]
-crbug.com/702805 animations/animation-offscreen-to-onscreen.html [ Crash ]
-crbug.com/702805 animations/timing-functions.html [ Crash ]
-crbug.com/702805 animations/viewport-unit-animation-responsive.html [ Crash ]
-crbug.com/702805 animations/3d/matrix-transform-type-animation.html [ Crash ]
 crbug.com/702805 fast/loader/scroll-restore-target-pseudo.html [ Crash ]
 crbug.com/702805 fast/loader/scroll-restore-overrides-fragment.html [ Crash ]
 crbug.com/702805 fast/forms/select-popup/popup-menu-appearance-coarse.html [ Crash Timeout ]
@@ -1467,7 +1457,6 @@
 crbug.com/702805 compositing/visibility/overlays-persist-on-navigation.html [ Crash ]
 crbug.com/702805 compositing/overflow/overflow-positioning.html [ Crash ]
 crbug.com/702805 compositing/layer-creation/incremental-destruction.html [ Crash ]
-crbug.com/702805 transitions/opacity-transition-zindex.html [ Crash ]
 crbug.com/702805 fast/forms/number/number-stepup-stepdown-from-renderer.html [ Crash Timeout ]
 crbug.com/702805 fast/forms/range/range-stepup-stepdown-from-renderer.html [ Crash Timeout ]
 crbug.com/702805 fast/dom/shadow/selections-in-shadow.html [ Crash Timeout ]
diff --git a/third_party/WebKit/LayoutTests/TestExpectations b/third_party/WebKit/LayoutTests/TestExpectations
index 00870e9a..aff75c4f 100644
--- a/third_party/WebKit/LayoutTests/TestExpectations
+++ b/third_party/WebKit/LayoutTests/TestExpectations
@@ -165,6 +165,59 @@
 crbug.com/711709 external/wpt/css/CSS2/floats-clear/floats-131.xht [ Skip ]
 crbug.com/711709 external/wpt/css/CSS2/floats-clear/floats-137.xht [ Skip ]
 
+#### external/wpt/css/CSS2/positioning
+#### Passed: 474
+#### Skipped: 49
+crbug.com/711805 external/wpt/css/CSS2/positioning/absolute-replaced-width-013.xht [ Skip ]
+crbug.com/711805 external/wpt/css/CSS2/positioning/absolute-replaced-width-027.xht [ Skip ]
+crbug.com/711805 external/wpt/css/CSS2/positioning/abspos-011.xht [ Skip ]
+crbug.com/711805 external/wpt/css/CSS2/positioning/abspos-012.xht [ Skip ]
+crbug.com/711805 external/wpt/css/CSS2/positioning/abspos-027.xht [ Skip ]
+crbug.com/711805 external/wpt/css/CSS2/positioning/abspos-inline-001.xht [ Skip ]
+crbug.com/711805 external/wpt/css/CSS2/positioning/abspos-inline-002.xht [ Skip ]
+crbug.com/711805 external/wpt/css/CSS2/positioning/abspos-inline-003.xht [ Skip ]
+crbug.com/711805 external/wpt/css/CSS2/positioning/abspos-inline-004.xht [ Skip ]
+crbug.com/711805 external/wpt/css/CSS2/positioning/abspos-inline-005.xht [ Skip ]
+crbug.com/711805 external/wpt/css/CSS2/positioning/abspos-inline-006.xht [ Skip ]
+crbug.com/711805 external/wpt/css/CSS2/positioning/abspos-paged-001.xht [ Skip ]
+crbug.com/711805 external/wpt/css/CSS2/positioning/abspos-paged-002.xht [ Skip ]
+crbug.com/711805 external/wpt/css/CSS2/positioning/bottom-applies-to-001.xht [ Skip ]
+crbug.com/711805 external/wpt/css/CSS2/positioning/bottom-applies-to-002.xht [ Skip ]
+crbug.com/711805 external/wpt/css/CSS2/positioning/bottom-applies-to-003.xht [ Skip ]
+crbug.com/711805 external/wpt/css/CSS2/positioning/bottom-applies-to-004.xht [ Skip ]
+crbug.com/711805 external/wpt/css/CSS2/positioning/bottom-applies-to-005.xht [ Skip ]
+crbug.com/711805 external/wpt/css/CSS2/positioning/bottom-applies-to-006.xht [ Skip ]
+crbug.com/711805 external/wpt/css/CSS2/positioning/bottom-applies-to-007.xht [ Skip ]
+crbug.com/711805 external/wpt/css/CSS2/positioning/bottom-applies-to-009.xht [ Skip ]
+crbug.com/711805 external/wpt/css/CSS2/positioning/bottom-applies-to-012.xht [ Skip ]
+crbug.com/711805 external/wpt/css/CSS2/positioning/bottom-applies-to-013.xht [ Skip ]
+crbug.com/711805 external/wpt/css/CSS2/positioning/bottom-applies-to-014.xht [ Skip ]
+crbug.com/711805 external/wpt/css/CSS2/positioning/bottom-applies-to-015.xht [ Skip ]
+crbug.com/711805 external/wpt/css/CSS2/positioning/position-004.xht [ Skip ]
+crbug.com/711805 external/wpt/css/CSS2/positioning/position-applies-to-001.xht [ Skip ]
+crbug.com/711805 external/wpt/css/CSS2/positioning/position-applies-to-002.xht [ Skip ]
+crbug.com/711805 external/wpt/css/CSS2/positioning/position-applies-to-003.xht [ Skip ]
+crbug.com/711805 external/wpt/css/CSS2/positioning/position-applies-to-004.xht [ Skip ]
+crbug.com/711805 external/wpt/css/CSS2/positioning/position-applies-to-005.xht [ Skip ]
+crbug.com/711805 external/wpt/css/CSS2/positioning/position-applies-to-006.xht [ Skip ]
+crbug.com/711805 external/wpt/css/CSS2/positioning/position-applies-to-007.xht [ Skip ]
+crbug.com/711805 external/wpt/css/CSS2/positioning/position-applies-to-009.xht [ Skip ]
+crbug.com/711805 external/wpt/css/CSS2/positioning/position-applies-to-012.xht [ Skip ]
+crbug.com/711805 external/wpt/css/CSS2/positioning/position-applies-to-013.xht [ Skip ]
+crbug.com/711805 external/wpt/css/CSS2/positioning/position-applies-to-014.xht [ Skip ]
+crbug.com/711805 external/wpt/css/CSS2/positioning/position-applies-to-015.xht [ Skip ]
+crbug.com/711805 external/wpt/css/CSS2/positioning/position-fixed-003.xht [ Skip ]
+crbug.com/711805 external/wpt/css/CSS2/positioning/position-fixed-004.xht [ Skip ]
+crbug.com/711805 external/wpt/css/CSS2/positioning/position-fixed-005.xht [ Skip ]
+crbug.com/711805 external/wpt/css/CSS2/positioning/position-relative-020.xht [ Skip ]
+crbug.com/711805 external/wpt/css/CSS2/positioning/position-relative-021.xht [ Skip ]
+crbug.com/711805 external/wpt/css/CSS2/positioning/position-relative-022.xht [ Skip ]
+crbug.com/711805 external/wpt/css/CSS2/positioning/position-relative-031.xht [ Skip ]
+crbug.com/711805 external/wpt/css/CSS2/positioning/position-relative-034.xht [ Skip ]
+crbug.com/711805 external/wpt/css/CSS2/positioning/position-relative-035.xht [ Skip ]
+crbug.com/711805 external/wpt/css/CSS2/positioning/position-relative-036.xht [ Skip ]
+crbug.com/711805 external/wpt/css/CSS2/positioning/positioning-float-001.xht [ Skip ]
+
 # ====== Layout team owned tests to here ======
 
 # ====== LayoutNG-only failures from here ======
@@ -1525,10 +1578,6 @@
 crbug.com/521124 crbug.com/410145 [ Win7 ] fast/css/font-weight-1.html [ Pass Failure ]
 crbug.com/521124 crbug.com/410145 [ Win7 ] virtual/sharedarraybuffer/fast/css/font-weight-1.html [ Pass Failure ]
 
-crbug.com/710946 inspector-protocol/runtime/runtime-callFunctionOn-async.html [ NeedsManualRebaseline ]
-crbug.com/710946 inspector-protocol/runtime/runtime-evaluate-async.html [ NeedsManualRebaseline ]
-crbug.com/710946 inspector-protocol/runtime/runtime-runScript-async.html [ NeedsManualRebaseline ]
-
 # Temporary, until we stop use_system_harfbuzz on Linux including non-official builds
 crbug.com/462689 [ Linux ] fast/text/unicode-variation-selector.html [ Failure ]
 
diff --git a/third_party/WebKit/LayoutTests/W3CImportExpectations b/third_party/WebKit/LayoutTests/W3CImportExpectations
index eb09851..a4cfa58 100644
--- a/third_party/WebKit/LayoutTests/W3CImportExpectations
+++ b/third_party/WebKit/LayoutTests/W3CImportExpectations
@@ -102,7 +102,8 @@
 external/wpt/css/CSS2/other-formats [ Skip ]
 external/wpt/css/CSS2/page-box [ Skip ]
 external/wpt/css/CSS2/pagination [ Skip ]
-external/wpt/css/CSS2/positioning [ Skip ]
+## Owners: glebl@chromium.org
+# external/wpt/css/CSS2/positioning [ Pass ]
 external/wpt/css/CSS2/run-in [ Skip ]
 external/wpt/css/CSS2/sec5 [ Skip ]
 external/wpt/css/CSS2/section-index.xht [ Skip ]
diff --git a/third_party/WebKit/LayoutTests/accessibility/aom-string-properties.html b/third_party/WebKit/LayoutTests/accessibility/aom-string-properties.html
index 816f1a36..ea3fac33 100644
--- a/third_party/WebKit/LayoutTests/accessibility/aom-string-properties.html
+++ b/third_party/WebKit/LayoutTests/accessibility/aom-string-properties.html
@@ -34,18 +34,18 @@
 test(function(t) {
     var node = document.getElementById("checked");
     var axNode = accessibilityController.accessibleElementById("checked");
-    assert_equals(axNode.isChecked, false);
+    assert_equals(axNode.checkedState, 0);
     node.accessibleNode.checked = "true";
-    assert_equals(axNode.isChecked, true);
+    assert_equals(axNode.checkedState, 1);
     node.accessibleNode.checked = "mixed";
-    assert_equals(axNode.isChecked, false);
+    assert_equals(axNode.checkedState, 2);
     assert_equals(axNode.isButtonStateMixed, true);
 
     // It also works to set it to just true or false (no quotes).
     node.accessibleNode.checked = true;
-    assert_equals(axNode.isChecked, true);
+    assert_equals(axNode.checkedState, 1);
     node.accessibleNode.checked = false;
-    assert_equals(axNode.isChecked, false);
+    assert_equals(axNode.checkedState, 0);
 
 }, "AccessibleNode.checked");
 </script>
diff --git a/third_party/WebKit/LayoutTests/accessibility/aria-checkbox-checked-expected.txt b/third_party/WebKit/LayoutTests/accessibility/aria-checkbox-checked-expected.txt
index 161c639..a6acca42c 100644
--- a/third_party/WebKit/LayoutTests/accessibility/aria-checkbox-checked-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/aria-checkbox-checked-expected.txt
@@ -12,9 +12,9 @@
 PASS checkbox.isChecked is false
 PASS checkbox.isChecked is true
 PASS checkbox.isChecked is false
-PASS checkbox.isChecked is true
 PASS checkbox.isChecked is false
 PASS checkbox.isChecked is true
+PASS checkbox.isChecked is true
 PASS successfullyParsed is true
 
 TEST COMPLETE
diff --git a/third_party/WebKit/LayoutTests/accessibility/aria-checkbox-checked-mixed-expected.txt b/third_party/WebKit/LayoutTests/accessibility/aria-checkbox-checked-mixed-expected.txt
index 30b1155e..ce06d2a 100644
--- a/third_party/WebKit/LayoutTests/accessibility/aria-checkbox-checked-mixed-expected.txt
+++ b/third_party/WebKit/LayoutTests/accessibility/aria-checkbox-checked-mixed-expected.txt
@@ -1,4 +1,5 @@
-Check whether mixed value is reported properly
+    
+Check whether ARIA mixed state is reported properly
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
@@ -8,8 +9,20 @@
 Role: AXRole: AXMenuItemCheckBox
 Mixed: true
 Role: AXRole: AXRadioButton
-Mixed: false
+Mixed: true
 Role: AXRole: AXMenuItemRadio
+Mixed: true
+Role: AXRole: AXSwitch
+Mixed: false
+Role: AXRole: AXCheckBox
+Mixed: true
+Role: AXRole: AXCheckBox
+Mixed: true
+Role: AXRole: AXRadioButton
+Mixed: true
+Role: AXRole: AXRadioButton
+Mixed: true
+Role: AXRole: AXButton
 Mixed: false
 PASS successfullyParsed is true
 
diff --git a/third_party/WebKit/LayoutTests/accessibility/aria-checkbox-checked-mixed.html b/third_party/WebKit/LayoutTests/accessibility/aria-checkbox-checked-mixed.html
index 9ebcaf5..4573fb72 100644
--- a/third_party/WebKit/LayoutTests/accessibility/aria-checkbox-checked-mixed.html
+++ b/third_party/WebKit/LayoutTests/accessibility/aria-checkbox-checked-mixed.html
@@ -7,18 +7,26 @@
 
 <div id="element1" role="checkbox" aria-checked="mixed"></div>
 <div id="element2" role="menuitemcheckbox" aria-checked="mixed"></div>
-<div id="element3" role="radio" aria-checked="mixed"></div> <!-- Treat as false for radio role -->
-<div id="element4" role="menuitemradio" aria-checked="mixed"></div> <!-- Treat as false for menuitemradio role -->
+<div id="element3" role="radio" aria-checked="mixed"></div>
+<div id="element4" role="menuitemradio" aria-checked="mixed"></div>
+<!-- Switch specifically does not support mixed -->
+<div id="element5" role="switch" aria-checked="mixed"></div>
+
+<input id="element6" type="checkbox" aria-checked="mixed" checked />
+<input id="element7" type="checkbox" aria-checked="mixed" />
+<input id="element8" type="radio" aria-checked="mixed" checked />
+<input id="element9" type="radio" aria-checked="mixed" />
+<input id="element10" type="button" aria-checked="mixed" />
 
 <p id="description"></p>
 <div id="console"></div>
 
 <script>
 
-    description("Check whether mixed value is reported properly");
+    description("Check whether ARIA mixed state is reported properly");
 
     if (window.accessibilityController) {
-        for (var i = 1; i <= 4; i++) {
+        for (var i = 1; i <= 10; i++) {
             var element = accessibilityController.accessibleElementById("element" + i);
             debug("Role: " + element.role);
             debug("Mixed: " + element.isButtonStateMixed);
diff --git a/third_party/WebKit/LayoutTests/accessibility/aria-checkbox-checked.html b/third_party/WebKit/LayoutTests/accessibility/aria-checkbox-checked.html
index 63587fa..90cbc742 100644
--- a/third_party/WebKit/LayoutTests/accessibility/aria-checkbox-checked.html
+++ b/third_party/WebKit/LayoutTests/accessibility/aria-checkbox-checked.html
@@ -30,8 +30,8 @@
                          [ "check3", "false" ],
                          [ "check4", "true" ],
                          [ "check5", "false" ],
-                         [ "check6", "true" ],
-                         [ "check7", "false" ],
+                         [ "check6", "false" ],
+                         [ "check7", "true" ],
                          [ "check8", "true" ]];
 
           for (var i = 0; i < answers.length; i++) {
diff --git a/third_party/WebKit/LayoutTests/accessibility/input-mixed.html b/third_party/WebKit/LayoutTests/accessibility/input-mixed.html
new file mode 100644
index 0000000..5f451fd
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/accessibility/input-mixed.html
@@ -0,0 +1,58 @@
+<!DOCTYPE HTML>
+<script src="../resources/testharness.js"></script>
+<script src="../resources/testharnessreport.js"></script>
+<!-- Will set indeterminate state via JS -->
+<input id="element1" type="checkbox" />
+<script>
+  // No way currently to do this via markup, must be via JS
+  document.getElementById('element1').indeterminate = true;
+</script>
+<!-- Control-->
+<input id="element2" type="checkbox"  />
+
+<div>
+  <!-- Will be ::indeterminate in CSS because no radio item selected yet -->
+  <input type="radio" name="radiogroup1" />
+  <input id="element3" type="radio" name="radiogroup1" />
+</div>
+
+<div>
+  <!-- NOT mixed/indeterminate because group has a selected radio button -->
+  <input id="element4" type="radio" name="radiogroup2" />
+  <input id="element5" type="radio" checked name="radiogroup2" />
+</div>
+
+<script>
+
+  function axElementById(id) {
+    return accessibilityController.accessibleElementById(id);
+  }
+
+  test(function(t) {
+    var ax = axElementById("element1");
+    assert_true(ax.isButtonStateMixed);
+  }, "A native indeterminate checkbox must have the mixed state");
+
+  test(function(t) {
+    var ax = axElementById("element2");
+    assert_false(ax.isButtonStateMixed);
+  }, "A native checkbox that is not indeterminate" +
+      " must NOT have the mixed state");
+
+  test(function(t) {
+    var ax = axElementById("element3");
+    assert_true(ax.isButtonStateMixed);
+  }, "A native radio that in a group with nothing checked" +
+      " must have the mixed state");
+
+  test(function(t) {
+    var ax = axElementById("element4");
+    assert_false(ax.isButtonStateMixed);
+  }, "A native radio that in a group with something checked" +
+      " must NOT have the mixed state");
+
+  test(function(t) {
+    var ax = axElementById("element4");
+    assert_false(ax.isButtonStateMixed);
+  }, "A checked native radio must NOT have the mixed state");
+</script>
diff --git a/third_party/WebKit/LayoutTests/accessibility/option-aria-checked.html b/third_party/WebKit/LayoutTests/accessibility/option-aria-checked.html
new file mode 100644
index 0000000..d109e09
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/accessibility/option-aria-checked.html
@@ -0,0 +1,45 @@
+<!DOCTYPE HTML>
+<script src="../resources/testharness.js"></script>
+<script src="../resources/testharnessreport.js"></script>
+
+<select>
+<option id="element1" role="menuitemcheckbox">1</option>
+<option id="element2" role="menuitemcheckbox" aria-checked="true">2</option>
+<option id="element3" role="menuitemradio">3</option>
+<option id="element4" role="menuitemradio" aria-checked="true">4</option>
+<!-- Checked not supported -->
+<option id="element5" aria-checked="true">5</option>
+</select>
+
+<script>
+
+  function axElementById(id) {
+      return accessibilityController.accessibleElementById(id);
+  }
+
+  test(function(t) {
+    var ax = axElementById("element1");
+    assert_false(ax.isChecked);
+  }, "<option> of role menuitemcheckbox is not checked by default");
+
+  test(function(t) {
+    var ax = axElementById("element2");
+    assert_true(ax.isChecked);
+  }, "<option> of role menuitemcheckbox can be checked with aria-checked");
+
+  test(function(t) {
+    var ax = axElementById("element3");
+    assert_false(ax.isChecked);
+  }, "<option> of role menuitemradio is not checked by default");
+
+  test(function(t) {
+    var ax = axElementById("element4");
+    assert_true(ax.isChecked);
+  }, "<option> of role menuitemradio can be checked with aria-checked");
+
+  test(function(t) {
+    var ax = axElementById("element5");
+    assert_false(ax.isChecked);
+  }, "<option> of no role is not checked even with aria-checked set");
+
+</script>
diff --git a/third_party/WebKit/LayoutTests/compositing/opacity-with-mask-expected.png b/third_party/WebKit/LayoutTests/compositing/opacity-with-mask-expected.png
new file mode 100644
index 0000000..7792efb
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/compositing/opacity-with-mask-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/compositing/opacity-with-mask-expected.txt b/third_party/WebKit/LayoutTests/compositing/opacity-with-mask-expected.txt
new file mode 100644
index 0000000..db52730
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/compositing/opacity-with-mask-expected.txt
@@ -0,0 +1,9 @@
+layer at (0,0) size 800x600
+  LayoutView at (0,0) size 800x600
+layer at (0,0) size 800x176
+  LayoutBlockFlow {HTML} at (0,0) size 800x176
+    LayoutBlockFlow {BODY} at (8,8) size 784x160
+layer at (8,8) size 280x160
+  LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 280x160 [bgcolor=#008000]
+layer at (8,8) size 280x160 transparent
+  LayoutBlockFlow (positioned) {DIV} at (0,0) size 280x160 [bgcolor=#FF0000] [border: (1px solid #000000)]
diff --git a/third_party/WebKit/LayoutTests/compositing/opacity-with-mask.html b/third_party/WebKit/LayoutTests/compositing/opacity-with-mask.html
new file mode 100644
index 0000000..1eaca2e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/compositing/opacity-with-mask.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <style>
+      .outer {
+        position: relative;
+        width: 280px;
+        height: 160px;
+        background-color: green;
+        border-radius:3px;
+        overflow:hidden;
+        will-change: transform;
+      }
+
+      .inner {
+        position:absolute;
+        top:0;
+        left:0;
+        right:0;
+        bottom:0;
+        background-color:red;
+        border: 1px solid black;
+        opacity: 0.5;
+        will-change: transform;
+      }
+    </style>
+  </head>
+  <body>
+    <div class="outer">
+      <div class="inner"></div>
+    </div>
+  </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/WPT_BASE_MANIFEST.json b/third_party/WebKit/LayoutTests/external/WPT_BASE_MANIFEST.json
index fbda2c2c..2499a4e 100644
--- a/third_party/WebKit/LayoutTests/external/WPT_BASE_MANIFEST.json
+++ b/third_party/WebKit/LayoutTests/external/WPT_BASE_MANIFEST.json
@@ -51710,6 +51710,11 @@
      {}
     ]
    ],
+   "cssom/serialize-variable-reference-expected.txt": [
+    [
+     {}
+    ]
+   ],
    "cssom/shorthand-serialization-expected.txt": [
     [
      {}
@@ -55510,6 +55515,11 @@
      {}
     ]
    ],
+   "html/browsers/origin/relaxing-the-same-origin-restriction/document_domain_setter-expected.txt": [
+    [
+     {}
+    ]
+   ],
    "html/browsers/origin/relaxing-the-same-origin-restriction/document_domain_setter_iframe.html": [
     [
      {}
@@ -71090,6 +71100,11 @@
      {}
     ]
    ],
+   "streams/readable-streams/floating-point-total-queue-size.dedicatedworker-expected.txt": [
+    [
+     {}
+    ]
+   ],
    "streams/readable-streams/floating-point-total-queue-size.js": [
     [
      {}
@@ -140151,6 +140166,10 @@
    "329fe02cb9e54b1a24a8f9dedcfcf5c0f61c7f24",
    "testharness"
   ],
+  "cssom/serialize-variable-reference-expected.txt": [
+   "0a3934554c62b90ae4fd0d8976da28ac7bcb005c",
+   "support"
+  ],
   "cssom/serialize-variable-reference.html": [
    "5e83f084efc82184c3052a40bb4a061fd4a1336f",
    "testharness"
@@ -144336,7 +144355,7 @@
    "testharness"
   ],
   "fetch/api/request/request-error-expected.txt": [
-   "2fcead7b3ede1c8c024dbd4b6d67dbfd7cbe6a3b",
+   "b77223e27d25a075956326f1a1bb4293adda8a83",
    "support"
   ],
   "fetch/api/request/request-error.html": [
@@ -144356,7 +144375,7 @@
    "testharness"
   ],
   "fetch/api/request/request-init-001.sub-expected.txt": [
-   "6147709d02397edcf916a33c79345d377824a464",
+   "bd2f36aa284dbf03c3454c89cba033e4561de698",
    "support"
   ],
   "fetch/api/request/request-init-001.sub.html": [
@@ -146751,6 +146770,10 @@
    "9839a9c24ce78ec42da8a60d2175df06e19983c1",
    "testharness"
   ],
+  "html/browsers/origin/relaxing-the-same-origin-restriction/document_domain_setter-expected.txt": [
+   "5490279a15fb86fd4a7409575a22d26ab2993ef0",
+   "support"
+  ],
   "html/browsers/origin/relaxing-the-same-origin-restriction/document_domain_setter.html": [
    "1f0408464d8d98341c9537c3e3356cacbcf2f489",
    "testharness"
@@ -173251,6 +173274,10 @@
    "5761d049d4a9ea1eb9ea9dd523ea653c6f97497c",
    "support"
   ],
+  "streams/readable-streams/floating-point-total-queue-size.dedicatedworker-expected.txt": [
+   "5761d049d4a9ea1eb9ea9dd523ea653c6f97497c",
+   "support"
+  ],
   "streams/readable-streams/floating-point-total-queue-size.dedicatedworker.html": [
    "e07b6c46f7975b76a309ac9b728e4215d5e7fe9d",
    "testharness"
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-height-001.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-height-001.xht
new file mode 100644
index 0000000..acc305f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-height-001.xht
@@ -0,0 +1,38 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned, non-replaced elements, static position of fixed element</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-height" />
+        <meta name="flags" content="" />
+        <meta name="assert" content="The calculation of static position for a fixed positioned element when top, right, bottom, and left are all 'auto' is based off the containing block not the initial containing block." />
+        <style type="text/css">
+            html, body, p
+            {
+                margin: 0;
+                padding: 0;
+            }
+            #div1
+            {
+                border: solid black;
+                height: 2in;
+                position: absolute;
+                top: 1in;
+                width: 3in;
+            }
+            div div
+            {
+                background: blue;
+                height: 1in;
+                position: fixed;
+                width: 1in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes the a filled blue square touches the upper-left corner of the black box.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-height-002-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-height-002-ref.xht
new file mode 100644
index 0000000..944c099
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-height-002-ref.xht
@@ -0,0 +1,29 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div
+  {
+  border: black solid medium;
+  height: 200px;
+  width: 200px;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if a filled blue square is in the <strong>upper-left corner</strong> of an hollow black square and if there is <strong>no red</strong>.</p>
+
+  <div><img src="support/blue15x15.png" width="100" height="100" alt="Image download support must be enabled" /></div>
+
+ </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-height-002.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-height-002.xht
new file mode 100644
index 0000000..0a9f3f4
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-height-002.xht
@@ -0,0 +1,40 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned, non-replaced elements with height based on the content</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-06-02 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-height" />
+        <link rel="match" href="absolute-non-replaced-height-002-ref.xht" />
+
+        <meta name="flags" content="ahem" />
+        <meta name="assert" content="If 'top', 'height', 'bottom', 'margin-top' and 'margin-bottom' are all auto, then set 'top' to the static position, then the height is based on the content, then 'margin-top' and 'margin-bottom' are set to 0 and then solve for 'bottom'." />
+        <style type="text/css">
+            #div1
+            {
+                border: solid black;
+                height: 200px;
+                position: relative;
+                width: 200px;
+            }
+            div div
+            {
+                background: red;
+                bottom: auto;
+                color: blue;
+                font: 100px/1em Ahem;
+                height: auto;
+                margin-bottom: auto;
+                margin-top: auto;
+                position: absolute;
+                top: auto;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if a filled blue square is in the <strong>upper-left corner</strong> of an hollow black square and if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div>X</div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-height-003-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-height-003-ref.xht
new file mode 100644
index 0000000..e85fef7f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-height-003-ref.xht
@@ -0,0 +1,36 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div
+  {
+  border: black solid medium;
+  height: 288px;
+  width: 288px;
+  }
+
+  img
+  {
+  height: 96px;
+  vertical-align: top;
+  width: 100%;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if a blue rectangle is <strong>vertically centered</strong> in an hollow black square.</p>
+
+  <div><img src="support/1x1-white.png" alt="Image download support must be enabled" /><img src="support/blue15x15.png" alt="Image download support must be enabled" /></div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-height-003.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-height-003.xht
new file mode 100644
index 0000000..b88d58d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-height-003.xht
@@ -0,0 +1,67 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned, non-replaced elements, vertical centering</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-08-31 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-height" />
+		<link rel="match" href="absolute-non-replaced-height-003-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="An absolutely positioned non-replaced element's padding box (which is the area painted by background-color of the element) will be vertically centered within its containing block only if both 'margin-top' and 'margin-bottom' have equal values and if 'top' and 'bottom' have equal values. An absolutely positioned non-replaced element's margin box will be vertically centered within its containing block only if 'top' and 'bottom' have equal values." />
+        <style type="text/css">
+            #div1
+            {
+                border: solid black;
+                height: 3in;
+                position: relative;
+                width: 3in;
+            }
+            div div
+            {
+                background: blue;
+                bottom: 0.5in;
+                height: 1in;
+                margin-bottom: auto;
+                margin-top: auto;
+                position: absolute;
+                top: 0.5in;
+                width: 100%;
+            }
+
+		/*
+
+		0.5in : top
+	+
+		auto (solve): margin-top
+	+
+		0 : border-top-width
+	+
+		0 : padding-top
+	+
+		1in : height
+	+
+		0 : padding-bottom
+	+
+		0 : border-bottom-width
+	+
+		auto (solve) : margin-bottom
+	+
+		0.5in : bottom
+	=============
+		3.0in : height of containing block
+
+	So, margin-bottom and margin-top must use 0.5in so that the equation gets balanced.
+
+		*/
+
+
+        </style>
+    </head>
+    <body>
+        <p>Test passes if a blue rectangle is <strong>vertically centered</strong> in an hollow black square.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-height-004.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-height-004.xht
new file mode 100644
index 0000000..ce79094
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-height-004.xht
@@ -0,0 +1,66 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned, non-replaced elements, 'margin-top' set to 'auto'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-08-31 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-height" />
+		<link rel="match" href="absolute-non-replaced-height-003-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="When 'top', 'bottom', 'height' and 'margin-bottom' of an absolutely positioned, non-replaced element are all not 'auto' while its 'margin-top' is 'auto', then 'margin-top' becomes the remainder of the height of its containing block." />
+        <style type="text/css">
+            #div1
+            {
+                border: solid black;
+                height: 3in;
+                position: relative;
+                width: 3in;
+            }
+            div div
+            {
+                background: blue;
+                bottom: 0.5in;
+                height: 1in;
+                margin-top: auto;
+                margin-bottom: 0.5in;
+                position: absolute;
+                top: 0.5in;
+                width: 100%;
+            }
+
+		/*
+
+		0.5in : top
+	+
+		auto (solve): margin-top
+	+
+		0 : border-top-width
+	+
+		0 : padding-top
+	+
+		1in: height
+	+
+		0 : padding-bottom
+	+
+		0 : border-bottom-width
+	+
+		0.5in : margin-bottom
+	+
+		0.5in : bottom
+	=============
+		3.0in : height of containing block
+
+	So, margin-top must use 0.5in so that the equation gets balanced.
+
+		*/
+
+        </style>
+    </head>
+    <body>
+        <p>Test passes if a blue rectangle is <strong>vertically centered</strong> in an hollow black square.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-height-005.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-height-005.xht
new file mode 100644
index 0000000..7e45c90
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-height-005.xht
@@ -0,0 +1,67 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned, non-replaced elements, 'margin-bottom' set to 'auto'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-08-31 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-height" />
+		<link rel="match" href="absolute-non-replaced-height-003-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="When 'top', 'bottom' and 'height' are all are not 'auto', 'margin-top' is not 'auto' and 'margin-bottom' is 'auto'. Then 'margin-bottom' becomes the remainder of the height of the containing box." />
+        <style type="text/css">
+            #div1
+            {
+                border: solid black;
+                height: 3in;
+                position: relative;
+                width: 3in;
+            }
+            div div
+            {
+                background: blue;
+                bottom: 0.5in;
+                height: 1in;
+                margin-bottom: auto;
+                margin-top: 0.5in;
+                position: absolute;
+                top: 0.5in;
+                width: 100%;
+            }
+
+		/*
+
+		0.5in : top
+	+
+		0.5in : margin-top
+	+
+		0 : border-top-width
+	+
+		0 : padding-top
+	+
+		1in: height
+	+
+		0 : padding-bottom
+	+
+		0 : border-bottom-width
+	+
+		auto (solve) : margin-bottom
+	+
+		0.5in : bottom
+	=============
+		3.0in : height of containing block
+
+	So, margin-bottom must use 0.5in so that the equation gets balanced.
+
+		*/
+
+
+        </style>
+    </head>
+    <body>
+        <p>Test passes if a blue rectangle is <strong>vertically centered</strong> in an hollow black square.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-height-006-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-height-006-ref.xht
new file mode 100644
index 0000000..0253cc9
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-height-006-ref.xht
@@ -0,0 +1,38 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div
+  {
+  border: black solid 10px;
+  height: 300px;
+  width: 300px;
+  }
+
+  img
+  {
+  height: 100px;
+  vertical-align: top;
+  width: 100%;
+  }
+
+  img + img {height: 150px;}
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if there is one and only one blue rectangle inside an hollow black square and if such black square does not have a vertical scrollbar.</p>
+
+  <div><img src="support/1x1-white.png" alt="Image download support must be enabled" /><img src="support/blue15x15.png" alt="Image download support must be enabled" /></div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-height-006.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-height-006.xht
new file mode 100644
index 0000000..eb27479b
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-height-006.xht
@@ -0,0 +1,83 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned, non-replaced elements, over-constrained</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-08-27 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-height" />
+		<link rel="match" href="absolute-non-replaced-height-006-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'bottom' value is ignored and the equation solves for the bottom value, when the values for 'top', 'bottom', 'height', 'margin-top', 'margin-bottom' add up to more than the containing blocks height." />
+        <style type="text/css">
+            #div1
+            {
+                border: 10px solid black;
+                height: 300px;
+                position: relative;
+                width: 300px;
+                overflow: auto;
+            }
+            div div
+            {
+                background: blue;
+                height: 150px;
+                margin-bottom: 50px;
+                margin-top: 50px;
+                position: absolute;
+                top: 50px;
+                width: 50%;
+            }
+            #div2
+            {
+                bottom: 50px;
+            }
+
+		/*
+
+		50px : top
+	+
+		50px : margin-top
+	+
+		0 : border-top-width
+	+
+		0 : padding-top
+	+
+		150px : height
+	+
+		0 : padding-bottom
+	+
+		0 : border-bottom-width
+	+
+		50px : margin-bottom
+	+
+		50px : bottom
+	=============
+		350px  while the height of containing block is only 300px.
+
+		So, here we definitely have an overconstrained situation. In which
+		case the spec clearly states
+		"If the values are over-constrained, ignore the value for 'bottom'
+		and solve for that value."
+		http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-height
+
+		So, here, the used value for bottom will be 0px so that the equation
+		gets balanced.
+
+		*/
+
+            #div3
+            {
+                bottom: 0;
+                left: 50%;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is one and only one blue rectangle inside an hollow black square and if such black square does not have a vertical scrollbar.</p>
+        <div id="div1">
+            <div id="div2"></div>
+            <div id="div3"></div>
+        </div>
+    </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-height-007-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-height-007-ref.xht
new file mode 100644
index 0000000..2ad96ac
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-height-007-ref.xht
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  img
+  {
+  height: 100px;
+  width: 100px;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if the orange and blue squares have the <strong>same height</strong>.</p>
+
+  <div><img src="support/swatch-orange.png" alt="Image download support must be enabled" /><img src="support/blue15x15.png" alt="Image download support must be enabled" /></div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-height-007.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-height-007.xht
new file mode 100644
index 0000000..f87503ff
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-height-007.xht
@@ -0,0 +1,97 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned, non-replaced elements, shrink-to-fit solve for top</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-08-31 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-height" />
+		<link rel="match" href="absolute-non-replaced-height-007-ref.xht" />
+
+        <meta name="flags" content="ahem" />
+        <meta name="assert" content="Verify that height is based on the overall height of the content, 'margin-top' and 'margin-bottom' when set to 'auto' are solved to '0' and solve for 'top', when 'top' and 'height' are both 'auto' and 'bottom' is not 'auto'." />
+        <style type="text/css">
+            #div1
+            {
+                color: orange;
+                font: 100px/1 Ahem;
+                height: 300px;
+                position: relative;
+                width: 200px;
+            }
+            div div
+            {
+                background: blue;
+                bottom: 200px;
+                height: auto;
+                margin-bottom: auto;
+                margin-top: auto;
+                position: absolute;
+                top: auto;
+                width: 100%;
+            }
+
+		/*
+
+		 auto (to solve) : top
+	+
+		 auto (to solve): margin-top
+	+
+		 0 : border-top-width
+	+
+		 0 : padding-top
+	+
+		 auto (to solve) : height
+	+
+		 0 : padding-bottom
+	+
+		 0 : border-bottom-width
+	+
+		 auto (to solve): margin-bottom
+	+
+		200px : bottom
+	=============
+		300px  : height of containing block
+
+		"
+		'top' and 'height' are 'auto' and 'bottom' is not 'auto',
+		then the height is based on the content per 10.6.7,
+		set 'auto' values for 'margin-top' and 'margin-bottom' to 0,
+		and solve for 'top'
+		"
+
+		so this brings:
+
+
+		 auto (to solve) : top
+	+
+		 0 (solved): margin-top
+	+
+		 0 : border-top-width
+	+
+		 0 : padding-top
+	+
+		 100px (solved: based on content) : height
+	+
+		 0 : padding-bottom
+	+
+		 0 : border-bottom-width
+	+
+		 0 (solved) : margin-bottom
+	+
+		200px : bottom
+	=============
+		300px  : height of containing block
+
+		so top will use 0px
+
+		*/
+
+        </style>
+    </head>
+    <body>
+        <p>Test passes if the orange and blue squares have the <strong>same height</strong>.</p>
+        <div id="div1">
+            <div>X</div>
+        </div>
+    </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-height-008-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-height-008-ref.xht
new file mode 100644
index 0000000..131604ba
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-height-008-ref.xht
@@ -0,0 +1,34 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  img
+  {
+  height: 96px;
+  vertical-align: top;
+  width: 96px;
+  }
+
+  img#blue
+  {
+  height: 192px;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if a blue rectangle is below an orange square.</p>
+
+  <div><img src="support/swatch-orange.png" alt="Image download support must be enabled" /><br /><img id="blue" src="support/blue15x15.png" alt="Image download support must be enabled" /></div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-height-008.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-height-008.xht
new file mode 100644
index 0000000..e79df83c
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-height-008.xht
@@ -0,0 +1,97 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned, non-replaced elements, 'top' set to static position</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-08-27 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-height" />
+		<link rel="match" href="absolute-non-replaced-height-008-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="When 'top' is set to the static position and any 'auto' values for top and bottom margin are set to '0', when 'top' and 'bottom' are 'auto' and 'height' is not 'auto'." />
+        <style type="text/css">
+            #div1
+            {
+                background: blue;
+                height: 3in;
+                position: relative;
+                width: 1in;
+            }
+            div div
+            {
+                background: orange;
+                bottom: auto;
+                height: 1in;
+                margin-bottom: auto;
+                margin-top: auto;
+                position: absolute;
+                top: auto;
+                width: 100%;
+            }
+
+
+            /*
+
+		 auto (to solve) : top
+	+
+		 auto (to solve): margin-top
+	+
+		 0 : border-top-width
+	+
+		 0 : padding-top
+	+
+		 1in : height
+	+
+		 0 : padding-bottom
+	+
+		 0 : border-bottom-width
+	+
+		 auto (to solve): margin-bottom
+	+
+		auto (to solve) : bottom
+	=============
+		3in  : height of containing block
+
+
+	"
+	'top' and 'bottom' are 'auto' and 'height' is not 'auto',
+	then set 'top' to the static position,
+	set 'auto' values for 'margin-top' and 'margin-bottom' to 0,
+	and solve for 'bottom'
+	"
+
+	so this brings:
+
+		 0 (solved static position) : top
+	+
+		 0 (solved): margin-top
+	+
+		 0 : border-top-width
+	+
+		 0 : padding-top
+	+
+		 1in : height
+	+
+		 0 : padding-bottom
+	+
+		 0 : border-bottom-width
+	+
+		 0 (solved): margin-bottom
+	+
+		auto (to solve) : bottom
+	=============
+		3in  : height of containing block
+
+		So, bottom must use 2in in order to balance the equation
+
+
+            */
+        </style>
+    </head>
+    <body>
+        <p>Test passes if a blue rectangle is below an orange square.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-height-009-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-height-009-ref.xht
new file mode 100644
index 0000000..51ec44e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-height-009-ref.xht
@@ -0,0 +1,30 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div {margin-top: 41px;}
+
+  img
+  {
+  height: 100px;
+  width: 100px;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if the orange and blue squares have the <strong>same height</strong>.</p>
+
+  <div><img src="support/swatch-orange.png" alt="Image download support must be enabled" /><img src="support/blue15x15.png" alt="Image download support must be enabled" /></div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-height-009.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-height-009.xht
new file mode 100644
index 0000000..da74b1a
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-height-009.xht
@@ -0,0 +1,56 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned, non-replaced elements, height is based on the content</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-01 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-height" />
+		<link rel="match" href="absolute-non-replaced-height-009-ref.xht" />
+
+        <meta name="flags" content="ahem" />
+        <meta name="assert" content="The 'height' is based on the content height, 'auto' values for 'margin-top' and 'margin-bottom' are set to '0' when 'height' and 'bottom' are 'auto' and 'top' is not 'auto'." />
+        <style type="text/css">
+            #div1
+            {
+                position: relative;
+            }
+            div div
+            {
+                background: blue;
+                bottom: auto;
+                color: orange;
+                font: 100px/1 Ahem;
+                height: auto;
+                margin-bottom: auto;
+                margin-top: auto;
+                position: absolute;
+                top: 25px;
+                width: 200px;
+            }
+
+  <!--
+  "
+  height' and 'bottom' are 'auto' and 'top' is not 'auto',
+  then the height is based on the content per 10.6.7,
+  set 'auto' values for 'margin-top' and 'margin-bottom' to 0,
+  and solve for 'bottom'
+  "
+  http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-height
+
+  In this test,
+  top used value will be 25px
+  height used value will be 100px
+  vertical margins will be 0px
+  bottom used value will be -125px
+  because the computed height of containing block is 0px.
+  -->
+
+        </style>
+    </head>
+    <body>
+        <p>Test passes if the orange and blue squares have the <strong>same height</strong>.</p>
+        <div id="div1">
+            <div>X</div>
+        </div>
+    </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-height-010.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-height-010.xht
new file mode 100644
index 0000000..8751ecea
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-height-010.xht
@@ -0,0 +1,96 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned, non-replaced elements, 'margin-top' and 'margin-bottom' set to '0'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-08-31 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-height" />
+		<link rel="match" href="absolute-non-replaced-height-003-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'auto' values for 'margin-top' and 'margin-bottom' are set to '0', when 'top' is 'auto' and 'height' and 'bottom' are not 'auto'." />
+        <style type="text/css">
+            #div1
+            {
+                border: solid black;
+                height: 3in;
+                position: relative;
+                width: 3in;
+            }
+            div div
+            {
+                background: blue;
+                bottom: 1in;
+                height: 1in;
+                margin-bottom: auto;
+                margin-top: auto;
+                position: absolute;
+                top: auto;
+                width: 100%;
+            }
+
+            /*
+
+		 auto (to solve) : top
+	+
+		 auto (to solve): margin-top
+	+
+		 0 : border-top-width
+	+
+		 0 : padding-top
+	+
+		 1in : height
+	+
+		 0 : padding-bottom
+	+
+		 0 : border-bottom-width
+	+
+		 auto (to solve): margin-bottom
+	+
+		1in : bottom
+	=============
+		3in  : height of containing block
+
+
+	"
+	'top' is 'auto', 'height' and 'bottom' are not 'auto',
+	then set 'auto' values for 'margin-top' and 'margin-bottom' to 0,
+	and solve for 'top'
+	"
+
+	so this brings:
+
+		 auto (to solve) : top
+	+
+		 0 (set): margin-top
+	+
+		 0 : border-top-width
+	+
+		 0 : padding-top
+	+
+		 1in : height
+	+
+		 0 : padding-bottom
+	+
+		 0 : border-bottom-width
+	+
+		 0 (set): margin-bottom
+	+
+		1in : bottom
+	=============
+		3in  : height of containing block
+
+		So, top must use 1in in order to balance the equation
+
+
+            */
+
+        </style>
+    </head>
+    <body>
+        <p>Test passes if a blue rectangle is <strong>vertically centered</strong> in an hollow black square.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-height-011.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-height-011.xht
new file mode 100644
index 0000000..068e596
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-height-011.xht
@@ -0,0 +1,94 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned, non-replaced elements, 'height' based on 'top' and 'bottom' positions</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-08-31 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-height" />
+		<link rel="match" href="absolute-non-replaced-height-003-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'auto' values on 'margin-top', 'margin-bottom' are set to '0' and the 'height' is the remaining space between the 'top' and 'bottom' positions, when 'height' is 'auto' and 'top' and 'bottom' are both not 'auto'." />
+        <style type="text/css">
+            #div1
+            {
+                border: solid black;
+                height: 3in;
+                position: relative;
+                width: 3in;
+            }
+            div div
+            {
+                background: blue;
+                bottom: 1in;
+                height: auto;
+                margin-bottom: auto;
+                margin-top: auto;
+                position: absolute;
+                top: 1in;
+                width: 100%;
+            }
+
+            /*
+
+		 1in : top
+	+
+		 auto (to solve): margin-top
+	+
+		 0 : border-top-width
+	+
+		 0 : padding-top
+	+
+		 auto (to solve) : height
+	+
+		 0 : padding-bottom
+	+
+		 0 : border-bottom-width
+	+
+		 auto (to solve): margin-bottom
+	+
+		1in : bottom
+	=============
+		3in  : height of containing block
+
+
+	"
+	'height' is 'auto', 'top' and 'bottom' are not 'auto',
+	then 'auto' values for 'margin-top' and 'margin-bottom' are set to 0
+	and solve for 'height'
+	"
+
+	so this brings:
+
+		 1in : top
+	+
+		 0 (set): margin-top
+	+
+		 0 : border-top-width
+	+
+		 0 : padding-top
+	+
+		 auto (to solve) : height
+	+
+		 0 : padding-bottom
+	+
+		 0 : border-bottom-width
+	+
+		 0 (set): margin-bottom
+	+
+		1in : bottom
+	=============
+		3in  : height of containing block
+
+		So, height must use 1in in order to balance the equation
+
+            */
+        </style>
+    </head>
+    <body>
+        <p>Test passes if a blue rectangle is <strong>vertically centered</strong> in an hollow black square.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-height-012.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-height-012.xht
new file mode 100644
index 0000000..55a93823
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-height-012.xht
@@ -0,0 +1,49 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned, non-replaced elements, solve for 'bottom'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-08-31 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-height" />
+		<link rel="match" href="absolute-non-replaced-height-003-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="When 'margin-top' and 'margin-bottom' are set to '0' the 'bottom' value resolves to the remaining space within the containing block." />
+        <style type="text/css">
+            #div1
+            {
+                border: solid black;
+                height: 3in;
+                position: relative;
+                width: 3in;
+            }
+            div div
+            {
+                position: absolute;
+                top: 1in;
+                bottom: auto;
+                height: 1in;
+                margin-top: auto;
+                margin-bottom: auto;
+                background: blue;
+                width: 100%;
+            }
+
+            /*
+			"
+            'bottom' is 'auto', 'top' and 'height' are not 'auto',
+            then set 'auto' values for 'margin-top' and 'margin-bottom' to 0
+            and solve for 'bottom'
+			"
+
+			Therefore, bottom used value must be 1in
+            */
+        </style>
+    </head>
+    <body>
+        <p>Test passes if a blue rectangle is <strong>vertically centered</strong> in an hollow black square.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-max-height-001.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-max-height-001.xht
new file mode 100644
index 0000000..085b2b9
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-max-height-001.xht
@@ -0,0 +1,38 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Max-height on absolutely positioned, non-replaced elements, static position of fixed element</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-height" />
+        <meta name="flags" content="" />
+        <meta name="assert" content="The calculation of static position is based on initial containing block when there is a fixed positioned element." />
+        <style type="text/css">
+            html, body, p
+            {
+                margin: 0;
+                padding: 0;
+            }
+            #div1
+            {
+                border: solid black;
+                height: 2in;
+                position: absolute;
+                width: 2in;
+            }
+            div div
+            {
+                background: blue;
+                height: 1in;
+                max-height: 0.5in;
+                position: fixed;
+                width: 1in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes a blue rectangle is in the upper-left corner of a hollow black square.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-max-height-002-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-max-height-002-ref.xht
new file mode 100644
index 0000000..75b0e54
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-max-height-002-ref.xht
@@ -0,0 +1,31 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div
+  {
+  border: black solid medium;
+  height: 200px;
+  width: 200px;
+  }
+
+  img {padding-left: 100px;}
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if there is a blue rectangle in the <strong>upper-right corner</strong> of an hollow black square.</p>
+
+  <div><img src="support/blue15x15.png" width="100" height="50" alt="Image download support must be enabled" /></div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-max-height-002.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-max-height-002.xht
new file mode 100644
index 0000000..1ca12d8
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-max-height-002.xht
@@ -0,0 +1,41 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Max-height on absolutely positioned, non-replaced elements</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-08-29 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-height" />
+		<link rel="match" href="absolute-non-replaced-max-height-002-ref.xht" />
+
+        <meta name="flags" content="ahem" />
+        <meta name="assert" content="When 'top', 'height', and 'bottom' of an absolutely positioned element are 'auto', then set 'top' to the static position and make 'height' based on the content; such height may be constrained by a given 'max-height' value." />
+        <style type="text/css">
+            #div1
+            {
+                border: solid black;
+                height: 200px;
+                position: relative;
+                width: 200px;
+            }
+            div div
+            {
+                background: blue;
+                bottom: auto;
+                font: 100px/1 Ahem;
+                height: auto;
+                margin-bottom: auto;
+                margin-top: auto;
+                max-height: 50px;
+                position: absolute;
+                right: 0;
+                top: auto;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a blue rectangle in the <strong>upper-right corner</strong> of an hollow black square.</p>
+        <div id="div1">
+            <div>&nbsp;</div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-max-height-003-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-max-height-003-ref.xht
new file mode 100644
index 0000000..9dba17bd
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-max-height-003-ref.xht
@@ -0,0 +1,31 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div
+  {
+  border: black solid medium;
+  height: 288px;
+  width: 288px;
+  }
+
+  img {padding-top: 120px;}
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if a blue rectangle is <strong>vertically centered</strong> in an hollow black square.</p>
+
+  <div><img src="support/blue15x15.png" width="288" height="48" alt="Image download support must be enabled" /></div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-max-height-003.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-max-height-003.xht
new file mode 100644
index 0000000..028271a
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-max-height-003.xht
@@ -0,0 +1,40 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Max-height on absolutely positioned, non-replaced elements, vertical centering</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-08-31 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-height" />
+		<link rel="match" href="absolute-non-replaced-max-height-003-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="An absolutely positioned non-replaced element's padding box (which is the area painted by background-color of the element) will be vertically centered within its containing block only if both 'margin-top' and 'margin-bottom' have equal values and if 'top' and 'bottom' have equal values. An absolutely positioned non-replaced element's margin box will be vertically centered within its containing block only if 'top' and 'bottom' have equal values." />
+        <style type="text/css">
+            #div1
+            {
+                border: solid black;
+                height: 3in;
+                position: relative;
+                width: 3in;
+            }
+            div div
+            {
+                background: blue;
+                bottom: 0.5in;
+                height: 1in;
+                margin-bottom: auto;
+                margin-top: auto;
+                max-height: 0.5in;
+                position: absolute;
+                top: 0.5in;
+                width: 100%;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if a blue rectangle is <strong>vertically centered</strong> in an hollow black square.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-max-height-004.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-max-height-004.xht
new file mode 100644
index 0000000..37f0ecc
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-max-height-004.xht
@@ -0,0 +1,40 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Max-height on absolutely positioned, non-replaced elements, 'margin-top' set to 'auto'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-08-31 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-height" />
+		<link rel="match" href="absolute-non-replaced-height-003-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="When 'top', 'bottom' and 'height' are all are not 'auto', 'margin-top' is 'auto' and 'margin-bottom' is not 'auto'. Then 'margin-top' becomes the remainder of the height of the containing box." />
+        <style type="text/css">
+            #div1
+            {
+                border: solid black;
+                height: 3in;
+                position: relative;
+                width: 3in;
+            }
+            div div
+            {
+                background: blue;
+                bottom: 0.5in;
+                height: 2in;
+                margin-bottom: 0.5in;
+                margin-top: auto;
+                max-height: 1in;
+                position: absolute;
+                top: 0.5in;
+                width: 100%;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if a blue rectangle is <strong>vertically centered</strong> in an hollow black square.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-max-height-005.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-max-height-005.xht
new file mode 100644
index 0000000..97cf854
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-max-height-005.xht
@@ -0,0 +1,40 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Max-height on absolutely positioned, non-replaced elements, 'margin-bottom' set to 'auto'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-08-31 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-height" />
+		<link rel="match" href="absolute-non-replaced-height-003-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="When 'top', 'bottom' and 'height' are all are not 'auto', 'margin-top' is not 'auto' and 'margin-bottom' is 'auto'. Then 'margin-bottom' becomes the remainder of the height of the containing box." />
+        <style type="text/css">
+            #div1
+            {
+                border: solid black;
+                height: 3in;
+                position: relative;
+                width: 3in;
+            }
+            div div
+            {
+                background: blue;
+                bottom: 0.5in;
+                height: 2in;
+                margin-bottom: auto;
+                margin-top: 0.5in;
+                max-height: 1in;
+                position: absolute;
+                top: 0.5in;
+                width: 100%;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if a blue rectangle is <strong>vertically centered</strong> in an hollow black square.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-max-height-006.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-max-height-006.xht
new file mode 100644
index 0000000..e46cd146
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-max-height-006.xht
@@ -0,0 +1,40 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Max-height on absolutely positioned, non-replaced elements, over-constrained</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-08-31 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-height" />
+		<link rel="match" href="absolute-non-replaced-height-003-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'bottom' value is ignored and the equation solves for the bottom value, when the values for 'top', 'bottom', 'height', 'margin-top', 'margin-bottom' add up to more than the containing blocks height." />
+        <style type="text/css">
+            #div1
+            {
+                border: solid black;
+                height: 3in;
+                position: relative;
+                width: 3in;
+            }
+            div div
+            {
+                background: blue;
+                bottom: 0.5in;
+                height: 2in;
+                margin-bottom: 0.5in;
+                margin-top: 0.5in;
+                max-height: 1in;
+                position: absolute;
+                top: 0.5in;
+                width: 100%;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if a blue rectangle is <strong>vertically centered</strong> in an hollow black square.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-max-height-007-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-max-height-007-ref.xht
new file mode 100644
index 0000000..6b2f646
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-max-height-007-ref.xht
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div {margin-top: 66px;}
+
+  img {vertical-align: top;}
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if the blue and orange squares have the <strong>same height</strong>.</p>
+
+  <div><img src="support/blue15x15.png" width="50" height="50" alt="Image download support must be enabled" /><img src="support/swatch-orange.png" width="50" height="50" alt="Image download support must be enabled" /></div>
+
+ </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-max-height-007.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-max-height-007.xht
new file mode 100644
index 0000000..a5c12a046
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-max-height-007.xht
@@ -0,0 +1,49 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Max-height on absolutely positioned, non-replaced elements, shrink-to-fit solve for top</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-08-29 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-height" />
+		<link rel="match" href="absolute-non-replaced-max-height-007-ref.xht" />
+
+        <meta name="flags" content="ahem" />
+        <meta name="assert" content="The height is based on the overall height of the content, 'margin-top', 'auto' is set to '0' and solve for 'top', when 'top' and 'height' are both 'auto' and 'bottom' is not 'auto'." />
+        <style type="text/css">
+            #div1
+            {
+                font: 100px/1 Ahem;
+                height: 400px;
+                position: relative;
+                width: 100px;
+            }
+            #div2
+            {
+                background: orange;
+                height: 50px;
+                position: relative;
+                top: 50px;
+                width: 100px;
+            }
+            #div3
+            {
+                background: blue;
+                bottom: 300px;
+                height: auto;
+                margin-bottom: auto;
+                margin-top: auto;
+                max-height: 50px;
+                position: absolute;
+                top: auto;
+                width: 50px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if the blue and orange squares have the <strong>same height</strong>.</p>
+        <div id="div1">
+            <div id="div2"></div>
+            <div id="div3">&nbsp;</div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-max-height-008-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-max-height-008-ref.xht
new file mode 100644
index 0000000..4967af66
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-max-height-008-ref.xht
@@ -0,0 +1,24 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  img {vertical-align: top;}
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if there is a small orange rectangle and a bigger blue rectangle.</p>
+
+  <div><img src="support/swatch-orange.png" width="96" height="48" alt="Image download support must be enabled" /><br /><img src="support/blue15x15.png" width="96" height="240" alt="Image download support must be enabled" /></div>
+
+ </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-max-height-008.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-max-height-008.xht
new file mode 100644
index 0000000..0f44588
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-max-height-008.xht
@@ -0,0 +1,40 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Max-height on absolutely positioned, non-replaced elements, 'top' set to static position</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-08-29 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-height" />
+		<link rel="match" href="absolute-non-replaced-max-height-008-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="When 'top' is set to the static position and any 'auto' values for top and bottom margin are set to '0', when 'top' and 'bottom' are 'auto' and 'height' is not 'auto'." />
+        <style type="text/css">
+            #div1
+            {
+                background: blue;
+                height: 3in;
+                position: relative;
+                width: 1in;
+            }
+            div div
+            {
+                background: orange;
+                bottom: auto;
+                height: 1in;
+                margin-bottom: auto;
+                margin-top: auto;
+                max-height: 0.5in;
+                position: absolute;
+                top: auto;
+                width: 100%;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a small orange rectangle and a bigger blue rectangle.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-max-height-009-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-max-height-009-ref.xht
new file mode 100644
index 0000000..aea00aa
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-max-height-009-ref.xht
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div {margin-top: 41px;}
+
+  img {vertical-align: top;}
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if the orange and blue rectangles have the <strong>same height</strong>.</p>
+
+  <div><img src="support/swatch-orange.png" width="100" height="50" alt="Image download support must be enabled" /><img src="support/blue15x15.png" width="100" height="50" alt="Image download support must be enabled" /></div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-max-height-009.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-max-height-009.xht
new file mode 100644
index 0000000..ecab287
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-max-height-009.xht
@@ -0,0 +1,48 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Max-height on absolutely positioned, non-replaced elements, height is shrink-to-fit</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-08-31 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-height" />
+		<link rel="match" href="absolute-non-replaced-max-height-009-ref.xht" />
+
+        <meta name="flags" content="ahem" />
+        <meta name="assert" content="The 'height' is based on the content height, 'auto' values for 'margin-top' and 'margin-bottom' are set to '0' when 'height' and 'bottom' are 'auto' and 'top' is not 'auto'." />
+        <style type="text/css">
+            #div1
+            {
+                position: relative;
+            }
+            #div2
+            {
+                background: blue;
+                height: 50px;
+                left: 100px;
+                position: absolute;
+                top: 25px;
+                width: 100px;
+            }
+            #div3
+            {
+                background: orange;
+                bottom: auto;
+                font: 100px/1 Ahem;
+                height: auto;
+                margin-bottom: auto;
+                margin-top: auto;
+                max-height: 50px;
+                position: absolute;
+                top: 25px;
+                width: 100px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if the orange and blue rectangles have the <strong>same height</strong>.</p>
+        <div id="div1">
+            <div id="div2"></div>
+            <div id="div3">&nbsp;</div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-max-height-010.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-max-height-010.xht
new file mode 100644
index 0000000..201e3aa
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-max-height-010.xht
@@ -0,0 +1,95 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Max-height on absolutely positioned, non-replaced elements, 'margin-top' and 'margin-bottom' set to '0'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-08-31 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-height" />
+		<link rel="match" href="absolute-non-replaced-height-003-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="When 'top' and 'height' are 'auto' and 'bottom' is not 'auto', then the height is based on the content (and such height can be constrained by a max-height declaration) and then set 'auto' values for 'margin-top' and 'margin-bottom' to 0, and solve for 'top' " />
+        <style type="text/css">
+            #div1
+            {
+                border: solid black;
+                height: 3in;
+                position: relative;
+                width: 3in;
+            }
+            div div
+            {
+                background: blue;
+                bottom: 1in;
+                height: 2in;
+                margin-bottom: auto;
+                margin-top: auto;
+                max-height: 1in;
+                position: absolute;
+                top: auto;
+                width: 100%;
+            }
+
+            /*
+
+		 auto (to solve) : top
+	+
+		 auto (to solve): margin-top
+	+
+		 0 : border-top-width
+	+
+		 0 : padding-top
+	+
+		 2in : height (will be constrained to use 1in by max-height)
+	+
+		 0 : padding-bottom
+	+
+		 0 : border-bottom-width
+	+
+		 auto (to solve): margin-bottom
+	+
+		1in : bottom
+	=============
+		3in  : height of containing block
+
+
+	"
+	'top' is 'auto', 'height' and 'bottom' are not 'auto',
+	then set 'auto' values for 'margin-top' and 'margin-bottom' to 0,
+	and solve for 'top'
+	"
+
+	so this brings:
+
+		 auto (to solve) : top
+	+
+		 0 (set): margin-top
+	+
+		 0 : border-top-width
+	+
+		 0 : padding-top
+	+
+		 1in (constrained) : height
+	+
+		 0 : padding-bottom
+	+
+		 0 : border-bottom-width
+	+
+		 0 (set): margin-bottom
+	+
+		1in : bottom
+	=============
+		3in  : height of containing block
+
+		So, top must use 1in in order to balance the equation
+
+    */
+    </style>
+    </head>
+    <body>
+        <p>Test passes if a blue rectangle is <strong>vertically centered</strong> in an hollow black square.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-max-height-011.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-max-height-011.xht
new file mode 100644
index 0000000..13933c13
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-max-height-011.xht
@@ -0,0 +1,130 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Max-height on absolutely positioned, non-replaced elements, 'height' based on 'top' and 'bottom' positions</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-08-31 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-height" />
+		<link rel="match" href="absolute-non-replaced-max-height-003-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'auto' values on 'margin-top', 'margin-bottom' are set to '0' and the 'height' is the remaining space between the 'top' and 'bottom' positions, when 'height' is 'auto' and 'top' and 'bottom' are both not 'auto'. If such height is constrained by max-height, then we must re-process the values as following. If none of 'top', height, bottom are 'auto' and if both 'margin-top' and 'margin-bottom' are 'auto', solve the equation under the extra constraint that the two margins get equal values." />
+        <style type="text/css">
+            #div1
+            {
+                border: solid black;
+                height: 3in;
+                position: relative;
+                width: 3in;
+            }
+            div div
+            {
+                background: blue;
+                bottom: 1in;
+                height: auto;
+                margin-bottom: auto;
+                margin-top: auto;
+                max-height: 0.5in;
+                position: absolute;
+                top: 1in;
+                width: 100%;
+            }
+
+
+            /*
+
+		 1in : top
+	+
+		 auto (to solve): margin-top
+	+
+		 0 : border-top-width
+	+
+		 0 : padding-top
+	+
+		 auto (to solve) : height (may be constrained to use 0.5in by max-height)
+	+
+		 0 : padding-bottom
+	+
+		 0 : border-bottom-width
+	+
+		 auto (to solve): margin-bottom
+	+
+		1in : bottom
+	=============
+		3in  : height of containing block
+
+
+	"
+	'top' is 'auto', 'height' and 'bottom' are not 'auto',
+	then set 'auto' values for 'margin-top' and 'margin-bottom' to 0,
+	and solve for 'top'
+	"
+
+	so this brings:
+
+		 1in : top
+	+
+		 0 (set): margin-top
+	+
+		 0 : border-top-width
+	+
+		 0 : padding-top
+	+
+		 1in (not constrained) : height (must be constrained to use 0.5in by max-height)
+	+
+		 0 : padding-bottom
+	+
+		 0 : border-bottom-width
+	+
+		 0 (set): margin-bottom
+	+
+		1in : bottom
+	=============
+		3in  : height of containing block
+
+		So, here, we must reenter the algorithm since height is
+		constrained and is no longer 'auto'.
+
+		"
+		If none of the three [top, height, bottom] are 'auto':
+		If both 'margin-top' and 'margin-bottom' are 'auto',
+		solve the equation under the extra constraint that
+		the two margins get equal values.
+		"
+
+	so this brings:
+
+		 1in : top
+	+
+		 auto (to solve): margin-top
+	+
+		 0 : border-top-width
+	+
+		 0 : padding-top
+	+
+		 0.5in (constrained) : height (constrained by max-height)
+	+
+		 0 : padding-bottom
+	+
+		 0 : border-bottom-width
+	+
+		 auto (to solve): margin-bottom
+	+
+		1in : bottom
+	=============
+		3in  : height of containing block
+
+
+		So, here, margin-top must use 0.25in and margin-bottom must use 0.25in
+		so that the equation remains balanced.
+
+    */
+        </style>
+    </head>
+    <body>
+        <p>Test passes if a blue rectangle is <strong>vertically centered</strong> in an hollow black square.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-max-height-012.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-max-height-012.xht
new file mode 100644
index 0000000..62feb20
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-max-height-012.xht
@@ -0,0 +1,40 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Max-height on absolutely positioned, non-replaced elements, solve for 'bottom'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-08-31 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-height" />
+		<link rel="match" href="absolute-non-replaced-height-003-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="When 'margin-top' and 'margin-bottom' are set to '0' the 'bottom' value resolves to the remaining space within the containing block." />
+        <style type="text/css">
+            #div1
+            {
+                border: solid black;
+                height: 3in;
+                position: relative;
+                width: 3in;
+            }
+            div div
+            {
+                background: blue;
+                bottom: auto;
+                height: 2in;
+                margin-top: auto;
+                margin-bottom: auto;
+                max-height: 1in;
+                position: absolute;
+                top: 1in;
+                width: 100%;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if a blue rectangle is <strong>vertically centered</strong> in an hollow black square.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-001.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-001.xht
new file mode 100644
index 0000000..4397b0d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-001.xht
@@ -0,0 +1,39 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Solving for 'right' on absolutely positioned non-replaced elements</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-08-31 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" />
+        <link rel="match" href="absolute-non-replaced-height-002-ref.xht" />
+
+        <meta name="flags" content="ahem" />
+        <meta name="assert" content="When direction is left-to-right and 'left', 'width' and 'right' are 'auto', the width becomes shrink-to-fit and then solve for 'right'." />
+        <style type="text/css">
+            #div1
+            {
+                border: solid black;
+                direction: ltr;
+                height: 200px;
+                position: relative;
+                width: 200px;
+            }
+            div div
+            {
+                background: red;
+                color: blue;
+                font: 100px/1 Ahem;
+                left: auto;
+                position: absolute;
+                right: auto;
+                width: auto;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if a filled blue square is in the <strong>upper-left corner</strong> of an hollow black square and if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div>X</div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-002-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-002-ref.xht
new file mode 100644
index 0000000..e88ac8098
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-002-ref.xht
@@ -0,0 +1,30 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div
+  {
+  border: black solid medium;
+  height: 200px;
+  padding-left: 100px;
+  width: 100px;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if a filled blue square is in the <strong>upper-right corner</strong> of an hollow black square and if there is <strong>no red</strong>.</p>
+
+  <div><img src="support/blue15x15.png" width="100" height="100" alt="Image download support must be enabled" /></div>
+
+ </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-002.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-002.xht
new file mode 100644
index 0000000..cdd7903
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-002.xht
@@ -0,0 +1,39 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Solving for 'left' on absolutely positioned non-replaced elements</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-08-31 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" />
+		<link rel="match" href="absolute-non-replaced-width-002-ref.xht" />
+
+        <meta name="flags" content="ahem" />
+        <meta name="assert" content="When direction is right-to-left and 'left', 'width' and 'right' are 'auto', then set 'right' to the static position, then width becomes shrink-to-fit and then solve for 'left'." />
+        <style type="text/css">
+            #div1
+            {
+                border: solid black;
+                direction: rtl;
+                height: 200px;
+                position: relative;
+                width: 200px;
+            }
+            div div
+            {
+                background: red;
+                color: blue;
+                font: 100px/1em Ahem;
+                left: auto;
+                position: absolute;
+                right: auto;
+                width: auto;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if a filled blue square is in the <strong>upper-right corner</strong> of an hollow black square and if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div>X</div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-003-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-003-ref.xht
new file mode 100644
index 0000000..1424700b
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-003-ref.xht
@@ -0,0 +1,30 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div
+  {
+  border: black solid medium;
+  height: 200px;
+  padding-left: 300px;
+  width: 100px;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if a filled blue square is in the <strong>upper-right corner</strong> of an hollow black rectangle and if there is <strong>no red</strong>.</p>
+
+  <div><img src="support/blue15x15.png" width="100" height="100" alt="Image download support must be enabled" /></div>
+
+ </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-003.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-003.xht
new file mode 100644
index 0000000..e1714ca
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-003.xht
@@ -0,0 +1,63 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned non-replaced elements with 'margin-left' and 'margin-right' set to 'auto'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-08-31 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" />
+		<link rel="match" href="absolute-non-replaced-width-003-ref.xht" />
+
+        <meta name="flags" content="ahem" />
+        <meta name="assert" content="When 'left', 'width' and 'right' are not 'auto', set 'margin-left' and 'margin-right' to equal values." />
+        <style type="text/css">
+            #containingblock
+            {
+                border: solid black;
+                height: 200px;
+                position: relative;
+                width: 400px;
+            }
+            div div
+            {
+                /*
+                  left				:  100px
+                +
+                  margin-left		:  solve
+                +
+                  border-left-width :    0px
+                +
+                  padding-left		:    0px
+                +
+                  width				:  100px
+                +
+                  padding-right		:    0px
+                +
+                  border-right-width:    0px
+                +
+                  margin-right		:  solve
+                +
+                  right				: -200px
+                =============================
+          width of containing block :  400px
+
+                */
+
+                background: red;
+                color: blue;
+                font: 100px/1em Ahem;
+                left: 100px;
+                margin-left: auto; /* value is solved to 200px */
+                margin-right: auto; /* value is solved to 200px */
+                position: absolute;
+                right: -200px;
+                width: 100px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if a filled blue square is in the <strong>upper-right corner</strong> of an hollow black rectangle and if there is <strong>no red</strong>.</p>
+        <div id="containingblock">
+            <div>X</div>
+        </div>
+    </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-004.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-004.xht
new file mode 100644
index 0000000..50a0b43
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-004.xht
@@ -0,0 +1,64 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned non-replaced elements when both 'margin-left' and 'margin-right' are set to 'auto' and direction is left-to-right</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-08-31 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" />
+		<link rel="match" href="absolute-non-replaced-width-002-ref.xht" />
+
+        <meta name="flags" content="ahem" />
+        <meta name="assert" content="When direction is 'ltr' and 'left', 'width' and 'right' are not 'auto', solve for 'margin-right' and 'margin-left' to equal values. If this would make 'margin-left' and 'margin-right' negative, then set 'margin-left' to zero and solve for 'margin-right'." />
+        <style type="text/css">
+            #div1
+            {
+                border: solid black;
+                direction: ltr;
+                height: 200px;
+                position: relative;
+                width: 200px;
+            }
+            div div
+            {
+                background: red;
+                color: blue;
+                font: 100px/1em Ahem;
+                left: 100px;
+                margin-left: auto;
+                margin-right: auto;
+                position: absolute;
+                right: 100px;
+                width: 100px;
+            }
+            /*
+                left                    :   100px
+              + margin-left             :   solve (auto)
+              + border-left-width       :   0
+              + padding-left            :   0
+              + width                   :   100px
+              + padding-right           :   0
+              + border-right-width      :   0
+              + margin-right            :   solve (auto)
+              + right                   :   100px
+              ====================================
+              width of containing block :   200px
+
+            So, margin-left and margin-right would be each -50px at this point.
+
+            "...unless this would make them (the two margins) negative
+            in which case when direction of the containing block is
+            'ltr' ('rtl'), set 'margin-left' ('margin-right') to zero and
+            solve for 'margin-right' ('margin-left')."
+
+            So, under such extra constraint, 'margin-left' must become 0
+            and 'margin-right' must become -100px.
+            */
+        </style>
+    </head>
+    <body>
+        <p>Test passes if a filled blue square is in the <strong>upper-right corner</strong> of an hollow black square and if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div>X</div>
+        </div>
+    </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-005.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-005.xht
new file mode 100644
index 0000000..2a63a48
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-005.xht
@@ -0,0 +1,64 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned non-replaced elements when both 'margin-left' and 'margin-right' are set to 'auto' and direction is right-to-left</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-08-31 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" />
+        <link rel="match" href="absolute-non-replaced-height-002-ref.xht" />
+
+        <meta name="flags" content="ahem" />
+        <meta name="assert" content="When direction is 'rtl' and 'left', 'width' and 'right' are not 'auto', solve for 'margin-right' and 'margin-left' to equal values. If this would make 'margin-left' and 'margin-right' negative, then set 'margin-right' to zero and solve for 'margin-left'." />
+        <style type="text/css">
+            #div1
+            {
+                border: solid black;
+                direction: rtl;
+                height: 200px;
+                position: relative;
+                width: 200px;
+            }
+            div div
+            {
+                background: red;
+                color: blue;
+                font: 100px/1em Ahem;
+                left: 100px;
+                margin-left: auto;
+                margin-right: auto;
+                position: absolute;
+                right: 100px;
+                width: 100px;
+            }
+            /*
+                left                    :   100px
+              + margin-left             :   solve (auto)
+              + border-left-width       :   0
+              + padding-left            :   0
+              + width                   :   100px
+              + padding-right           :   0
+              + border-right-width      :   0
+              + margin-right            :   solve (auto)
+              + right                   :   100px
+              ====================================
+              width of containing block :   200px
+
+            So, margin-left and margin-right would be each -50px at this point.
+
+            "...unless this would make them (the two margins) negative
+            in which case when direction of the containing block is
+            'ltr' ('rtl'), set 'margin-left' ('margin-right') to zero and
+            solve for 'margin-right' ('margin-left')."
+
+            So, under such extra constraint, 'margin-right' must become 0
+            and 'margin-left' must become -100px.
+            */
+        </style>
+    </head>
+    <body>
+        <p>Test passes if a filled blue square is in the <strong>upper-left corner</strong> of an hollow black square and if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div>X</div>
+        </div>
+    </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-006.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-006.xht
new file mode 100644
index 0000000..72b097f4
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-006.xht
@@ -0,0 +1,41 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned non-replaced element when only 'margin-right' is 'auto' and direction is left-to-right</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-08-31 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" />
+		<link rel="match" href="absolute-non-replaced-width-002-ref.xht" />
+
+        <meta name="flags" content="ahem" />
+        <meta name="assert" content="When direction is left-to-right and 'left', 'width', 'margin-left' and 'right' are not 'auto', solve for 'margin-right'." />
+        <style type="text/css">
+            #div1
+            {
+                border: solid black;
+                direction: ltr;
+                height: 200px;
+                position: relative;
+                width: 200px;
+            }
+            div div
+            {
+                background: red;
+                color: blue;
+                font: 100px/1 Ahem;
+                left: 50px;
+                margin-left: 50px;
+                margin-right: auto;
+                position: absolute;
+                right: 100px;
+                width: 100px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if a filled blue square is in the <strong>upper-right corner</strong> of an hollow black square and if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div>X</div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-007.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-007.xht
new file mode 100644
index 0000000..dfa7d4e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-007.xht
@@ -0,0 +1,41 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned non-replaced element when only 'margin-left' is 'auto' and direction is right-to-left</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-06-26 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" />
+        <link rel="match" href="absolute-non-replaced-height-002-ref.xht" />
+
+        <meta name="flags" content="ahem" />
+        <meta name="assert" content="When direction is right-to-left and 'left', 'width', 'margin-right' and 'right' are not 'auto', solve for 'margin-left'." />
+        <style type="text/css">
+            #div1
+            {
+                border: solid black;
+                direction: rtl;
+                height: 200px;
+                position: relative;
+                width: 200px;
+            }
+            div div
+            {
+                background: red;
+                color: blue;
+                font: 100px/1 Ahem;
+                left: 100px;
+                margin-left: auto;
+                margin-right: 50px;
+                position: absolute;
+                right: 50px;
+                width: 100px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if a filled blue square is in the <strong>upper-left corner</strong> of an hollow black square and if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div>X</div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-008-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-008-ref.xht
new file mode 100644
index 0000000..28706dd
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-008-ref.xht
@@ -0,0 +1,29 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div
+  {
+  border: black solid medium;
+  height: 200px;
+  width: 300px;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if a filled blue square is in the <strong>upper-left corner</strong> of an hollow black rectangle and if there is <strong>no red</strong>.</p>
+
+  <div><img src="support/blue15x15.png" width="100" height="100" alt="Image download support must be enabled" /></div>
+
+ </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-008.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-008.xht
new file mode 100644
index 0000000..705356b
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-008.xht
@@ -0,0 +1,43 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned non-replaced elements with left, width, right and margin-right not auto</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-08-31 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" />
+		<link rel="match" href="absolute-non-replaced-width-008-ref.xht" />
+
+        <meta name="flags" content="ahem" />
+        <meta name="assert" content="If 'left', 'width', 'right' and 'margin-right' are all not 'auto' and 'margin-left' is 'auto', then solve the equation for 'margin-left'." />
+        <style type="text/css">
+            #containingblock
+            {
+                border: solid black;
+                direction: ltr;
+                height: 200px;
+                position: relative;
+                width: 300px;
+            }
+            div div
+            {
+                /* left + margin-left + border-left-width + padding-left + width + padding-right + border-right-width + margin-right + right = width of containing block */
+                /* 100px  + solve       + 0                 + 0            + 100px   + 0             + 0                  + 100px          + 100px = 300px */
+                background: red;
+                color: blue;
+                font: 100px/1 Ahem;
+                left: 100px;
+                margin-left: auto; /* value is solved to -100px */
+                margin-right: 100px;
+                position: absolute;
+                right: 100px;
+                width: 100px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if a filled blue square is in the <strong>upper-left corner</strong> of an hollow black rectangle and if there is <strong>no red</strong>.</p>
+        <div id="containingblock">
+            <div>X</div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-009.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-009.xht
new file mode 100644
index 0000000..a550f989
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-009.xht
@@ -0,0 +1,41 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned non-replaced elements with left, width, right and margin-left not auto</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-08-31 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" />
+        <meta name="flags" content="ahem" />
+        <meta name="assert" content="If 'left', 'width', 'right' and 'margin-left' are all not 'auto' and 'margin-right' is 'auto', then solve the equation for 'margin-right'." />
+        <style type="text/css">
+            #containingblock
+            {
+                border: solid black;
+                direction: rtl;
+                height: 200px;
+                position: relative;
+                width: 300px;
+            }
+            div div
+            {
+                /* left + margin-left + border-left-width + padding-left + width + padding-right + border-right-width + margin-right + right = width of containing block */
+                /* 100px  + 100px         + 0                 + 0            + 100px   + 0             + 0                  + solve        + 100px = 300px */
+                background: red;
+                color: blue;
+                font: 100px/1 Ahem;
+                left: 100px;
+                margin-left: 100px;
+                margin-right: auto; /* value is solved to -100px */
+                position: absolute;
+                right: 100px;
+                width: 100px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if a filled blue square is in the <strong>upper-right corner</strong> of the black rectangle and there is <strong>no red</strong>.</p>
+        <div id="containingblock">
+            <div>X</div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-010.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-010.xht
new file mode 100644
index 0000000..475d88b
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-010.xht
@@ -0,0 +1,40 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Solved for 'left' when absolutely positioned non-replaced elements has 'left' and 'width' as 'auto'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-08-31 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" />
+        <link rel="match" href="absolute-non-replaced-height-002-ref.xht" />
+
+        <meta name="flags" content="ahem" />
+        <meta name="assert" content="When 'left' and 'width' are 'auto' and 'right' is not 'auto', then the width is shrink-to-fit and then solve for 'left'." />
+        <style type="text/css">
+            #div1
+            {
+                border: solid black;
+                height: 200px;
+                position: relative;
+                width: 200px;
+            }
+            div div
+            {
+                background: red;
+                color: blue;
+                font: 100px/1 Ahem;
+                left: auto;
+                margin-left: auto;
+                margin-right: auto;
+                position: absolute;
+                right: 100px;
+                width: auto;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if a filled blue square is in the <strong>upper-left corner</strong> of an hollow black square and if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div>X</div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-011.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-011.xht
new file mode 100644
index 0000000..2b9e509
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-011.xht
@@ -0,0 +1,41 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned non-replaced elements when 'left' and 'right' are 'auto', 'width' is not 'auto' and 'direction' is left-to-right</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-08-31 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" />
+        <link rel="match" href="absolute-non-replaced-height-002-ref.xht" />
+
+        <meta name="flags" content="ahem" />
+        <meta name="assert" content="When 'direction' is left-to-right and 'left' and 'right' are 'auto' and 'width' is not 'auto', solve for 'right'." />
+        <style type="text/css">
+            #div1
+            {
+                border: solid black;
+                direction: ltr;
+                height: 200px;
+                position: relative;
+                width: 200px;
+            }
+            div div
+            {
+                background: red;
+                color: blue;
+                font: 100px/1 Ahem;
+                left: auto;
+                margin-left: auto;
+                margin-right: auto;
+                position: absolute;
+                right: auto;
+                width: 100px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if a filled blue square is in the <strong>upper-left corner</strong> of an hollow black square and if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div>X</div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-012.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-012.xht
new file mode 100644
index 0000000..18381d0
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-012.xht
@@ -0,0 +1,41 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned non-replaced elements when 'left' and 'right' are 'auto', 'width' is not 'auto' and 'direction' is right-to-left</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-08-31 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" />
+		<link rel="match" href="absolute-non-replaced-width-002-ref.xht" />
+
+        <meta name="flags" content="ahem" />
+        <meta name="assert" content="When 'direction' is right-to-left and 'left' and 'right' are 'auto' and 'width' is not 'auto', solve for 'left'." />
+        <style type="text/css">
+            #div1
+            {
+                border: solid black;
+                direction: rtl;
+                height: 200px;
+                position: relative;
+                width: 200px;
+            }
+            div div
+            {
+                background: red;
+                color: blue;
+                font: 100px/1 Ahem;
+                left: auto;
+                margin-left: auto;
+                margin-right: auto;
+                position: absolute;
+                right: auto;
+                width: 100px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if a filled blue square is in the <strong>upper-right corner</strong> of an hollow black square and if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div>X</div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-013.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-013.xht
new file mode 100644
index 0000000..7b822a7
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-013.xht
@@ -0,0 +1,40 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Solved for 'right' when absolutely positioned non-replaced elements has 'right' and 'width' as 'auto'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-08-31 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" />
+		<link rel="match" href="absolute-non-replaced-width-002-ref.xht" />
+
+        <meta name="flags" content="ahem" />
+        <meta name="assert" content="When 'right' and 'width' are 'auto' and 'left' is not 'auto', then the width is shrink-to-fit and then solve for 'right'." />
+        <style type="text/css">
+            #div1
+            {
+                border: solid black;
+                height: 200px;
+                position: relative;
+                width: 200px;
+            }
+            div div
+            {
+                background: red;
+                color: blue;
+                font: 100px/1 Ahem;
+                left: 100px;
+                margin-left: auto;
+                margin-right: auto;
+                position: absolute;
+                right: auto;
+                width: auto;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if a filled blue square is in the <strong>upper-right corner</strong> of an hollow black square and if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div>X</div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-014.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-014.xht
new file mode 100644
index 0000000..d8359438
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-014.xht
@@ -0,0 +1,40 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Solved for 'left' when absolutely positioned non-replaced elements has 'right' and 'width' not set to 'auto'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-08-31 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" />
+        <link rel="match" href="absolute-non-replaced-height-002-ref.xht" />
+
+        <meta name="flags" content="ahem" />
+        <meta name="assert" content="When 'left' is 'auto' and 'width' and 'right' are not 'auto', then solve for 'left'." />
+        <style type="text/css">
+            #div1
+            {
+                border: solid black;
+                height: 200px;
+                position: relative;
+                width: 200px;
+            }
+            div div
+            {
+                background: red;
+                color: blue;
+                font: 100px/1em Ahem;
+                left: auto;
+                margin-left: auto;
+                margin-right: auto;
+                position: absolute;
+                right: 100px;
+                width: 100px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if a filled blue square is in the <strong>upper-left corner</strong> of an hollow black square and if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div>X</div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-015-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-015-ref.xht
new file mode 100644
index 0000000..955623d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-015-ref.xht
@@ -0,0 +1,30 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div
+  {
+  border: black solid medium;
+  height: 200px;
+  text-align: center;
+  width: 300px;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if a filled blue square is <strong>horizontally centered</strong> inside an hollow black rectangle and if there is <strong>no red</strong>.</p>
+
+  <div><img src="support/blue15x15.png" width="100" height="100" alt="Image download support must be enabled" /></div>
+
+ </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-015.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-015.xht
new file mode 100644
index 0000000..a65ff31c8
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-015.xht
@@ -0,0 +1,39 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Solved for 'width' when absolutely positioned non-replaced elements has 'left' and 'right' not set to 'auto'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-08-31 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" />
+		<link rel="match" href="absolute-non-replaced-width-015-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="When 'width' is 'auto' and 'left' and 'right' are not 'auto' element solves for 'width'." />
+        <style type="text/css">
+            #div1
+            {
+                border: solid black;
+                height: 200px;
+                position: relative;
+                width: 300px;
+            }
+            div div
+            {
+                background: blue;
+                left: 100px;
+                height: 100px;
+                margin-left: auto;
+                margin-right: auto;
+                position: absolute;
+                right: 100px;
+                width: auto;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if a filled blue square is <strong>horizontally centered</strong> inside an hollow black rectangle and if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-016.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-016.xht
new file mode 100644
index 0000000..5f28efc5
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-016.xht
@@ -0,0 +1,40 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Solved for 'right' when absolutely positioned non-replaced elements has 'left' and 'width' not set to 'auto'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-08-31 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" />
+		<link rel="match" href="absolute-non-replaced-width-002-ref.xht" />
+
+		<meta name="flags" content="ahem" />
+        <meta name="assert" content="When 'right' is 'auto' and 'width' and 'left' are not 'auto', then solve for 'right'." />
+        <style type="text/css">
+            #div1
+            {
+                border: solid black;
+                height: 200px;
+                position: relative;
+                width: 200px;
+            }
+            div div
+            {
+                background: red;
+                color: blue;
+                font: 100px/1em Ahem;
+                left: 100px;
+                margin-left: auto;
+                margin-right: auto;
+                position: absolute;
+                right: auto;
+                width: 100px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if a filled blue square is in the <strong>upper-right corner</strong> of an hollow black square and if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div>X</div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-017-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-017-ref.xht
new file mode 100644
index 0000000..6acb98d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-017-ref.xht
@@ -0,0 +1,41 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+  <link rel="author" title="Daniel Schattenkirchner" href="mailto:crazy-daniel@gmx.de" />
+
+  <style type="text/css"><![CDATA[
+  div.green-45x120
+  {
+  background-color: green;
+  height: 45px;
+  width: 120px;
+  }
+
+  div#black-stripe
+  {
+  background-color: black;
+  height: 30px;
+  width: 240px;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Below there should be a green square. In the middle of such green square, a black horizontal stripe should be traversing it and protruding out of it toward the right. There should be no red in this page.</p>
+
+  <div class="green-45x120"></div>
+
+  <div id="black-stripe"></div>
+
+  <div class="green-45x120"></div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-017.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-017.xht
new file mode 100644
index 0000000..7eb442d6
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-017.xht
@@ -0,0 +1,56 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Test: 'shrink-to-fit' width of absolutely positioned, non-replaced elements - direction (left-to-right), inline-block and max-width</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+  <link rel="author" title="Daniel Schattenkirchner" href="mailto:crazy-daniel@gmx.de" />
+  <link rel="help" title="Section 10.3.7 Absolutely positioned, non-replaced elements" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" />
+  <link rel="help" title="Section 10.3.9 Width of 'inline-block', non-replaced elements in normal flow" href="http://www.w3.org/TR/CSS21/visudet.html#inlineblock-width" />
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#min-max-widths" />
+  <link rel="match" href="absolute-non-replaced-width-017-ref.xht" />
+  <meta content="When direction is left-to-right and 'left' is set to static position and 'width' and 'right' are 'auto', then the used value of 'width' is given by 'shrink-to-fit' width calculation. If 'width' of an inline-block, non-replaced element in normal flow computes to 'auto', then the used value of 'width' is also given by 'shrink-to-fit' width calculation. If 'width' of an inline-block, non-replaced element in normal flow is given by 'shrink-to-fit' width calculation, then such calculated width can be furthermore constrained, reduced by a max-width declaration. If width of an absolutely positioned, non-replaced element resorts to 'shrink-to-fit' width calculation but its own child uses a constrained length resulting from a max-width declaration, then such constrained length will define the preferred width in 'shrink-to-fit' width calculation." name="assert" />
+  <meta content="ahem" name="flags" />
+
+  <style type="text/css"><![CDATA[
+  body
+  {
+  direction: ltr;
+  margin: 8px;
+  }
+
+  div
+  {
+  background-color: red;
+  font: 30px/4 Ahem;
+  left: auto;
+  /*
+  left is set to static position: it should be 8px from
+  the left-hand side of document box (at body's margin-left)
+  */
+  position: absolute;
+  right: auto;
+  width: auto;
+  }
+
+  span
+  {
+  background-color: green;
+  display: inline-block;
+  max-width: 4em;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Below there should be a green square. In the middle of such green square, a black horizontal stripe should be traversing it and protruding out of it toward the right. There should be no red in this page.</p>
+
+  <div><span>12345678</span></div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-018.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-018.xht
new file mode 100644
index 0000000..b91777a
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-018.xht
@@ -0,0 +1,58 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Test: 'shrink-to-fit' width of absolutely positioned, non-replaced elements - direction (left-to-right), inline-block and max-width</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+  <link rel="author" title="Daniel Schattenkirchner" href="mailto:crazy-daniel@gmx.de" />
+  <link rel="help" title="Section 10.3.7 Absolutely positioned, non-replaced elements" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" />
+  <link rel="help" title="Section 10.3.9 Width of 'inline-block', non-replaced elements in normal flow" href="http://www.w3.org/TR/CSS21/visudet.html#inlineblock-width" />
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#min-max-widths" />
+  <link rel="match" href="absolute-non-replaced-width-017-ref.xht" />
+  <meta content="When direction is left-to-right and 'left' is set to static position and 'width' and 'right' are 'auto', then the used value of 'width' is given by 'shrink-to-fit' width calculation. If 'width' of an inline-block, non-replaced element in normal flow computes to 'auto', then the used value of 'width' is also given by 'shrink-to-fit' width calculation. If 'width' of an inline-block, non-replaced element in normal flow is given by 'shrink-to-fit' width calculation, then such calculated width can be furthermore constrained, reduced by a max-width declaration. If width of an absolutely positioned, non-replaced element resorts to shrink-to-fit width calculation but its own child uses a constrained length resulting from a max-width declaration, then such constrained length will define the preferred width in 'shrink-to-fit' width calculation." name="assert" />
+  <meta content="ahem" name="flags" />
+
+  <style type="text/css"><![CDATA[
+  body
+  {
+  direction: ltr;
+  margin: 8px;
+  }
+
+  div#outer-abs-pos
+  {
+  background-color: red;
+  font: 30px/4 Ahem;
+  left: auto;
+  /*
+  left is set to static position: it should be 8px from
+  the left-hand side of document box (at body's margin-left)
+  */
+  position: absolute;
+  right: auto;
+  width: auto;
+  }
+
+  div#inner-inline-block
+  {
+  background-color: green;
+  display: inline-block;
+  max-width: 4em;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Below there should be a green square. In the middle of such green square, a black horizontal stripe should be traversing it and protruding out of it toward the right. There should be no red in this page.</p>
+
+  <div id="outer-abs-pos">
+    <div id="inner-inline-block">12345678</div>
+  </div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-019.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-019.xht
new file mode 100644
index 0000000..5f99a8f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-019.xht
@@ -0,0 +1,58 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Test: 'shrink-to-fit' width of absolutely positioned, non-replaced elements - direction (left-to-right), float and max-width</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+  <link rel="author" title="Daniel Schattenkirchner" href="mailto:crazy-daniel@gmx.de" />
+  <link rel="help" title="Section 10.3.7 Absolutely positioned, non-replaced elements" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" />
+  <link rel="help" title="Section 10.3.5 Width of floating, non-replaced elements" href="http://www.w3.org/TR/CSS21/visudet.html#float-width" />
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#min-max-widths" />
+  <link rel="match" href="absolute-non-replaced-width-017-ref.xht" />
+  <meta content="When direction is left-to-right and 'left' is set to static position and 'width' and 'right' are 'auto', then the used value of 'width' is given by 'shrink-to-fit' width calculation. If 'width' of an floating, non-replaced element in normal flow computes to 'auto', then the used value of 'width' is also given by 'shrink-to-fit' width calculation. If 'width' of a floating, non-replaced element in normal flow is given by 'shrink-to-fit' width calculation, then such calculated width can be furthermore constrained, reduced by a max-width declaration. If width of an absolutely positioned, non-replaced element resorts to 'shrink-to-fit' width calculation but its own child uses a constrained length resulting from a max-width declaration, then such constrained length will define the preferred width in 'shrink-to-fit' width calculation." name="assert" />
+  <meta content="ahem" name="flags" />
+
+  <style type="text/css"><![CDATA[
+  body
+  {
+  direction: ltr;
+  margin: 8px;
+  }
+
+  div#outer-abs-pos
+  {
+  background-color: red;
+  font: 30px/4 Ahem;
+  left: auto;
+  /*
+  left is set to static position: it should be 8px from
+  the left-hand side of document box (at body's margin-left)
+  */
+  position: absolute;
+  right: auto;
+  width: auto;
+  }
+
+  div#inner-floated
+  {
+  background-color: green;
+  float: left;
+  max-width: 4em;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Below there should be a green square. In the middle of such green square, a black horizontal stripe should be traversing it and protruding out of it toward the right. There should be no red in this page.</p>
+
+  <div id="outer-abs-pos">
+    <div id="inner-floated">12345678</div>
+  </div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-020.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-020.xht
new file mode 100644
index 0000000..badbfd2
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-020.xht
@@ -0,0 +1,56 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Test: 'shrink-to-fit' width of absolutely positioned, non-replaced elements - direction (left-to-right), float and max-width</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+  <link rel="author" title="Daniel Schattenkirchner" href="mailto:crazy-daniel@gmx.de" />
+  <link rel="help" title="Section 10.3.7 Absolutely positioned, non-replaced elements" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" />
+  <link rel="help" title="Section 10.3.5 Width of floating, non-replaced elements" href="http://www.w3.org/TR/CSS21/visudet.html#float-width" />
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#min-max-widths" />
+  <link rel="match" href="absolute-non-replaced-width-017-ref.xht" />
+  <meta content="When direction is left-to-right and 'left' is set to static position and 'width' and 'right' are 'auto', then the used value of 'width' is given by 'shrink-to-fit' width calculation. If 'width' of an floating, non-replaced element in normal flow computes to 'auto', then the used value of 'width' is also given by 'shrink-to-fit' width calculation. If 'width' of a floating, non-replaced element in normal flow is given by 'shrink-to-fit' width calculation, then such calculated width can be furthermore constrained, reduced by a max-width declaration. If width of an absolutely positioned, non-replaced element resorts to 'shrink-to-fit' width calculation but its own child uses a constrained length resulting from a max-width declaration, then such constrained length will define the preferred width in 'shrink-to-fit' width calculation." name="assert" />
+  <meta content="ahem" name="flags" />
+
+  <style type="text/css"><![CDATA[
+  body
+  {
+  direction: ltr;
+  margin: 8px;
+  }
+
+  div
+  {
+  background-color: red;
+  font: 30px/4 Ahem;
+  left: auto;
+  /*
+  left is set to static position: it should be 8px from
+  the left-hand side of document box (at body's margin-left)
+  */
+  position: absolute;
+  right: auto;
+  width: auto;
+  }
+
+  span
+  {
+  background-color: green;
+  float: left;
+  max-width: 4em;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Below there should be a green square. In the middle of such green square, a black horizontal stripe should be traversing it and protruding out of it toward the right. There should be no red in this page.</p>
+
+  <div><span>12345678</span></div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-021-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-021-ref.xht
new file mode 100644
index 0000000..f178a16
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-021-ref.xht
@@ -0,0 +1,43 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+  <link rel="author" title="Daniel Schattenkirchner" href="mailto:crazy-daniel@gmx.de" />
+
+  <style type="text/css"><![CDATA[
+  div.green-45x120
+  {
+  background-color: green;
+  height: 45px;
+  margin-left: auto;
+  width: 120px;
+  }
+
+  div#black-stripe
+  {
+  background-color: black;
+  height: 30px;
+  margin-left: auto;
+  width: 240px;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Below, on the right edge of the page, there should be a green square. In the middle of such green square, a black horizontal stripe should be traversing it and protruding out of it toward the left. There should be no red in this page.</p>
+
+  <div class="green-45x120"></div>
+
+  <div id="black-stripe"></div>
+
+  <div class="green-45x120"></div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-021.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-021.xht
new file mode 100644
index 0000000..7f08c33
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-021.xht
@@ -0,0 +1,58 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Test: 'shrink-to-fit' width of absolutely positioned, non-replaced elements - direction (right-to-left), inline-block and max-width</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+  <link rel="author" title="Daniel Schattenkirchner" href="mailto:crazy-daniel@gmx.de" />
+  <link rel="help" title="Section 10.3.7 Absolutely positioned, non-replaced elements" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" />
+  <link rel="help" title="Section 10.3.9 Width of 'inline-block', non-replaced elements in normal flow" href="http://www.w3.org/TR/CSS21/visudet.html#inlineblock-width" />
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#min-max-widths" />
+  <link rel="match" href="absolute-non-replaced-width-021-ref.xht" />
+  <meta content="When direction is right-to-left and 'right' is set to static position and 'width' and 'left' are 'auto', then the used value of 'width' is given by 'shrink-to-fit' width calculation. If 'width' of an inline-block, non-replaced element in normal flow computes to 'auto', then the used value of 'width' is also given by 'shrink-to-fit' width calculation. If 'width' of an inline-block, non-replaced element in normal flow is given by 'shrink-to-fit' width calculation, then such calculated width can be furthermore constrained, reduced by a max-width declaration. If width of an absolutely positioned, non-replaced element resorts to 'shrink-to-fit' width calculation but its own child uses a constrained length resulting from a max-width declaration, then such constrained length will define the preferred width in 'shrink-to-fit' width calculation." name="assert" />
+  <meta content="ahem" name="flags" />
+
+  <style type="text/css"><![CDATA[
+  body
+  {
+  direction: rtl;
+  margin: 8px;
+  }
+
+  p {direction: ltr;}
+
+  div
+  {
+  background-color: red;
+  font: 30px/4 Ahem;
+  left: auto;
+  position: absolute;
+  right: auto;
+  /*
+  right is set to static position: it should be 8px from
+  the right-hand side of document box (at body's margin-right)
+  */
+  width: auto;
+  }
+
+  span
+  {
+  background-color: green;
+  display: inline-block;
+  max-width: 4em;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Below, on the right edge of the page, there should be a green square. In the middle of such green square, a black horizontal stripe should be traversing it and protruding out of it toward the left. There should be no red in this page.</p>
+
+  <div><span>12345678</span></div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-022.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-022.xht
new file mode 100644
index 0000000..5001fa4
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-022.xht
@@ -0,0 +1,60 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Test: 'shrink-to-fit' width of absolutely positioned, non-replaced elements - direction (right-to-left), inline-block and max-width</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+  <link rel="author" title="Daniel Schattenkirchner" href="mailto:crazy-daniel@gmx.de" />
+  <link rel="help" title="Section 10.3.7 Absolutely positioned, non-replaced elements" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" />
+  <link rel="help" title="Section 10.3.9 Width of 'inline-block', non-replaced elements in normal flow" href="http://www.w3.org/TR/CSS21/visudet.html#inlineblock-width" />
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#min-max-widths" />
+  <link rel="match" href="absolute-non-replaced-width-021-ref.xht" />
+  <meta content="When direction is right-to-left and 'right' is set to static position and 'width' and 'left' are 'auto', then the used value of 'width' is given by 'shrink-to-fit' width calculation. If 'width' of an inline-block, non-replaced element in normal flow computes to 'auto', then the used value of 'width' is also given by 'shrink-to-fit' width calculation. If 'width' of an inline-block, non-replaced element in normal flow is given by 'shrink-to-fit' width calculation, then such calculated width can be furthermore constrained, reduced by a max-width declaration. If width of an absolutely positioned, non-replaced element resorts to 'shrink-to-fit' width calculation but its own child uses a constrained length resulting from a max-width declaration, then such constrained length will define the preferred width in 'shrink-to-fit' width calculation." name="assert" />
+  <meta content="ahem" name="flags" />
+
+  <style type="text/css"><![CDATA[
+  body
+  {
+  direction: rtl;
+  margin: 8px;
+  }
+
+  p {direction: ltr;}
+
+  div#outer-abs-pos
+  {
+  background-color: red;
+  font: 30px/4 Ahem;
+  left: auto;
+  position: absolute;
+  right: auto;
+  /*
+  right is set to static position: it should be 8px from
+  the right-hand side of document box (at body's margin-right)
+  */
+  width: auto;
+  }
+
+  div#inner-inline-block
+  {
+  background-color: green;
+  display: inline-block;
+  max-width: 4em;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Below, on the right edge of the page, there should be a green square. In the middle of such green square, a black horizontal stripe should be traversing it and protruding out of it toward the left. There should be no red in this page.</p>
+
+  <div id="outer-abs-pos">
+    <div id="inner-inline-block">12345678</div>
+  </div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-023.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-023.xht
new file mode 100644
index 0000000..d7f0381
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-023.xht
@@ -0,0 +1,60 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Test: 'shrink-to-fit' width of absolutely positioned, non-replaced elements - direction (right-to-left), float and max-width</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+  <link rel="author" title="Daniel Schattenkirchner" href="mailto:crazy-daniel@gmx.de" />
+  <link rel="help" title="Section 10.3.7 Absolutely positioned, non-replaced elements" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" />
+  <link rel="help" title="Section 10.3.5 Width of floating, non-replaced elements" href="http://www.w3.org/TR/CSS21/visudet.html#float-width" />
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#min-max-widths" />
+  <link rel="match" href="absolute-non-replaced-width-021-ref.xht" />
+  <meta content="When direction is right-to-left and 'right' is set to static position and 'width' and 'left' are 'auto', then the used value of 'width' is given by 'shrink-to-fit' width calculation. If 'width' of an floating, non-replaced element in normal flow computes to 'auto', then the used value of 'width' is also given by 'shrink-to-fit' width calculation. If 'width' of a floating, non-replaced element in normal flow is given by 'shrink-to-fit' width calculation, then such calculated width can be furthermore constrained, reduced by a max-width declaration. If width of an absolutely positioned, non-replaced element resorts to 'shrink-to-fit' width calculation but its own child uses a constrained length resulting from a max-width declaration, then such constrained length will define the preferred width in 'shrink-to-fit' width calculation." name="assert" />
+  <meta content="ahem" name="flags" />
+
+  <style type="text/css"><![CDATA[
+  body
+  {
+  direction: rtl;
+  margin: 8px;
+  }
+
+  p {direction: ltr;}
+
+  div#outer-abs-pos
+  {
+  background-color: red;
+  font: 30px/4 Ahem;
+  left: auto;
+  position: absolute;
+  right: auto;
+  /*
+  right is set to static position: it should be 8px from
+  the right-hand side of document box (at body's margin-right)
+  */
+  width: auto;
+  }
+
+  div#inner-floated
+  {
+  background-color: green;
+  float: left;
+  max-width: 4em;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Below, on the right edge of the page, there should be a green square. In the middle of such green square, a black horizontal stripe should be traversing it and protruding out of it toward the left. There should be no red in this page.</p>
+
+  <div id="outer-abs-pos">
+    <div id="inner-floated">12345678</div>
+  </div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-024.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-024.xht
new file mode 100644
index 0000000..eb49178
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-024.xht
@@ -0,0 +1,58 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Test: 'shrink-to-fit' width of absolutely positioned, non-replaced elements - direction (right-to-left), float and max-width</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+  <link rel="author" title="Daniel Schattenkirchner" href="mailto:crazy-daniel@gmx.de" />
+  <link rel="help" title="Section 10.3.7 Absolutely positioned, non-replaced elements" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" />
+  <link rel="help" title="Section 10.3.5 Width of floating, non-replaced elements" href="http://www.w3.org/TR/CSS21/visudet.html#float-width" />
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#min-max-widths" />
+  <link rel="match" href="absolute-non-replaced-width-021-ref.xht" />
+  <meta content="When direction is right-to-left and 'right' is set to static position and 'width' and 'left' are 'auto', then the used value of 'width' is given by 'shrink-to-fit' width calculation. If 'width' of an floating, non-replaced element in normal flow computes to 'auto', then the used value of 'width' is also given by 'shrink-to-fit' width calculation. If 'width' of a floating, non-replaced element in normal flow is given by 'shrink-to-fit' width calculation, then such calculated width can be furthermore constrained, reduced by a max-width declaration. If width of an absolutely positioned, non-replaced element resorts to 'shrink-to-fit' width calculation but its own child uses a constrained length resulting from a max-width declaration, then such constrained length will define the preferred width in 'shrink-to-fit' width calculation." name="assert" />
+  <meta content="ahem" name="flags" />
+
+  <style type="text/css"><![CDATA[
+  body
+  {
+  direction: rtl;
+  margin: 8px;
+  }
+
+  p {direction: ltr;}
+
+  div
+  {
+  background-color: red;
+  font: 30px/4 Ahem;
+  left: auto;
+  position: absolute;
+  right: auto;
+  /*
+  right is set to static position: it should be 8px from
+  the right-hand side of document box (at body's margin-right)
+  */
+  width: auto;
+  }
+
+  span
+  {
+  background-color: green;
+  float: left;
+  max-width: 4em;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Below, on the right edge of the page, there should be a green square. In the middle of such green square, a black horizontal stripe should be traversing it and protruding out of it toward the left. There should be no red in this page.</p>
+
+  <div><span>12345678</span></div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-025-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-025-ref.xht
new file mode 100644
index 0000000..8bd763d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-025-ref.xht
@@ -0,0 +1,32 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  body {margin: 8px;}
+
+  div
+  {
+  background-color: green;
+  height: 100px;
+  margin: 0px auto;
+  width: 100px;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if there is a green square <strong>horizontally centered</strong> in the page and if there is <strong>no red</strong>.</p>
+
+  <div></div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-025.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-025.xht
new file mode 100644
index 0000000..fcedea8
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-025.xht
@@ -0,0 +1,61 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Test: CSS Test: absolutely positioned non-replaced element with 'left' and 'right' not set to 'auto' and 'width' set to 'auto' - max-width, horizontal margins</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+  <link rel="help" title="10.3.7 Absolutely positioned, non-replaced elements" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" />
+  <link rel="help" title="10.4 Minimum and maximum widths: 'min-width' and 'max-width'" href="http://www.w3.org/TR/CSS21/visudet.html#min-max-widths" />
+  <link rel="match" href="absolute-non-replaced-width-025-ref.xht" />
+
+  <meta content="" name="flags" />
+  <meta content="When 'width' is computed according to the equation and rules of section 10.3.7 and when such computed 'width' is greater than 'max-width', then the equation and rules of section 10.3.7 are applied again but this time assuming the computed 'max-width' value. Then all three properties ('width', 'left' and 'right') are not 'auto' and both 'margin-left' and 'margin-right' are 'auto': in which case, the horizontal margins get equal values of available, remaining horizontal space." name="assert" />
+
+  <!--
+  Credit must go to Boris Zbarsky for explaining this in
+  http://lists.w3.org/Archives/Public/www-style/2010Oct/0147.html
+  -->
+
+  <style type="text/css"><![CDATA[
+  body {margin: 8px;}
+
+  div#overlapped-red
+  {
+  background-color: red;
+  color: yellow;
+  font-size: 2em;
+  height: 100px;
+  margin-left: auto;
+  margin-right: auto;
+  width: 100px;
+  }
+
+  div#abs-pos-overlapping-green
+  {
+  background-color: green;
+  height: 100px;
+  left: 8px;
+  margin-left: auto;
+  margin-right: auto;
+  max-width: 100px;
+  position: absolute;
+  right: 8px;
+  width: auto;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if there is a green square <strong>horizontally centered</strong> in the page and if there is <strong>no red</strong>.</p>
+
+  <div id="abs-pos-overlapping-green"></div>
+
+  <div id="overlapped-red">FAIL</div>
+
+ </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-026-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-026-ref.xht
new file mode 100644
index 0000000..e77fe62
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-026-ref.xht
@@ -0,0 +1,33 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  body {margin: 8px;}
+
+  div
+  {
+  background-color: green;
+  height: 100px;
+  margin-left: auto;
+  margin-right: 0px;
+  width: 100px;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if there is a green square on the <strong>right side</strong> of this page and if there is <strong>no red</strong>.</p>
+
+  <div></div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-026.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-026.xht
new file mode 100644
index 0000000..61e8f36
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-026.xht
@@ -0,0 +1,61 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Test: absolutely positioned non-replaced element with 'left' and 'right' not set to 'auto' and 'width' set to 'auto' - max-width, horizontal margins</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+  <link rel="help" title="10.3.7 Absolutely positioned, non-replaced elements" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" />
+  <link rel="help" title="10.4 Minimum and maximum widths: 'min-width' and 'max-width'" href="http://www.w3.org/TR/CSS21/visudet.html#min-max-widths" />
+  <link rel="match" href="absolute-non-replaced-width-026-ref.xht" />
+
+  <meta content="" name="flags" />
+  <meta content="When 'width' is computed according to the equation and rules of section 10.3.7 and when such computed 'width' is greater than 'max-width', then the equation and rules of section 10.3.7 are applied again but this time assuming the computed 'max-width' value. Then all three properties ('width', 'left' and 'right') are not 'auto' and 'margin-left' is 'auto': in which case, the 'margin-left' get all of available, remaining horizontal space." name="assert" />
+
+  <!--
+  Credit must go to Boris Zbarsky for explaining this in
+  http://lists.w3.org/Archives/Public/www-style/2010Oct/0147.html
+  -->
+
+  <style type="text/css"><![CDATA[
+  body {margin: 8px;}
+
+  div#overlapped-red
+  {
+  background-color: red;
+  color: yellow;
+  font-size: 2em;
+  height: 100px;
+  margin-left: auto;
+  margin-right: 0px;
+  width: 100px;
+  }
+
+  div#abs-pos-overlapping-green
+  {
+  background-color: green;
+  height: 100px;
+  left: 8px;
+  margin-left: auto;
+  margin-right: 0px;
+  max-width: 100px;
+  position: absolute;
+  right: 8px;
+  width: auto;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if there is a green square on the <strong>right side</strong> of this page and if there is <strong>no red</strong>.</p>
+
+  <div id="abs-pos-overlapping-green"></div>
+
+  <div id="overlapped-red">FAIL</div>
+
+ </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-027.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-027.xht
new file mode 100644
index 0000000..57401d9
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-027.xht
@@ -0,0 +1,216 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Test: absolutely positioned non-replaced element - 'auto' margins, max-width and max-height</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+  <link rel="author" title="Daniel Schattenkirchner" href="mailto:crazy-daniel@gmx.de" />
+
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" title="10.3.7 Absolutely positioned, non-replaced elements" />
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-height" title="10.6.4 Absolutely positioned, non-replaced elements" />
+  <link rel="match" href="../reference/ref-filled-green-100px-square.xht" />
+
+  <meta content="" name="flags" />
+  <meta content="If 'width' is auto and 'left' and 'right' are not 'auto', then set 'auto' values for 'margin-left' and 'margin-right' to 0 and then solve for 'width'; the tentative width may be later constrained by max-width in which case, the algorithm must be re-entered. If 'height' is 'auto' and 'top' and 'bottom' are not 'auto', then 'auto' values for 'margin-top' and 'margin-bottom' are set to 0 and solve for 'height'; the tentative height may be later constrained by max-height in which case, the algorithm must be re-entered." name="assert" />
+
+  <style type="text/css"><![CDATA[
+  div#rel-pos-container
+  {
+  background-color: green;
+  height: 100px;
+  position: relative;
+  width: 100px;
+  }
+
+  div#rel-pos-container > div {position: absolute;}
+
+  div#reference-red-overlapped
+  {
+  background-color: red;
+  height: 33px;
+  left: 33px;
+  top: 33px;
+  width: 33px;
+  }
+
+  div#test-green-overlapping
+  {
+  background-color: green;
+  bottom: 0;
+  height: auto;
+  left: 0;
+  margin: auto;
+  max-height: 34px;
+  max-width: 34px;
+  right: 0;
+  top: 0;
+  width: auto;
+  }
+
+  /*
+
+  First we set both margin-left and margin-right to 0 since
+
+  "
+  set 'auto' values for 'margin-left' and 'margin-right' to 0
+  (...)
+  5. 'width' is 'auto', 'left' and 'right' are not 'auto', then solve for 'width'
+  "
+  10.3.7 Absolutely positioned, non-replaced elements
+  http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width
+
+
+      0px       : left
+  +
+      0px (set) : margin-left
+  +
+      0px       : border-left
+  +
+      0px       : padding-left
+  +
+      (solve)   : width (not constrained yet by max-width)
+  +
+      0px       : padding-right
+  +
+      0px       : border-right
+  +
+      0px (set) : margin-right
+  +
+      0px       : right
+  =============
+    100px       : width of containing block
+
+  So, (tentative) width is 100px but now we must
+  constrain it by computed max-width value and so we
+  must now re-enter the algorithm but this time,
+  'width' is not 'auto': therefore horizontal margins
+  must not be set to 0:
+
+  "
+  If none of the three (left, width, right) is 'auto':
+  If both 'margin-left' and 'margin-right' are 'auto',
+  solve the equation under the extra constraint that
+  the two margins get equal values
+  "
+  10.3.7 Absolutely positioned, non-replaced elements
+  http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width
+
+  So:
+
+      0px       : left
+  +
+      (solve)   : margin-left
+  +
+      0px       : border-left
+  +
+      0px       : padding-left
+  +
+     34px       : width (constrained by max-width)
+  +
+      0px       : padding-right
+  +
+      0px       : border-right
+  +
+      (solve)   : margin-right
+  +
+      0px       : right
+  =============
+    100px       : width of containing block
+
+  Therefore, margin-left and margin-right used values are
+  each respectively equal to ((100px minus 34px) divided by 2) == 33px.
+
+  -----------------------------------------------
+
+  First we set both margin-top and margin-bottom to 0 since
+
+  "
+  5. 'height' is 'auto', 'top' and 'bottom' are not 'auto',
+  then 'auto' values for 'margin-top' and 'margin-bottom' are set to 0
+  and solve for 'height'
+  "
+  10.6.4 Absolutely positioned, non-replaced elements
+  http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-height
+
+      0px       : top
+  +
+      0px (set) : margin-top
+  +
+      0px       : border-top
+  +
+      0px       : padding-top
+  +
+      (solve)   : height (not constrained yet by max-height)
+  +
+      0px       : padding-bottom
+  +
+      0px       : border-bottom
+  +
+      0px (set) : margin-bottom
+  +
+      0px       : bottom
+  =============
+    100px       : height of containing block
+
+  So, (tentative) height is 100px but now we must
+  constrain it by computed max-height value and so we
+  must now re-enter the algorithm but this time,
+  'height' is not 'auto': therefore vertical margins
+  must not be set to 0:
+
+  "
+  If none of the three (top, height, bottom) are 'auto':
+  If both 'margin-top' and 'margin-bottom' are 'auto',
+  solve the equation under the extra constraint that
+  the two margins get equal values.
+  "
+  10.6.4 Absolutely positioned, non-replaced elements
+  http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-height
+
+  So:
+
+      0px       : top
+  +
+      (solve)   : margin-top
+  +
+      0px       : border-top
+  +
+      0px       : padding-top
+  +
+     34px       : height (constrained by max-height)
+  +
+      0px       : padding-bottom
+  +
+      0px       : border-bottom
+  +
+      (solve)   : margin-bottom
+  +
+      0px       : bottom
+  =============
+    100px       : height of containing block
+
+  Therefore, margin-top and margin-bottom used values are
+  each respectively equal to ((100px minus 34px) divided by 2) == 33px.
+
+  */
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
+
+  <div id="rel-pos-container">
+
+	    <div id="reference-red-overlapped"></div>
+
+	    <div id="test-green-overlapping"></div>
+
+  </div>
+
+ </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-028.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-028.xht
new file mode 100644
index 0000000..33fb4462
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-non-replaced-width-028.xht
@@ -0,0 +1,63 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Test: width - absolutely positioned non-replaced element with scrollbar and percentage height of inline replaced child</title>
+
+  <!--
+  Credits should go to Erik Brown for originally reporting a related test
+  -->
+
+  <link rel="bookmark" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1281713" title="Bug 1281713: intrinsic width of parent with overflow-x:scroll not computing correctly with child image with height:100%" />
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+  <link rel="help" title="11.1.1 Overflow: the 'overflow' property" href="https://www.w3.org/TR/CSS21/visufx.html#overflow" />
+  <link rel="help" title="10.3.2 Inline, replaced elements" href="https://www.w3.org/TR/CSS21/visudet.html#inline-replaced-width" />
+  <link rel="help" title="10.3.5 Floating, non-replaced elements" href="https://www.w3.org/TR/CSS21/visudet.html#float-width" />
+
+  <meta name="DC.date.created" content="2016-06-23T09:54:03+11:00" scheme="W3CDTF" />
+  <meta name="DC.date.modified" content="2016-07-06T09:54:03+11:00" scheme="W3CDTF" />
+
+  <!--
+  Siblings of this test are:
+  inline-block-non-replaced-width-005
+  float-non-replaced-width-013
+  -->
+
+  <meta content="image scroll" name="flags" />
+  <meta content="This test checks interaction of percentage height of an inline replaced element with its parent having scrollbars and with the parent's width determined by 'shrink-to-fit' width algorithm. In this test, the image height should be 100px minus scrollbar height since space taken up by generated scrollbars should be taken out of (subtracted from the dimensions of) the containing block formed by the element with the scrollbars. Then the width of parent should be (used image height == 100px minus scrollbar) * (intrinsic ratio == 5width:1height)." name="assert" />
+
+  <style type="text/css"><![CDATA[
+  div
+    {
+      background-color: red;
+      position: absolute;  /* or display: inline-block; */  /* or float: left; */
+      height: 100px;
+      overflow: scroll;
+    }
+
+  img
+    {
+      height: 100%;
+      vertical-align: bottom;
+      /*
+      This 'vertical-align: bottom' declaration is not part of the test.
+      We 'baseline-align' the image at the bottom of the line box so
+      that the vertical scrollbar remains inactive.
+      */
+    }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>PREREQUISITE: User agent needs to support scrollbars as the scrolling mechanism. If it does not, then this test does not apply to such user agent.</p>
+
+  <p>Test passes if there is a filled green rectangle with inactive scrollbars and <strong>no red</strong>.</p>
+
+  <div><img src="support/green-rectangle-50wideBy10tall.png" alt="Image download support must be enabled" /></div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-001-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-001-ref.xht
new file mode 100644
index 0000000..fc38eba0
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-001-ref.xht
@@ -0,0 +1,30 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div
+  {
+  border-bottom: orange solid medium;
+  border-top: orange solid medium;
+  height: 15px;
+  width: 96px;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if there is <strong>no space between</strong> the blue square and the orange lines.</p>
+
+  <div><img src="support/blue15x15.png" alt="Image download support must be enabled" /></div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-001.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-001.xht
new file mode 100644
index 0000000..e3e1064
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-001.xht
@@ -0,0 +1,34 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolute replaced elements with 'margin-top' and 'margin-bottom' as 'auto'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-08-31 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-height" />
+		<link rel="match" href="absolute-replaced-height-001-ref.xht" />
+
+        <meta name="flags" content="image" />
+        <meta name="assert" content="If the height, top, bottom and vertical margins of an absolute positioned inline replaced element are all 'auto', then its use value is determined for inline replaced element, its 'top' is given by its static position and both 'margin-top' and 'margin-bottom' used values are '0'. In this test, the 'height' and 'width' of the inline replaced element are 'auto' and the element also has an intrinsic height, so the intrinsic height and the intrinsic width become the used values." />
+        <style type="text/css">
+            div
+            {
+                border-bottom: solid orange;
+                border-top: solid orange;
+                height: 15px;
+                width: 1in;
+            }
+            img
+            {
+                margin-bottom: auto;
+                margin-top: auto;
+                position: absolute;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue square and the orange lines.</p>
+        <div>
+            <img alt="blue 15x15" src="support/blue15x15.png" />
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-002-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-002-ref.xht
new file mode 100644
index 0000000..effbf97
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-002-ref.xht
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+ </head>
+
+ <body>
+
+  <p>Test passes if the blue and orange squares have the <strong>same height</strong>.</p>
+
+  <div><img src="support/blue15x15.png" alt="Image download support must be enabled" /><img src="support/swatch-orange.png" alt="Image download support must be enabled" /></div>
+
+ </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-002.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-002.xht
new file mode 100644
index 0000000..79d99d2
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-002.xht
@@ -0,0 +1,41 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned inline replaced elements relying on intrinsic height dimensions</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-08-31 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-height" />
+		<link rel="match" href="absolute-replaced-height-002-ref.xht" />
+
+        <meta name="flags" content="image" />
+        <meta name="assert" content="The 'height' is the intrinsic height when an absolutely positioned inline replaced element with an intrinsic height has a 'height' and 'width' computed as 'auto'." />
+        <style type="text/css">
+            div
+            {
+                position: relative;
+            }
+            div div
+            {
+                background: orange;
+                height: 15px;
+                left: 15px;
+                position: absolute;
+                top: 0;
+                width: 15px;
+            }
+            img
+            {
+                height: auto;
+                position: absolute;
+                width: auto;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if the blue and orange squares have the <strong>same height</strong>.</p>
+        <div>
+            <img alt="blue 15x15" src="support/blue15x15.png" />
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-003.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-003.xht
new file mode 100644
index 0000000..93e8c2c
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-003.xht
@@ -0,0 +1,43 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned inline replaced element with intrinsic ratio and 'height' set to 'auto'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-08-31 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-height" />
+		<link rel="match" href="absolute-non-replaced-height-007-ref.xht" />
+
+        <meta name="flags" content="image" />
+        <meta name="assert" content="The 'height' is the used width divided by the intrinsic ratio when an absolutely positioned inline replaced element has an intrinsic ratio, 'height' is set to 'auto' and 'width' is specified." />
+        <style type="text/css">
+            div
+            {
+                position: relative;
+            }
+            div div
+            {
+                background: blue;
+                height: 100px;
+                left: 100px;
+                position: absolute;
+                top: 0;
+            }
+            img
+            {
+                height: auto;
+                position: absolute;
+            }
+            div div, img
+            {
+                width: 100px;
+            }
+        </style>
+    </head>
+    <body>
+		<p>Test passes if the orange and blue squares have the <strong>same height</strong>.</p>
+        <div>
+            <img alt="Image download support must be enabled" src="support/swatch-orange.png" />
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-004-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-004-ref.xht
new file mode 100644
index 0000000..534e82e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-004-ref.xht
@@ -0,0 +1,29 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div
+  {
+  border: green solid medium;
+  height: 150px;
+  width: 300px;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if there is <strong>no red</strong>.</p>
+
+  <div></div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-004.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-004.xht
new file mode 100644
index 0000000..9244a3c
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-004.xht
@@ -0,0 +1,41 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolute replaced inline-block elements without intrinsic ratio and 'height' set to 'auto'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-08-31 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-height" />
+		<link rel="match" href="absolute-replaced-height-004-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="For an absolutely positioned inline-block replaced element, if its 'height' and 'width' have a computed value of 'auto' and the element has no intrinsic ratio, the 'height' is set to the largest rectangle that has a 2:1 ratio that is not greater than 150px and has a 'width' not greater than the device width." />
+        <style type="text/css">
+            div
+            {
+                position: relative;
+            }
+            div div
+            {
+                border: solid green;
+                height: 150px;
+                position: absolute;
+                top: 0;
+                width: 300px;
+            }
+            iframe
+            {
+                border: solid red;
+                height: auto;
+                position: absolute;
+                width: auto;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div>
+            <iframe></iframe>
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-005-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-005-ref.xht
new file mode 100644
index 0000000..8687f28
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-005-ref.xht
@@ -0,0 +1,29 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div
+  {
+  border: green solid medium;
+  height: 96px;
+  width: 300px;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if there is <strong>no red</strong>.</p>
+
+  <div></div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-005.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-005.xht
new file mode 100644
index 0000000..25a18da
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-005.xht
@@ -0,0 +1,41 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned inline-block replaced element with its height set to a percentage</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-08-31 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-height" />
+		<link rel="match" href="absolute-replaced-height-005-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="An absolutely positioned inline-block replaced element with its height set to a percentage is resolvable if and when its containing block height is explicitly specified and computable." />
+        <style type="text/css">
+            #div1
+            {
+                position: relative;
+                height: 2in;
+            }
+            div div
+            {
+                border: solid green;
+                height: 1in;
+                position: absolute;
+                top: 0;
+                width: 300px;
+            }
+            iframe
+            {
+                border: solid red;
+                position: absolute;
+                width: auto;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <iframe height="50%"></iframe>
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-006-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-006-ref.xht
new file mode 100644
index 0000000..6912d51
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-006-ref.xht
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  img
+  {
+  height: 96px;
+  width: 200px;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if the blue and orange rectangles have the <strong>same height</strong>.</p>
+
+  <div><img src="support/blue15x15.png" alt="Image download support must be enabled" /><img src="support/swatch-orange.png" alt="Image download support must be enabled" /></div>
+
+ </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-006.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-006.xht
new file mode 100644
index 0000000..dbf186c
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-006.xht
@@ -0,0 +1,42 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned inline replaced element with percentage based intrinsic height</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-height" />
+		<link rel="match" href="absolute-replaced-height-006-ref.xht" />
+
+        <meta name="flags" content="nonHTML svg" />
+        <meta name="assert" content="An absolutely positioned replaced element with percentage intrinsic height resolves based on the containing block when the replaced element is absolutely positioned." />
+        <style type="text/css">
+            #div1
+            {
+                position: relative;
+                height: 2in;
+            }
+            div div
+            {
+                background: orange;
+                height: 1in;
+                left: 200px;
+                position: absolute;
+                top: 0;
+                width: 200px;
+            }
+            svg
+            {
+                position: absolute;
+                width: auto;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if the blue and orange rectangles have the <strong>same height</strong>.</p>
+        <div id="div1">
+            <svg:svg version="1.1" xmlns:svg="http://www.w3.org/2000/svg" height="50%" baseProfile="full">
+                <svg:rect x="0" y="0" width="200" height="100" fill="blue" />
+            </svg:svg>
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-007-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-007-ref.xht
new file mode 100644
index 0000000..6cf502d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-007-ref.xht
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div
+  {
+  border: green solid medium;
+  width: 300px;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if there is <strong>no red</strong>.</p>
+
+  <div></div>
+
+ </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-007.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-007.xht
new file mode 100644
index 0000000..0a3011b
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-007.xht
@@ -0,0 +1,49 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned inline-block replaced elements with percentage based intrinsic height that cannot be resolved</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-height" />
+        <link rel="match" href="absolute-replaced-height-007-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="An absolutely positioned inline-block replaced element with a percentage height that cannot be resolved has no intrinsic height." />
+        <style type="text/css">
+            #div1
+            {
+                position: relative;
+            }
+            div div
+            {
+                border: solid green;
+                position: absolute;
+                width: 300px;
+            }
+            iframe
+            {
+                border: solid red;
+                position: absolute;
+                width: auto;
+            }
+
+            /*
+            "
+            (...)
+            the height of the containing block of an absolutely positioned
+            element is independent of the size of the element itself, and thus
+            a percentage height on such an element *_can always be resolved_*.
+            However, it may be that the height is not known until elements
+            that come later in the document have been processed. "
+            http://www.w3.org/TR/CSS21/visudet.html#the-height-property
+            "
+            */
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <iframe height="50%"></iframe>
+            <div></div>
+        </div>
+    </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-008-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-008-ref.xht
new file mode 100644
index 0000000..18b46637
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-008-ref.xht
@@ -0,0 +1,38 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div
+  {
+  border-top: black solid medium;
+  margin-bottom: 96px;
+  }
+
+  div + div
+  {
+  background-color: blue;
+  border-top: none 0px;
+  height: 15px;
+  width: 30px;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if there is a short blue bar and it does not touch the black line.</p>
+
+  <div></div>
+
+  <div></div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-008.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-008.xht
new file mode 100644
index 0000000..886ecec
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-008.xht
@@ -0,0 +1,68 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned inline replaced element with 'margin-top', 'margin-bottom' and 'bottom' as 'auto'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-08-31 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-height" />
+		<link rel="match" href="absolute-replaced-height-008-ref.xht" />
+
+        <meta name="flags" content="image" />
+        <meta name="assert" content="An absolutely positioned inline replaced element's used value of 'bottom', 'margin-top' and/or 'margin-bottom' set to 'auto' is '0'." />
+        <style type="text/css">
+            #div1
+            {
+                border-top: solid black;
+                position: relative;
+            }
+            img
+            {
+                bottom: auto;
+                height: auto;
+                margin-bottom: auto;
+                margin-top: auto;
+                position: absolute;
+                top: 1in;
+                width: auto;
+            }
+
+			/*
+			"
+			The used value of 'height' is determined as for inline replaced elements.
+			If 'margin-top' or 'margin-bottom' is specified as 'auto'
+			its used value is determined by the rules below.
+			(...)
+			If 'height' and 'width' both have computed values
+			of 'auto' and the element also has an intrinsic height,
+			then that intrinsic height is the used value of 'height'.
+			(...)
+			If 'bottom' is 'auto', replace any 'auto' on 'margin-top'
+			or 'margin-bottom' with '0'.
+			If at this point there is only one 'auto' left,
+			solve the equation for that value.
+			"
+			http://www.w3.org/TR/CSS21/visudet.html#inline-replaced-height
+
+			In this test, bottom will be -96px because the height of the
+			containing block is 0px.
+			*/
+
+            div div
+            {
+                background: blue;
+                height: 15px;
+                left: 15px;
+                position: relative;
+                top: 1in;
+                width: 15px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a short blue bar and it does not touch the black line.</p>
+        <div id="div1">
+            <img alt="blue 15x15" src="support/blue15x15.png" />
+            <div></div>
+        </div>
+    </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-009.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-009.xht
new file mode 100644
index 0000000..72f2df7
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-009.xht
@@ -0,0 +1,44 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolute positioned inline replaced elements relying on intrinsic height dimensions and 'bottom' set to 'auto'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-08-31 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-height" />
+		<link rel="match" href="absolute-replaced-height-008-ref.xht" />
+
+        <meta name="flags" content="image" />
+        <meta name="assert" content="The 'height' is the intrinsic height when an absolutely positioned replaced element with an intrinsic height has 'height', 'width' and 'bottom' computed as 'auto'." />
+        <style type="text/css">
+            #div1
+            {
+                border-top: solid black;
+                position: relative;
+            }
+            div div
+            {
+                background: blue;
+                height: 15px;
+                left: 15px;
+                position: absolute;
+                top: 1in;
+                width: 15px;
+            }
+            img
+            {
+                bottom: auto;
+                height: auto;
+                position: absolute;
+                top: 1in;
+                width: auto;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a short blue bar and it does not touch the black line.</p>
+        <div id="div1">
+            <img alt="blue 15x15" src="support/blue15x15.png" />
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-010-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-010-ref.xht
new file mode 100644
index 0000000..229f992
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-010-ref.xht
@@ -0,0 +1,38 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div
+  {
+  border-top: black solid medium;
+  margin-bottom: 96px;
+  }
+
+  div + div
+  {
+  background-color: blue;
+  border-top: none 0px;
+  height: 96px;
+  width: 192px;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if there is a filled blue rectangle and it does not touch the black line.</p>
+
+  <div></div>
+
+  <div></div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-010.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-010.xht
new file mode 100644
index 0000000..3490166
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-010.xht
@@ -0,0 +1,46 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned inline replaced element with intrinsic ratio, 'height' and 'bottom' set to 'auto'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-08-31 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-height" />
+		<link rel="match" href="absolute-replaced-height-010-ref.xht" />
+
+        <meta name="flags" content="image" />
+        <meta name="assert" content="The 'height' is the used width divided by the intrinsic ratio when an absolutely positioned inline replaced element has an intrinsic ratio, 'height' and 'bottom' are set to 'auto' and 'width' is specified." />
+        <style type="text/css">
+            #div1
+            {
+                border-top: solid black;
+                position: relative;
+            }
+            div div
+            {
+                background: blue;
+                height: 1in;
+                left: 1in;
+                position: absolute;
+                top: 1in;
+            }
+            img
+            {
+                bottom: auto;
+                height: auto;
+                position: absolute;
+                top: 1in;
+            }
+            div div, img
+            {
+                width: 1in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a filled blue rectangle and it does not touch the black line.</p>
+        <div id="div1">
+            <img alt="blue 15x15" src="support/blue15x15.png" />
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-011-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-011-ref.xht
new file mode 100644
index 0000000..574ab6a9
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-011-ref.xht
@@ -0,0 +1,30 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div
+  {
+  border: green solid medium;
+  height: 150px;
+  margin-top: 112px;
+  width: 300px;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if there is <strong>no red</strong>.</p>
+
+  <div></div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-011.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-011.xht
new file mode 100644
index 0000000..d7d5be0d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-011.xht
@@ -0,0 +1,43 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned inline-block replaced element without intrinsic ratio, 'height' and 'bottom' set to 'auto'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-08-31 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-height" />
+		<link rel="match" href="absolute-replaced-height-011-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="For an absolutely positioned inline-block replaced element, the 'height' is set to the largest rectangle that has a 2:1 ratio that is not greater than 150px and has a 'width' not greater than the device width." />
+        <style type="text/css">
+            div
+            {
+                position: relative;
+            }
+            div div
+            {
+                border: solid green;
+                height: 150px;
+                position: absolute;
+                top: 1in;
+                width: 300px;
+            }
+            iframe
+            {
+                border: solid red;
+                bottom: auto;
+                height: auto;
+                position: absolute;
+                top: 1in;
+                width: auto;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div>
+            <iframe></iframe>
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-012-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-012-ref.xht
new file mode 100644
index 0000000..722f5699
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-012-ref.xht
@@ -0,0 +1,30 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div
+  {
+  border: green solid medium;
+  height: 96px;
+  margin-top: 112px;
+  width: 300px;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if there is <strong>no red</strong>.</p>
+
+  <div></div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-012.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-012.xht
new file mode 100644
index 0000000..7a36c3b
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-012.xht
@@ -0,0 +1,43 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned inline-block replaced element with its height set to a percentage and 'bottom' set to 'auto'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-08-31 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-height" />
+		<link rel="match" href="absolute-replaced-height-012-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="An absolutely positioned inline-block replaced element with its height set to a percentage is resolvable if and when its containing block height is explicitly specified and computable." />
+        <style type="text/css">
+            #div1
+            {
+                position: relative;
+                height: 2in;
+            }
+            div div
+            {
+                border: solid green;
+                height: 1in;
+                position: absolute;
+                top: 1in;
+                width: 300px;
+            }
+            iframe
+            {
+                border: solid red;
+                bottom: auto;
+                position: absolute;
+                top: 1in;
+                width: auto;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <iframe height="50%"></iframe>
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-013-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-013-ref.xht
new file mode 100644
index 0000000..d75cdef
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-013-ref.xht
@@ -0,0 +1,38 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div
+  {
+  border-top: black solid medium;
+  margin-bottom: 96px;
+  }
+
+  div + div {border: none 0px;}
+
+  img
+  {
+  height: 96px;
+  width: 200px;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if the blue and orange rectangles are next to each other, have the same height and are not touching the black line.</p>
+
+  <div></div>
+
+  <div><img src="support/blue15x15.png" alt="Image download support must be enabled" /><img src="support/swatch-orange.png" alt="Image download support must be enabled" /></div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-013.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-013.xht
new file mode 100644
index 0000000..3d186de
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-013.xht
@@ -0,0 +1,46 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned inline replaced element with percentage based intrinsic height and 'bottom' set to 'auto'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-05 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-height" />
+		<link rel="match" href="absolute-replaced-height-013-ref.xht" />
+
+        <meta name="flags" content="nonHTML svg" />
+        <meta name="assert" content="An absolutely positioned replaced element with percentage intrinsic height resolves based on the containing block when the replaced element is absolutely positioned." />
+        <style type="text/css">
+            #div1
+            {
+                border-top: solid black;
+                position: relative;
+                height: 2in;
+            }
+            div div
+            {
+                background: orange;
+                height: 1in;
+                left: 200px;
+                position: absolute;
+                top: 1in;
+                width: 200px;
+            }
+            svg
+            {
+                bottom: auto;
+                position: absolute;
+                top: 1in;
+                width: auto;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if the blue and orange rectangles are next to each other, have the same height and are not touching the black line.</p>
+        <div id="div1">
+            <svg:svg version="1.1" xmlns:svg="http://www.w3.org/2000/svg" height="50%" baseProfile="full">
+                <svg:rect x="0" y="0" width="200" height="100" fill="blue" />
+            </svg:svg>
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-014-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-014-ref.xht
new file mode 100644
index 0000000..67e9b90
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-014-ref.xht
@@ -0,0 +1,29 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div
+  {
+  border: green solid medium;
+  margin-top: 112px;
+  width: 300px;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if there is <strong>no red</strong>.</p>
+
+  <div></div>
+
+ </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-014.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-014.xht
new file mode 100644
index 0000000..48e01f7
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-014.xht
@@ -0,0 +1,51 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned inline-block replaced elements with percentage based intrinsic height that cannot be resolved and 'top' specified</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-height" />
+		<link rel="match" href="absolute-replaced-height-014-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="An absolutely positioned inline-block replaced element with a percentage height that cannot be resolved has no intrinsic height." />
+		<!--
+		"
+		(...) the height of the containing block of an absolutely
+		positioned element is independent of the size of the element itself,
+		and thus a percentage height on such an element *_can always be
+		resolved_*. However, it may be that the height is not known until
+		elements that come later in the document have been processed.
+		"
+		http://www.w3.org/TR/CSS21/visudet.html#the-height-property
+		-->
+
+        <style type="text/css">
+            div#containing-block
+            {
+                position: relative;
+            }
+            div div
+            {
+                border: solid green;
+                position: absolute;
+                top: 1in;
+                width: 300px;
+            }
+            iframe
+            {
+                border: solid red;
+                bottom: auto;
+                position: absolute;
+                top: 1in;
+                width: auto;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="containing-block">
+        <iframe height="50%"></iframe>
+            <div></div>
+        </div>
+    </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-016.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-016.xht
new file mode 100644
index 0000000..d97a7ca
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-016.xht
@@ -0,0 +1,50 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned inline replaced element relying on intrinsic height dimensions and 'top', 'bottom' are not 'auto'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-01 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-height" />
+		<link rel="match" href="absolute-replaced-height-008-ref.xht" />
+
+        <meta name="flags" content="image" />
+        <meta name="assert" content="The 'height' is the intrinsic height when an absolutely positioned inline replaced element has an intrinsic height and its height is specified as 'auto', 'width' is specified 'auto' and 'top', 'bottom' are not 'auto'." />
+        <style type="text/css">
+            #div1
+            {
+                border-top: solid black;
+                position: relative;
+            }
+            div div
+            {
+                background: blue;
+                height: 15px;
+                left: 15px;
+                position: absolute;
+                top: 1in;
+                width: 15px;
+            }
+            img
+            {
+                bottom: 1in;
+                /*
+                The equation gets overconstrained; and so, the used value for
+                bottom in that test will be ignored and will be solved
+                as minus (1in + 15px)  (-111px) because the height of
+                containing block is 0.
+                */
+                height: auto;
+                position: absolute;
+                top: 1in;
+                width: auto;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a short blue bar and it does not touch the black line.</p>
+        <div id="div1">
+            <img alt="blue 15x15" src="support/blue15x15.png" />
+            <div></div>
+        </div>
+    </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-017.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-017.xht
new file mode 100644
index 0000000..80b4e142
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-017.xht
@@ -0,0 +1,52 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned inline replaced element with intrinsic ratio, 'height' set to 'auto' and 'top', 'bottom' are not 'auto'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-01 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-height" />
+		<link rel="match" href="absolute-replaced-height-010-ref.xht" />
+
+        <meta name="flags" content="image" />
+        <meta name="assert" content="The 'height' is the used width divided by the intrinsic ratio when an absolutely positioned inline replaced element has an intrinsic ratio, 'height' is set to 'auto', 'width' is specified and 'top', 'bottom' are not 'auto'." />
+        <style type="text/css">
+            #div1
+            {
+                border-top: solid black;
+                position: relative;
+            }
+            div div
+            {
+                background: blue;
+                height: 1in;
+                left: 1in;
+                position: absolute;
+                top: 1in;
+            }
+            img
+            {
+                bottom: 1in;
+                /*
+                The equation gets overconstrained; and so, the used value for
+                bottom in that test will be ignored and will be solved
+                as minus (1in + 1in)  (-192px) because the height of
+                containing block is 0.
+                */
+                height: auto;
+                position: absolute;
+                top: 1in;
+            }
+            div div, img
+            {
+                width: 1in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a filled blue rectangle and it does not touch the black line.</p>
+        <div id="div1">
+            <img alt="blue 15x15" src="support/blue15x15.png" />
+            <div></div>
+        </div>
+    </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-018.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-018.xht
new file mode 100644
index 0000000..aa07772
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-018.xht
@@ -0,0 +1,43 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned inline-block replaced element without intrinsic ratio, 'height' set to 'auto' and 'top', 'bottom' are not 'auto'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-01 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-height" />
+		<link rel="match" href="absolute-replaced-height-011-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="For an absolutely positioned inline-block replaced element, the 'height' is set to the largest rectangle that has a 2:1 ratio that is not greater than 150px and has a 'width' not greater than the device width." />
+        <style type="text/css">
+            div
+            {
+                position: relative;
+            }
+            div div
+            {
+                border: solid green;
+                height: 150px;
+                position: absolute;
+                top: 1in;
+                width: 300px;
+            }
+            iframe
+            {
+                border: solid red;
+                bottom: 1in;
+                height: auto;
+                position: absolute;
+                top: 1in;
+                width: auto;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div>
+            <iframe></iframe>
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-019.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-019.xht
new file mode 100644
index 0000000..de418c0
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-019.xht
@@ -0,0 +1,43 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned inline-block replaced element with its height set to a percentage and 'top', 'bottom' are not 'auto'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-01 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-height" />
+		<link rel="match" href="absolute-replaced-height-012-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="An absolutely positioned inline-block replaced element with its height set to a percentage is resolvable if and when its containing block height is explicitly specified and computable." />
+        <style type="text/css">
+            #div1
+            {
+                position: relative;
+                height: 2in;
+            }
+            div div
+            {
+                border: solid green;
+                height: 1in;
+                position: absolute;
+                top: 1in;
+                width: 300px;
+            }
+            iframe
+            {
+                border: solid red;
+                bottom: 1in;
+                position: absolute;
+                top: 1in;
+                width: auto;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <iframe height="50%"></iframe>
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-020.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-020.xht
new file mode 100644
index 0000000..c5d348d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-020.xht
@@ -0,0 +1,45 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned inline replaced element with percentage based intrinsic height set to 'auto' and 'top', 'bottom' are not 'auto'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-height" />
+		<link rel="match" href="absolute-replaced-height-013-ref.xht" />
+
+        <meta name="flags" content="nonHTML svg" />
+        <meta name="assert" content="An absolutely positioned replaced element with percentage intrinsic height resolves based on the containing block when the replaced element is absolutely positioned." />
+        <style type="text/css">
+            #div1
+            {
+                border-top: solid black;
+                position: relative;
+                height: 2in;
+            }
+            div div
+            {
+                background: orange;
+                height: 1in;
+                left: 200px;
+                position: absolute;
+                top: 1in;
+                width: 200px;
+            }
+            svg
+            {
+                bottom: 1in;
+                position: absolute;
+                top: 1in;
+                width: auto;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if the blue and orange rectangles are next to each other, have the same height and are not touching the black line.</p>
+        <div id="div1">
+            <svg:svg version="1.1" xmlns:svg="http://www.w3.org/2000/svg" height="50%" baseProfile="full">
+                <svg:rect x="0" y="0" width="200" height="100" fill="blue" />
+            </svg:svg>
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-021.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-021.xht
new file mode 100644
index 0000000..5ed10f66
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-021.xht
@@ -0,0 +1,52 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned inline-block replaced element with percentage based intrinsic height that cannot be resolved where 'top' and 'bottom' are not 'auto'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-height" />
+		<link rel="match" href="absolute-replaced-height-014-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="An absolutely positioned inline-block replaced element with a percentage height that cannot be resolved has no intrinsic height." />
+
+		<!--
+		"
+		(...) the height of the containing block of an absolutely
+		positioned element is independent of the size of the element itself,
+		and thus a percentage height on such an element *_can always be
+		resolved_*. However, it may be that the height is not known until
+		elements that come later in the document have been processed.
+		"
+		http://www.w3.org/TR/CSS21/visudet.html#the-height-property
+		-->
+
+        <style type="text/css">
+            div#containing-block
+            {
+                position: relative;
+            }
+            div div
+            {
+                border: solid green;
+                position: absolute;
+                top: 1in;
+                width: 300px;
+            }
+            iframe
+            {
+                border: solid red;
+                bottom: 1in;
+                position: absolute;
+                top: 1in;
+                width: auto;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="containing-block">
+            <iframe height="50%"></iframe>
+            <div></div>
+        </div>
+    </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-022.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-022.xht
new file mode 100644
index 0000000..3acc433
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-022.xht
@@ -0,0 +1,44 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned inline replaced element with 'margin-bottom' as 'auto' and 'top', 'bottom', 'margin-top' are not 'auto'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-05 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-height" />
+		<link rel="match" href="absolute-replaced-height-008-ref.xht" />
+
+        <meta name="flags" content="image" />
+        <meta name="assert" content="An absolutely positioned inline replaced element with only one value as 'auto' solves for that value (margin-bottom)." />
+        <style type="text/css">
+            #div1
+            {
+                border-top: solid black;
+                position: relative;
+            }
+            img
+            {
+                bottom: 1in;
+                margin-bottom: auto;
+                margin-top: 0.5in;
+                position: absolute;
+                top: 0.5in;
+            }
+            div div
+            {
+                background: blue;
+                height: 15px;
+                left: 15px;
+                position: relative;
+                top: 1in;
+                width: 15px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a short blue bar and it does not touch the black line.</p>
+        <div id="div1">
+            <img alt="blue 15x15" src="support/blue15x15.png" />
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-023.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-023.xht
new file mode 100644
index 0000000..fd0b7c4
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-023.xht
@@ -0,0 +1,46 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned inline replaced element relying on intrinsic height dimensions and 'top', 'bottom', 'margin-top' are not 'auto'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-01 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-height" />
+		<link rel="match" href="absolute-replaced-height-008-ref.xht" />
+
+        <meta name="flags" content="image" />
+        <meta name="assert" content="The 'height' is the intrinsic height when an absolutely positioned inline replaced element with an intrinsic height has a 'height', 'width' computed as 'auto' and 'top', 'bottom' are not 'auto'." />
+        <style type="text/css">
+            #div1
+            {
+                border-top: solid black;
+                position: relative;
+            }
+            div div
+            {
+                background: blue;
+                height: 15px;
+                left: 15px;
+                position: absolute;
+                top: 1in;
+                width: 15px;
+            }
+            img
+            {
+                bottom: 1in;
+                height: auto;
+                margin-bottom: auto;
+                margin-top: 0.5in;
+                position: absolute;
+                top: 0.5in;
+                width: auto;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a short blue bar and it does not touch the black line.</p>
+        <div id="div1">
+            <img alt="blue 15x15" src="support/blue15x15.png" />
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-024.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-024.xht
new file mode 100644
index 0000000..a2a5ca3e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-024.xht
@@ -0,0 +1,48 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned inline replaced element with intrinsic ratio, 'height' set to 'auto' and 'top', 'bottom', 'margin-top' are not 'auto'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-01 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-height" />
+		<link rel="match" href="absolute-replaced-height-010-ref.xht" />
+
+        <meta name="flags" content="image" />
+        <meta name="assert" content="The 'height' is the used width divided by the intrinsic ratio when an absolutely positioned inline replaced element has an intrinsic ratio, 'height' is set to 'auto', 'width' is specified and 'top', 'bottom' are not 'auto'." />
+        <style type="text/css">
+            #div1
+            {
+                border-top: solid black;
+                position: relative;
+            }
+            div div
+            {
+                background: blue;
+                height: 1in;
+                left: 1in;
+                position: absolute;
+                top: 1in;
+            }
+            img
+            {
+                bottom: 1in;
+                height: auto;
+                margin-bottom: auto;
+                margin-top: 0.5in;
+                position: absolute;
+                top: 0.5in;
+            }
+            div div, img
+            {
+                width: 1in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a filled blue rectangle and it does not touch the black line.</p>
+        <div id="div1">
+            <img alt="blue 15x15" src="support/blue15x15.png" />
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-025.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-025.xht
new file mode 100644
index 0000000..4deeae7
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-025.xht
@@ -0,0 +1,45 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned inline-block replaced elements without intrinsic ratio, 'height' set to 'auto' and 'top', 'bottom', 'margin-top' are not 'auto'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-01 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-height" />
+		<link rel="match" href="absolute-replaced-height-011-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="For an absolutely positioned replaced element the 'height' is set to the largest rectangle that has a 2:1 ratio that is not greater than 150px and has a 'width' not greater than the device width." />
+        <style type="text/css">
+            div
+            {
+                position: relative;
+            }
+            div div
+            {
+                border: solid green;
+                height: 150px;
+                position: absolute;
+                top: 1in;
+                width: 300px;
+            }
+            iframe
+            {
+                border: solid red;
+                bottom: 1in;
+                height: auto;
+                margin-bottom: auto;
+                margin-top: 0.5in;
+                position: absolute;
+                top: 0.5in;
+                width: auto;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div>
+            <iframe></iframe>
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-026.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-026.xht
new file mode 100644
index 0000000..9456beb
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-026.xht
@@ -0,0 +1,45 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned inline-block replaced element with its height set to a percentage of its containing block's height and 'top', 'bottom', 'margin-top' are not 'auto'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-01 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-height" />
+		<link rel="match" href="absolute-replaced-height-012-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="An absolutely positioned inline-block replaced element with its height set to a percentage is resolvable if and when its containing block height is explicitly specified and computable." />
+        <style type="text/css">
+            #div1
+            {
+                position: relative;
+                height: 2in;
+            }
+            div div
+            {
+                border: solid green;
+                height: 1in;
+                position: absolute;
+                top: 1in;
+                width: 300px;
+            }
+            iframe
+            {
+                border: solid red;
+                bottom: 1in;
+                margin-bottom: auto;
+                margin-top: 0.5in;
+                position: absolute;
+                top: 0.5in;
+                width: auto;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <iframe height="50%"></iframe>
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-027.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-027.xht
new file mode 100644
index 0000000..7442f85b
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-027.xht
@@ -0,0 +1,47 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned inline replaced element with percentage based intrinsic height set to 'auto' and 'top', 'bottom', 'margin-top' are not 'auto'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-height" />
+		<link rel="match" href="absolute-replaced-height-013-ref.xht" />
+
+        <meta name="flags" content="nonHTML svg" />
+        <meta name="assert" content="An absolutely positioned replaced element with percentage intrinsic height resolves based on the containing block when the replaced element is absolutely positioned." />
+        <style type="text/css">
+            #div1
+            {
+                border-top: solid black;
+                position: relative;
+                height: 2in;
+            }
+            div div
+            {
+                background: orange;
+                height: 1in;
+                left: 200px;
+                position: absolute;
+                top: 1in;
+                width: 200px;
+            }
+            svg
+            {
+                bottom: 1in;
+                margin-bottom: auto;
+                margin-top: 0.5in;
+                position: absolute;
+                top: 0.5in;
+                width: auto;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if the blue and orange rectangles are next to each other, have the same height and are not touching the black line.</p>
+        <div id="div1">
+            <svg:svg version="1.1" xmlns:svg="http://www.w3.org/2000/svg" height="50%" baseProfile="full">
+                <svg:rect x="0" y="0" width="200" height="100" fill="blue" />
+            </svg:svg>
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-028.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-028.xht
new file mode 100644
index 0000000..f35dd3c
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-028.xht
@@ -0,0 +1,42 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned inline-block replaced element with percentage based intrinsic height that cannot be resolved where 'top', 'bottom', 'margin-top' are not 'auto'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-height" />
+		<link rel="match" href="absolute-replaced-height-014-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="An absolutely positioned inline-block replaced element with a percentage height that cannot be resolved has no intrinsic height." />
+        <style type="text/css">
+            #div1
+            {
+                position: relative;
+            }
+            div div
+            {
+                border: solid green;
+                position: absolute;
+                top: 1in;
+                width: 300px;
+            }
+            iframe
+            {
+                border: solid red;
+                bottom: 1in;
+                margin-bottom: auto;
+                margin-top: 0.5in;
+                position: absolute;
+                top: 0.5in;
+                width: auto;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <iframe height="50%"></iframe>
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-029.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-029.xht
new file mode 100644
index 0000000..0c0a550
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-029.xht
@@ -0,0 +1,92 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned inline replaced element with over-constrained values</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-05 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-height" />
+		<link rel="match" href="absolute-replaced-height-008-ref.xht" />
+
+        <meta name="flags" content="image" />
+        <meta name="assert" content="An absolutely positioned inline replaced element with over-constrained values solves for 'bottom'." />
+        <style type="text/css">
+            #div1
+            {
+                border-top: solid black;
+                position: relative;
+            }
+            img
+            {
+                bottom: 0.5in;
+                margin-bottom: 0.5in;
+                margin-top: 0.5in;
+                position: absolute;
+                top: 0.5in;
+            }
+            div div
+            {
+                background: blue;
+                height: 15px;
+                left: 15px;
+                position: relative;
+                top: 1in;
+                width: 15px;
+            }
+
+	/*
+
+  			0.5in : 'top'
+		+
+  			0.5in : 'margin-top'
+		+
+  			0     : 'border-top-width'
+		+
+  			0     : 'padding-top'
+		+
+  			15px  : 'height' (intrinsic height of inline replaced element)
+		+
+  			0     : 'padding-bottom'
+		+
+  			0     : 'border-bottom-width'
+		+
+  			0.5in : 'margin-bottom'
+		+
+  			0.5in : 'bottom'
+		===========
+  			207px  : height of containing block (15px)
+
+		So, bottom has to be ignored and forced to have the value that
+		will balance the equation. So, this brings up
+
+			0.5in : 'top'
+		+
+  			0.5in : 'margin-top'
+		+
+			0     : 'border-top-width'
+		+
+			0     : 'padding-top'
+		+
+			15px  : 'height' (intrinsic height)
+		+
+			0     : 'padding-bottom'
+		+
+			0     : 'border-bottom-width'
+		+
+			0.5in : 'margin-bottom'
+		+
+ 			(solve): 'bottom'
+		===================
+  			15px  : height of containing block
+
+		So, the solved bottom value must be -1.5in (or -144px).
+	*/
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a short blue bar and it does not touch the black line.</p>
+        <div id="div1">
+            <img alt="blue 15x15" src="support/blue15x15.png" />
+            <div></div>
+        </div>
+    </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-030.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-030.xht
new file mode 100644
index 0000000..4ca7977
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-030.xht
@@ -0,0 +1,78 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned inline replaced element with intrinsic height dimension and over-constrained values</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-05 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-height" />
+		<link rel="match" href="absolute-replaced-height-008-ref.xht" />
+
+        <meta name="flags" content="image" />
+        <meta name="assert" content="The 'height' is the intrinsic height when an absolutely positioned inline replaced element has an intrinsic height; if values are overconstrained, then solve for 'bottom'." />
+        <style type="text/css">
+            #div1
+            {
+                border-top: solid black;
+                position: relative;
+            }
+            div div
+            {
+                background: blue;
+                height: 15px;
+                left: 15px;
+                position: absolute;
+                top: 1in;
+                width: 15px;
+            }
+            img
+            {
+                bottom: 1in;
+                height: auto;
+                margin-bottom: 0.5in;
+                margin-top: 0.5in;
+                position: absolute;
+                top: 0.5in;
+                width: auto;
+            }
+
+			/*
+
+			0.5in   : top
+		+
+			0.5in   : margin-top
+		+
+			15px    : intrinsic height
+		+
+			0.5in   : margin-bottom
+		+
+			1in     : bottom
+		====================
+		   255px != 0px (height of containing block)
+		   Therefore, set bottom value must be ignored and
+		   the equation must be solved for bottom.
+
+
+			0.5in   : top
+		+
+			0.5in   : margin-top
+		+
+			15px    : intrinsic height
+		+
+			0.5in   : margin-bottom
+		+
+			(solve) : bottom
+		====================
+		   159px != 0px (height of containing block)
+		   Therefore, solved bottom value must be -159px
+			*/
+
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a short blue bar and it does not touch the black line.</p>
+        <div id="div1">
+            <img alt="blue 15x15" src="support/blue15x15.png" />
+            <div></div>
+        </div>
+    </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-031.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-031.xht
new file mode 100644
index 0000000..7931b8da
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-031.xht
@@ -0,0 +1,96 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned inline replaced element with intrinsic ratio, 'height' set to 'auto' and over-constrained values</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-05 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-height" />
+		<link rel="match" href="absolute-replaced-height-010-ref.xht" />
+
+        <meta name="flags" content="image" />
+        <meta name="assert" content="The 'height' is the used width divided by the intrinsic ratio when an absolutely positioned replaced element has an intrinsic ratio, 'height' is set to 'auto', with over-constrained values solves for 'bottom'." />
+        <style type="text/css">
+            #div1
+            {
+                border-top: solid black;
+                position: relative;
+            }
+            div div
+            {
+                background: blue;
+                height: 1in;
+                left: 1in;
+                position: absolute;
+                top: 1in;
+            }
+            img
+            {
+                bottom: 1in;
+                height: auto;
+                margin-bottom: 0.5in;
+                margin-top: 0.5in;
+                position: absolute;
+                top: 0.5in;
+            }
+            div div, img
+            {
+                width: 1in;
+            }
+
+	/*
+
+  			0.5in : 'top'
+		+
+  			0.5in : 'margin-top'
+		+
+  			0     : 'border-top-width'
+		+
+  			0     : 'padding-top'
+		+
+  			1in   : 'height' (used width) / (intrinsic ratio)
+		+
+  			0     : 'padding-bottom'
+		+
+  			0     : 'border-bottom-width'
+		+
+  			0.5in : 'margin-bottom'
+		+
+  			1in   : 'bottom'
+		===========
+  			436px  : height of containing block (0px)
+
+		So, bottom has to be ignored and forced to have the value that
+		will balance the equation. So, this brings up
+
+  			0.5in : 'top'
+		+
+  			0.5in : 'margin-top'
+		+
+  			0     : 'border-top-width'
+		+
+  			0     : 'padding-top'
+		+
+  			1in   : 'height' (used width) / (intrinsic ratio)
+		+
+  			0     : 'padding-bottom'
+		+
+  			0     : 'border-bottom-width'
+		+
+  			0.5in : 'margin-bottom'
+		+
+  			(solve): 'bottom'
+		===================
+ 			240px  : height of containing block (0px)
+
+  			So the solved bottom value should be -240px
+	*/
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a filled blue rectangle and it does not touch the black line.</p>
+        <div id="div1">
+            <img alt="blue 15x15" src="support/blue15x15.png" />
+            <div></div>
+        </div>
+    </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-032.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-032.xht
new file mode 100644
index 0000000..b0b404c
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-032.xht
@@ -0,0 +1,45 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolute positioned inline-block replaced element without intrinsic ratio, 'height' set to 'auto' and over-constrained values</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-05 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-height" />
+		<link rel="match" href="absolute-replaced-height-011-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="For an absolutely positioned inline-block replaced element, the 'height' is set to the largest rectangle that has a 2:1 ratio that is not greater than 150px and has a 'width' not greater than the device width. And with over-constrained values element solves for 'bottom'." />
+        <style type="text/css">
+            div
+            {
+                position: relative;
+            }
+            div div
+            {
+                border: solid green;
+                height: 150px;
+                position: absolute;
+                top: 1in;
+                width: 300px;
+            }
+            iframe
+            {
+                border: solid red;
+                bottom: 1in;
+                height: auto;
+                margin-bottom: 0.5in;
+                margin-top: 0.5in;
+                position: absolute;
+                top: 0.5in;
+                width: auto;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div>
+            <iframe></iframe>
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-033.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-033.xht
new file mode 100644
index 0000000..ca0efe12
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-033.xht
@@ -0,0 +1,95 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned inline-block element with percentage based height set to 'auto' and over-constrained values</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-05 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-height" />
+		<link rel="match" href="absolute-replaced-height-012-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="An absolutely positioned inline-block replaced element with percentage height resolves based on the containing block height when such height can be resolved." />
+        <style type="text/css">
+            #div1
+            {
+                position: relative;
+                height: 2in;
+            }
+            div div
+            {
+                border: solid green;
+                height: 1in;
+                position: absolute;
+                top: 1in;
+                width: 300px;
+            }
+            iframe
+            {
+                border: solid red;
+                bottom: 1in;
+                margin-bottom: 0.5in;
+                margin-top: 0.5in;
+                position: absolute;
+                top: 0.5in;
+                width: auto;
+            }
+
+			/*
+
+  			0.5in    : 'top'
+		+
+  			0.5in    : 'margin-top'
+		+
+  			3px      : 'border-top-width' medium which is often resolved as 3px
+		+
+  			0        : 'padding-top'
+		+
+  			1in      : 'height' 50% of height of containing block
+		+
+  			0        : 'padding-bottom'
+		+
+  			3px      : 'border-bottom-width' medium which is often resolved as 3px
+		+
+  			0.5in    : 'margin-bottom'
+		+
+  			1in      : 'bottom'
+		================
+  			342px    : height of containing block (192px)
+
+		So, bottom has to be ignored and forced to have the value that
+		will balance the equation. So, this brings up
+
+
+  			0.5in   : 'top'
+		+
+  			0.5in   : 'margin-top'
+		+
+  			3px     : 'border-top-width' medium which is often resolved as 3px
+		+
+  			0       : 'padding-top'
+		+
+  			1in     : 'height' 50% of height of containing block
+		+
+  			0       : 'padding-bottom'
+		+
+  			3px     : 'border-bottom-width' medium which is often resolved as 3px
+		+
+  			0.5in   : 'margin-bottom'
+		+
+  			(solve) : 'bottom'
+		================
+  			-246px   : height of containing block (192px)
+
+			So, the solved bottom value should be -54px .
+			*/
+
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <iframe height="50%"></iframe>
+            <div></div>
+        </div>
+    </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-034.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-034.xht
new file mode 100644
index 0000000..47dec54
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-034.xht
@@ -0,0 +1,47 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned inline replaced element with percentage based intrinsic height set to 'auto' and over-constrained values</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-height" />
+		<link rel="match" href="absolute-replaced-height-013-ref.xht" />
+
+        <meta name="flags" content="nonHTML svg" />
+        <meta name="assert" content="An absolutely positioned replaced element with percentage intrinsic height resolves based on the containing block when the replaced element is absolutely positioned." />
+        <style type="text/css">
+            #div1
+            {
+                border-top: solid black;
+                position: relative;
+                height: 2in;
+            }
+            div div
+            {
+                background: orange;
+                height: 1in;
+                left: 200px;
+                position: absolute;
+                top: 1in;
+                width: 200px;
+            }
+            svg
+            {
+                bottom: 1in;
+                margin-bottom: 0.5in;
+                margin-top: 0.5in;
+                position: absolute;
+                top: 0.5in;
+                width: auto;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if the blue and orange rectangles are next to each other, have the same height and are not touching the black line.</p>
+        <div id="div1">
+            <svg:svg version="1.1" xmlns:svg="http://www.w3.org/2000/svg" height="50%" baseProfile="full">
+                <svg:rect x="0" y="0" width="200" height="100" fill="blue" />
+            </svg:svg>
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-035.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-035.xht
new file mode 100644
index 0000000..209d93b
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-035.xht
@@ -0,0 +1,42 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolute replaced elements with percentage based intrinsic height that cannot be resolved and there are over-constrained values</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-height" />
+		<link rel="match" href="absolute-replaced-height-014-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="An absolutely positioned replaced element with a percentage height that cannot be resolved has no intrinsic height." />
+        <style type="text/css">
+            #div1
+            {
+                position: relative;
+            }
+            div div
+            {
+                border: solid green;
+                position: absolute;
+                top: 1in;
+                width: 300px;
+            }
+            iframe
+            {
+                border: solid red;
+                bottom: 1in;
+                margin-bottom: 0.5in;
+                margin-top: 0.5in;
+                position: absolute;
+                top: 0.5in;
+                width: auto;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <iframe height="50%"></iframe>
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-036.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-036.xht
new file mode 100644
index 0000000..96b53e6d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-height-036.xht
@@ -0,0 +1,65 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+  <title>CSS Test: Absolute Replaced Elements: specified 'top' and 'bottom' with auto margins</title>
+  <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/"/>
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visufx.html#clipping"/>
+  <link rel="match" href="../reference/ref-if-there-is-no-red.xht" />
+
+  <meta name="flags" content="image"/>
+  <meta name="assert" content="If 'top' and 'bottom' are specified on an
+    absolutely-positioned replaced element, then any remaining space is
+    split amongst the 'auto' vertical margins."/>
+  <style type="text/css">
+    .container {
+      position: relative;
+      width: 45px;
+      height: 45px;
+      /* Uncomment for debugging:
+         border: solid silver;
+         background: aqua; */
+    }
+    .abspos {
+      position: absolute;
+      top: 0; bottom: 0;
+      background: red;
+    }
+    .one {
+      margin: auto;
+      left: 0;
+    }
+    .two {
+      margin-top: auto;
+      left: 15px;
+    }
+    .three {
+      margin-bottom: auto;
+      right: 0;
+    }
+    .control1 {
+      height: 15px;
+      border-right: 15px solid red;
+    }
+    .control2 {
+      height: 15px;
+      border-left: 15px solid red;
+    }
+    .control3 {
+      height: 15px;
+      margin: 0 15px;
+      background: red;
+    }
+  </style>
+ </head>
+ <body>
+    <p>Test passes if there is <strong>no red</strong>.</p>
+    <div class="container">
+      <img class="abspos one" src="support/swatch-white.png" alt="FAIL: image support required"/>
+      <img class="abspos two" src="support/swatch-white.png" alt="FAIL: image support required"/>
+      <img class="abspos three" src="support/swatch-white.png" alt="FAIL: image support required"/>
+      <div class="control1"></div>
+      <div class="control2"></div>
+      <div class="control3"></div>
+    </div>
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-001-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-001-ref.xht
new file mode 100644
index 0000000..a973f10
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-001-ref.xht
@@ -0,0 +1,31 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div
+  {
+  border: black solid medium;
+  height: 192px;
+  width: 192px;
+  }
+
+  img {display: block;}
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if the blue and orange squares have the same width and the blue square is in the upper-left corner of an hollow black square.</p>
+
+  <div><img src="support/blue15x15.png" alt="Image download support must be enabled" /><img src="support/swatch-orange.png" alt="Image download support must be enabled" /></div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-001.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-001.xht
new file mode 100644
index 0000000..0b49129c
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-001.xht
@@ -0,0 +1,41 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned inline replaced element with 'auto' specified for 'margin-left', 'margin-right' and intrinsic width</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-06 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-width" />
+        <link rel="match" href="absolute-replaced-width-001-ref.xht" />
+
+        <meta name="flags" content="image" />
+        <meta name="assert" content="Computed value of 'auto' for 'margin-left' or margin-right' on absolutely positioned inline replaced element becomes a used value of '0'. If both 'left' and 'right' have the value 'auto' and if the 'direction' property of the element establishing the static-position containing block is 'ltr', then set 'left' to the static position. The intrinsic width is also used if 'height' and 'width' are 'auto'." />
+        <style type="text/css">
+            #div1
+            {
+                border: solid black;
+                height: 2in;
+                width: 2in;
+            }
+            img
+            {
+                margin-left: auto;
+                margin-right: auto;
+                position: absolute;
+            }
+            div div
+            {
+                background: orange;
+                height: 15px;
+                margin-top: 15px;
+                width: 15px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if the blue and orange squares have the same width and the blue square is in the upper-left corner of an hollow black square.</p>
+        <div id="div1">
+            <img alt="blue 15x15" src="support/blue15x15.png" />
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-002-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-002-ref.xht
new file mode 100644
index 0000000..515f5c3d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-002-ref.xht
@@ -0,0 +1,36 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div
+  {
+  border: black solid medium;
+  height: 288px;
+  width: 288px;
+  }
+
+  img
+  {
+  display: block;
+  height: 50px;
+  width: 200px;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if the blue and orange rectangles have the same width and the blue rectangle is in the upper-left corner of an hollow black square.</p>
+
+  <div><img src="support/blue15x15.png" alt="Image download support must be enabled" /><img src="support/swatch-orange.png" alt="Image download support must be enabled" /></div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-002.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-002.xht
new file mode 100644
index 0000000..23068fb
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-002.xht
@@ -0,0 +1,43 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned inline replaced element and 'auto' specified for 'margin-left', 'margin-right' and intrinsic height</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-07 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-width" />
+        <link rel="match" href="absolute-replaced-width-002-ref.xht" />
+
+        <meta name="flags" content="nonHTML svg" />
+        <meta name="assert" content="If an absolutely positioned inline replaced element       (like the svg element in this test) has no intrinsic width and no intrinsic ratio, then the used value of 'width' becomes 300px. Then, if both left and right values are 'auto' and the 'direction' property of the element establishing the static-position containing block is 'ltr', then set 'left' to the static position. If 'left' or 'right' are 'auto' (like in this test), then replace any 'auto' on 'margin-left' or 'margin-right' with '0'. If at this point there is an 'auto' left (like in this test: right is 'auto'), solve the equation for that value." />
+        <style type="text/css">
+            #div1
+            {
+                border: solid black;
+                height: 3in;
+                width: 3in;
+            }
+            svg
+            {
+                margin-left: auto;
+                margin-right: auto;
+                position: absolute;
+            }
+            div div
+            {
+                background: orange;
+                height: 50px;
+                margin-top: 50px;
+                width: 200px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if the blue and orange rectangles have the same width and the blue rectangle is in the upper-left corner of an hollow black square.</p>
+        <div id="div1">
+            <svg:svg version="1.1" xmlns:svg="http://www.w3.org/2000/svg" height="50" baseProfile="full">
+                <svg:rect x="0" y="0" width="200" height="100" fill="blue" />
+            </svg:svg>
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-003-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-003-ref.xht
new file mode 100644
index 0000000..b6ef3a1
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-003-ref.xht
@@ -0,0 +1,36 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div
+  {
+  border: black solid medium;
+  height: 288px;
+  width: 288px;
+  }
+
+  img
+  {
+  display: block;
+  height: 100px;
+  width: 200px;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if the blue and orange rectangles have the same width and the blue rectangle is in the upper-left corner of an hollow black square.</p>
+
+  <div><img src="support/blue15x15.png" alt="Image download support must be enabled" /><img src="support/swatch-orange.png" alt="Image download support must be enabled" /></div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-003.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-003.xht
new file mode 100644
index 0000000..5e1d5a7
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-003.xht
@@ -0,0 +1,59 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned inline replaced element with 'auto' specified for 'margin-left', 'margin-right', with no intrinsic width and no intrinsic ratio</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-07 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-width" />
+        <link rel="match" href="absolute-replaced-width-003-ref.xht" />
+
+        <meta name="flags" content="nonHTML svg" />
+        <meta name="assert" content="If an absolutely positioned inline replaced element       (like the svg element in this test) has no intrinsic width and no intrinsic ratio, then the used value of 'width' becomes 300px. Then, if both left and right values are 'auto' and the 'direction' property of the element establishing the static-position containing block is 'ltr', then set 'left' to the static position. If 'left' or 'right' are 'auto' (like in this test), then replace any 'auto' on 'margin-left' or 'margin-right' with '0'. If at this point there is an 'auto' left (like in this test: right is 'auto'), solve the equation for that value." />
+        <style type="text/css">
+            #div1
+            {
+                border: solid black;
+                height: 3in;
+                width: 3in;
+            }
+            svg
+            {
+                height: 100px;
+                margin-left: auto;
+                margin-right: auto;
+                position: absolute;
+            }
+
+			/*
+
+			In this test, the svg's containing block is the initial containing block.
+
+			The contraining equation should be balanced in the following manner:
+
+			left: will take the static position within its ltr containing block
+			margin-left: will become 0
+			width: will become 300px
+			margin-right: will become 0
+			right: will be the width of viewport minus 300px minus computed left value (body's margin-left plus border-left width == 11px)
+
+			*/
+
+            div div
+            {
+                background: orange;
+                height: 100px;
+                margin-top: 100px;
+                width: 200px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if the blue and orange rectangles have the same width and the blue rectangle is in the upper-left corner of an hollow black square.</p>
+        <div id="div1">
+            <svg:svg version="1.1" xmlns:svg="http://www.w3.org/2000/svg" height="50" baseProfile="full">
+                <svg:rect x="0" y="0" width="200" height="100" fill="blue" />
+            </svg:svg>
+            <div></div>
+        </div>
+    </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-003a-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-003a-ref.xht
new file mode 100644
index 0000000..0f49130
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-003a-ref.xht
@@ -0,0 +1,29 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div
+  {
+  background-color: green;
+  height: 150px;
+  width: 300px;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if there is a filled green rectangle and <strong>no red</strong>.</p>
+
+  <div></div>
+
+ </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-003a.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-003a.xht
new file mode 100644
index 0000000..4bc367b
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-003a.xht
@@ -0,0 +1,51 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+  <head>
+
+  <title>CSS Test: Absolutely positioned inline replaced element, 'auto' specified for 'margin-left', 'margin-right', no intrinsic height and no intrinsic width</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-width" />
+  <link rel="match" href="absolute-replaced-width-003a-ref.xht" />
+
+  <meta name="flags" content="nonHTML svg" />
+  <meta name="assert" content="If an absolutely positioned inline replaced element (like the svg element in this test) has no intrinsic width and no intrinsic height, then the used value of 'width' becomes 300px and the used value of 'height' becomes 150px. Then, if both left and right values are 'auto' and the 'direction' property of the element establishing the static-position containing block is 'ltr', then set 'left' to the static position. If 'left' or 'right' are 'auto' (like in this test), then replace any 'auto' on 'margin-left' or 'margin-right' with '0'. If at this point there is an 'auto' left (like in this test: right is 'auto'), solve the equation for that value." />
+
+  <style type="text/css"><![CDATA[
+  div
+  {
+  height: 225px;
+  width: 450px;
+  }
+
+  svg#overlapped-red {position: absolute;}
+
+  div#overlapping-green
+  {
+  background-color: green;
+  height: 150px;
+  left: auto;
+  position: absolute;
+  top: auto;
+  width: 300px;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if there is a filled green rectangle and <strong>no red</strong>.</p>
+
+  <div>
+      <svg:svg version="1.1" xmlns:svg="http://www.w3.org/2000/svg" baseProfile="full" id="overlapped-red">
+          <svg:rect x="0" y="0" width="600" height="300" fill="red" />
+      </svg:svg>
+
+      <div id="overlapping-green"></div>
+  </div>
+
+  </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-003b-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-003b-ref.xht
new file mode 100644
index 0000000..a5f3473
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-003b-ref.xht
@@ -0,0 +1,29 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div
+  {
+  background-color: green;
+  height: 150px;
+  width: 150px;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
+
+  <div></div>
+
+ </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-003b.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-003b.xht
new file mode 100644
index 0000000..7209ff2eb
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-003b.xht
@@ -0,0 +1,51 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+  <head>
+
+  <title>CSS Test: Absolutely positioned inline replaced element, 'auto' specified for 'margin-left', 'margin-right', no intrinsic height and no intrinsic ratio</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-width" />
+  <link rel="match" href="absolute-replaced-width-003b-ref.xht" />
+
+  <meta name="flags" content="nonHTML svg" />
+  <meta name="assert" content="If an absolutely positioned inline replaced element (like the svg element in this test) has no intrinsic height and no intrinsic ratio, then the used value of 'height' becomes 150px. Then, if both left and right values are 'auto' and the 'direction' property of the element establishing the static-position containing block is 'ltr', then set 'left' to the static position. If 'left' or 'right' are 'auto' (like in this test), then replace any 'auto' on 'margin-left' or 'margin-right' with '0'. If at this point there is an 'auto' left (like in this test: right is 'auto'), solve the equation for that value." />
+
+  <style type="text/css"><![CDATA[
+  div
+  {
+  height: 300px;
+  width: 300px;
+  }
+
+  svg#overlapped-red {position: absolute;}
+
+  div#overlapping-green
+  {
+  background-color: green;
+  height: 150px;
+  left: auto;
+  position: absolute;
+  top: auto;
+  width: 150px;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
+
+  <div>
+      <svg:svg version="1.1" xmlns:svg="http://www.w3.org/2000/svg" baseProfile="full" id="overlapped-red" width="150">
+          <svg:rect x="0" y="0" width="600" height="300" fill="red" />
+      </svg:svg>
+
+      <div id="overlapping-green"></div>
+  </div>
+
+  </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-003c-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-003c-ref.xht
new file mode 100644
index 0000000..7ac9d969
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-003c-ref.xht
@@ -0,0 +1,29 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div
+  {
+  background-color: green;
+  height: 300px;
+  width: 300px;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if there is a big filled green square and <strong>no red</strong>.</p>
+
+  <div></div>
+
+ </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-003c.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-003c.xht
new file mode 100644
index 0000000..c84cb162
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-003c.xht
@@ -0,0 +1,51 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+  <head>
+
+  <title>CSS Test: Absolutely positioned inline replaced element, 'auto' specified for 'margin-left', 'margin-right', no intrinsic width and no intrinsic ratio</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-width" />
+  <link rel="match" href="absolute-replaced-width-003c-ref.xht" />
+
+  <meta name="flags" content="nonHTML svg" />
+  <meta name="assert" content="If an absolutely positioned inline replaced element (like the svg element in this test) has no intrinsic width and no intrinsic ratio, then the used value of 'width' becomes 300px. Then, if both left and right values are 'auto' and the 'direction' property of the element establishing the static-position containing block is 'ltr', then set 'left' to the static position. If 'left' or 'right' are 'auto' (like in this test), then replace any 'auto' on 'margin-left' or 'margin-right' with '0'. If at this point there is an 'auto' left (like in this test: right is 'auto'), solve the equation for that value." />
+
+  <style type="text/css"><![CDATA[
+  div
+  {
+  height: 300px;
+  width: 600px;
+  }
+
+  svg#overlapped-red {position: absolute;}
+
+  div#overlapping-green
+  {
+  background-color: green;
+  height: 300px;
+  left: auto;
+  position: absolute;
+  top: auto;
+  width: 300px;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if there is a big filled green square and <strong>no red</strong>.</p>
+
+  <div>
+      <svg:svg version="1.1" xmlns:svg="http://www.w3.org/2000/svg" baseProfile="full" id="overlapped-red" height="300">
+          <svg:rect x="0" y="0" width="600" height="300" fill="red" />
+      </svg:svg>
+
+      <div id="overlapping-green"></div>
+  </div>
+
+  </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-004-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-004-ref.xht
new file mode 100644
index 0000000..e2b109a
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-004-ref.xht
@@ -0,0 +1,39 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div
+  {
+  border: black solid medium;
+  height: 288px;
+  width: 288px;
+  }
+
+  img
+  {
+  display: block;
+  height: 100px;
+  margin-bottom: 10px;
+  width: 200px;
+  }
+
+  img + img {height: 96px;}
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if the blue and orange rectangles have the same width and the blue rectangle is in the upper-left corner of an hollow black square.</p>
+
+  <div><img src="support/blue15x15.png" alt="Image download support must be enabled" /><img src="support/swatch-orange.png" alt="Image download support must be enabled" /></div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-004.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-004.xht
new file mode 100644
index 0000000..aaf1aa2
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-004.xht
@@ -0,0 +1,47 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned inline replaced element and 'auto' specified for 'margin-left', 'margin-right' and no intrinsic height or width</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-07 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-width" />
+        <link rel="match" href="absolute-replaced-width-004-ref.xht" />
+
+        <meta name="flags" content="nonHTML svg" />
+        <meta name="assert" content="If an absolutely positioned inline replaced element       (like the svg element in this test) has no intrinsic width and no intrinsic height, then the used value of 'width' becomes 300px and the used value of 'height' becomes 150px. Then, if both left and right values are 'auto' and the 'direction' property of the element establishing the static-position containing block is 'ltr', then set 'left' to the static position. If 'left' or 'right' are 'auto' (like in this test), then replace any 'auto' on 'margin-left' or 'margin-right' with '0'. If at this point there is an 'auto' left (like in this test: right is 'auto'), solve the equation for that value." />
+        <style type="text/css">
+            #div1
+            {
+                border: solid black;
+                height: 3in;
+                width: 3in;
+            }
+            #div2
+            {
+                height: 110px;
+                width: 3in;
+            }
+            #div3
+            {
+                background: orange;
+                height: 1in;
+                width: 200px;
+            }
+            svg
+            {
+                position: absolute;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if the blue and orange rectangles have the same width and the blue rectangle is in the upper-left corner of an hollow black square.</p>
+        <div id="div1">
+            <div id="div2">
+                <svg:svg version="1.1" xmlns:svg="http://www.w3.org/2000/svg" baseProfile="full">
+                    <svg:rect x="0" y="0" width="200" height="100" fill="blue" />
+                </svg:svg>
+            </div>
+            <div id="div3"></div>
+        </div>
+    </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-006-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-006-ref.xht
new file mode 100644
index 0000000..33f77e9
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-006-ref.xht
@@ -0,0 +1,36 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div
+  {
+  border: black solid medium;
+  height: 288px;
+  width: 192px;
+  }
+
+  img
+  {
+  display: block;
+  height: 96px;
+  width: 96px;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if the blue and orange squares have the same width and the blue square is in the upper-left corner of an hollow black rectangle.</p>
+
+  <div><img src="support/blue15x15.png" alt="Image download support must be enabled" /><img src="support/swatch-orange.png" alt="Image download support must be enabled" /></div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-006.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-006.xht
new file mode 100644
index 0000000..f503db8
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-006.xht
@@ -0,0 +1,42 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned inline replaced element and 'auto' specified for 'margin-left', 'margin-right' and width set to a percentage</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-07 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-width" />
+        <link rel="match" href="absolute-replaced-width-006-ref.xht" />
+
+        <meta name="flags" content="image" />
+        <meta name="assert" content="The width of an absolutely positioned inline replaced element set to a percentage is evaluated against its containing block's width." />
+        <style type="text/css">
+            #div1
+            {
+                border: solid black;
+                height: 3in;
+                position: relative;
+                width: 2in;
+            }
+            img
+            {
+                margin-left: auto;
+                margin-right: auto;
+                position: absolute;
+            }
+            div div
+            {
+                background: orange;
+                height: 1in;
+                margin-top: 1in;
+                width: 1in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if the blue and orange squares have the same width and the blue square is in the upper-left corner of an hollow black rectangle.</p>
+        <div id="div1">
+            <img alt="blue 15x15" src="support/blue15x15.png" width="50%" />
+            <div></div>
+        </div>
+    </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-008.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-008.xht
new file mode 100644
index 0000000..8aff9d5
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-008.xht
@@ -0,0 +1,43 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned inline replaced element with 'direction' as left-to-right, 'auto' specified for 'margin-left', 'margin-right', 'left', 'right' and intrinsic width</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-width" />
+        <link rel="match" href="absolute-replaced-width-001-ref.xht" />
+
+        <meta name="flags" content="image" />
+        <meta name="assert" content="Computed value of 'auto' for 'margin-left' or margin-right' on absolute replaced elements becomes a used value of '0'. The intrinsic width is also used if 'height' and 'width' are 'auto'." />
+        <style type="text/css">
+            #div1
+            {
+                border: solid black;
+                direction: ltr;
+                height: 2in;
+                width: 2in;
+            }
+            img
+            {
+                margin-left: auto;
+                margin-right: auto;
+                left: auto;
+                position: absolute;
+                right: auto;
+            }
+            div div
+            {
+                background: orange;
+                height: 15px;
+                margin-top: 15px;
+                width: 15px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if the blue and orange squares have the same width and the blue square is in the upper-left corner of an hollow black square.</p>
+        <div id="div1">
+            <img alt="blue 15x15" src="support/blue15x15.png" />
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-009.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-009.xht
new file mode 100644
index 0000000..c7749f8
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-009.xht
@@ -0,0 +1,62 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolute replaced elements with 'direction' as left-to-right, 'auto' specified for 'margin-left', 'margin-right', 'left', 'right' and intrinsic height</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-07 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-width" />
+        <link rel="match" href="absolute-replaced-width-002-ref.xht" />
+
+        <meta name="flags" content="nonHTML svg" />
+        <meta name="assert" content="If an absolutely positioned inline replaced element       (like the svg element in this test) has no intrinsic width and no intrinsic ratio, then the used value of 'width' becomes 300px. Then, if both left and right values are 'auto' and the 'direction' property of the element establishing the static-position containing block is 'ltr', then set 'left' to the static position. If 'left' or 'right' are 'auto' (like in this test), then replace any 'auto' on 'margin-left' or 'margin-right' with '0'. If at this point there is an 'auto' left (like in this test: right is 'auto'), solve the equation for that value." />
+        <style type="text/css">
+            #div1
+            {
+                border: solid black;
+                direction: ltr;
+                height: 3in;
+                position: relative;
+                width: 3in;
+            }
+            svg
+            {
+                margin-left: auto;
+                margin-right: auto;
+                left: auto;
+                position: absolute;
+                right: auto;
+            }
+
+			/*
+
+			In this test, the svg's containing block is div#div1.
+
+			The contraining equation should be balanced in the following manner:
+
+			left: will take the static position within its ltr containing block
+			margin-left: will become 0
+			width: will become 300px
+			margin-right: will become 0
+			right: will be the width of div#div1 minus 300px (288px minus 300px == -12px)
+
+			*/
+
+            div div
+            {
+                background: orange;
+                height: 50px;
+                margin-top: 50px;
+                width: 200px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if the blue and orange rectangles have the same width and the blue rectangle is in the upper-left corner of an hollow black square.</p>
+        <div id="div1">
+            <svg:svg version="1.1" xmlns:svg="http://www.w3.org/2000/svg" height="50" baseProfile="full">
+                <svg:rect x="0" y="0" width="200" height="100" fill="blue" />
+            </svg:svg>
+            <div></div>
+        </div>
+    </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-010.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-010.xht
new file mode 100644
index 0000000..9726341
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-010.xht
@@ -0,0 +1,62 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolute replaced elements with 'direction' as left-to-right, 'auto' specified for 'margin-left', 'margin-right', 'left', 'right' and 'height'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-07 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-width" />
+        <link rel="match" href="absolute-replaced-width-003-ref.xht" />
+
+        <meta name="flags" content="nonHTML svg" />
+        <meta name="assert" content="If an absolutely positioned inline replaced element       (like the svg element in this test) has no intrinsic width and no intrinsic ratio, then the used value of 'width' becomes 300px. Then, if both left and right values are 'auto' and the 'direction' property of the element establishing the static-position containing block is 'ltr', then set 'left' to the static position. If 'left' or 'right' are 'auto' (like in this test), then replace any 'auto' on 'margin-left' or 'margin-right' with '0'. If at this point there is an 'auto' left (like in this test: right is 'auto'), solve the equation for that value." />
+        <style type="text/css">
+            #div1
+            {
+                border: solid black;
+                direction: ltr;
+                height: 3in;
+                position: relative;
+                width: 3in;
+            }
+            svg
+            {
+                height: 100px;
+                margin-left: auto;
+                margin-right: auto;
+                left: auto;
+                position: absolute;
+                right: auto;
+            }
+
+			/*
+
+			In this test, the svg's containing block is div#div1.
+
+			The contraining equation should be balanced in the following manner:
+
+			left: will take the static position within its ltr containing block
+			margin-left: will become 0
+			width: will become 300px
+			margin-right: will become 0
+			right: will be the width of div#div1 minus 300px (288px minus 300px == -12px)
+
+			*/
+            div div
+            {
+                background: orange;
+                height: 100px;
+                margin-top: 100px;
+                width: 200px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if the blue and orange rectangles have the same width and the blue rectangle is in the upper-left corner of an hollow black square.</p>
+        <div id="div1">
+            <svg:svg version="1.1" xmlns:svg="http://www.w3.org/2000/svg" height="50" baseProfile="full">
+                <svg:rect x="0" y="0" width="200" height="100" fill="blue" />
+            </svg:svg>
+            <div></div>
+        </div>
+    </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-011.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-011.xht
new file mode 100644
index 0000000..346791eb
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-011.xht
@@ -0,0 +1,51 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned inline replaced element with 'direction' as left-to-right, 'auto' specified for 'margin-left', 'margin-right', 'left', 'right' and no intrinsic height or width</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-07 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-width" />
+        <link rel="match" href="absolute-replaced-width-004-ref.xht" />
+
+        <meta name="flags" content="nonHTML svg" />
+        <meta name="assert" content="If an absolutely positioned inline replaced element       (like the svg element in this test) has no intrinsic width and no intrinsic height, then the used value of 'width' becomes 300px and the used value of 'height' becomes 150px. Then, if both left and right values are 'auto' and the 'direction' property of the element establishing the static-position containing block is 'ltr', then set 'left' to the static position. If 'left' or 'right' are 'auto' (like in this test), then replace any 'auto' on 'margin-left' or 'margin-right' with '0'. If at this point there is an 'auto' left (like in this test: right is 'auto'), solve the equation for that value." />
+        <style type="text/css">
+            #div1
+            {
+                border: solid black;
+                direction: ltr;
+                height: 3in;
+                width: 3in;
+            }
+            #div2
+            {
+                height: 110px;
+                position: relative;
+                width: 3in;
+            }
+            #div3
+            {
+                background: orange;
+                height: 1in;
+                width: 200px;
+            }
+            svg
+            {
+                left: auto;
+                position: absolute;
+                right: auto;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if the blue and orange rectangles have the same width and the blue rectangle is in the upper-left corner of an hollow black square.</p>
+        <div id="div1">
+            <div id="div2">
+                <svg:svg version="1.1" xmlns:svg="http://www.w3.org/2000/svg" baseProfile="full">
+                    <svg:rect x="0" y="0" width="200" height="100" fill="blue" />
+                </svg:svg>
+            </div>
+            <div id="div3"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-013.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-013.xht
new file mode 100644
index 0000000..acaf18a9
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-013.xht
@@ -0,0 +1,44 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned inline replaced element with 'direction' as left-to-right, 'auto' specified for 'margin-left', 'margin-right', 'left', 'right' and percentage intrinsic width</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-width" />
+        <link rel="match" href="absolute-replaced-width-006-ref.xht" />
+
+        <meta name="flags" content="image" />
+        <meta name="assert" content="Percentage intrinsic widths are evaluated against the containing block's width." />
+        <style type="text/css">
+            #div1
+            {
+                border: solid black;
+                direction: ltr;
+                height: 3in;
+                position: relative;
+                width: 2in;
+            }
+            img
+            {
+                margin-left: auto;
+                margin-right: auto;
+                left: auto;
+                position: absolute;
+                right: auto;
+            }
+            div div
+            {
+                background: orange;
+                height: 1in;
+                margin-top: 1in;
+                width: 1in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if the blue and orange boxes below are the same width, and the blue box is in the upper-left corner of the black box.</p>
+        <div id="div1">
+            <img alt="blue 15x15" src="support/blue15x15.png" width="50%" />
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-015-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-015-ref.xht
new file mode 100644
index 0000000..20fd1c24
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-015-ref.xht
@@ -0,0 +1,36 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div
+  {
+  border: black solid medium;
+  height: 192px;
+  width: 192px;
+  }
+
+  img
+  {
+  display: block;
+  position: relative;
+  left: 177px;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if the blue and orange squares have the same width and the blue square is in the upper-right corner of an hollow black square.</p>
+
+  <div><img src="support/blue15x15.png" alt="Image download support must be enabled" /><img src="support/swatch-orange.png" alt="Image download support must be enabled" /></div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-015.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-015.xht
new file mode 100644
index 0000000..67b33ea
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-015.xht
@@ -0,0 +1,45 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned replaced element with 'direction' as right-to-left, 'auto' specified for 'margin-left', 'margin-right', 'left', 'right' and intrinsic width</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-07 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-width" />
+        <link rel="match" href="absolute-replaced-width-015-ref.xht" />
+
+        <meta name="flags" content="image" />
+        <meta name="assert" content="Computed value of 'auto' for 'margin-left' or margin-right' on absolutely positioned inline replaced element becomes a used value of '0'. If both 'left' and 'right' have the value 'auto' and if the 'direction' property of the element establishing the static-position containing block is 'rtl', then set 'right' to the static position. The intrinsic width is also used if 'height' and 'width' are 'auto'." />
+        <style type="text/css">
+            #div1
+            {
+                border: solid black;
+                direction: rtl;
+                height: 2in;
+                position: relative;
+                width: 2in;
+            }
+            img
+            {
+                margin-left: auto;
+                margin-right: auto;
+                left: auto;
+                position: absolute;
+                right: auto;
+            }
+            div div
+            {
+                background: orange;
+                height: 15px;
+                margin-top: 15px;
+                width: 15px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if the blue and orange squares have the same width and the blue square is in the upper-right corner of an hollow black square.</p>
+        <div id="div1">
+            <img alt="blue 15x15" src="support/blue15x15.png" />
+            <div></div>
+        </div>
+    </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-020-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-020-ref.xht
new file mode 100644
index 0000000..d9a42fd
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-020-ref.xht
@@ -0,0 +1,38 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div
+  {
+  border: black solid medium;
+  height: 288px;
+  width: 192px;
+  }
+
+  img
+  {
+  display: block;
+  height: 96px;
+  left: 96px;
+  position: relative;
+  width: 96px;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if the blue and orange squares have the same width and the blue square is in the upper-right corner of an hollow black rectangle.</p>
+
+  <div><img src="support/blue15x15.png" alt="Image download support must be enabled" /><img src="support/swatch-orange.png" alt="Image download support must be enabled" /></div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-020.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-020.xht
new file mode 100644
index 0000000..864df26
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-020.xht
@@ -0,0 +1,45 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned inline replaced element with 'direction' as right-to-left, 'auto' specified for 'margin-left', 'margin-right', 'left', 'right' and width set to a percentage</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-07 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-width" />
+        <link rel="match" href="absolute-replaced-width-020-ref.xht" />
+
+        <meta name="flags" content="image" />
+        <meta name="assert" content="The width of an absolutely positioned inline replaced element set to a percentage is evaluated against the containing block's width. If both 'left' and 'right' have the value 'auto' and if the 'direction' property of the element establishing the static-position containing block is 'rtl', then set 'right' to the static position." />
+        <style type="text/css">
+            #div1
+            {
+                border: solid black;
+                direction: rtl;
+                height: 3in;
+                position: relative;
+                width: 2in;
+            }
+            img
+            {
+                margin-left: auto;
+                margin-right: auto;
+                left: auto;
+                position: absolute;
+                right: auto;
+            }
+            div div
+            {
+                background: orange;
+                height: 1in;
+                margin-top: 1in;
+                width: 1in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if the blue and orange squares have the same width and the blue square is in the upper-right corner of an hollow black rectangle.</p>
+        <div id="div1">
+            <img alt="blue 15x15" src="support/blue15x15.png" width="50%" />
+            <div></div>
+        </div>
+    </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-022-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-022-ref.xht
new file mode 100644
index 0000000..64dfdb9
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-022-ref.xht
@@ -0,0 +1,38 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div
+  {
+  border: black solid medium;
+  height: 192px;
+  width: 192px;
+  }
+
+  img
+  {
+  display: block;
+  height: 96px;
+  left: 96px;
+  position: relative;
+  width: 96px;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if the blue and orange squares have the same width and the blue square is in the upper-right corner of an hollow black square.</p>
+
+  <div><img src="support/blue15x15.png" alt="Image download support must be enabled" /><img src="support/swatch-orange.png" alt="Image download support must be enabled" /></div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-022.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-022.xht
new file mode 100644
index 0000000..4af5887
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-022.xht
@@ -0,0 +1,62 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned inline replaced element with 'direction' as left-to-right, 'auto' specified for 'margin-left', 'margin-right', 'right' and intrinsic width</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-07 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-width" />
+        <link rel="match" href="absolute-replaced-width-022-ref.xht" />
+
+        <meta name="flags" content="image" />
+        <meta name="assert" content="The intrinsic width is used if 'height' and 'width' are 'auto'. Computed value of 'auto' for 'margin-left' or margin-right' on absolutely positioned inline replaced element becomes a used value of '0'. If at this point there is an 'auto' left (like right as in this test), solve the equation for that value." />
+        <style type="text/css">
+            #div1
+            {
+                border: solid black;
+                direction: ltr;
+                height: 2in;
+                position: relative;
+                width: 2in;
+            }
+            img
+            {
+                margin-left: auto;
+                margin-right: auto;
+                left: 1in;
+                position: absolute;
+                right: auto;
+            }
+
+			/*
+
+			1in			: left
+			0px (set)	: margin-left
+			1in			: width (intrinsic width)
+			0px (set)	: margin-right
+			(solve)		: right
+		=========================
+		    2in			: width of containing block (2in)
+
+		    Therefore , the used right offset must be 0px
+		    so that the contraining equation gets balanced.
+
+			*/
+
+            div div
+            {
+                background: orange;
+                height: 96px;
+                margin-left: 1in;
+                margin-top: 96px;
+                width: 96px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if the blue and orange squares have the same width and the blue square is in the upper-right corner of an hollow black square.</p>
+        <div id="div1">
+            <img alt="blue 96x96" src="support/blue96x96.png" />
+            <div></div>
+        </div>
+    </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-023-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-023-ref.xht
new file mode 100644
index 0000000..6d2990db
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-023-ref.xht
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div
+  {
+  border: black solid medium;
+  height: 296px;
+  width: 296px;
+  }
+
+  img
+  {
+  display: block;
+  height: 50px;
+  padding-left: 96px;
+  width: 200px;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if the blue and orange rectangles have the same width and the blue rectangle is in the upper-right corner of an hollow black square.</p>
+
+  <div><img src="support/blue15x15.png" alt="Image download support must be enabled" /><img src="support/swatch-orange.png" alt="Image download support must be enabled" /></div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-023.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-023.xht
new file mode 100644
index 0000000..93ac8a1
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-023.xht
@@ -0,0 +1,55 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned replaced element with 'direction' as left-to-right, 'auto' specified for 'margin-left', 'margin-right', 'right' and intrinsic height</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-width" />
+        <link rel="match" href="absolute-replaced-width-023-ref.xht" />
+
+        <meta name="flags" content="nonHTML svg" />
+        <meta name="assert" content="Computed value of 'auto' for 'margin-left' or margin-right' on absolutely positioned replaced element becomes a used value of '0'." />
+        <style type="text/css">
+            #div1
+            {
+                border: solid black;
+                direction: ltr;
+                height: 296px;
+                position: absolute;
+                width: auto;
+            }
+
+			/*
+			The svg's containing block has width: auto
+			in which case shrink-to-fit width
+			applies which is given by its non-positioned
+			content, which is its inner div.
+			*/
+
+            svg
+            {
+                margin-left: auto;
+                margin-right: auto;
+                left: 1in;
+                position: absolute;
+                right: auto;
+            }
+            div div
+            {
+                background: orange;
+                height: 50px;
+                margin-top: 50px;
+                margin-left: 1in;
+                width: 200px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if the blue and orange rectangles have the same width and the blue rectangle is in the upper-right corner of an hollow black square.</p>
+        <div id="div1">
+            <svg:svg version="1.1" xmlns:svg="http://www.w3.org/2000/svg" height="50" baseProfile="full">
+                <svg:rect x="0" y="0" width="200" height="100" fill="blue" />
+            </svg:svg>
+            <div></div>
+        </div>
+    </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-024-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-024-ref.xht
new file mode 100644
index 0000000..a53cc29
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-024-ref.xht
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div
+  {
+  border: black solid medium;
+  height: 288px;
+  width: 288px;
+  }
+
+  img
+  {
+  display: block;
+  height: 100px;
+  padding-left: 88px;
+  width: 200px;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if the blue and orange rectangles have the same width and the blue rectangle is in the upper-right corner of an hollow black square.</p>
+
+  <div><img src="support/blue15x15.png" alt="Image download support must be enabled" /><img src="support/swatch-orange.png" alt="Image download support must be enabled" /></div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-024.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-024.xht
new file mode 100644
index 0000000..73abd19
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-024.xht
@@ -0,0 +1,81 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned inline replaced element with 'direction' as left-to-right, 'auto' specified for 'margin-left', 'margin-right', 'right' and 'height'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-07 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-width" />
+        <link rel="match" href="absolute-replaced-width-024-ref.xht" />
+
+        <meta name="flags" content="nonHTML svg" />
+        <meta name="assert" content="Computed value of 'auto' for 'margin-left' or margin-right' on absolutely positioned inline replaced element becomes a used value of '0'." />
+        <style type="text/css">
+            #div1
+            {
+                border: solid black;
+                direction: ltr;
+                height: 288px;
+                position: absolute;
+                width: auto;
+            }
+
+			/*
+			The svg's containing block is div#div1 which
+			has width: auto. Therefore, shrink-to-fit width
+			will apply to div#div1.
+			Its non-positioned content is its
+			inner div which requires a
+			minimum of 288px. Therefore,
+			div#div1 shrink-to-fit width
+			will compute to 288px.
+			*/
+
+            svg
+            {
+                height: 100px;
+                margin-left: auto;
+                margin-right: auto;
+                left: 88px;
+                position: absolute;
+                right: auto;
+            }
+
+			/*
+
+			88px		: left
+		+
+			0px (set)	: margin-left
+		+
+			300px		: width (pre-defined fallback when intrinsic values are not defined)
+		+
+			0px (set)	: margin-right
+		+
+			(solve)		: right
+		=========================
+			388px		: width of containing block (div#div1 width is 288px)
+
+			Therefore, used right offset must be -100px so that the
+			constraining equation gets balanced.
+
+			*/
+
+            div div
+            {
+                background: orange;
+                height: 100px;
+                margin-left: 88px;
+                margin-top: 100px;
+                width: 200px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if the blue and orange rectangles have the same width and the blue rectangle is in the upper-right corner of an hollow black square.</p>
+        <div id="div1">
+            <svg:svg version="1.1" xmlns:svg="http://www.w3.org/2000/svg" height="50" baseProfile="full">
+                <svg:rect x="0" y="0" width="200" height="100" fill="blue" />
+            </svg:svg>
+            <div></div>
+        </div>
+    </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-025-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-025-ref.xht
new file mode 100644
index 0000000..afbb24e3
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-025-ref.xht
@@ -0,0 +1,40 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div
+  {
+  border: black solid medium;
+  height: 288px;
+  width: 288px;
+  }
+
+  img
+  {
+  display: block;
+  height: 100px;
+  margin-bottom: 10px;
+  padding-left: 88px;
+  width: 200px;
+  }
+
+  img + img {height: 96px;}
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if the blue and orange rectangles have the same width and the blue rectangle is in the upper-right corner of an hollow black square.</p>
+
+  <div><img src="support/blue15x15.png" alt="Image download support must be enabled" /><img src="support/swatch-orange.png" alt="Image download support must be enabled" /></div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-025.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-025.xht
new file mode 100644
index 0000000..8b5a78b3
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-025.xht
@@ -0,0 +1,72 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned inline replaced element with 'direction' as left-to-right, 'auto' specified for 'margin-left', 'margin-right', 'right' and no intrinsic height or width</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-07 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-width" />
+        <link rel="match" href="absolute-replaced-width-025-ref.xht" />
+
+        <meta name="flags" content="nonHTML svg" />
+        <meta name="assert" content="Computed value of 'auto' for 'margin-left' or margin-right' on absolutely positioned inline replaced element becomes a used value of '0'." />
+        <style type="text/css">
+            #div1
+            {
+                border: solid black;
+                direction: ltr;
+                height: 288px;
+                position: absolute;
+            }
+
+            #div2
+            {
+                height: 110px;
+                position: relative;
+                width: 3in;
+            }
+            #div3
+            {
+                background: orange;
+                height: 1in;
+                margin-left: 88px;
+                width: 200px;
+            }
+            svg
+            {
+                left: 88px;
+                position: absolute;
+                right: auto;
+            }
+
+			/*
+
+			88px		: left
+		+
+			0px (set)	: margin-left
+		+
+			300px		: width (pre-defined fallback when intrinsic values are not defined)
+		+
+			0px (set)	: margin-right
+		+
+			(solve)		: right
+		=========================
+			388px		: width of containing block (div#div2 width is 288px)
+
+			Therefore, used right offset must be -100px so that the
+			constraining equation gets balanced.
+
+			*/
+        </style>
+    </head>
+    <body>
+        <p>Test passes if the blue and orange rectangles have the same width and the blue rectangle is in the upper-right corner of an hollow black square.</p>
+        <div id="div1">
+            <div id="div2">
+                <svg:svg version="1.1" xmlns:svg="http://www.w3.org/2000/svg" baseProfile="full">
+                    <svg:rect x="0" y="0" width="200" height="100" fill="blue" />
+                </svg:svg>
+            </div>
+            <div id="div3"></div>
+        </div>
+    </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-027-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-027-ref.xht
new file mode 100644
index 0000000..3651c79
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-027-ref.xht
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div
+  {
+  border: black solid medium;
+  height: 288px;
+  width: 192px;
+  }
+
+  img
+  {
+  display: block;
+  height: 96px;
+  padding-left: 96px;
+  width: 96px;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if the blue and orange squares have the same width and the blue square is in the upper-left corner of an hollow black rectangle.</p>
+
+  <div><img src="support/blue15x15.png" alt="Image download support must be enabled" /><img src="support/swatch-orange.png" alt="Image download support must be enabled" /></div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-027.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-027.xht
new file mode 100644
index 0000000..e868877
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-027.xht
@@ -0,0 +1,46 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned replaced element with 'direction' as left-to-right, 'auto' specified for 'margin-left', 'margin-right', 'right' and percentage width</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-07 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-width" />
+        <link rel="match" href="absolute-replaced-width-027-ref.xht" />
+
+        <meta name="flags" content="image" />
+        <meta name="assert" content="The width of an absolutely positioned inline replaced element set to a percentage is evaluated against its containing block's width." />
+        <style type="text/css">
+            #div1
+            {
+                border: solid black;
+                direction: ltr;
+                height: 3in;
+                position: relative;
+                width: 2in;
+            }
+            img
+            {
+                margin-left: auto;
+                margin-right: auto;
+                left: 1in;
+                position: absolute;
+                right: auto;
+            }
+            div div
+            {
+                background: orange;
+                height: 1in;
+                margin-left: 1in;
+                margin-top: 1in;
+                width: 1in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if the blue and orange squares have the same width and the blue square is in the upper-right corner of an hollow black rectangle.</p>
+        <div id="div1">
+            <img alt="blue 15x15" src="support/blue15x15.png" width="50%" />
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-029.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-029.xht
new file mode 100644
index 0000000..4bd5131
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-029.xht
@@ -0,0 +1,62 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned inline replaced element with 'direction' as right-to-left, 'auto' specified for 'margin-left', 'margin-right', 'right' and intrinsic width</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-07 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-width" />
+        <link rel="match" href="absolute-replaced-width-022-ref.xht" />
+
+        <meta name="flags" content="image" />
+        <meta name="assert" content="The intrinsic width is used if 'height' and 'width' are 'auto'. Computed value of 'auto' for 'margin-left' or margin-right' on absolutely positioned inline replaced element becomes a used value of '0'. If at this point there is an 'auto' left (like right as in this test), solve the equation for that value." />
+        <style type="text/css">
+            #div1
+            {
+                border: solid black;
+                direction: rtl;
+                height: 2in;
+                position: relative;
+                width: 2in;
+            }
+            img
+            {
+                margin-left: auto;
+                margin-right: auto;
+                left: 1in;
+                position: absolute;
+                right: auto;
+            }
+
+			/*
+
+			1in			: left
+			0px (set)	: margin-left
+			1in			: width (intrinsic width)
+			0px (set)	: margin-right
+			(solve)		: right
+		=========================
+		    2in			: width of containing block (2in)
+
+		    Therefore , the used right offset must be 0px
+		    so that the contraining equation gets balanced.
+
+			*/
+
+            div div
+            {
+                background: orange;
+                height: 96px;
+                margin-left: 1in;
+                margin-top: 96px;
+                width: 96px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if the blue and orange squares have the same width and the blue square is in the upper-right corner of an hollow black square.</p>
+        <div id="div1">
+            <img alt="blue 96x96" src="support/blue96x96.png" />
+            <div></div>
+        </div>
+    </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-030.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-030.xht
new file mode 100644
index 0000000..524064f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-030.xht
@@ -0,0 +1,55 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned replaced element with 'direction' as right-to-left, 'auto' specified for 'margin-left', 'margin-right', 'right' and intrinsic height</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-width" />
+        <link rel="match" href="absolute-replaced-width-023-ref.xht" />
+
+        <meta name="flags" content="nonHTML svg" />
+        <meta name="assert" content="Computed value of 'auto' for 'margin-left' or margin-right' on absolutely positioned replaced element becomes a used value of '0'." />
+        <style type="text/css">
+            #div1
+            {
+                border: solid black;
+                direction: rtl;
+                height: 296px;
+                position: absolute;
+                width: auto;
+            }
+
+			/*
+			The svg's containing block (which is div#div1)
+			has width: auto in which case shrink-to-fit width
+			applies which is given by its non-positioned
+			content, which is its inner div.
+			*/
+
+            svg
+            {
+                margin-left: auto;
+                margin-right: auto;
+                left: 1in;
+                position: absolute;
+                right: auto;
+            }
+            div div
+            {
+                background: orange;
+                height: 50px;
+                margin-left: 1in;
+                margin-top: 50px;
+                width: 200px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if the blue and orange rectangles have the same width and the blue rectangle is in the upper-right corner of an hollow black square.</p>
+        <div id="div1">
+            <svg:svg version="1.1" xmlns:svg="http://www.w3.org/2000/svg" height="50" baseProfile="full">
+                <svg:rect x="0" y="0" width="200" height="100" fill="blue" />
+            </svg:svg>
+            <div></div>
+        </div>
+    </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-031.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-031.xht
new file mode 100644
index 0000000..494cb17
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-031.xht
@@ -0,0 +1,82 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned inline replaced element with 'direction' as right-to-left, 'auto' specified for 'margin-left', 'margin-right', 'right' and 'height'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-08 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-width" />
+        <link rel="match" href="absolute-replaced-width-024-ref.xht" />
+
+        <meta name="flags" content="nonHTML svg" />
+        <meta name="assert" content="Computed value of 'auto' for 'margin-left' or margin-right' on absolutely positioned inline replaced element becomes a used value of '0'." />
+        <style type="text/css">
+            #div1
+            {
+                border: solid black;
+                direction: rtl;
+                height: 3in;
+                position: absolute;
+                width: auto;
+            }
+
+			/*
+			The svg's containing block is div#div1 which
+			has width: auto. Therefore, shrink-to-fit width
+			will apply to div#div1.
+			Its non-positioned content is its
+			inner div which requires a
+			minimum of 288px. Therefore,
+			div#div1 shrink-to-fit width
+			will compute to 288px.
+			*/
+
+            svg
+            {
+                height: 100px;
+                margin-left: auto;
+                margin-right: auto;
+                left: 88px;
+                position: absolute;
+                right: auto;
+            }
+
+			/*
+
+			88px		: left
+		+
+			0px (set)	: margin-left
+		+
+			300px		: width (pre-defined fallback when intrinsic values are not defined)
+		+
+			0px (set)	: margin-right
+		+
+			(solve)		: right
+		=========================
+			388px		: width of containing block (div#div1 width is 288px)
+
+			Therefore, used right offset must be -100px so that the
+			constraining equation gets balanced.
+
+			*/
+
+
+            div div
+            {
+                background: orange;
+                height: 100px;
+                margin-left: 88px;
+                margin-top: 100px;
+                width: 200px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if the blue and orange rectangles have the same width and the blue rectangle is in the upper-right corner of an hollow black square.</p>
+        <div id="div1">
+            <svg:svg version="1.1" xmlns:svg="http://www.w3.org/2000/svg" height="50" baseProfile="full">
+                <svg:rect x="0" y="0" width="200" height="100" fill="blue" />
+            </svg:svg>
+            <div></div>
+        </div>
+    </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-032.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-032.xht
new file mode 100644
index 0000000..e9ef650e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-032.xht
@@ -0,0 +1,71 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned inline replaced element with 'direction' as right-to-left, 'auto' specified for 'margin-left', 'margin-right', 'right' and no intrinsic height or width</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-08 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-width" />
+        <link rel="match" href="absolute-replaced-width-025-ref.xht" />
+
+        <meta name="flags" content="nonHTML svg" />
+        <meta name="assert" content="Computed value of 'auto' for 'margin-left' or margin-right' on absolutely positioned inline replaced elements becomes a used value of '0'. The height and width are adjusted by the constraints for block-level, non-replaced elements." />
+        <style type="text/css">
+            #div1
+            {
+                border: solid black;
+                direction: rtl;
+                height: 3in;
+                position: absolute;
+            }
+            #div2
+            {
+                height: 110px;
+                position: relative;
+            }
+            #div3
+            {
+                background: orange;
+                height: 1in;
+                margin-left: 88px;
+                width: 200px;
+            }
+            svg
+            {
+                left: 88px;
+                position: absolute;
+                right: auto;
+            }
+
+			/*
+
+			88px		: left
+		+
+			0px (set)	: margin-left
+		+
+			300px		: width (pre-defined fallback when intrinsic values are not defined)
+		+
+			0px (set)	: margin-right
+		+
+			(solve)		: right
+		=========================
+			388px		: width of containing block (div#div2 width is 288px)
+
+			Therefore, used right offset must be -100px so that the
+			constraining equation gets balanced.
+
+			*/
+
+        </style>
+    </head>
+    <body>
+        <p>Test passes if the blue and orange rectangles have the same width and the blue rectangle is in the upper-right corner of an hollow black square.</p>
+        <div id="div1">
+            <div id="div2">
+                <svg:svg version="1.1" xmlns:svg="http://www.w3.org/2000/svg" baseProfile="full">
+                    <svg:rect x="0" y="0" width="200" height="100" fill="blue" />
+                </svg:svg>
+            </div>
+            <div id="div3"></div>
+        </div>
+    </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-034.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-034.xht
new file mode 100644
index 0000000..4d95609
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-034.xht
@@ -0,0 +1,45 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned inline replaced element with 'direction' as right-to-left, 'auto' specified for 'margin-left', 'margin-right', 'right' and percentage intrinsic width</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-08 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-width" />
+        <link rel="match" href="absolute-replaced-width-020-ref.xht" />
+
+        <meta name="flags" content="image" />
+        <meta name="assert" content="Percentage widths are evaluated against the containing block's width." />
+        <style type="text/css">
+            #div1
+            {
+                border: solid black;
+                direction: rtl;
+                height: 3in;
+                position: relative;
+                width: 2in;
+            }
+            img
+            {
+                margin-left: auto;
+                margin-right: auto;
+                left: 1in;
+                position: absolute;
+                right: auto;
+            }
+            div div
+            {
+                background: orange;
+                height: 1in;
+                margin-top: 1in;
+                width: 1in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if the blue and orange squares have the same width and the blue square is in the upper-right corner of an hollow black rectangle.</p>
+        <div id="div1">
+            <img alt="blue 15x15" src="support/blue15x15.png" width="50%" />
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-036-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-036-ref.xht
new file mode 100644
index 0000000..0c8262af
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-036-ref.xht
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div
+  {
+  border: black solid medium;
+  height: 192px;
+  width: 192px;
+  }
+
+  img
+  {
+  display: block;
+  height: 96px;
+  margin-left: 0.5in;
+  width: 96px;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if the blue and orange squares have the same width and are <strong>horizontally centered</strong> in an hollow black square.</p>
+
+  <div><img src="support/blue15x15.png" alt="Image download support must be enabled" /><img src="support/swatch-orange.png" alt="Image download support must be enabled" /></div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-036.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-036.xht
new file mode 100644
index 0000000..2a2647f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-036.xht
@@ -0,0 +1,47 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned inline replaced element with 'direction' as left-to-right, 'auto' specified for 'margin-left', 'margin-right' and intrinsic width</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-08 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-width" />
+        <link rel="match" href="absolute-replaced-width-036-ref.xht" />
+
+        <meta name="flags" content="image" />
+        <meta name="assert" content="Computed value of 'auto' for 'margin-left' or margin-right' on absolutely positioned inline replaced element becomes a used value of '0'. The intrinsic width is also used if 'height' and 'width' are 'auto'." />
+        <style type="text/css">
+            #div1
+            {
+                border: solid black;
+                direction: ltr;
+                height: 2in;
+                position: relative;
+                width: 2in;
+            }
+            img
+            {
+                margin-left: auto;
+                margin-right: auto;
+                left: 0.5in;
+                position: absolute;
+                right: 0.5in;
+            }
+            div div
+            {
+                background: orange;
+                height: 96px;
+                margin-left: 0.5in;
+                margin-right: 0.5in;
+                margin-top: 96px;
+                width: 96px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if the blue and orange squares have the same width and are <strong>horizontally centered</strong> in an hollow black square.</p>
+        <div id="div1">
+            <img alt="blue 96x96" src="support/blue96x96.png" />
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-037-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-037-ref.xht
new file mode 100644
index 0000000..beea7213
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-037-ref.xht
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div
+  {
+  border: black solid medium;
+  height: 288px;
+  width: 288px;
+  }
+
+  img
+  {
+  display: block;
+  height: 50px;
+  margin-left: 44px;
+  width: 200px;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if the blue and orange rectangles have the same width and are <strong>horizontally centered</strong> in an hollow black square.</p>
+
+  <div><img src="support/blue15x15.png" alt="Image download support must be enabled" /><img src="support/swatch-orange.png" alt="Image download support must be enabled" /></div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-037.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-037.xht
new file mode 100644
index 0000000..5eee8928
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-037.xht
@@ -0,0 +1,48 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned inline replaced element with 'direction' as left-to-right, 'auto' specified for 'margin-left', 'margin-right' and intrinsic height</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-08 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-width" />
+        <link rel="match" href="absolute-replaced-width-037-ref.xht" />
+
+        <meta name="flags" content="nonHTML svg" />
+        <meta name="assert" content="Computed value of 'auto' for 'margin-left' or margin-right' on absolutely positioned inline replaced element becomes a used value of '0'." />
+        <style type="text/css">
+            #div1
+            {
+                border: solid black;
+                direction: ltr;
+                height: 3in;
+                position: absolute;
+            }
+            svg
+            {
+                margin-left: auto;
+                margin-right: auto;
+                left: 44px;
+                position: absolute;
+                right: 44px;
+            }
+            div div
+            {
+                background: orange;
+                height: 50px;
+                margin-left: 44px;
+                margin-right: 44px;
+                margin-top: 50px;
+                width: 200px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if the blue and orange rectangles have the same width and are <strong>horizontally centered</strong> in an hollow black square.</p>
+        <div id="div1">
+            <svg:svg version="1.1" xmlns:svg="http://www.w3.org/2000/svg" height="50" baseProfile="full">
+                <svg:rect x="0" y="0" width="200" height="100" fill="blue" />
+            </svg:svg>
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-038-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-038-ref.xht
new file mode 100644
index 0000000..70b7177
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-038-ref.xht
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div
+  {
+  border: black solid medium;
+  height: 288px;
+  width: 288px;
+  }
+
+  img
+  {
+  display: block;
+  padding-left: 44px;
+  height: 100px;
+  width: 200px;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if the blue and orange rectangles have the same width and are <strong>horizontally centered</strong> in an hollow black square.</p>
+
+  <div><img src="support/blue15x15.png" alt="Image download support must be enabled" /><img src="support/swatch-orange.png" alt="Image download support must be enabled" /></div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-038.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-038.xht
new file mode 100644
index 0000000..0aae33b
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-038.xht
@@ -0,0 +1,49 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolute replaced elements with 'direction' as left-to-right, 'auto' specified for 'margin-left', 'margin-right' and 'height'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-08 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-width" />
+        <link rel="match" href="absolute-replaced-width-038-ref.xht" />
+
+        <meta name="flags" content="nonHTML svg" />
+        <meta name="assert" content="Computed value of 'auto' for 'margin-left' or margin-right' on absolutely positioned inline replaced element becomes a used value of '0'." />
+        <style type="text/css">
+            #div1
+            {
+                border: solid black;
+                direction: ltr;
+                height: 3in;
+                position: absolute;
+            }
+            svg
+            {
+                height: 100px;
+                margin-left: auto;
+                margin-right: auto;
+                left: 44px;
+                position: absolute;
+                right: 44px;
+            }
+            div div
+            {
+                background: orange;
+                height: 100px;
+                margin-left: 44px;
+                margin-right: 44px;
+                margin-top: 100px;
+                width: 200px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if the blue and orange rectangles have the same width and are <strong>horizontally centered</strong> in an hollow black square.</p>
+        <div id="div1">
+            <svg:svg version="1.1" xmlns:svg="http://www.w3.org/2000/svg" height="50" baseProfile="full">
+                <svg:rect x="0" y="0" width="200" height="100" fill="blue" />
+            </svg:svg>
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-039-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-039-ref.xht
new file mode 100644
index 0000000..f51f7e8
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-039-ref.xht
@@ -0,0 +1,40 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div
+  {
+  border: black solid medium;
+  height: 288px;
+  width: 288px;
+  }
+
+  img
+  {
+  display: block;
+  height: 100px;
+  margin-bottom: 10px;
+  padding-left: 44px;
+  width: 200px;
+  }
+
+  img + img {height: 96px;}
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if the blue and orange rectangles have the same width and are <strong>horizontally centered</strong> in an hollow black square.</p>
+
+  <div><img src="support/blue15x15.png" alt="Image download support must be enabled" /><img src="support/swatch-orange.png" alt="Image download support must be enabled" /></div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-039.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-039.xht
new file mode 100644
index 0000000..efade38
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-039.xht
@@ -0,0 +1,53 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned inline replaced element with 'direction' as left-to-right, 'auto' specified for 'margin-left', 'margin-right' and no intrinsic height or width</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-08 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-width" />
+        <link rel="match" href="absolute-replaced-width-039-ref.xht" />
+
+        <meta name="flags" content="nonHTML svg" />
+        <meta name="assert" content="Computed value of 'auto' for 'margin-left' or margin-right' on absolutely positioned inline replaced element becomes a used value of '0'. The height and width are adjusted by the constraints for block-level, non-replaced elements." />
+        <style type="text/css">
+            #div1
+            {
+                border: solid black;
+                direction: ltr;
+                height: 3in;
+                position: absolute;
+            }
+            #div2
+            {
+                height: 110px;
+                position: relative;
+                width: 3in;
+            }
+            #div3
+            {
+                background: orange;
+                height: 1in;
+                margin-left: 44px;
+                margin-right: 44px;
+                width: 200px;
+            }
+            svg
+            {
+                left: 44px;
+                position: absolute;
+                right: 44px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if the blue and orange rectangles have the same width and are <strong>horizontally centered</strong> in an hollow black square.</p>
+        <div id="div1">
+            <div id="div2">
+                <svg:svg version="1.1" xmlns:svg="http://www.w3.org/2000/svg" baseProfile="full">
+                    <svg:rect x="0" y="0" width="200" height="100" fill="blue" />
+                </svg:svg>
+            </div>
+            <div id="div3"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-041-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-041-ref.xht
new file mode 100644
index 0000000..893f359
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-041-ref.xht
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div
+  {
+  border: black solid medium;
+  height: 288px;
+  width: 192px;
+  }
+
+  img
+  {
+  display: block;
+  padding-left: 48px;
+  height: 96px;
+  width: 96px;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if the blue and orange squares have the same width and are <strong>horizontally centered</strong> in an hollow black rectangle.</p>
+
+  <div><img src="support/blue15x15.png" alt="Image download support must be enabled" /><img src="support/swatch-orange.png" alt="Image download support must be enabled" /></div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-041.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-041.xht
new file mode 100644
index 0000000..19e5350
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-041.xht
@@ -0,0 +1,47 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned inline replaced element with 'direction' as left-to-right, 'auto' specified for 'margin-left', 'margin-right' and percentage intrinsic width</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-08 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-width" />
+        <link rel="match" href="absolute-replaced-width-041-ref.xht" />
+
+        <meta name="flags" content="image" />
+        <meta name="assert" content="Percentage widths are evaluated against the containing block's width." />
+        <style type="text/css">
+            #div1
+            {
+                border: solid black;
+                direction: ltr;
+                height: 3in;
+                position: relative;
+                width: 2in;
+            }
+            img
+            {
+                margin-left: auto;
+                margin-right: auto;
+                left: 0.5in;
+                position: absolute;
+                right: 0.5in;
+            }
+            div div
+            {
+                background: orange;
+                height: 1in;
+                margin-left: 0.5in;
+                margin-right: 0.5in;
+                margin-top: 1in;
+                width: 1in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if the blue and orange squares have the same width and are <strong>horizontally centered</strong> in an hollow black rectangle.</p>
+        <div id="div1">
+            <img alt="blue 15x15" src="support/blue15x15.png" width="50%" />
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-043.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-043.xht
new file mode 100644
index 0000000..91e7ffe
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-043.xht
@@ -0,0 +1,47 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned inline replaced element with 'direction' as right-to-left, 'auto' specified for 'margin-left', 'margin-right' and intrinsic width</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-08 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-width" />
+        <link rel="match" href="absolute-replaced-width-036-ref.xht" />
+
+        <meta name="flags" content="image" />
+        <meta name="assert" content="Computed value of 'auto' for 'margin-left' or margin-right' on absolutely positioned inline replaced element becomes a used value of '0'. The intrinsic width is also used if 'height' and 'width' are 'auto'." />
+        <style type="text/css">
+            #div1
+            {
+                border: solid black;
+                direction: rtl;
+                height: 2in;
+                position: relative;
+                width: 2in;
+            }
+            img
+            {
+                margin-left: auto;
+                margin-right: auto;
+                left: 0.5in;
+                position: absolute;
+                right: 0.5in;
+            }
+            div div
+            {
+                background: orange;
+                height: 96px;
+                margin-left: 0.5in;
+                margin-right: 0.5in;
+                margin-top: 96px;
+                width: 96px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if the blue and orange squares have the same width and are <strong>horizontally centered</strong> in an hollow black square.</p>
+        <div id="div1">
+            <img alt="blue 96x96" src="support/blue96x96.png" />
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-048.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-048.xht
new file mode 100644
index 0000000..b22043e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-048.xht
@@ -0,0 +1,47 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned inline replaced element with 'direction' as right-to-left, 'auto' specified for 'margin-left', 'margin-right' and percentage intrinsic width</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-08 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-width" />
+        <link rel="match" href="absolute-replaced-width-041-ref.xht" />
+
+        <meta name="flags" content="image" />
+        <meta name="assert" content="Percentage widths are evaluated against the containing block's width." />
+        <style type="text/css">
+            #div1
+            {
+                border: solid black;
+                direction: rtl;
+                height: 3in;
+                position: relative;
+                width: 2in;
+            }
+            img
+            {
+                margin-left: auto;
+                margin-right: auto;
+                left: 0.5in;
+                position: absolute;
+                right: 0.5in;
+            }
+            div div
+            {
+                background: orange;
+                height: 1in;
+                margin-left: 0.5in;
+                margin-right: 0.5in;
+                margin-top: 1in;
+                width: 1in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if the blue and orange squares have the same width and are <strong>horizontally centered</strong> in an hollow black rectangle.</p>
+        <div id="div1">
+            <img alt="blue 15x15" src="support/blue15x15.png" width="50%" />
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-050.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-050.xht
new file mode 100644
index 0000000..4fb8a46
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-050.xht
@@ -0,0 +1,47 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned inline replaced element with 'direction' as left-to-right, 'auto' specified for 'margin-right' and intrinsic width</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-08 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-width" />
+        <link rel="match" href="absolute-replaced-width-036-ref.xht" />
+
+        <meta name="flags" content="image" />
+        <meta name="assert" content="Computed value of 'auto' for 'margin-left' or margin-right' on absolutely positioned inline replaced element becomes a used value of '0'. The intrinsic width is also used if 'height' and 'width' are 'auto'." />
+        <style type="text/css">
+            #div1
+            {
+                border: solid black;
+                direction: ltr;
+                height: 2in;
+                position: relative;
+                width: 2in;
+            }
+            img
+            {
+                margin-left: 0.25in;
+                margin-right: auto;
+                left: 0.25in;
+                position: absolute;
+                right: 0.5in;
+            }
+            div div
+            {
+                background: orange;
+                height: 96px;
+                margin-left: 0.5in;
+                margin-right: 0.5in;
+                margin-top: 96px;
+                width: 96px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if the blue and orange squares have the same width and are <strong>horizontally centered</strong> in an hollow black square.</p>
+        <div id="div1">
+            <img alt="blue 96x96" src="support/blue96x96.png" />
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-051.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-051.xht
new file mode 100644
index 0000000..40a32c3a7
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-051.xht
@@ -0,0 +1,48 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned inline replaced element with 'direction' as left-to-right, 'auto' specified for 'margin-right' and intrinsic height</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-08 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-width" />
+        <link rel="match" href="absolute-replaced-width-037-ref.xht" />
+
+        <meta name="flags" content="nonHTML svg" />
+        <meta name="assert" content="Computed value of 'auto' for 'margin-left' or margin-right' on absolutely positioned inline replaced element becomes a used value of '0'." />
+        <style type="text/css">
+            #div1
+            {
+                border: solid black;
+                direction: ltr;
+                height: 3in;
+                position: absolute;
+            }
+            svg
+            {
+                left: 22px;
+                margin-left: 22px;
+                margin-right: auto;
+                position: absolute;
+                right: 44px;
+            }
+            div div
+            {
+                background: orange;
+                height: 50px;
+                margin-left: 44px;
+                margin-right: 44px;
+                margin-top: 50px;
+                width: 200px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if the blue and orange rectangles have the same width and are <strong>horizontally centered</strong> in an hollow black square.</p>
+        <div id="div1">
+            <svg:svg version="1.1" xmlns:svg="http://www.w3.org/2000/svg" height="50" baseProfile="full">
+                <svg:rect x="0" y="0" width="200" height="100" fill="blue" />
+            </svg:svg>
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-052.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-052.xht
new file mode 100644
index 0000000..05416bb
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-052.xht
@@ -0,0 +1,49 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned inline replaced element with 'direction' as left-to-right, 'auto' specified for 'margin-right' and 'height'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-08 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-width" />
+        <link rel="match" href="absolute-replaced-width-038-ref.xht" />
+
+        <meta name="flags" content="nonHTML svg" />
+        <meta name="assert" content="Computed value of 'auto' for 'margin-left' or margin-right' on absolutely positioned inline replaced element becomes a used value of '0'." />
+        <style type="text/css">
+            #div1
+            {
+                border: solid black;
+                direction: ltr;
+                height: 3in;
+                position: absolute;
+            }
+            svg
+            {
+                height: 100px;
+                left: 22px;
+                margin-left: 22px;
+                margin-right: auto;
+                position: absolute;
+                right: 44px;
+            }
+            div div
+            {
+                background: orange;
+                height: 100px;
+                margin-left: 44px;
+                margin-right: 44px;
+                margin-top: 100px;
+                width: 200px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if the blue and orange rectangles have the same width and are <strong>horizontally centered</strong> in an hollow black square.</p>
+        <div id="div1">
+            <svg:svg version="1.1" xmlns:svg="http://www.w3.org/2000/svg" height="50" baseProfile="full">
+                <svg:rect x="0" y="0" width="200" height="100" fill="blue" />
+            </svg:svg>
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-053.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-053.xht
new file mode 100644
index 0000000..28c77ae
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-053.xht
@@ -0,0 +1,55 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned inline replaced element with 'direction' as left-to-right, 'auto' specified for 'margin-right' and no intrinsic height or width</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-08 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-width" />
+        <link rel="match" href="absolute-replaced-width-039-ref.xht" />
+
+        <meta name="flags" content="nonHTML svg" />
+        <meta name="assert" content="Computed value of 'auto' for 'margin-left' or margin-right' on absolutely positioned inline replaced element becomes a used value of '0'. The height and width are adjusted by the constraints for block-level, non-replaced elements." />
+        <style type="text/css">
+            #div1
+            {
+                border: solid black;
+                direction: ltr;
+                height: 3in;
+                position: absolute;
+            }
+            #div2
+            {
+                height: 110px;
+                position: relative;
+                width: 3in;
+            }
+            #div3
+            {
+                background: orange;
+                height: 1in;
+                margin-left: 44px;
+                margin-right: 44px;
+                width: 200px;
+            }
+            svg
+            {
+                left: 22px;
+                margin-left: 22px;
+                margin-right: auto;
+                position: absolute;
+                right: 44px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if the blue and orange rectangles have the same width and are <strong>horizontally centered</strong> in an hollow black square.</p>
+        <div id="div1">
+            <div id="div2">
+                <svg:svg version="1.1" xmlns:svg="http://www.w3.org/2000/svg" baseProfile="full">
+                    <svg:rect x="0" y="0" width="200" height="100" fill="blue" />
+                </svg:svg>
+            </div>
+            <div id="div3"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-055.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-055.xht
new file mode 100644
index 0000000..7a5bdea4
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-055.xht
@@ -0,0 +1,47 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned inline replaced element with 'direction' as left-to-right, 'auto' specified for 'margin-right' and percentage intrinsic width</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-08 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-width" />
+        <link rel="match" href="absolute-replaced-width-041-ref.xht" />
+
+        <meta name="flags" content="image" />
+        <meta name="assert" content="Percentage widths are evaluated against the containing block's width." />
+        <style type="text/css">
+            #div1
+            {
+                border: solid black;
+                direction: ltr;
+                height: 3in;
+                position: relative;
+                width: 2in;
+            }
+            img
+            {
+                margin-left: 0.25in;
+                margin-right: auto;
+                left: 0.25in;
+                position: absolute;
+                right: 0.5in;
+            }
+            div div
+            {
+                background: orange;
+                height: 1in;
+                margin-left: 0.5in;
+                margin-right: 0.5in;
+                margin-top: 1in;
+                width: 1in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if the blue and orange squares have the same width and are <strong>horizontally centered</strong> in an hollow black rectangle.</p>
+        <div id="div1">
+            <img alt="blue 15x15" src="support/blue15x15.png" width="50%" />
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-057.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-057.xht
new file mode 100644
index 0000000..a3198d5
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-057.xht
@@ -0,0 +1,47 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned inline replaced element with 'direction' as right-to-left, 'auto' specified for 'margin-right' and intrinsic width</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-08 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-width" />
+        <link rel="match" href="absolute-replaced-width-036-ref.xht" />
+
+        <meta name="flags" content="image" />
+        <meta name="assert" content="Computed value of 'auto' for 'margin-left' or margin-right' on absolutely positioned inline replaced element becomes a used value of '0'. The intrinsic width is also used if 'height' and 'width' are 'auto'." />
+        <style type="text/css">
+            #div1
+            {
+                border: solid black;
+                direction: rtl;
+                height: 2in;
+                position: relative;
+                width: 2in;
+            }
+            img
+            {
+                left: 0.25in;
+                margin-left: 0.25in;
+                margin-right: auto;
+                position: absolute;
+                right: 0.5in;
+            }
+            div div
+            {
+                background: orange;
+                height: 96px;
+                margin-left: 0.5in;
+                margin-right: 0.5in;
+                margin-top: 96px;
+                width: 96px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if the blue and orange squares have the same width and are <strong>horizontally centered</strong> in an hollow black square.</p>
+        <div id="div1">
+            <img alt="blue 96x96" src="support/blue96x96.png" />
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-062.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-062.xht
new file mode 100644
index 0000000..ad2cdef
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-062.xht
@@ -0,0 +1,47 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned inline replaced element with 'direction' as right-to-left, 'auto' specified for 'margin-right' and percentage width</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-08 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-width" />
+        <link rel="match" href="absolute-replaced-width-041-ref.xht" />
+
+        <meta name="flags" content="image" />
+        <meta name="assert" content="Percentage widths are evaluated against the containing block's width." />
+        <style type="text/css">
+            #div1
+            {
+                border: solid black;
+                direction: rtl;
+                height: 3in;
+                position: relative;
+                width: 2in;
+            }
+            img
+            {
+                left: 0.25in;
+                margin-left: 0.25in;
+                margin-right: auto;
+                position: absolute;
+                right: 0.5in;
+            }
+            div div
+            {
+                background: orange;
+                height: 1in;
+                margin-left: 0.5in;
+                margin-right: 0.5in;
+                margin-top: 1in;
+                width: 1in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if the blue and orange squares have the same width and are <strong>horizontally centered</strong> in an hollow black rectangle.</p>
+        <div id="div1">
+            <img alt="blue 15x15" src="support/blue15x15.png" width="50%" />
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-064.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-064.xht
new file mode 100644
index 0000000..b29c913
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-064.xht
@@ -0,0 +1,47 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned inline replaced element with 'direction' as left-to-right, intrinsic width and over-constrained situation</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-08 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-width" />
+        <link rel="match" href="absolute-replaced-width-036-ref.xht" />
+
+        <meta name="flags" content="image" />
+        <meta name="assert" content="Computed value of 'auto' for 'margin-left' or margin-right' on absolutely positioned inline replaced element becomes a used value of '0'. The intrinsic width is also used if 'height' and 'width' are 'auto'." />
+        <style type="text/css">
+            #div1
+            {
+                border: solid black;
+                direction: ltr;
+                height: 2in;
+                position: relative;
+                width: 2in;
+            }
+            img
+            {
+                left: 0.25in;
+                margin-left: 0.25in;
+                margin-right: 0.5in;
+                position: absolute;
+                right: 0.5in;
+            }
+            div div
+            {
+                background: orange;
+                height: 96px;
+                margin-left: 0.5in;
+                margin-right: 0.5in;
+                margin-top: 96px;
+                width: 96px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if the blue and orange squares have the same width and are <strong>horizontally centered</strong> in an hollow black square.</p>
+        <div id="div1">
+            <img alt="blue 96x96" src="support/blue96x96.png" />
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-065.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-065.xht
new file mode 100644
index 0000000..27b845a
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-065.xht
@@ -0,0 +1,48 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned inline replaced element with 'direction' as left-to-right, intrinsic height and over-constrained situation</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-08 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-width" />
+        <link rel="match" href="absolute-replaced-width-037-ref.xht" />
+
+        <meta name="flags" content="nonHTML svg" />
+        <meta name="assert" content="Computed value of 'auto' for 'margin-left' or margin-right' on absolutely positioned inline replaced element becomes a used value of '0'." />
+        <style type="text/css">
+            #div1
+            {
+                border: solid black;
+                direction: ltr;
+                height: 3in;
+                position: absolute;
+            }
+            svg
+            {
+                left: 22px;
+                margin-left: 22px;
+                margin-right: 44px;
+                position: absolute;
+                right: 44px;
+            }
+            div div
+            {
+                background: orange;
+                height: 50px;
+                margin-left: 44px;
+                margin-right: 44px;
+                margin-top: 50px;
+                width: 200px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if the blue and orange rectangles have the same width and are <strong>horizontally centered</strong> in an hollow black square.</p>
+        <div id="div1">
+            <svg:svg version="1.1" xmlns:svg="http://www.w3.org/2000/svg" height="50" baseProfile="full">
+                <svg:rect x="0" y="0" width="200" height="100" fill="blue" />
+            </svg:svg>
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-066.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-066.xht
new file mode 100644
index 0000000..907bf00
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-066.xht
@@ -0,0 +1,49 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned inline replaced element with 'direction' as left-to-right, 'height' and over-constrained situation</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-08 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-width" />
+        <link rel="match" href="absolute-replaced-width-038-ref.xht" />
+
+        <meta name="flags" content="nonHTML svg" />
+        <meta name="assert" content="Computed value of 'auto' for 'margin-left' or margin-right' on absolutely positioned inline replaced element becomes a used value of '0'." />
+        <style type="text/css">
+            #div1
+            {
+                border: solid black;
+                direction: ltr;
+                height: 3in;
+                position: absolute;
+            }
+            svg
+            {
+                height: 100px;
+                left: 22px;
+                margin-left: 22px;
+                margin-right: 44px;
+                position: absolute;
+                right: 44px;
+            }
+            div div
+            {
+                background: orange;
+                height: 100px;
+                margin-left: 44px;
+                margin-right: 44px;
+                margin-top: 100px;
+                width: 200px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if the blue and orange rectangles have the same width and are <strong>horizontally centered</strong> in an hollow black square.</p>
+        <div id="div1">
+            <svg:svg version="1.1" xmlns:svg="http://www.w3.org/2000/svg" height="50" baseProfile="full">
+                <svg:rect x="0" y="0" width="200" height="100" fill="blue" />
+            </svg:svg>
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-067.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-067.xht
new file mode 100644
index 0000000..5d7f623
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-067.xht
@@ -0,0 +1,55 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned inline replaced element with 'direction' as left-to-right, no intrinsic height or width and over-constrained situation</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-08 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-width" />
+        <link rel="match" href="absolute-replaced-width-039-ref.xht" />
+
+        <meta name="flags" content="nonHTML svg" />
+        <meta name="assert" content="Computed value of 'auto' for 'margin-left' or margin-right' on absolutely positioned inline replaced element becomes a used value of '0'. The height and width are adjusted by the constraints for block-level, non-replaced elements." />
+        <style type="text/css">
+            #div1
+            {
+                border: solid black;
+                direction: ltr;
+                height: 3in;
+                position: absolute;
+            }
+            #div2
+            {
+                height: 110px;
+                position: relative;
+                width: 3in;
+            }
+            #div3
+            {
+                background: orange;
+                height: 1in;
+                margin-left: 44px;
+                margin-right: 44px;
+                width: 200px;
+            }
+            svg
+            {
+                left: 22px;
+                margin-left: 22px;
+                margin-right: 44px;
+                position: absolute;
+                right: 44px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if the blue and orange rectangles have the same width and are <strong>horizontally centered</strong> in an hollow black square.</p>
+        <div id="div1">
+            <div id="div2">
+                <svg:svg version="1.1" xmlns:svg="http://www.w3.org/2000/svg" baseProfile="full">
+                    <svg:rect x="0" y="0" width="200" height="100" fill="blue" />
+                </svg:svg>
+            </div>
+            <div id="div3"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-069.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-069.xht
new file mode 100644
index 0000000..be33590
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-069.xht
@@ -0,0 +1,47 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned inline replaced element with 'direction' as left-to-right, percentage intrinsic width and over-constrained situation</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-08 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-width" />
+        <link rel="match" href="absolute-replaced-width-041-ref.xht" />
+
+        <meta name="flags" content="image" />
+        <meta name="assert" content="Percentage widths are evaluated against the containing block's width." />
+        <style type="text/css">
+            #div1
+            {
+                border: solid black;
+                direction: ltr;
+                height: 3in;
+                position: relative;
+                width: 2in;
+            }
+            img
+            {
+                left: 0.25in;
+                margin-left: 0.25in;
+                margin-right: 0.5in;
+                position: absolute;
+                right: 0.5in;
+            }
+            div div
+            {
+                background: orange;
+                height: 1in;
+                margin-left: 0.5in;
+                margin-right: 0.5in;
+                margin-top: 1in;
+                width: 1in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if the blue and orange squares have the same width and are <strong>horizontally centered</strong> in an hollow black rectangle.</p>
+        <div id="div1">
+            <img alt="blue 15x15" src="support/blue15x15.png" width="50%" />
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-071.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-071.xht
new file mode 100644
index 0000000..711ac8a
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-071.xht
@@ -0,0 +1,47 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned inline replaced element with 'direction' as right-to-left, intrinsic width and over-constrained situation</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-08 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-width" />
+        <link rel="match" href="absolute-replaced-width-036-ref.xht" />
+
+        <meta name="flags" content="image" />
+        <meta name="assert" content="Computed value of 'auto' for 'margin-left' or margin-right' on absolutely positioned inline replaced element becomes a used value of '0'. The intrinsic width is also used if 'height' and 'width' are 'auto'." />
+        <style type="text/css">
+            #div1
+            {
+                border: solid black;
+                direction: rtl;
+                height: 2in;
+                position: relative;
+                width: 2in;
+            }
+            img
+            {
+                left: 0.5in;
+                margin-left: 0.5in;
+                margin-right: 0.25in;
+                position: absolute;
+                right: 0.25in;
+            }
+            div div
+            {
+                background: orange;
+                height: 96px;
+                margin-left: 0.5in;
+                margin-right: 0.5in;
+                margin-top: 96px;
+                width: 96px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if the blue and orange squares have the same width and are <strong>horizontally centered</strong> in an hollow black square.</p>
+        <div id="div1">
+            <img alt="blue 96x96" src="support/blue96x96.png" />
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-076.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-076.xht
new file mode 100644
index 0000000..129e3a1
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/absolute-replaced-width-076.xht
@@ -0,0 +1,47 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned inline replaced element with 'direction' as right-to-left, percentage intrinsic width and over-constrained situation</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-08 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-replaced-width" />
+        <link rel="match" href="absolute-replaced-width-041-ref.xht" />
+
+        <meta name="flags" content="image" />
+        <meta name="assert" content="Percentage widths are evaluated against the containing block's width." />
+        <style type="text/css">
+            #div1
+            {
+                border: solid black;
+                direction: rtl;
+                height: 3in;
+                position: relative;
+                width: 2in;
+            }
+            img
+            {
+                left: 0.5in;
+                margin-left: 0.5in;
+                margin-right: 0.25in;
+                position: absolute;
+                right: 0.25in;
+            }
+            div div
+            {
+                background: orange;
+                height: 1in;
+                margin-left: 0.5in;
+                margin-right: 0.5in;
+                margin-top: 1in;
+                width: 1in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if the blue and orange squares have the same width and are <strong>horizontally centered</strong> in an hollow black rectangle.</p>
+        <div id="div1">
+            <img alt="blue 15x15" src="support/blue15x15.png" width="50%" />
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-001-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-001-ref.xht
new file mode 100644
index 0000000..0772592
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-001-ref.xht
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  body {margin: 1em;}
+
+  p {padding-bottom: 1em;}
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if there is a green stripe and no red.</p>
+
+  <div><img src="support/swatch-green.png" width="160" height="16" alt="Image download support must be enabled" /></div>
+
+ </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-001.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-001.xht
new file mode 100644
index 0000000..b8cd1af
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-001.xht
@@ -0,0 +1,30 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+  <title>CSS Test: CSS Absolute Positioning: static position after previous margin</title>
+  <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+  <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/absolute/001.xml" type="application/xhtml+xml"/>
+  <link rel="reviewer" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/>
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#comp-abspos" />
+  <link rel="match" href="abspos-001-ref.xht" />
+
+     <style type="text/css">
+   /* Set Up Conditions */
+   * { margin: 0; padding: 0; border: 0;
+       position: static; float: none; display: block;
+       top: auto; left: auto; right: auto; bottom: auto; }
+   head { display: none; }
+   body { padding: 1em; }
+   /* Test */
+   .margin { margin-bottom: 2em; }
+   .abs { position: absolute; background: green; z-index: 1; height: 1em; width: 10em; }
+   .flow { background: red; height: 1em; width: 10em; }
+  </style>
+ </head>
+ <body>
+
+  <div class="margin">Test passes if there is a green stripe and no red.</div>
+  <div class="abs"/> <div class="flow"/>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-002-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-002-ref.xht
new file mode 100644
index 0000000..9fe437c2
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-002-ref.xht
@@ -0,0 +1,29 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div
+  {
+  border: blue solid 16px;
+  height: 32px;
+  width: 64px;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if there is a hollow blue rectangle.</p>
+
+  <div></div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-002.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-002.xht
new file mode 100644
index 0000000..5d4ca5f2f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-002.xht
@@ -0,0 +1,32 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+  <title>CSS Test: Positioning with a relpos ancestor containing block</title>
+  <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+  <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/>
+  <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-08 -->
+  <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/absolute/023.xml" type="application/xhtml+xml"/>
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#comp-abspos" />
+  <link rel="match" href="abspos-002-ref.xht" />
+
+  <style type="text/css">
+   .container { position: relative; background: red; width: 6em;
+                border-top: 1em solid blue; }
+   .test { position: absolute; height: 2em; width: 4em;
+           background: white; color: green;
+           border: solid 1em blue;
+           border-top: none;}
+  </style>
+ </head>
+ <body>
+  <p>Test passes if there is a hollow blue rectangle.</p>
+  <div class="container">
+   <div>
+    <div>
+     <div class="test">
+     </div>
+    </div>
+   </div>
+  </div>
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-003.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-003.xht
new file mode 100644
index 0000000..e78aa51
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-003.xht
@@ -0,0 +1,25 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
+<head>
+  <title>CSS Test: Positioning relative to the ICB: short root element</title>
+  <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+  <link rel="reviewer" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/>
+  <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/absolute/005-demo.html" type="text/html"/>
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#comp-abspos"/>
+  <style type="text/css">
+   p { margin: 0; padding: 0.5em; }
+   .absolute { position: absolute; bottom: 0; left: 0; right: 0;
+               height: 5em; border: solid blue; }
+   .control { border: solid yellow; }
+   * { margin: 0; padding: 0; }
+  </style>
+ </head>
+ <body>
+  <p class="absolute">This blue box should be at the bottom of the viewport
+    / first page.</p>
+  <p class="control">This yellow box should be at the top of the
+    viewport or first page. There should also be a blue box visible at the
+    bottom of the viewport / page. </p>
+
+</body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-004.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-004.xht
new file mode 100644
index 0000000..19d729cd
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-004.xht
@@ -0,0 +1,24 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
+<head>
+  <title>CSS Test: Positioning relative to the ICB: long root element</title>
+  <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+  <link rel="reviewer" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/>
+  <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/absolute/006-demo.html" type="text/html"/>
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#comp-abspos"/>
+  <style type="text/css">
+   .absolute { position: absolute; bottom: 0; left: 0; right: 0;
+               height: 5em; border: solid blue; }
+   html { height: 300em; min-height: 150%; border: orange; border-style: none solid; }
+   .control { border: solid yellow; }
+   * { margin: 0; padding: 0; }
+  </style>
+ </head>
+ <body>
+  <p class="absolute">This blue box should be at the bottom of the viewport
+    / first page.</p>
+  <p class="control">This yellow box should be at the top of the
+    viewport or first page. There should also be a blue box visible at the
+    bottom of the viewport / page.</p>
+</body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-006.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-006.xht
new file mode 100644
index 0000000..cc53cf5
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-006.xht
@@ -0,0 +1,24 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
+<head>
+  <title>CSS Test: Absolute Positioning: Tables with two offsets</title>
+  <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+  <link rel="reviewer" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/>
+  <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/absolute/008.html" type="text/html"/>
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#comp-abspos"/>
+  <style type="text/css">
+   body { font: 900 10em "Lucida Console", "Courier New", Courier, monospace; }
+   .description { font: medium serif; margin: 1em 1em 15em; }
+   .test { position: absolute; bottom: 0; left: auto; right: 0; top: auto;
+           background: white; color: green; margin: 0; }
+   .control { position: absolute; bottom: 0; left: auto; right: 0; top: auto;
+              background: red; color: yellow; margin: 0; }
+  </style>
+ </head>
+ <body>
+  <p class="description">The word PASS should appear at the bottom right of this document.</p>
+  <p class="control">FAIL</p>
+  <table class="test"><tbody><tr><td>PASS</td></tr></tbody></table>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-007-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-007-ref.xht
new file mode 100644
index 0000000..33ae560
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-007-ref.xht
@@ -0,0 +1,31 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  p {margin: 0;}
+
+  div
+  {
+  background-color: green;
+  height: 1em;
+  width: 10em;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if there is <strong>no red</strong>.</p>
+
+  <div></div>
+
+ </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-007.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-007.xht
new file mode 100644
index 0000000..82c77eb
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-007.xht
@@ -0,0 +1,29 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
+<head>
+  <title>CSS Test: Positioning blocks inside inline contexts with top:auto</title>
+  <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+  <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/>
+  <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-08 -->
+  <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/absolute/009.html" type="text/html"/>
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#comp-abspos"/>
+  <link rel="match" href="abspos-007-ref.xht" />
+
+  <style type="text/css">
+   .container div { height: 1em; width: 10em; }
+   .test { position: absolute; background: green; z-index: 1; }
+   .control { background: red; }
+   .inline { display: inline; }
+  </style>
+ </head>
+ <body>
+  <div class="container">
+   <div class="inline">
+     Test passes if there is <strong>no red</strong>.
+     <div class="test"></div>
+     <div class="control"></div>
+   </div>
+  </div>
+
+</body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-008-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-008-ref.xht
new file mode 100644
index 0000000..7fb8eed
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-008-ref.xht
@@ -0,0 +1,31 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div
+  {
+  background-color: green;
+  border-top: white solid 10px;
+  color: white;
+  float: left;
+  font-size: 100px;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if there is <strong>no red</strong>.</p>
+
+  <div>X X0</div>
+
+ </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-008.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-008.xht
new file mode 100644
index 0000000..46a302f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-008.xht
@@ -0,0 +1,30 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+  <title>CSS Test: Shrink wrapping of absolute positioned blocks</title>
+  <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+  <link rel="reviewer" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/>
+  <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/absolute/011.html" type="text/html"/>
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width"/>
+  <link rel="match" href="abspos-008-ref.xht" />
+
+  <style type="text/css">
+   .container { font-size: 100px; position: relative; border-top: 10px solid white; }
+   .outer { position: absolute; top: 0; left: 0; z-index: 1; }
+   .inner { background: green; color: white; float: left; }
+   .control { float: left; color: yellow; background: red; }
+  </style>
+ </head>
+<body>
+  <p>Test passes if there is <strong>no red</strong>.</p>
+  <div class="container">
+   <div class="outer">
+    <div class="inner">
+     X X0
+    </div>
+   </div>
+   <div class="control">X X1</div>
+  </div>
+
+</body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-009-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-009-ref.xht
new file mode 100644
index 0000000..6ee4b0d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-009-ref.xht
@@ -0,0 +1,30 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div
+  {
+  background-color: green;
+  float: right;
+  height: 1em;
+  width: 10em;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if there is a green stripe on the right and <strong>no red</strong>.</p>
+
+  <div></div>
+
+ </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-009.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-009.xht
new file mode 100644
index 0000000..2c5902f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-009.xht
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+  <title>CSS Test: Right alignment with position:right</title>
+  <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+  <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/>
+  <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-08 -->
+  <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/absolute/012.html" type="text/html"/>
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#comp-abspos"/>
+  <link rel="match" href="abspos-009-ref.xht" />
+
+  <style type="text/css">
+   body { position: relative; }
+   .control { border-right: 10em solid red; height: 1em; }
+   .test { position: absolute; width: 10em; height: 1em;
+           right: 0; margin: auto;
+           background: green; color: white; }
+  </style>
+ </head>
+<body>
+  <p>Test passes if there is a green stripe on the right and <strong>no red</strong>.</p>
+  <div class="test"></div>
+  <div class="control"></div>
+
+</body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-010.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-010.xht
new file mode 100644
index 0000000..c3929a0
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-010.xht
@@ -0,0 +1,35 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
+<head>
+  <title>CSS Test: Absolutely positioned tables must shrink wrap</title>
+  <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+  <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/>
+  <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/absolute/013.html" type="text/html"/>
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width"/>
+  <style type="text/css">
+   table { position: absolute; background: red; border-spacing: 0; padding: 0;}
+   td { padding: 0; }
+   div { width: 3em; height: 2em; background: green; }
+   .fixed { table-layout: fixed; margin-top: 2em; }
+  </style>
+ </head>
+ <body>
+  <p>There should be a green block and no red below.</p>
+  <table>
+   <tr>
+    <td>
+     <div></div>
+    </td>
+   </tr>
+  </table>
+  <table class="fixed">
+   <tr>
+    <td>
+     <div></div>
+    </td>
+   </tr>
+  </table>
+
+
+</body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-011-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-011-ref.xht
new file mode 100644
index 0000000..0e421c4
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-011-ref.xht
@@ -0,0 +1,42 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  body {margin: 8px;}
+
+  div {font: bold 32px/1 monospace;}
+
+  div#first {margin-top: 40px;}
+
+  div#second
+  {
+  bottom: 1em;
+  position: relative;
+  }
+
+  div#third
+  {
+  bottom: 2em;
+  position: relative;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <div id="first">____ ____</div>
+
+  <div id="second">FAIL PASS</div>
+
+  <div id="third">####</div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-011.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-011.xht
new file mode 100644
index 0000000..111795b97
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-011.xht
@@ -0,0 +1,24 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
+<head>
+  <title>CSS Test: position: absolute; top: auto; test (assumed initial values)</title>
+  <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+  <link rel="reviewer" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/>
+  <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/absolute/014.html" type="text/html"/>
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#comp-abspos"/>
+  <link rel="match" href="abspos-011-ref.xht" />
+
+  <meta name="flags" content="may"/>
+  <style type="text/css">
+   body {margin: 8px;}
+   p { position: absolute; font: bold 32px/1 monospace; }
+                    /* was font: bold 2em monospace; */
+  </style>
+ </head>
+ <body>
+  <p>FAIL ____</p>
+  <p>#___ P___</p>
+  <p>_##_ _A__</p>
+  <p>___# __SS</p>
+</body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-012.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-012.xht
new file mode 100644
index 0000000..8aacf30
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-012.xht
@@ -0,0 +1,29 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
+<head>
+  <title>CSS Test: position: absolute; top: auto; test (assumed initial values)</title>
+  <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+  <link rel="reviewer" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/>
+  <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/absolute/015.html" type="text/html"/>
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#comp-abspos"/>
+  <link rel="match" href="abspos-011-ref.xht" />
+
+  <meta name="flags" content="may"/>
+  <style type="text/css">
+   body {margin: 8px;}
+   div { position: relative; }
+   p { position: absolute; font: bold 32px/1 monospace; }
+                    /* was font: bold 2em monospace; */
+  </style>
+ </head>
+ <body>
+  <div>
+   <p>FAIL ____</p>
+   <p>#___ P___</p>
+   <p>_##_ _A__</p>
+   <p>___# __SS</p>
+  </div>
+
+
+</body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-013-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-013-ref.xht
new file mode 100644
index 0000000..b065f71
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-013-ref.xht
@@ -0,0 +1,30 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  body {margin: 10px;}
+
+  div
+  {
+  background-color: green;
+  color: white;
+  height: 64px;
+  width: 320px;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <div>This block should be green.</div>
+
+ </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-013.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-013.xht
new file mode 100644
index 0000000..8a05d12
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-013.xht
@@ -0,0 +1,27 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
+<head>
+  <title>CSS Test: position: fixed; top: auto; test - body padding</title>
+  <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+  <link rel="reviewer" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/>
+  <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/absolute/016.html" type="text/html"/>
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#comp-abspos"/>
+  <link rel="match" href="abspos-013-ref.xht" />
+
+  <meta name="flags" content="may"/>
+  <style type="text/css">
+   html { margin: 0; padding: 0; }
+   body { margin: 0; padding: 10px; }
+   .a { position: fixed; top: 10px; left: 10px; width: 20em; height: 4em;
+        background: red; color: yellow; }
+   .b { position: fixed; top: auto; left: auto; width: 20em; height: 4em;
+        background: green; color: white; }
+  </style>
+ </head>
+ <body>
+  <div class="a">FAIL</div>
+  <div class="b">This block should be green.</div>
+
+
+</body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-014.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-014.xht
new file mode 100644
index 0000000..553b93d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-014.xht
@@ -0,0 +1,27 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
+<head>
+  <title>CSS Test: position: fixed; top: auto; test - body padding</title>
+  <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+  <link rel="reviewer" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/>
+  <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/absolute/016-alt.html" type="text/html"/>
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#comp-abspos"/>
+  <link rel="match" href="abspos-013-ref.xht" />
+
+  <meta name="flags" content="may"/>
+  <style type="text/css">
+   html { margin: 0; padding: 0; }
+   body { margin: 0; padding: 10px; }
+   .a { position: static; top: 10px; left: 10px; width: 20em; height: 4em;
+        background: red; color: yellow; }
+   .b { position: fixed;  top: auto; left: auto; width: 20em; height: 4em;
+        background: green; color: white; }
+  </style>
+ </head>
+ <body>
+  <div class="b">This block should be green.</div>
+  <div class="a">FAIL</div>
+
+
+</body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-015.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-015.xht
new file mode 100644
index 0000000..32b2652
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-015.xht
@@ -0,0 +1,27 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
+<head>
+  <title>CSS Test: position: fixed; top: auto; test - html padding</title>
+  <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+  <link rel="reviewer" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/>
+  <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/absolute/017.html" type="text/html"/>
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#comp-abspos"/>
+  <link rel="match" href="abspos-013-ref.xht" />
+
+  <meta name="flags" content="may"/>
+  <style type="text/css">
+   html { margin: 0; padding: 10px; }
+   body { margin: 0; padding: 0; }
+   .a { position: fixed; top: 10px; left: 10px; width: 20em; height: 4em;
+        background: red; color: yellow; }
+   .b { position: fixed; top: auto; left: auto; width: 20em; height: 4em;
+        background: green; color: white; }
+  </style>
+ </head>
+ <body>
+  <div class="a">FAIL</div>
+  <div class="b">This block should be green.</div>
+
+
+</body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-016.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-016.xht
new file mode 100644
index 0000000..6310eb0
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-016.xht
@@ -0,0 +1,27 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
+<head>
+  <title>CSS Test: position: fixed; top: auto; test - html padding</title>
+  <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+  <link rel="reviewer" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/>
+  <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/absolute/017-alt.html" type="text/html"/>
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#comp-abspos"/>
+  <link rel="match" href="abspos-013-ref.xht" />
+
+  <meta name="flags" content="may"/>
+  <style type="text/css">
+   html { margin: 0; padding: 10px; }
+   body { margin: 0; padding: 0; }
+   .a { position: static; top: 10px; left: 10px; width: 20em; height: 4em;
+        background: red; color: yellow; }
+   .b { position: fixed;  top: auto; left: auto; width: 20em; height: 4em;
+        background: green; color: white; }
+  </style>
+ </head>
+ <body>
+  <div class="b">This block should be green.</div>
+  <div class="a">FAIL</div>
+
+
+</body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-017.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-017.xht
new file mode 100644
index 0000000..9c1a977
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-017.xht
@@ -0,0 +1,27 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
+<head>
+  <title>CSS Test: position: fixed; top: auto; test - body margin</title>
+  <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+  <link rel="reviewer" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/>
+  <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/absolute/018.html" type="text/html"/>
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#comp-abspos"/>
+  <link rel="match" href="abspos-013-ref.xht" />
+
+  <meta name="flags" content="may"/>
+  <style type="text/css">
+   html { margin: 0; padding: 0; }
+   body { margin: 10px; padding: 0; }
+   .a { position: fixed; top: 10px; left: 10px; width: 20em; height: 4em;
+        background: red; color: yellow; }
+   .b { position: fixed; top: auto; left: auto; width: 20em; height: 4em;
+        background: green; color: white; }
+  </style>
+ </head>
+ <body>
+  <div class="a">FAIL</div>
+  <div class="b">This block should be green.</div>
+
+
+</body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-018.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-018.xht
new file mode 100644
index 0000000..7cf610e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-018.xht
@@ -0,0 +1,27 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
+<head>
+  <title>CSS Test: position: fixed; top: auto; test - body margin</title>
+  <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+  <link rel="reviewer" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/>
+  <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/absolute/018-alt.html" type="text/html"/>
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#comp-abspos"/>
+  <link rel="match" href="abspos-013-ref.xht" />
+
+  <meta name="flags" content="may"/>
+  <style type="text/css">
+   html { margin: 0; padding: 0; }
+   body { margin: 10px; padding: 0; }
+   .a { position: static; top: 10px; left: 10px; width: 20em; height: 4em;
+        background: red; color: yellow; }
+   .b { position: fixed;  top: auto; left: auto; width: 20em; height: 4em;
+        background: green; color: white; }
+  </style>
+ </head>
+ <body>
+  <div class="b">This block should be green.</div>
+  <div class="a">FAIL</div>
+
+
+</body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-019.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-019.xht
new file mode 100644
index 0000000..f2e83dab
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-019.xht
@@ -0,0 +1,27 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
+<head>
+  <title>CSS Test: position: fixed; top: auto; test - html margin</title>
+  <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+  <link rel="reviewer" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/>
+  <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/absolute/019.html" type="text/html"/>
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#comp-abspos"/>
+  <link rel="match" href="abspos-013-ref.xht" />
+
+  <meta name="flags" content="may"/>
+  <style type="text/css">
+   html { margin: 10px; padding: 0; }
+   body { margin: 0; padding: 0; }
+   .a { position: fixed; top: 10px; left: 10px; width: 20em; height: 4em;
+        background: red; color: yellow; }
+   .b { position: fixed; top: auto; left: auto; width: 20em; height: 4em;
+        background: green; color: white; }
+  </style>
+ </head>
+ <body>
+  <div class="a">FAIL</div>
+  <div class="b">This block should be green.</div>
+
+
+</body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-020.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-020.xht
new file mode 100644
index 0000000..e1a0335
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-020.xht
@@ -0,0 +1,27 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
+<head>
+  <title>CSS Test: position: fixed; top: auto; test - html margin</title>
+  <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+  <link rel="reviewer" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/>
+  <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/absolute/019-alt.html" type="text/html"/>
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#comp-abspos"/>
+  <link rel="match" href="abspos-013-ref.xht" />
+
+  <meta name="flags" content="may"/>
+  <style type="text/css">
+   html { margin: 10px; padding: 0; }
+   body { margin: 0; padding: 0; }
+   .a { position: static; top: 10px; left: 10px; width: 20em; height: 4em;
+        background: red; color: yellow; }
+   .b { position: fixed;  top: auto; left: auto; width: 20em; height: 4em;
+        background: green; color: white; }
+  </style>
+ </head>
+ <body>
+  <div class="b">This block should be green.</div>
+  <div class="a">FAIL</div>
+
+
+</body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-022.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-022.xht
new file mode 100644
index 0000000..9949351f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-022.xht
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
+<head>
+  <title>CSS Test: position: fixed; top: auto; test - margin collapsing</title>
+  <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+  <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-07-03 -->
+  <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/absolute/020-alt.html" type="text/html"/>
+  <link rel="help" href="http://www.w3.org/TR/CSS21/box.html#collapsing-margins"/>
+  <link rel="match" href="abspos-013-ref.xht" />
+
+  <meta name="flags" content="may"/>
+  <style type="text/css">
+   html { margin: 0; padding: 0; }
+   body { margin: 0 10px; padding: 0; }
+   .a { position: static; top: 10px; left: 10px; width: 20em; height: 4em;
+        background: red; color: yellow; }
+   .b { position: fixed; top: auto; left: auto; width: 20em; height: 4em;
+        background: green; color: white; }
+   .c1 { margin: 2px; }
+   .c2 { margin: -4px 20px; }
+   .c3 { margin: 0 0 14px; }
+   .c4 { margin: 50px; }
+  </style>
+ </head>
+ <body>
+  <div class="c1">
+   <div class="c2">
+    <div class="c3"></div>
+   </div>
+  </div>
+  <div class="b">This block should be green.</div>
+  <div class="a">FAIL</div>
+  <div class="c4"></div>
+
+
+</body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-023.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-023.xht
new file mode 100644
index 0000000..e5cd4c4
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-023.xht
@@ -0,0 +1,25 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+  <title>CSS Test: left:auto for fixed-pos blocks inside abs-pos blocks</title>
+  <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+  <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/>
+  <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/absolute/021.html" type="text/html"/>
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width"/>
+  <meta name="flags" content="may"/>
+  <style type="text/css">
+   body { color: navy; }
+   .control { margin-left: 50%; border-top: 1em solid red; width: 1em; }
+   .container { position: absolute; left: 50%; }
+   .test { position: fixed; left: auto; width: 1em; height: 1em;
+           background: green; color: white; }
+  </style>
+ </head>
+ <body>
+  <p>There should be a green square roughly centered below and no red.</p>
+  <div class="container">
+   <div class="test"> </div>
+  </div>
+  <div class="control"></div>
+</body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-024-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-024-ref.xht
new file mode 100644
index 0000000..791769a
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-024-ref.xht
@@ -0,0 +1,24 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  p, div {text-align: right;}
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>.Test passes if there is a green stripe on the right and <strong>no red</strong></p>
+
+  <div><img src="support/1x1-green.png" width="64" height="16" alt="Image download support must be enabled" /></div>
+
+ </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-024.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-024.xht
new file mode 100644
index 0000000..2e4a77d0
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-024.xht
@@ -0,0 +1,25 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+  <title>CSS Test: Static position in rtl context</title>
+  <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+  <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/>
+  <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-11 -->
+  <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/absolute/022.html" type="text/html"/>
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width"/>
+  <link rel="match" href="abspos-024-ref.xht" />
+
+  <style type="text/css">
+   body { position: relative; }
+   .test { position: absolute; background: green; color: green;
+           width: 4em; height: 1em; }
+   .control { border-right: 4em solid red; height: 1em; }
+  </style>
+ </head>
+ <body dir="rtl">
+  <p>Test passes if there is a green stripe on the right and <strong>no red</strong>.</p>
+  <div class="test"></div>
+  <div class="control"></div>
+
+</body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-025-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-025-ref.xht
new file mode 100644
index 0000000..2785da5
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-025-ref.xht
@@ -0,0 +1,34 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  body {margin: 8px; font: 1em/1.25 serif;}
+
+  strong {line-height: 1;}
+
+  img
+  {
+  left: 56px;
+  position: relative;
+  top: 12px;
+  vertical-align: top;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if there is a green square and <strong>no red</strong>.</p>
+
+  <div><img src="support/swatch-green.png" alt="Image download support must be enabled" /></div>
+
+ </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-025.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-025.xht
new file mode 100644
index 0000000..b9b1fd6f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-025.xht
@@ -0,0 +1,23 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+  <title>CSS Test: Positioning replaced elements with four offsets</title>
+  <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+  <link rel="reviewer" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/>
+  <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/absolute/024.html" type="text/html"/>
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width"/>
+  <link rel="match" href="abspos-025-ref.xht" />
+
+  <meta name="flags" content="image"/>
+  <style type="text/css">
+   html { background: url(support/swatch-red.png) no-repeat 4em 4em; }
+   body {margin: 8px; font: 1em/1.25 serif;}
+   strong {line-height: 1;}
+   img { position: absolute; left: 4em; right: 0; top: 4em; bottom: 0; }
+  </style>
+ </head>
+ <body>
+  <p>Test passes if there is a green square and <strong>no red</strong>. <img src="support/swatch-green.png" alt="FAIL" /></p>
+
+</body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-026.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-026.xht
new file mode 100644
index 0000000..6fa4d77
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-026.xht
@@ -0,0 +1,25 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+  <title>CSS Test: Positioning replaced elements with four offsets</title>
+  <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+  <link rel="reviewer" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/>
+  <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/absolute/025.html" type="text/html"/>
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width"/>
+  <link rel="match" href="abspos-025-ref.xht" />
+
+  <style type="text/css">
+   body {margin: 8px; font: 1em/1.25 serif;}
+   strong {line-height: 1;}
+   img { position: absolute; left: 4em; right: 4em; top: 4em; bottom: 4em; }
+   div { position: absolute; left: 4em; top: 4em; height: 15px; width: 15px; background: green; }
+}
+  </style>
+ </head>
+ <body>
+  <p>Test passes if there is a green square and <strong>no red</strong>. <img src="support/swatch-red.png" alt="FAIL" /></p>
+  <div></div>
+
+
+</body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-027.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-027.xht
new file mode 100644
index 0000000..20fcb2a3
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-027.xht
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+  <title>CSS Test: Absolutely positioned elements must shrink wrap tables</title>
+  <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+  <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-11 -->
+  <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/table/positioning/003.html" type="text/html"/>
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo" />
+  <link rel="match" href="../reference/ref-if-there-is-no-red.xht" />
+
+  <style type="text/css">
+  body {margin-top: 1em; font: 1em/1.25 serif;}
+
+   .test { position: absolute; background: red; }
+   table { background: white; color: black; margin: auto; border-spacing: 0px; }
+   td { padding: 0px; }
+  </style>
+ </head>
+ <body>
+  <div class="test">
+   <table>
+    <tr>
+     <td>Test passes if there is <strong>no red</strong>.</td>
+    </tr>
+   </table>
+  </div>
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-028-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-028-ref.xht
new file mode 100644
index 0000000..e610ce3
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-028-ref.xht
@@ -0,0 +1,29 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div
+  {
+  background-color: green;
+  height: 1em;
+  width: 6em;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if there is a green stripe and <strong>no red</strong>.</p>
+
+  <div></div>
+
+ </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-028.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-028.xht
new file mode 100644
index 0000000..acff410
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-028.xht
@@ -0,0 +1,41 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+  <title>CSS Test: Abspos static position and clear</title>
+  <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/"/>
+  <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-11 -->
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-height"/>
+  <link rel="match" href="abspos-028-ref.xht" />
+
+  <meta name="flags" content=""/>
+  <meta name="assert" content="The static position is calculated as if clear
+    had been none."/>
+  <style type="text/css">
+    .container {
+      width: 6em;
+      height: 1em;
+      background: red;
+    }
+    .float {
+      float: left;
+      width: 1em;
+      height: 4em;
+      background: white;
+    }
+    .abspos {
+      position: absolute;
+      clear: both;
+      width: 6em;
+      height: 1em;
+      background: green;
+    }
+  </style>
+ </head>
+ <body>
+    <p>Test passes if there is a green stripe and <strong>no red</strong>.</p>
+    <div class="container">
+      <div class="float"></div>
+      <div class="abspos"></div>
+    </div>
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-containing-block-001-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-containing-block-001-ref.xht
new file mode 100644
index 0000000..238d286
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-containing-block-001-ref.xht
@@ -0,0 +1,24 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  body {margin: 0;}
+
+  div {color: green;}
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <div>Test passes if there is <strong>no red</strong>.</div>
+
+ </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-containing-block-001.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-containing-block-001.xht
new file mode 100644
index 0000000..a097a7c
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-containing-block-001.xht
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <title>CSS Test: Containing block for fixed positioning</title>
+    <link rel="author" title="Bert Bos" href="http://www.w3.org/People/Bos/"/>
+    <link rel="reviewer" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/>
+    <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#containing-block-details"/>
+	<link rel="match" href="abspos-containing-block-001-ref.xht" />
+
+    <style type="text/css">
+      body { background: red; margin: 100px 100px; }
+      div { background: white; color: green; position: fixed; top: 0; right: 0; bottom: 0; left: 0; }
+    </style>
+  </head>
+  <body>
+    <div>
+      Test passes if there is <strong>no red</strong>.
+    </div>
+  </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-containing-block-002.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-containing-block-002.xht
new file mode 100644
index 0000000..9d778bc
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-containing-block-002.xht
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <title>CSS Test: Containing block for absolute positioning</title>
+    <link rel="author" title="Bert Bos" href="http://www.w3.org/People/Bos/"/>
+    <link rel="reviewer" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/>
+    <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#containing-block-details"/>
+	<link rel="match" href="abspos-containing-block-001-ref.xht" />
+
+    <style type="text/css">
+      body { background: red; margin: 100px 100px; }
+      div { background: white; color: green; position: absolute; top: 0; right: 0; bottom: 0; left: 0; }
+    </style>
+  </head>
+  <body>
+    <div>
+      Test passes if there is <strong>no red</strong>.
+    </div>
+  </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-containing-block-003.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-containing-block-003.xht
new file mode 100644
index 0000000..c86c9ff
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-containing-block-003.xht
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <title>CSS Test: Containing block for absolute positioning</title>
+    <link rel="author" title="Bert Bos" href="http://www.w3.org/People/Bos/"/>
+    <link rel="reviewer" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/>
+    <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#containing-block-details"/>
+	<link rel="match" href="abspos-containing-block-001-ref.xht" />
+
+    <style type="text/css">
+      body { background: red; margin: 100px 100px; }
+      div { background: white; color: green; position: fixed; top: 0; right: 0; height: 100%; width: 100%; }
+    </style>
+  </head>
+  <body>
+    <div>
+      Test passes if there is <strong>no red</strong>.
+    </div>
+  </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-containing-block-004.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-containing-block-004.xht
new file mode 100644
index 0000000..1cbae98
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-containing-block-004.xht
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <title>CSS Test: Containing block for absolute positioning</title>
+    <link rel="author" title="Bert Bos" href="http://www.w3.org/People/Bos/"/>
+    <link rel="reviewer" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/>
+    <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#containing-block-details"/>
+	<link rel="match" href="abspos-containing-block-001-ref.xht" />
+
+    <style type="text/css">
+      body { background: red; margin: 100px 100px; }
+      div { background: white; color: green; position: absolute; top: 0; right: 0; height: 100%; width: 100%; }
+    </style>
+  </head>
+  <body>
+    <div>
+      Test passes if there is <strong>no red</strong>.
+    </div>
+  </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-containing-block-005.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-containing-block-005.xht
new file mode 100644
index 0000000..b86a3a0
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-containing-block-005.xht
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <title>CSS Test: Containing block for absolute positioning</title>
+    <link rel="author" title="Bert Bos" href="http://www.w3.org/People/Bos/"/>
+    <link rel="reviewer" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/>
+    <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#containing-block-details"/>
+	<link rel="match" href="abspos-containing-block-001-ref.xht" />
+
+    <style type="text/css">
+      html { margin: 0; padding: 0; width: 100%; height: 100%; position: relative; }
+      body { background: red; margin: 100px 20%; }
+      div { background: white; color: green; position: absolute; top: 0; right: 0; width: 100%; height: 100%; }
+    </style>
+  </head>
+  <body>
+    <div>
+      Test passes if there is <strong>no red</strong>.
+    </div>
+  </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-containing-block-006.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-containing-block-006.xht
new file mode 100644
index 0000000..70a6f46
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-containing-block-006.xht
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <title>CSS Test: Containing block for absolute positioning</title>
+    <link rel="author" title="Bert Bos" href="http://www.w3.org/People/Bos/"/>
+    <link rel="reviewer" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/>
+    <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#containing-block-details"/>
+	<link rel="match" href="abspos-containing-block-001-ref.xht" />
+
+    <style type="text/css">
+      html { margin: 0; padding: 0; width: 100%; height: 100%; position: relative; }
+      body { background: red; margin: 100px 20%; } /* background propagates up to html and then canvas */
+      div { background: white; color: green; position: absolute; top: 0; right: 0; bottom: 0; left: 0; }
+    </style>
+  </head>
+  <body>
+    <div>
+      Test passes if there is <strong>no red</strong>.
+    </div>
+  </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-containing-block-007.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-containing-block-007.xht
new file mode 100644
index 0000000..ad3e40f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-containing-block-007.xht
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <title>CSS Test: Containing block for absolute positioning</title>
+    <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu"/>
+    <link rel="reviewer" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/>
+    <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#containing-block-details"/>
+	<link rel="match" href="abspos-containing-block-001-ref.xht" />
+
+    <style type="text/css">
+      html { border: 100px solid red; background: red; }
+      div { background: white; color: green; position: absolute; top: 0; right: 0; bottom: 0; left: 0; }
+    </style>
+  </head>
+  <body>
+    <div>
+      Test passes if there is <strong>no red</strong>.
+    </div>
+  </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-containing-block-008.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-containing-block-008.xht
new file mode 100644
index 0000000..f01ce44
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-containing-block-008.xht
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <title>CSS Test: Containing block for absolute positioning</title>
+    <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu"/>
+    <link rel="reviewer" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/>
+    <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#containing-block-details"/>
+	<link rel="match" href="abspos-containing-block-001-ref.xht" />
+
+    <style type="text/css">
+      html { border: 100px solid red; background: red; }
+      div { background: white; color: green; position: absolute;
+            top: 0; right: 0; width: 100%; height: 100%; }
+    </style>
+  </head>
+  <body>
+    <div>
+      Test passes if there is <strong>no red</strong>.
+    </div>
+  </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-containing-block-009.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-containing-block-009.xht
new file mode 100644
index 0000000..77e17dfe
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-containing-block-009.xht
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <title>CSS Test: Containing block for absolute positioning</title>
+    <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu"/>
+    <link rel="reviewer" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/>
+    <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#containing-block-details"/>
+	<link rel="match" href="abspos-containing-block-001-ref.xht" />
+
+    <style type="text/css">
+      html { border: 100px solid red; background: red; }
+      div { background: white; color: green; position: absolute;
+            bottom: 0; left: 0; width: 100%; height: 100%; }
+    </style>
+  </head>
+  <body>
+    <div>
+      Test passes if there is <strong>no red</strong>.
+    </div>
+  </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-containing-block-010-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-containing-block-010-ref.xht
new file mode 100644
index 0000000..805f7a8
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-containing-block-010-ref.xht
@@ -0,0 +1,29 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  html
+  {
+  background-color: green;
+  color: white;
+  height: 100%;
+  }
+
+  body {margin: 0;}
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <div>Test passes if there is <strong>no red</strong>.</div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-containing-block-010.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-containing-block-010.xht
new file mode 100644
index 0000000..f219976
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-containing-block-010.xht
@@ -0,0 +1,25 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+  <title>CSS Test: Absolute Positioning: Containing Block of Top Level Absolutely Positioned Block</title>
+  <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+  <link rel="reviewer" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/>
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#containing-block-details" />
+  <link rel="match" href="abspos-containing-block-010-ref.xht" />
+
+     <style type="text/css">
+   html { margin: 0; border: 0; padding: 0; background: white; color: yellow; }
+   body { margin: 1em; border: 1em solid red; padding: 1em; background: red; color: yellow; }
+   p { margin: 1em; padding: 1em; }
+   div { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: green; color: white; }
+  </style>
+ </head>
+ <body>
+  <p>FAIL</p>
+  <p>This page should be completely green.</p>
+  <div>Test passes if there is <strong>no red</strong>.</div>
+  <!-- the <div> element should exactly overlap the <html> element,
+  since they have the same dimensions and the same containing block
+  and the same origin. -->
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-inline-001.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-inline-001.xht
new file mode 100644
index 0000000..84f937d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-inline-001.xht
@@ -0,0 +1,29 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+  <title>CSS Test: Absolutely positioned boxes in inlines: 'auto'</title>
+  <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+  <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+  <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/absolute/inline/001.html" type="text/html"/>
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#comp-abspos" />
+
+  <meta name="flags" content="interact" />
+
+  <style type="text/css">
+   p { font: 1em monospace; }
+   .filler { color: silver; }
+   .absolute { color: white; background: green; position: absolute; }
+   .fail { color: yellow; background: red; }
+  </style>
+ </head>
+ <body>
+  <p>
+   <span class="filler"> This is filler text. This is filler text. This is filler text. </span>
+   <span class="test"> The test has <span class="absolute">PASSED</span><span class="fail">FAILED</span>.</span>
+   <span class="filler"> This is filler text. This is filler text. This is filler text. </span>
+  </p>
+  <p>(Exception: when the word FAILED is at the beginning of a
+  line, the word PASSED may still be at the end of the previous
+  line.)</p>
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-inline-002.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-inline-002.xht
new file mode 100644
index 0000000..598cf39c
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-inline-002.xht
@@ -0,0 +1,30 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+  <title>CSS Test: Absolutely positioned boxes in inlines: 'auto' with 'relative'</title>
+  <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+  <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+  <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/absolute/inline/002.html" type="text/html"/>
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#comp-abspos" />
+
+  <meta name="flags" content="interact" />
+
+  <style type="text/css">
+   p { font: 1em monospace; }
+   .filler { color: silver; }
+   .absolute { color: white; background: green; position: absolute; }
+   .fail { color: yellow; background: red; }
+   .test { position: relative; }
+  </style>
+ </head>
+ <body>
+  <p>
+   <span class="filler"> This is filler text. This is filler text. This is filler text. </span>
+   <span class="test"> The test has <span class="absolute">PASSED</span><span class="fail">FAILED</span>.</span>
+   <span class="filler"> This is filler text. This is filler text. This is filler text. </span>
+  </p>
+  <p>(Exception: when the word FAILED is at the beginning of a
+  line, the word PASSED may still be at the end of the previous
+  line.)</p>
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-inline-003.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-inline-003.xht
new file mode 100644
index 0000000..f5b26b1
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-inline-003.xht
@@ -0,0 +1,32 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+  <title>CSS Test: Absolutely positioned boxes in inlines: positioning at top left</title>
+  <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+  <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+  <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/absolute/inline/003.html" type="text/html"/>
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#comp-abspos" />
+
+  <meta name="flags" content="interact" />
+
+  <style type="text/css">
+   p { font: 1em monospace; }
+   .filler { color: silver; }
+   .absolute { color: white; background: green; position: absolute; top: 0; left: 0; }
+   .fail { color: yellow; background: red; }
+   .test { position: relative; }
+  </style>
+ </head>
+ <body>
+  <p>
+   <span class="filler"> This is filler text. This is filler text. This is filler text. </span>
+   The test has <span class="test"><span class="absolute">PASSED</span><span class="fail">FAILED</span></span>.
+   <span class="filler"> This is filler text. This is filler text. This is filler text. </span>
+  </p>
+
+  <p>There should be no red after resizing viewport.</p>
+
+  <!-- the exception mentioned in tests 001 and 002 DOES NOT APPLY to this test. -->
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-inline-004.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-inline-004.xht
new file mode 100644
index 0000000..89d48f7
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-inline-004.xht
@@ -0,0 +1,31 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+  <title>CSS Test: Absolutely positioned boxes in inlines: positioning at top right</title>
+  <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+  <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+  <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/absolute/inline/004.html" type="text/html"/>
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#comp-abspos" />
+
+  <meta name="flags" content="interact" />
+
+  <style type="text/css">
+   p { font: 1em monospace; }
+   .filler { color: silver; }
+   .absolute { color: white; background: green; position: absolute; top: 0; right: 0; }
+   .fail { color: yellow; background: red; }
+   .test { position: relative; }
+  </style>
+ </head>
+ <body>
+  <p>
+   <span class="filler"> This is filler text. This is filler text. This is filler text. </span>
+   The test has <span class="test"><span class="absolute">PASSED</span><span class="fail">FAILED</span></span>.
+   <span class="filler"> This is filler text. This is filler text. This is filler text. </span>
+  </p>
+
+  <p>There should be no red after resizing viewport.</p>
+
+  <!-- the exception mentioned in tests 001 and 002 DOES NOT APPLY to this test. -->
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-inline-005.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-inline-005.xht
new file mode 100644
index 0000000..053527c
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-inline-005.xht
@@ -0,0 +1,31 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+  <title>CSS Test: Absolutely positioned boxes in inlines: positioning at bottom left</title>
+  <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+  <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+  <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/absolute/inline/005.html" type="text/html"/>
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#comp-abspos" />
+
+  <meta name="flags" content="interact" />
+
+  <style type="text/css">
+   p { font: 1em monospace; }
+   .filler { color: silver; }
+   .absolute { color: white; background: green; position: absolute; bottom: 0; left: 0; }
+   .fail { color: yellow; background: red; }
+   .test { position: relative; }
+  </style>
+ </head>
+ <body>
+  <p>
+   <span class="filler"> This is filler text. This is filler text. This is filler text. </span>
+   The test has <span class="test"><span class="absolute">PASSED</span><span class="fail">FAILED</span></span>.
+   <span class="filler"> This is filler text. This is filler text. This is filler text. </span>
+  </p>
+
+  <p>There should be no red after resizing viewport.</p>
+
+  <!-- the exception mentioned in tests 001 and 002 DOES NOT APPLY to this test. -->
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-inline-006.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-inline-006.xht
new file mode 100644
index 0000000..e5a544f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-inline-006.xht
@@ -0,0 +1,31 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+  <title>CSS Test: Absolutely positioned boxes in inlines: positioning at bottom right</title>
+  <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+  <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+  <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/absolute/inline/006.html" type="text/html"/>
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#comp-abspos" />
+
+  <meta name="flags" content="interact" />
+
+  <style type="text/css">
+   p { font: 1em monospace; }
+   .filler { color: silver; }
+   .absolute { color: white; background: green; position: absolute; bottom: 0; right: 0; }
+   .fail { color: yellow; background: red; }
+   .test { position: relative; }
+  </style>
+ </head>
+ <body>
+  <p>
+   <span class="filler"> This is filler text. This is filler text. This is filler text. </span>
+   The test has <span class="test"><span class="absolute">PASSED</span><span class="fail">FAILED</span></span>.
+   <span class="filler"> This is filler text. This is filler text. This is filler text. </span>
+  </p>
+
+  <p>There should be no red after resizing viewport.</p>
+
+  <!-- the exception mentioned in tests 001 and 002 DOES NOT APPLY to this test. -->
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-overflow-001-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-overflow-001-ref.xht
new file mode 100644
index 0000000..ba7e87c6
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-overflow-001-ref.xht
@@ -0,0 +1,49 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  body
+  {
+  line-height: 1.25;
+  margin-left: 0;
+  }
+
+  div#positioned
+  {
+  background: green;
+  color: white;
+  left: 0;
+  position: absolute;
+  top: 0;
+  width: 10em;
+  }
+
+  p {margin-top: 36px;}
+
+  div#overflow
+  {
+  height: 8em;
+  overflow: scroll;
+  width: 8em;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <div id="positioned">PASS</div>
+
+  <p>Ignore the scrollbars below.</p>
+
+  <div id="overflow"></div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-overflow-001.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-overflow-001.xht
new file mode 100644
index 0000000..0f7ed6b
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-overflow-001.xht
@@ -0,0 +1,25 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+  <title>CSS Test: Absolutely positioned children of overflow: scroll</title>
+  <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+  <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+  <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/absolute/overflow/001.html" type="text/html"/>
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visufx.html#overflow-clipping" />
+  <link rel="match" href="abspos-overflow-001-ref.xht" />
+
+  <style type="text/css">
+   html, body { margin: 0; border: 0; padding: 0; line-height: 1.25;}
+   .control { color: yellow; background: red; width: 10em; }
+   .overflow { width: 8em; height: 8em; overflow: scroll; }
+   .positioned { color: white; background: green; position: absolute; top: 0; left: 0; width: 10em; }
+  </style>
+ </head>
+ <body>
+  <div class="control">FAIL</div>
+  <p>Ignore the scrollbars below.</p>
+  <div class="overflow">
+   <div class="positioned">PASS</div>
+  </div>
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-overflow-002-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-overflow-002-ref.xht
new file mode 100644
index 0000000..e5b0fad3
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-overflow-002-ref.xht
@@ -0,0 +1,49 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  body
+  {
+  line-height: 1.25;
+  margin-left: 0;
+  }
+
+  div#positioned
+  {
+  background: green;
+  color: white;
+  right: 0;
+  position: absolute;
+  top: 0;
+  width: 10em;
+  }
+
+  p {margin-top: 36px;}
+
+  div#overflow
+  {
+  height: 8em;
+  overflow: scroll;
+  width: 8em;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <div id="positioned">PASS</div>
+
+  <p>Ignore the scrollbars below.</p>
+
+  <div id="overflow"></div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-overflow-002.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-overflow-002.xht
new file mode 100644
index 0000000..793aaa6
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-overflow-002.xht
@@ -0,0 +1,25 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+  <title>CSS Test: Absolutely positioned children of overflow: scroll</title>
+  <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+  <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+  <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/absolute/overflow/002.html" type="text/html"/>
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visufx.html#overflow-clipping" />
+  <link rel="match" href="abspos-overflow-002-ref.xht" />
+
+  <style type="text/css">
+   html, body { margin: 0; border: 0; padding: 0; line-height: 1.25; }
+   .control { color: yellow; background: red; width: 10em; margin: 0 0 0 auto; }
+   .overflow { width: 8em; height: 8em; overflow: scroll; }
+   .positioned { color: white; background: green; position: absolute; top: 0; right: 0; width: 10em; }
+  </style>
+ </head>
+ <body>
+  <div class="control">FAIL</div>
+  <p>Ignore the scrollbars below.</p>
+  <div class="overflow">
+   <div class="positioned">PASS</div>
+  </div>
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-overflow-003-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-overflow-003-ref.xht
new file mode 100644
index 0000000..89fdbfc
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-overflow-003-ref.xht
@@ -0,0 +1,46 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  body {margin-left: 0;}
+
+  div#positioned
+  {
+  background: green;
+  color: white;
+  height: 5em;
+  left: 5em;
+  position: absolute;
+  top: 5em;
+  width: 5em;
+  }
+
+  p {margin-top: 11em;}
+
+  div#overflow
+  {
+  height: 8em;
+  overflow: scroll;
+  width: 8em;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <div id="positioned">PASS</div>
+
+  <p>Ignore the scrollbars below.</p>
+
+  <div id="overflow"></div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-overflow-003.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-overflow-003.xht
new file mode 100644
index 0000000..65f568e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-overflow-003.xht
@@ -0,0 +1,25 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+  <title>CSS Test: Absolutely positioned children of overflow: scroll</title>
+  <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+  <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+  <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/absolute/overflow/003.html" type="text/html"/>
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visufx.html#overflow-clipping" />
+  <link rel="match" href="abspos-overflow-003-ref.xht" />
+
+  <style type="text/css">
+   html, body { margin: 0; border: 0; padding: 0; }
+   .control { margin: 5em 0 0 5em; background: red; color: yellow; width: 5em; height: 5em; }
+   .overflow { overflow: scroll; width: 8em; height: 8em; }
+   .positioned { position: absolute; top: 5em; left: 5em; background: green; color: white; width: 5em; height: 5em; }
+  </style>
+ </head>
+ <body>
+  <div class="control">FAIL</div>
+  <p>Ignore the scrollbars below.</p>
+  <div class="overflow">
+   <div class="positioned">PASS</div>
+  </div>
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-overflow-004-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-overflow-004-ref.xht
new file mode 100644
index 0000000..2a01955
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-overflow-004-ref.xht
@@ -0,0 +1,32 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  body {margin-left: 0;}
+
+  div#positioned
+  {
+  background: green;
+  color: white;
+  left: 0;
+  position: absolute;
+  top: 0;
+  width: 10em;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <div id="positioned">PASS</div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-overflow-004.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-overflow-004.xht
new file mode 100644
index 0000000..eafa15e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-overflow-004.xht
@@ -0,0 +1,24 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+  <title>CSS Test: Absolutely positioned children of overflow: hidden</title>
+  <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+  <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+  <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/absolute/overflow/004.html" type="text/html"/>
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visufx.html#overflow-clipping" />
+  <link rel="match" href="abspos-overflow-004-ref.xht" />
+
+  <style type="text/css">
+   html, body { margin: 0; border: 0; padding: 0; }
+   .control { color: yellow; background: red; width: 10em; }
+   .overflow { width: 8em; height: 8em; overflow: hidden; }
+   .positioned { color: white; background: green; position: absolute; top: 0; left: 0; width: 10em; }
+  </style>
+ </head>
+ <body>
+  <div class="control">FAIL</div>
+  <div class="overflow">
+   <div class="positioned">PASS</div>
+  </div>
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-overflow-005-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-overflow-005-ref.xht
new file mode 100644
index 0000000..5a538e0
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-overflow-005-ref.xht
@@ -0,0 +1,32 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  body {margin-left: 0;}
+
+  div#positioned
+  {
+  background: green;
+  color: white;
+  position: absolute;
+  right: 0;
+  top: 0;
+  width: 10em;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <div id="positioned">PASS</div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-overflow-005.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-overflow-005.xht
new file mode 100644
index 0000000..109e7abb
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-overflow-005.xht
@@ -0,0 +1,24 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+  <title>CSS Test: Absolutely positioned children of overflow: hidden</title>
+  <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+  <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+  <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/absolute/overflow/005.html" type="text/html"/>
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visufx.html#overflow-clipping" />
+  <link rel="match" href="abspos-overflow-005-ref.xht" />
+
+  <style type="text/css">
+   html, body { margin: 0; border: 0; padding: 0; }
+   .control { color: yellow; background: red; width: 10em; margin: 0 0 0 auto; }
+   .overflow { width: 8em; height: 8em; overflow: hidden; }
+   .positioned { color: white; background: green; position: absolute; top: 0; right: 0; width: 10em; }
+  </style>
+ </head>
+ <body>
+  <div class="control">FAIL</div>
+  <div class="overflow">
+   <div class="positioned">PASS</div>
+  </div>
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-overflow-006-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-overflow-006-ref.xht
new file mode 100644
index 0000000..ff263190
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-overflow-006-ref.xht
@@ -0,0 +1,33 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  body {margin-left: 0;}
+
+  div#positioned
+  {
+  background: green;
+  color: white;
+  height: 5em;
+  left: 5em;
+  position: absolute;
+  top: 5em;
+  width: 5em;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <div id="positioned">PASS</div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-overflow-006.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-overflow-006.xht
new file mode 100644
index 0000000..6e88c2bf
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-overflow-006.xht
@@ -0,0 +1,24 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+  <title>CSS Test: Absolutely positioned children of overflow: hidden</title>
+  <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+  <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+  <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/absolute/overflow/006.html" type="text/html"/>
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visufx.html#overflow-clipping" />
+  <link rel="match" href="abspos-overflow-006-ref.xht" />
+
+  <style type="text/css">
+   html, body { margin: 0; border: 0; padding: 0; }
+   .control { margin: 5em 0 0 5em; background: red; color: yellow; width: 5em; height: 5em; }
+   .overflow { overflow: hidden; width: 8em; height: 8em; }
+   .positioned { position: absolute; top: 5em; left: 5em; background: green; color: white; width: 5em; height: 5em; }
+  </style>
+ </head>
+ <body>
+  <div class="control">FAIL</div>
+  <div class="overflow">
+   <div class="positioned">PASS</div>
+  </div>
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-overflow-007.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-overflow-007.xht
new file mode 100644
index 0000000..3c9ad7b
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-overflow-007.xht
@@ -0,0 +1,25 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+  <title>CSS Test: Absolutely positioned children of overflow: auto</title>
+  <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+  <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+  <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/absolute/overflow/007.html" type="text/html"/>
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visufx.html#overflow-clipping" />
+  <link rel="match" href="abspos-overflow-004-ref.xht" />
+
+  <style type="text/css">
+   html, body { margin: 0; border: 0; padding: 0; }
+   .control { color: yellow; background: red; width: 10em; }
+   .overflow { width: 8em; height: 8em; overflow: auto; }
+   .positioned { color: white; background: green; position: absolute; top: 0; left: 0; width: 10em; }
+  </style>
+ </head>
+ <body>
+  <div class="control">FAIL</div>
+  <!-- There should be no scrollbars below. -->
+  <div class="overflow">
+   <div class="positioned">PASS</div>
+  </div>
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-overflow-008.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-overflow-008.xht
new file mode 100644
index 0000000..af84b93
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-overflow-008.xht
@@ -0,0 +1,25 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+  <title>CSS Test: Absolutely positioned children of overflow: auto</title>
+  <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+  <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+  <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/absolute/overflow/008.html" type="text/html"/>
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visufx.html#overflow-clipping" />
+  <link rel="match" href="abspos-overflow-005-ref.xht" />
+
+  <style type="text/css">
+   html, body { margin: 0; border: 0; padding: 0; }
+   .control { color: yellow; background: red; width: 10em; margin: 0 0 0 auto; }
+   .overflow { width: 8em; height: 8em; overflow: auto; }
+   .positioned { color: white; background: green; position: absolute; top: 0; right: 0; width: 10em; }
+  </style>
+ </head>
+ <body>
+  <div class="control">FAIL</div>
+  <!-- There should be no scrollbars below. -->
+  <div class="overflow">
+   <div class="positioned">PASS</div>
+  </div>
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-overflow-009.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-overflow-009.xht
new file mode 100644
index 0000000..17eddd8a
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-overflow-009.xht
@@ -0,0 +1,25 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+  <title>CSS Test: Absolutely positioned children of overflow: auto</title>
+  <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+  <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+  <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/absolute/overflow/009.html" type="text/html"/>
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visufx.html#overflow-clipping" />
+  <link rel="match" href="abspos-overflow-006-ref.xht" />
+
+  <style type="text/css">
+   html, body { margin: 0; border: 0; padding: 0; }
+   .control { margin: 5em 0 0 5em; background: red; color: yellow; width: 5em; height: 5em; }
+   .overflow { overflow: auto; width: 8em; height: 8em; }
+   .positioned { position: absolute; top: 5em; left: 5em; background: green; color: white; width: 5em; height: 5em; }
+  </style>
+ </head>
+ <body>
+  <div class="control">FAIL</div>
+  <!-- There should be no scrollbars below. -->
+  <div class="overflow">
+   <div class="positioned">PASS</div>
+  </div>
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-overflow-010-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-overflow-010-ref.xht
new file mode 100644
index 0000000..09b8ce5
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-overflow-010-ref.xht
@@ -0,0 +1,24 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div {color: green;}
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>There should be green text below.</p>
+
+  <div>This text should be green.</div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-overflow-010.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-overflow-010.xht
new file mode 100644
index 0000000..7d2c9c35
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-overflow-010.xht
@@ -0,0 +1,29 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+  <title>CSS Test: Positioning, Overflow, and Stacking: Empty positioned children of 'overflow:auto' boxes</title>
+  <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+  <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+  <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/absolute/overflow/010.html" type="text/html"/>
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visufx.html#overflow-clipping" />
+  <link rel="match" href="abspos-overflow-010-ref.xht" />
+
+  <style type="text/css">
+   #outer {
+    overflow: auto; /* this should have no visible effect as the element sizes vertically to fit its contents */
+    color: green;
+   }
+   #inner {
+    position: absolute; /* relative to the viewport, not that it matters */
+    z-index: -1; /* this should have no effect, as the element is fully transparent anyway */
+   }
+  </style>
+ </head>
+ <body>
+  <p>There should be green text below.</p>
+  <div id="outer">
+   This text should be green.
+   <div id="inner"> </div>
+  </div>
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-overflow-011-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-overflow-011-ref.xht
new file mode 100644
index 0000000..fb2c49a2
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-overflow-011-ref.xht
@@ -0,0 +1,24 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div {color: green;}
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if there is <strong>no red</strong>.</p>
+
+  <div>This text should be green.</div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-overflow-011.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-overflow-011.xht
new file mode 100644
index 0000000..9cac516
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-overflow-011.xht
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+  <title>CSS Test: Positioning, Overflow, and Stacking: 'overflow:auto' as an in-flow sibling of a positioned element</title>
+  <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+  <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+  <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/absolute/overflow/011.html" type="text/html"/>
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visufx.html#overflow-clipping" />
+  <link rel="match" href="abspos-overflow-011-ref.xht" />
+
+  <style type="text/css">
+   #outer {
+    position: relative;
+   }
+   #inner {
+    position: absolute; /* positioned relative to the containing block of the div that follows it */
+    top: 0;
+    background: white;
+    color: green;
+    width: 20em;
+   }
+   #content {
+    overflow: auto; /* this should have no effect on the stacking context calculations or painting order */
+    background: red;
+    color: yellow;
+    width: 20em;
+   }
+  </style>
+ </head>
+ <body>
+  <p>Test passes if there is <strong>no red</strong>.</p>
+  <div id="outer">
+   <div id="inner"> This text should be green. </div>
+   <div id="content"> FAIL </div>
+ </div>
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-overflow-012.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-overflow-012.xht
new file mode 100644
index 0000000..376d5251
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-overflow-012.xht
@@ -0,0 +1,38 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+  <title>CSS Test: Positioning, Overflow, and Clipping: Does 'overflow:auto' affect positioned elements that are relative to elements outside the overflow</title>
+  <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+  <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+  <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/absolute/overflow/012.html" type="text/html"/>
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visufx.html#overflow-clipping" />
+  <link rel="match" href="abspos-overflow-011-ref.xht" />
+
+  <style type="text/css">
+   #outer {
+    position: relative;
+    height: 1em;
+    width: 20em;
+    background: red;
+   }
+   #inner {
+    overflow: auto; /* this rule should be irrelevant since the element is empty and thus has zero height */
+   }
+   #positioned {
+    position: absolute; /* relative to the outer div */
+    top: 0;
+    width: 20em;
+    background: white;
+    color: green;
+   }
+  </style>
+ </head>
+ <body>
+  <p>Test passes if there is <strong>no red</strong>.</p>
+  <div id="outer">
+   <div id="inner">
+    <div id="positioned"> This text should be green. </div>
+   </div>
+  </div>
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-paged-001.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-paged-001.xht
new file mode 100644
index 0000000..df3a3c0
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-paged-001.xht
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+  <title>CSS Test: Positioning in paged media: Initial containing block</title>
+  <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+  <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/absolute/paged/001.html" type="text/html"/>
+  <link rel="help" href="http://www.w3.org/TR/CSS21/page.html#page-intro" />
+  <meta name="flags" content="paged"/>
+  <style type="text/css">
+   div { page-break-after: always; }
+   h1 { position: absolute; top: 2em; left: 1em; font: 6em monospace; }
+  </style>
+ </head>
+ <body>
+  <p>Display this in a paged media. The word PASS should display below
+  (followed by three mostly-blank pages).</p>
+  <div><h1>P</h1></div>
+  <div><h1>&nbsp;A</h1>Blank Page 1</div>
+  <div><h1>&nbsp;&nbsp;S</h1>Blank Page 2</div>
+  <div><h1>&nbsp;&nbsp;&nbsp;S</h1>Blank Page 3</div>
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-paged-002.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-paged-002.xht
new file mode 100644
index 0000000..7f42267
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-paged-002.xht
@@ -0,0 +1,29 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+  <title>CSS Test: Positioning in paged media: Positioning multiple pages</title>
+  <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+  <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/>
+  <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/absolute/paged/002.html" type="text/html"/>
+  <link rel="help" href="http://www.w3.org/TR/CSS21/page.html#page-intro" />
+  <meta name="flags" content="paged"/>
+  <style type="text/css">
+   html, body { height: 100%; margin: 0; padding: 0; }
+   p { margin: 0; padding: 1em; }
+   div { height: 100%; position: relative; }
+   h1 { position: absolute; top: 50%; margin-top: -0.5em;
+        left: 0; right: 0; text-align: center;
+        font: 2em monospace; }
+  </style>
+ </head>
+ <body>
+  <div>
+  <p>Test passes if each of its five pages has the page number printed
+    in the middle of the page, with no overlap.</p>
+       <h1>Page one</h1></div>
+  <div><h1>Page two</h1></div>
+  <div><h1>Page three</h1></div>
+  <div><h1>Page four</h1></div>
+  <div><h1>Page five</h1></div>
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-width-001.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-width-001.xht
new file mode 100644
index 0000000..766c512
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-width-001.xht
@@ -0,0 +1,25 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+  <title>CSS Test: Absolute Positioning: width:auto with table width:100%</title>
+  <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+  <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+  <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/absolute/width/001.html" type="text/html"/>
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" />
+  <link rel="match" href="../reference/ref-if-there-is-no-red.xht" />
+
+  <style type="text/css">
+   div { position: absolute; }
+   td { background: red; height: 2em; padding: 0; }
+   .a { top: 4em; }
+   .b { top: 8em; }
+   .b table { width: 100%; }
+  </style>
+ </head>
+ <body>
+  <p>Test passes if there is <strong>no red</strong>.</p>
+  <!-- both should shrink wrap to 0, and 100% of 0 is 0. -->
+  <div class="a"> <table> <tr> <td> </td> </tr> </table> </div>
+  <div class="b"> <table> <tr> <td> </td> </tr> </table> </div>
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-width-002.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-width-002.xht
new file mode 100644
index 0000000..0465f65
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-width-002.xht
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+  <title>CSS Test: Absolute Positioning: width:auto with block width:100%</title>
+  <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+  <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+  <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/absolute/width/002.html" type="text/html"/>
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" />
+  <link rel="match" href="../reference/ref-if-there-is-no-red.xht" />
+
+  <style type="text/css">
+   .a, .b { position: absolute; }
+   .inner { background: red; height: 2em; }
+   .a { top: 4em; }
+   .a .inner { width: auto; }
+   .b { top: 8em; }
+   .b .inner { width: 100%; }
+  </style>
+ </head>
+ <body>
+  <p>Test passes if there is <strong>no red</strong>.</p>
+  <!-- both should shrink wrap to 0, and 100% of 0 is 0. -->
+  <div class="a"> <div class="inner"> </div> </div>
+  <div class="b"> <div class="inner"> </div> </div>
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-width-003.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-width-003.xht
new file mode 100644
index 0000000..79208b8
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-width-003.xht
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+  <title>CSS Test: Absolute Positioning: width:auto with block width:50%</title>
+  <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+  <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+  <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/absolute/width/003.html" type="text/html"/>
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" />
+  <link rel="match" href="../reference/ref-if-there-is-no-red.xht" />
+
+  <style type="text/css">
+   .a, .b { position: absolute; }
+   .inner { background: red; height: 2em; }
+   .a { top: 4em; }
+   .a .inner { width: auto; }
+   .b { top: 8em; }
+   .b .inner { width: 50%; }
+  </style>
+ </head>
+ <body>
+  <p>Test passes if there is <strong>no red</strong>.</p>
+  <!-- both should shrink wrap to 0, and 100% of 0 is 0. -->
+  <div class="a"> <div class="inner"> </div> </div>
+  <div class="b"> <div class="inner"> </div> </div>
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-width-004.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-width-004.xht
new file mode 100644
index 0000000..ee6f896
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-width-004.xht
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+  <title>CSS Test: Absolute Positioning: width: 2em with block width:100%</title>
+  <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+  <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+  <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/absolute/width/004.html" type="text/html"/>
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" />
+  <link rel="match" href="../reference/ref-filled-green-100px-square.xht" />
+
+  <style type="text/css">
+   .test { width: 2em; height: 2em; padding: 2em; border: green solid 2px; background: red; position: relative; }
+   .test div { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: green; }
+  </style>
+ </head>
+ <body>
+  <p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
+  <div class="test">
+   <div> </div>
+  </div>
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-width-005-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-width-005-ref.xht
new file mode 100644
index 0000000..e330007
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-width-005-ref.xht
@@ -0,0 +1,39 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div#parent
+  {
+  border: fuchsia solid thin;
+  height: 5em;
+  padding: 1em;
+  width: 10em;
+  }
+
+  div#child
+  {
+  border: aqua solid thin;
+  padding: 1em;
+  width: 3em;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>The blue rectangle should be well within the pink rectangle, but its text should overflow out of both rectangles.</p>
+
+  <div id="parent">
+     <div id="child">overflowyflowyflowyflowyflowyflowyflowyflowy</div>
+  </div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-width-005.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-width-005.xht
new file mode 100644
index 0000000..1913db0d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-width-005.xht
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+  <title>CSS Test: Absolute Positioning: max-width</title>
+  <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+  <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+  <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/box/absolute/width/005-demo.html" type="text/html"/>
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width" />
+  <link rel="match" href="abspos-width-005-ref.xht" />
+
+  <style type="text/css">
+   .relative { position: relative; border: fuchsia thin solid; padding: 1em; width: 10em; height: 5em; }
+   .absolute { position: absolute; border: aqua thin solid; padding: 1em; max-width: 3em; }
+  </style>
+ </head>
+ <body>
+  <p>The blue rectangle should be well within the pink rectangle, but its text should overflow out of both rectangles.</p>
+  <div class="relative">
+   <div class="absolute"> overflowyflowyflowyflowyflowyflowyflowyflowy </div>
+  </div>
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-zero-width-001.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-zero-width-001.xht
new file mode 100644
index 0000000..4f8b5d14
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/abspos-zero-width-001.xht
@@ -0,0 +1,30 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD//XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolute positioned elements still affect scrolling mechanism</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visufx.html#overflow" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#the-height-property" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#the-width-property" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#choose-position" />
+        <meta name="flags" content="image" />
+        <meta name="assert" content="Zero width absolute positioned elements still affects scrolling mechanism even though they are out of flow of the content." />
+        <style type="text/css">
+            body
+            {
+                background: url("../support/abspos-zero-width-001.png") no-repeat;
+            }
+            div
+            {
+                height: 2000px;
+                position: absolute;
+                top: 0;
+                width: 0;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a blue line above this text and a green box visible when the page is scrolled to its full extent vertically.</p>
+        <div></div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-004.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-004.xht
new file mode 100644
index 0000000..b9764792
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-004.xht
@@ -0,0 +1,33 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Bottom using pixels with a value of negative zero, -0px</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-bottom" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="../reference/ref-no-vert-space-between.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'bottom' property sets a negative zero length value in pixels." />
+        <style type="text/css">
+            #div1
+            {
+                border-top: blue solid 5px;
+                position: relative;
+            }
+            #div2
+            {
+                border-top: orange solid 5px;
+                bottom: -0px;
+                position: relative;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-005.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-005.xht
new file mode 100644
index 0000000..65f2968
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-005.xht
@@ -0,0 +1,33 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Bottom using pixels with a value of zero, 0px</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-bottom" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="../reference/ref-no-vert-space-between.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'bottom' property sets a zero length value in pixels." />
+        <style type="text/css">
+            #div1
+            {
+                border-top: blue solid 5px;
+                position: relative;
+            }
+            #div2
+            {
+                border-top: orange solid 5px;
+                bottom: 0px;
+                position: relative;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-006.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-006.xht
new file mode 100644
index 0000000..3d322bb
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-006.xht
@@ -0,0 +1,33 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Bottom using pixels with a value of positive zero, +0px</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-bottom" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="../reference/ref-no-vert-space-between.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'bottom' property sets a positive zero length value in pixels." />
+        <style type="text/css">
+            #div1
+            {
+                border-top: blue solid 5px;
+                position: relative;
+            }
+            #div2
+            {
+                border-top: orange solid 5px;
+                bottom: +0px;
+                position: relative;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-007-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-007-ref.xht
new file mode 100644
index 0000000..9432920
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-007-ref.xht
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div
+  {
+  background-color: black;
+  height: 3px;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if there is <strong>no red</strong>.</p>
+
+  <div></div>
+
+ </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-007.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-007.xht
new file mode 100644
index 0000000..eeee689
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-007.xht
@@ -0,0 +1,34 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Bottom using pixels with a nominal value, 96px</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-bottom" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="bottom-007-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'bottom' property sets a nominal length value in pixels." />
+        <style type="text/css">
+            #div1
+            {
+                border-top: 3px solid red;
+                position: relative;
+            }
+            #div2
+            {
+                border-top: 3px solid black;
+                margin-top: 93px;
+                bottom: 96px;
+                position: relative;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-008.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-008.xht
new file mode 100644
index 0000000..04c4952
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-008.xht
@@ -0,0 +1,34 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Bottom using pixels with a positive nominal value, +96px</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-bottom" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="bottom-007-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'bottom' property sets a positive nominal length value in pixels." />
+        <style type="text/css">
+            #div1
+            {
+                border-top: 3px solid red;
+                position: relative;
+            }
+            #div2
+            {
+                border-top: 3px solid black;
+                margin-top: 93px;
+                bottom: +96px;
+                position: relative;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-016.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-016.xht
new file mode 100644
index 0000000..1770c85
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-016.xht
@@ -0,0 +1,33 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Bottom using points with a value of negative zero, -0pt</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-bottom" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="../reference/ref-no-vert-space-between.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'bottom' property sets a negative zero length value in points." />
+        <style type="text/css">
+            #div1
+            {
+                border-top: blue solid 5px;
+                position: relative;
+            }
+            #div2
+            {
+                border-top: orange solid 5px;
+                bottom: -0pt;
+                position: relative;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-017.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-017.xht
new file mode 100644
index 0000000..62ea687
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-017.xht
@@ -0,0 +1,33 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Bottom using points with a value of zero, 0pt</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-bottom" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="../reference/ref-no-vert-space-between.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'bottom' property sets a zero length value in points." />
+        <style type="text/css">
+            #div1
+            {
+                border-top: blue solid 5px;
+                position: relative;
+            }
+            #div2
+            {
+                border-top: orange solid 5px;
+                bottom: 0pt;
+                position: relative;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-018.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-018.xht
new file mode 100644
index 0000000..6837fb2c
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-018.xht
@@ -0,0 +1,33 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Bottom using points with a value of positive zero, +0pt</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-bottom" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="../reference/ref-no-vert-space-between.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'bottom' property sets a positive zero length value in points." />
+        <style type="text/css">
+            #div1
+            {
+                border-top: blue solid 5px;
+                position: relative;
+            }
+            #div2
+            {
+                border-top: orange solid 5px;
+                bottom: +0pt;
+                position: relative;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-019-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-019-ref.xht
new file mode 100644
index 0000000..5dbb930
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-019-ref.xht
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div
+  {
+  background-color: black;
+  height: 96px;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if there is <strong>no red</strong>.</p>
+
+  <div></div>
+
+ </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-019.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-019.xht
new file mode 100644
index 0000000..68889c5
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-019.xht
@@ -0,0 +1,33 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Bottom using points with a nominal value, 72pt</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-bottom" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="bottom-019-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'bottom' property sets a nominal length value in points." />
+        <style type="text/css">
+            #div1
+            {
+                border-top: 72pt solid red;
+                position: relative;
+            }
+            #div2
+            {
+                border-top: 72pt solid black;
+                bottom: 72pt;
+                position: relative;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-020.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-020.xht
new file mode 100644
index 0000000..ea3958f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-020.xht
@@ -0,0 +1,33 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Bottom using points with a positive nominal value, +72pt</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-bottom" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="bottom-019-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'bottom' property sets a positive nominal length value in points." />
+        <style type="text/css">
+            #div1
+            {
+                border-top: 72pt solid red;
+                position: relative;
+            }
+            #div2
+            {
+                border-top: 72pt solid black;
+                bottom: +72pt;
+                position: relative;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-028.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-028.xht
new file mode 100644
index 0000000..914a22b
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-028.xht
@@ -0,0 +1,33 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Bottom using picas with a value of negative zero, -0pc</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-bottom" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="../reference/ref-no-vert-space-between.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'bottom' property sets a negative zero length value in picas." />
+        <style type="text/css">
+            #div1
+            {
+                border-top: blue solid 5px;
+                position: relative;
+            }
+            #div2
+            {
+                border-top: orange solid 5px;
+                bottom: -0pc;
+                position: relative;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-029.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-029.xht
new file mode 100644
index 0000000..e0befc8
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-029.xht
@@ -0,0 +1,33 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Bottom using picas with a value of zero, 0pc</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-bottom" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="../reference/ref-no-vert-space-between.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'bottom' property sets a zero length value in picas." />
+        <style type="text/css">
+            #div1
+            {
+                border-top: blue solid 5px;
+                position: relative;
+            }
+            #div2
+            {
+                border-top: orange solid 5px;
+                bottom: 0pc;
+                position: relative;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-030.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-030.xht
new file mode 100644
index 0000000..2df466c
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-030.xht
@@ -0,0 +1,33 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Bottom using picas with a value of positive zero, +0pc</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-bottom" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="../reference/ref-no-vert-space-between.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'bottom' property sets a positive zero length value in picas." />
+        <style type="text/css">
+            #div1
+            {
+                border-top: blue solid 5px;
+                position: relative;
+            }
+            #div2
+            {
+                border-top: orange solid 5px;
+                bottom: +0pc;
+                position: relative;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-031.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-031.xht
new file mode 100644
index 0000000..b0f479e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-031.xht
@@ -0,0 +1,33 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Bottom using picas with a nominal value, 6pc</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-bottom" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="bottom-019-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'bottom' property sets a nominal length value in picas." />
+        <style type="text/css">
+            #div1
+            {
+                border-top: 6pc solid red;
+                position: relative;
+            }
+            #div2
+            {
+                border-top: 6pc solid black;
+                bottom: 6pc;
+                position: relative;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-032.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-032.xht
new file mode 100644
index 0000000..1df630f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-032.xht
@@ -0,0 +1,33 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Bottom using picas with a positive nominal value, +6pc</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-bottom" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="bottom-019-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'bottom' property sets a positive nominal length value in picas." />
+        <style type="text/css">
+            #div1
+            {
+                border-top: 6pc solid red;
+                position: relative;
+            }
+            #div2
+            {
+                border-top: 6pc solid black;
+                bottom: +6pc;
+                position: relative;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-040.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-040.xht
new file mode 100644
index 0000000..5e6164c7
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-040.xht
@@ -0,0 +1,33 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Bottom using centimeters with a value of negative zero, -0cm</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-bottom" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="../reference/ref-no-vert-space-between.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'bottom' property sets a negative zero length value in centimeters." />
+        <style type="text/css">
+            #div1
+            {
+                border-top: blue solid 5px;
+                position: relative;
+            }
+            #div2
+            {
+                border-top: orange solid 5px;
+                bottom: -0cm;
+                position: relative;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-041.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-041.xht
new file mode 100644
index 0000000..9b25cc9
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-041.xht
@@ -0,0 +1,33 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Bottom using centimeters with a value of zero, 0cm</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-bottom" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="../reference/ref-no-vert-space-between.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'bottom' property sets a zero length value in centimeters." />
+        <style type="text/css">
+            #div1
+            {
+                border-top: blue solid 5px;
+                position: relative;
+            }
+            #div2
+            {
+                border-top: orange solid 5px;
+                bottom: 0cm;
+                position: relative;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-042.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-042.xht
new file mode 100644
index 0000000..4e12f524
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-042.xht
@@ -0,0 +1,33 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Bottom using centimeters with a value of positive zero, +0cm</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-bottom" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="../reference/ref-no-vert-space-between.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'bottom' property sets a positive zero length value in centimeters." />
+        <style type="text/css">
+            #div1
+            {
+                border-top: blue solid 5px;
+                position: relative;
+            }
+            #div2
+            {
+                border-top: orange solid 5px;
+                bottom: +0cm;
+                position: relative;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-043.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-043.xht
new file mode 100644
index 0000000..3f9aa6b
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-043.xht
@@ -0,0 +1,33 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Bottom using centimeters with a nominal value, 2.54cm</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-bottom" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="bottom-019-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'bottom' property sets a nominal length value in centimeters." />
+        <style type="text/css">
+            #div1
+            {
+                border-top: 2.54cm solid red;
+                position: relative;
+            }
+            #div2
+            {
+                border-top: 2.54cm solid black;
+                bottom: 2.54cm;
+                position: relative;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-044.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-044.xht
new file mode 100644
index 0000000..08a26c5
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-044.xht
@@ -0,0 +1,33 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Bottom using centimeters with a positive nominal value, +2.54cm</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-bottom" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="bottom-019-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'bottom' property sets a positive nominal length value in centimeters." />
+        <style type="text/css">
+            #div1
+            {
+                border-top: 2.54cm solid red;
+                position: relative;
+            }
+            #div2
+            {
+                border-top: 2.54cm solid black;
+                bottom: +2.54cm;
+                position: relative;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-052.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-052.xht
new file mode 100644
index 0000000..4e3d0ec
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-052.xht
@@ -0,0 +1,33 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Bottom using millimeters with a value of negative zero, -0mm</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-bottom" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="../reference/ref-no-vert-space-between.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'bottom' property sets a negative zero length value in millimeters." />
+        <style type="text/css">
+            #div1
+            {
+                border-top: blue solid 5px;
+                position: relative;
+            }
+            #div2
+            {
+                border-top: orange solid 5px;
+                bottom: -0mm;
+                position: relative;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-053.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-053.xht
new file mode 100644
index 0000000..6e5b380
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-053.xht
@@ -0,0 +1,33 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Bottom using millimeters with a value of zero, 0mm</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-bottom" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="../reference/ref-no-vert-space-between.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'bottom' property sets a zero length value in millimeters." />
+        <style type="text/css">
+            #div1
+            {
+                border-top: blue solid 5px;
+                position: relative;
+            }
+            #div2
+            {
+                border-top: orange solid 5px;
+                bottom: 0mm;
+                position: relative;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-054.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-054.xht
new file mode 100644
index 0000000..422e2541
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-054.xht
@@ -0,0 +1,33 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Bottom using millimeters with a value of positive zero, +0mm</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-bottom" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="../reference/ref-no-vert-space-between.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'bottom' property sets a positive zero length value in millimeters." />
+        <style type="text/css">
+            #div1
+            {
+                border-top: blue solid 5px;
+                position: relative;
+            }
+            #div2
+            {
+                border-top: orange solid 5px;
+                bottom: +0mm;
+                position: relative;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-055.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-055.xht
new file mode 100644
index 0000000..d78bf380
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-055.xht
@@ -0,0 +1,33 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Bottom using millimeters with a nominal value, 25.4mm</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-bottom" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="bottom-019-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'bottom' property sets a nominal length value in millimeters." />
+        <style type="text/css">
+            #div1
+            {
+                border-top: 25.4mm solid red;
+                position: relative;
+            }
+            #div2
+            {
+                border-top: 25.4mm solid black;
+                bottom: 25.4mm;
+                position: relative;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-056.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-056.xht
new file mode 100644
index 0000000..20ed68d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-056.xht
@@ -0,0 +1,33 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Bottom using millimeters with a positive nominal value, +25.4mm</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-bottom" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="bottom-019-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'bottom' property sets a positive nominal length value in millimeters." />
+        <style type="text/css">
+            #div1
+            {
+                border-top: 25.4mm solid red;
+                position: relative;
+            }
+            #div2
+            {
+                border-top: 25.4mm solid black;
+                bottom: +25.4mm;
+                position: relative;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-064.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-064.xht
new file mode 100644
index 0000000..c5a18d6
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-064.xht
@@ -0,0 +1,33 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Bottom using inches with a value of negative zero, -0in</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-bottom" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="../reference/ref-no-vert-space-between.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'bottom' property sets a negative zero length value in inches." />
+        <style type="text/css">
+            #div1
+            {
+                border-top: blue solid 5px;
+                position: relative;
+            }
+            #div2
+            {
+                border-top: orange solid 5px;
+                bottom: -0in;
+                position: relative;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-065.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-065.xht
new file mode 100644
index 0000000..3a46103c
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-065.xht
@@ -0,0 +1,33 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Bottom using inches with a value of zero, 0in</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-bottom" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="../reference/ref-no-vert-space-between.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'bottom' property sets a zero length value in inches." />
+        <style type="text/css">
+            #div1
+            {
+                border-top: blue solid 5px;
+                position: relative;
+            }
+            #div2
+            {
+                border-top: orange solid 5px;
+                bottom: 0in;
+                position: relative;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-066.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-066.xht
new file mode 100644
index 0000000..e9a6dff
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-066.xht
@@ -0,0 +1,33 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Bottom using inches with a value of positive zero, +0in</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-bottom" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="../reference/ref-no-vert-space-between.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'bottom' property sets a positive zero length value in inches." />
+        <style type="text/css">
+            #div1
+            {
+                border-top: blue solid 5px;
+                position: relative;
+            }
+            #div2
+            {
+                border-top: orange solid 5px;
+                bottom: +0in;
+                position: relative;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-067.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-067.xht
new file mode 100644
index 0000000..f1378b1
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-067.xht
@@ -0,0 +1,33 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Bottom using inches with a nominal value, 1in</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-bottom" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="bottom-019-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'bottom' property sets a nominal length value in inches." />
+        <style type="text/css">
+            #div1
+            {
+                border-top: 1in solid red;
+                position: relative;
+            }
+            #div2
+            {
+                border-top: 1in solid black;
+                bottom: 1in;
+                position: relative;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-068.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-068.xht
new file mode 100644
index 0000000..e9e206c
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-068.xht
@@ -0,0 +1,33 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Bottom using inches with a positive nominal value, +1in</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-bottom" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="bottom-019-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'bottom' property sets a positive nominal length value in inches." />
+        <style type="text/css">
+            #div1
+            {
+                border-top: 1in solid red;
+                position: relative;
+            }
+            #div2
+            {
+                border-top: 1in solid black;
+                bottom: +1in;
+                position: relative;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-076.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-076.xht
new file mode 100644
index 0000000..902c734
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-076.xht
@@ -0,0 +1,35 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Bottom using 'em' units with a value of negative zero, -0em</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-bottom" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="../reference/ref-no-vert-space-between.xht" />
+
+        <meta name="flags" content="ahem" />
+        <meta name="assert" content="The 'bottom' property sets a negative zero length value in 'em' units." />
+        <style type="text/css">
+            div
+            {
+                position: relative;
+            }
+            #div1
+            {
+                border-top: blue solid 5px;
+            }
+            #div2
+            {
+                border-top: orange solid 5px;
+                bottom: -0em;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-077.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-077.xht
new file mode 100644
index 0000000..ac8c772
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-077.xht
@@ -0,0 +1,35 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Bottom using 'em' units with a value of zero, 0em</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-bottom" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="../reference/ref-no-vert-space-between.xht" />
+
+        <meta name="flags" content="ahem" />
+        <meta name="assert" content="The 'bottom' property sets a zero length value in 'em' units." />
+        <style type="text/css">
+            div
+            {
+                position: relative;
+            }
+            #div1
+            {
+                border-top: blue solid 5px;
+            }
+            #div2
+            {
+                border-top: orange solid 5px;
+                bottom: 0em;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-078.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-078.xht
new file mode 100644
index 0000000..c2fa01c
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-078.xht
@@ -0,0 +1,35 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Bottom using 'em' units with a value of positive zero, +0em</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-bottom" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="../reference/ref-no-vert-space-between.xht" />
+
+        <meta name="flags" content="ahem" />
+        <meta name="assert" content="The 'bottom' property sets a positive zero length value in 'em' units." />
+        <style type="text/css">
+            div
+            {
+                position: relative;
+            }
+            #div1
+            {
+                border-top: blue solid 5px;
+            }
+            #div2
+            {
+                border-top: orange solid 5px;
+                bottom: +0em;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-079-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-079-ref.xht
new file mode 100644
index 0000000..a60fc81
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-079-ref.xht
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div
+  {
+  background-color: black;
+  height: 20px;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if there is <strong>no red</strong>.</p>
+
+  <div></div>
+
+ </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-079.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-079.xht
new file mode 100644
index 0000000..18e164d1
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-079.xht
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Bottom using 'em' units with a nominal value, 6em</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-bottom" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="bottom-079-ref.xht" />
+
+        <meta name="flags" content="ahem" />
+        <meta name="assert" content="The 'bottom' property sets a nominal length value in 'em' units." />
+        <style type="text/css">
+            div
+            {
+                font: 20px/1 Ahem;
+                position: relative;
+            }
+            #div1
+            {
+                border-top: 1em solid red;
+            }
+            #div2
+            {
+                border-top: 1em solid black;
+                margin-top: 5em;
+                bottom: 6em;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-080.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-080.xht
new file mode 100644
index 0000000..2c3f3029
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-080.xht
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Bottom using 'em' units with a positive nominal value, +6em</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-bottom" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="bottom-079-ref.xht" />
+
+        <meta name="flags" content="ahem" />
+        <meta name="assert" content="The 'bottom' property sets a positive nominal length value in 'em' units." />
+        <style type="text/css">
+            div
+            {
+                font: 20px/1 Ahem;
+                position: relative;
+            }
+            #div1
+            {
+                border-top: 1em solid red;
+            }
+            #div2
+            {
+                border-top: 1em solid black;
+                margin-top: 5em;
+                bottom: +6em;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-088.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-088.xht
new file mode 100644
index 0000000..19112b38
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-088.xht
@@ -0,0 +1,36 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Bottom using 'ex' units with a value of negative zero, -0ex</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-bottom" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="../reference/ref-no-vert-space-between.xht" />
+
+        <meta name="flags" content="ahem" />
+        <meta name="assert" content="The 'bottom' property sets a negative zero length value in 'ex' units." />
+        <style type="text/css">
+            div
+            {
+                font: 20px/1 Ahem;
+                position: relative;
+            }
+            #div1
+            {
+                border-top: blue solid 5px;
+            }
+            #div2
+            {
+                border-top: orange solid 5px;
+                bottom: -0ex;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-089.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-089.xht
new file mode 100644
index 0000000..5bb9a5c
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-089.xht
@@ -0,0 +1,36 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Bottom using 'ex' units with a value of zero, 0ex</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-bottom" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="../reference/ref-no-vert-space-between.xht" />
+
+        <meta name="flags" content="ahem" />
+        <meta name="assert" content="The 'bottom' property sets a zero length value in 'ex' units." />
+        <style type="text/css">
+            div
+            {
+                font: 20px/1 Ahem;
+                position: relative;
+            }
+            #div1
+            {
+                border-top: blue solid 5px;
+            }
+            #div2
+            {
+                border-top: orange solid 5px;
+                bottom: 0ex;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-090.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-090.xht
new file mode 100644
index 0000000..a5cfd7a8a
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-090.xht
@@ -0,0 +1,36 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Bottom using 'ex' units with a value of positive zero, +0ex</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-bottom" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="../reference/ref-no-vert-space-between.xht" />
+
+        <meta name="flags" content="ahem" />
+        <meta name="assert" content="The 'bottom' property sets a positive zero length value in 'ex' units." />
+        <style type="text/css">
+            div
+            {
+                font: 20px/1 Ahem;
+                position: relative;
+            }
+            #div1
+            {
+                border-top: blue solid 5px;
+            }
+            #div2
+            {
+                border-top: orange solid 5px;
+                bottom: +0ex;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-091.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-091.xht
new file mode 100644
index 0000000..67ec6fc0
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-091.xht
@@ -0,0 +1,36 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Bottom using 'ex' units with a nominal value, 6ex</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-bottom" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="bottom-019-ref.xht" />
+
+        <meta name="flags" content="ahem" />
+        <meta name="assert" content="The 'bottom' property sets a nominal length value in 'ex' units." />
+        <style type="text/css">
+            div
+            {
+                font: 20px/1 Ahem;
+                position: relative;
+            }
+            #div1
+            {
+                border-top: 6ex solid red;
+            }
+            #div2
+            {
+                border-top: 6ex solid black;
+                bottom: 6ex;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-092.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-092.xht
new file mode 100644
index 0000000..58f9123d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-092.xht
@@ -0,0 +1,36 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Bottom using 'ex' units with a positive nominal value, +6ex</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-bottom" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="bottom-019-ref.xht" />
+
+        <meta name="flags" content="ahem" />
+        <meta name="assert" content="The 'bottom' property sets a positive nominal length value in 'ex' units." />
+        <style type="text/css">
+            div
+            {
+                font: 20px/1 Ahem;
+                position: relative;
+            }
+            #div1
+            {
+                border-top: 6ex solid red;
+            }
+            #div2
+            {
+                border-top: 6ex solid black;
+                bottom: +6ex;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-100.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-100.xht
new file mode 100644
index 0000000..806e34a
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-100.xht
@@ -0,0 +1,36 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Bottom using percentages with a value of negative zero, -0%</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-bottom" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="../reference/ref-no-vert-space-between.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'bottom' property sets a negative zero length value in percentages." />
+        <style type="text/css">
+            div
+            {
+                position: relative;
+            }
+            #div1
+            {
+                border-top: blue solid 5px;
+                height: 1in;
+            }
+            #div2
+            {
+                border-top: orange solid 5px;
+                bottom: -0%;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-101.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-101.xht
new file mode 100644
index 0000000..d1027e6
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-101.xht
@@ -0,0 +1,36 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Bottom using percentages with a value of zero, 0%</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-bottom" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="../reference/ref-no-vert-space-between.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'bottom' property sets a zero length value in percentages." />
+        <style type="text/css">
+            div
+            {
+                position: relative;
+            }
+            #div1
+            {
+                border-top: blue solid 5px;
+                height: 1in;
+            }
+            #div2
+            {
+                border-top: orange solid 5px;
+                bottom: 0%;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-102.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-102.xht
new file mode 100644
index 0000000..4d87037
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-102.xht
@@ -0,0 +1,36 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Bottom using percentages with a value of positive zero, +0%</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-bottom" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="../reference/ref-no-vert-space-between.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'bottom' property sets a positive zero length value in percentages." />
+        <style type="text/css">
+            div
+            {
+                position: relative;
+            }
+            #div1
+            {
+                border-top: blue solid 5px;
+                height: 1in;
+            }
+            #div2
+            {
+                border-top: orange solid 5px;
+                bottom: +0%;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-103.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-103.xht
new file mode 100644
index 0000000..ce0074e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-103.xht
@@ -0,0 +1,36 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Bottom using percentages with a nominal value, 100%</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-bottom" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="bottom-019-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'bottom' property sets a nominal length value in percentages." />
+        <style type="text/css">
+            div
+            {
+                position: relative;
+            }
+            #div1
+            {
+                border-top: 1in solid red;
+                height: 1in;
+            }
+            #div2
+            {
+                border-top: 1in solid black;
+                bottom: 100%;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-104.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-104.xht
new file mode 100644
index 0000000..5806d7a
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-104.xht
@@ -0,0 +1,36 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Bottom using percentages with a positive nominal value, +100%</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-bottom" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="bottom-019-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'bottom' property sets a positive nominal length value in percentages." />
+        <style type="text/css">
+            div
+            {
+                position: relative;
+            }
+            #div1
+            {
+                border-top: 1in solid red;
+                height: 1in;
+            }
+            #div2
+            {
+                border-top: 1in solid black;
+                bottom: +100%;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-109.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-109.xht
new file mode 100644
index 0000000..5537c98
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-109.xht
@@ -0,0 +1,33 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Bottom with a value of negative zero and no units, -0</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-bottom" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="../reference/ref-no-vert-space-between.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'bottom' property sets a negative zero length value with no units." />
+        <style type="text/css">
+            #div1
+            {
+                border-top: blue solid 5px;
+                position: relative;
+            }
+            #div2
+            {
+                border-top: orange solid 5px;
+                bottom: -0;
+                position: relative;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-110.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-110.xht
new file mode 100644
index 0000000..054f9a4
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-110.xht
@@ -0,0 +1,33 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Bottom with a value of zero and no units, 0</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-bottom" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="../reference/ref-no-vert-space-between.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'bottom' property sets a zero length value with no units." />
+        <style type="text/css">
+            #div1
+            {
+                border-top: blue solid 5px;
+                position: relative;
+            }
+            #div2
+            {
+                border-top: orange solid 5px;
+                bottom: 0;
+                position: relative;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-111.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-111.xht
new file mode 100644
index 0000000..8c181f6e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-111.xht
@@ -0,0 +1,33 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Bottom with a value of positive zero and no units, +0</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-bottom" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="../reference/ref-no-vert-space-between.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'bottom' property sets a positive zero length value with no units." />
+        <style type="text/css">
+            #div1
+            {
+                border-top: blue solid 5px;
+                position: relative;
+            }
+            #div2
+            {
+                border-top: orange solid 5px;
+                bottom: +0;
+                position: relative;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-112.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-112.xht
new file mode 100644
index 0000000..11fb0a67
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-112.xht
@@ -0,0 +1,33 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Bottom with a value of 'auto'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-bottom" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="../reference/ref-no-vert-space-between.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'bottom' property sets a value of 'auto'." />
+        <style type="text/css">
+            #div1
+            {
+                border-top: blue solid 5px;
+                position: relative;
+            }
+            #div2
+            {
+                border-top: orange solid 5px;
+                bottom: auto;
+                position: relative;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-113-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-113-ref.xht
new file mode 100644
index 0000000..206b423
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-113-ref.xht
@@ -0,0 +1,29 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div
+  {
+  background-color: black;
+  height: 96px;
+  margin-top: 96px;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if there is <strong>no red</strong>.</p>
+
+  <div></div>
+
+ </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-113.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-113.xht
new file mode 100644
index 0000000..1e466f7
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-113.xht
@@ -0,0 +1,44 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Bottom with a value of 'inherit'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-bottom" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="bottom-113-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'bottom' property sets a value of 'inherit', inheriting the computed value from the parent element." />
+        <style type="text/css">
+            div
+            {
+                position: relative;
+            }
+            #parent
+            {
+                height: 1in;
+                margin-top: 2in;
+            }
+            #div1
+            {
+                border-top: 1in solid red;
+                height: 1in;
+                bottom: 100%;
+            }
+            #div2
+            {
+                border-top: 1in solid black;
+                bottom: inherit;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="parent">
+            <div id="div1">
+                <div id="div2"></div>
+            </div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-applies-to-001-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-applies-to-001-ref.xht
new file mode 100644
index 0000000..5b104d4
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-applies-to-001-ref.xht
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  html, body, div {height: 100%;}
+
+  body, p {margin: 0px;}
+
+  div {background: url("support/green_box.png") no-repeat 8px bottom;}
+
+  p {padding: 16px 8px 0px 8px;}
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <div><p>Test passes if there is a filled green square at the bottom of the page.</p></div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-applies-to-001.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-applies-to-001.xht
new file mode 100644
index 0000000..2cc74f9
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-applies-to-001.xht
@@ -0,0 +1,51 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Bottom applied to element with 'display' set to 'table-row-group'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-15 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-bottom" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="bottom-applies-to-001-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'bottom' property applies to elements with a display of 'table-row-group'." />
+        <style type="text/css">
+			body {margin: 8px;}
+
+            #test
+            {
+                bottom: 0;
+                display: table-row-group;
+                position: absolute;
+            }
+            #table
+            {
+                display: table;
+                table-layout: fixed;
+            }
+            #row
+            {
+                display: table-row;
+            }
+            #cell
+            {
+                background: green;
+                display: table-cell;
+                height: 100px;
+                width: 100px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a filled green square at the bottom of the page.</p>
+        <div id="table">
+            <div id="test">
+                <div id="row">
+                    <div id="cell"></div>
+                </div>
+            </div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-applies-to-002.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-applies-to-002.xht
new file mode 100644
index 0000000..819528c
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-applies-to-002.xht
@@ -0,0 +1,51 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Bottom applied to element with 'display' set to 'table-header-group'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-15 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-bottom" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="bottom-applies-to-001-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'bottom' property applies to elements with a display of 'table-header-group'." />
+        <style type="text/css">
+			body {margin: 8px;}
+
+            #test
+            {
+                background: green;
+                bottom: 0;
+                display: table-header-group;
+                position: absolute;
+            }
+            #table
+            {
+                display: table;
+                table-layout: fixed;
+            }
+            #row
+            {
+                display: table-row;
+            }
+            #cell
+            {
+                display: table-cell;
+                height: 100px;
+                width: 100px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a filled green square at the bottom of the page.</p>
+        <div id="table">
+            <div id="test">
+                <div id="row">
+                    <div id="cell"></div>
+                </div>
+            </div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-applies-to-003.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-applies-to-003.xht
new file mode 100644
index 0000000..7d6f2a08
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-applies-to-003.xht
@@ -0,0 +1,51 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Bottom applied to element with 'display' set to 'table-footer-group'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-15 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-bottom" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="bottom-applies-to-001-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'bottom' property applies to elements with a display of 'table-footer-group'." />
+        <style type="text/css">
+			body {margin: 8px;}
+
+            #test
+            {
+                background: green;
+                bottom: 0;
+                display: table-footer-group;
+                position: absolute;
+            }
+            #table
+            {
+                display: table;
+                table-layout: fixed;
+            }
+            #row
+            {
+                display: table-row;
+            }
+            #cell
+            {
+                display: table-cell;
+                height: 100px;
+                width: 100px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a filled green square at the bottom of the page.</p>
+        <div id="table">
+            <div id="test">
+                <div id="row">
+                    <div id="cell"></div>
+                </div>
+            </div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-applies-to-004.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-applies-to-004.xht
new file mode 100644
index 0000000..d4fded6b
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-applies-to-004.xht
@@ -0,0 +1,45 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Bottom applied to element with 'display' set to 'table-row'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-15 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-bottom" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="bottom-applies-to-001-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'bottom' property applies to elements with a display of 'table-row'." />
+        <style type="text/css">
+			body {margin: 8px;}
+
+            #test
+            {
+                background: green;
+                bottom: 0;
+                display: table-row;
+                position: absolute;
+            }
+            #table
+            {
+                display: table;
+                table-layout: fixed;
+            }
+            #cell
+            {
+                display: table-cell;
+                height: 100px;
+                width: 100px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a filled green square at the bottom of the page.</p>
+        <div id="table">
+            <div id="test">
+                <div id="cell"></div>
+            </div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-applies-to-005.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-applies-to-005.xht
new file mode 100644
index 0000000..c645a50d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-applies-to-005.xht
@@ -0,0 +1,50 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Bottom applied to element with 'display' set to 'table-column-group'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-15 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-bottom" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="bottom-applies-to-001-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'bottom' property applies to elements with a display of 'table-column-group'." />
+        <style type="text/css">
+			body {margin: 8px;}
+
+            #test
+            {
+                background: green;
+                bottom: 0;
+                display: table-column-group;
+                height: 100px;
+                position: absolute;
+                width: 100px;
+            }
+            #table
+            {
+                display: table;
+                table-layout: fixed;
+            }
+            #row
+            {
+                display: table-row;
+            }
+            #cell
+            {
+                display: table-cell;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a filled green square at the bottom of the page.</p>
+        <div id="table">
+            <div id="test"></div>
+            <div id="row">
+                <div id="cell"></div>
+            </div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-applies-to-006.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-applies-to-006.xht
new file mode 100644
index 0000000..7661fd20
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-applies-to-006.xht
@@ -0,0 +1,50 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Bottom applied to element with 'display' set to 'table-column'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-15 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-bottom" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="bottom-applies-to-001-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'bottom' property applies to elements with a display of 'table-column'." />
+        <style type="text/css">
+			body {margin: 8px;}
+
+            #test
+            {
+                background: green;
+                bottom: 0;
+                display: table-column;
+                height: 100px;
+                position: absolute;
+                width: 100px;
+            }
+            #table
+            {
+                display: table;
+                table-layout: fixed;
+            }
+            #row
+            {
+                display: table-row;
+            }
+            #cell
+            {
+                display: table-cell;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a filled green square at the bottom of the page.</p>
+        <div id="table">
+            <div id="test"></div>
+            <div id="row">
+                <div id="cell"></div>
+            </div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-applies-to-007.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-applies-to-007.xht
new file mode 100644
index 0000000..ce1390c3
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-applies-to-007.xht
@@ -0,0 +1,45 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Bottom applied to element with 'display' set to 'table-cell'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-15 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-bottom" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="bottom-applies-to-001-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'bottom' property applies to elements with a display of 'table-cell'." />
+        <style type="text/css">
+			body {margin: 8px;}
+
+            #table
+            {
+                display: table;
+                table-layout: fixed;
+            }
+            #row
+            {
+                display: table-row;
+            }
+            #cell
+            {
+                background: green;
+                bottom: 0;
+                display: table-cell;
+                height: 100px;
+                position: absolute;
+                width: 100px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a filled green square at the bottom of the page.</p>
+        <div id="table">
+            <div id="row">
+                <div id="cell"></div>
+            </div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-applies-to-008.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-applies-to-008.xht
new file mode 100644
index 0000000..7e47b4a2
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-applies-to-008.xht
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Bottom applied to element with 'display' set to inline</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-15 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-bottom" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'bottom' property applies to elements with a display of inline." />
+        <style type="text/css">
+            div
+            {
+                background: green;
+                bottom: 0;
+                display: inline;
+                position: absolute;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a green stripe at the bottom of the page.</p>
+        <div>Filler Text</div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-applies-to-009.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-applies-to-009.xht
new file mode 100644
index 0000000..405134a
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-applies-to-009.xht
@@ -0,0 +1,34 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Bottom applied to element with 'display' set to block</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-15 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-bottom" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="bottom-applies-to-001-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'bottom' property applies to elements with a display of block." />
+        <style type="text/css">
+			body {margin: 8px;}
+
+            span
+            {
+                background: green;
+                bottom: 0;
+                display: block;
+                height: 100px;
+                position: absolute;
+                width: 100px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a filled green square at the bottom of the page.</p>
+        <div>
+            <span></span>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-applies-to-010.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-applies-to-010.xht
new file mode 100644
index 0000000..0b46ab9
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-applies-to-010.xht
@@ -0,0 +1,32 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Bottom applied to element with 'display' set to list-item</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-15 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-bottom" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'bottom' property applies to elements with a display of list-item." />
+        <style type="text/css">
+            body
+            {
+                margin-left: 1em;
+            }
+            div
+            {
+                background: green;
+                bottom: 0;
+                display: list-item;
+                height: 1in;
+                position: absolute;
+                width: 1in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a filled green square at the bottom of the page and a marker bullet on its left-hand side.</p>
+        <div></div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-applies-to-012.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-applies-to-012.xht
new file mode 100644
index 0000000..e672294
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-applies-to-012.xht
@@ -0,0 +1,42 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Bottom applied to element with 'display' set to inline-block</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-15 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-bottom" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="bottom-applies-to-001-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'bottom' property applies to elements with a display of inline-block." />
+        <style type="text/css">
+			body {margin: 8px;}
+
+            span#inline-block
+            {
+                background: green;
+                bottom: 0;
+                display: inline-block;
+                position: absolute;
+            }
+
+			span.block-descendant
+			{
+				display: block;
+                height: 50px;
+                width: 100px;
+			}
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a filled green square at the bottom of the page.</p>
+        <div>
+	        <span id="inline-block">
+				<span class="block-descendant"></span>
+				<span class="block-descendant"></span>
+        	</span>
+        </div>
+    </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-applies-to-013.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-applies-to-013.xht
new file mode 100644
index 0000000..204caef
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-applies-to-013.xht
@@ -0,0 +1,45 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Bottom applied to element with 'display' set to 'table'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-15 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-bottom" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="bottom-applies-to-001-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'bottom' property applies to elements with a display of 'table'." />
+        <style type="text/css">
+			body {margin: 8px;}
+
+            #table
+            {
+                background: green;
+                bottom: 0;
+                display: table;
+                table-layout: fixed;
+                height: 100px;
+                position: absolute;
+                width: 100px;
+            }
+            #row
+            {
+                display: table-row;
+            }
+            #cell
+            {
+                display: table-cell;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a filled green square at the bottom of the page.</p>
+        <div id="table">
+            <div id="row">
+                <div id="cell"></div>
+            </div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-applies-to-014.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-applies-to-014.xht
new file mode 100644
index 0000000..93be1ae8
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-applies-to-014.xht
@@ -0,0 +1,45 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Bottom applied to element with 'display' set to 'inline-table'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-15 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-bottom" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="bottom-applies-to-001-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'bottom' property applies to elements with a display of 'inline-table'." />
+        <style type="text/css">
+			body {margin: 8px;}
+
+            #table
+            {
+                background: green;
+                bottom: 0;
+                display: inline-table;
+                table-layout: fixed;
+                height: 100px;
+                position: absolute;
+                width: 100px;
+            }
+            #row
+            {
+                display: table-row;
+            }
+            #cell
+            {
+                display: table-cell;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a filled green square at the bottom of the page.</p>
+        <div id="table">
+            <div id="row">
+                <div id="cell"></div>
+            </div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-applies-to-015.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-applies-to-015.xht
new file mode 100644
index 0000000..2760ba8
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-applies-to-015.xht
@@ -0,0 +1,49 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Bottom applied to element with 'display' set to 'table-caption'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-15 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-bottom" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="bottom-applies-to-001-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'bottom' property applies to elements with a display of 'table-caption'." />
+        <style type="text/css">
+			body {margin: 8px;}
+
+            #caption
+            {
+                background: green;
+                bottom: 0;
+                display: table-caption;
+                height: 100px;
+                position: absolute;
+                width: 100px;
+            }
+            #table
+            {
+                display: table;
+            }
+            #row
+            {
+                display: table-row;
+            }
+            #cell
+            {
+                display: table-cell;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a filled green square at the bottom of the page.</p>
+        <div id="table">
+            <div id="caption"></div>
+            <div id="row">
+                <div id="cell"></div>
+            </div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-offset-001-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-offset-001-ref.xht
new file mode 100644
index 0000000..587b844
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-offset-001-ref.xht
@@ -0,0 +1,29 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div#inline-block {display: inline-block;}
+
+  img {vertical-align: top;}
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if there is a blue square with its bottom-left corner missing.</p>
+
+  <div id="inline-block">
+  		<div><img src="support/blue15x15.png" width="48" height="48" alt="Image download support must be enabled" /><img src="support/blue15x15.png" width="48" height="48" alt="Image download support must be enabled" /></div>
+  		<div><img src="support/1x1-white.png" width="48" height="48" alt="Image download support must be enabled" /><img src="support/blue15x15.png" width="48" height="48" alt="Image download support must be enabled" /></div>
+  </div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-offset-001.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-offset-001.xht
new file mode 100644
index 0000000..5198da2
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-offset-001.xht
@@ -0,0 +1,41 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: 'bottom' offset - offset from the bottom edge of the containing block (abs. pos.)</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-17 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-bottom" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="bottom-offset-001-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'bottom' property, for absolute positioning, specifies the offset of the element in relation to the containing block's bottom edge. The containing block of an absolutely positioned element is formed by the padding box of its nearest (closest) positioned non-inline ancestor element." />
+        <style type="text/css">
+            div
+            {
+                height: 1in;
+                position: relative;
+                width: 1in;
+            }
+            #div1
+            {
+                background: blue;
+            }
+            #div2
+            {
+                background: white;
+                height: 0.5in;
+                position: absolute;
+                bottom: 0;
+                width: 0.5in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a blue square with its bottom-left corner missing.</p>
+        <div>
+            <div id="div1"></div>
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-offset-002.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-offset-002.xht
new file mode 100644
index 0000000..523492f9
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-offset-002.xht
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: 'bottom' offset - absolute length value and relative positioning</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-17 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-bottom" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="bottom-offset-001-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'bottom' property, when using an absolute length value (not percentage) for relative positioning, specifies the offset of the box itself." />
+        <style type="text/css">
+            #div1
+            {
+                background: blue;
+                height: 1in;
+                position: relative;
+                width: 1in;
+            }
+            div div
+            {
+                background: white;
+                height: 0.5in;
+                position: relative;
+                bottom: -0.5in;
+                width: 0.5in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a blue square with its bottom-left corner missing.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-offset-003.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-offset-003.xht
new file mode 100644
index 0000000..a4a6573
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-offset-003.xht
@@ -0,0 +1,42 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: 'bottom' offset - offset from the bottom edge of the containing block (abs. pos.)</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-17 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-bottom" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="bottom-offset-001-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'bottom' property, for absolute positioning, specifies the offset of the element in relation to the containing block's bottom edge. The containing block of an absolutely positioned element is formed by the padding box of its nearest (closest) positioned non-inline ancestor element." />
+        <style type="text/css">
+            #div1
+            {
+                padding-bottom: 0.5in;
+                position: relative;
+            }
+            #div2
+            {
+                background: white;
+                height: 0.5in;
+                position: absolute;
+                bottom: 0.5in;
+                width: 0.5in;
+            }
+            #div3
+            {
+                background: blue;
+                height: 1in;
+                width: 1in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a blue square with its bottom-left corner missing.</p>
+        <div id="div1">
+            <div id="div2"></div>
+            <div id="div3"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-offset-percentage-001-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-offset-percentage-001-ref.xht
new file mode 100644
index 0000000..20818a2
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-offset-percentage-001-ref.xht
@@ -0,0 +1,30 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div
+  {
+  border: black solid medium;
+  height: 150px;
+  padding-top: 50px;
+  width: 100px;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if there is a filled green box that is not in any of the corners of an hollow black rectangle and if there is <strong>no red</strong>.</p>
+
+  <div><img src="support/1x1-green.png" width="50" height="50" alt="Image download support must be enabled" /></div>
+
+ </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-offset-percentage-001.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-offset-percentage-001.xht
new file mode 100644
index 0000000..813f24fe
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/bottom-offset-percentage-001.xht
@@ -0,0 +1,46 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Bottom offset using percentage</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-15 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-bottom" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="bottom-offset-percentage-001-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="Percentage offset values for the 'bottom' property are based off the height of the containing block." />
+        <style type="text/css">
+            #div1
+            {
+                border: solid black;
+                height: 200px;
+                position: relative;
+                width: 100px;
+            }
+            div div
+            {
+                height: 50px;
+                position: absolute;
+                width: 50px;
+            }
+            #test
+            {
+                background: green;
+                bottom: 50%;
+            }
+            #reference
+            {
+                background: red;
+                top: 50px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a filled green box that is not in any of the corners of an hollow black rectangle and if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div id="reference"></div>
+            <div id="test"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/dynamic-top-change-001-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/dynamic-top-change-001-ref.xht
new file mode 100644
index 0000000..7739e1b
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/dynamic-top-change-001-ref.xht
@@ -0,0 +1,51 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  p
+  {
+  line-height: 1.25;
+  margin: 1em 0;
+  }
+
+  strong {line-height: 1;}
+
+  div
+  {
+  background-color: green;
+  height: 100px;
+  margin-top: 112px;
+  /*
+  The red square appears 96px below the p margin box:
+    2em : grandparent's top (dynamically set)
+  +
+    2em : parent's top (inherited)
+  +
+    2em : #red's top (inherited)
+  =======
+    96px
+  max(margin-bottom of p, margin-top of div)
+  max(16px, margin-top of div) == 16px + 96px;
+  therefore, margin-top of div == 16px + 96px
+  */
+  width: 100px;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if there is <strong>no red</strong>.</p>
+
+  <div></div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/dynamic-top-change-001.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/dynamic-top-change-001.xht
new file mode 100644
index 0000000..ec34cfc
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/dynamic-top-change-001.xht
@@ -0,0 +1,45 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+  <title>CSS Test: Inheriting 'top' changes from relpos grandparent</title>
+  <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu"/>
+  <link rel="reviewer" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/>
+  <link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#value-def-inherit"/>
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props"/>
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-position"/>
+  <link rel="match" href="dynamic-top-change-001-ref.xht" />
+
+  <meta name="flags" content="dom" />
+  <meta name="assert" content="The position of a positioned element which inherits its 'top' value from its relatively positioned grandparent changes when the grandparent's 'top' value is changed."/>
+  <style type="text/css"><![CDATA[
+  p
+  {
+  line-height: 1.25;
+  margin: 1em 0;
+  }
+
+  strong {line-height: 1;}
+
+    .testDiv { position: absolute; width: 100px; height: 100px; }
+    #green { top: 4em; background: green; }
+    #red { top: inherit; background: red; }
+    #parent { top: inherit; position: relative; }
+    #grandparent { position: relative; }
+  ]]></style>
+  <script type="text/javascript"><![CDATA[
+    window.onload = function() {
+      document.body.offsetWidth;
+      document.getElementById("grandparent").style.top = "2em";
+    }
+  ]]></script>
+ </head>
+ <body>
+   <p>Test passes if there is <strong>no red</strong>.</p>
+   <div id="grandparent">
+     <div id="parent">
+       <div id="red" class="testDiv"></div>
+     </div>
+     <div id="green" class="testDiv"></div>
+   </div>
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/dynamic-top-change-002-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/dynamic-top-change-002-ref.xht
new file mode 100644
index 0000000..78eabeb
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/dynamic-top-change-002-ref.xht
@@ -0,0 +1,45 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  p
+  {
+  line-height: 1.25;
+  margin: 1em 0;
+  }
+
+  strong {line-height: 1;}
+
+  div
+  {
+  background-color: green;
+  height: 100px;
+  margin-top: 28px;
+  /*
+  The green square appears 12px below the p margin box:
+  2em + 2em - (16px + 20px + 16px) + 16px
+  max(margin-bottom of p, margin-top of div)
+  max(16px, margin-top of div) == 16px + 12px;
+  therefore, margin-top of div == 16px + 12px
+  */
+  width: 100px;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if there is <strong>no red</strong>.</p>
+
+  <div></div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/dynamic-top-change-002.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/dynamic-top-change-002.xht
new file mode 100644
index 0000000..3f22797c
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/dynamic-top-change-002.xht
@@ -0,0 +1,45 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+  <title>CSS Test: Inheriting 'top' changes from parent table-row through anonymous table boxes</title>
+  <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu"/>
+  <link rel="reviewer" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/>
+  <link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#value-def-inherit"/>
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props"/>
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-position"/>
+  <link rel="match" href="dynamic-top-change-002-ref.xht" />
+
+  <meta name="flags" content="dom" />
+  <meta name="assert" content="The position of a positioned element which inherits its 'top' value from its parent changes when the parent's 'top' value is changed even if the parent is display:table-row."/>
+  <style type="text/css"><![CDATA[
+    p
+    {
+    line-height: 1.25;
+    margin: 1em 0;
+    }
+
+    strong {line-height: 1;}
+
+    .testDiv { width: 100px; height: 100px; }
+    #green { top: 4em; background: green; position: absolute; }
+    #red { top: inherit; background: red; position: relative; }
+    #parent { position: absolute; top: 2em; }
+    #intermediate { display: table-row; }
+  ]]></style>
+  <script type="text/javascript"><![CDATA[
+    window.onload = function() {
+      document.body.offsetWidth;
+      document.getElementById("intermediate").style.top = "2em";
+    }
+  ]]></script>
+ </head>
+ <body>
+   <p>Test passes if there is <strong>no red</strong>.</p>
+   <div id="parent">
+     <div id="intermediate">
+       <div id="red" class="testDiv"></div>
+     </div>
+   </div>
+   <div id="green" class="testDiv"></div>
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/dynamic-top-change-003.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/dynamic-top-change-003.xht
new file mode 100644
index 0000000..b449834
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/dynamic-top-change-003.xht
@@ -0,0 +1,45 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+  <title>CSS Test: Inheriting 'top' changes from parent table through anonymous table boxes</title>
+  <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu"/>
+  <link rel="reviewer" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/>
+  <link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#value-def-inherit"/>
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props"/>
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-position"/>
+  <link rel="match" href="dynamic-top-change-002-ref.xht" />
+
+  <meta name="flags" content="dom" />
+  <meta name="assert" content="The position of a positioned element which inherits its 'top' value from its parent changes when the parent's 'top' value is changed even if the parent is display:table."/>
+  <style type="text/css"><![CDATA[
+    p
+    {
+    line-height: 1.25;
+    margin: 1em 0;
+    }
+
+    strong {line-height: 1;}
+
+    .testDiv { width: 100px; height: 100px; }
+    #green { top: 4em; background: green; position: absolute; }
+    #red { top: inherit; background: red; position: relative; }
+    #parent { position: absolute; top: 2em; }
+    #intermediate { display: table; }
+  ]]></style>
+  <script type="text/javascript"><![CDATA[
+    window.onload = function() {
+      document.body.offsetWidth;
+      document.getElementById("intermediate").style.top = "2em";
+    }
+  ]]></script>
+ </head>
+ <body>
+   <p>Test passes if there is <strong>no red</strong>.</p>
+   <div id="parent">
+     <div id="intermediate">
+       <div id="red" class="testDiv"></div>
+     </div>
+   </div>
+   <div id="green" class="testDiv"></div>
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/dynamic-top-change-004.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/dynamic-top-change-004.xht
new file mode 100644
index 0000000..8536099e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/dynamic-top-change-004.xht
@@ -0,0 +1,42 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+  <title>CSS Test: Inheriting 'top' changes from abspos parent</title>
+  <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu"/>
+  <link rel="reviewer" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/>
+  <link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#value-def-inherit"/>
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props"/>
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-position"/>
+  <link rel="match" href="dynamic-top-change-002-ref.xht" />
+
+  <meta name="flags" content="dom" />
+  <meta name="assert" content="The position of a positioned element which inherits its 'top' value from its parent changes when the parent's 'top' value is changed."/>
+  <style type="text/css"><![CDATA[
+    p
+    {
+    line-height: 1.25;
+    margin: 1em 0;
+    }
+
+    strong {line-height: 1;}
+
+    .testDiv { width: 100px; height: 100px; }
+    #green { top: 4em; background: green; position: absolute; }
+    #red { top: inherit; background: red; position: relative; }
+    #parent { position: absolute; }
+  ]]></style>
+  <script type="text/javascript"><![CDATA[
+    window.onload = function() {
+      document.body.offsetWidth;
+      document.getElementById("parent").style.top = "2em";
+    }
+  ]]></script>
+ </head>
+ <body>
+   <p>Test passes if there is <strong>no red</strong>.</p>
+   <div id="parent">
+     <div id="red" class="testDiv"></div>
+   </div>
+   <div id="green" class="testDiv"></div>
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/dynamic-top-change-005.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/dynamic-top-change-005.xht
new file mode 100644
index 0000000..c9930e9a
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/dynamic-top-change-005.xht
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+  <title>CSS Test: Inheriting 'top' changes from abspos grandparent</title>
+  <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu"/>
+  <link rel="reviewer" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/>
+  <link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#value-def-inherit"/>
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props"/>
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-position"/>
+  <meta name="flags" content="combo dom" />
+  <meta name="assert" content="The position of a positioned element which inherits its 'top' value from its relatively positioned parent changes when the parent's 'top' value is changed."/>
+  <style type="text/css"><![CDATA[
+    .testDiv { position: relative; width: 100px; height: 100px; }
+    #green { top: 100px; background: green; }
+    #red { top: inherit; background: red; display: block; }
+    #parent { position: relative; }
+    body > p { position: absolute; font-size: medium; }
+    #grandparent { position: absolute; top: 0; }
+    body { font-size: 0; line-height: 0; position: relative; }
+  ]]></style>
+  <script type="text/javascript"><![CDATA[
+    window.onload = function() {
+      document.body.offsetWidth;
+      document.getElementById("parent").style.top = "50px";
+    }
+  ]]></script>
+ </head>
+ <body>
+   <p>Test passes if there is no red.</p>
+   <div id="grandparent">
+     <span id="parent">
+       <span id="red" class="testDiv"></span>
+     </span>
+   </div>
+   <div id="green" class="testDiv"></div>
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/dynamic-top-change-005a.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/dynamic-top-change-005a.xht
new file mode 100644
index 0000000..4517d4d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/dynamic-top-change-005a.xht
@@ -0,0 +1,38 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+  <title>CSS Test: Inheriting 'top' changes from abspos grandparent (variant: block parent)</title>
+  <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu"/>
+  <link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+  <link rel="reviewer" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/>
+  <link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#value-def-inherit"/>
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props"/>
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-position"/>
+  <meta name="flags" content="dom" />
+  <meta name="assert" content="The position of a positioned element which inherits its 'top' value from its relatively positioned parent changes when the parent's 'top' value is changed."/>
+  <style type="text/css"><![CDATA[
+    .testDiv { position: relative; width: 100px; height: 100px; }
+    #green { top: 100px; background: green; }
+    #red { top: inherit; background: red; display: block; }
+    #parent { position: relative; }
+    body > p { position: absolute; font-size: medium; }
+    #grandparent { position: absolute; top: 0; }
+    body { font-size: 0; line-height: 0; position: relative; }
+  ]]></style>
+  <script type="text/javascript"><![CDATA[
+    window.onload = function() {
+      document.body.offsetWidth;
+      document.getElementById("parent").style.top = "50px";
+    }
+  ]]></script>
+ </head>
+ <body>
+   <p>Test passes if there is no red.</p>
+   <div id="grandparent">
+     <div id="parent">
+       <span id="red" class="testDiv"></span>
+     </div>
+   </div>
+   <div id="green" class="testDiv"></div>
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/dynamic-top-change-005b.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/dynamic-top-change-005b.xht
new file mode 100644
index 0000000..8595cf9
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/dynamic-top-change-005b.xht
@@ -0,0 +1,32 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+  <title>CSS Test: Inheriting 'top' changes from abspos grandparent (non-dynamic variant)</title>
+  <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu"/>
+  <link rel="author" title="L. David Baron" href="https://dbaron.org/" />
+  <link rel="reviewer" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/>
+  <link rel="help" href="http://www.w3.org/TR/CSS21/cascade.html#value-def-inherit"/>
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props"/>
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-position"/>
+  <meta name="flags" content="dom" />
+  <meta name="assert" content="The position of a positioned element which inherits its 'top' value from its relatively positioned parent changes when the parent's 'top' value is changed."/>
+  <style type="text/css"><![CDATA[
+    .testDiv { position: relative; width: 100px; height: 100px; }
+    #green { top: 100px; background: green; }
+    #red { top: inherit; background: red; display: block; }
+    #parent { position: relative; top: 50px; }
+    body > p { position: absolute; font-size: medium; }
+    #grandparent { position: absolute; top: 0; }
+    body { font-size: 0; line-height: 0; position: relative; }
+  ]]></style>
+ </head>
+ <body>
+   <p>Test passes if there is no red.</p>
+   <div id="grandparent">
+     <span id="parent">
+       <span id="red" class="testDiv"></span>
+     </span>
+   </div>
+   <div id="green" class="testDiv"></div>
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-004-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-004-ref.xht
new file mode 100644
index 0000000..2371860
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-004-ref.xht
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+ </head>
+
+ <body>
+
+  <p>Test passes if there is <strong>no space between</strong> the orange and blue lines.</p>
+
+  <div><img src="support/swatch-orange.png" width="5" height="96" alt="Image download support must be enabled" /><img src="support/blue15x15.png" width="5" height="96" alt="Image download support must be enabled" /></div>
+
+ </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-004.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-004.xht
new file mode 100644
index 0000000..866d710
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-004.xht
@@ -0,0 +1,36 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Left using pixels with a value of negative zero, -0px</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-17 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-left" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="left-004-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'left' property sets a negative zero length value in pixels." />
+        <style type="text/css">
+            div
+            {
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-left: 5px solid orange;
+            }
+            div div
+            {
+                border-left: 5px solid blue;
+                left: -0px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the orange and blue lines.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-005.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-005.xht
new file mode 100644
index 0000000..8cdc7955
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-005.xht
@@ -0,0 +1,36 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Left using pixels with a value of zero, 0px</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-17 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-left" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="left-004-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'left' property sets a zero length value in pixels." />
+        <style type="text/css">
+            div
+            {
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-left: 5px solid orange;
+            }
+            div div
+            {
+                border-left: 5px solid blue;
+                left: 0px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the orange and blue lines.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-006.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-006.xht
new file mode 100644
index 0000000..392f12f3
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-006.xht
@@ -0,0 +1,36 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Left using pixels with a value of positive zero, +0px</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-17 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-left" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="left-004-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'left' property sets a positive zero length value in pixels." />
+        <style type="text/css">
+            div
+            {
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-left: 5px solid orange;
+            }
+            div div
+            {
+                border-left: 5px solid blue;
+                left: +0px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the orange and blue lines.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-007-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-007-ref.xht
new file mode 100644
index 0000000..bb896a1
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-007-ref.xht
@@ -0,0 +1,29 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div
+  {
+  background-color: black;
+  height: 96px;
+  width: 3px;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if there is <strong>no red</strong>.</p>
+
+  <div></div>
+
+ </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-007.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-007.xht
new file mode 100644
index 0000000..05249e52
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-007.xht
@@ -0,0 +1,38 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Left using pixels with a nominal value, 96px</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-18 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-left" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="left-007-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'left' property sets a nominal length value in pixels." />
+        <style type="text/css">
+            div
+            {
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-left: 3px solid red;
+                width: 3in;
+            }
+            div div
+            {
+                border-left: 3px solid black;
+                margin-left: -99px;
+                left: 96px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-008.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-008.xht
new file mode 100644
index 0000000..a7154a5
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-008.xht
@@ -0,0 +1,38 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Left using pixels with a positive nominal value, +96px</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-18 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-left" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="left-007-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'left' property sets a positive nominal length value in pixels." />
+        <style type="text/css">
+            div
+            {
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-left: 3px solid red;
+                width: 3in;
+            }
+            div div
+            {
+                border-left: 3px solid black;
+                margin-left: -99px;
+                left: +96px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-016.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-016.xht
new file mode 100644
index 0000000..51a4f927
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-016.xht
@@ -0,0 +1,36 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Left using points with a value of negative zero, -0pt</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-17 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-left" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="left-004-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'left' property sets a negative zero length value in points." />
+        <style type="text/css">
+            div
+            {
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-left: 5px solid orange;
+            }
+            div div
+            {
+                border-left: 5px solid blue;
+                left: -0pt;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the orange and blue lines.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-017.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-017.xht
new file mode 100644
index 0000000..7b2ef151
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-017.xht
@@ -0,0 +1,36 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Left using points with a value of zero, 0pt</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-17 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-left" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="left-004-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'left' property sets a zero length value in points." />
+        <style type="text/css">
+            div
+            {
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-left: 5px solid orange;
+            }
+            div div
+            {
+                border-left: 5px solid blue;
+                left: 0pt;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the orange and blue lines.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-018.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-018.xht
new file mode 100644
index 0000000..1150b1f2
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-018.xht
@@ -0,0 +1,36 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Left using points with a value of positive zero, +0pt</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-17 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-left" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="left-004-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'left' property sets a positive zero length value in points." />
+        <style type="text/css">
+            div
+            {
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-left: 5px solid orange;
+            }
+            div div
+            {
+                border-left: 5px solid blue;
+                left: +0pt;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the orange and blue lines.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-019.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-019.xht
new file mode 100644
index 0000000..e0e5163
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-019.xht
@@ -0,0 +1,38 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Left using points with a nominal value, 72pt</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-18 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-left" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="../reference/ref-black-96px-square-no-red.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'left' property sets a nominal length value in points." />
+        <style type="text/css">
+            div
+            {
+                height: 1in;
+                position: relative;
+                width: 1in;
+            }
+            #div1
+            {
+                border-left: 72pt solid red;
+            }
+            div div
+            {
+                border-left: 72pt solid black;
+                margin-left: -144pt;
+                left: 72pt;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-020.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-020.xht
new file mode 100644
index 0000000..3c363911
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-020.xht
@@ -0,0 +1,38 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Left using points with a positive nominal value, +72pt</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-18 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-left" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="../reference/ref-black-96px-square-no-red.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'left' property sets a positive nominal length value in points." />
+        <style type="text/css">
+            div
+            {
+                height: 1in;
+                position: relative;
+                width: 1in;
+            }
+            #div1
+            {
+                border-left: 72pt solid red;
+            }
+            div div
+            {
+                border-left: 72pt solid black;
+                margin-left: -144pt;
+                left: +72pt;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-028.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-028.xht
new file mode 100644
index 0000000..bfb15ce
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-028.xht
@@ -0,0 +1,36 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Left using picas with a value of negative zero, -0pc</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-17 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-left" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="left-004-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'left' property sets a negative zero length value in picas." />
+        <style type="text/css">
+            div
+            {
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-left: 5px solid orange;
+            }
+            div div
+            {
+                border-left: 5px solid blue;
+                left: -0pc;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the orange and blue lines.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-029.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-029.xht
new file mode 100644
index 0000000..89b1da3
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-029.xht
@@ -0,0 +1,36 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Left using picas with a value of zero, 0pc</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-17 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-left" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="left-004-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'left' property sets a zero length value in picas." />
+        <style type="text/css">
+            div
+            {
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-left: 5px solid orange;
+            }
+            div div
+            {
+                border-left: 5px solid blue;
+                left: 0pc;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the orange and blue lines.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-030.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-030.xht
new file mode 100644
index 0000000..76b05a5
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-030.xht
@@ -0,0 +1,36 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Left using picas with a value of positive zero, +0pc</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-17 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-left" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="left-004-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'left' property sets a positive zero length value in picas." />
+        <style type="text/css">
+            div
+            {
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-left: 5px solid orange;
+            }
+            div div
+            {
+                border-left: 5px solid blue;
+                left: +0pc;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the orange and blue lines.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-031-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-031-ref.xht
new file mode 100644
index 0000000..1bd9a04
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-031-ref.xht
@@ -0,0 +1,29 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div
+  {
+  background-color: black;
+  height: 96px;
+  width: 16px;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if there is <strong>no red</strong>.</p>
+
+  <div></div>
+
+ </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-031.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-031.xht
new file mode 100644
index 0000000..32721fb
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-031.xht
@@ -0,0 +1,38 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Left using picas with a nominal value, 6pc</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-18 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-left" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="left-031-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'left' property sets a nominal length value in picas." />
+        <style type="text/css">
+            div
+            {
+                height: 1in;
+                position: relative;
+                width: 1in;
+            }
+            #div1
+            {
+                border-left: 1pc solid red;
+            }
+            div div
+            {
+                border-left: 1pc solid black;
+                margin-left: -7pc;
+                left: 6pc;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-032.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-032.xht
new file mode 100644
index 0000000..d366c62
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-032.xht
@@ -0,0 +1,38 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Left using picas with a positive nominal value, +6pc</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-18 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-left" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="left-031-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'left' property sets a positive nominal length value in picas." />
+        <style type="text/css">
+            div
+            {
+                height: 1in;
+                position: relative;
+                width: 1in;
+            }
+            #div1
+            {
+                border-left: 1pc solid red;
+            }
+            div div
+            {
+                border-left: 1pc solid black;
+                margin-left: -7pc;
+                left: +6pc;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-040.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-040.xht
new file mode 100644
index 0000000..16e986c1
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-040.xht
@@ -0,0 +1,36 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Left using centimeters with a value of negative zero, -0cm</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-17 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-left" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="left-004-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'left' property sets a negative zero length value in centimeters." />
+        <style type="text/css">
+            div
+            {
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-left: 5px solid orange;
+            }
+            div div
+            {
+                border-left: 5px solid blue;
+                left: -0cm;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the orange and blue lines.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-041.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-041.xht
new file mode 100644
index 0000000..0bed4bd
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-041.xht
@@ -0,0 +1,36 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Left using centimeters with a value of zero, 0cm</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-17 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-left" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="left-004-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'left' property sets a zero length value in centimeters." />
+        <style type="text/css">
+            div
+            {
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-left: 5px solid orange;
+            }
+            div div
+            {
+                border-left: 5px solid blue;
+                left: 0cm;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the orange and blue lines.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-042.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-042.xht
new file mode 100644
index 0000000..1b728324
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-042.xht
@@ -0,0 +1,36 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Left using centimeters with a value of positive zero, +0cm</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-17 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-left" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="left-004-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'left' property sets a positive zero length value in centimeters." />
+        <style type="text/css">
+            div
+            {
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-left: 5px solid orange;
+            }
+            div div
+            {
+                border-left: 5px solid blue;
+                left: +0cm;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the orange and blue lines.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-043.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-043.xht
new file mode 100644
index 0000000..0f4f46d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-043.xht
@@ -0,0 +1,38 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Left using centimeters with a nominal value, 2.54cm</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-18 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-left" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="../reference/ref-black-96px-square-no-red.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'left' property sets a nominal length value in centimeters." />
+        <style type="text/css">
+            div
+            {
+                height: 1in;
+                position: relative;
+                width: 1in;
+            }
+            #div1
+            {
+                border-left: 2.54cm solid red;
+            }
+            div div
+            {
+                border-left: 2.54cm solid black;
+                margin-left: -5.08cm;
+                left: 2.54cm;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-044.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-044.xht
new file mode 100644
index 0000000..b5f644fe
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-044.xht
@@ -0,0 +1,38 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Left using centimeters with a positive nominal value, +2.54cm</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-18 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-left" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="../reference/ref-black-96px-square-no-red.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'left' property sets a positive nominal length value in centimeters." />
+        <style type="text/css">
+            div
+            {
+                height: 1in;
+                position: relative;
+                width: 1in;
+            }
+            #div1
+            {
+                border-left: 2.54cm solid red;
+            }
+            div div
+            {
+                border-left: 2.54cm solid black;
+                margin-left: -5.08cm;
+                left: +2.54cm;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-052.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-052.xht
new file mode 100644
index 0000000..25c160d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-052.xht
@@ -0,0 +1,36 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Left using millimeters with a value of negative zero, -0mm</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-17 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-left" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="left-004-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'left' property sets a negative zero length value in millimeters." />
+        <style type="text/css">
+            div
+            {
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-left: 5px solid orange;
+            }
+            div div
+            {
+                border-left: 5px solid blue;
+                left: -0mm;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the orange and blue lines.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-053.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-053.xht
new file mode 100644
index 0000000..16a1580
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-053.xht
@@ -0,0 +1,36 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Left using millimeters with a value of zero, 0mm</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-17 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-left" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="left-004-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'left' property sets a zero length value in millimeters." />
+        <style type="text/css">
+            div
+            {
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-left: 5px solid orange;
+            }
+            div div
+            {
+                border-left: 5px solid blue;
+                left: 0mm;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the orange and blue lines.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-054.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-054.xht
new file mode 100644
index 0000000..2e764e1
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-054.xht
@@ -0,0 +1,36 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Left using millimeters with a value of positive zero, +0mm</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-17 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-left" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="left-004-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'left' property sets a positive zero length value in millimeters." />
+        <style type="text/css">
+            div
+            {
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-left: 5px solid orange;
+            }
+            div div
+            {
+                border-left: 5px solid blue;
+                left: +0mm;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the orange and blue lines.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-055.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-055.xht
new file mode 100644
index 0000000..6be0d51
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-055.xht
@@ -0,0 +1,38 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Left using millimeters with a nominal value, 25.4mm</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-18 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-left" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="../reference/ref-black-96px-square-no-red.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'left' property sets a nominal length value in millimeters." />
+        <style type="text/css">
+            div
+            {
+                height: 1in;
+                position: relative;
+                width: 1in;
+            }
+            #div1
+            {
+                border-left: 25.4mm solid red;
+            }
+            div div
+            {
+                border-left: 25.4mm solid black;
+                margin-left: -50.8mm;
+                left: 25.4mm;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-056.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-056.xht
new file mode 100644
index 0000000..af4ecda
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-056.xht
@@ -0,0 +1,38 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Left using millimeters with a positive nominal value, +25.4mm</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-18 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-left" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="../reference/ref-black-96px-square-no-red.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'left' property sets a positive nominal length value in millimeters." />
+        <style type="text/css">
+            div
+            {
+                height: 1in;
+                position: relative;
+                width: 1in;
+            }
+            #div1
+            {
+                border-left: 25.4mm solid red;
+            }
+            div div
+            {
+                border-left: 25.4mm solid black;
+                margin-left: -50.8mm;
+                left: +25.4mm;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-064.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-064.xht
new file mode 100644
index 0000000..31e0b43
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-064.xht
@@ -0,0 +1,36 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Left using inches with a value of negative zero, -0in</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-17 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-left" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="left-004-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'left' property sets a negative zero length value in inches." />
+        <style type="text/css">
+            div
+            {
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-left: 5px solid orange;
+            }
+            div div
+            {
+                border-left: 5px solid blue;
+                left: -0in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the orange and blue lines.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-065.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-065.xht
new file mode 100644
index 0000000..cf157884
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-065.xht
@@ -0,0 +1,36 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Left using inches with a value of zero, 0in</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-17 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-left" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="left-004-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'left' property sets a zero length value in inches." />
+        <style type="text/css">
+            div
+            {
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-left: 5px solid orange;
+            }
+            div div
+            {
+                border-left: 5px solid blue;
+                left: 0in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the orange and blue lines.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-066.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-066.xht
new file mode 100644
index 0000000..b026c82
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-066.xht
@@ -0,0 +1,36 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Left using inches with a value of positive zero, +0in</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-17 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-left" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="left-004-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'left' property sets a positive zero length value in inches." />
+        <style type="text/css">
+            div
+            {
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-left: 5px solid orange;
+            }
+            div div
+            {
+                border-left: 5px solid blue;
+                left: +0in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the orange and blue lines.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-067.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-067.xht
new file mode 100644
index 0000000..c5842b0
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-067.xht
@@ -0,0 +1,38 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Left using inches with a nominal value, 1in</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-18 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-left" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="../reference/ref-black-96px-square-no-red.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'left' property sets a nominal length value in inches." />
+        <style type="text/css">
+            div
+            {
+                height: 1in;
+                position: relative;
+                width: 1in;
+            }
+            #div1
+            {
+                border-left: 1in solid red;
+            }
+            div div
+            {
+                border-left: 1in solid black;
+                margin-left: -2in;
+                left: 1in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-068.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-068.xht
new file mode 100644
index 0000000..6427dcc
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-068.xht
@@ -0,0 +1,38 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Left using inches with a positive nominal value, +1in</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-18 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-left" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="../reference/ref-black-96px-square-no-red.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'left' property sets a positive nominal length value in inches." />
+        <style type="text/css">
+            div
+            {
+                height: 1in;
+                position: relative;
+                width: 1in;
+            }
+            #div1
+            {
+                border-left: 1in solid red;
+            }
+            div div
+            {
+                border-left: 1in solid black;
+                margin-left: -2in;
+                left: +1in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-076.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-076.xht
new file mode 100644
index 0000000..4608fd0
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-076.xht
@@ -0,0 +1,36 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Left using 'em' units with a value of negative zero, -0em</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-17 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-left" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="left-004-ref.xht" />
+
+        <meta name="flags" content="ahem" />
+        <meta name="assert" content="The 'left' property sets a negative zero length value in 'em' units." />
+        <style type="text/css">
+            div
+            {
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-left: 5px solid orange;
+            }
+            div div
+            {
+                border-left: 5px solid blue;
+                left: -0em;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the orange and blue lines.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-077.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-077.xht
new file mode 100644
index 0000000..0874c82
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-077.xht
@@ -0,0 +1,36 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Left using 'em' units with a value of zero, 0em</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-17 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-left" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="left-004-ref.xht" />
+
+        <meta name="flags" content="ahem" />
+        <meta name="assert" content="The 'left' property sets a zero length value in 'em' units." />
+        <style type="text/css">
+            div
+            {
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-left: 5px solid orange;
+            }
+            div div
+            {
+                border-left: 5px solid blue;
+                left: 0em;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the orange and blue lines.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-078.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-078.xht
new file mode 100644
index 0000000..cf32545
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-078.xht
@@ -0,0 +1,36 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Left using 'em' units with a value of positive zero, +0em</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-17 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-left" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="left-004-ref.xht" />
+
+        <meta name="flags" content="ahem" />
+        <meta name="assert" content="The 'left' property sets a positive zero length value in 'em' units." />
+        <style type="text/css">
+            div
+            {
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-left: 5px solid orange;
+            }
+            div div
+            {
+                border-left: 5px solid blue;
+                left: +0em;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the orange and blue lines.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-079-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-079-ref.xht
new file mode 100644
index 0000000..6063e39
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-079-ref.xht
@@ -0,0 +1,29 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div
+  {
+  background-color: black;
+  height: 96px;
+  width: 20px;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if there is <strong>no red</strong>.</p>
+
+  <div></div>
+
+ </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-079.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-079.xht
new file mode 100644
index 0000000..b09a8c7
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-079.xht
@@ -0,0 +1,39 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Left using 'em' units with a nominal value, 6em</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-18 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-left" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="left-079-ref.xht" />
+
+        <meta name="flags" content="ahem" />
+        <meta name="assert" content="The 'left' property sets a nominal length value in 'em' units." />
+        <style type="text/css">
+            div
+            {
+                font: 20px/1 Ahem;
+                height: 1in;
+                position: relative;
+                width: 1in;
+            }
+            #div1
+            {
+                border-left: 1em solid red;
+            }
+            div div
+            {
+                border-left: 1em solid black;
+                margin-left: -7em;
+                left: 6em;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-080.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-080.xht
new file mode 100644
index 0000000..3422b89
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-080.xht
@@ -0,0 +1,39 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Left using 'em' units with a positive nominal value, +6em</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-18 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-left" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="left-079-ref.xht" />
+
+        <meta name="flags" content="ahem" />
+        <meta name="assert" content="The 'left' property sets a positive nominal length value in 'em' units." />
+        <style type="text/css">
+            div
+            {
+                font: 20px/1 Ahem;
+                height: 1in;
+                position: relative;
+                width: 1in;
+            }
+            #div1
+            {
+                border-left: 1em solid red;
+            }
+            div div
+            {
+                border-left: 1em solid black;
+                margin-left: -7em;
+                left: +6em;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-088.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-088.xht
new file mode 100644
index 0000000..65f6eb07
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-088.xht
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Left using 'ex' units with a value of negative zero, -0ex</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-17 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-left" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="left-004-ref.xht" />
+
+        <meta name="flags" content="ahem" />
+        <meta name="assert" content="The 'left' property sets a negative zero length value in 'ex' units." />
+        <style type="text/css">
+            div
+            {
+                font: 20px/1 Ahem;
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-left: 5px solid orange;
+            }
+            div div
+            {
+                border-left: 5px solid blue;
+                left: -0ex;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the orange and blue lines.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-089.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-089.xht
new file mode 100644
index 0000000..5dd6a383
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-089.xht
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Left using 'ex' units with a value of zero, 0ex</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-17 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-left" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="left-004-ref.xht" />
+
+        <meta name="flags" content="ahem" />
+        <meta name="assert" content="The 'left' property sets a zero length value in 'ex' units." />
+        <style type="text/css">
+            div
+            {
+                font: 20px/1 Ahem;
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-left: 5px solid orange;
+            }
+            div div
+            {
+                border-left: 5px solid blue;
+                left: 0ex;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the orange and blue lines.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-090.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-090.xht
new file mode 100644
index 0000000..8041d2f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-090.xht
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Left using 'ex' units with a value of positive zero, +0ex</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-17 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-left" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="left-004-ref.xht" />
+
+        <meta name="flags" content="ahem" />
+        <meta name="assert" content="The 'left' property sets a positive zero length value in 'ex' units." />
+        <style type="text/css">
+            div
+            {
+                font: 20px/1 Ahem;
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-left: 5px solid orange;
+            }
+            div div
+            {
+                border-left: 5px solid blue;
+                left: +0ex;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the orange and blue lines.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-091.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-091.xht
new file mode 100644
index 0000000..9941357
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-091.xht
@@ -0,0 +1,39 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Left using 'ex' units with a nominal value, 6ex</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-18 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-left" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="../reference/ref-black-96px-square-no-red.xht" />
+
+        <meta name="flags" content="ahem" />
+        <meta name="assert" content="The 'left' property sets a nominal length value in 'ex' units." />
+        <style type="text/css">
+            div
+            {
+                font: 20px/1 Ahem;
+                height: 1in;
+                position: relative;
+                width: 1in;
+            }
+            #div1
+            {
+                border-left: 1in solid red;
+            }
+            div div
+            {
+                border-left: 6ex solid black;
+                margin-left: -12ex;
+                left: 6ex;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-092.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-092.xht
new file mode 100644
index 0000000..30ba644
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-092.xht
@@ -0,0 +1,39 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Left using 'ex' units with a positive nominal value, +6ex</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-18 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-left" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="../reference/ref-black-96px-square-no-red.xht" />
+
+        <meta name="flags" content="ahem" />
+        <meta name="assert" content="The 'left' property sets a positive nominal length value in 'ex' units." />
+        <style type="text/css">
+            div
+            {
+                font: 20px/1 Ahem;
+                height: 1in;
+                position: relative;
+                width: 1in;
+            }
+            #div1
+            {
+                border-left: 1in solid red;
+            }
+            div div
+            {
+                border-left: 6ex solid black;
+                margin-left: -12ex;
+                left: +6ex;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-100.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-100.xht
new file mode 100644
index 0000000..095f31e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-100.xht
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Left using percentages with a value of negative zero, -0%</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-17 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-left" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="left-004-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'left' property sets a negative zero length value in percentages." />
+        <style type="text/css">
+            div
+            {
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-left: 5px solid orange;
+                width: 1in;
+            }
+            div div
+            {
+                border-left: 5px solid blue;
+                left: -0%;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the orange and blue lines.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-101.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-101.xht
new file mode 100644
index 0000000..02c76a0
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-101.xht
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Left using percentages with a value of zero, 0%</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-17 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-left" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="left-004-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'left' property sets a zero length value in percentages." />
+        <style type="text/css">
+            div
+            {
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-left: 5px solid orange;
+                width: 1in;
+            }
+            div div
+            {
+                border-left: 5px solid blue;
+                left: 0%;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the orange and blue lines.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-102.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-102.xht
new file mode 100644
index 0000000..584649c
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-102.xht
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Left using percentages with a value of positive zero, +0%</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-17 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-left" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="left-004-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'left' property sets a positive zero length value in percentages." />
+        <style type="text/css">
+            div
+            {
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-left: 5px solid orange;
+                width: 1in;
+            }
+            div div
+            {
+                border-left: 5px solid blue;
+                left: +0%;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the orange and blue lines.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-103.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-103.xht
new file mode 100644
index 0000000..66b4fdd
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-103.xht
@@ -0,0 +1,38 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Left using percentages with a nominal value, 100%</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-18 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-left" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="../reference/ref-black-96px-square-no-red.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'left' property sets a nominal length value in percentages." />
+        <style type="text/css">
+            div
+            {
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-left: 1in solid red;
+                width: 1in;
+            }
+            div div
+            {
+                border-left: 1in solid black;
+                margin-left: -2in;
+                left: 100%;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-104.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-104.xht
new file mode 100644
index 0000000..4a17487
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-104.xht
@@ -0,0 +1,38 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Left using percentages with a positive nominal value, +100%</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-18 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-left" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="../reference/ref-black-96px-square-no-red.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'left' property sets a positive nominal length value in percentages." />
+        <style type="text/css">
+            div
+            {
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-left: 1in solid red;
+                width: 1in;
+            }
+            div div
+            {
+                border-left: 1in solid black;
+                margin-left: -2in;
+                left: +100%;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-109.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-109.xht
new file mode 100644
index 0000000..2f0b1cf
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-109.xht
@@ -0,0 +1,36 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Left with a value of negative zero and no units, -0</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-17 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-left" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="left-004-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'left' property sets a negative zero length value with no units." />
+        <style type="text/css">
+            div
+            {
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-left: 5px solid orange;
+            }
+            div div
+            {
+                border-left: 5px solid blue;
+                left: -0;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the orange and blue lines.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-110.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-110.xht
new file mode 100644
index 0000000..49dc6c4
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-110.xht
@@ -0,0 +1,36 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Left with a value of zero and no units, 0</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-17 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-left" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="left-004-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'left' property sets a zero length value with no units." />
+        <style type="text/css">
+            div
+            {
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-left: 5px solid orange;
+            }
+            div div
+            {
+                border-left: 5px solid blue;
+                left: 0;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the orange and blue lines.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-111.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-111.xht
new file mode 100644
index 0000000..9acd7f4
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-111.xht
@@ -0,0 +1,36 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Left with a value of positive zero and no units, +0</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-17 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-left" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="left-004-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'left' property sets a positive zero length value with no units." />
+        <style type="text/css">
+            div
+            {
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-left: 5px solid orange;
+            }
+            div div
+            {
+                border-left: 5px solid blue;
+                left: +0;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the orange and blue lines.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-112.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-112.xht
new file mode 100644
index 0000000..a0d6c125
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-112.xht
@@ -0,0 +1,36 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Left with a value of 'auto'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-17 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-left" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="left-004-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'left' property sets a value of 'auto'." />
+        <style type="text/css">
+            div
+            {
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-left: 5px solid orange;
+            }
+            div div
+            {
+                border-left: 5px solid blue;
+                left: auto;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the orange and blue lines.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-113-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-113-ref.xht
new file mode 100644
index 0000000..279160a0
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-113-ref.xht
@@ -0,0 +1,30 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div
+  {
+  background-color: black;
+  height: 96px;
+  margin-left: 288px;
+  width: 96px;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if there is <strong>no red</strong>.</p>
+
+  <div></div>
+
+ </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-113.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-113.xht
new file mode 100644
index 0000000..de5266e2
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-113.xht
@@ -0,0 +1,45 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Left with a value of 'inherit'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-18 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-left" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="left-113-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'left' property sets a value of 'inherit'." />
+        <style type="text/css">
+            div
+            {
+                height: 1in;
+                position: relative;
+            }
+            #wrapper
+            {
+                width: 5in;
+            }
+            #div1
+            {
+                border-left: 1in solid red;
+                left: 100%;
+                width: 1in;
+            }
+            div div
+            {
+                border-left: 1in solid black;
+                margin-left: -2in;
+                left: inherit;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="wrapper">
+            <div id="div1">
+                <div></div>
+            </div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-applies-to-001-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-applies-to-001-ref.xht
new file mode 100644
index 0000000..b8b923c
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-applies-to-001-ref.xht
@@ -0,0 +1,33 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  body {margin: 0px;}
+
+  p {margin: 1em 8px;}
+
+  div
+  {
+  background-color: green;
+  height: 96px;
+  width: 96px;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if there is a filled green square on the left side of the page.</p>
+
+  <div></div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-applies-to-001.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-applies-to-001.xht
new file mode 100644
index 0000000..021c833
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-applies-to-001.xht
@@ -0,0 +1,51 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Left applied to element with 'display' set to 'table-row-group'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-19 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-left" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="left-applies-to-001-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'left' property applies to elements with a display of 'table-row-group'." />
+        <style type="text/css">
+			body {margin: 8px;}
+
+            #test
+            {
+                left: 0;
+                display: table-row-group;
+                position: absolute;
+            }
+            #table
+            {
+                display: table;
+                table-layout: fixed;
+            }
+            #row
+            {
+                display: table-row;
+            }
+            #cell
+            {
+                background: green;
+                display: table-cell;
+                height: 1in;
+                width: 1in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a filled green square on the left side of the page.</p>
+        <div id="table">
+            <div id="test">
+                <div id="row">
+                    <div id="cell"></div>
+                </div>
+            </div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-applies-to-002.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-applies-to-002.xht
new file mode 100644
index 0000000..dbec54e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-applies-to-002.xht
@@ -0,0 +1,51 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Left applied to element with 'display' set to 'table-header-group'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-19 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-left" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="left-applies-to-001-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'left' property applies to elements with a display of 'table-header-group'." />
+        <style type="text/css">
+			body {margin: 8px;}
+
+            #test
+            {
+                background: green;
+                left: 0;
+                display: table-header-group;
+                position: absolute;
+            }
+            #table
+            {
+                display: table;
+                table-layout: fixed;
+            }
+            #row
+            {
+                display: table-row;
+            }
+            #cell
+            {
+                display: table-cell;
+                height: 1in;
+                width: 1in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a filled green square on the left side of the page.</p>
+        <div id="table">
+            <div id="test">
+                <div id="row">
+                    <div id="cell"></div>
+                </div>
+            </div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-applies-to-003.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-applies-to-003.xht
new file mode 100644
index 0000000..cf535f1
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-applies-to-003.xht
@@ -0,0 +1,51 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Left applied to element with 'display' set to 'table-footer-group'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-19 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-left" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="left-applies-to-001-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'left' property applies to elements with a display of 'table-footer-group'." />
+        <style type="text/css">
+			body {margin: 8px;}
+
+            #test
+            {
+                background: green;
+                left: 0;
+                display: table-footer-group;
+                position: absolute;
+            }
+            #table
+            {
+                display: table;
+                table-layout: fixed;
+            }
+            #row
+            {
+                display: table-row;
+            }
+            #cell
+            {
+                display: table-cell;
+                height: 1in;
+                width: 1in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a filled green square on the left side of the page.</p>
+        <div id="table">
+            <div id="test">
+                <div id="row">
+                    <div id="cell"></div>
+                </div>
+            </div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-applies-to-004.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-applies-to-004.xht
new file mode 100644
index 0000000..9d1f18f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-applies-to-004.xht
@@ -0,0 +1,45 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Left applied to element with 'display' set to 'table-row'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-19 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-left" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="left-applies-to-001-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'left' property applies to elements with a display of 'table-row'." />
+        <style type="text/css">
+			body {margin: 8px;}
+
+            #test
+            {
+                background: green;
+                left: 0;
+                display: table-row;
+                position: absolute;
+            }
+            #table
+            {
+                display: table;
+                table-layout: fixed;
+            }
+            #cell
+            {
+                display: table-cell;
+                height: 1in;
+                width: 1in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a filled green square on the left side of the page.</p>
+        <div id="table">
+            <div id="test">
+                <div id="cell"></div>
+            </div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-applies-to-005.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-applies-to-005.xht
new file mode 100644
index 0000000..d34f1de
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-applies-to-005.xht
@@ -0,0 +1,50 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Left applied to element with 'display' set to 'table-column-group'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-19 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-left" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="left-applies-to-001-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'left' property applies to elements with a display of 'table-column-group'." />
+        <style type="text/css">
+			body {margin: 8px;}
+
+            #test
+            {
+                background: green;
+                left: 0;
+                display: table-column-group;
+                height: 1in;
+                position: absolute;
+                width: 1in;
+            }
+            #table
+            {
+                display: table;
+                table-layout: fixed;
+            }
+            #row
+            {
+                display: table-row;
+            }
+            #cell
+            {
+                display: table-cell;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a filled green square on the left side of the page.</p>
+        <div id="table">
+            <div id="test"></div>
+            <div id="row">
+                <div id="cell"></div>
+            </div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-applies-to-006.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-applies-to-006.xht
new file mode 100644
index 0000000..31151c5
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-applies-to-006.xht
@@ -0,0 +1,50 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Left applied to element with 'display' set to 'table-column'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-19 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-left" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="left-applies-to-001-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'left' property applies to elements with a display of 'table-column'." />
+        <style type="text/css">
+			body {margin: 8px;}
+
+            #test
+            {
+                background: green;
+                left: 0;
+                display: table-column;
+                height: 1in;
+                position: absolute;
+                width: 1in;
+            }
+            #table
+            {
+                display: table;
+                table-layout: fixed;
+            }
+            #row
+            {
+                display: table-row;
+            }
+            #cell
+            {
+                display: table-cell;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a filled green square on the left side of the page.</p>
+        <div id="table">
+            <div id="test"></div>
+            <div id="row">
+                <div id="cell"></div>
+            </div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-applies-to-007.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-applies-to-007.xht
new file mode 100644
index 0000000..9ce1853
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-applies-to-007.xht
@@ -0,0 +1,45 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Left applied to element with 'display' set to 'table-cell'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-19 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-left" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="left-applies-to-001-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'left' property applies to elements with a display of 'table-cell'." />
+        <style type="text/css">
+			body {margin: 8px;}
+
+            #table
+            {
+                display: table;
+                table-layout: fixed;
+            }
+            #row
+            {
+                display: table-row;
+            }
+            #cell
+            {
+                background: green;
+                left: 0;
+                display: table-cell;
+                height: 1in;
+                position: absolute;
+                width: 1in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a filled green square on the left side of the page.</p>
+        <div id="table">
+            <div id="row">
+                <div id="cell"></div>
+            </div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-applies-to-008.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-applies-to-008.xht
new file mode 100644
index 0000000..e8a8c109
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-applies-to-008.xht
@@ -0,0 +1,27 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Left applied to element with 'display' set to inline</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-06-30 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-left" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+        <meta name="flags" content="ahem" />
+        <meta name="assert" content="The 'left' property applies to elements with a display of inline." />
+        <style type="text/css">
+            div
+            {
+                color: green;
+                font: 1in/1 Ahem;
+                left: 0;
+                display: inline;
+                position: absolute;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a green square on the left side of the page.</p>
+        <div>X</div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-applies-to-009.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-applies-to-009.xht
new file mode 100644
index 0000000..99965eb
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-applies-to-009.xht
@@ -0,0 +1,34 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Left applied to element with 'display' set to block</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-19 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-left" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="left-applies-to-001-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'left' property applies to elements with a display of block." />
+        <style type="text/css">
+			body {margin: 8px;}
+
+            span
+            {
+                background: green;
+                left: 0;
+                display: block;
+                height: 1in;
+                position: absolute;
+                width: 1in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a filled green square on the left side of the page.</p>
+        <div>
+            <span></span>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-applies-to-010.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-applies-to-010.xht
new file mode 100644
index 0000000..49ec4440
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-applies-to-010.xht
@@ -0,0 +1,29 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Left applied to element with 'display' set to list-item</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-19 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-left" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'left' property applies to elements with a display of list-item." />
+        <style type="text/css">
+            div
+            {
+                background: green;
+                left: 0;
+                display: list-item;
+                height: 1in;
+                list-style-position: inside;
+                position: absolute;
+                width: 1in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a filled green square at the left side of the page and a marker bullet inside it.</p>
+        <div></div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-applies-to-012.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-applies-to-012.xht
new file mode 100644
index 0000000..d7771968
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-applies-to-012.xht
@@ -0,0 +1,44 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Left applied to element with 'display' set to inline-block</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-19 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-left" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="left-applies-to-001-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'left' property applies to elements with a display of inline-block." />
+        <style type="text/css">
+			body {margin: 8px;}
+
+            span#inline-block
+            {
+                left: 0;
+                display: inline-block;
+                position: absolute;
+            }
+
+			span.block-descendant
+			{
+	            background: green;
+				display: block;
+       	        height: 0.5in;
+        	    width: 1in;
+			}
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a filled green square on the left side of the page.</p>
+
+        <div>
+	        <span id="inline-block">
+				<span class="block-descendant"></span>
+				<span class="block-descendant"></span>
+        	</span>
+        </div>
+
+    </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-applies-to-013.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-applies-to-013.xht
new file mode 100644
index 0000000..1bb73dc0e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-applies-to-013.xht
@@ -0,0 +1,45 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Left applied to element with 'display' set to 'table'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-19 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-left" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="left-applies-to-001-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'left' property applies to elements with a display of 'table'." />
+        <style type="text/css">
+			body {margin: 8px;}
+
+            #table
+            {
+                background: green;
+                left: 0;
+                display: table;
+                table-layout: fixed;
+                height: 1in;
+                position: absolute;
+                width: 1in;
+            }
+            #row
+            {
+                display: table-row;
+            }
+            #cell
+            {
+                display: table-cell;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a filled green square on the left side of the page.</p>
+        <div id="table">
+            <div id="row">
+                <div id="cell"></div>
+            </div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-applies-to-014.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-applies-to-014.xht
new file mode 100644
index 0000000..d453f2b
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-applies-to-014.xht
@@ -0,0 +1,45 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Left applied to element with 'display' set to 'inline-table'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-19 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-left" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="left-applies-to-001-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'left' property applies to elements with a display of 'inline-table'." />
+        <style type="text/css">
+			body {margin: 8px;}
+
+            #table
+            {
+                background: green;
+                left: 0;
+                display: inline-table;
+                table-layout: fixed;
+                height: 1in;
+                position: absolute;
+                width: 1in;
+            }
+            #row
+            {
+                display: table-row;
+            }
+            #cell
+            {
+                display: table-cell;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a filled green square on the left side of the page.</p>
+        <div id="table">
+            <div id="row">
+                <div id="cell"></div>
+            </div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-applies-to-015.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-applies-to-015.xht
new file mode 100644
index 0000000..e0b61a33
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-applies-to-015.xht
@@ -0,0 +1,49 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Left applied to element with 'display' set to 'table-caption'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-19 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-left" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="left-applies-to-001-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'left' property applies to elements with a display of 'table-caption'." />
+        <style type="text/css">
+			body {margin: 8px;}
+
+            #caption
+            {
+                background: green;
+                left: 0;
+                display: table-caption;
+                height: 1in;
+                position: absolute;
+                width: 1in;
+            }
+            #table
+            {
+                display: table;
+            }
+            #row
+            {
+                display: table-row;
+            }
+            #cell
+            {
+                display: table-cell;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a filled green square on the left side of the page.</p>
+        <div id="table">
+            <div id="caption"></div>
+            <div id="row">
+                <div id="cell"></div>
+            </div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-offset-001-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-offset-001-ref.xht
new file mode 100644
index 0000000..47a60127
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-offset-001-ref.xht
@@ -0,0 +1,29 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div#inline-block {display: inline-block;}
+
+  img {vertical-align: top;}
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if there is a blue square with its top-right corner missing.</p>
+
+  <div id="inline-block">
+  		<div><img src="support/blue15x15.png" width="50" height="50" alt="Image download support must be enabled" /><img src="support/1x1-white.png" width="50" height="50" alt="Image download support must be enabled" /></div>
+  		<div><img src="support/blue15x15.png" width="50" height="50" alt="Image download support must be enabled" /><img src="support/blue15x15.png" width="50" height="50" alt="Image download support must be enabled" /></div>
+  </div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-offset-001.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-offset-001.xht
new file mode 100644
index 0000000..552e608
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-offset-001.xht
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolute positioned elements with a left offset</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-19 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-right" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="left-offset-001-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="Absolute positioned elements with a left offset, offsets the elements left margin edge from the left edge of the elements containing block." />
+        <style type="text/css">
+            #div1
+            {
+                background: blue;
+                height: 100px;
+                position: relative;
+                width: 100px;
+            }
+            div div
+            {
+                background: white;
+                height: 50px;
+                position: absolute;
+                left: 50px;
+                width: 50px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a blue square with its top-right corner missing.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-offset-002.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-offset-002.xht
new file mode 100644
index 0000000..7a1873f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-offset-002.xht
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Position 'left' offset property - absolute length value and relative positioning</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-19 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-right" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="left-offset-001-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="Relative positioned elements with a left offset, offsets with respect to the left edge of the box itself." />
+        <style type="text/css">
+            #div1
+            {
+                background: blue;
+                height: 100px;
+                position: relative;
+                width: 100px;
+            }
+            div div
+            {
+                background: white;
+                height: 50px;
+                position: relative;
+                left: 50px;
+                width: 50px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a blue square with its top-right corner missing.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-offset-003-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-offset-003-ref.xht
new file mode 100644
index 0000000..d877587
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-offset-003-ref.xht
@@ -0,0 +1,30 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div
+  {
+  border: blue solid medium;
+  direction: rtl;
+  height: 1in;
+  width: 1.25in;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if a filled black square is in the upper-right corner of an hollow blue rectangle.</p>
+
+  <div><img src="support/black15x15.png" width="48" height="48" alt="Image download support must be enabled" /></div>
+
+ </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-offset-003.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-offset-003.xht
new file mode 100644
index 0000000..9dc9af9
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-offset-003.xht
@@ -0,0 +1,44 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: 'left' property defines the offset from the left edge of the containing block</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-19 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-right" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="left-offset-003-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'left' property, for absolute positioning, specifies the offset of the element in relation to the containing block's left edge. In this test, the containing block of the absolutely positioned element is formed by the padding box of its nearest (closest) non-inline positioned ancestor element." />
+        <style type="text/css">
+            #container
+            {
+                border: solid blue;
+                height: 1in;
+                padding-left: 0.25in;
+                position: relative;
+                width: 1in;
+            }
+            #div1
+            {
+                background: black;
+                height: 0.5in;
+                position: absolute;
+                left: 0.75in;
+                width: 0.5in;
+            }
+            #div2
+            {
+                height: 1in;
+                width: 1in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if a filled black square is in the upper-right corner of an hollow blue rectangle.</p>
+        <div id="container">
+            <div id="div1"></div>
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-offset-percentage-001-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-offset-percentage-001-ref.xht
new file mode 100644
index 0000000..b0a963e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-offset-percentage-001-ref.xht
@@ -0,0 +1,30 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div
+  {
+  border: black solid medium;
+  direction: rtl;
+  height: 200px;
+  width: 100px;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if a blue square is in the top-right corner of an hollow black rectangle.</p>
+
+  <div><img src="support/blue15x15.png" width="50" height="50" alt="Image download support must be enabled" /></div>
+
+ </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-offset-percentage-001.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-offset-percentage-001.xht
new file mode 100644
index 0000000..33df2da
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-offset-percentage-001.xht
@@ -0,0 +1,39 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Left offset using percentage</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-19 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-left" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="left-offset-percentage-001-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="Percentage offset values for the 'left' property are based off the width of the containing block." />
+        <style type="text/css">
+            #div1
+            {
+                border: solid black;
+                height: 150px;
+                padding: 25px;
+                position: relative;
+                width: 50px;
+            }
+            div div
+            {
+                background: blue;
+                height: 50px;
+                left: 50%;
+                position: absolute;
+                top: 0;
+                width: 50px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if a blue square is in the top-right corner of an hollow black rectangle.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-offset-percentage-002-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-offset-percentage-002-ref.xht
new file mode 100644
index 0000000..c48b87b8
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-offset-percentage-002-ref.xht
@@ -0,0 +1,32 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div
+  {
+  background-color: green;
+  left: 300px;
+  height: 100px;
+  position: relative;
+  top: 100px;
+  width: 100px;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
+
+  <div></div>
+
+ </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-offset-percentage-002.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-offset-percentage-002.xht
new file mode 100644
index 0000000..005be19
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/left-offset-percentage-002.xht
@@ -0,0 +1,86 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Test: position absolute - left offset percentage and inherit</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+  <link rel="help" title="6.2.1 The 'inherit' value" href="http://www.w3.org/TR/CSS21/cascade.html#value-def-inherit" />
+  <link rel="help" title="9.3.2 Box offsets: 'top', 'right', 'bottom', 'left'" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+  <link rel="match" href="left-offset-percentage-002-ref.xht" />
+  <meta content="'left: inherit' makes the left property take the same computed value as the left property for the element's parent; in the case of a percentage value, the computed value is the specified percentage value. 'left: [percentage]' refers to width of containing block." name="assert" />
+  <meta content="" name="flags" />
+
+  <style type="text/css"><![CDATA[
+  div {position: absolute;}
+
+  #grand-parent-abs-pos
+  {
+  height: 400px;
+  width: 600px;
+  }
+
+  #red-abs-pos-overlapped
+  {
+  background-color: red;
+  color: white;
+  height: 100px;
+  left: 300px;
+  top: 100px;
+  width: 100px;
+  }
+
+  #parent-abs-pos
+  {
+  height: 0px;
+  left: 50%; /* 50% x 600px == 300px */
+  /* 'left: [percentage]' refers to width of containing block. */
+  top: 25%; /* 25% x 400px == 100px */
+  /* 'top: [percentage]' refers to height of containing block. */
+  width: 0px;
+  }
+
+  #green-child-abs-pos-inherit-overlapping
+  {
+  background-color: green;
+  left: inherit;
+  /*
+  =====================================
+  left: inherit should resolve as left: 50% because
+  "the property takes the same computed value as the
+  property for the element's parent"
+  CSS 2.1, section 6.2.1 The 'inherit' value
+  http://www.w3.org/TR/CSS21/cascade.html#value-def-inherit
+  and
+  "Computed value: (...) if specified as a percentage, [then]
+  the specified [percentage] value"
+  http://www.w3.org/TR/CSS21/visuren.html#position-props
+
+  So, the left offset of #green-child-abs-pos-inherit-overlapping
+  should be 50%, which is 50% of the width of its containing
+  block (#parent-abs-pos) which is 0px.
+  =====================================
+  */
+  top: 0px;
+  height: 100px;
+  width: 100px;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
+
+  <div id="grand-parent-abs-pos">
+    <div id="red-abs-pos-overlapped">test FAILED</div>
+    <div id="parent-abs-pos">
+      <div id="green-child-abs-pos-inherit-overlapping"></div>
+    </div>
+  </div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-001.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-001.xht
new file mode 100644
index 0000000..2e5b573ab
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-001.xht
@@ -0,0 +1,32 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Position set to 'static'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-19 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-position" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#choose-position" />
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'position' property applies the value 'static' and places the element in normal document flow." />
+        <style type="text/css">
+            #wrapper
+            {
+                border: 3px solid orange;
+            }
+            #div1
+            {
+                background: blue;
+                color: white;
+                left: 1in;
+                position: static;
+                top: 1in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if the blue bar fills the entire area of the wide hollow orange rectangle.</p>
+        <div id="wrapper">
+            <div id="div1">Text sample</div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-002.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-002.xht
new file mode 100644
index 0000000..305122d5
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-002.xht
@@ -0,0 +1,32 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Position set to 'relative'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-19 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-position" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#choose-position" />
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'position' property applies the value 'relative' and places the element in normal document flow." />
+        <style type="text/css">
+            #wrapper
+            {
+                border: 3px solid orange;
+            }
+            #div1
+            {
+                background: blue;
+                color: white;
+                left: 1in;
+                position: relative;
+                top: 1in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if the blue bar is completely shifted below the wide hollow orange rectangle.</p>
+        <div id="wrapper">
+            <div id="div1">Text sample</div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-003.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-003.xht
new file mode 100644
index 0000000..4dff4bd3
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-003.xht
@@ -0,0 +1,33 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Position set to 'absolute'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-19 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-position" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#choose-position" />
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'position' property applies the value 'absolute' and places the element out of flow of the document." />
+        <style type="text/css">
+            #wrapper
+            {
+                background: red;
+                border: 3px solid orange;
+            }
+            #div1
+            {
+                background: blue;
+                color: white;
+                left: 1in;
+                position: absolute;
+                top: 1.5in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is no red, if the blue stripe is just as wide and just as tall as its text and if the blue stripe is completely shifted below the orange line.</p>
+        <div id="wrapper">
+            <div id="div1">Text sample</div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-004.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-004.xht
new file mode 100644
index 0000000..eb231ddf
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-004.xht
@@ -0,0 +1,39 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Position set to 'fixed'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-19 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-position" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#choose-position" />
+        <meta name="flags" content="interact" />
+        <meta name="assert" content="The 'position' property applies the value 'fixed' and places the element out of flow of the document and locks it to a specific point on the viewport." />
+        <style type="text/css">
+            #wrapper
+            {
+                height: 3000px;
+            }
+            #div1
+            {
+                background: red;
+                border: 3px solid orange;
+            }
+            #div2
+            {
+                background: blue;
+                color: white;
+                left: 1in;
+                position: fixed;
+                top: 1.75in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is no red, if the blue stripe is just as wide and just as tall as its text and if the blue stripe is completely shifted below the orange line. Also when scrolling, the blue stripe must stay at its same position on the screen, all other content can scroll.</p>
+        <div id="wrapper">
+            <div id="div1">
+                <div id="div2">Text sample</div>
+            </div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-005.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-005.xht
new file mode 100644
index 0000000..90ced5e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-005.xht
@@ -0,0 +1,34 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Position set to 'inherit'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-19 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-position" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#choose-position" />
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'position' property applies the value 'inherit' and inherits the 'position' value from its parent element." />
+        <style type="text/css">
+            #wrapper
+            {
+                background: red;
+                border: 3px solid orange;
+                position: absolute;
+            }
+            #div1
+            {
+                background: blue;
+                color: white;
+                left: 1in;
+                position: inherit;
+                top: 1in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is no red, if the blue rectangle is just as wide as its longest word and just as tall as its text and if the blue rectangle is completely shifted below the tiny orange square.</p>
+        <div id="wrapper">
+            <div id="div1">Text sample</div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-006-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-006-ref.xht
new file mode 100644
index 0000000..c32c2aa
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-006-ref.xht
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+ </head>
+
+ <body>
+
+  <p>There should be 2 sentences on this page.</p>
+
+  <p>The test has passed if you see this as the 2nd sentence.</p>
+
+ </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-006.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-006.xht
new file mode 100644
index 0000000..05b2c98
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-006.xht
@@ -0,0 +1,22 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
+ <head>
+  <title>CSS Test: Parsing 'position'</title>
+  <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
+  <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-19 -->
+  <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/parsing/core-syntax/004.html" type="text/html"/>
+  <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#parsing-errors" />
+  <link rel="match" href="position-006-ref.xht" />
+
+
+  <meta name="flags" content="invalid" />
+
+  <style type="text/css">
+   p { position: fixed, top; }
+  </style>
+ </head>
+ <body>
+  <p>There should be 2 sentences on this page.</p>
+  <p>The test has passed if you see this as the 2nd sentence.</p>
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-absolute-001.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-absolute-001.xht
new file mode 100644
index 0000000..53788e5
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-absolute-001.xht
@@ -0,0 +1,40 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolute positions impact on later siblings</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-07-09 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#positioning-scheme" />
+		<link rel="match" href="../reference/ref-filled-green-100px-square.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="Absolute positioned elements do not impact later siblings." />
+        <style type="text/css">
+            #div1
+            {
+                position: relative;
+            }
+            #div2, #div3
+            {
+                height: 100px;
+                width: 100px;
+            }
+            #div2
+            {
+                background: green;
+                position: absolute;
+            }
+            #div3
+            {
+                background: red;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
+        <div id="div1">
+            <div id="div2"></div>
+            <div id="div3"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-absolute-002-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-absolute-002-ref.xht
new file mode 100644
index 0000000..58b67c9c
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-absolute-002-ref.xht
@@ -0,0 +1,31 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div
+  {
+  background-color: blue;
+  height: 2in;
+  width: 2in;
+  }
+
+  img {padding: 1in 0 0 1in;}
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if an orange square fills the <strong>bottom-right corner</strong> of a bigger blue square.</p>
+
+  <div><img src="support/swatch-orange.png" width="96" height="96" alt="Image download support must be enabled" /></div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-absolute-002.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-absolute-002.xht
new file mode 100644
index 0000000..a1a7cf48
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-absolute-002.xht
@@ -0,0 +1,38 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Position absolute size and positioning</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-20 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-position" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#choose-position" />
+		<link rel="match" href="position-absolute-002-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="Absolutely positioned elements can be sized and positioned using 'top', 'right', 'bottom' and 'left' properties." />
+        <style type="text/css">
+            #div1
+            {
+                background: blue;
+                height: 2in;
+                position: relative;
+                width: 2in;
+            }
+            div div
+            {
+                background: orange;
+                bottom: 0;
+                left: 1in;
+                position: absolute;
+                right: 0;
+                top: 1in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if an orange square fills the <strong>bottom-right corner</strong> of a bigger blue square.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-absolute-003.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-absolute-003.xht
new file mode 100644
index 0000000..09961ba
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-absolute-003.xht
@@ -0,0 +1,43 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolute position element taken out of flow</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#absolute-positioning" />
+		<link rel="match" href="../reference/ref-filled-green-100px-square.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="Absolute positioned elements are taken out of the normal flow when they have explicit offsets." />
+        <style type="text/css">
+            #div1
+            {
+                height: 100px;
+                position: relative;
+                width: 200px;
+            }
+            #div2, #div3
+            {
+                height: 100px;
+                width: 100px;
+            }
+            #div2
+            {
+                background: red;
+            }
+            #div3
+            {
+                background: green;
+                position: absolute;
+                left: 0;
+                top: 0;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
+        <div id="div1">
+            <div id="div2"></div>
+            <div id="div3"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-absolute-004-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-absolute-004-ref.xht
new file mode 100644
index 0000000..6e27394
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-absolute-004-ref.xht
@@ -0,0 +1,30 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div
+  {
+  background-color: blue;
+  height: 2in;
+  margin-left: 1in;
+  width: 1in;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if the blue square is directly below the orange square.</p>
+
+  <div><img src="support/swatch-orange.png" width="96" height="96" alt="Image download support must be enabled" /></div>
+
+ </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-absolute-004.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-absolute-004.xht
new file mode 100644
index 0000000..5bedf22
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-absolute-004.xht
@@ -0,0 +1,43 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned elements establishes a new containing block for normal flow children</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-20 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#absolute-positioning" />
+		<link rel="match" href="position-absolute-004-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="An absolutely positioned box establishes a new containing block for normal flow children." />
+        <style type="text/css">
+            #div1
+            {
+                position: relative;
+            }
+            div div
+            {
+                height: 1in;
+                width: 1in;
+            }
+            #div2
+            {
+                background: blue;
+                left: 1in;
+                height: 2in;
+                position: absolute;
+            }
+            #div3
+            {
+                background: orange;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if the blue square is directly below the orange square.</p>
+        <div id="div1">
+            <div id="div2">
+                <div id="div3"></div>
+            </div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-absolute-005.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-absolute-005.xht
new file mode 100644
index 0000000..ec001cf
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-absolute-005.xht
@@ -0,0 +1,46 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned elements do not establish a new containing block for fixed position descendants</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-20 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#absolute-positioning" />
+        <meta name="flags" content="" />
+        <meta name="assert" content="An absolutely positioned box does not establish a new containing block for fixed positioned descendants." />
+        <style type="text/css">
+            p
+            {
+                margin-top: 1in;
+            }
+            #div1
+            {
+                position: relative;
+            }
+            #div2
+            {
+                position: absolute;
+                height: 1in;
+                left: 3in;
+                top: 3in;
+                width: 1in;
+            }
+            #div3
+            {
+                background: black;
+                height: 1in;
+                left: 0;
+                position: fixed;
+                top: 0;
+                width: 1in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a box in the upper-left corner of the page.</p>
+        <div id="div1">
+            <div id="div2">
+                <div id="div3"></div>
+            </div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-absolute-006.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-absolute-006.xht
new file mode 100644
index 0000000..30e5a8a
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-absolute-006.xht
@@ -0,0 +1,45 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned elements establishes a new containing block for absolutely positioned children</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#absolute-positioning" />
+		<link rel="match" href="position-absolute-004-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="An absolutely positioned box establishes a new containing block for absolutely positioned children." />
+        <style type="text/css">
+            #div1
+            {
+                height: 2in;
+                position: relative;
+                width: 2in;
+            }
+            div div
+            {
+                height: 1in;
+                width: 1in;
+            }
+            #div2
+            {
+                background: orange;
+                left: 1in;
+                position: absolute;
+            }
+            #div3
+            {
+                background: blue;
+                position: relative;
+                top: 1in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if the blue square is directly below the orange square.</p>
+        <div id="div1">
+            <div id="div2">
+                <div id="div3"></div>
+            </div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-absolute-007-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-absolute-007-ref.xht
new file mode 100644
index 0000000..115db79
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-absolute-007-ref.xht
@@ -0,0 +1,40 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div.blue
+  {
+  background-color: blue;
+  height: 0.5in;
+  width: 0.5in
+  }
+
+  div#orange
+  {
+  background-color: orange;
+  height: 1in;
+  width: 1in;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if the "Filler Text" overflow below the orange square and overlaps the bottom blue square.</p>
+
+  <div class="blue"></div>
+
+  <div id="orange">Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text</div>
+
+  <div class="blue"></div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-absolute-007.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-absolute-007.xht
new file mode 100644
index 0000000..5b117c52
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-absolute-007.xht
@@ -0,0 +1,43 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Absolutely positioned elements child behavior</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-20 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#absolute-positioning" />
+		<link rel="match" href="position-absolute-007-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The contents of an absolutely positioned element do not flow around any other boxes and can obscure the contents of another box." />
+        <style type="text/css">
+            #div1
+            {
+                position: relative;
+            }
+            #div2
+            {
+                background: orange;
+                position: absolute;
+                height: 1in;
+                top: 0.5in;
+                width: 1in;
+            }
+            #div3
+            {
+                background: blue;
+                float: left;
+                height: 2in;
+                width: 0.5in
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if the "Filler Text" overflow below the orange square and overlaps the bottom blue square.</p>
+        <div id="div1">
+            <div id="div2">
+                Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text Filler Text
+            </div>
+            <div id="div3"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-absolute-008.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-absolute-008.xht
new file mode 100644
index 0000000..35c2d6d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-absolute-008.xht
@@ -0,0 +1,42 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Float is computed to 'none' when element is absolutely positioned</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-07-09 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo" title="9.7 Relationships between 'display', 'position', and 'float'" />
+		<link rel="match" href="../reference/ref-filled-green-100px-square.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="Float is computed to 'none' when 'position: absolute' is specified." />
+        <style type="text/css">
+            #div1
+            {
+                position: relative;
+            }
+            #div2, #div3
+            {
+                height: 100px;
+                width: 100px;
+            }
+            #div2
+            {
+                background: red;
+            }
+            #div3
+            {
+                background: green;
+                float: right;
+                position: absolute;
+                top: 0;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
+        <div id="div1">
+            <div id="div2"></div>
+            <div id="div3"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-applies-to-001.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-applies-to-001.xht
new file mode 100644
index 0000000..82ab3625
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-applies-to-001.xht
@@ -0,0 +1,50 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Position applied to element with 'display' set to 'table-row-group'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-20 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-position" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#choose-position" />
+		<link rel="match" href="bottom-applies-to-001-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'position' property applies to elements with a display of 'table-row-group'." />
+        <style type="text/css">
+			body {margin: 8px;}
+            #test
+            {
+                bottom: 0;
+                display: table-row-group;
+                position: absolute;
+            }
+            #table
+            {
+                display: table;
+                table-layout: fixed;
+            }
+            #row
+            {
+                display: table-row;
+            }
+            #cell
+            {
+                background: green;
+                display: table-cell;
+                height: 100px;
+                width: 100px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a filled green square at the bottom of the page.</p>
+        <div id="table">
+            <div id="test">
+                <div id="row">
+                    <div id="cell"></div>
+                </div>
+            </div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-applies-to-002.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-applies-to-002.xht
new file mode 100644
index 0000000..e3ee7bdc
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-applies-to-002.xht
@@ -0,0 +1,50 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Position applied to element with 'display' set to 'table-header-group'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-20 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-position" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#choose-position" />
+		<link rel="match" href="bottom-applies-to-001-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'position' property applies to elements with a display of 'table-header-group'." />
+        <style type="text/css">
+			body {margin: 8px;}
+            #test
+            {
+                background: green;
+                bottom: 0;
+                display: table-header-group;
+                position: absolute;
+            }
+            #table
+            {
+                display: table;
+                table-layout: fixed;
+            }
+            #row
+            {
+                display: table-row;
+            }
+            #cell
+            {
+                display: table-cell;
+                height: 100px;
+                width: 100px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a filled green square at the bottom of the page.</p>
+        <div id="table">
+            <div id="test">
+                <div id="row">
+                    <div id="cell"></div>
+                </div>
+            </div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-applies-to-003.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-applies-to-003.xht
new file mode 100644
index 0000000..4ee33d6c4
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-applies-to-003.xht
@@ -0,0 +1,50 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Position applied to element with 'display' set to 'table-footer-group'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-20 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-position" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#choose-position" />
+		<link rel="match" href="bottom-applies-to-001-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'position' property applies to elements with a display of 'table-footer-group'." />
+        <style type="text/css">
+			body {margin: 8px;}
+            #test
+            {
+                background: green;
+                bottom: 0;
+                display: table-footer-group;
+                position: absolute;
+            }
+            #table
+            {
+                display: table;
+                table-layout: fixed;
+            }
+            #row
+            {
+                display: table-row;
+            }
+            #cell
+            {
+                display: table-cell;
+                height: 100px;
+                width: 100px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a filled green square at the bottom of the page.</p>
+        <div id="table">
+            <div id="test">
+                <div id="row">
+                    <div id="cell"></div>
+                </div>
+            </div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-applies-to-004.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-applies-to-004.xht
new file mode 100644
index 0000000..b82b8ae3
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-applies-to-004.xht
@@ -0,0 +1,44 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Position applied to element with 'display' set to 'table-row'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-20 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-position" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#choose-position" />
+		<link rel="match" href="bottom-applies-to-001-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'position' property applies to elements with a display of 'table-row'." />
+        <style type="text/css">
+			body {margin: 8px;}
+            #test
+            {
+                background: green;
+                bottom: 0;
+                display: table-row;
+                position: absolute;
+            }
+            #table
+            {
+                display: table;
+                table-layout: fixed;
+            }
+            #cell
+            {
+                display: table-cell;
+                height: 100px;
+                width: 100px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a filled green square at the bottom of the page.</p>
+        <div id="table">
+            <div id="test">
+                <div id="cell"></div>
+            </div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-applies-to-005.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-applies-to-005.xht
new file mode 100644
index 0000000..cb29724d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-applies-to-005.xht
@@ -0,0 +1,49 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Position applied to element with 'display' set to 'table-column-group'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-20 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-position" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#choose-position" />
+		<link rel="match" href="bottom-applies-to-001-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'position' property applies to elements with a display of 'table-column-group'." />
+        <style type="text/css">
+			body {margin: 8px;}
+            #test
+            {
+                background: green;
+                bottom: 0;
+                display: table-column-group;
+                height: 100px;
+                position: absolute;
+                width: 100px;
+            }
+            #table
+            {
+                display: table;
+                table-layout: fixed;
+            }
+            #row
+            {
+                display: table-row;
+            }
+            #cell
+            {
+                display: table-cell;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a filled green square at the bottom of the page.</p>
+        <div id="table">
+            <div id="test"></div>
+            <div id="row">
+                <div id="cell"></div>
+            </div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-applies-to-006.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-applies-to-006.xht
new file mode 100644
index 0000000..7944b42
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-applies-to-006.xht
@@ -0,0 +1,49 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Position applied to element with 'display' set to 'table-column'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-20 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-position" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#choose-position" />
+		<link rel="match" href="bottom-applies-to-001-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'position' property applies to elements with a display of 'table-column'." />
+        <style type="text/css">
+			body {margin: 8px;}
+            #test
+            {
+                background: green;
+                bottom: 0;
+                display: table-column;
+                height: 100px;
+                position: absolute;
+                width: 100px;
+            }
+            #table
+            {
+                display: table;
+                table-layout: fixed;
+            }
+            #row
+            {
+                display: table-row;
+            }
+            #cell
+            {
+                display: table-cell;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a filled green square at the bottom of the page.</p>
+        <div id="table">
+            <div id="test"></div>
+            <div id="row">
+                <div id="cell"></div>
+            </div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-applies-to-007.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-applies-to-007.xht
new file mode 100644
index 0000000..b6a9336
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-applies-to-007.xht
@@ -0,0 +1,44 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Position applied to element with 'display' set to 'table-cell'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-20 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-position" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#choose-position" />
+		<link rel="match" href="bottom-applies-to-001-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'position' property applies to elements with a display of 'table-cell'." />
+        <style type="text/css">
+			body {margin: 8px;}
+            #table
+            {
+                display: table;
+                table-layout: fixed;
+            }
+            #row
+            {
+                display: table-row;
+            }
+            #cell
+            {
+                background: green;
+                bottom: 0;
+                display: table-cell;
+                height: 100px;
+                position: absolute;
+                width: 100px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a filled green square at the bottom of the page.</p>
+        <div id="table">
+            <div id="row">
+                <div id="cell"></div>
+            </div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-applies-to-008.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-applies-to-008.xht
new file mode 100644
index 0000000..c2d84bc9
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-applies-to-008.xht
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Position applied to element with 'display' set to inline</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-20 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-position" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#choose-position" />
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'position' property applies to elements with a display of inline." />
+        <style type="text/css">
+            div
+            {
+                background: green;
+                bottom: 0;
+                display: inline;
+                position: absolute;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a green stripe at the bottom of the page.</p>
+        <div>Filler Text</div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-applies-to-009.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-applies-to-009.xht
new file mode 100644
index 0000000..5830d1e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-applies-to-009.xht
@@ -0,0 +1,33 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Position applied to element with 'display' set to block</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-20 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-position" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#choose-position" />
+		<link rel="match" href="bottom-applies-to-001-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'position' property applies to elements with a display of block." />
+        <style type="text/css">
+			body {margin: 8px;}
+            span
+            {
+                background: green;
+                bottom: 0;
+                display: block;
+                height: 100px;
+                position: absolute;
+                width: 100px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a filled green square at the bottom of the page.</p>
+        <div>
+            <span></span>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-applies-to-010.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-applies-to-010.xht
new file mode 100644
index 0000000..dd106a4
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-applies-to-010.xht
@@ -0,0 +1,32 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Position applied to element with 'display' set to list-item</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-20 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-position" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#choose-position" />
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'position' property applies to elements with a display of list-item." />
+        <style type="text/css">
+            body
+            {
+                margin-left: 1em;
+            }
+            div
+            {
+                background: green;
+                bottom: 0;
+                display: list-item;
+                height: 1in;
+                position: absolute;
+                width: 1in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a filled green square at the bottom of the page and a marker bullet on its left-hand side.</p>
+        <div></div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-applies-to-012.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-applies-to-012.xht
new file mode 100644
index 0000000..b9f5cca
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-applies-to-012.xht
@@ -0,0 +1,42 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Position applied to element with 'display' set to inline-block</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-20 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-position" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#choose-position" />
+		<link rel="match" href="bottom-applies-to-001-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'position' property applies to elements with a display of inline-block." />
+        <style type="text/css">
+			body {margin: 8px;}
+
+            span#inline-block
+            {
+                background: green;
+                bottom: 0;
+                display: inline-block;
+                position: absolute;
+            }
+
+			span.block-descendant
+			{
+				display: block;
+                height: 50px;
+                width: 100px;
+			}
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a filled green square at the bottom of the page.</p>
+        <div>
+	        <span id="inline-block">
+				<span class="block-descendant"></span>
+				<span class="block-descendant"></span>
+        	</span>
+        </div>
+    </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-applies-to-013.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-applies-to-013.xht
new file mode 100644
index 0000000..2a880ee6
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-applies-to-013.xht
@@ -0,0 +1,44 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Position applied to element with 'display' set to 'table'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-20 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-position" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#choose-position" />
+		<link rel="match" href="bottom-applies-to-001-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'position' property applies to elements with a display of 'table'." />
+        <style type="text/css">
+			body {margin: 8px;}
+            #table
+            {
+                background: green;
+                bottom: 0;
+                display: table;
+                table-layout: fixed;
+                height: 100px;
+                position: absolute;
+                width: 100px;
+            }
+            #row
+            {
+                display: table-row;
+            }
+            #cell
+            {
+                display: table-cell;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a filled green square at the bottom of the page.</p>
+        <div id="table">
+            <div id="row">
+                <div id="cell"></div>
+            </div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-applies-to-014.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-applies-to-014.xht
new file mode 100644
index 0000000..93726ec
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-applies-to-014.xht
@@ -0,0 +1,44 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Position applied to element with 'display' set to 'inline-table'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-20 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-position" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#choose-position" />
+		<link rel="match" href="bottom-applies-to-001-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'position' property applies to elements with a display of 'inline-table'." />
+        <style type="text/css">
+			body {margin: 8px;}
+            #table
+            {
+                background: green;
+                bottom: 0;
+                display: inline-table;
+                table-layout: fixed;
+                height: 100px;
+                position: absolute;
+                width: 100px;
+            }
+            #row
+            {
+                display: table-row;
+            }
+            #cell
+            {
+                display: table-cell;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a filled green square at the bottom of the page.</p>
+        <div id="table">
+            <div id="row">
+                <div id="cell"></div>
+            </div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-applies-to-015.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-applies-to-015.xht
new file mode 100644
index 0000000..903a6c3
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-applies-to-015.xht
@@ -0,0 +1,48 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Position applied to element with 'display' set to 'table-caption'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-20 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-position" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#choose-position" />
+		<link rel="match" href="bottom-applies-to-001-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'position' property applies to elements with a display of 'table-caption'." />
+        <style type="text/css">
+			body {margin: 8px;}
+            #caption
+            {
+                background: green;
+                bottom: 0;
+                display: table-caption;
+                height: 100px;
+                position: absolute;
+                width: 100px;
+            }
+            #table
+            {
+                display: table;
+            }
+            #row
+            {
+                display: table-row;
+            }
+            #cell
+            {
+                display: table-cell;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a filled green square at the bottom of the page.</p>
+        <div id="table">
+            <div id="caption"></div>
+            <div id="row">
+                <div id="cell"></div>
+            </div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-fixed-001.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-fixed-001.xht
new file mode 100644
index 0000000..a8f5c095
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-fixed-001.xht
@@ -0,0 +1,41 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Fixed position elements impact on later siblings</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-07-09 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-position" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#choose-position" />
+		<link rel="match" href="../reference/ref-filled-green-100px-square.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="Fixed positioned elements do not impact later siblings." />
+        <style type="text/css">
+            #div1
+            {
+                position: relative;
+            }
+            #div2, #div3
+            {
+                height: 100px;
+                width: 100px;
+            }
+            #div2
+            {
+                background: green;
+                position: fixed;
+            }
+            #div3
+            {
+                background: red;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
+        <div id="div1">
+            <div id="div2"></div>
+            <div id="div3"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-fixed-002.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-fixed-002.xht
new file mode 100644
index 0000000..53ac15d7
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-fixed-002.xht
@@ -0,0 +1,36 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Position fixed size and positioning</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-20 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-position" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#choose-position" />
+        <meta name="flags" content="" />
+        <meta name="assert" content="Fixed positioned elements can be sized and positioned using 'top', 'right', 'bottom' and 'left' properties." />
+        <style type="text/css">
+            #div1
+            {
+                background: blue;
+                height: 2in;
+                position: relative;
+                width: 2in;
+            }
+            div div
+            {
+                background: orange;
+                bottom: 0;
+                left: 1in;
+                position: fixed;
+                right: 0;
+                top: 1in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a large orange rectangle that covers the bottom-right corner of a blue square and continues to the right side and the bottom of the page.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-fixed-003.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-fixed-003.xht
new file mode 100644
index 0000000..a9857753
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-fixed-003.xht
@@ -0,0 +1,34 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Position fixed on different media types</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-20 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-position" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#choose-position" />
+        <meta name="flags" content="interact" />
+        <meta name="assert" content="Elements that are set to 'position: fixed' are fixed with respect to the viewport." />
+        <style type="text/css">
+            #filler
+            {
+                height: 6000px;
+                margin: 10px;
+            }
+            @media handheld, projection, screen, tty, tv
+            {
+                #div1
+                {
+                    background: blue;
+                    height: 1.5em;
+                    position: fixed;
+                    top: 3em;
+                }
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if the blue stripe does not move when the page is scrolled.</p>
+        <div id="div1">Filler Text</div>
+        <div id="filler"></div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-fixed-004.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-fixed-004.xht
new file mode 100644
index 0000000..43fb1bc
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-fixed-004.xht
@@ -0,0 +1,41 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Position fixed and print media</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-20 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-position" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#choose-position" />
+        <meta name="flags" content="paged" />
+        <meta name="assert" content="Fixed position elements are positioned with respect to the page box when printed." />
+        <style type="text/css">
+            html, body
+            {
+                height: 100%;
+            }
+            #filler
+            {
+                height: 400%;
+                margin: 10px;
+            }
+            @media print
+            {
+                #div1
+                {
+                    position: fixed;
+                    top: 50px;
+                }
+                #prerequisite
+                {
+                    display: none;
+                }
+            }
+        </style>
+    </head>
+    <body>
+        <p id="prerequisite">PREREQUISITE: Switch to print preview or a paged view.</p>
+        <p>Test passes if the "Filler Text" is on all five pages when paginated or printed.</p>
+        <div id="div1">Filler Text</div>
+        <div id="filler"></div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-fixed-005.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-fixed-005.xht
new file mode 100644
index 0000000..de52aeeb
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-fixed-005.xht
@@ -0,0 +1,54 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Pagination of fixed positioned elements</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-position" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#choose-position" />
+        <meta name="flags" content="paged" />
+        <meta name="assert" content="Fixed position elements cannot be paginated." />
+        <style type="text/css">
+            @media print
+            {
+                #prerequisite
+                {
+                    display: none;
+                }
+            }
+            html, body
+            {
+                height: 100%;
+                margin: 0;
+                padding: 0;
+            }
+            p
+            {
+                margin: 0;
+                padding: 1em 0 0 1em;
+            }
+            #fixed
+            {
+                height: 100%;
+                position: fixed;
+                top: 5em;
+            }
+            #spacer
+            {
+                height: 100%;
+            }
+            span
+            {
+                color: red;
+                text-decoration: underline;
+            }
+        </style>
+    </head>
+    <body>
+        <p id="prerequisite">PREREQUISITE: Switch to print preview or a paged view.</p>
+        <p>Test passes if there is only one page and there is no red underlined text visible when paginated or printed.</p>
+        <div id="fixed">
+            <div id="spacer"></div>
+            <span>Test fails if this line of text is visible when the page is paginated or printed.</span>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-fixed-006.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-fixed-006.xht
new file mode 100644
index 0000000..e9c73c38
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-fixed-006.xht
@@ -0,0 +1,24 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html id="test" xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Non-static position on the root element</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-position" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#choose-position" />
+        <meta name="flags" content="dom may" />
+        <meta name="assert" content="Root elements may treat non-static positions as 'static'." />
+        <style type="text/css">
+            html
+            {
+                position: fixed;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if the word "fixed" or "static" is below this text.</p>
+        <script type="text/javascript">
+            var el = document.getElementById('test');
+            document.body.appendChild(document.createTextNode(window.getComputedStyle(el, null).position));
+        </script>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-fixed-007-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-fixed-007-ref.xht
new file mode 100644
index 0000000..fa6eb25
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-fixed-007-ref.xht
@@ -0,0 +1,36 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  body
+  {
+  margin-left: 0px;
+  margin-top: 0px;
+  }
+
+  p
+  {
+  margin-left: 8px;
+  margin-top: 0px;
+  }
+
+  img {vertical-align: top;}
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <div><img src="support/black15x15.png" width="96" height="96" alt="Image download support must be enabled" /></div>
+
+  <p>Test passes if there is a black square in the upper-left corner of the page.</p>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-fixed-007.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-fixed-007.xht
new file mode 100644
index 0000000..8803016
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-fixed-007.xht
@@ -0,0 +1,34 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Float is computed to 'none' when element is fixed positioned</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-20 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#absolute-positioning" />
+		<link rel="match" href="position-fixed-007-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="Float is computed to 'none' when 'position: fixed' is applied." />
+        <style type="text/css">
+            p
+            {
+                margin-top: 1in;
+            }
+
+            div
+            {
+                background: black;
+                float: right;
+                height: 1in;
+                position: fixed;
+                top: 0;
+                left: 0;
+                width: 1in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a black square in the upper-left corner of the page.</p>
+        <div></div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-001-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-001-ref.xht
new file mode 100644
index 0000000..3f1762af
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-001-ref.xht
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+ </head>
+
+ <body>
+
+  <p>Test passes if the letters below are all on the same line and they are in alphabetical order.</p>
+
+  <div>a b c d</div>
+
+ </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-001.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-001.xht
new file mode 100644
index 0000000..8c56f57
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-001.xht
@@ -0,0 +1,29 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Relative positioning and normal flow</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-22 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-position" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#choose-position" />
+		<link rel="match" href="position-relative-001-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="Relatively positioned elements lay out in normal flow." />
+        <style type="text/css">
+            #span1, #span2
+            {
+                position: relative;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if the letters below are all on the same line and they are in alphabetical order.</p>
+        <div>
+            <span id="span1">a</span>
+            <span>b</span>
+            <span id="span2">c</span>
+            <span>d</span>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-002.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-002.xht
new file mode 100644
index 0000000..11fe1713
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-002.xht
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Elements following relatively positioned elements</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-22 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#relative-positioning" />
+        <meta name="flags" content="" />
+        <meta name="assert" content="Element following relatively positioned element show up in normal flow as if the relatively positioned element were not offset." />
+        <style type="text/css">
+			body {line-height: 1.25;}
+
+            #div1
+            {
+                background: blue;
+                height: 2px;
+                left: 0;
+                position: relative;
+                top: 24px;
+                width: 200px;
+            }
+            #span1
+            {
+                position: relative;
+                top: 25px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if the letter "a" is below the blue line and the letter "b" is above the blue line.</p>
+        <div>
+            <div id="div1"></div>
+            <span id="span1">a</span>
+            <span>b</span>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-003-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-003-ref.xht
new file mode 100644
index 0000000..0bc7193
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-003-ref.xht
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div
+  {
+  border: black solid 3px;
+  width: 5in;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if "Filler Text" is aligned to the left side of the box.</p>
+
+  <div>Filler Text</div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-003.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-003.xht
new file mode 100644
index 0000000..d5f9e57be
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-003.xht
@@ -0,0 +1,32 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Relative positioning with auto</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-07-09 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#relative-positioning" />
+		<link rel="match" href="position-relative-003-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The position of a relatively positioned element with left and right set to auto the values compute to zero." />
+        <style type="text/css">
+            div
+            {
+                border: solid 3px;
+                width: 5in;
+            }
+            span
+            {
+                position: relative;
+                left: auto;
+                right: auto;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if "Filler Text" is aligned to the left side of the box.</p>
+        <div>
+            <span>Filler Text</span>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-004-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-004-ref.xht
new file mode 100644
index 0000000..eae8deba
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-004-ref.xht
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  img {vertical-align: top;}
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if 3 filled squares have the same size and if the yellow square is on the right-hand side of the orange square.</p>
+
+  <div><img src="support/swatch-orange.png" width="96" height="96" alt="Image download support must be enabled" /><img src="support/swatch-yellow.png" width="96" height="96" alt="Image download support must be enabled" /></div>
+
+  <div><img src="support/swatch-white.png" width="96" height="96" alt="Image download support must be enabled" /><img src="support/swatch-blue.png" width="96" height="96" alt="Image download support must be enabled" /></div>
+
+ </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-004.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-004.xht
new file mode 100644
index 0000000..24671226
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-004.xht
@@ -0,0 +1,43 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Relative positioning dimensions</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-22 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#relative-positioning" />
+		<link rel="match" href="position-relative-004-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="Relative positioning with left or right does not change size of a box." />
+        <style type="text/css">
+            div
+            {
+                height: 1in;
+                width: 1in;
+            }
+            #div1
+            {
+                background: orange;
+                position: absolute;
+            }
+            #div2
+            {
+                background: yellow;
+                left: 1in;
+                position: relative;
+            }
+            #div3
+            {
+                background: blue;
+                position: relative;
+                right: -1in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if 3 filled squares have the same size and if the yellow square is on the right-hand side of the orange square.</p>
+        <div id="div1"></div>
+        <div id="div2"></div>
+        <div id="div3"></div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-005-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-005-ref.xht
new file mode 100644
index 0000000..c6a17433
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-005-ref.xht
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+ </head>
+
+ <body>
+
+  <p>Test passes if a blue square is on the right-hand side of an orange square.</p>
+
+  <div><img src="support/swatch-orange.png" width="96" height="96" alt="Image download support must be enabled" /><img src="support/blue15x15.png" width="96" height="96" alt="Image download support must be enabled" /></div>
+
+ </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-005.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-005.xht
new file mode 100644
index 0000000..d79fb8fd
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-005.xht
@@ -0,0 +1,35 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Relative positioning with left</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#relative-positioning" />
+		<link rel="match" href="position-relative-005-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="Relatively positioned element with the left specified offsets the element from the left of the containing block." />
+        <style type="text/css">
+            div
+            {
+                height: 1in;
+                width: 1in;
+            }
+            #div1
+            {
+                background: orange;
+                position: absolute;
+            }
+            #div2
+            {
+                background: blue;
+                left: 1in;
+                position: relative;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if a blue square is on the right-hand side of an orange square.</p>
+        <div id="div1"></div>
+        <div id="div2"></div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-006.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-006.xht
new file mode 100644
index 0000000..8d3ebcd
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-006.xht
@@ -0,0 +1,41 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Relative positioning with right</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#relative-positioning" />
+		<link rel="match" href="position-relative-005-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="Relatively positioned element with the right specified offsets the element from the right of the containing block." />
+        <style type="text/css">
+            div
+            {
+                width: 2in;
+            }
+            span
+            {
+                display: block;
+                height: 1in;
+                width: 1in;
+            }
+            #span1
+            {
+                background: orange;
+            }
+            #span2
+            {
+                background: blue;
+                position: relative;
+                right: -1in;
+                top: -1in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if a blue square is on the right-hand side of an orange square.</p>
+        <div>
+            <span id="span1"></span><span id="span2"></span>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-007.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-007.xht
new file mode 100644
index 0000000..c9bf236
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-007.xht
@@ -0,0 +1,42 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Relative positioning with 'left' set and 'right' 'auto'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#relative-positioning" />
+		<link rel="match" href="position-relative-005-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="Relatively positioned element with 'left' set to 'auto' and 'right' set to a value appears at expected offset." />
+        <style type="text/css">
+            div
+            {
+                height: 1in;
+                width: 1in;
+            }
+            #div1
+            {
+                margin-left: 1in;
+            }
+            #div2
+            {
+                background: blue;
+            }
+            #div3
+            {
+                background: orange;
+                position: relative;
+                left: auto;
+                right: 1in;
+                top: -1in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if a blue square is on the right-hand side of an orange square.</p>
+        <div id="div1">
+            <div id="div2"></div>
+            <div id="div3"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-008.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-008.xht
new file mode 100644
index 0000000..c8733649
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-008.xht
@@ -0,0 +1,41 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Relative positioning with 'right' set and 'left' 'auto'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#relative-positioning" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="If 'right' offset of a relatively positioned box is specified as 'auto', then its computed value is minus the value of 'left' offset. A relatively positioned box with 'left' set to a value moves the box to the left by the value of 'right'." />
+        <style type="text/css">
+            div
+            {
+                height: 1in;
+                width: 1in;
+            }
+            #div1
+            {
+                margin-left: 1in;
+            }
+            #div2
+            {
+                background: orange;
+            }
+            #div3
+            {
+                background: blue;
+                position: relative;
+                left: 1in;
+                right: auto;
+                top: -1in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if a blue square is on the right-hand side of an orange square.</p>
+        <div id="div1">
+            <div id="div2"></div>
+            <div id="div3"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-009.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-009.xht
new file mode 100644
index 0000000..30c188b
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-009.xht
@@ -0,0 +1,38 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Over-constrained situation with position 'left' property</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-22 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#relative-positioning" />
+		<link rel="match" href="position-relative-005-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="If the 'direction' property of the containing block is 'ltr', the value of 'left' wins and 'right' becomes negative 'left'." />
+        <style type="text/css">
+			body {direction: ltr;}
+            div
+            {
+                height: 1in;
+                width: 1in;
+            }
+            #div1
+            {
+                background: orange;
+            }
+            #div2
+            {
+                background: blue;
+                left: 1in;
+                position: relative;
+                right: 1in;
+                top: -1in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if a blue square is on the right-hand side of an orange square.</p>
+        <div id="div1"></div>
+        <div id="div2"></div>
+    </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-010.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-010.xht
new file mode 100644
index 0000000..c16ebd6
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-010.xht
@@ -0,0 +1,36 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Over-constrained situation with position 'right' property</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-22 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#relative-positioning" />
+		<link rel="match" href="position-relative-005-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="If the 'direction' property of the containing block is 'rtl', the value of 'right' wins and 'left' becomes negative 'right'." />
+        <style type="text/css">
+            #div1
+            {
+                background: blue;
+                direction: rtl;
+                width: 2in;
+            }
+            div div
+            {
+                background: orange;
+                height: 1in;
+                left: 1in;
+                position: relative;
+                right: 1in;
+                width: 1in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if a blue square is on the right-hand side of an orange square.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-013.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-013.xht
new file mode 100644
index 0000000..d89849e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-013.xht
@@ -0,0 +1,43 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Relative positioning with top and bottom do not change element dimensions</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-07-09 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#relative-positioning" title="9.4.3 Relative positioning" />
+		<link rel="match" href="../reference/ref-filled-green-100px-square.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="Relatively positioned element dimensions are not changed with top/bottom applied. If 'top' is 'auto' and if 'bottom' is '100px', then top's used value becomes the negative of bottom. If both 'top' and 'bottom' are specified (like for #div3 in this test), then 'bottom' is ignored and the used value of 'bottom' becomes minus the value of 'top')." />
+        <style type="text/css">
+            div
+            {
+                height: 100px;
+                position: relative;
+                width: 100px;
+            }
+            #div1
+            {
+                background-color: red;
+            }
+            #div2
+            {
+                background-color: red;
+                bottom: 100px;
+                top: auto;
+            }
+            #div3
+            {
+                background-color: green;
+                bottom: 0px;
+                top: -200px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
+        <div id="div1"></div>
+        <div id="div2"></div>
+        <div id="div3"></div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-014-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-014-ref.xht
new file mode 100644
index 0000000..556121d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-014-ref.xht
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  img {vertical-align: top;}
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if a blue square is directly below an orange square.</p>
+
+  <div><img src="support/swatch-orange.png" width="96" height="96" alt="Image download support must be enabled" /></div>
+
+  <div><img src="support/swatch-blue.png" width="96" height="96" alt="Image download support must be enabled" /></div>
+
+ </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-014.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-014.xht
new file mode 100644
index 0000000..83bb996
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-014.xht
@@ -0,0 +1,36 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Relative positioning with top</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-22 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#relative-positioning" />
+		<link rel="match" href="position-relative-014-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="Relatively positioned element dimensions are not changed with top applied." />
+        <style type="text/css">
+            div
+            {
+                height: 1in;
+                width: 1in;
+            }
+            #div1
+            {
+                background: orange;
+                position: absolute;
+            }
+            #div2
+            {
+                background: blue;
+                position: relative;
+                top: 1in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if a blue square is directly below an orange square.</p>
+        <div id="div1"></div>
+        <div id="div2"></div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-015.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-015.xht
new file mode 100644
index 0000000..649c6bd
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-015.xht
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Relative positioning with bottom</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-22 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#relative-positioning" />
+		<link rel="match" href="position-relative-014-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="Relatively positioned element dimensions are not changed with bottom applied." />
+        <style type="text/css">
+            div
+            {
+                height: 1in;
+                width: 1in;
+            }
+            #div1
+            {
+                background: blue;
+                position: relative;
+                top: 1in;
+            }
+            #div2
+            {
+                background: orange;
+                bottom: 1in;
+                position: relative;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if a blue square is directly below an orange square.</p>
+        <div id="div1"></div>
+        <div id="div2"></div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-016-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-016-ref.xht
new file mode 100644
index 0000000..7597515
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-016-ref.xht
@@ -0,0 +1,24 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div {padding-top: 98px;}
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if there is <strong>no red</strong>.</p>
+
+  <div><img src="support/swatch-green.png" width="96" height="96" alt="Image download support must be enabled" /></div>
+
+ </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-016.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-016.xht
new file mode 100644
index 0000000..eebe000
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-016.xht
@@ -0,0 +1,51 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Relative positioning and computed top/bottom values</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-22 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#relative-positioning" />
+		<link rel="match" href="position-relative-016-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="Used value of top equals negative bottom when top is auto and bottom is given. (Computed value of top remains auto.)" />
+        <style type="text/css">
+            div
+            {
+                height: 1in;
+                width: 1in;
+            }
+            #div0
+            {
+                border: 1px solid transparent;
+                height: 0;
+            }
+            #div1
+            {
+                position: absolute;
+                background: red;
+                margin-top: 1in;
+            }
+            #div2
+            {
+                bottom: -1in;
+                position: relative;
+                top: auto;
+            }
+            #div3
+            {
+                background: green;
+                position: relative;
+                top: inherit;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="div0"></div>
+        <div id="div1"></div>
+        <div id="div2">
+            <div id="div3"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-017.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-017.xht
new file mode 100644
index 0000000..63abab6
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-017.xht
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Relative positioning and computed 'top'/'bottom' set to 'auto'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#relative-positioning" />
+		<link rel="match" href="position-relative-014-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="Computed values are zero when both 'top' and 'bottom' are set to 'auto'." />
+        <style type="text/css">
+            div
+            {
+                height: 1in;
+                width: 1in;
+            }
+            #div1
+            {
+                background: blue;
+                height: 2in;
+            }
+            div div
+            {
+                background: orange;
+                position: relative;
+                top: auto;
+                bottom: auto;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if a blue square is directly below an orange square.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-018-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-018-ref.xht
new file mode 100644
index 0000000..b181e5ad
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-018-ref.xht
@@ -0,0 +1,30 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div
+  {
+  background-color: black;
+  height: 96px;
+  margin-top: 112px;
+  width: 96px;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if there is only one filled black square.</p>
+
+  <div></div>
+
+ </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-018.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-018.xht
new file mode 100644
index 0000000..2e9da18
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-018.xht
@@ -0,0 +1,45 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Relative positioning and computed values when 'bottom' is set to 'auto'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#relative-positioning" />
+		<link rel="match" href="position-relative-018-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="Computed value of 'bottom' set to 'auto' is equal to negative 'top'." />
+        <style type="text/css">
+            .parent
+            {
+                width: 0.5in;
+                float: left;
+            }
+            div div
+            {
+                background: black;
+                height: 1in;
+                position: relative;
+                width: 0.5in;
+            }
+            #div1
+            {
+                bottom: auto;
+                top: 1in;
+            }
+            #div2
+            {
+                bottom: -1in;
+                top: auto;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is only one filled black square.</p>
+        <div class="parent">
+            <div id="div1"></div>
+        </div>
+        <div class="parent">
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-019.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-019.xht
new file mode 100644
index 0000000..955efce0
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-019.xht
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Relative positioning 'bottom' ignored if 'top' and 'bottom' are both not 'auto'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-22 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#relative-positioning" />
+		<link rel="match" href="position-relative-014-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'bottom' value is ignored if neither 'top' or 'bottom' is 'auto'." />
+        <style type="text/css">
+            div
+            {
+                height: 1in;
+                width: 1in;
+            }
+            #div1
+            {
+                background: orange;
+                position: absolute;
+            }
+            #div2
+            {
+                background: blue;
+                bottom: 3in;
+                position: relative;
+                top: 1in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if a blue square is directly below an orange square.</p>
+        <div id="div1"></div>
+        <div id="div2"></div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-020.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-020.xht
new file mode 100644
index 0000000..4f325710
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-020.xht
@@ -0,0 +1,33 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Relative positioning and overflow: auto</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#relative-positioning" />
+        <meta name="flags" content="interact" />
+        <meta name="assert" content="If relative positioning causes overflow the user agent needs to provide a scrolling mechanism to all of the content at its offset position." />
+        <style type="text/css">
+            #div1
+            {
+                height: 1.5in;
+                position: relative;
+                overflow: auto;
+                width: 1.5in;
+            }
+             div div
+            {
+                border: solid blue 5px;
+                height: 1in;
+                position: relative;
+                top: 1in;
+                width: 1in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if, after scrolling down, all four edges of a blue square are visible.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-021.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-021.xht
new file mode 100644
index 0000000..a088755
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-021.xht
@@ -0,0 +1,33 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Relative positioning and overflow: scroll</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#relative-positioning" />
+        <meta name="flags" content="interact" />
+        <meta name="assert" content="If relative positioning causes overflow the user agent needs to provide a scrolling mechanism to all of the content at its offset position." />
+        <style type="text/css">
+            #div1
+            {
+                height: 1.5in;
+                position: relative;
+                overflow: scroll;
+                width: 1.5in;
+            }
+             div div
+            {
+                border: solid blue 5px;
+                height: 1in;
+                position: relative;
+                top: 1in;
+                width: 1in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if, after scrolling down, all four edges of a blue square are visible.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-022.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-022.xht
new file mode 100644
index 0000000..a69ed39
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-022.xht
@@ -0,0 +1,45 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Test: Relative positioning and overflow: auto</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+  <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#relative-positioning" />
+
+  <meta name="flags" content="interact" />
+  <meta name="assert" content="If relative positioning causes overflow to an containing ancestor, then the user agent needs to provide a scrolling mechanism to all of the content at its offset position. In this test, div#taller-and-wider-rel-pos generates a 1.75in wide by 1.75in tall box." />
+
+  <style type="text/css"><![CDATA[
+  div#containing-ancestor
+  {
+  height: 1.5in;
+  overflow: auto;
+  width: 1.5in;
+  }
+
+  div#taller-and-wider-rel-pos
+  {
+  border: blue solid 5px;
+  height: 1in;
+  left: 0.75in;
+  position: relative;
+  top: 0.75in;
+  width: 1in;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if, after scrolling down and to the right, all four edges of a blue square are visible.</p>
+
+  <div id="containing-ancestor">
+      <div id="taller-and-wider-rel-pos"></div>
+  </div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-027-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-027-ref.xht
new file mode 100644
index 0000000..0e7c1d6
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-027-ref.xht
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+ </head>
+
+ <body>
+
+  <p>Test passes if the 3 "Filler Text" are on the same line.</p>
+
+  <div>Filler Text Filler Text Filler Text</div>
+
+ </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-027.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-027.xht
new file mode 100644
index 0000000..51b8db5
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-027.xht
@@ -0,0 +1,45 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Relatively positioned elements with auto positioning with anonymous boxes before and after</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-07-09 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#relative-positioning" />
+		<link rel="match" href="position-relative-027-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="Relatively positioned element with auto positioning appear as though they were positioned in flow." />
+		<!--
+		"
+		If both 'left' and 'right' are 'auto' (their initial values),
+		[then] the[ir] used values are '0' (i.e., the boxes stay
+		in their original position).
+		(...)
+		If both [top and bottom] are 'auto', [then] their used values are both '0'.
+		"
+		http://www.w3.org/TR/CSS21/visuren.html#relative-positioning
+		-->
+
+        <style type="text/css">
+            div
+            {
+                width: 5in;
+            }
+            span
+            {
+				 bottom: auto;
+                 left: auto;
+                 position: relative;
+                 right: auto;
+                 top: auto;
+
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if the 3 "Filler Text" are on the same line.</p>
+        <div>
+            Filler Text <span>Filler Text</span> Filler Text
+        </div>
+    </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-028-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-028-ref.xht
new file mode 100644
index 0000000..389f2f7
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-028-ref.xht
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+ </head>
+
+ <body>
+
+  <p>Test passes if the 2 "Filler Text" are on the same line.</p>
+
+  <div>Filler Text Filler Text</div>
+
+ </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-028.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-028.xht
new file mode 100644
index 0000000..1d2dac86
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-028.xht
@@ -0,0 +1,29 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Relatively positioned elements with auto positioning with anonymous boxes after</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-22 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#comp-relpos" />
+		<link rel="match" href="position-relative-028-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="Relatively positioned element with auto positioning appear as though they were positioned in flow." />
+        <style type="text/css">
+            div
+            {
+                width: 5in;
+            }
+            span
+            {
+                position: relative;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if the 2 "Filler Text" are on the same line.</p>
+        <div>
+            <span>Filler Text</span> Filler Text
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-029.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-029.xht
new file mode 100644
index 0000000..3f3bc90
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-029.xht
@@ -0,0 +1,29 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Relatively positioned elements with auto positioning with inline box after</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-22 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#comp-relpos" />
+		<link rel="match" href="position-relative-028-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="Relatively positioned element with auto positioning appear as though they were positioned in flow." />
+        <style type="text/css">
+            div
+            {
+                width: 5in
+            }
+            #span1
+            {
+                position: relative;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if the 2 "Filler Text" are on the same line.</p>
+        <div>
+            <span id="span1">Filler Text</span><span> Filler Text</span>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-030-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-030-ref.xht
new file mode 100644
index 0000000..22fceb8c
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-030-ref.xht
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+ </head>
+
+ <body>
+
+  <p>Test passes if the 4 "Filler Text" are on the same line.</p>
+
+  <div>Filler Text Filler Text Filler Text Filler Text</div>
+
+ </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-030.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-030.xht
new file mode 100644
index 0000000..aec1703
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-030.xht
@@ -0,0 +1,29 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Relatively positioned elements with auto positioning with anonymous boxes before and after with trailing inline</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-22 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#comp-relpos" />
+		<link rel="match" href="position-relative-030-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="Relatively positioned element with auto positioning appear as though they were positioned in flow." />
+        <style type="text/css">
+            div
+            {
+                width: 5in;
+            }
+            #span1
+            {
+                position: relative;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if the 4 "Filler Text" are on the same line.</p>
+        <div>
+            Filler Text <span id="span1">Filler Text</span> Filler Text<span> Filler Text</span>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-031-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-031-ref.xht
new file mode 100644
index 0000000..8e5300f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-031-ref.xht
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+ </head>
+
+ <body>
+
+  <p>Test passes if the 5 "Filler Text" are on the same line.</p>
+
+  <div>Filler Text Filler Text Filler Text Filler Text Filler Text</div>
+
+ </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-031.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-031.xht
new file mode 100644
index 0000000..235260ba
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-031.xht
@@ -0,0 +1,29 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Relatively positioned elements with auto positioning with an inline element before, anonymous boxes, and inline boxes after</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-22 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#comp-relpos" />
+		<link rel="match" href="position-relative-031-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="Relatively positioned element with auto positioning render as though they were positioned in flow." />
+        <style type="text/css">
+            div
+            {
+                width: 5in;
+            }
+            #span1
+            {
+                position: relative;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if the 5 "Filler Text" are on the same line.</p>
+        <div>
+            <span>Filler Text </span><span id="span1">Filler Text</span> Filler Text<span> Filler Text </span>Filler Text
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-032-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-032-ref.xht
new file mode 100644
index 0000000..b18b740d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-032-ref.xht
@@ -0,0 +1,30 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div {line-height: 1.25;}
+
+  span {visibility: hidden;}
+
+  div + div {margin-top: 5px;}
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if "Filler Text1" and "Filler Text3" are on the first line and "Filler Text2" is on the second line and the space has been reserved where "Filler Text2" would have been if it were on the first line.</p>
+
+  <div>Filler Text1<span>Filler Text2</span>Filler Text3</div>
+
+  <div><span>Filler Text1</span>Filler Text2<span>Filler Text3</span></div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-032.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-032.xht
new file mode 100644
index 0000000..41b6c00
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-032.xht
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Relatively positioned box has no impact on boxes which follow</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-22 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#comp-relpos" />
+		<link rel="match" href="position-relative-032-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="Offsetting a box with relative positioning has no effect on the boxes which follow." />
+        <style type="text/css">
+			div {line-height: 1.25;}
+
+            #span1
+            {
+                position: relative;
+                top: 25px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if "Filler Text1" and "Filler Text3" are on the first line and "Filler Text2" is on the second line and the space has been reserved where "Filler Text2" would have been if it were on the first line.</p>
+        <div>
+            <span>Filler Text1<span id="span1">Filler Text2</span>Filler Text3</span>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-033-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-033-ref.xht
new file mode 100644
index 0000000..e46c1df2
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-033-ref.xht
@@ -0,0 +1,32 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  span {font: 20px/1 Ahem;}
+
+  div > span {border: blue solid 2px;}
+
+  span#yellow-stripe {color: yellow;}
+
+  span#orange-stripe {color: orange;}
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if the yellow stripe is on the left-hand side of the hollow blue rectangle and the orange stripe is on the right-hand side of the hollow blue rectangle.</p>
+
+  <div>
+       <span><span id="yellow-stripe">123456</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span id="orange-stripe">123456</span></span>
+  </div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-033.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-033.xht
new file mode 100644
index 0000000..17afb3b
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-033.xht
@@ -0,0 +1,36 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Relatively positioned box has no impact on boxes which follow and boxes may overlap</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-22 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#comp-relpos" />
+		<link rel="match" href="position-relative-033-ref.xht" />
+
+        <meta name="flags" content="ahem may" />
+        <meta name="assert" content="Offsetting a box with relative positioning has no effect on the boxes which follow and boxes may overlap." />
+        <style type="text/css">
+            span
+            {
+                color: orange;
+                font: 20px/1 Ahem;
+            }
+            #span1
+            {
+                border: 2px solid blue;
+            }
+            #span2
+            {
+                color: yellow;
+                position: relative;
+                left: -6em;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if the yellow stripe is on the left-hand side of the hollow blue rectangle and the orange stripe is on the right-hand side of the hollow blue rectangle.</p>
+        <div>
+            <span id="span1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span id="span2">XXXXXX</span>XXXXXX</span>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-034.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-034.xht
new file mode 100644
index 0000000..a6fcf408
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-034.xht
@@ -0,0 +1,30 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Relatively positioned content inside container with overflow auto</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-22 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#comp-relpos" />
+        <meta name="flags" content="interact" />
+        <meta name="assert" content="A container with overflow set to auto provides a scrolling mechanism for relatively positioned content." />
+        <style type="text/css">
+            div
+            {
+                border: solid;
+                overflow: auto;
+                width: 200px;
+            }
+            span
+            {
+                position: relative;
+                left: 200px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if the box can be scrolled to the words "Filler Text".</p>
+        <div>
+            <span>Filler Text</span>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-035-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-035-ref.xht
new file mode 100644
index 0000000..fba91bd5
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-035-ref.xht
@@ -0,0 +1,42 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div
+  {
+  line-height: 1.25;
+  width: 5em;
+  }
+
+  div#black
+  {
+  background-color: black;
+  margin-top: 2em;
+  }
+
+  div#orange
+  {
+  background-color: orange;
+  padding-top: 0.25em;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if a black rectangle has one and only one orange line of text below it.</p>
+
+  <div id="black">Filler Text Filler Text Filler Text</div>
+
+  <div id="orange">Text</div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-035.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-035.xht
new file mode 100644
index 0000000..50eb55a
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-035.xht
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Relatively positioned boxes preserve the space created for it in flow</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-22 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#comp-relpos" />
+		<link rel="match" href="position-relative-035-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="Relative positioned content keeps its normal flow size including line breaks and the space originally reserved for it." />
+        <style type="text/css">
+            #div1
+            {
+                line-height: 1.25;
+                width: 5em;
+            }
+            #div2
+            {
+                position: relative;
+                top: 16px;
+                background: black;
+            }
+            #div3
+            {
+                background: orange;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if a black rectangle has one and only one orange line of text below it.</p>
+        <div id="div1">
+            <div id="div2">Filler Text Filler Text Filler Text</div>
+            <div id="div3">&nbsp;FAIL&nbsp; Text</div>
+        </div>
+    </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-036.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-036.xht
new file mode 100644
index 0000000..e7144d79
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-036.xht
@@ -0,0 +1,30 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Relatively positioned content inside container with overflow scroll</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-22 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#comp-relpos" />
+        <meta name="flags" content="interact" />
+        <meta name="assert" content="A container with overflow set to scroll provides a scrolling mechanism for relatively positioned content." />
+        <style type="text/css">
+            div
+            {
+                border: solid;
+                overflow: scroll;
+                width: 200px;
+            }
+            span
+            {
+                position: relative;
+                left: 200px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if the box can be scrolled to the words "Filler Text".</p>
+        <div>
+            <span>Filler Text</span>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-037-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-037-ref.xht
new file mode 100644
index 0000000..daae9c9
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-037-ref.xht
@@ -0,0 +1,31 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div
+  {
+  border: black solid 3px;
+  text-align: right;
+  width: 2in;
+  }
+
+  img {vertical-align: top;}
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if the right side of the hollow rectangle is blue.</p>
+
+  <div><img src="support/swatch-blue.png" width="96" height="96" alt="Image download support must be enabled" /></div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-037.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-037.xht
new file mode 100644
index 0000000..d41ff3c2
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-037.xht
@@ -0,0 +1,36 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Relative positioning with over-constained situation and direction left-to-right</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-07-09 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#relative-positioning" />
+		<link rel="match" href="position-relative-037-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="Relative positioning with left and right values and over-constrained situations when direction is left-to-right." />
+        <style type="text/css">
+            #div1
+            {
+                border: solid 3px;
+                direction: ltr;
+                width: 2in;
+            }
+            div div
+            {
+                background: blue;
+                height: 1in;
+                left: 1in;
+                position: relative;
+                right: 2in;
+                width: 1in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if the right side of the hollow rectangle is blue.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-038-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-038-ref.xht
new file mode 100644
index 0000000..d7eba883
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-038-ref.xht
@@ -0,0 +1,30 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div
+  {
+  border: black solid 3px;
+  width: 2in;
+  }
+
+  img {vertical-align: top;}
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if the left side of the hollow rectangle is blue.</p>
+
+  <div><img src="support/swatch-blue.png" width="96" height="96" alt="Image download support must be enabled" /></div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-038.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-038.xht
new file mode 100644
index 0000000..95c5558
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-038.xht
@@ -0,0 +1,36 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Relative positioning with over-constained situation and direction right-to-left</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-07-09 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#relative-positioning" />
+		<link rel="match" href="position-relative-038-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="Relative positioning with left and right values and over-constrained situations when direction is right-to-left." />
+        <style type="text/css">
+            #div1
+            {
+                border: solid 3px;
+                direction: rtl;
+                width: 2in;
+            }
+            div div
+            {
+                background: blue;
+                height: 1in;
+                left: 2in;
+                position: relative;
+                right: 1in;
+                width: 1in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if the left side of the hollow rectangle is blue.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-nested-001-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-nested-001-ref.xht
new file mode 100644
index 0000000..9fbe2ff
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-nested-001-ref.xht
@@ -0,0 +1,29 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div
+  {
+  background-color: green;
+  height: 300px;
+  width: 200px;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if there is <strong>no red</strong>.</p>
+
+  <div></div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-nested-001.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-nested-001.xht
new file mode 100644
index 0000000..e7b99717
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-relative-nested-001.xht
@@ -0,0 +1,48 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Vertical centering with negative and positive top positioning</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#positioning-scheme" />
+		<link rel="match" href="position-relative-nested-001-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="Equal 50% positive and negative positioning can vertically center objects." />
+        <style type="text/css">
+            #outer
+            {
+                background: green repeat-x center url('support/red_box.png');
+                /* red_box.png is a 100px by 100px red square */
+                height: 300px;
+                width: 200px;
+            }
+            #inner
+            {
+                background-color: red;
+                height: 100px;
+                position: relative;
+                top: 50%
+            }
+            #inner-most
+            {
+                background-color: green;
+                height: 150px;
+                /* 150px == top-half of red_box.png's height + #inner's height */
+                position: relative;
+                top: -50%;
+                /* 50% is 50% of the height of #inner-most's containing block
+                which is #inner */
+                /* to move the top of the #inner-most box from pixel 150
+                on the y-axis of #outer to pixel 100 on the y-axis of #outer */
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="outer">
+            <div id="inner">
+                <div id="inner-most"></div>
+            </div>
+        </div>
+    </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-static-001-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-static-001-ref.xht
new file mode 100644
index 0000000..656cca4
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-static-001-ref.xht
@@ -0,0 +1,30 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div
+  {
+  background-color: orange;
+  height: 192px;
+  line-height: 1.25;
+  width: 192px;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if an orange stripe is above a blue rectangle and if both have the same width.</p>
+
+  <div>Filler Text<br /><img src="support/swatch-blue.png" width="192" height="172" alt="Image download support must be enabled" /></div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-static-001.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-static-001.xht
new file mode 100644
index 0000000..d84c1bd
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/position-static-001.xht
@@ -0,0 +1,39 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Content laid out in normal flow when 'position' is set to 'static'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-24 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-position" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#choose-position" />
+		<link rel="match" href="position-static-001-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="Static positioned elements are not affected by top, right, bottom, left property settings." />
+        <style type="text/css">
+            #div1
+            {
+                background: blue;
+                height: 2in;
+                line-height: 1.25;
+                position: relative;
+                width: 2in;
+            }
+            div div
+            {
+                background: orange;
+                bottom: 0;
+                left: 100px;
+                position: static;
+                right: 0;
+                top: 100px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if an orange stripe is above a blue rectangle and if both have the same width.</p>
+        <div id="div1">
+            <div>Filler Text</div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/positioning-float-001-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/positioning-float-001-ref.xht
new file mode 100644
index 0000000..5655e5f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/positioning-float-001-ref.xht
@@ -0,0 +1,24 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div {font-size: 3em;}
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if there is the word "P A S S".</p>
+
+  <div>P A S S</div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/positioning-float-001.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/positioning-float-001.xht
new file mode 100644
index 0000000..0b0ee55
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/positioning-float-001.xht
@@ -0,0 +1,27 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Positioning a left floated element</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-24 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#positioning-scheme" />
+        <link rel="match" href="positioning-float-001-ref.xht" />
+        <meta name="flags" content="" />
+        <meta name="assert" content="Floating a box will first lay out the box then shift it to the left." />
+        <style type="text/css">
+            div
+            {
+                font-size: 3em;
+            }
+
+            span
+            {
+                float: left;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is the word "P A S S".</p>
+        <div>S <span>P A&nbsp;</span>S</div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/positioning-float-002-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/positioning-float-002-ref.xht
new file mode 100644
index 0000000..a6a7216
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/positioning-float-002-ref.xht
@@ -0,0 +1,32 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div {line-height: 1.25;}
+
+  div + div
+  {
+  margin-top: -1.25em;
+  text-align: right;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if "Floated element" is on the same line as the "Filler Text".</p>
+
+  <div>Filler Text Filler Text</div>
+
+  <div>Floated element</div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/positioning-float-002.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/positioning-float-002.xht
new file mode 100644
index 0000000..f13c5ef
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/positioning-float-002.xht
@@ -0,0 +1,29 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Positioning a right floated element</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-24 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#positioning-scheme" />
+		<link rel="match" href="positioning-float-002-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="Floating a box will first lay out the box then shift it to the right." />
+        <style type="text/css">
+            div {line-height: 1.25;}
+
+            div div
+            {
+                float: right;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if "Floated element" is on the same line as the "Filler Text".</p>
+        <div>
+            Filler Text
+            <div>Floated element</div>
+            Filler Text
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/relpos-calcs-001-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/relpos-calcs-001-ref.xht
new file mode 100644
index 0000000..a147a5f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/relpos-calcs-001-ref.xht
@@ -0,0 +1,29 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div
+  {
+  background-color: green;
+  height: 120px;
+  width: 120px;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
+
+  <div></div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/relpos-calcs-001.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/relpos-calcs-001.xht
new file mode 100644
index 0000000..4fe2250
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/relpos-calcs-001.xht
@@ -0,0 +1,57 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <title>CSS Test: Relative Positioning - auto top = -bottom</title>
+    <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/>
+    <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-25 -->
+    <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#relative-positioning" />
+	<link rel="match" href="relpos-calcs-001-ref.xht" />
+
+    <meta name="flags" content="" />
+    <meta name="assert" content="For a relatively positioned element, if 'top'
+      is 'auto', its used value is minus the value of 'bottom'." />
+    <style type="text/css">
+        div {
+            height: 120px;
+            width: 120px;
+        }
+        .container {
+            margin-top: -60px;
+        }
+        .outer {
+            background: red;
+            position: relative;
+            bottom: -50%;
+            /*
+            div.outer's used bottom value is -60px
+            div.outer's used top value is 60px
+            div.outer's computed bottom value is -50%
+            but
+            div.outer's computed top value is auto and not 50%!
+            */
+        }
+        .inner {
+            background: green;
+            position: relative;
+            top: inherit;
+            /* using inheritance to test computed vs. used */
+            /* What is inherited is the computed top value of
+            its containing block, which is auto!
+            */
+        }
+        .control {
+          background: red;
+          margin-top: -60px;
+        }
+    </style>
+  </head>
+  <body>
+    <p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
+    <div class="container">
+      <div class="outer">
+        <div class="inner"></div>
+      </div>
+    </div>
+    <div class="control"></div>
+  </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/relpos-calcs-002.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/relpos-calcs-002.xht
new file mode 100644
index 0000000..11aae3f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/relpos-calcs-002.xht
@@ -0,0 +1,56 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <title>CSS Test: Relative Positioning - auto bottom = -top</title>
+    <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/>
+    <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-25 -->
+    <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#relative-positioning" />
+	<link rel="match" href="relpos-calcs-001-ref.xht" />
+
+    <meta name="flags" content="" />
+    <meta name="assert" content="For a relatively positioned element, if 'bottom'
+      is 'auto', its used value is minus the value of 'top'." />
+    <style type="text/css">
+        div {
+            height: 120px;
+            width: 120px;
+        }
+        .container {
+            margin-top: -60px;
+        }
+        .outer {
+            background: red;
+            position: relative;
+            top: 50%;
+            /*
+            div.outer's used top value is 60px
+            div.outer's used bottom value is -60px
+            div.outer's computed top value is 50%
+            div.outer's computed bottom value is auto and not -50%!
+            */
+
+        }
+        .inner {
+            background: green;
+            position: relative;
+            bottom: inherit; /* using inheritance to test computed vs. used */
+            /* What is inherited is the computed bottom value of
+            its containing block, which is auto!
+            */
+        }
+        .control {
+          background: red;
+          margin-top: -60px;
+        }
+    </style>
+  </head>
+  <body>
+    <p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
+    <div class="container">
+      <div class="outer">
+        <div class="inner"></div>
+      </div>
+    </div>
+    <div class="control"></div>
+  </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/relpos-calcs-003.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/relpos-calcs-003.xht
new file mode 100644
index 0000000..64e5d065
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/relpos-calcs-003.xht
@@ -0,0 +1,54 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <title>CSS Test: Relative Positioning - Computing auto left = -right</title>
+    <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/>
+    <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-25 -->
+    <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#relative-positioning" />
+	<link rel="match" href="relpos-calcs-001-ref.xht" />
+
+    <meta name="flags" content="" />
+    <meta name="assert" content="For a relatively positioned element, if 'left'
+      is 'auto', its used value is minus the value of 'right'." />
+    <style type="text/css">
+        div {
+            height: 120px;
+            width: 120px;
+        }
+        .container {
+            margin-left: -60px;
+        }
+        .outer {
+            background: red;
+            position: relative;
+            right: -50%;
+            /*
+            div.outer's used right value is -60px
+            div.outer's used left value is 60px
+            div.outer's computed right value is -50%
+            but
+            div.outer's computed left value is auto and not 50%!
+            */
+
+        }
+        .inner {
+            background: green;
+            position: relative;
+            left: inherit; /* using inheritance to test computed vs. used */
+        }
+        .control {
+          background: red;
+          margin-bottom: -120px;
+        }
+    </style>
+  </head>
+  <body>
+    <p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
+    <div class="control"></div>
+    <div class="container">
+      <div class="outer">
+        <div class="inner"></div>
+      </div>
+    </div>
+  </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/relpos-calcs-004.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/relpos-calcs-004.xht
new file mode 100644
index 0000000..000e109
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/relpos-calcs-004.xht
@@ -0,0 +1,57 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <title>CSS Test: Relative Positioning - auto right = -left</title>
+    <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/>
+    <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-25 -->
+    <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#relative-positioning" />
+	<link rel="match" href="relpos-calcs-001-ref.xht" />
+
+    <meta name="flags" content="" />
+    <meta name="assert" content="For a relatively positioned element, if 'right'
+      is 'auto', its used value is minus the value of 'left'." />
+    <style type="text/css">
+        div {
+            height: 120px;
+            width: 120px;
+            margin-right: auto;
+            direction: ltr;
+        }
+        .container {
+            margin-left: -60px;
+            direction: rtl; /* only set RTL on the containing block in question */
+        }
+        .outer {
+            background: red;
+            position: relative;
+            left: 50%;
+            /*
+            div.outer's used left value is 60px
+            div.outer's right top value is -60px
+            div.outer's computed left value is 50%
+            but
+            div.outer's computed right value is auto and not 50%!
+            */
+
+        }
+        .inner {
+            background: green;
+            position: relative;
+            right: inherit; /* using inheritance to test computed vs. used */
+        }
+        .control {
+          background: red;
+          margin-bottom: -120px;
+        }
+    </style>
+  </head>
+  <body>
+    <p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
+    <div class="control"></div>
+    <div class="container" dir="rtl">
+      <div class="outer" dir="ltr">
+        <div class="inner"></div>
+      </div>
+    </div>
+  </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/relpos-calcs-005.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/relpos-calcs-005.xht
new file mode 100644
index 0000000..9877230
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/relpos-calcs-005.xht
@@ -0,0 +1,60 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <title>CSS Test: Relative Positioning - overconstrained left = -right (LTR)</title>
+    <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/>
+    <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-25 -->
+    <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#relative-positioning" />
+	<link rel="match" href="relpos-calcs-001-ref.xht" />
+
+    <meta name="flags" content="" />
+    <meta name="assert" content="For a relatively positioned element in an LTR
+      containing block, if neither 'left' nor 'right' is 'auto', used value of
+      'right' is minus the value of 'left'." />
+    <style type="text/css">
+        div {
+            height: 120px;
+            width: 80px;
+            direction: rtl;
+            margin-right: auto;
+        }
+        .container {
+            direction: ltr; /* only set LTR on the containing block in question */
+        }
+        .outer {
+            background: green;
+            position: relative;
+            left: 50%;
+            right: 50%;
+
+            /*
+            div.outer's used left value is 60px
+            div.outer's used right value is -60px
+            div.outer's computed left value is 50%
+            div.outer's computed right value is 50%
+            */
+
+        }
+        .inner {
+            background: green;
+            position: relative;
+            right: inherit; /* using inheritance to test computed vs. used */
+            /* div.inner's right inherits div.outer's computed right value */
+        }
+        .control {
+          background: red;
+          margin-bottom: -120px;
+          width: 120px;
+        }
+    </style>
+  </head>
+  <body>
+    <p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
+    <div class="control"></div>
+    <div class="container" dir="ltr">
+      <div class="outer" dir="rtl">
+        <div class="inner"></div>
+      </div>
+    </div>
+  </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/relpos-calcs-006.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/relpos-calcs-006.xht
new file mode 100644
index 0000000..3dc6a6ea
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/relpos-calcs-006.xht
@@ -0,0 +1,56 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <title>CSS Test: Relative Positioning - overconstrained left = -right (RTL)</title>
+    <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/>
+    <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-25 -->
+    <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#relative-positioning" />
+	<link rel="match" href="relpos-calcs-001-ref.xht" />
+
+    <meta name="flags" content="" />
+    <meta name="assert" content="For a relatively positioned element in an RTL
+      containing block, if neither 'left' nor 'right' is 'auto', used value of
+      'left' is minus the value of 'right'." />
+    <style type="text/css">
+        div {
+            height: 120px;
+            width: 80px;
+            direction: rtl;
+        }
+        .outer {
+            background: green;
+            position: relative;
+            left: -50%;
+            right: -50%;
+
+            /*
+            div.outer's used left value is 60px
+            div.outer's used right value is -60px
+            div.outer's computed left value is -50%
+            div.outer's computed right value is -50%
+            */
+
+        }
+        .inner {
+            background: green;
+            position: relative;
+            left: inherit; /* using inheritance to test computed vs. used */
+            /* div.inner's left inherits div.outer's computed left value */
+        }
+        .control {
+          background: red;
+          margin-bottom: -120px;
+          width: 120px;
+        }
+    </style>
+  </head>
+  <body>
+    <p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
+    <div class="control"></div>
+    <div class="container" dir="rtl">
+      <div class="outer">
+        <div class="inner"></div>
+      </div>
+    </div>
+  </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/relpos-calcs-007.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/relpos-calcs-007.xht
new file mode 100644
index 0000000..49c7324
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/relpos-calcs-007.xht
@@ -0,0 +1,55 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <title>CSS Test: Relative Positioning - overconstrained top = -bottom</title>
+    <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/>
+    <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-25 -->
+    <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#relative-positioning" />
+	<link rel="match" href="relpos-calcs-001-ref.xht" />
+
+    <meta name="flags" content="" />
+    <meta name="assert" content="For a relatively positioned element, if
+      neither 'top' nor 'bottom' is 'auto', used value of 'bottom' is minus the
+      value of 'top'." />
+    <style type="text/css">
+        div {
+            height: 80px;
+            width: 120px;
+        }
+        .outer {
+            background: green;
+            position: relative;
+            top: 50%;
+            bottom: 50%;
+
+            /*
+            div.outer's used top value is 40px
+            div.outer's used bottom value is -40px
+            div.outer's computed top value is 50%
+            div.outer's computed bottom value is 50%
+            */
+
+        }
+        .inner {
+            background: green;
+            position: relative;
+            bottom: inherit; /* using inheritance to test computed vs. used */
+            /* div.inner's bottom inherits div.outer's computed bottom value */
+        }
+        .control {
+          background: red;
+          margin-top: -80px;
+          height: 120px;
+        }
+    </style>
+  </head>
+  <body>
+    <p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
+    <div class="container">
+      <div class="outer">
+        <div class="inner"></div>
+      </div>
+    </div>
+    <div class="control"></div>
+  </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-004-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-004-ref.xht
new file mode 100644
index 0000000..14d8891
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-004-ref.xht
@@ -0,0 +1,24 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div {text-align: right;}
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+
+  <div><img src="support/blue15x15.png" width="5" height="96" alt="Image download support must be enabled" /><img src="support/swatch-orange.png" width="5" height="96" alt="Image download support must be enabled" /></div>
+
+ </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-004.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-004.xht
new file mode 100644
index 0000000..3c9ed5f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-004.xht
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Right using pixels with a value of negative zero, -0px</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-25 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-right" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="right-004-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'right' property sets a negative zero length value in pixels." />
+        <style type="text/css">
+            div
+            {
+                direction: rtl;
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-right: 5px solid orange;
+            }
+            div div
+            {
+                border-right: 5px solid blue;
+                right: -0px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-005.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-005.xht
new file mode 100644
index 0000000..dba5ab2
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-005.xht
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Right using pixels with a value of zero, 0px</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-25 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-right" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="right-004-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'right' property sets a zero length value in pixels." />
+        <style type="text/css">
+            div
+            {
+                direction: rtl;
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-right: 5px solid orange;
+            }
+            div div
+            {
+                border-right: 5px solid blue;
+                right: 0px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-006.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-006.xht
new file mode 100644
index 0000000..5334ba5e8
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-006.xht
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Right using pixels with a value of positive zero, +0px</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-25 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-right" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="right-004-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'right' property sets a positive zero length value in pixels." />
+        <style type="text/css">
+            div
+            {
+                direction: rtl;
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-right: 5px solid orange;
+            }
+            div div
+            {
+                border-right: 5px solid blue;
+                right: +0px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-007-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-007-ref.xht
new file mode 100644
index 0000000..2f331df
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-007-ref.xht
@@ -0,0 +1,24 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div {text-align: right;}
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if there is <strong>no red</strong>.</p>
+
+  <div><img src="support/black15x15.png" width="3" height="96" alt="Image download support must be enabled" /></div>
+
+ </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-007.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-007.xht
new file mode 100644
index 0000000..342e5a1
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-007.xht
@@ -0,0 +1,38 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Right using pixels with a nominal value, 96px</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-25 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-right" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="right-007-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'right' property sets a nominal length value in pixels." />
+        <style type="text/css">
+            div
+            {
+                direction: rtl;
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-right: 3px solid red;
+            }
+            div div
+            {
+                border-right: 3px solid black;
+                margin-right: -99px;
+                right: 96px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-008.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-008.xht
new file mode 100644
index 0000000..2080affa0
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-008.xht
@@ -0,0 +1,38 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Right using pixels with a positive nominal value, +96px</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-25 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-right" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="right-007-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'right' property sets a positive nominal length value in pixels." />
+        <style type="text/css">
+            div
+            {
+                direction: rtl;
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-right: 3px solid red;
+            }
+            div div
+            {
+                border-right: 3px solid black;
+                margin-right: -99px;
+                right: +96px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-016.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-016.xht
new file mode 100644
index 0000000..958d9ad
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-016.xht
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Right using points with a value of negative zero, -0pt</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-25 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-right" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="right-004-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'right' property sets a negative zero length value in points." />
+        <style type="text/css">
+            div
+            {
+                direction: rtl;
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-right: 5px solid orange;
+            }
+            div div
+            {
+                border-right: 5px solid blue;
+                right: -0pt;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-017.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-017.xht
new file mode 100644
index 0000000..fd7f043
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-017.xht
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Right using points with a value of zero, 0pt</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-25 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-right" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="right-004-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'right' property sets a zero length value in points." />
+        <style type="text/css">
+            div
+            {
+                direction: rtl;
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-right: 5px solid orange;
+            }
+            div div
+            {
+                border-right: 5px solid blue;
+                right: 0pt;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-018.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-018.xht
new file mode 100644
index 0000000..b865413
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-018.xht
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Right using points with a value of positive zero, +0pt</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-25 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-right" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="right-004-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'right' property sets a positive zero length value in points." />
+        <style type="text/css">
+            div
+            {
+                direction: rtl;
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-right: 5px solid orange;
+            }
+            div div
+            {
+                border-right: 5px solid blue;
+                right: +0pt;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-019-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-019-ref.xht
new file mode 100644
index 0000000..9d15385
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-019-ref.xht
@@ -0,0 +1,24 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div {text-align: right;}
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if there is <strong>no red</strong>.</p>
+
+  <div><img src="support/black15x15.png" width="96" height="96" alt="Image download support must be enabled" /></div>
+
+ </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-019.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-019.xht
new file mode 100644
index 0000000..ee00c89
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-019.xht
@@ -0,0 +1,38 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Right using points with a nominal value, 72pt</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-25 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-right" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="right-019-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'right' property sets a nominal length value in points." />
+        <style type="text/css">
+            div
+            {
+                direction: rtl;
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-right: 72pt solid red;
+            }
+            div div
+            {
+                border-right: 72pt solid black;
+                margin-right: -144pt;
+                right: 72pt;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-020.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-020.xht
new file mode 100644
index 0000000..fbf431e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-020.xht
@@ -0,0 +1,38 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Right using points with a positive nominal value, +72pt</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-25 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-right" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="right-019-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'right' property sets a positive nominal length value in points." />
+        <style type="text/css">
+            div
+            {
+                direction: rtl;
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-right: 72pt solid red;
+            }
+            div div
+            {
+                border-right: 72pt solid black;
+                margin-right: -144pt;
+                right: +72pt;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-028.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-028.xht
new file mode 100644
index 0000000..bc3d163
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-028.xht
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Right using picas with a value of negative zero, -0pc</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-25 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-right" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="right-004-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'right' property sets a negative zero length value in picas." />
+        <style type="text/css">
+            div
+            {
+                direction: rtl;
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-right: 5px solid orange;
+            }
+            div div
+            {
+                border-right: 5px solid blue;
+                right: -0pc;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-029.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-029.xht
new file mode 100644
index 0000000..a9d9639
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-029.xht
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Right using picas with a value of zero, 0pc</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-25 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-right" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="right-004-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'right' property sets a zero length value in picas." />
+        <style type="text/css">
+            div
+            {
+                direction: rtl;
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-right: 5px solid orange;
+            }
+            div div
+            {
+                border-right: 5px solid blue;
+                right: 0pc;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-030.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-030.xht
new file mode 100644
index 0000000..35e1a4c
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-030.xht
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Right using picas with a value of positive zero, +0pc</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-25 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-right" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="right-004-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'right' property sets a positive zero length value in picas." />
+        <style type="text/css">
+            div
+            {
+                direction: rtl;
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-right: 5px solid orange;
+            }
+            div div
+            {
+                border-right: 5px solid blue;
+                right: +0pc;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-031-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-031-ref.xht
new file mode 100644
index 0000000..d142224
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-031-ref.xht
@@ -0,0 +1,24 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div {text-align: right;}
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if there is <strong>no red</strong>.</p>
+
+  <div><img src="support/black15x15.png" width="16" height="96" alt="Image download support must be enabled" /></div>
+
+ </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-031.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-031.xht
new file mode 100644
index 0000000..a417a722
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-031.xht
@@ -0,0 +1,38 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Right using picas with a nominal value, 6pc</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-25 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-right" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="right-031-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'right' property sets a nominal length value in picas." />
+        <style type="text/css">
+            div
+            {
+                direction: rtl;
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-right: 1pc solid red;
+            }
+            div div
+            {
+                border-right: 1pc solid black;
+                margin-right: -7pc;
+                right: 6pc;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-032.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-032.xht
new file mode 100644
index 0000000..33e4481
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-032.xht
@@ -0,0 +1,38 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Right using picas with a positive nominal value, +6pc</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-25 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-right" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="right-031-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'right' property sets a positive nominal length value in picas." />
+        <style type="text/css">
+            div
+            {
+                direction: rtl;
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-right: 1pc solid red;
+            }
+            div div
+            {
+                border-right: 1pc solid black;
+                margin-right: -7pc;
+                right: +6pc;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-040.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-040.xht
new file mode 100644
index 0000000..11ed041
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-040.xht
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Right using centimeters with a value of negative zero, -0cm</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-25 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-right" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="right-004-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'right' property sets a negative zero length value in centimeters." />
+        <style type="text/css">
+            div
+            {
+                direction: rtl;
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-right: 5px solid orange;
+            }
+            div div
+            {
+                border-right: 5px solid blue;
+                right: -0cm;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-041.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-041.xht
new file mode 100644
index 0000000..137ce0e6
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-041.xht
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Right using centimeters with a value of zero, 0cm</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-25 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-right" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="right-004-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'right' property sets a zero length value in centimeters." />
+        <style type="text/css">
+            div
+            {
+                direction: rtl;
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-right: 5px solid orange;
+            }
+            div div
+            {
+                border-right: 5px solid blue;
+                right: 0cm;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-042.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-042.xht
new file mode 100644
index 0000000..0fa4647a
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-042.xht
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Right using centimeters with a value of positive zero, +0cm</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-25 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-right" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="right-004-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'right' property sets a positive zero length value in centimeters." />
+        <style type="text/css">
+            div
+            {
+                direction: rtl;
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-right: 5px solid orange;
+            }
+            div div
+            {
+                border-right: 5px solid blue;
+                right: +0cm;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-043.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-043.xht
new file mode 100644
index 0000000..8f5a40ee
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-043.xht
@@ -0,0 +1,38 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Right using centimeters with a nominal value, 2.54cm</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-25 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-right" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="right-019-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'right' property sets a nominal length value in centimeters." />
+        <style type="text/css">
+            div
+            {
+                direction: rtl;
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-right: 2.54cm solid red;
+            }
+            div div
+            {
+                border-right: 2.54cm solid black;
+                margin-right: -5.08cm;
+                right: 2.54cm;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-044.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-044.xht
new file mode 100644
index 0000000..d7012e44
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-044.xht
@@ -0,0 +1,38 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Right using centimeters with a positive nominal value, +2.54cm</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-25 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-right" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="right-019-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'right' property sets a positive nominal length value in centimeters." />
+        <style type="text/css">
+            div
+            {
+                direction: rtl;
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-right: 2.54cm solid red;
+            }
+            div div
+            {
+                border-right: 2.54cm solid black;
+                margin-right: -5.08cm;
+                right: +2.54cm;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-052.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-052.xht
new file mode 100644
index 0000000..bb6abf9
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-052.xht
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Right using millimeters with a value of negative zero, -0mm</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-25 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-right" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="right-004-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'right' property sets a negative zero length value in millimeters." />
+        <style type="text/css">
+            div
+            {
+                direction: rtl;
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-right: 5px solid orange;
+            }
+            div div
+            {
+                border-right: 5px solid blue;
+                right: -0mm;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-053.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-053.xht
new file mode 100644
index 0000000..632062a
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-053.xht
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Right using millimeters with a value of zero, 0mm</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-25 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-right" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="right-004-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'right' property sets a zero length value in millimeters." />
+        <style type="text/css">
+            div
+            {
+                direction: rtl;
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-right: 5px solid orange;
+            }
+            div div
+            {
+                border-right: 5px solid blue;
+                right: 0mm;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-054.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-054.xht
new file mode 100644
index 0000000..5ce4eee
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-054.xht
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Right using millimeters with a value of positive zero, +0mm</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-25 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-right" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="right-004-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'right' property sets a positive zero length value in millimeters." />
+        <style type="text/css">
+            div
+            {
+                direction: rtl;
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-right: 5px solid orange;
+            }
+            div div
+            {
+                border-right: 5px solid blue;
+                right: +0mm;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-055.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-055.xht
new file mode 100644
index 0000000..32bde6b
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-055.xht
@@ -0,0 +1,38 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Right using millimeters with a nominal value, 25.4mm</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-25 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-right" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="right-019-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'right' property sets a nominal length value in millimeters." />
+        <style type="text/css">
+            div
+            {
+                direction: rtl;
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-right: 25.4mm solid red;
+            }
+            div div
+            {
+                border-right: 25.4mm solid black;
+                margin-right: -50.8mm;
+                right: 25.4mm;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-056.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-056.xht
new file mode 100644
index 0000000..0ffa62a
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-056.xht
@@ -0,0 +1,38 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Right using millimeters with a positive nominal value, +25.4mm</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-25 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-right" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="right-019-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'right' property sets a positive nominal length value in millimeters." />
+        <style type="text/css">
+            div
+            {
+                direction: rtl;
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-right: 25.4mm solid red;
+            }
+            div div
+            {
+                border-right: 25.4mm solid black;
+                margin-right: -50.8mm;
+                right: +25.4mm;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-064.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-064.xht
new file mode 100644
index 0000000..b75af48
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-064.xht
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Right using inches with a value of negative zero, -0in</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-25 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-right" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="right-004-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'right' property sets a negative zero length value in inches." />
+        <style type="text/css">
+            div
+            {
+                direction: rtl;
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-right: 5px solid orange;
+            }
+            div div
+            {
+                border-right: 5px solid blue;
+                right: -0in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-065.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-065.xht
new file mode 100644
index 0000000..4aaf22d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-065.xht
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Right using inches with a value of zero, 0in</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-25 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-right" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="right-004-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'right' property sets a zero length value in inches." />
+        <style type="text/css">
+            div
+            {
+                direction: rtl;
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-right: 5px solid orange;
+            }
+            div div
+            {
+                border-right: 5px solid blue;
+                right: 0in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-066.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-066.xht
new file mode 100644
index 0000000..429499d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-066.xht
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Right using inches with a value of positive zero, +0in</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-25 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-right" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="right-004-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'right' property sets a positive zero length value in inches." />
+        <style type="text/css">
+            div
+            {
+                direction: rtl;
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-right: 5px solid orange;
+            }
+            div div
+            {
+                border-right: 5px solid blue;
+                right: +0in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-067.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-067.xht
new file mode 100644
index 0000000..32f6ed47
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-067.xht
@@ -0,0 +1,38 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Right using inches with a nominal value, 1in</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-25 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-right" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="right-019-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'right' property sets a nominal length value in inches." />
+        <style type="text/css">
+            div
+            {
+                direction: rtl;
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-right: 1in solid red;
+            }
+            div div
+            {
+                border-right: 1in solid black;
+                margin-right: -2in;
+                right: 1in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-068.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-068.xht
new file mode 100644
index 0000000..b2783a9
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-068.xht
@@ -0,0 +1,38 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Right using inches with a positive nominal value, +1in</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-25 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-right" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="right-019-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'right' property sets a positive nominal length value in inches." />
+        <style type="text/css">
+            div
+            {
+                direction: rtl;
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-right: 1in solid red;
+            }
+            div div
+            {
+                border-right: 1in solid black;
+                margin-right: -2in;
+                right: +1in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-076.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-076.xht
new file mode 100644
index 0000000..82b8e32
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-076.xht
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Right using 'em' units with a value of negative zero, -0em</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-25 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-right" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="right-004-ref.xht" />
+
+        <meta name="flags" content="ahem" />
+        <meta name="assert" content="The 'right' property sets a negative zero length value in 'em' units." />
+        <style type="text/css">
+            div
+            {
+                direction: rtl;
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-right: 5px solid orange;
+            }
+            div div
+            {
+                border-right: 5px solid blue;
+                right: -0em;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-077.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-077.xht
new file mode 100644
index 0000000..9fd67b7
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-077.xht
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Right using 'em' units with a value of zero, 0em</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-25 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-right" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="right-004-ref.xht" />
+
+        <meta name="flags" content="ahem" />
+        <meta name="assert" content="The 'right' property sets a zero length value in 'em' units." />
+        <style type="text/css">
+            div
+            {
+                direction: rtl;
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-right: 5px solid orange;
+            }
+            div div
+            {
+                border-right: 5px solid blue;
+                right: 0em;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-078.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-078.xht
new file mode 100644
index 0000000..fe3eeaf
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-078.xht
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Right using 'em' units with a value of positive zero, +0em</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-25 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-right" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="right-004-ref.xht" />
+
+        <meta name="flags" content="ahem" />
+        <meta name="assert" content="The 'right' property sets a positive zero length value in 'em' units." />
+        <style type="text/css">
+            div
+            {
+                direction: rtl;
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-right: 5px solid orange;
+            }
+            div div
+            {
+                border-right: 5px solid blue;
+                right: +0em;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-079-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-079-ref.xht
new file mode 100644
index 0000000..4dab0eb
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-079-ref.xht
@@ -0,0 +1,24 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div {text-align: right;}
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if there is <strong>no red</strong>.</p>
+
+  <div><img src="support/black15x15.png" width="20" height="96" alt="Image download support must be enabled" /></div>
+
+ </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-079.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-079.xht
new file mode 100644
index 0000000..57e7499c
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-079.xht
@@ -0,0 +1,39 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Right using 'em' units with a nominal value, 6em</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-25 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-right" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="right-079-ref.xht" />
+
+        <meta name="flags" content="ahem" />
+        <meta name="assert" content="The 'right' property sets a nominal length value in 'em' units." />
+        <style type="text/css">
+            div
+            {
+                direction: rtl;
+                font: 20px/1 Ahem;
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-right: 1em solid red;
+            }
+            div div
+            {
+                border-right: 1em solid black;
+                margin-right: -7em;
+                right: 6em;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-080.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-080.xht
new file mode 100644
index 0000000..2877705
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-080.xht
@@ -0,0 +1,39 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Right using 'em' units with a positive nominal value, +6em</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-25 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-right" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="right-079-ref.xht" />
+
+        <meta name="flags" content="ahem" />
+        <meta name="assert" content="The 'right' property sets a positive nominal length value in 'em' units." />
+        <style type="text/css">
+            div
+            {
+                direction: rtl;
+                font: 20px/1 Ahem;
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-right: 1em solid red;
+            }
+            div div
+            {
+                border-right: 1em solid black;
+                margin-right: -7em;
+                right: +6em;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-088.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-088.xht
new file mode 100644
index 0000000..70e4d936
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-088.xht
@@ -0,0 +1,38 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Right using 'ex' units with a value of negative zero, -0ex</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-25 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-right" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="right-004-ref.xht" />
+
+        <meta name="flags" content="ahem" />
+        <meta name="assert" content="The 'right' property sets a negative zero length value in 'ex' units." />
+        <style type="text/css">
+            div
+            {
+                direction: rtl;
+                font: 20px/1 Ahem;
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-right: 5px solid orange;
+            }
+            div div
+            {
+                border-right: 5px solid blue;
+                right: -0ex;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-089.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-089.xht
new file mode 100644
index 0000000..850e821
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-089.xht
@@ -0,0 +1,38 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Right using 'ex' units with a value of zero, 0ex</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-25 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-right" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="right-004-ref.xht" />
+
+        <meta name="flags" content="ahem" />
+        <meta name="assert" content="The 'right' property sets a zero length value in 'ex' units." />
+        <style type="text/css">
+            div
+            {
+                direction: rtl;
+                font: 20px/1 Ahem;
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-right: 5px solid orange;
+            }
+            div div
+            {
+                border-right: 5px solid blue;
+                right: 0ex;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-090.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-090.xht
new file mode 100644
index 0000000..c5608311
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-090.xht
@@ -0,0 +1,38 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Right using 'ex' units with a value of positive zero, +0ex</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-25 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-right" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="right-004-ref.xht" />
+
+        <meta name="flags" content="ahem" />
+        <meta name="assert" content="The 'right' property sets a positive zero length value in 'ex' units." />
+        <style type="text/css">
+            div
+            {
+                direction: rtl;
+                font: 20px/1 Ahem;
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-right: 5px solid orange;
+            }
+            div div
+            {
+                border-right: 5px solid blue;
+                right: +0ex;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-091.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-091.xht
new file mode 100644
index 0000000..d86f7465
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-091.xht
@@ -0,0 +1,39 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Right using 'ex' units with a nominal value, 7.5ex</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-25 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-right" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="right-019-ref.xht" />
+
+        <meta name="flags" content="ahem" />
+        <meta name="assert" content="The 'right' property sets a nominal length value in 'ex' units." />
+        <style type="text/css">
+            div
+            {
+                direction: rtl;
+                font: 20px/1 Ahem;
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-right: 96px solid red;
+            }
+            div div
+            {
+                border-right: 96px solid black;
+                margin-right: -12ex;
+                right: 6ex;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-092.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-092.xht
new file mode 100644
index 0000000..32adb9d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-092.xht
@@ -0,0 +1,39 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Right using 'ex' units with a positive nominal value, +7.5ex</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-25 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-right" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="right-019-ref.xht" />
+
+        <meta name="flags" content="ahem" />
+        <meta name="assert" content="The 'right' property sets a positive nominal length value in 'ex' units." />
+        <style type="text/css">
+            div
+            {
+                direction: rtl;
+                font: 20px/1 Ahem;
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-right: 96px solid red;
+            }
+            div div
+            {
+                border-right: 96px solid black;
+                margin-right: -12ex;
+                right: +6ex;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-100-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-100-ref.xht
new file mode 100644
index 0000000..9f240b4
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-100-ref.xht
@@ -0,0 +1,24 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div {padding-left: 91px;}
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+
+  <div><img src="support/blue15x15.png" width="5" height="96" alt="Image download support must be enabled" /><img src="support/swatch-orange.png" width="5" height="96" alt="Image download support must be enabled" /></div>
+
+ </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-100.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-100.xht
new file mode 100644
index 0000000..7c26baf
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-100.xht
@@ -0,0 +1,38 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Right using percentages with a value of negative zero, -0%</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-25 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-right" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="right-100-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'right' property sets a negative zero length value in percentages." />
+        <style type="text/css">
+            div
+            {
+                direction: rtl;
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-right: 5px solid orange;
+                width: 1in;
+            }
+            div div
+            {
+                border-right: 5px solid blue;
+                right: -0%;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-101.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-101.xht
new file mode 100644
index 0000000..168f4fa
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-101.xht
@@ -0,0 +1,38 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Right using percentages with a value of zero, 0%</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-25 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-right" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="right-100-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'right' property sets a zero length value in percentages." />
+        <style type="text/css">
+            div
+            {
+                direction: rtl;
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-right: 5px solid orange;
+                width: 1in;
+            }
+            div div
+            {
+                border-right: 5px solid blue;
+                right: 0%;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-102.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-102.xht
new file mode 100644
index 0000000..c9dfbfa9
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-102.xht
@@ -0,0 +1,38 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Right using percentages with a value of positive zero, +0%</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-25 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-right" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="right-100-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'right' property sets a positive zero length value in percentages." />
+        <style type="text/css">
+            div
+            {
+                direction: rtl;
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-right: 5px solid orange;
+                width: 1in;
+            }
+            div div
+            {
+                border-right: 5px solid blue;
+                right: +0%;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-103-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-103-ref.xht
new file mode 100644
index 0000000..142e0dc5
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-103-ref.xht
@@ -0,0 +1,24 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div {padding-left: 96px;}
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if there is <strong>no red</strong>.</p>
+
+  <div><img src="support/black15x15.png" width="96" height="96" alt="Image download support must be enabled" /></div>
+
+ </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-103.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-103.xht
new file mode 100644
index 0000000..c525e1a
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-103.xht
@@ -0,0 +1,39 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Right using percentages with a nominal value, 100%</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-25 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-right" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="right-103-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'right' property sets a nominal length value in percentages." />
+        <style type="text/css">
+            div
+            {
+                direction: rtl;
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-right: 1in solid red;
+                width: 1in;
+            }
+            div div
+            {
+                border-right: 1in solid black;
+                margin-right: -2in;
+                right: 100%;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-104.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-104.xht
new file mode 100644
index 0000000..d45c353
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-104.xht
@@ -0,0 +1,39 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Right using percentages with a positive nominal value, +100%</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-25 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-right" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="right-103-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'right' property sets a positive nominal length value in percentages." />
+        <style type="text/css">
+            div
+            {
+                direction: rtl;
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-right: 1in solid red;
+                width: 1in;
+            }
+            div div
+            {
+                border-right: 1in solid black;
+                margin-right: -2in;
+                right: +100%;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-109.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-109.xht
new file mode 100644
index 0000000..8f929f6
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-109.xht
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Right with a value of negative zero and no units, -0</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-25 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-right" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="right-004-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'right' property sets a negative zero length value with no units." />
+        <style type="text/css">
+            div
+            {
+                direction: rtl;
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-right: 5px solid orange;
+            }
+            div div
+            {
+                border-right: 5px solid blue;
+                right: -0;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-110.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-110.xht
new file mode 100644
index 0000000..9e6a8de8
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-110.xht
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Right with a value of zero and no units, 0</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-25 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-right" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="right-004-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'right' property sets a zero length value with no units." />
+        <style type="text/css">
+            div
+            {
+                direction: rtl;
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-right: 5px solid orange;
+            }
+            div div
+            {
+                border-right: 5px solid blue;
+                right: 0;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-111.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-111.xht
new file mode 100644
index 0000000..e0d83611
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-111.xht
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Right with a value of positive zero and no units, +0</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-25 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-right" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="right-004-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'right' property sets a positive zero length value with no units." />
+        <style type="text/css">
+            div
+            {
+                direction: rtl;
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-right: 5px solid orange;
+            }
+            div div
+            {
+                border-right: 5px solid blue;
+                right: +0;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-112.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-112.xht
new file mode 100644
index 0000000..dad15c2
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-112.xht
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Right with a value of 'auto'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-25 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-right" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="right-004-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'right' property sets a value of 'auto'." />
+        <style type="text/css">
+            div
+            {
+                direction: rtl;
+                height: 1in;
+                position: relative;
+            }
+            #div1
+            {
+                border-right: 5px solid orange;
+            }
+            div div
+            {
+                border-right: 5px solid blue;
+                right: auto;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-113.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-113.xht
new file mode 100644
index 0000000..b69a080b
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-113.xht
@@ -0,0 +1,46 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Right with a value of 'inherit'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-25 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-right" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="right-103-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'right' property sets a value of 'inherit'." />
+        <style type="text/css">
+            div
+            {
+                direction: rtl;
+                height: 1in;
+                position: relative;
+            }
+            #wrapper
+            {
+                width: 5in;
+            }
+            #div1
+            {
+                border-right: 1in solid red;
+                right: 100%;
+                width: 1in;
+            }
+            div div
+            {
+                border-right: 1in solid black;
+                margin-right: -2in;
+                right: inherit;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="wrapper">
+            <div id="div1">
+                <div></div>
+            </div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-applies-to-001-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-applies-to-001-ref.xht
new file mode 100644
index 0000000..c662be58
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-applies-to-001-ref.xht
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  body {margin-right: 0;}
+
+  div {text-align: right;}
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if there is a green square on the right side of the page.</p>
+
+  <div><img src="support/1x1-green.png" width="96" height="96" alt="Image download support must be enabled" /></div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-applies-to-001.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-applies-to-001.xht
new file mode 100644
index 0000000..2c64698d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-applies-to-001.xht
@@ -0,0 +1,49 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Right applied to element with 'display' set to 'table-row-group'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-25 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-right" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="right-applies-to-001-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'right' property applies to elements with a display of 'table-row-group'." />
+        <style type="text/css">
+            #test
+            {
+                right: 0;
+                display: table-row-group;
+                position: absolute;
+            }
+            #table
+            {
+                display: table;
+                table-layout: fixed;
+            }
+            #row
+            {
+                display: table-row;
+            }
+            #cell
+            {
+                background: green;
+                display: table-cell;
+                height: 1in;
+                width: 1in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a green square on the right side of the page.</p>
+        <div id="table">
+            <div id="test">
+                <div id="row">
+                    <div id="cell"></div>
+                </div>
+            </div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-applies-to-002.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-applies-to-002.xht
new file mode 100644
index 0000000..358fa0de
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-applies-to-002.xht
@@ -0,0 +1,49 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Right applied to element with 'display' set to 'table-header-group'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-25 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-right" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="right-applies-to-001-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'right' property applies to elements with a display of 'table-header-group'." />
+        <style type="text/css">
+            #test
+            {
+                background: green;
+                right: 0;
+                display: table-header-group;
+                position: absolute;
+            }
+            #table
+            {
+                display: table;
+                table-layout: fixed;
+            }
+            #row
+            {
+                display: table-row;
+            }
+            #cell
+            {
+                display: table-cell;
+                height: 1in;
+                width: 1in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a green square on the right side of the page.</p>
+        <div id="table">
+            <div id="test">
+                <div id="row">
+                    <div id="cell"></div>
+                </div>
+            </div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-applies-to-003.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-applies-to-003.xht
new file mode 100644
index 0000000..623d0263
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-applies-to-003.xht
@@ -0,0 +1,49 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Right applied to element with 'display' set to 'table-footer-group'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-25 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-right" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="right-applies-to-001-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'right' property applies to elements with a display of 'table-footer-group'." />
+        <style type="text/css">
+            #test
+            {
+                background: green;
+                right: 0;
+                display: table-footer-group;
+                position: absolute;
+            }
+            #table
+            {
+                display: table;
+                table-layout: fixed;
+            }
+            #row
+            {
+                display: table-row;
+            }
+            #cell
+            {
+                display: table-cell;
+                height: 1in;
+                width: 1in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a green square on the right side of the page.</p>
+        <div id="table">
+            <div id="test">
+                <div id="row">
+                    <div id="cell"></div>
+                </div>
+            </div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-applies-to-004.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-applies-to-004.xht
new file mode 100644
index 0000000..9268dbc
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-applies-to-004.xht
@@ -0,0 +1,43 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Right applied to element with 'display' set to 'table-row'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-25 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-right" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="right-applies-to-001-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'right' property applies to elements with a display of 'table-row'." />
+        <style type="text/css">
+            #test
+            {
+                background: green;
+                right: 0;
+                display: table-row;
+                position: absolute;
+            }
+            #table
+            {
+                display: table;
+                table-layout: fixed;
+            }
+            #cell
+            {
+                display: table-cell;
+                height: 1in;
+                width: 1in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a green square on the right side of the page.</p>
+        <div id="table">
+            <div id="test">
+                <div id="cell"></div>
+            </div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-applies-to-005.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-applies-to-005.xht
new file mode 100644
index 0000000..a49e11b
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-applies-to-005.xht
@@ -0,0 +1,48 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Right applied to element with 'display' set to 'table-column-group'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-25 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-right" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="right-applies-to-001-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'right' property applies to elements with a display of 'table-column-group'." />
+        <style type="text/css">
+            #test
+            {
+                background: green;
+                right: 0;
+                display: table-column-group;
+                height: 1in;
+                position: absolute;
+                width: 1in;
+            }
+            #table
+            {
+                display: table;
+                table-layout: fixed;
+            }
+            #row
+            {
+                display: table-row;
+            }
+            #cell
+            {
+                display: table-cell;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a green square on the right side of the page.</p>
+        <div id="table">
+            <div id="test"></div>
+            <div id="row">
+                <div id="cell"></div>
+            </div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-applies-to-006.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-applies-to-006.xht
new file mode 100644
index 0000000..301a5de
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-applies-to-006.xht
@@ -0,0 +1,48 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Right applied to element with 'display' set to 'table-column'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-25 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-right" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="right-applies-to-001-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'right' property applies to elements with a display of 'table-column'." />
+        <style type="text/css">
+            #test
+            {
+                background: green;
+                right: 0;
+                display: table-column;
+                height: 1in;
+                position: absolute;
+                width: 1in;
+            }
+            #table
+            {
+                display: table;
+                table-layout: fixed;
+            }
+            #row
+            {
+                display: table-row;
+            }
+            #cell
+            {
+                display: table-cell;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a green square on the right side of the page.</p>
+        <div id="table">
+            <div id="test"></div>
+            <div id="row">
+                <div id="cell"></div>
+            </div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-applies-to-007.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-applies-to-007.xht
new file mode 100644
index 0000000..7707856
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-applies-to-007.xht
@@ -0,0 +1,43 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Right applied to element with 'display' set to 'table-cell'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-25 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-right" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="right-applies-to-001-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'right' property applies to elements with a display of 'table-cell'." />
+        <style type="text/css">
+            #table
+            {
+                display: table;
+                table-layout: fixed;
+            }
+            #row
+            {
+                display: table-row;
+            }
+            #cell
+            {
+                background: green;
+                right: 0;
+                display: table-cell;
+                height: 1in;
+                position: absolute;
+                width: 1in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a green square on the right side of the page.</p>
+        <div id="table">
+            <div id="row">
+                <div id="cell"></div>
+            </div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-applies-to-008.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-applies-to-008.xht
new file mode 100644
index 0000000..1c68c87
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-applies-to-008.xht
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Right applied to element with 'display' set to inline</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-25 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-right" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'right' property applies to elements with a display of inline." />
+        <style type="text/css">
+            div
+            {
+                background: green;
+                right: 0;
+                display: inline;
+                position: absolute;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a green stripe on the right side of the page.</p>
+        <div>Filler Text</div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-applies-to-009.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-applies-to-009.xht
new file mode 100644
index 0000000..6f79cf3
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-applies-to-009.xht
@@ -0,0 +1,32 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Right applied to element with 'display' set to block</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-25 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-right" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="right-applies-to-001-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'right' property applies to elements with a display of block." />
+        <style type="text/css">
+            span
+            {
+                background: green;
+                right: 0;
+                display: block;
+                height: 1in;
+                position: absolute;
+                width: 1in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a green square on the right side of the page.</p>
+        <div>
+            <span></span>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-applies-to-010.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-applies-to-010.xht
new file mode 100644
index 0000000..93f55c5
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-applies-to-010.xht
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Right applied to element with 'display' set to list-item</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-25 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-right" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'right' property applies to elements with a display of list-item." />
+        <style type="text/css">
+            div
+            {
+                background: green;
+                right: 0;
+                display: list-item;
+                height: 1in;
+                position: absolute;
+                width: 1in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a green square at the right side of the page and a marker bullet on its left-hand side.</p>
+        <div></div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-applies-to-012.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-applies-to-012.xht
new file mode 100644
index 0000000..9ae4ecb
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-applies-to-012.xht
@@ -0,0 +1,40 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Right applied to element with 'display' set to inline-block</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-25 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-right" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="right-applies-to-001-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'right' property applies to elements with a display of inline-block." />
+        <style type="text/css">
+           span#inline-block
+            {
+                right: 0;
+                display: inline-block;
+                position: absolute;
+            }
+
+			span.block-descendant
+			{
+	            background: green;
+				display: block;
+       	        height: 0.5in;
+        	    width: 1in;
+			}
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a green square on the right side of the page.</p>
+        <div>
+	        <span id="inline-block">
+				<span class="block-descendant"></span>
+				<span class="block-descendant"></span>
+        	</span>
+        </div>
+    </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-applies-to-013.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-applies-to-013.xht
new file mode 100644
index 0000000..70a9576
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-applies-to-013.xht
@@ -0,0 +1,43 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Right applied to element with 'display' set to 'table'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-25 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-right" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="right-applies-to-001-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'right' property applies to elements with a display of 'table'." />
+        <style type="text/css">
+            #table
+            {
+                background: green;
+                right: 0;
+                display: table;
+                table-layout: fixed;
+                height: 1in;
+                position: absolute;
+                width: 1in;
+            }
+            #row
+            {
+                display: table-row;
+            }
+            #cell
+            {
+                display: table-cell;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a green square on the right side of the page.</p>
+        <div id="table">
+            <div id="row">
+                <div id="cell"></div>
+            </div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-applies-to-014.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-applies-to-014.xht
new file mode 100644
index 0000000..9e50949
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-applies-to-014.xht
@@ -0,0 +1,43 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Right applied to element with 'display' set to 'inline-table'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-25 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-right" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="right-applies-to-001-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'right' property applies to elements with a display of 'inline-table'." />
+        <style type="text/css">
+            #table
+            {
+                background: green;
+                right: 0;
+                display: inline-table;
+                table-layout: fixed;
+                height: 1in;
+                position: absolute;
+                width: 1in;
+            }
+            #row
+            {
+                display: table-row;
+            }
+            #cell
+            {
+                display: table-cell;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a green square on the right side of the page.</p>
+        <div id="table">
+            <div id="row">
+                <div id="cell"></div>
+            </div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-applies-to-015.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-applies-to-015.xht
new file mode 100644
index 0000000..ae266cea
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-applies-to-015.xht
@@ -0,0 +1,47 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Right applied to element with 'display' set to 'table-caption'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-25 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-right" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="right-applies-to-001-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'right' property applies to elements with a display of 'table-caption'." />
+        <style type="text/css">
+            #caption
+            {
+                background: green;
+                right: 0;
+                display: table-caption;
+                height: 1in;
+                position: absolute;
+                width: 1in;
+            }
+            #table
+            {
+                display: table;
+            }
+            #row
+            {
+                display: table-row;
+            }
+            #cell
+            {
+                display: table-cell;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a green square on the right side of the page.</p>
+        <div id="table">
+            <div id="caption"></div>
+            <div id="row">
+                <div id="cell"></div>
+            </div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-offset-001-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-offset-001-ref.xht
new file mode 100644
index 0000000..d7715d8
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-offset-001-ref.xht
@@ -0,0 +1,29 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div#inline-block {display: inline-block;}
+
+  img {vertical-align: top;}
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if there is a blue square with its top-left corner missing.</p>
+
+  <div id="inline-block">
+  		<div><img src="support/1x1-white.png" width="50" height="50" alt="Image download support must be enabled" /><img src="support/blue15x15.png" width="50" height="50" alt="Image download support must be enabled" /></div>
+  		<div><img src="support/blue15x15.png" width="50" height="50" alt="Image download support must be enabled" /><img src="support/blue15x15.png" width="50" height="50" alt="Image download support must be enabled" /></div>
+  </div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-offset-001.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-offset-001.xht
new file mode 100644
index 0000000..3736a8f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-offset-001.xht
@@ -0,0 +1,42 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: 'right' property defines the offset from the right edge of the containing block</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-25 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-right" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="right-offset-001-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'right' property, for absolute positioning, specifies the offset of the element in relation to the containing block's right edge. The containing block of an absolutely positioned element is formed by the padding box of its nearest (closest) positioned ancestor element." />
+        <style type="text/css">
+            div
+            {
+                height: 100px;
+                position: relative;
+                width: 100px;
+            }
+            #div1
+            {
+                background: blue;
+            }
+            #div2
+            {
+                background: white;
+                height: 50px;
+                position: absolute;
+                right: 50px;
+                top: 0;
+                width: 50px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a blue square with its top-left corner missing.</p>
+        <div>
+            <div id="div1"></div>
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-offset-002.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-offset-002.xht
new file mode 100644
index 0000000..87f3bbe
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-offset-002.xht
@@ -0,0 +1,40 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Position 'right' property defines the offset from the right of the box itself for relative positioning</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-25 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-right" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="left-offset-001-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'right' property, for relative positioning, specifies the offset of the box itself from the right toward the left. If 'left' is 'auto', then its used value is minus the value of 'right' in which case the box will move from the right toward the left by the value of 'right'." />
+        <style type="text/css">
+            #div1
+            {
+                background: blue;
+                height: 100px;
+                position: relative;
+                width: 100px;
+            }
+            div div
+            {
+                background: white;
+                height: 50px;
+                position: relative;
+                right: -50px;
+                /* In this testcase, right offset is -50px;
+                so, it will move toward the right from its
+                normal in-flow position by a value of 50px. */
+                width: 50px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a blue square with its top-right corner missing.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-offset-003.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-offset-003.xht
new file mode 100644
index 0000000..319a815
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-offset-003.xht
@@ -0,0 +1,45 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: 'right' property defines the offset from the right edge of the containing block</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-25 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-right" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="right-offset-001-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'right' property, for absolute positioning, specifies the offset of the element in relation to the containing block's right edge. The containing block of an absolutely positioned element is formed by the padding box of its nearest (closest) positioned ancestor element." />
+
+        <style type="text/css">
+            #container
+            {
+                height: 100px;
+                padding-right: 25px;
+                position: relative;
+                width: 100px;
+            }
+            #div1
+            {
+                background: white;
+                height: 50px;
+                position: absolute;
+                right: 75px;
+                width: 50px;
+            }
+            #div2
+            {
+                background: blue;
+                height: 100px;
+                width: 100px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a blue square with its top-left corner missing.</p>
+        <div id="container">
+            <div id="div1"></div>
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-offset-004.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-offset-004.xht
new file mode 100644
index 0000000..f6d327357
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-offset-004.xht
@@ -0,0 +1,33 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+   <title>CSS Test: right box offset - position relative</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+  <link rel="help" title="9.3.2 Box offsets: 'top', 'right', 'bottom', 'left'" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+  <link rel="match" href="../reference/ref-filled-green-100px-square.xht" />
+
+  <meta content="image" name="flags" />
+  <meta content="The 'right' property, for relative positioning, specifies the offset of the box itself from its normal in-flow position, from the position it would have had if it had been static." name="assert" />
+
+  <style type="text/css"><![CDATA[
+  img#rel-pos-overlapping-green
+  {
+  position: relative;
+  right: 100px;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
+
+  <div><img src="support/100x100-red.png" width="100" height="100" alt="Image download support must be enabled" /><img id="rel-pos-overlapping-green" src="support/swatch-green.png" width="100" height="100" alt="Image download support must be enabled" /></div>
+
+ </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-offset-percentage-001-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-offset-percentage-001-ref.xht
new file mode 100644
index 0000000..32d5a22
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-offset-percentage-001-ref.xht
@@ -0,0 +1,29 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div
+  {
+  border: black solid medium;
+  height: 200px;
+  width: 100px;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if a blue square is in the top-left corner of an hollow black rectangle.</p>
+
+  <div><img src="support/blue15x15.png" width="50" height="50" alt="Image download support must be enabled" /></div>
+
+ </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-offset-percentage-001.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-offset-percentage-001.xht
new file mode 100644
index 0000000..a8a2923
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/right-offset-percentage-001.xht
@@ -0,0 +1,38 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Right offset using percentage</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-25 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-right" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="right-offset-percentage-001-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="Percentage offset values for the 'right' property are based off the width of the containing block." />
+        <style type="text/css">
+            #div1
+            {
+                border: solid black;
+                height: 200px;
+                position: relative;
+                width: 100px;
+            }
+            div div
+            {
+                background: blue;
+                height: 50px;
+                margin-left: 50px;
+                position: absolute;
+                right: 50%;
+                width: 50px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if a blue square is in the top-left corner of an hollow black rectangle.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/100x100-lime.png b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/100x100-lime.png
new file mode 100644
index 0000000..1b94770
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/100x100-lime.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/100x100-red.png b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/100x100-red.png
new file mode 100644
index 0000000..57bf3dd
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/100x100-red.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/1x1-green.png b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/1x1-green.png
new file mode 100644
index 0000000..b98ca0ba
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/1x1-green.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/1x1-lime.png b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/1x1-lime.png
new file mode 100644
index 0000000..cb397fb
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/1x1-lime.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/1x1-maroon.png b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/1x1-maroon.png
new file mode 100644
index 0000000..3f86b07
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/1x1-maroon.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/1x1-navy.png b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/1x1-navy.png
new file mode 100644
index 0000000..9b9a0395
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/1x1-navy.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/1x1-red.png b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/1x1-red.png
new file mode 100644
index 0000000..6bd73ac
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/1x1-red.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/1x1-white.png b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/1x1-white.png
new file mode 100644
index 0000000..dd43fae
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/1x1-white.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/60x60-gg-rr.png b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/60x60-gg-rr.png
new file mode 100644
index 0000000..84f5b2a4
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/60x60-gg-rr.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/60x60-green.png b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/60x60-green.png
new file mode 100644
index 0000000..b3c8cf3eb
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/60x60-green.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/60x60-red.png b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/60x60-red.png
new file mode 100644
index 0000000..823f125
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/60x60-red.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/a-green.css b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/a-green.css
new file mode 100644
index 0000000..b0dbb07
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/a-green.css
@@ -0,0 +1 @@
+.a { color: green; }
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/b-green.css b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/b-green.css
new file mode 100644
index 0000000..a0473f5
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/b-green.css
@@ -0,0 +1 @@
+.b { color: green; }
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/black15x15.png b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/black15x15.png
new file mode 100644
index 0000000..b1bbef2
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/black15x15.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/blue15x15.png b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/blue15x15.png
new file mode 100644
index 0000000..89de32f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/blue15x15.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/blue96x96.png b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/blue96x96.png
new file mode 100644
index 0000000..820f8cace
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/blue96x96.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/c-red.css b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/c-red.css
new file mode 100644
index 0000000..d4ba5c6
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/c-red.css
@@ -0,0 +1 @@
+.c { color: red; }
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/cat.png b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/cat.png
new file mode 100644
index 0000000..85dd732
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/cat.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/diamond.png b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/diamond.png
new file mode 100644
index 0000000..51112ef
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/diamond.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/green-rectangle-50wideBy10tall.png b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/green-rectangle-50wideBy10tall.png
new file mode 100644
index 0000000..9f43666ee
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/green-rectangle-50wideBy10tall.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/green15x15.png b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/green15x15.png
new file mode 100644
index 0000000..5174158
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/green15x15.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/green_box.png b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/green_box.png
new file mode 100644
index 0000000..6ed4aa50
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/green_box.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/pattern-grg-rrg-rgg.png b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/pattern-grg-rrg-rgg.png
new file mode 100644
index 0000000..fcf4f3f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/pattern-grg-rrg-rgg.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/pattern-tr.png b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/pattern-tr.png
new file mode 100644
index 0000000..8b4b253
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/pattern-tr.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/red_box.png b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/red_box.png
new file mode 100644
index 0000000..57bf3dd
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/red_box.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/ring.png b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/ring.png
new file mode 100644
index 0000000..061bb94
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/ring.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/square-purple.png b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/square-purple.png
new file mode 100644
index 0000000..0f522d7
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/square-purple.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/square-teal.png b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/square-teal.png
new file mode 100644
index 0000000..e567f51
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/square-teal.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/square-white.png b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/square-white.png
new file mode 100644
index 0000000..5853cbb
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/square-white.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/swatch-blue.png b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/swatch-blue.png
new file mode 100644
index 0000000..bf27596
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/swatch-blue.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/swatch-green.png b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/swatch-green.png
new file mode 100644
index 0000000..0aa79b0
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/swatch-green.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/swatch-lime.png b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/swatch-lime.png
new file mode 100644
index 0000000..55fd7fd
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/swatch-lime.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/swatch-orange.png b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/swatch-orange.png
new file mode 100644
index 0000000..d3cd498b
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/swatch-orange.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/swatch-red.png b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/swatch-red.png
new file mode 100644
index 0000000..1caf25c
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/swatch-red.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/swatch-white.png b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/swatch-white.png
new file mode 100644
index 0000000..1a7d4323
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/swatch-white.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/swatch-yellow.png b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/swatch-yellow.png
new file mode 100644
index 0000000..1591aa0
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/swatch-yellow.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/test-bl.png b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/test-bl.png
new file mode 100644
index 0000000..904e24e9
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/test-bl.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/test-br.png b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/test-br.png
new file mode 100644
index 0000000..f413ff5c
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/test-br.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/test-outer.png b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/test-outer.png
new file mode 100644
index 0000000..82eeace7
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/test-outer.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/test-tl.png b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/test-tl.png
new file mode 100644
index 0000000..f6ac0ef
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/test-tl.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/test-tr.png b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/test-tr.png
new file mode 100644
index 0000000..59843ae5
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/support/test-tr.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-004.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-004.xht
new file mode 100644
index 0000000..243153b
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-004.xht
@@ -0,0 +1,35 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Top using pixels with a value of negative zero, -0px</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-top" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="../reference/ref-no-vert-space-between.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'top' property sets a negative zero length value in pixels." />
+        <style type="text/css">
+            div
+            {
+                position: relative;
+            }
+            #div1
+            {
+                border-top: blue solid 5px;
+            }
+            #div2
+            {
+                border-top: orange solid 5px;
+                top: -0px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-005.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-005.xht
new file mode 100644
index 0000000..7ab9c473
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-005.xht
@@ -0,0 +1,35 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Top using pixels with a value of zero, 0px</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-top" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="../reference/ref-no-vert-space-between.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'top' property sets a zero length value in pixels." />
+        <style type="text/css">
+            div
+            {
+                position: relative;
+            }
+            #div1
+            {
+                border-top: blue solid 5px;
+            }
+            #div2
+            {
+                border-top: orange solid 5px;
+                top: 0px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-006.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-006.xht
new file mode 100644
index 0000000..f2165c0
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-006.xht
@@ -0,0 +1,35 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Top using pixels with a value of positive zero, +0px</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-top" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="../reference/ref-no-vert-space-between.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'top' property sets a positive zero length value in pixels." />
+        <style type="text/css">
+            div
+            {
+                position: relative;
+            }
+            #div1
+            {
+                border-top: blue solid 5px;
+            }
+            #div2
+            {
+                border-top: orange solid 5px;
+                top: +0px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-007-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-007-ref.xht
new file mode 100644
index 0000000..9432920
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-007-ref.xht
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div
+  {
+  background-color: black;
+  height: 3px;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if there is <strong>no red</strong>.</p>
+
+  <div></div>
+
+ </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-007.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-007.xht
new file mode 100644
index 0000000..82a5f8e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-007.xht
@@ -0,0 +1,36 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Top using pixels with a nominal value, 96px</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-26 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-top" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="top-007-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'top' property sets a nominal length value in pixels." />
+        <style type="text/css">
+            div
+            {
+                position: relative;
+            }
+            #div1
+            {
+                border-top: 3px solid red;
+            }
+            #div2
+            {
+                border-top: 3px solid black;
+                margin-top: -99px;
+                top: 96px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-008.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-008.xht
new file mode 100644
index 0000000..fa7c17d9
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-008.xht
@@ -0,0 +1,36 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Top using pixels with a positive nominal value, +96px</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-26 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-top" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="top-007-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'top' property sets a positive nominal length value in pixels." />
+        <style type="text/css">
+            div
+            {
+                position: relative;
+            }
+            #div1
+            {
+                border-top: 3px solid red;
+            }
+            #div2
+            {
+                border-top: 3px solid black;
+                margin-top: -99px;
+                top: +96px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-016.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-016.xht
new file mode 100644
index 0000000..f5de614
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-016.xht
@@ -0,0 +1,35 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Top using points with a value of negative zero, -0pt</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-top" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="../reference/ref-no-vert-space-between.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'top' property sets a negative zero length value in points." />
+        <style type="text/css">
+            div
+            {
+                position: relative;
+            }
+            #div1
+            {
+                border-top: blue solid 5px;
+            }
+            #div2
+            {
+                border-top: orange solid 5px;
+                top: -0pt;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-017.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-017.xht
new file mode 100644
index 0000000..77947d8
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-017.xht
@@ -0,0 +1,35 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Top using points with a value of zero, 0pt</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-top" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="../reference/ref-no-vert-space-between.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'top' property sets a zero length value in points." />
+        <style type="text/css">
+            div
+            {
+                position: relative;
+            }
+            #div1
+            {
+                border-top: blue solid 5px;
+            }
+            #div2
+            {
+                border-top: orange solid 5px;
+                top: 0pt;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-018.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-018.xht
new file mode 100644
index 0000000..d79ff65
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-018.xht
@@ -0,0 +1,35 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Top using points with a value of positive zero, +0pt</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-top" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="../reference/ref-no-vert-space-between.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'top' property sets a positive zero length value in points." />
+        <style type="text/css">
+            div
+            {
+                position: relative;
+            }
+            #div1
+            {
+                border-top: blue solid 5px;
+            }
+            #div2
+            {
+                border-top: orange solid 5px;
+                top: +0pt;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-019-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-019-ref.xht
new file mode 100644
index 0000000..5dbb930
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-019-ref.xht
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div
+  {
+  background-color: black;
+  height: 96px;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if there is <strong>no red</strong>.</p>
+
+  <div></div>
+
+ </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-019.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-019.xht
new file mode 100644
index 0000000..cf8c8de
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-019.xht
@@ -0,0 +1,44 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Top using points with a nominal value, 72pt</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-26 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-top" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="top-019-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'top' property sets a nominal length value in points." />
+        <style type="text/css">
+            div
+            {
+                position: relative;
+            }
+            #div1
+            {
+                margin-top: -72pt;
+            }
+            #div2
+            {
+                background: red;
+                height: 72pt;
+                margin-top: 72pt;
+                position: absolute;
+                width: 100%;
+            }
+            #div3
+            {
+                border-bottom: 72pt solid black;
+                top: 72pt;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div id="div2"></div>
+            <div id="div3"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-020.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-020.xht
new file mode 100644
index 0000000..199ff81
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-020.xht
@@ -0,0 +1,44 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Top using points with a positive nominal value, +72pt</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-26 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-top" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="top-019-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'top' property sets a positive nominal length value in points." />
+        <style type="text/css">
+            div
+            {
+                position: relative;
+            }
+            #div1
+            {
+                margin-top: -72pt;
+            }
+            #div2
+            {
+                background: red;
+                height: 72pt;
+                margin-top: 72pt;
+                position: absolute;
+                width: 100%;
+            }
+            #div3
+            {
+                border-bottom: 72pt solid black;
+                top: +72pt;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div id="div2"></div>
+            <div id="div3"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-028.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-028.xht
new file mode 100644
index 0000000..94b25e8
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-028.xht
@@ -0,0 +1,35 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Top using picas with a value of negative zero, -0pc</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-top" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="../reference/ref-no-vert-space-between.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'top' property sets a negative zero length value in picas." />
+        <style type="text/css">
+            div
+            {
+                position: relative;
+            }
+            #div1
+            {
+                border-top: blue solid 5px;
+            }
+            #div2
+            {
+                border-top: orange solid 5px;
+                top: -0pc;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-029.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-029.xht
new file mode 100644
index 0000000..89a3f91
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-029.xht
@@ -0,0 +1,35 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Top using picas with a value of zero, 0pc</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-top" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="../reference/ref-no-vert-space-between.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'top' property sets a zero length value in picas." />
+        <style type="text/css">
+            div
+            {
+                position: relative;
+            }
+            #div1
+            {
+                border-top: blue solid 5px;
+            }
+            #div2
+            {
+                border-top: orange solid 5px;
+                top: 0pc;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-030.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-030.xht
new file mode 100644
index 0000000..fe45b372
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-030.xht
@@ -0,0 +1,35 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Top using picas with a value of positive zero, +0pc</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-top" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="../reference/ref-no-vert-space-between.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'top' property sets a positive zero length value in picas." />
+        <style type="text/css">
+            div
+            {
+                position: relative;
+            }
+            #div1
+            {
+                border-top: blue solid 5px;
+            }
+            #div2
+            {
+                border-top: orange solid 5px;
+                top: +0pc;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-031.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-031.xht
new file mode 100644
index 0000000..eb38536
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-031.xht
@@ -0,0 +1,44 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Top using picas with a nominal value, 6pc</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-26 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-top" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="top-007-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'top' property sets a nominal length value in picas." />
+        <style type="text/css">
+            div
+            {
+                position: relative;
+            }
+            #div1
+            {
+                margin-top: -6pc;
+            }
+            #div2
+            {
+                background: red;
+                height: 3px;
+                margin-top: 6pc;
+                position: absolute;
+                width: 100%;
+            }
+            #div3
+            {
+                border-bottom: 3px solid black;
+                top: 6pc;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div id="div2"></div>
+            <div id="div3"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-032.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-032.xht
new file mode 100644
index 0000000..9946a541
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-032.xht
@@ -0,0 +1,44 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Top using picas with a positive nominal value, +6pc</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-26 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-top" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="top-007-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'top' property sets a positive nominal length value in picas." />
+        <style type="text/css">
+            div
+            {
+                position: relative;
+            }
+            #div1
+            {
+                margin-top: -6pc;
+            }
+            #div2
+            {
+                background: red;
+                height: 3px;
+                margin-top: 6pc;
+                position: absolute;
+                width: 100%;
+            }
+            #div3
+            {
+                border-bottom: 3px solid black;
+                top: +6pc;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div id="div2"></div>
+            <div id="div3"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-040.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-040.xht
new file mode 100644
index 0000000..6857245e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-040.xht
@@ -0,0 +1,35 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Top using centimeters with a value of negative zero, -0cm</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-top" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="../reference/ref-no-vert-space-between.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'top' property sets a negative zero length value in centimeters." />
+        <style type="text/css">
+            div
+            {
+                position: relative;
+            }
+            #div1
+            {
+                border-top: blue solid 5px;
+            }
+            #div2
+            {
+                border-top: orange solid 5px;
+                top: -0cm;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-041.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-041.xht
new file mode 100644
index 0000000..7583c61
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-041.xht
@@ -0,0 +1,35 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Top using centimeters with a value of zero, 0cm</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-top" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="../reference/ref-no-vert-space-between.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'top' property sets a zero length value in centimeters." />
+        <style type="text/css">
+            div
+            {
+                position: relative;
+            }
+            #div1
+            {
+                border-top: blue solid 5px;
+            }
+            #div2
+            {
+                border-top: orange solid 5px;
+                top: 0cm;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-042.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-042.xht
new file mode 100644
index 0000000..ccf3bcd18
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-042.xht
@@ -0,0 +1,35 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Top using centimeters with a value of positive zero, +0cm</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-top" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="../reference/ref-no-vert-space-between.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'top' property sets a positive zero length value in centimeters." />
+        <style type="text/css">
+            div
+            {
+                position: relative;
+            }
+            #div1
+            {
+                border-top: blue solid 5px;
+            }
+            #div2
+            {
+                border-top: orange solid 5px;
+                top: +0cm;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-043.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-043.xht
new file mode 100644
index 0000000..e26e6f9
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-043.xht
@@ -0,0 +1,44 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Top using centimeters with a nominal value, 2.54cm</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-26 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-top" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="top-019-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'top' property sets a nominal length value in centimeters." />
+        <style type="text/css">
+            div
+            {
+                position: relative;
+            }
+            #div1
+            {
+                margin-top: -2.54cm;
+            }
+            #div2
+            {
+                background: red;
+                height: 2.54cm;
+                margin-top: 2.54cm;
+                position: absolute;
+                width: 100%;
+            }
+            #div3
+            {
+                border-bottom: 2.54cm solid black;
+                top: 2.54cm;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div id="div2"></div>
+            <div id="div3"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-044.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-044.xht
new file mode 100644
index 0000000..047e1b2
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-044.xht
@@ -0,0 +1,44 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Top using centimeters with a positive nominal value, +2.54cm</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-26 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-top" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="top-019-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'top' property sets a positive nominal length value in centimeters." />
+        <style type="text/css">
+            div
+            {
+                position: relative;
+            }
+            #div1
+            {
+                margin-top: -2.54cm;
+            }
+            #div2
+            {
+                background: red;
+                height: 2.54cm;
+                margin-top: 2.54cm;
+                position: absolute;
+                width: 100%;
+            }
+            #div3
+            {
+                border-bottom: 2.54cm solid black;
+                top: +2.54cm;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div id="div2"></div>
+            <div id="div3"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-052.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-052.xht
new file mode 100644
index 0000000..3c71d97
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-052.xht
@@ -0,0 +1,35 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Top using millimeters with a value of negative zero, -0mm</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-top" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="../reference/ref-no-vert-space-between.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'top' property sets a negative zero length value in millimeters." />
+        <style type="text/css">
+            div
+            {
+                position: relative;
+            }
+            #div1
+            {
+                border-top: blue solid 5px;
+            }
+            #div2
+            {
+                border-top: orange solid 5px;
+                top: -0mm;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-053.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-053.xht
new file mode 100644
index 0000000..5ed7a1f2
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-053.xht
@@ -0,0 +1,35 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Top using millimeters with a value of zero, 0mm</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-top" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="../reference/ref-no-vert-space-between.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'top' property sets a zero length value in millimeters." />
+        <style type="text/css">
+            div
+            {
+                position: relative;
+            }
+            #div1
+            {
+                border-top: blue solid 5px;
+            }
+            #div2
+            {
+                border-top: orange solid 5px;
+                top: 0mm;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-054.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-054.xht
new file mode 100644
index 0000000..40c7c25
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-054.xht
@@ -0,0 +1,35 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Top using millimeters with a value of positive zero, +0mm</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-top" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="../reference/ref-no-vert-space-between.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'top' property sets a positive zero length value in millimeters." />
+        <style type="text/css">
+            div
+            {
+                position: relative;
+            }
+            #div1
+            {
+                border-top: blue solid 5px;
+            }
+            #div2
+            {
+                border-top: orange solid 5px;
+                top: +0mm;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-055.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-055.xht
new file mode 100644
index 0000000..6b5463f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-055.xht
@@ -0,0 +1,44 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Top using millimeters with a nominal value, 25.4mm</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-26 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-top" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="top-019-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'top' property sets a nominal length value in millimeters." />
+        <style type="text/css">
+            div
+            {
+                position: relative;
+            }
+            #div1
+            {
+                margin-top: -25.4mm;
+            }
+            #div2
+            {
+                background: red;
+                height: 25.4mm;
+                margin-top: 25.4mm;
+                position: absolute;
+                width: 100%;
+            }
+            #div3
+            {
+                border-bottom: 25.4mm solid black;
+                top: 25.4mm;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div id="div2"></div>
+            <div id="div3"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-056.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-056.xht
new file mode 100644
index 0000000..40f73c6
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-056.xht
@@ -0,0 +1,44 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Top using millimeters with a positive nominal value, +25.4mm</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-26 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-top" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="top-019-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'top' property sets a positive nominal length value in millimeters." />
+        <style type="text/css">
+            div
+            {
+                position: relative;
+            }
+            #div1
+            {
+                margin-top: -25.4mm;
+            }
+            #div2
+            {
+                background: red;
+                height: 25.4mm;
+                margin-top: 25.4mm;
+                position: absolute;
+                width: 100%;
+            }
+            #div3
+            {
+                border-bottom: 25.4mm solid black;
+                top: +25.4mm;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div id="div2"></div>
+            <div id="div3"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-064.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-064.xht
new file mode 100644
index 0000000..10f285b
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-064.xht
@@ -0,0 +1,35 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Top using inches with a value of negative zero, -0in</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-top" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="../reference/ref-no-vert-space-between.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'top' property sets a negative zero length value in inches." />
+        <style type="text/css">
+            div
+            {
+                position: relative;
+            }
+            #div1
+            {
+                border-top: blue solid 5px;
+            }
+            #div2
+            {
+                border-top: orange solid 5px;
+                top: -0in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-065.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-065.xht
new file mode 100644
index 0000000..b21b608
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-065.xht
@@ -0,0 +1,35 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Top using inches with a value of zero, 0in</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-top" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="../reference/ref-no-vert-space-between.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'top' property sets a zero length value in inches." />
+        <style type="text/css">
+            div
+            {
+                position: relative;
+            }
+            #div1
+            {
+                border-top: blue solid 5px;
+            }
+            #div2
+            {
+                border-top: orange solid 5px;
+                top: 0in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-066.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-066.xht
new file mode 100644
index 0000000..64f77c8
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-066.xht
@@ -0,0 +1,35 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Top using inches with a value of positive zero, +0in</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-top" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="../reference/ref-no-vert-space-between.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'top' property sets a positive zero length value in inches." />
+        <style type="text/css">
+            div
+            {
+                position: relative;
+            }
+            #div1
+            {
+                border-top: blue solid 5px;
+            }
+            #div2
+            {
+                border-top: orange solid 5px;
+                top: +0in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-067.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-067.xht
new file mode 100644
index 0000000..7e1b4f4
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-067.xht
@@ -0,0 +1,44 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Top using inches with a nominal value, 1in</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-26 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-top" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="top-019-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'top' property sets a nominal length value in inches." />
+        <style type="text/css">
+            div
+            {
+                position: relative;
+            }
+            #div1
+            {
+                margin-top: -1in;
+            }
+            #div2
+            {
+                background: red;
+                height: 1in;
+                margin-top: 1in;
+                position: absolute;
+                width: 100%;
+            }
+            #div3
+            {
+                border-bottom: 1in solid black;
+                top: 1in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div id="div2"></div>
+            <div id="div3"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-068.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-068.xht
new file mode 100644
index 0000000..2ea05d8
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-068.xht
@@ -0,0 +1,44 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Top using inches with a positive nominal value, +1in</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-26 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-top" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="top-019-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'top' property sets a positive nominal length value in inches." />
+        <style type="text/css">
+            div
+            {
+                position: relative;
+            }
+            #div1
+            {
+                margin-top: -1in;
+            }
+            #div2
+            {
+                background: red;
+                height: 1in;
+                margin-top: 1in;
+                position: absolute;
+                width: 100%;
+            }
+            #div3
+            {
+                border-bottom: 1in solid black;
+                top: +1in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div id="div2"></div>
+            <div id="div3"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-076.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-076.xht
new file mode 100644
index 0000000..ef09202
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-076.xht
@@ -0,0 +1,35 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Top using 'em' units with a value of negative zero, -0em</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-top" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="../reference/ref-no-vert-space-between.xht" />
+
+        <meta name="flags" content="ahem" />
+        <meta name="assert" content="The 'top' property sets a negative zero length value in 'em' units." />
+        <style type="text/css">
+            div
+            {
+                position: relative;
+            }
+            #div1
+            {
+                border-top: blue solid 5px;
+            }
+            #div2
+            {
+                border-top: orange solid 5px;
+                top: -0em;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-077.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-077.xht
new file mode 100644
index 0000000..deaa882
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-077.xht
@@ -0,0 +1,35 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Top using 'em' units with a value of zero, 0em</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-top" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="../reference/ref-no-vert-space-between.xht" />
+
+        <meta name="flags" content="ahem" />
+        <meta name="assert" content="The 'top' property sets a zero length value in 'em' units." />
+        <style type="text/css">
+            div
+            {
+                position: relative;
+            }
+            #div1
+            {
+                border-top: blue solid 5px;
+            }
+            #div2
+            {
+                border-top: orange solid 5px;
+                top: 0em;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-078.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-078.xht
new file mode 100644
index 0000000..6429ff4
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-078.xht
@@ -0,0 +1,35 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Top using 'em' units with a value of positive zero, +0em</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-top" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="../reference/ref-no-vert-space-between.xht" />
+
+        <meta name="flags" content="ahem" />
+        <meta name="assert" content="The 'top' property sets a positive zero length value in 'em' units." />
+        <style type="text/css">
+            div
+            {
+                position: relative;
+            }
+            #div1
+            {
+                border-top: blue solid 5px;
+            }
+            #div2
+            {
+                border-top: orange solid 5px;
+                top: +0em;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-079-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-079-ref.xht
new file mode 100644
index 0000000..5272604
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-079-ref.xht
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div
+  {
+  background-color: black;
+  height: 120px;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if there is <strong>no red</strong>.</p>
+
+  <div></div>
+
+ </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-079.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-079.xht
new file mode 100644
index 0000000..6942396
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-079.xht
@@ -0,0 +1,45 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Top using 'em' units with a nominal value, 6em</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-26 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-top" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="top-079-ref.xht" />
+
+        <meta name="flags" content="ahem" />
+        <meta name="assert" content="The 'top' property sets a nominal length value in 'em' units." />
+        <style type="text/css">
+            div
+            {
+                font: 20px/1 Ahem;
+                position: relative;
+            }
+            #div1
+            {
+                margin-top: -6em;
+            }
+            #div2
+            {
+                background: red;
+                height: 6em;
+                margin-top: 6em;
+                position: absolute;
+                width: 100%;
+            }
+            #div3
+            {
+                border-bottom: 6em solid black;
+                top: 6em;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div id="div2"></div>
+            <div id="div3"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-080.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-080.xht
new file mode 100644
index 0000000..0609425
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-080.xht
@@ -0,0 +1,45 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Top using 'em' units with a positive nominal value, +6em</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-26 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-top" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="top-079-ref.xht" />
+
+        <meta name="flags" content="ahem" />
+        <meta name="assert" content="The 'top' property sets a positive nominal length value in 'em' units." />
+        <style type="text/css">
+            div
+            {
+                font: 20px/1 Ahem;
+                position: relative;
+            }
+            #div1
+            {
+                margin-top: -6em;
+            }
+            #div2
+            {
+                background: red;
+                height: 6em;
+                margin-top: 6em;
+                position: absolute;
+                width: 100%;
+            }
+            #div3
+            {
+                border-bottom: 6em solid black;
+                top: +6em;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div id="div2"></div>
+            <div id="div3"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-088.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-088.xht
new file mode 100644
index 0000000..508a590e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-088.xht
@@ -0,0 +1,36 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Top using 'ex' units with a value of negative zero, -0ex</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-top" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="../reference/ref-no-vert-space-between.xht" />
+
+        <meta name="flags" content="ahem" />
+        <meta name="assert" content="The 'top' property sets a negative zero length value in 'ex' units." />
+        <style type="text/css">
+            div
+            {
+                font: 20px/1 Ahem;
+                position: relative;
+            }
+            #div1
+            {
+                border-top: blue solid 5px;
+            }
+            #div2
+            {
+                border-top: orange solid 5px;
+                top: -0ex;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-089.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-089.xht
new file mode 100644
index 0000000..dc3c7d40
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-089.xht
@@ -0,0 +1,36 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Top using 'ex' units with a value of zero, 0ex</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-top" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="../reference/ref-no-vert-space-between.xht" />
+
+        <meta name="flags" content="ahem" />
+        <meta name="assert" content="The 'top' property sets a zero length value in 'ex' units." />
+        <style type="text/css">
+            div
+            {
+                font: 20px/1 Ahem;
+                position: relative;
+            }
+            #div1
+            {
+                border-top: blue solid 5px;
+            }
+            #div2
+            {
+                border-top: orange solid 5px;
+                top: 0ex;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-090.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-090.xht
new file mode 100644
index 0000000..16e82f6
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-090.xht
@@ -0,0 +1,36 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Top using 'ex' units with a value of positive zero, +0ex</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-top" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="../reference/ref-no-vert-space-between.xht" />
+
+        <meta name="flags" content="ahem" />
+        <meta name="assert" content="The 'top' property sets a positive zero length value in 'ex' units." />
+        <style type="text/css">
+            div
+            {
+                font: 20px/1 Ahem;
+                position: relative;
+            }
+            #div1
+            {
+                border-top: blue solid 5px;
+            }
+            #div2
+            {
+                border-top: orange solid 5px;
+                top: +0ex;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-091.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-091.xht
new file mode 100644
index 0000000..d21ac92
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-091.xht
@@ -0,0 +1,45 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Top using 'ex' units with a nominal value, 6ex</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-26 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-top" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="top-019-ref.xht" />
+
+        <meta name="flags" content="ahem" />
+        <meta name="assert" content="The 'top' property sets a nominal length value in 'ex' units." />
+        <style type="text/css">
+            div
+            {
+                font: 20px/1 Ahem;
+                position: relative;
+            }
+            #div1
+            {
+                margin-top: -6ex;
+            }
+            #div2
+            {
+                background: red;
+                height: 6ex;
+                margin-top: 6ex;
+                position: absolute;
+                width: 100%;
+            }
+            #div3
+            {
+                border-bottom: 6ex solid black;
+                top: 6ex;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div id="div2"></div>
+            <div id="div3"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-092.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-092.xht
new file mode 100644
index 0000000..ca89d21
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-092.xht
@@ -0,0 +1,45 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Top using 'ex' units with a positive nominal value, +6ex</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-26 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-top" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="top-019-ref.xht" />
+
+        <meta name="flags" content="ahem" />
+        <meta name="assert" content="The 'top' property sets a positive nominal length value in 'ex' units." />
+        <style type="text/css">
+            div
+            {
+                font: 20px/1 Ahem;
+                position: relative;
+            }
+            #div1
+            {
+                margin-top: -6ex;
+            }
+            #div2
+            {
+                background: red;
+                height: 6ex;
+                margin-top: 6ex;
+                position: absolute;
+                width: 100%;
+            }
+            #div3
+            {
+                border-bottom: 6ex solid black;
+                top: +6ex;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div id="div2"></div>
+            <div id="div3"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-100.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-100.xht
new file mode 100644
index 0000000..2849f35
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-100.xht
@@ -0,0 +1,36 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Top using percentages with a value of negative zero, -0%</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-top" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="../reference/ref-no-vert-space-between.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'top' property sets a negative zero length value in percentages." />
+        <style type="text/css">
+            div
+            {
+                position: relative;
+            }
+            #div1
+            {
+                border-top: blue solid 5px;
+                height: 1in;
+            }
+            #div2
+            {
+                border-bottom: orange solid 5px;
+                top: -0%;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-101.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-101.xht
new file mode 100644
index 0000000..c75763d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-101.xht
@@ -0,0 +1,36 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Top using percentages with a value of zero, 0%</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-top" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="../reference/ref-no-vert-space-between.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'top' property sets a zero length value in percentages." />
+        <style type="text/css">
+            div
+            {
+                position: relative;
+            }
+            #div1
+            {
+                border-top: blue solid 5px;
+                height: 1in;
+            }
+            #div2
+            {
+                border-bottom: orange solid 5px;
+                top: 0%;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-102.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-102.xht
new file mode 100644
index 0000000..76e8f0f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-102.xht
@@ -0,0 +1,36 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Top using percentages with a value of positive zero, +0%</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-top" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="../reference/ref-no-vert-space-between.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'top' property sets a positive zero length value in percentages." />
+        <style type="text/css">
+            div
+            {
+                position: relative;
+            }
+            #div1
+            {
+                border-top: blue solid 5px;
+                height: 1in;
+            }
+            #div2
+            {
+                border-bottom: orange solid 5px;
+                top: +0%;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-103.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-103.xht
new file mode 100644
index 0000000..27b8a935
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-103.xht
@@ -0,0 +1,45 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Top using percentages with a nominal value, 100%</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-26 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-top" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="top-019-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'top' property sets a nominal length value in percentages." />
+        <style type="text/css">
+            div
+            {
+                position: relative;
+            }
+            #div1
+            {
+                height: 1in;
+                margin-top: -1in;
+            }
+            #div2
+            {
+                background: red;
+                height: 1in;
+                margin-top: 1in;
+                position: absolute;
+                width: 100%;
+            }
+            #div3
+            {
+                border-bottom: 1in solid black;
+                top: 100%;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div id="div2"></div>
+            <div id="div3"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-104.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-104.xht
new file mode 100644
index 0000000..f25a40e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-104.xht
@@ -0,0 +1,45 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Top using percentages with a positive nominal value, +100%</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-26 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-top" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="top-019-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'top' property sets a positive nominal length value in percentages." />
+        <style type="text/css">
+            div
+            {
+                position: relative;
+            }
+            #div1
+            {
+                height: 1in;
+                margin-top: -1in;
+            }
+            #div2
+            {
+                background: red;
+                height: 1in;
+                margin-top: 1in;
+                position: absolute;
+                width: 100%;
+            }
+            #div3
+            {
+                border-bottom: 1in solid black;
+                top: +100%;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div id="div2"></div>
+            <div id="div3"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-109.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-109.xht
new file mode 100644
index 0000000..5598ad3
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-109.xht
@@ -0,0 +1,35 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Top with a value of negative zero and no units, -0</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-top" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="../reference/ref-no-vert-space-between.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'top' property sets a negative zero length value with no units." />
+        <style type="text/css">
+            div
+            {
+                position: relative;
+            }
+            #div1
+            {
+                border-bottom: orange solid 5px;
+            }
+            #div2
+            {
+                border-bottom: blue solid 5px;
+                top: -0;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-110.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-110.xht
new file mode 100644
index 0000000..18190cbf
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-110.xht
@@ -0,0 +1,35 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Top with a value of zero and no units, 0</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-top" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="../reference/ref-no-vert-space-between.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'top' property sets a zero length value with no units." />
+        <style type="text/css">
+            div
+            {
+                position: relative;
+            }
+            #div1
+            {
+                border-bottom: orange solid 5px;
+            }
+            #div2
+            {
+                border-bottom: blue solid 5px;
+                top: 0;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-111.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-111.xht
new file mode 100644
index 0000000..58d7824f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-111.xht
@@ -0,0 +1,35 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Top with a value of positive zero and no units, +0</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-top" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="../reference/ref-no-vert-space-between.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'top' property sets a positive zero length value with no units." />
+        <style type="text/css">
+            div
+            {
+                position: relative;
+            }
+            #div1
+            {
+                border-bottom: orange solid 5px;
+            }
+            #div2
+            {
+                border-bottom: blue solid 5px;
+                top: +0;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-112.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-112.xht
new file mode 100644
index 0000000..41d0ea9
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-112.xht
@@ -0,0 +1,35 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Top with a value of 'auto'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+		<link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-14 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-top" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="../reference/ref-no-vert-space-between.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'top' property sets a value of 'auto'." />
+        <style type="text/css">
+            div
+            {
+                position: relative;
+            }
+            #div1
+            {
+                border-bottom: orange solid 5px;
+            }
+            #div2
+            {
+                border-bottom: blue solid 5px;
+                top: auto;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no space between</strong> the blue and orange lines.</p>
+        <div id="div1">
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-113-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-113-ref.xht
new file mode 100644
index 0000000..7f7f118
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-113-ref.xht
@@ -0,0 +1,29 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div
+  {
+  background-color: black;
+  height: 96px;
+  margin-top: 112px;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if there is <strong>no red</strong>.</p>
+
+  <div></div>
+
+ </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-113.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-113.xht
new file mode 100644
index 0000000..30240d5
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-113.xht
@@ -0,0 +1,50 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Top with a value of 'inherit'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-26 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-top" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="top-113-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'top' property sets a value of 'inherit', inheriting the value from the parent element." />
+        <style type="text/css">
+            body
+            {
+                height: 1in;
+            }
+            div
+            {
+                position: relative;
+            }
+            #div1
+            {
+                height: 1in;
+                margin-top: -1in;
+                top: 100%;
+            }
+            #div2
+            {
+                background: red;
+                height: 1in;
+                margin-top: 1in;
+                position: absolute;
+                width: 100%;
+            }
+            #div3
+            {
+                border-bottom: 1in solid black;
+                top: inherit;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div id="div2"></div>
+            <div id="div3"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-applies-to-001-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-applies-to-001-ref.xht
new file mode 100644
index 0000000..6c513cf
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-applies-to-001-ref.xht
@@ -0,0 +1,33 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  body {margin-top: 0px;}
+
+  div
+  {
+  background-color: green;
+  height: 96px;
+  width: 96px;
+  }
+
+  p {margin-top: 48px;}
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <div></div>
+
+  <p>Test passes if there is a filled green square at the top of the page.</p>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-applies-to-001.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-applies-to-001.xht
new file mode 100644
index 0000000..6840c198
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-applies-to-001.xht
@@ -0,0 +1,53 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Top applied to element with 'display' set to 'table-row-group'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-26 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-top" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="top-applies-to-001-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'top' property applies to elements with a display of 'table-row-group'." />
+        <style type="text/css">
+            #test
+            {
+                top: 0;
+                display: table-row-group;
+                position: absolute;
+            }
+            #table
+            {
+                display: table;
+                table-layout: fixed;
+            }
+            #row
+            {
+                display: table-row;
+            }
+            #cell
+            {
+                background: green;
+                display: table-cell;
+                height: 1in;
+                width: 1in;
+            }
+            p
+            {
+                margin-top: 1.5in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a filled green square at the top of the page.</p>
+        <div id="table">
+            <div id="test">
+                <div id="row">
+                    <div id="cell"></div>
+                </div>
+            </div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-applies-to-002.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-applies-to-002.xht
new file mode 100644
index 0000000..938f507d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-applies-to-002.xht
@@ -0,0 +1,53 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Top applied to element with 'display' set to 'table-header-group'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-26 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-top" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="top-applies-to-001-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'top' property applies to elements with a display of 'table-header-group'." />
+        <style type="text/css">
+            #test
+            {
+                background: green;
+                top: 0;
+                display: table-header-group;
+                position: absolute;
+            }
+            #table
+            {
+                display: table;
+                table-layout: fixed;
+            }
+            #row
+            {
+                display: table-row;
+            }
+            #cell
+            {
+                display: table-cell;
+                height: 1in;
+                width: 1in;
+            }
+            p
+            {
+                margin-top: 1.5in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a filled green square at the top of the page.</p>
+        <div id="table">
+            <div id="test">
+                <div id="row">
+                    <div id="cell"></div>
+                </div>
+            </div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-applies-to-003.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-applies-to-003.xht
new file mode 100644
index 0000000..6a384e85
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-applies-to-003.xht
@@ -0,0 +1,53 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Top applied to element with 'display' set to 'table-footer-group'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-26 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-top" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="top-applies-to-001-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'top' property applies to elements with a display of 'table-footer-group'." />
+        <style type="text/css">
+            #test
+            {
+                background: green;
+                top: 0;
+                display: table-footer-group;
+                position: absolute;
+            }
+            #table
+            {
+                display: table;
+                table-layout: fixed;
+            }
+            #row
+            {
+                display: table-row;
+            }
+            #cell
+            {
+                display: table-cell;
+                height: 1in;
+                width: 1in;
+            }
+            p
+            {
+                margin-top: 1.5in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a filled green square at the top of the page.</p>
+        <div id="table">
+            <div id="test">
+                <div id="row">
+                    <div id="cell"></div>
+                </div>
+            </div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-applies-to-004.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-applies-to-004.xht
new file mode 100644
index 0000000..e983243
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-applies-to-004.xht
@@ -0,0 +1,47 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Top applied to element with 'display' set to 'table-row'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-26 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-top" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="top-applies-to-001-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'top' property applies to elements with a display of 'table-row'." />
+        <style type="text/css">
+            #test
+            {
+                background: green;
+                top: 0;
+                display: table-row;
+                position: absolute;
+            }
+            #table
+            {
+                display: table;
+                table-layout: fixed;
+            }
+            #cell
+            {
+                display: table-cell;
+                height: 1in;
+                width: 1in;
+            }
+            p
+            {
+                margin-top: 1.5in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a filled green square at the top of the page.</p>
+        <div id="table">
+            <div id="test">
+                <div id="cell"></div>
+            </div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-applies-to-005.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-applies-to-005.xht
new file mode 100644
index 0000000..cf3cf5d4e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-applies-to-005.xht
@@ -0,0 +1,52 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Top applied to element with 'display' set to 'table-column-group'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-26 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-top" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="top-applies-to-001-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'top' property applies to elements with a display of 'table-column-group'." />
+        <style type="text/css">
+            #test
+            {
+                background: green;
+                top: 0;
+                display: table-column-group;
+                height: 1in;
+                position: absolute;
+                width: 1in;
+            }
+            #table
+            {
+                display: table;
+                table-layout: fixed;
+            }
+            #row
+            {
+                display: table-row;
+            }
+            #cell
+            {
+                display: table-cell;
+            }
+            p
+            {
+                margin-top: 1.5in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a filled green square at the top of the page.</p>
+        <div id="table">
+            <div id="test"></div>
+            <div id="row">
+                <div id="cell"></div>
+            </div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-applies-to-006.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-applies-to-006.xht
new file mode 100644
index 0000000..294f8d7
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-applies-to-006.xht
@@ -0,0 +1,52 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Top applied to element with 'display' set to 'table-column'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-26 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-top" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="top-applies-to-001-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'top' property applies to elements with a display of 'table-column'." />
+        <style type="text/css">
+            #test
+            {
+                background: green;
+                top: 0;
+                display: table-column;
+                height: 1in;
+                position: absolute;
+                width: 1in;
+            }
+            #table
+            {
+                display: table;
+                table-layout: fixed;
+            }
+            #row
+            {
+                display: table-row;
+            }
+            #cell
+            {
+                display: table-cell;
+            }
+            p
+            {
+                margin-top: 1.5in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a filled green square at the top of the page.</p>
+        <div id="table">
+            <div id="test"></div>
+            <div id="row">
+                <div id="cell"></div>
+            </div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-applies-to-007.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-applies-to-007.xht
new file mode 100644
index 0000000..8bf7d46
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-applies-to-007.xht
@@ -0,0 +1,47 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Top applied to element with 'display' set to 'table-cell'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-26 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-top" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="top-applies-to-001-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'top' property applies to elements with a display of 'table-cell'." />
+        <style type="text/css">
+            #table
+            {
+                display: table;
+                table-layout: fixed;
+            }
+            #row
+            {
+                display: table-row;
+            }
+            #cell
+            {
+                background: green;
+                top: 0;
+                display: table-cell;
+                height: 1in;
+                position: absolute;
+                width: 1in;
+            }
+            p
+            {
+                margin-top: 1.5in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a filled green square at the top of the page.</p>
+        <div id="table">
+            <div id="row">
+                <div id="cell"></div>
+            </div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-applies-to-008.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-applies-to-008.xht
new file mode 100644
index 0000000..ba58b49
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-applies-to-008.xht
@@ -0,0 +1,30 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Top applied to element with 'display' set to inline</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-26 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-top" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'top' property applies to elements with a display of inline." />
+        <style type="text/css">
+            div
+            {
+                background: green;
+                top: 0;
+                display: inline;
+                position: absolute;
+            }
+            p
+            {
+                margin-top: 1.5in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a green stripe at the top of the page.</p>
+        <div>Filler Text</div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-applies-to-009.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-applies-to-009.xht
new file mode 100644
index 0000000..845be3b
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-applies-to-009.xht
@@ -0,0 +1,36 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Top applied to element with 'display' set to block</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-26 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-top" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="top-applies-to-001-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'top' property applies to elements with a display of block." />
+        <style type="text/css">
+            span
+            {
+                background: green;
+                top: 0;
+                display: block;
+                height: 1in;
+                position: absolute;
+                width: 1in;
+            }
+            p
+            {
+                margin-top: 1.5in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a filled green square at the top of the page.</p>
+        <div>
+            <span></span>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-applies-to-010.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-applies-to-010.xht
new file mode 100644
index 0000000..ecedbf3
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-applies-to-010.xht
@@ -0,0 +1,36 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Top applied to element with 'display' set to list-item</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-26 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-top" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'top' property applies to elements with a display of list-item." />
+        <style type="text/css">
+            body
+            {
+                margin-left: 1em;
+            }
+            div
+            {
+                background: green;
+                top: 0;
+                display: list-item;
+                height: 1in;
+                position: absolute;
+                width: 1in;
+            }
+            p
+            {
+                margin-top: 1.5in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a filled green square at the top of the page and a marker bullet on its left-hand side.</p>
+        <div></div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-applies-to-012.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-applies-to-012.xht
new file mode 100644
index 0000000..9277839
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-applies-to-012.xht
@@ -0,0 +1,47 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Top applied to element with 'display' set to inline-block</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-26 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-top" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="top-applies-to-001-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'top' property applies to elements with a display of inline-block." />
+        <style type="text/css">
+            span#inline-block
+            {
+                top: 0;
+                display: inline-block;
+                position: absolute;
+            }
+
+			span.block-descendant
+			{
+	            background: green;
+				display: block;
+       	        height: 0.5in;
+        	    width: 1in;
+			}
+
+            p
+            {
+                margin-top: 1.5in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a filled green square at the top of the page.</p>
+
+        <div>
+	        <span id="inline-block">
+				<span class="block-descendant"></span>
+				<span class="block-descendant"></span>
+        	</span>
+        </div>
+
+    </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-applies-to-013.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-applies-to-013.xht
new file mode 100644
index 0000000..d19bfe05
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-applies-to-013.xht
@@ -0,0 +1,47 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Top applied to element with 'display' set to 'table'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-26 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-top" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="top-applies-to-001-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'top' property applies to elements with a display of 'table'." />
+        <style type="text/css">
+            #table
+            {
+                background: green;
+                top: 0;
+                display: table;
+                table-layout: fixed;
+                height: 1in;
+                position: absolute;
+                width: 1in;
+            }
+            #row
+            {
+                display: table-row;
+            }
+            #cell
+            {
+                display: table-cell;
+            }
+            p
+            {
+                margin-top: 1.5in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a filled green square at the top of the page.</p>
+        <div id="table">
+            <div id="row">
+                <div id="cell"></div>
+            </div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-applies-to-014.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-applies-to-014.xht
new file mode 100644
index 0000000..880c9ca
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-applies-to-014.xht
@@ -0,0 +1,47 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Top applied to element with 'display' set to 'inline-table'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-26 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-top" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="top-applies-to-001-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'top' property applies to elements with a display of 'inline-table'." />
+        <style type="text/css">
+            #table
+            {
+                background: green;
+                display: inline-table;
+                height: 1in;
+                position: absolute;
+                table-layout: fixed;
+                top: 0;
+                width: 1in;
+            }
+            #row
+            {
+                display: table-row;
+            }
+            #cell
+            {
+                display: table-cell;
+            }
+            p
+            {
+                margin-top: 1.5in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a filled green square at the top of the page.</p>
+        <div id="table">
+            <div id="row">
+                <div id="cell"></div>
+            </div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-applies-to-015.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-applies-to-015.xht
new file mode 100644
index 0000000..49873ee
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-applies-to-015.xht
@@ -0,0 +1,51 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Top applied to element with 'display' set to 'table-caption'</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-26 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-top" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="top-applies-to-001-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'top' property applies to elements with a display of 'table-caption'." />
+        <style type="text/css">
+            #caption
+            {
+                background: green;
+                top: 0;
+                display: table-caption;
+                height: 1in;
+                position: absolute;
+                width: 1in;
+            }
+            #table
+            {
+                display: table;
+            }
+            #row
+            {
+                display: table-row;
+            }
+            #cell
+            {
+                display: table-cell;
+            }
+            p
+            {
+                margin-top: 1.5in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a filled green square at the top of the page.</p>
+        <div id="table">
+            <div id="caption"></div>
+            <div id="row">
+                <div id="cell"></div>
+            </div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-offset-001.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-offset-001.xht
new file mode 100644
index 0000000..3e5c257
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-offset-001.xht
@@ -0,0 +1,41 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Position 'top' property defines the offset from the top edge of the containing block for absolute positioning</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-26 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-top" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="bottom-offset-001-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'top' property, for absolute positioning, specifies the offset of the element in relation to the containing block's top edge. The containing block of an absolutely positioned element is formed by the padding box of its nearest (closest) positioned ancestor element." />
+        <style type="text/css">
+            div
+            {
+                height: 1in;
+                position: relative;
+                width: 1in;
+            }
+            #div1
+            {
+                background: blue;
+            }
+            #div2
+            {
+                background: white;
+                height: 0.5in;
+                position: absolute;
+                top: 0.5in;
+                width: 0.5in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a blue square with its bottom-left corner missing.</p>
+        <div>
+            <div id="div1"></div>
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-offset-002.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-offset-002.xht
new file mode 100644
index 0000000..1452f7a6
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-offset-002.xht
@@ -0,0 +1,36 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Position 'top' offset property - absolute length value and relative positioning</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-26 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-top" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="bottom-offset-001-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'top' property, when using an absolute length value (not percentage) for relative positioning, specifies the offset of the box itself." />
+        <style type="text/css">
+            #div1
+            {
+                background: blue;
+                height: 1in;
+                width: 1in;
+            }
+            div div
+            {
+                background: white;
+                height: 0.5in;
+                position: relative;
+                top: 0.5in;
+                width: 0.5in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a blue square with its bottom-left corner missing.</p>
+        <div id="div1">
+            <div></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-offset-003-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-offset-003-ref.xht
new file mode 100644
index 0000000..3aa80ba4
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-offset-003-ref.xht
@@ -0,0 +1,33 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div#inline-block
+  {
+  display: inline-block;
+  padding-top: 24px;
+  }
+
+  img {vertical-align: top;}
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if there is a blue square with its bottom-left corner missing.</p>
+
+  <div id="inline-block">
+  		<div><img src="support/blue15x15.png" width="48" height="48" alt="Image download support must be enabled" /><img src="support/blue15x15.png" width="48" height="48" alt="Image download support must be enabled" /></div>
+  		<div><img src="support/1x1-white.png" width="48" height="48" alt="Image download support must be enabled" /><img src="support/blue15x15.png" width="48" height="48" alt="Image download support must be enabled" /></div>
+  </div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-offset-003.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-offset-003.xht
new file mode 100644
index 0000000..0c044ca
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-offset-003.xht
@@ -0,0 +1,44 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Position 'top' property defines the offset from the top edge of the containing block</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-26 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-top" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="top-offset-003-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="The 'top' property, for absolute positioning, specifies the offset of the element in relation to the containing block's top edge. The containing block of an absolutely positioned element is formed by the padding box of its nearest (closest) positioned ancestor element." />
+        <style type="text/css">
+            #container
+            {
+                height: 1in;
+                padding-top: 0.25in;
+                position: relative;
+                width: 1in;
+            }
+            #div1
+            {
+                background: white;
+                height: 0.5in;
+                position: absolute;
+                top: 0.75in;
+                width: 0.5in;
+            }
+            #div2
+            {
+                background: blue;
+                height: 1in;
+                width: 1in;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if there is a blue square with its bottom-left corner missing.</p>
+        <div id="container">
+            <div id="div1"></div>
+            <div id="div2"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-offset-percentage-001-ref.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-offset-percentage-001-ref.xht
new file mode 100644
index 0000000..af7a1502
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-offset-percentage-001-ref.xht
@@ -0,0 +1,31 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Reftest Reference</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+
+  <style type="text/css"><![CDATA[
+  div
+  {
+  border: black solid medium;
+  height: 200px;
+  width: 100px;
+  }
+
+  img {padding-top: 100px;}
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if a filled green square is not in any of the corners of the hollow black rectangle and there is <strong>no red</strong>.</p>
+
+  <div><img src="support/1x1-green.png" width="50" height="50" alt="Image download support must be enabled" /></div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-offset-percentage-001.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-offset-percentage-001.xht
new file mode 100644
index 0000000..6aafa46
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-offset-percentage-001.xht
@@ -0,0 +1,46 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>CSS Test: Top offset using percentage</title>
+        <link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
+        <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> <!-- 2012-09-26 -->
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#propdef-top" />
+        <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+		<link rel="match" href="top-offset-percentage-001-ref.xht" />
+
+        <meta name="flags" content="" />
+        <meta name="assert" content="Percentage offset values for the 'top' property are based off the height of the containing block." />
+        <style type="text/css">
+            #div1
+            {
+                border: solid black;
+                height: 200px;
+                position: relative;
+                width: 100px;
+            }
+            div div
+            {
+                height: 50px;
+                position: absolute;
+                width: 50px;
+            }
+            #test
+            {
+                background: green;
+                top: 50%;
+            }
+            #reference
+            {
+                background: red;
+                bottom: 50px;
+            }
+        </style>
+    </head>
+    <body>
+        <p>Test passes if a filled green square is not in any of the corners of the hollow black rectangle and there is <strong>no red</strong>.</p>
+        <div id="div1">
+            <div id="reference"></div>
+            <div id="test"></div>
+        </div>
+    </body>
+</html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-offset-percentage-002.xht b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-offset-percentage-002.xht
new file mode 100644
index 0000000..fea4a2b5
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/top-offset-percentage-002.xht
@@ -0,0 +1,87 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+
+  <title>CSS Test: position absolute - top offset percentage and inherit</title>
+
+  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
+  <link rel="help" title="6.2.1 The 'inherit' value" href="http://www.w3.org/TR/CSS21/cascade.html#value-def-inherit" />
+  <link rel="help" title="9.3.2 Box offsets: 'top', 'right', 'bottom', 'left'" href="http://www.w3.org/TR/CSS21/visuren.html#position-props" />
+  <link rel="match" href="left-offset-percentage-002-ref.xht" />
+
+  <meta content="'top: inherit' makes the top property take the same computed value as the top property for the element's parent; in the case of a percentage value, the computed value is the specified percentage value. 'top: [percentage]' refers to height of containing block." name="assert" />
+  <meta content="" name="flags" />
+
+  <style type="text/css"><![CDATA[
+  div {position: absolute;}
+
+  #grand-parent-abs-pos
+  {
+  height: 400px;
+  width: 600px;
+  }
+
+  #red-abs-pos-overlapped
+  {
+  background-color: red;
+  color: white;
+  height: 100px;
+  left: 300px;
+  top: 100px;
+  width: 100px;
+  }
+
+  #parent-abs-pos
+  {
+  height: 0px;
+  left: 50%; /* 50% x 600px == 300px */
+  /* 'left: [percentage]' refers to width of containing block. */
+  top: 25%; /* 25% x 400px == 100px */
+  /* 'top: [percentage]' refers to height of containing block. */
+  width: 0px;
+  }
+
+  #green-child-abs-pos-inherit-overlapping
+  {
+  background-color: green;
+  left: 0px;
+  top: inherit;
+  /*
+  =====================================
+  top: inherit should resolve as top: 25% because
+  "the property takes the same computed value as the
+  property for the element's parent"
+  CSS 2.1, section 6.2.1 The 'inherit' value
+  http://www.w3.org/TR/CSS21/cascade.html#value-def-inherit
+  and
+  "Computed value: (...) if specified as a percentage, [then]
+  the specified [percentage] value"
+  http://www.w3.org/TR/CSS21/visuren.html#position-props
+
+  So, the top offset of #green-child-abs-pos-inherit-overlapping
+  should be 25%, which is 25% of the height of its containing
+  block (#parent-abs-pos) which is 0px.
+  =====================================
+  */
+  height: 100px;
+  width: 100px;
+  }
+  ]]></style>
+
+ </head>
+
+ <body>
+
+  <p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
+
+  <div id="grand-parent-abs-pos">
+    <div id="red-abs-pos-overlapped">test FAILED</div>
+    <div id="parent-abs-pos">
+      <div id="green-child-abs-pos-inherit-overlapping"></div>
+    </div>
+  </div>
+
+ </body>
+</html>
diff --git a/third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp b/third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp
index a508c26b..d3b7889 100644
--- a/third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp
@@ -371,9 +371,11 @@
     case kV8CacheOptionsAlways: {
       // Use code caching for recently seen resources.
       // Use compression depending on the cache option.
-      if (code_cache)
+      if (code_cache) {
         return Bind(CompileAndConsumeCache, WrapPersistent(cache_handler),
-                    code_cache, v8::ScriptCompiler::kConsumeCodeCache);
+                    std::move(code_cache),
+                    v8::ScriptCompiler::kConsumeCodeCache);
+      }
       if (cache_options != kV8CacheOptionsAlways &&
           !IsResourceHotForCaching(cache_handler, kHotHours)) {
         V8ScriptRunner::SetCacheTimeStamp(cache_handler);
diff --git a/third_party/WebKit/Source/core/animation/CSSPathInterpolationType.cpp b/third_party/WebKit/Source/core/animation/CSSPathInterpolationType.cpp
index 63494e9c..28a76f1 100644
--- a/third_party/WebKit/Source/core/animation/CSSPathInterpolationType.cpp
+++ b/third_party/WebKit/Source/core/animation/CSSPathInterpolationType.cpp
@@ -59,7 +59,7 @@
 
  private:
   InheritedPathChecker(PassRefPtr<StylePath> style_path)
-      : style_path_(style_path) {}
+      : style_path_(std::move(style_path)) {}
 
   bool IsValid(const InterpolationEnvironment& environment,
                const InterpolationValue& underlying) const final {
diff --git a/third_party/WebKit/Source/core/animation/KeyframeEffectModel.cpp b/third_party/WebKit/Source/core/animation/KeyframeEffectModel.cpp
index 5c850d4..885ebea 100644
--- a/third_party/WebKit/Source/core/animation/KeyframeEffectModel.cpp
+++ b/third_party/WebKit/Source/core/animation/KeyframeEffectModel.cpp
@@ -282,7 +282,7 @@
     PassRefPtr<Keyframe::PropertySpecificKeyframe> keyframe) {
   DCHECK(keyframes_.IsEmpty() ||
          keyframes_.back()->Offset() <= keyframe->Offset());
-  keyframes_.push_back(keyframe);
+  keyframes_.push_back(std::move(keyframe));
 }
 
 void KeyframeEffectModelBase::PropertySpecificKeyframeGroup::
diff --git a/third_party/WebKit/Source/core/animation/animatable/AnimatablePath.h b/third_party/WebKit/Source/core/animation/animatable/AnimatablePath.h
index 15fc3af1..a80f986 100644
--- a/third_party/WebKit/Source/core/animation/animatable/AnimatablePath.h
+++ b/third_party/WebKit/Source/core/animation/animatable/AnimatablePath.h
@@ -19,7 +19,8 @@
   }
 
  private:
-  explicit AnimatablePath(PassRefPtr<StylePath> path) : path_(path) {}
+  explicit AnimatablePath(PassRefPtr<StylePath> path)
+      : path_(std::move(path)) {}
   AnimatableType GetType() const override { return kTypePath; }
   bool EqualTo(const AnimatableValue*) const override;
   const RefPtr<StylePath> path_;
diff --git a/third_party/WebKit/Source/core/animation/animatable/AnimatableShadow.h b/third_party/WebKit/Source/core/animation/animatable/AnimatableShadow.h
index ddbc618..c94c88a 100644
--- a/third_party/WebKit/Source/core/animation/animatable/AnimatableShadow.h
+++ b/third_party/WebKit/Source/core/animation/animatable/AnimatableShadow.h
@@ -46,7 +46,7 @@
 
  private:
   explicit AnimatableShadow(PassRefPtr<ShadowList> shadow_list)
-      : shadow_list_(shadow_list) {}
+      : shadow_list_(std::move(shadow_list)) {}
   AnimatableType GetType() const override { return kTypeShadow; }
   bool EqualTo(const AnimatableValue*) const override;
 
diff --git a/third_party/WebKit/Source/core/animation/css/CSSAnimatableValueFactory.cpp b/third_party/WebKit/Source/core/animation/css/CSSAnimatableValueFactory.cpp
index 46c98ca4..2e31734 100644
--- a/third_party/WebKit/Source/core/animation/css/CSSAnimatableValueFactory.cpp
+++ b/third_party/WebKit/Source/core/animation/css/CSSAnimatableValueFactory.cpp
@@ -305,9 +305,12 @@
     double zoom,
     PassRefPtr<TransformOperation> initial_transform) {
   TransformOperations operation;
-  if (transform || initial_transform)
-    operation.Operations().push_back(transform ? transform : initial_transform);
-  return AnimatableTransform::Create(operation, transform ? zoom : 1);
+  bool has_transform = static_cast<bool>(transform);
+  if (has_transform || initial_transform) {
+    operation.Operations().push_back(
+        std::move(has_transform ? transform : initial_transform));
+  }
+  return AnimatableTransform::Create(operation, has_transform ? zoom : 1);
 }
 
 static PassRefPtr<AnimatableValue> CreateFromFontWeight(
diff --git a/third_party/WebKit/Source/core/css/PropertyRegistration.cpp b/third_party/WebKit/Source/core/css/PropertyRegistration.cpp
index ecb806698..b7a75bb7 100644
--- a/third_party/WebKit/Source/core/css/PropertyRegistration.cpp
+++ b/third_party/WebKit/Source/core/css/PropertyRegistration.cpp
@@ -42,7 +42,7 @@
     : syntax_(syntax),
       inherits_(inherits),
       initial_(initial),
-      initial_variable_data_(initial_variable_data),
+      initial_variable_data_(std::move(initial_variable_data)),
       interpolation_types_(SetRegistrationOnCSSInterpolationTypes(
           std::move(css_interpolation_types),
           *this)) {}
diff --git a/third_party/WebKit/Source/core/dom/DocumentTest.cpp b/third_party/WebKit/Source/core/dom/DocumentTest.cpp
index 92e628c2..6002eb4 100644
--- a/third_party/WebKit/Source/core/dom/DocumentTest.cpp
+++ b/third_party/WebKit/Source/core/dom/DocumentTest.cpp
@@ -40,6 +40,8 @@
 #include "core/html/HTMLHeadElement.h"
 #include "core/html/HTMLInputElement.h"
 #include "core/html/HTMLLinkElement.h"
+#include "core/loader/DocumentLoader.h"
+#include "core/loader/appcache/ApplicationCacheHost.h"
 #include "core/page/Page.h"
 #include "core/page/ValidationMessageClient.h"
 #include "core/testing/DummyPageHolder.h"
@@ -47,6 +49,7 @@
 #include "platform/weborigin/ReferrerPolicy.h"
 #include "platform/weborigin/SchemeRegistry.h"
 #include "platform/weborigin/SecurityOrigin.h"
+#include "public/platform/WebApplicationCacheHost.h"
 #include "testing/gmock/include/gmock/gmock.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
@@ -285,6 +288,24 @@
   // DEFINE_INLINE_VIRTUAL_TRACE() { ValidationMessageClient::trace(visitor); }
 };
 
+class MockWebApplicationCacheHost
+    : NON_EXPORTED_BASE(public blink::WebApplicationCacheHost) {
+ public:
+  MockWebApplicationCacheHost() {}
+  ~MockWebApplicationCacheHost() override {}
+
+  void SelectCacheWithoutManifest() override {
+    without_manifest_was_called_ = true;
+  }
+  bool SelectCacheWithManifest(const blink::WebURL& manifestURL) override {
+    with_manifest_was_called_ = true;
+    return true;
+  }
+
+  bool with_manifest_was_called_ = false;
+  bool without_manifest_was_called_ = false;
+};
+
 }  // anonymous namespace
 
 // This tests that we properly resize and re-layout pages for printing in the
@@ -736,4 +757,44 @@
   GetPage().SetValidationMessageClient(original_client);
 }
 
+TEST_F(DocumentTest, SandboxDisablesAppCache) {
+  RefPtr<SecurityOrigin> origin =
+      SecurityOrigin::CreateFromString("https://test.com");
+  GetDocument().SetSecurityOrigin(origin);
+  SandboxFlags mask = kSandboxOrigin;
+  GetDocument().EnforceSandboxFlags(mask);
+  GetDocument().SetURL(KURL(KURL(), "https://test.com/foobar/document"));
+
+  ApplicationCacheHost* appcache_host =
+      GetDocument().Loader()->GetApplicationCacheHost();
+  appcache_host->host_ = WTF::MakeUnique<MockWebApplicationCacheHost>();
+  appcache_host->SelectCacheWithManifest(
+      KURL(KURL(), "https://test.com/foobar/manifest"));
+  MockWebApplicationCacheHost* mock_web_host =
+      static_cast<MockWebApplicationCacheHost*>(appcache_host->host_.get());
+  EXPECT_FALSE(mock_web_host->with_manifest_was_called_);
+  EXPECT_TRUE(mock_web_host->without_manifest_was_called_);
+}
+
+TEST_F(DocumentTest, SuboriginDisablesAppCache) {
+  RuntimeEnabledFeatures::setSuboriginsEnabled(true);
+  RefPtr<SecurityOrigin> origin =
+      SecurityOrigin::CreateFromString("https://test.com");
+  Suborigin suborigin;
+  suborigin.SetName("foobar");
+  origin->AddSuborigin(suborigin);
+  GetDocument().SetSecurityOrigin(origin);
+  GetDocument().SetURL(KURL(KURL(), "https://test.com/foobar/document"));
+
+  ApplicationCacheHost* appcache_host =
+      GetDocument().Loader()->GetApplicationCacheHost();
+  appcache_host->host_ = WTF::MakeUnique<MockWebApplicationCacheHost>();
+  appcache_host->SelectCacheWithManifest(
+      KURL(KURL(), "https://test.com/foobar/manifest"));
+  MockWebApplicationCacheHost* mock_web_host =
+      static_cast<MockWebApplicationCacheHost*>(appcache_host->host_.get());
+  EXPECT_FALSE(mock_web_host->with_manifest_was_called_);
+  EXPECT_TRUE(mock_web_host->without_manifest_was_called_);
+}
+
 }  // namespace blink
diff --git a/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp b/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
index ad0f1f2f..7fdceb5 100644
--- a/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
+++ b/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
@@ -110,7 +110,7 @@
       : SuspendableTimer(window.document(), TaskType::kPostedMessage),
         event_(event),
         window_(&window),
-        target_origin_(target_origin),
+        target_origin_(std::move(target_origin)),
         location_(std::move(location)),
         user_gesture_token_(user_gesture_token),
         disposal_allowed_(true) {
diff --git a/third_party/WebKit/Source/core/inspector/BUILD.gn b/third_party/WebKit/Source/core/inspector/BUILD.gn
index a7a18af..417c1c2 100644
--- a/third_party/WebKit/Source/core/inspector/BUILD.gn
+++ b/third_party/WebKit/Source/core/inspector/BUILD.gn
@@ -187,6 +187,7 @@
     "//skia",
     "//third_party/WebKit/Source/bindings/core/v8:bindings_core_v8_generated",
     "//third_party/WebKit/Source/core:all_generators",
+    "//third_party/WebKit/Source/core/probe:generated",
     "//third_party/WebKit/Source/platform:make_platform_generated",
     "//third_party/WebKit/Source/platform/wtf",
     "//v8",
diff --git a/third_party/WebKit/Source/core/loader/appcache/ApplicationCacheHost.cpp b/third_party/WebKit/Source/core/loader/appcache/ApplicationCacheHost.cpp
index 0335f713..030818c 100644
--- a/third_party/WebKit/Source/core/loader/appcache/ApplicationCacheHost.cpp
+++ b/third_party/WebKit/Source/core/loader/appcache/ApplicationCacheHost.cpp
@@ -134,6 +134,12 @@
 
   LocalFrame* frame = document_loader_->GetFrame();
   Document* document = frame->GetDocument();
+  if (document->IsSandboxed(kSandboxOrigin) ||
+      document->GetSecurityOrigin()->HasSuborigin()) {
+    // Prevent sandboxes and suborigins from establishing application caches.
+    SelectCacheWithoutManifest();
+    return;
+  }
   if (document->IsSecureContext()) {
     UseCounter::Count(document,
                       UseCounter::kApplicationCacheManifestSelectSecureOrigin);
diff --git a/third_party/WebKit/Source/core/loader/appcache/ApplicationCacheHost.h b/third_party/WebKit/Source/core/loader/appcache/ApplicationCacheHost.h
index 6b6a617..1109a3a 100644
--- a/third_party/WebKit/Source/core/loader/appcache/ApplicationCacheHost.h
+++ b/third_party/WebKit/Source/core/loader/appcache/ApplicationCacheHost.h
@@ -32,6 +32,8 @@
 #define ApplicationCacheHost_h
 
 #include <memory>
+#include "base/gtest_prod_util.h"
+#include "core/CoreExport.h"
 #include "platform/heap/Handle.h"
 #include "platform/weborigin/KURL.h"
 #include "platform/wtf/Allocator.h"
@@ -44,9 +46,9 @@
 class ResourceRequest;
 class ResourceResponse;
 
-class ApplicationCacheHost final
+class CORE_EXPORT ApplicationCacheHost final
     : public GarbageCollectedFinalized<ApplicationCacheHost>,
-      public WebApplicationCacheHostClient {
+      NON_EXPORTED_BASE(public WebApplicationCacheHostClient) {
   WTF_MAKE_NONCOPYABLE(ApplicationCacheHost);
 
  public:
@@ -214,6 +216,9 @@
                         const String& error_message);
 
   std::unique_ptr<WebApplicationCacheHost> host_;
+
+  FRIEND_TEST_ALL_PREFIXES(DocumentTest, SandboxDisablesAppCache);
+  FRIEND_TEST_ALL_PREFIXES(DocumentTest, SuboriginDisablesAppCache);
 };
 
 }  // namespace blink
diff --git a/third_party/WebKit/Source/core/probe/BUILD.gn b/third_party/WebKit/Source/core/probe/BUILD.gn
index 12ddeed8..b4a07cb 100644
--- a/third_party/WebKit/Source/core/probe/BUILD.gn
+++ b/third_party/WebKit/Source/core/probe/BUILD.gn
@@ -4,13 +4,6 @@
 
 import("//third_party/WebKit/Source/core/core.gni")
 
-blink_core_sources("probe") {
-  sources = [
-    "CoreProbes.cpp",
-    "CoreProbes.h",
-  ]
-}
-
 action("instrumentation_probes") {
   script = "../../build/scripts/make_instrumenting_probes.py"
 
@@ -37,21 +30,26 @@
   ]
 }
 
-# Compiles the sources generated above.
 source_set("generated") {
-  sources = get_target_outputs(":instrumentation_probes")
+  deps = [
+    ":instrumentation_probes",
+  ]
+}
 
-  configs -= core_config_remove
-  configs +=
-      core_config_add + [ "//third_party/WebKit/Source/core:core_include_dirs" ]
-
-  if (is_win) {
-    cflags = [ "/wd4702" ]  # Unreachable code.
-  }
+# Compiles the sources generated above.
+blink_core_sources("probe") {
+  sources = [
+    "CoreProbes.cpp",
+    "CoreProbes.h",
+  ]
+  sources += get_target_outputs(":instrumentation_probes")
 
   deps = [
     ":instrumentation_probes",
     "//skia",
+    "//third_party/WebKit/Source/bindings/core/v8:bindings_core_v8_generated",
+    "//third_party/WebKit/Source/core:all_generators",
+    "//third_party/WebKit/Source/platform:make_platform_generated",
     "//third_party/WebKit/Source/platform/wtf",
     "//v8",
   ]
diff --git a/third_party/WebKit/Source/core/probe/CoreProbes.h b/third_party/WebKit/Source/core/probe/CoreProbes.h
index f177b8e4..c9971199 100644
--- a/third_party/WebKit/Source/core/probe/CoreProbes.h
+++ b/third_party/WebKit/Source/core/probe/CoreProbes.h
@@ -32,9 +32,11 @@
 #define CoreProbes_h
 
 #include "core/CoreExport.h"
+#include "core/animation/Animation.h"
 #include "core/dom/Document.h"
-#include "core/dom/Node.h"
+#include "core/dom/PseudoElement.h"
 #include "core/frame/LocalFrame.h"
+#include "core/html/HTMLSlotElement.h"
 #include "core/page/ChromeClient.h"
 #include "platform/probe/PlatformProbes.h"
 
diff --git a/third_party/WebKit/Source/core/probe/CoreProbes.json5 b/third_party/WebKit/Source/core/probe/CoreProbes.json5
index 77111ae..2c89d97 100644
--- a/third_party/WebKit/Source/core/probe/CoreProbes.json5
+++ b/third_party/WebKit/Source/core/probe/CoreProbes.json5
@@ -3,10 +3,6 @@
     export_symbol: "CORE_EXPORT",
     include_path: "core/inspector",
     includes: [
-      "core/animation/Animation.h",
-      "core/dom/CharacterData.h",
-      "core/dom/PseudoElement.h",
-      "core/html/HTMLSlotElement.h",
       "core/probe/CoreProbes.h",
     ],
   },
diff --git a/third_party/WebKit/Source/core/style/ComputedStyle.cpp b/third_party/WebKit/Source/core/style/ComputedStyle.cpp
index e621681..a522d94 100644
--- a/third_party/WebKit/Source/core/style/ComputedStyle.cpp
+++ b/third_party/WebKit/Source/core/style/ComputedStyle.cpp
@@ -436,7 +436,7 @@
   if (!cached_pseudo_styles_)
     cached_pseudo_styles_ = WTF::WrapUnique(new PseudoStyleCache);
 
-  cached_pseudo_styles_->push_back(pseudo);
+  cached_pseudo_styles_->push_back(std::move(pseudo));
 
   return result;
 }
diff --git a/third_party/WebKit/Source/core/svg/graphics/filters/SVGFEImage.cpp b/third_party/WebKit/Source/core/svg/graphics/filters/SVGFEImage.cpp
index cdb8104..3991102e 100644
--- a/third_party/WebKit/Source/core/svg/graphics/filters/SVGFEImage.cpp
+++ b/third_party/WebKit/Source/core/svg/graphics/filters/SVGFEImage.cpp
@@ -45,7 +45,7 @@
                  PassRefPtr<Image> image,
                  SVGPreserveAspectRatio* preserve_aspect_ratio)
     : FilterEffect(filter),
-      image_(image),
+      image_(std::move(image)),
       tree_scope_(nullptr),
       preserve_aspect_ratio_(preserve_aspect_ratio) {
   FilterEffect::SetOperatingColorSpace(kColorSpaceDeviceRGB);
diff --git a/third_party/WebKit/Source/devtools/front_end/quick_open/FilteredListWidget.js b/third_party/WebKit/Source/devtools/front_end/quick_open/FilteredListWidget.js
index 694c868..86152f7 100644
--- a/third_party/WebKit/Source/devtools/front_end/quick_open/FilteredListWidget.js
+++ b/third_party/WebKit/Source/devtools/front_end/quick_open/FilteredListWidget.js
@@ -150,6 +150,8 @@
   }
 
   _attachProvider() {
+    this._list.replaceAllItems([]);
+    this._list.invalidateItemHeight();
     if (this._provider) {
       this._provider.setRefreshCallback(this._itemsLoaded.bind(this, this._provider));
       this._provider.attach();
@@ -172,7 +174,6 @@
    * @override
    */
   wasShown() {
-    this._list.invalidateItemHeight();
     this._attachProvider();
   }
 
diff --git a/third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp b/third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp
index 7b06537..71d0042 100644
--- a/third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp
+++ b/third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp
@@ -1143,36 +1143,6 @@
   return toHTMLInputElement(node)->type() == InputTypeNames::range;
 }
 
-bool AXNodeObject::IsChecked() const {
-  Node* node = this->GetNode();
-  if (!node)
-    return false;
-
-  // First test for native checkedness semantics
-  if (isHTMLInputElement(*node))
-    return toHTMLInputElement(*node).ShouldAppearChecked();
-
-  // Else, if this is an ARIA role checkbox or radio or menuitemcheckbox
-  // or menuitemradio or switch, respect the aria-checked attribute
-  switch (AriaRoleAttribute()) {
-    case kCheckBoxRole:
-    case kMenuItemCheckBoxRole:
-    case kMenuItemRadioRole:
-    case kRadioButtonRole:
-    case kSwitchRole:
-      if (EqualIgnoringASCIICase(
-              GetAOMPropertyOrARIAAttribute(AOMStringProperty::kChecked),
-              "true"))
-        return true;
-      return false;
-    default:
-      break;
-  }
-
-  // Otherwise it's not checked
-  return false;
-}
-
 bool AXNodeObject::IsClickable() const {
   if (GetNode()) {
     if (GetNode()->IsElementNode() &&
@@ -1607,16 +1577,6 @@
   return ToElement(node)->innerText();
 }
 
-AccessibilityButtonState AXNodeObject::CheckboxOrRadioValue() const {
-  if (IsNativeCheckboxInMixedState())
-    return kButtonStateMixed;
-
-  if (IsNativeCheckboxOrRadio())
-    return IsChecked() ? kButtonStateOn : kButtonStateOff;
-
-  return AXObject::CheckboxOrRadioValue();
-}
-
 RGBA32 AXNodeObject::ColorValue() const {
   if (!isHTMLInputElement(GetNode()) || !IsColorWell())
     return AXObject::ColorValue();
@@ -1856,15 +1816,6 @@
   return b1 && b2 && b1 == b2;
 }
 
-bool AXNodeObject::IsNativeCheckboxInMixedState() const {
-  if (!isHTMLInputElement(node_))
-    return false;
-
-  HTMLInputElement* input = toHTMLInputElement(node_);
-  return input->type() == InputTypeNames::checkbox &&
-         input->ShouldAppearIndeterminate();
-}
-
 //
 // New AX name calculation.
 //
diff --git a/third_party/WebKit/Source/modules/accessibility/AXNodeObject.h b/third_party/WebKit/Source/modules/accessibility/AXNodeObject.h
index 1a371e9..3a27cee 100644
--- a/third_party/WebKit/Source/modules/accessibility/AXNodeObject.h
+++ b/third_party/WebKit/Source/modules/accessibility/AXNodeObject.h
@@ -126,7 +126,6 @@
   bool IsNativeSlider() const override;
 
   // Check object state.
-  bool IsChecked() const final;
   bool IsClickable() const final;
   bool IsEnabled() const override;
   AccessibilityExpanded IsExpanded() const override;
@@ -155,7 +154,6 @@
   String GetText() const override;
 
   // Properties of interactive elements.
-  AccessibilityButtonState CheckboxOrRadioValue() const final;
   AriaCurrentState GetAriaCurrentState() const final;
   InvalidState GetInvalidState() const final;
   // Only used when invalidState() returns InvalidStateOther.
diff --git a/third_party/WebKit/Source/modules/accessibility/AXObject.cpp b/third_party/WebKit/Source/modules/accessibility/AXObject.cpp
index 597376b2..325ba70 100644
--- a/third_party/WebKit/Source/modules/accessibility/AXObject.cpp
+++ b/third_party/WebKit/Source/modules/accessibility/AXObject.cpp
@@ -29,6 +29,7 @@
 #include "modules/accessibility/AXObject.h"
 
 #include "SkMatrix44.h"
+#include "core/InputTypeNames.h"
 #include "core/css/resolver/StyleResolver.h"
 #include "core/dom/AccessibleNode.h"
 #include "core/dom/DocumentUserGestureToken.h"
@@ -39,6 +40,7 @@
 #include "core/frame/Settings.h"
 #include "core/html/HTMLDialogElement.h"
 #include "core/html/HTMLFrameOwnerElement.h"
+#include "core/html/HTMLInputElement.h"
 #include "core/html/parser/HTMLParserIdioms.h"
 #include "core/layout/LayoutBoxModelObject.h"
 #include "modules/accessibility/AXObjectCacheImpl.h"
@@ -403,6 +405,71 @@
          role == kToggleButtonRole;
 }
 
+bool AXObject::IsCheckable() const {
+  switch (RoleValue()) {
+    case kCheckBoxRole:
+    case kMenuItemCheckBoxRole:
+    case kMenuItemRadioRole:
+    case kRadioButtonRole:
+    case kSwitchRole:
+      return true;
+    default:
+      return false;
+  }
+}
+
+// Why this is here instead of AXNodeObject:
+// Because an AXMenuListOption (<option>) can
+// have an ARIA role of menuitemcheckbox/menuitemradio
+// yet does not inherit from AXNodeObject
+AccessibilityButtonState AXObject::CheckedState() const {
+  if (!IsCheckable())
+    return kButtonStateOff;
+
+  const AtomicString& checkedAttribute =
+      GetAOMPropertyOrARIAAttribute(AOMStringProperty::kChecked);
+  if (checkedAttribute) {
+    if (EqualIgnoringASCIICase(checkedAttribute, "true"))
+      return kButtonStateOn;
+
+    if (EqualIgnoringASCIICase(checkedAttribute, "mixed")) {
+      // Only checkboxes and radios should support the mixed state.
+      const AccessibilityRole role = RoleValue();
+      if (role == kCheckBoxRole || role == kMenuItemCheckBoxRole ||
+          role == kRadioButtonRole || role == kMenuItemRadioRole)
+        return kButtonStateMixed;
+    }
+
+    return kButtonStateOff;
+  }
+
+  const Node* node = this->GetNode();
+  if (!node)
+    return kButtonStateOff;
+
+  if (IsNativeInputInMixedState(node))
+    return kButtonStateMixed;
+
+  if (isHTMLInputElement(*node) &&
+      toHTMLInputElement(*node).ShouldAppearChecked()) {
+    return kButtonStateOn;
+  }
+
+  return kButtonStateOff;
+}
+
+bool AXObject::IsNativeInputInMixedState(const Node* node) {
+  if (!isHTMLInputElement(node))
+    return false;
+
+  const HTMLInputElement* input = toHTMLInputElement(node);
+  const auto inputType = input->type();
+  if (inputType != InputTypeNames::checkbox &&
+      inputType != InputTypeNames::radio)
+    return false;
+  return input->ShouldAppearIndeterminate();
+}
+
 bool AXObject::IsLandmarkRelated() const {
   switch (RoleValue()) {
     case kApplicationRole:
@@ -946,8 +1013,8 @@
       return AXSupportedAction::kSelect;
     case kCheckBoxRole:
     case kSwitchRole:
-      return IsChecked() ? AXSupportedAction::kCheck
-                         : AXSupportedAction::kUncheck;
+      return CheckedState() == kButtonStateOff ? AXSupportedAction::kCheck
+                                               : AXSupportedAction::kUncheck;
     case kLinkRole:
       return AXSupportedAction::kJump;
     case kPopUpButtonRole:
@@ -957,22 +1024,6 @@
   }
 }
 
-AccessibilityButtonState AXObject::CheckboxOrRadioValue() const {
-  const AtomicString& checked_attribute =
-      GetAOMPropertyOrARIAAttribute(AOMStringProperty::kChecked);
-  if (EqualIgnoringASCIICase(checked_attribute, "true"))
-    return kButtonStateOn;
-
-  if (EqualIgnoringASCIICase(checked_attribute, "mixed")) {
-    // Only checkboxes should support the mixed state.
-    AccessibilityRole role = AriaRoleAttribute();
-    if (role == kCheckBoxRole || role == kMenuItemCheckBoxRole)
-      return kButtonStateMixed;
-  }
-
-  return kButtonStateOff;
-}
-
 bool AXObject::IsMultiline() const {
   Node* node = this->GetNode();
   if (!node)
diff --git a/third_party/WebKit/Source/modules/accessibility/AXObject.h b/third_party/WebKit/Source/modules/accessibility/AXObject.h
index a471f6c4..fc3f607f 100644
--- a/third_party/WebKit/Source/modules/accessibility/AXObject.h
+++ b/third_party/WebKit/Source/modules/accessibility/AXObject.h
@@ -625,6 +625,7 @@
   virtual bool IsAXTable() const { return false; }
   virtual bool IsAnchor() const { return false; }
   bool IsButton() const;
+  bool IsCheckable() const;
   bool IsCanvas() const { return RoleValue() == kCanvasRole; }
   bool IsCheckbox() const { return RoleValue() == kCheckBoxRole; }
   bool IsCheckboxOrRadio() const { return IsCheckbox() || IsRadioButton(); }
@@ -683,7 +684,6 @@
   bool IsWebArea() const { return RoleValue() == kWebAreaRole; }
 
   // Check object state.
-  virtual bool IsChecked() const { return false; }
   virtual bool IsClickable() const;
   virtual bool IsCollapsed() const { return false; }
   virtual bool IsEnabled() const { return false; }
@@ -858,7 +858,7 @@
 
   // Properties of interactive elements.
   AXSupportedAction Action() const;
-  virtual AccessibilityButtonState CheckboxOrRadioValue() const;
+  AccessibilityButtonState CheckedState() const;
   virtual AriaCurrentState GetAriaCurrentState() const {
     return kAriaCurrentStateUndefined;
   }
@@ -1120,6 +1120,7 @@
   void UpdateCachedAttributeValuesIfNeeded() const;
 
  private:
+  static bool IsNativeInputInMixedState(const Node*);
   static bool IncludesARIAWidgetRole(const String&);
   static bool HasInteractiveARIAAttribute(const Element&);
 
diff --git a/third_party/WebKit/Source/modules/accessibility/InspectorAccessibilityAgent.cpp b/third_party/WebKit/Source/modules/accessibility/InspectorAccessibilityAgent.cpp
index 126266f..dca7729 100644
--- a/third_party/WebKit/Source/modules/accessibility/InspectorAccessibilityAgent.cpp
+++ b/third_party/WebKit/Source/modules/accessibility/InspectorAccessibilityAgent.cpp
@@ -253,7 +253,7 @@
                       protocol::Array<AXProperty>& properties) {
   AccessibilityRole role = ax_object.RoleValue();
   if (RoleAllowsChecked(role)) {
-    AccessibilityButtonState checked = ax_object.CheckboxOrRadioValue();
+    AccessibilityButtonState checked = ax_object.CheckedState();
     switch (checked) {
       case kButtonStateOff:
         properties.addItem(
diff --git a/third_party/WebKit/Source/modules/indexeddb/IDBAny.cpp b/third_party/WebKit/Source/modules/indexeddb/IDBAny.cpp
index a7924ff..1793fb2 100644
--- a/third_party/WebKit/Source/modules/indexeddb/IDBAny.cpp
+++ b/third_party/WebKit/Source/modules/indexeddb/IDBAny.cpp
@@ -125,7 +125,7 @@
     : type_(kIDBValueArrayType), idb_values_(values) {}
 
 IDBAny::IDBAny(PassRefPtr<IDBValue> value)
-    : type_(kIDBValueType), idb_value_(value) {}
+    : type_(kIDBValueType), idb_value_(std::move(value)) {}
 
 IDBAny::IDBAny(IDBKey* key) : type_(kKeyType), idb_key_(key) {}
 
diff --git a/third_party/WebKit/Source/modules/indexeddb/IDBValue.cpp b/third_party/WebKit/Source/modules/indexeddb/IDBValue.cpp
index ae58020b..3f35598 100644
--- a/third_party/WebKit/Source/modules/indexeddb/IDBValue.cpp
+++ b/third_party/WebKit/Source/modules/indexeddb/IDBValue.cpp
@@ -30,7 +30,7 @@
                    const WebVector<WebBlobInfo>& web_blob_info,
                    IDBKey* primary_key,
                    const IDBKeyPath& key_path)
-    : data_(data),
+    : data_(std::move(data)),
       blob_data_(WTF::MakeUnique<Vector<RefPtr<BlobDataHandle>>>()),
       blob_info_(
           WTF::WrapUnique(new Vector<WebBlobInfo>(web_blob_info.size()))),
diff --git a/third_party/WebKit/Source/modules/webaudio/DeferredTaskHandler.cpp b/third_party/WebKit/Source/modules/webaudio/DeferredTaskHandler.cpp
index 874d32a..2461771 100644
--- a/third_party/WebKit/Source/modules/webaudio/DeferredTaskHandler.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/DeferredTaskHandler.cpp
@@ -256,7 +256,7 @@
     PassRefPtr<AudioHandler> handler) {
   DCHECK(handler);
   DCHECK(!rendering_orphan_handlers_.Contains(handler));
-  rendering_orphan_handlers_.push_back(handler);
+  rendering_orphan_handlers_.push_back(std::move(handler));
 }
 
 void DeferredTaskHandler::RequestToDeleteHandlersOnMainThread() {
diff --git a/third_party/WebKit/Source/platform/fonts/SegmentedFontData.h b/third_party/WebKit/Source/platform/fonts/SegmentedFontData.h
index f5f04459..251c7f5 100644
--- a/third_party/WebKit/Source/platform/fonts/SegmentedFontData.h
+++ b/third_party/WebKit/Source/platform/fonts/SegmentedFontData.h
@@ -40,9 +40,8 @@
     return AdoptRef(new SegmentedFontData);
   }
 
-  void AppendFace(
-      const PassRefPtr<FontDataForRangeSet> font_data_for_range_set) {
-    faces_.push_back(font_data_for_range_set);
+  void AppendFace(PassRefPtr<FontDataForRangeSet> font_data_for_range_set) {
+    faces_.push_back(std::move(font_data_for_range_set));
   }
   unsigned NumFaces() const { return faces_.size(); }
   PassRefPtr<FontDataForRangeSet> FaceAt(unsigned i) const { return faces_[i]; }
diff --git a/third_party/WebKit/Source/platform/fonts/SimpleFontData.cpp b/third_party/WebKit/Source/platform/fonts/SimpleFontData.cpp
index beb0a4b..d322409 100644
--- a/third_party/WebKit/Source/platform/fonts/SimpleFontData.cpp
+++ b/third_party/WebKit/Source/platform/fonts/SimpleFontData.cpp
@@ -80,7 +80,7 @@
 SimpleFontData::SimpleFontData(const FontPlatformData& platform_data,
                                PassRefPtr<OpenTypeVerticalData> vertical_data)
     : platform_data_(platform_data),
-      vertical_data_(vertical_data),
+      vertical_data_(std::move(vertical_data)),
       is_text_orientation_fallback_(false),
       has_vertical_glyphs_(false),
       visual_overflow_inflation_for_ascent_(0),
diff --git a/third_party/WebKit/Source/platform/fonts/shaping/ShapeResultBuffer.h b/third_party/WebKit/Source/platform/fonts/shaping/ShapeResultBuffer.h
index 9546e5c3..8a68e5d 100644
--- a/third_party/WebKit/Source/platform/fonts/shaping/ShapeResultBuffer.h
+++ b/third_party/WebKit/Source/platform/fonts/shaping/ShapeResultBuffer.h
@@ -29,7 +29,7 @@
 
   void AppendResult(PassRefPtr<const ShapeResult> result) {
     has_vertical_offsets_ |= result->HasVerticalOffsets();
-    results_.push_back(result);
+    results_.push_back(std::move(result));
   }
 
   bool HasVerticalOffsets() const { return has_vertical_offsets_; }
diff --git a/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp b/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp
index cf7ef93a..1cef1ac 100644
--- a/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp
+++ b/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp
@@ -48,6 +48,7 @@
 #include "public/platform/WebScheduler.h"
 #include "public/platform/WebTraceLocation.h"
 #include "skia/ext/texture_handle.h"
+#include "third_party/skia/include/core/SkColorSpaceXformCanvas.h"
 #include "third_party/skia/include/core/SkData.h"
 #include "third_party/skia/include/core/SkSurface.h"
 #include "third_party/skia/include/gpu/GrContext.h"
@@ -779,8 +780,20 @@
 
   if (have_recorded_draw_commands_ && GetOrCreateSurface()) {
     TRACE_EVENT0("cc", "Canvas2DLayerBridge::flushRecordingOnly");
-    recorder_->finishRecordingAsPicture()->playback(
-        GetOrCreateSurface()->getCanvas());
+
+    // For legacy canvases, transform all input colors and images to the target
+    // space using a SkCreateColorSpaceXformCanvas. This ensures blending will
+    // be done using target space pixel values.
+    SkCanvas* canvas = GetOrCreateSurface()->getCanvas();
+    std::unique_ptr<SkCanvas> color_transform_canvas;
+    if (RuntimeEnabledFeatures::colorCorrectRenderingEnabled() &&
+        !sk_surfaces_use_color_space_) {
+      color_transform_canvas =
+          SkCreateColorSpaceXformCanvas(canvas, color_space_.ToSkColorSpace());
+      canvas = color_transform_canvas.get();
+    }
+
+    recorder_->finishRecordingAsPicture()->playback(canvas);
     if (is_deferral_enabled_)
       StartRecording();
     have_recorded_draw_commands_ = false;
diff --git a/third_party/WebKit/Source/platform/graphics/DecodingImageGenerator.cpp b/third_party/WebKit/Source/platform/graphics/DecodingImageGenerator.cpp
index a1781f5..b208f25 100644
--- a/third_party/WebKit/Source/platform/graphics/DecodingImageGenerator.cpp
+++ b/third_party/WebKit/Source/platform/graphics/DecodingImageGenerator.cpp
@@ -45,7 +45,7 @@
     uint32_t unique_id)
     : SkImageGenerator(info, unique_id),
       frame_generator_(std::move(frame_generator)),
-      data_(data),
+      data_(std::move(data)),
       all_data_received_(all_data_received),
       frame_index_(index),
       can_yuv_decode_(false) {}
diff --git a/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp b/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp
index 54ffc589..21596abf 100644
--- a/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp
+++ b/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp
@@ -644,7 +644,8 @@
 
     layer->set_offset_to_transform_parent(layer_offset);
     CompositorElementId element_id =
-        pending_layer.property_tree_state.GetCompositorElementId();
+        pending_layer.property_tree_state.GetCompositorElementId(
+            composited_element_ids);
     if (element_id) {
       layer->SetElementId(element_id);
       composited_element_ids.insert(element_id);
diff --git a/third_party/WebKit/Source/platform/graphics/paint/PropertyTreeState.cpp b/third_party/WebKit/Source/platform/graphics/paint/PropertyTreeState.cpp
index 548f581..1b07e96 100644
--- a/third_party/WebKit/Source/platform/graphics/paint/PropertyTreeState.cpp
+++ b/third_party/WebKit/Source/platform/graphics/paint/PropertyTreeState.cpp
@@ -38,25 +38,37 @@
   return child == ancestor;
 }
 
-const CompositorElementId PropertyTreeState::GetCompositorElementId() const {
+const CompositorElementId PropertyTreeState::GetCompositorElementId(
+    const CompositorElementIdSet& element_ids) const {
 // The effect or transform nodes could have a compositor element id. The order
 // doesn't matter as the element id should be the same on all that have a
 // non-default CompositorElementId.
+//
+// Note that PropertyTreeState acts as a context that accumulates state as we
+// traverse the tree building layers. This means that we could see a compositor
+// element id 'A' for a parent layer in conjunction with a compositor element id
+// 'B' for a child layer. To preserve uniqueness of element ids, then, we check
+// for presence in the |element_ids| set (which represents element ids already
+// previously attached to a layer). This is an interim step while we pursue
+// broader rework of animation subsystem noted in http://crbug.com/709137.
 #if DCHECK_IS_ON()
   CompositorElementId expected_element_id;
-  if (CompositorElementId actual_element_id =
-          Effect()->GetCompositorElementId()) {
-    expected_element_id = actual_element_id;
+  CompositorElementId effect_element_id = Effect()->GetCompositorElementId();
+  if (effect_element_id && !element_ids.Contains(effect_element_id)) {
+    expected_element_id = effect_element_id;
   }
-  if (CompositorElementId actual_element_id =
-          Transform()->GetCompositorElementId()) {
-    if (expected_element_id)
-      DCHECK_EQ(expected_element_id, actual_element_id);
+  CompositorElementId transform_element_id =
+      Transform()->GetCompositorElementId();
+  if (expected_element_id && transform_element_id &&
+      !element_ids.Contains(transform_element_id)) {
+    DCHECK_EQ(expected_element_id, transform_element_id);
   }
 #endif
-  if (Effect()->GetCompositorElementId())
+  if (Effect()->GetCompositorElementId() &&
+      !element_ids.Contains(Effect()->GetCompositorElementId()))
     return Effect()->GetCompositorElementId();
-  if (Transform()->GetCompositorElementId())
+  if (Transform()->GetCompositorElementId() &&
+      !element_ids.Contains(Transform()->GetCompositorElementId()))
     return Transform()->GetCompositorElementId();
   return CompositorElementId();
 }
diff --git a/third_party/WebKit/Source/platform/graphics/paint/PropertyTreeState.h b/third_party/WebKit/Source/platform/graphics/paint/PropertyTreeState.h
index 83ee2d3..01ee2d9f 100644
--- a/third_party/WebKit/Source/platform/graphics/paint/PropertyTreeState.h
+++ b/third_party/WebKit/Source/platform/graphics/paint/PropertyTreeState.h
@@ -62,7 +62,8 @@
   // Returns the compositor element id, if any, for this property state. If
   // neither the effect nor transform nodes have a compositor element id then a
   // default instance is returned.
-  const CompositorElementId GetCompositorElementId() const;
+  const CompositorElementId GetCompositorElementId(
+      const CompositorElementIdSet& element_ids) const;
 
   enum InnermostNode {
     kNone,  // None means that all nodes are their root values
diff --git a/third_party/WebKit/Source/platform/graphics/paint/PropertyTreeStateTest.cpp b/third_party/WebKit/Source/platform/graphics/paint/PropertyTreeStateTest.cpp
index 9af4024..178685b9 100644
--- a/third_party/WebKit/Source/platform/graphics/paint/PropertyTreeStateTest.cpp
+++ b/third_party/WebKit/Source/platform/graphics/paint/PropertyTreeStateTest.cpp
@@ -155,7 +155,8 @@
   PropertyTreeState state(TransformPaintPropertyNode::Root(),
                           ClipPaintPropertyNode::Root(),
                           EffectPaintPropertyNode::Root());
-  EXPECT_EQ(CompositorElementId(), state.GetCompositorElementId());
+  EXPECT_EQ(CompositorElementId(),
+            state.GetCompositorElementId(CompositorElementIdSet()));
 }
 
 TEST_F(PropertyTreeStateTest, CompositorElementIdWithElementIdOnTransformNode) {
@@ -168,7 +169,8 @@
                                          expected_compositor_element_id);
   PropertyTreeState state(transform.Get(), ClipPaintPropertyNode::Root(),
                           EffectPaintPropertyNode::Root());
-  EXPECT_EQ(expected_compositor_element_id, state.GetCompositorElementId());
+  EXPECT_EQ(expected_compositor_element_id,
+            state.GetCompositorElementId(CompositorElementIdSet()));
 }
 
 TEST_F(PropertyTreeStateTest, CompositorElementIdWithElementIdOnEffectNode) {
@@ -181,7 +183,8 @@
       kCompositingReasonNone, expected_compositor_element_id);
   PropertyTreeState state(TransformPaintPropertyNode::Root(),
                           ClipPaintPropertyNode::Root(), effect.Get());
-  EXPECT_EQ(expected_compositor_element_id, state.GetCompositorElementId());
+  EXPECT_EQ(expected_compositor_element_id,
+            state.GetCompositorElementId(CompositorElementIdSet()));
 }
 
 TEST_F(PropertyTreeStateTest, CompositorElementIdWithElementIdOnMultipleNodes) {
@@ -199,7 +202,35 @@
       kCompositingReasonNone, expected_compositor_element_id);
   PropertyTreeState state(transform.Get(), ClipPaintPropertyNode::Root(),
                           effect.Get());
-  EXPECT_EQ(expected_compositor_element_id, state.GetCompositorElementId());
+  EXPECT_EQ(expected_compositor_element_id,
+            state.GetCompositorElementId(CompositorElementIdSet()));
+}
+
+TEST_F(PropertyTreeStateTest, CompositorElementIdWithDifferingElementIds) {
+  CompositorElementId first_compositor_element_id = CompositorElementId(2, 0);
+  CompositorElementId second_compositor_element_id = CompositorElementId(3, 0);
+  RefPtr<TransformPaintPropertyNode> transform =
+      TransformPaintPropertyNode::Create(TransformPaintPropertyNode::Root(),
+                                         TransformationMatrix(), FloatPoint3D(),
+                                         false, 0, kCompositingReasonNone,
+                                         first_compositor_element_id);
+  RefPtr<EffectPaintPropertyNode> effect = EffectPaintPropertyNode::Create(
+      EffectPaintPropertyNode::Root(), TransformPaintPropertyNode::Root(),
+      ClipPaintPropertyNode::Root(), kColorFilterNone,
+      CompositorFilterOperations(), 1.0, SkBlendMode::kSrcOver,
+      kCompositingReasonNone, second_compositor_element_id);
+  PropertyTreeState state(transform.Get(), ClipPaintPropertyNode::Root(),
+                          effect.Get());
+
+  CompositorElementIdSet composited_element_ids;
+  composited_element_ids.insert(first_compositor_element_id);
+  EXPECT_EQ(second_compositor_element_id,
+            state.GetCompositorElementId(composited_element_ids));
+
+  composited_element_ids.Clear();
+  composited_element_ids.insert(second_compositor_element_id);
+  EXPECT_EQ(first_compositor_element_id,
+            state.GetCompositorElementId(composited_element_ids));
 }
 
 }  // namespace blink
diff --git a/third_party/WebKit/Source/web/WebAXObject.cpp b/third_party/WebKit/Source/web/WebAXObject.cpp
index 91eeccd7..71831f74 100644
--- a/third_party/WebKit/Source/web/WebAXObject.cpp
+++ b/third_party/WebKit/Source/web/WebAXObject.cpp
@@ -280,18 +280,18 @@
   return static_cast<WebAXAriaCurrentState>(private_->GetAriaCurrentState());
 }
 
-bool WebAXObject::IsButtonStateMixed() const {
+bool WebAXObject::IsCheckable() const {
   if (IsDetached())
     return false;
 
-  return private_->CheckboxOrRadioValue() == kButtonStateMixed;
+  return private_->IsCheckable();
 }
 
-bool WebAXObject::IsChecked() const {
+WebAXCheckedState WebAXObject::CheckedState() const {
   if (IsDetached())
-    return false;
+    return WebAXCheckedFalse;
 
-  return private_->IsChecked();
+  return static_cast<WebAXCheckedState>(private_->CheckedState());
 }
 
 bool WebAXObject::IsClickable() const {
diff --git a/third_party/WebKit/public/web/WebAXEnums.h b/third_party/WebKit/public/web/WebAXEnums.h
index 95885f45..a296a7d4 100644
--- a/third_party/WebKit/public/web/WebAXEnums.h
+++ b/third_party/WebKit/public/web/WebAXEnums.h
@@ -257,6 +257,12 @@
   kWebAXSortDirectionOther
 };
 
+enum WebAXCheckedState {
+  WebAXCheckedFalse = 0,
+  WebAXCheckedTrue,
+  WebAXCheckedMixed
+};
+
 // Expanded State.
 // These values must match blink::AccessibilityExpanded values.
 // Enforced in AssertMatchingEnums.cpp.
diff --git a/third_party/WebKit/public/web/WebAXObject.h b/third_party/WebKit/public/web/WebAXObject.h
index 1d7e50a5..2820d63 100644
--- a/third_party/WebKit/public/web/WebAXObject.h
+++ b/third_party/WebKit/public/web/WebAXObject.h
@@ -127,8 +127,8 @@
 
   BLINK_EXPORT bool IsAnchor() const;
   BLINK_EXPORT bool IsAriaReadOnly() const;
-  BLINK_EXPORT bool IsButtonStateMixed() const;
-  BLINK_EXPORT bool IsChecked() const;
+  BLINK_EXPORT WebAXCheckedState CheckedState() const;
+  BLINK_EXPORT bool IsCheckable() const;
   BLINK_EXPORT bool IsClickable() const;
   BLINK_EXPORT bool IsCollapsed() const;
   BLINK_EXPORT bool IsControl() const;
diff --git a/tools/metrics/actions/actions.xml b/tools/metrics/actions/actions.xml
index 70fb35d5..be61786 100644
--- a/tools/metrics/actions/actions.xml
+++ b/tools/metrics/actions/actions.xml
@@ -1162,6 +1162,14 @@
   <description>User showed the history bottom sheet content.</description>
 </action>
 
+<action name="Android.ChromeHome.ShowIncognitoHome">
+  <owner>mdjones@chromium.org</owner>
+  <owner>twellington@chromium.org</owner>
+  <description>
+    User showed the incognito bottom sheet content in the &quot;Home&quot; tab.
+  </description>
+</action>
+
 <action name="Android.ChromeHome.ShowSuggestions">
   <owner>mdjones@chromium.org</owner>
   <owner>twellington@chromium.org</owner>
diff --git a/tools/metrics/histograms/histograms.xml b/tools/metrics/histograms/histograms.xml
index 1a461ef..28d3fee 100644
--- a/tools/metrics/histograms/histograms.xml
+++ b/tools/metrics/histograms/histograms.xml
@@ -8552,6 +8552,9 @@
     Count of how often a specific content type has a content settings exception
     defined for a file: scheme with no path (i.e., wildcard path). Recorded once
     per exception at browser start.
+
+    Note: The values of this metric collected for Chrome 49 (early 2016) are
+    innacurate and should not be trusted. crbug.com/589255.
   </summary>
 </histogram>
 
@@ -8562,6 +8565,9 @@
     Count of how often a specific content type has a content settings exception
     defined for a file: scheme with a valid, non-empty path. Recorded once per
     exception at browser start.
+
+    Note: The values of this metric collected for Chrome 49 (early 2016) are
+    innacurate and should not be trusted. crbug.com/589255.
   </summary>
 </histogram>
 
@@ -81311,6 +81317,9 @@
   <summary>
     Count of how often a specific content type (permission) is changed using the
     content settings menu.
+
+    Note: The values of this metric collected for Chrome 49 (early 2016) are
+    innacurate and should not be trusted. crbug.com/589255.
   </summary>
 </histogram>
 
@@ -81321,6 +81330,9 @@
   <summary>
     Count of how often a specific content type (permission) is set to 'Allowed'
     using the content settings menu.
+
+    Note: The values of this metric collected for Chrome 49 (early 2016) are
+    innacurate and should not be trusted. crbug.com/589255.
   </summary>
 </histogram>
 
@@ -81331,6 +81343,9 @@
   <summary>
     Count of how often a specific content type (permission) is set to 'Blocked'
     using the content settings menu.
+
+    Note: The values of this metric collected for Chrome 49 (early 2016) are
+    innacurate and should not be trusted. crbug.com/589255.
   </summary>
 </histogram>
 
@@ -81341,6 +81356,9 @@
   <summary>
     Count of how often a specific content type (permission) is reset to the
     default value using the content settings menu.
+
+    Note: The values of this metric collected for Chrome 49 (early 2016) are
+    innacurate and should not be trusted. crbug.com/589255.
   </summary>
 </histogram>
 
@@ -81351,6 +81369,9 @@
   <summary>
     Count of how often a specific content type (permission) is changed using the
     Origin Info dialog.
+
+    Note: The values of this metric collected for Chrome 49 (early 2016) are
+    innacurate and should not be trusted. crbug.com/589255.
   </summary>
 </histogram>
 
@@ -81361,6 +81382,9 @@
   <summary>
     Count of how often a specific content type (permission) is set to 'Allowed'
     using the Origin Info dialog.
+
+    Note: The values of this metric collected for Chrome 49 (early 2016) are
+    innacurate and should not be trusted. crbug.com/589255.
   </summary>
 </histogram>
 
@@ -81371,6 +81395,9 @@
   <summary>
     Count of how often a specific content type (permission) is set to 'Blocked'
     using the Origin Info dialog.
+
+    Note: The values of this metric collected for Chrome 49 (early 2016) are
+    innacurate and should not be trusted. crbug.com/589255.
   </summary>
 </histogram>
 
@@ -81384,6 +81411,9 @@
   <summary>
     Count of how often a specific content type (permission) is changed using the
     Page Info UI.
+
+    Note: The values of this metric collected for Chrome 49 (early 2016) are
+    innacurate and should not be trusted. crbug.com/589255.
   </summary>
 </histogram>
 
@@ -87214,8 +87244,13 @@
   <int value="22" label="App banner setting (Android only)"/>
   <int value="23" label="Site engagement setting"/>
   <int value="24" label="Durable storage setting"/>
-  <int value="25" label="Key generation setting"/>
-  <int value="26" label="Background sync setting"/>
+  <int value="25" label="Key generation setting [removed]"/>
+  <int value="26" label="Bluetooth guard setting"/>
+  <int value="27" label="Background sync setting"/>
+  <int value="28" label="Autoplay setting"/>
+  <int value="30" label="Important site info setting"/>
+  <int value="31" label="Permission autoblocker data setting"/>
+  <int value="32" label="Subresource filter setting"/>
 </enum>
 
 <enum name="ContentTypeParseableResult" type="int">
@@ -108502,6 +108537,7 @@
   <int value="2" label="Infobar dismissed by user"/>
   <int value="3" label="Infobar dismissed by navigation"/>
   <int value="4" label="Infobar dismissed by reload"/>
+  <int value="5" label="Infobar dismissed by tab closure"/>
 </enum>
 
 <enum name="PreviewsUserOptedOut" type="int">
diff --git a/tools/perf/chrome_telemetry_build/chromium_config.py b/tools/perf/chrome_telemetry_build/chromium_config.py
index dcbc7b86..a39dca92 100644
--- a/tools/perf/chrome_telemetry_build/chromium_config.py
+++ b/tools/perf/chrome_telemetry_build/chromium_config.py
@@ -2,15 +2,25 @@
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
 
+import logging
 import os
+import sys
 
-from core import path_util
+
+def GetChromiumSrcDir():
+  return os.path.abspath(
+      os.path.join(os.path.abspath(__file__), '..', '..', '..', '..'))
+
+
+def GetTelemetryDir():
+  return os.path.join(GetChromiumSrcDir(), 'third_party', 'catapult',
+                      'telemetry')
 
 
 CLIENT_CONFIG_PATH = os.path.join(
     os.path.dirname(os.path.abspath(__file__)), 'binary_dependencies.json')
 
-path_util.AddTelemetryToPath()
+sys.path.insert(1, os.path.join(GetTelemetryDir()))
 
 from telemetry import project_config
 
@@ -18,11 +28,20 @@
 class ChromiumConfig(project_config.ProjectConfig):
 
   def __init__(self, top_level_dir=None, benchmark_dirs=None,
-               client_configs=None, default_chrome_root=None):
+               client_configs=None,
+               default_chrome_root=GetChromiumSrcDir()):
     if client_configs is None:
       client_configs = [CLIENT_CONFIG_PATH]
-    if default_chrome_root is None:
-      default_chrome_root = path_util.GetChromiumSrcDir()
+
+    perf_dir = os.path.join(GetChromiumSrcDir(), 'tools', 'perf')
+    if not benchmark_dirs:
+      benchmark_dirs = [os.path.join(perf_dir, 'benchmarks')]
+      logging.info('No benchmark directories specified. Defaulting to %s',
+                   benchmark_dirs)
+    if not top_level_dir:
+      top_level_dir = perf_dir
+      logging.info('No top level directory specified. Defaulting to %s',
+                   top_level_dir)
 
     super(ChromiumConfig, self).__init__(
         top_level_dir=top_level_dir, benchmark_dirs=benchmark_dirs,
diff --git a/tools/perf/core/path_util.py b/tools/perf/core/path_util.py
index dcfcd08..27ea09c1 100644
--- a/tools/perf/core/path_util.py
+++ b/tools/perf/core/path_util.py
@@ -5,15 +5,18 @@
 import os
 import sys
 
+sys.path.insert(1, os.path.join(os.path.abspath(__file__), '..', '..'))
+
+from chrome_telemetry_build import chromium_config
+
 
 def GetChromiumSrcDir():
-  return os.path.abspath(os.path.join(
-      os.path.dirname(__file__), '..', '..', '..'))
+  return chromium_config.GetChromiumSrcDir()
+
 
 
 def GetTelemetryDir():
-  return os.path.join(
-      GetChromiumSrcDir(), 'third_party', 'catapult', 'telemetry')
+  return chromium_config.GetTelemetryDir()
 
 
 def GetPerfDir():
diff --git a/tools/perf/core/perf_data_generator.py b/tools/perf/core/perf_data_generator.py
index b48d440..b4b42eca 100755
--- a/tools/perf/core/perf_data_generator.py
+++ b/tools/perf/core/perf_data_generator.py
@@ -16,9 +16,9 @@
 import sys
 import sets
 
-from core import path_util
-path_util.AddTelemetryToPath()
+from chrome_telemetry_build import chromium_config
 
+sys.path.append(chromium_config.GetTelemetryDir())
 from telemetry import benchmark as benchmark_module
 from telemetry import decorators
 from telemetry.core import discover
diff --git a/tools/perf/run_benchmark b/tools/perf/run_benchmark
index 00fb6af..228405ff 100755
--- a/tools/perf/run_benchmark
+++ b/tools/perf/run_benchmark
@@ -15,11 +15,8 @@
 
 
 def main():
-  config = chromium_config.ChromiumConfig(
-      benchmark_dirs=[path_util.GetPerfBenchmarksDir()],
-      top_level_dir=path_util.GetPerfDir())
+  config = chromium_config.ChromiumConfig()
   return benchmark_runner.main(config, [trybot_command.Trybot])
 
-
 if __name__ == '__main__':
   sys.exit(main())
diff --git a/ui/accessibility/ax_enums.idl b/ui/accessibility/ax_enums.idl
index edc7304..ca638d2 100644
--- a/ui/accessibility/ax_enums.idl
+++ b/ui/accessibility/ax_enums.idl
@@ -213,7 +213,6 @@
 
   enum AXState {
     busy,
-    checked,
     collapsed,
     default,
     disabled,
@@ -434,6 +433,9 @@
     // if an element has an aria-invalid attribute.
     invalid_state,
 
+    // Of type AXCheckedState
+    checked_state,
+
     // Specifies the direction of the text, e.g., right-to-left.
     text_direction,
 
@@ -453,10 +455,6 @@
   };
 
   [cpp_enum_prefix_override="ax_attr"] enum AXBoolAttribute {
-    // True if an ARIA toggle button, a checkbox or
-    // a menu item checkbox is in the "mixed" state.
-    STATE_mixed,
-
     // Live region attributes.
     container_live_atomic,
     container_live_busy,
@@ -593,6 +591,12 @@
     other
   };
 
+  enum AXCheckedState {
+    false,
+    true,
+    mixed
+  };
+
   enum AXSortDirection {
     unsorted,
     ascending,
diff --git a/ui/accessibility/ax_node_data.cc b/ui/accessibility/ax_node_data.cc
index af53bc6..c150dee 100644
--- a/ui/accessibility/ax_node_data.cc
+++ b/ui/accessibility/ax_node_data.cc
@@ -107,6 +107,7 @@
     case AX_ATTR_BACKGROUND_COLOR:
     case AX_ATTR_COLOR:
     case AX_ATTR_INVALID_STATE:
+    case AX_ATTR_CHECKED_STATE:
     case AX_ATTR_TEXT_DIRECTION:
     case AX_ATTR_TEXT_STYLE:
     case AX_ATTR_ARIA_COL_COUNT:
@@ -437,8 +438,6 @@
 
   if (state & (1 << AX_STATE_BUSY))
     result += " BUSY";
-  if (state & (1 << AX_STATE_CHECKED))
-    result += " CHECKED";
   if (state & (1 << AX_STATE_COLLAPSED))
     result += " COLLAPSED";
   if (state & (1 << AX_STATE_EDITABLE))
@@ -710,6 +709,19 @@
             break;
         }
         break;
+      case AX_ATTR_CHECKED_STATE:
+        switch (int_attributes[i].second) {
+          case AX_CHECKED_STATE_FALSE:
+            result += " checked_state=false";
+            break;
+          case AX_CHECKED_STATE_TRUE:
+            result += " checked_state=true";
+            break;
+          case AX_CHECKED_STATE_MIXED:
+            result += " checked_state=mixed";
+            break;
+        }
+        break;
       case AX_INT_ATTRIBUTE_NONE:
         break;
     }
@@ -816,9 +828,6 @@
   for (size_t i = 0; i < bool_attributes.size(); ++i) {
     std::string value = bool_attributes[i].second ? "true" : "false";
     switch (bool_attributes[i].first) {
-      case AX_ATTR_STATE_MIXED:
-        result += " mixed=" + value;
-        break;
       case AX_ATTR_LIVE_ATOMIC:
         result += " atomic=" + value;
         break;
diff --git a/ui/accessibility/ax_node_position_unittest.cc b/ui/accessibility/ax_node_position_unittest.cc
index 253967c..7b720ac 100644
--- a/ui/accessibility/ax_node_position_unittest.cc
+++ b/ui/accessibility/ax_node_position_unittest.cc
@@ -130,7 +130,8 @@
   root_.child_ids.push_back(button_.id);
 
   check_box_.role = AX_ROLE_CHECK_BOX;
-  check_box_.state = 1 << AX_STATE_CHECKED;
+  check_box_.AddIntAttribute(ui::AX_ATTR_CHECKED_STATE,
+                             ui::AX_CHECKED_STATE_TRUE);
   check_box_.SetName("Check box");
   check_box_.location = gfx::RectF(20, 50, 200, 30);
   check_box_.AddIntListAttribute(AX_ATTR_WORD_STARTS,
diff --git a/ui/accessibility/ax_tree_unittest.cc b/ui/accessibility/ax_tree_unittest.cc
index fdf41f9..7c13c19 100644
--- a/ui/accessibility/ax_tree_unittest.cc
+++ b/ui/accessibility/ax_tree_unittest.cc
@@ -627,7 +627,8 @@
   initial_state.nodes[0].id = 1;
   initial_state.nodes[0].role = AX_ROLE_BUTTON;
   initial_state.nodes[0].state = 0;
-  initial_state.nodes[0].AddStateFlag(AX_STATE_CHECKED);
+  initial_state.nodes[0].AddIntAttribute(ui::AX_ATTR_CHECKED_STATE,
+                                         ui::AX_CHECKED_STATE_TRUE);
   initial_state.nodes[0].AddStateFlag(AX_STATE_FOCUSABLE);
   AXTree tree(initial_state);
 
@@ -641,6 +642,8 @@
   update.nodes[0].id = 1;
   update.nodes[0].role = AX_ROLE_CHECK_BOX;
   update.nodes[0].state = 0;
+  update.nodes[0].AddIntAttribute(ui::AX_ATTR_CHECKED_STATE,
+                                  ui::AX_CHECKED_STATE_FALSE);
   update.nodes[0].AddStateFlag(AX_STATE_FOCUSABLE);
   update.nodes[0].AddStateFlag(AX_STATE_VISITED);
   EXPECT_TRUE(tree.Unserialize(update));
@@ -649,8 +652,8 @@
       fake_delegate.attribute_change_log();
   ASSERT_EQ(3U, change_log.size());
   EXPECT_EQ("Role changed from button to checkBox", change_log[0]);
-  EXPECT_EQ("checked changed to false", change_log[1]);
-  EXPECT_EQ("visited changed to true", change_log[2]);
+  EXPECT_EQ("visited changed to true", change_log[1]);
+  EXPECT_EQ("checkedState changed from 2 to 1", change_log[2]);
 
   tree.SetDelegate(NULL);
 }
diff --git a/ui/accessibility/platform/ax_platform_node_auralinux.cc b/ui/accessibility/platform/ax_platform_node_auralinux.cc
index 11bdcde2..4a85863 100644
--- a/ui/accessibility/platform/ax_platform_node_auralinux.cc
+++ b/ui/accessibility/platform/ax_platform_node_auralinux.cc
@@ -461,10 +461,8 @@
 }
 
 void AXPlatformNodeAuraLinux::GetAtkState(AtkStateSet* atk_state_set) {
-  uint32_t state = GetData().state;
+  const uint32_t state = GetData().state;
 
-  if (state & (1 << ui::AX_STATE_CHECKED))
-    atk_state_set_add_state(atk_state_set, ATK_STATE_CHECKED);
   if (state & (1 << ui::AX_STATE_DEFAULT))
     atk_state_set_add_state(atk_state_set, ATK_STATE_DEFAULT);
   if (state & (1 << ui::AX_STATE_EDITABLE))
@@ -482,6 +480,20 @@
   if (state & (1 << ui::AX_STATE_SELECTED))
     atk_state_set_add_state(atk_state_set, ATK_STATE_SELECTED);
 
+  // Checked state
+  const auto checked_state = static_cast<ui::AXCheckedState>(
+      GetIntAttribute(ui::AX_ATTR_CHECKED_STATE));
+  switch (checked_state) {
+    case ui::AX_CHECKED_STATE_MIXED:
+      atk_state_set_add_state(atk_state_set, ATK_STATE_INDETERMINATE);
+      break;
+    case ui::AX_CHECKED_STATE_TRUE:
+      atk_state_set_add_state(atk_state_set, ATK_STATE_CHECKED);
+      break;
+    default:
+      break;
+  }
+
   if (delegate_->GetFocus() == GetNativeViewAccessible())
     atk_state_set_add_state(atk_state_set, ATK_STATE_FOCUSED);
 }
diff --git a/ui/accessibility/platform/ax_platform_node_win.cc b/ui/accessibility/platform/ax_platform_node_win.cc
index 9a3619e..42f2467 100644
--- a/ui/accessibility/platform/ax_platform_node_win.cc
+++ b/ui/accessibility/platform/ax_platform_node_win.cc
@@ -1053,11 +1053,10 @@
 }
 
 int AXPlatformNodeWin::MSAAState() {
-  uint32_t state = GetData().state;
+  const AXNodeData& data = GetData();
+  const uint32_t state = data.state;
 
   int msaa_state = 0;
-  if (state & (1 << ui::AX_STATE_CHECKED))
-    msaa_state |= STATE_SYSTEM_CHECKED;
   if (state & (1 << ui::AX_STATE_COLLAPSED))
     msaa_state |= STATE_SYSTEM_COLLAPSED;
   if (state & (1 << ui::AX_STATE_DEFAULT))
@@ -1089,6 +1088,20 @@
   if (state & (1 << ui::AX_STATE_DISABLED))
     msaa_state |= STATE_SYSTEM_UNAVAILABLE;
 
+  // Checked state
+  const auto checked_state = static_cast<ui::AXCheckedState>(
+      GetIntAttribute(ui::AX_ATTR_CHECKED_STATE));
+  switch (checked_state) {
+    case ui::AX_CHECKED_STATE_TRUE:
+      msaa_state |= STATE_SYSTEM_CHECKED;
+      break;
+    case ui::AX_CHECKED_STATE_MIXED:
+      msaa_state |= STATE_SYSTEM_MIXED;
+      break;
+    default:
+      break;
+  }
+
   gfx::NativeViewAccessible focus = delegate_->GetFocus();
   if (focus == GetNativeViewAccessible())
     msaa_state |= STATE_SYSTEM_FOCUSED;
@@ -1099,7 +1112,7 @@
   // TODO(dmazzoni): this should probably check if focus is actually inside
   // the menu bar, but we don't currently track focus inside menu pop-ups,
   // and Chrome only has one menu visible at a time so this works for now.
-  if (GetData().role == ui::AX_ROLE_MENU_BAR &&
+  if (data.role == ui::AX_ROLE_MENU_BAR &&
       !(state & (1 << ui::AX_STATE_INVISIBLE))) {
     msaa_state |= STATE_SYSTEM_FOCUSED;
   }
diff --git a/ui/gfx/color_space.cc b/ui/gfx/color_space.cc
index 27a0f54..ef58e58 100644
--- a/ui/gfx/color_space.cc
+++ b/ui/gfx/color_space.cc
@@ -427,25 +427,57 @@
       return SkColorSpace::MakeSRGBLinear();
   }
 
+  // Prefer to used the named gamma and gamut, if possible.
+  bool has_named_gamma = true;
+  SkColorSpace::RenderTargetGamma named_gamma =
+      SkColorSpace::kSRGB_RenderTargetGamma;
+  switch (transfer_) {
+    case TransferID::IEC61966_2_1:
+      break;
+    case TransferID::LINEAR:
+    case TransferID::LINEAR_HDR:
+      named_gamma = SkColorSpace::kLinear_RenderTargetGamma;
+      break;
+    default:
+      has_named_gamma = false;
+      break;
+  }
+  bool has_named_gamut = true;
+  SkColorSpace::Gamut named_gamut = SkColorSpace::kSRGB_Gamut;
+  switch (primaries_) {
+    case PrimaryID::BT709:
+      break;
+    case PrimaryID::ADOBE_RGB:
+      named_gamut = SkColorSpace::kAdobeRGB_Gamut;
+      break;
+    case PrimaryID::SMPTEST432_1:
+      named_gamut = SkColorSpace::kDCIP3_D65_Gamut;
+      break;
+    case PrimaryID::BT2020:
+      named_gamut = SkColorSpace::kRec2020_Gamut;
+      break;
+    default:
+      has_named_gamut = false;
+      break;
+  }
+  if (has_named_gamut && has_named_gamma)
+    return SkColorSpace::MakeRGB(named_gamma, named_gamut);
+
+  // Use named gamma with custom primaries, if possible.
   SkMatrix44 to_xyz_d50;
   GetPrimaryMatrix(&to_xyz_d50);
+  if (has_named_gamma)
+    return SkColorSpace::MakeRGB(named_gamma, to_xyz_d50);
 
-  // Use the named sRGB and linear transfer functions.
-  if (transfer_ == TransferID::IEC61966_2_1) {
-    return SkColorSpace::MakeRGB(SkColorSpace::kSRGB_RenderTargetGamma,
-                                 to_xyz_d50);
-  }
-  if (transfer_ == TransferID::LINEAR || transfer_ == TransferID::LINEAR_HDR) {
-    return SkColorSpace::MakeRGB(SkColorSpace::kLinear_RenderTargetGamma,
-                                 to_xyz_d50);
-  }
-
-  // Use the parametric transfer function if no other option is available.
+  // Use the parametric transfer function if there is no named transfer
+  // function.
   SkColorSpaceTransferFn fn;
   if (!GetTransferFunction(&fn)) {
     DLOG(ERROR) << "Failed to parameterize transfer function for SkColorSpace";
     return nullptr;
   }
+  if (has_named_gamut)
+    return SkColorSpace::MakeRGB(fn, named_gamut);
   return SkColorSpace::MakeRGB(fn, to_xyz_d50);
 }
 
diff --git a/ui/gfx/color_space_unittest.cc b/ui/gfx/color_space_unittest.cc
index c80fbb8..2ec3fdc 100644
--- a/ui/gfx/color_space_unittest.cc
+++ b/ui/gfx/color_space_unittest.cc
@@ -172,5 +172,33 @@
   }
 }
 
+TEST(ColorSpace, ToSkColorSpace) {
+  const size_t kNumTests = 4;
+  ColorSpace color_spaces[kNumTests] = {
+      ColorSpace(ColorSpace::PrimaryID::BT709,
+                 ColorSpace::TransferID::IEC61966_2_1),
+      ColorSpace(ColorSpace::PrimaryID::ADOBE_RGB,
+                 ColorSpace::TransferID::IEC61966_2_1),
+      ColorSpace(ColorSpace::PrimaryID::SMPTEST432_1,
+                 ColorSpace::TransferID::LINEAR),
+      ColorSpace(ColorSpace::PrimaryID::BT2020,
+                 ColorSpace::TransferID::IEC61966_2_1),
+  };
+  sk_sp<SkColorSpace> sk_color_spaces[kNumTests] = {
+      SkColorSpace::MakeSRGB(),
+      SkColorSpace::MakeRGB(SkColorSpace::kSRGB_RenderTargetGamma,
+                            SkColorSpace::kAdobeRGB_Gamut),
+      SkColorSpace::MakeRGB(SkColorSpace::kLinear_RenderTargetGamma,
+                            SkColorSpace::kDCIP3_D65_Gamut),
+      SkColorSpace::MakeRGB(SkColorSpace::kSRGB_RenderTargetGamma,
+                            SkColorSpace::kRec2020_Gamut),
+  };
+  for (size_t i = 0; i < kNumTests; ++i) {
+    EXPECT_TRUE(SkColorSpace::Equals(color_spaces[i].ToSkColorSpace().get(),
+                                     sk_color_spaces[i].get()))
+        << " on iteration i = " << i;
+  }
+}
+
 }  // namespace
 }  // namespace gfx
diff --git a/ui/views/controls/button/checkbox.cc b/ui/views/controls/button/checkbox.cc
index 7d933e14..acef051 100644
--- a/ui/views/controls/button/checkbox.cc
+++ b/ui/views/controls/button/checkbox.cc
@@ -111,8 +111,9 @@
 void Checkbox::GetAccessibleNodeData(ui::AXNodeData* node_data) {
   LabelButton::GetAccessibleNodeData(node_data);
   node_data->role = ui::AX_ROLE_CHECK_BOX;
-  if (checked())
-    node_data->AddStateFlag(ui::AX_STATE_CHECKED);
+  const ui::AXCheckedState checked_state =
+      checked() ? ui::AX_CHECKED_STATE_TRUE : ui::AX_CHECKED_STATE_FALSE;
+  node_data->AddIntAttribute(ui::AX_ATTR_CHECKED_STATE, checked_state);
   if (enabled()) {
     if (checked()) {
       node_data->AddIntAttribute(ui::AX_ATTR_ACTION,
diff --git a/ui/views/controls/button/toggle_button.cc b/ui/views/controls/button/toggle_button.cc
index 45e99d6..e2ef935 100644
--- a/ui/views/controls/button/toggle_button.cc
+++ b/ui/views/controls/button/toggle_button.cc
@@ -233,8 +233,9 @@
   CustomButton::GetAccessibleNodeData(node_data);
 
   node_data->role = ui::AX_ROLE_SWITCH;
-  if (is_on_)
-    node_data->AddStateFlag(ui::AX_STATE_CHECKED);
+  const ui::AXCheckedState checked_state =
+      is_on_ ? ui::AX_CHECKED_STATE_TRUE : ui::AX_CHECKED_STATE_FALSE;
+  node_data->AddIntAttribute(ui::AX_ATTR_CHECKED_STATE, checked_state);
 }
 
 void ToggleButton::NotifyClick(const ui::Event& event) {
diff --git a/ui/views/controls/focusable_border.cc b/ui/views/controls/focusable_border.cc
index 972bb56..e96914d 100644
--- a/ui/views/controls/focusable_border.cc
+++ b/ui/views/controls/focusable_border.cc
@@ -54,7 +54,7 @@
   flags.setStrokeWidth(SkIntToScalar(stroke_width_px));
 
   // Scale the rect and snap to pixel boundaries.
-  gfx::RectF rect(gfx::ScaleToEnclosingRect(view.GetLocalBounds(), dsf));
+  gfx::RectF rect(gfx::ScaleToEnclosedRect(view.GetLocalBounds(), dsf));
   rect.Inset(gfx::InsetsF(stroke_width_px / 2.0f));
 
   SkPath path;
diff --git a/ui/views/controls/menu/menu_item_view.cc b/ui/views/controls/menu/menu_item_view.cc
index 450cf5ac..46ff17be 100644
--- a/ui/views/controls/menu/menu_item_view.cc
+++ b/ui/views/controls/menu/menu_item_view.cc
@@ -174,10 +174,12 @@
       node_data->AddStateFlag(ui::AX_STATE_HASPOPUP);
       break;
     case CHECKBOX:
-    case RADIO:
-      if (GetDelegate()->IsItemChecked(GetCommand()))
-        node_data->AddStateFlag(ui::AX_STATE_CHECKED);
-      break;
+    case RADIO: {
+      const bool is_checked = GetDelegate()->IsItemChecked(GetCommand());
+      const ui::AXCheckedState checked_state =
+          is_checked ? ui::AX_CHECKED_STATE_TRUE : ui::AX_CHECKED_STATE_FALSE;
+      node_data->AddIntAttribute(ui::AX_ATTR_CHECKED_STATE, checked_state);
+    } break;
     case NORMAL:
     case SEPARATOR:
     case EMPTY: