diff --git a/.gn b/.gn index 727405fb..bfc788d4 100644 --- a/.gn +++ b/.gn
@@ -65,6 +65,7 @@ #"//pdf/*", # Medium-hard. #"//ppapi/*", # Lots of errors. + "//ppapi/examples/*", "//printing/*", #"//remoting/*", # Medium-hard.
diff --git a/DEPS b/DEPS index bd88889..656c61a 100644 --- a/DEPS +++ b/DEPS
@@ -39,11 +39,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': 'e3c2f80006e766eb7e99bc64911243346b3ac6d0', + 'skia_revision': 'acc875f9a27d3d0ece0c1b09bbc249ac69e76bac', # 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': 'c80d154e4dc3fb6699e50d5c1b9e252ddaa00a46', + 'v8_revision': '74bef07d437170a2ac5d3980f4ba335310fe7c82', # 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. @@ -55,7 +55,7 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling build tools # and whatever else without interference from each other. - 'buildtools_revision': 'fee7f1e849f59c3fd7bb7b2cacf876edca0572f3', + 'buildtools_revision': '6d0c448437825a1af0ad2ea28128dda474403cd7', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling PDFium # and whatever else without interference from each other. @@ -106,7 +106,7 @@ deps = { 'src/breakpad/src': - Var('chromium_git') + '/breakpad/breakpad/src.git' + '@' + '08e33932af979a29a09b9d893f93132757dc05b6', + Var('chromium_git') + '/breakpad/breakpad/src.git' + '@' + '5b741be8cc6b746d4a77eab8a4434078affe65be', 'src/buildtools': Var('chromium_git') + '/chromium/buildtools.git' + '@' + Var('buildtools_revision'), @@ -193,7 +193,7 @@ Var('chromium_git') + '/external/github.com/sctplab/usrsctp' + '@' + 'c60ec8b35c3fe6027d7a3faae89d1c8d7dd3ce98', 'src/third_party/libsrtp': - Var('chromium_git') + '/chromium/deps/libsrtp.git' + '@' + 'b8dd754b4fa05fd4cf1c2e8dc3b1ac976280e41a', # from svn revision 295151 + Var('chromium_git') + '/chromium/deps/libsrtp.git' + '@' + '8a7662a400df7bdb0dc5cb7c0bf890dfa3481295', # from svn revision 295151 'src/third_party/yasm/source/patched-yasm': Var('chromium_git') + '/chromium/deps/yasm/patched-yasm.git' + '@' + '4671120cd8558ce62ee8672ebf3eb6f5216f909b',
diff --git a/android_webview/native/input_stream_impl.h b/android_webview/native/input_stream_impl.h index d4ce755..7da24cfc 100644 --- a/android_webview/native/input_stream_impl.h +++ b/android_webview/native/input_stream_impl.h
@@ -32,7 +32,7 @@ ~InputStreamImpl() override; // Gets the underlying Java object. Guaranteed non-NULL. - const jobject jobj() const { return jobject_.obj(); } + jobject jobj() const { return jobject_.obj(); } // InputStream implementation. bool BytesAvailable(int* bytes_available) const override;
diff --git a/ash/accelerators/accelerator_controller_unittest.cc b/ash/accelerators/accelerator_controller_unittest.cc index 738bf485..b9304b6 100644 --- a/ash/accelerators/accelerator_controller_unittest.cc +++ b/ash/accelerators/accelerator_controller_unittest.cc
@@ -868,7 +868,7 @@ { TestVolumeControlDelegate* delegate = new TestVolumeControlDelegate; ash::Shell::GetInstance()->system_tray_delegate()->SetVolumeControlDelegate( - scoped_ptr<VolumeControlDelegate>(delegate).Pass()); + scoped_ptr<VolumeControlDelegate>(delegate)); EXPECT_EQ(0, delegate->handle_volume_mute_count()); EXPECT_TRUE(ProcessInController(volume_mute)); EXPECT_EQ(1, delegate->handle_volume_mute_count()); @@ -890,7 +890,7 @@ DummyBrightnessControlDelegate* delegate = new DummyBrightnessControlDelegate; GetController()->SetBrightnessControlDelegate( - scoped_ptr<BrightnessControlDelegate>(delegate).Pass()); + scoped_ptr<BrightnessControlDelegate>(delegate)); EXPECT_EQ(0, delegate->handle_brightness_down_count()); EXPECT_TRUE(ProcessInController(brightness_down)); EXPECT_EQ(1, delegate->handle_brightness_down_count()); @@ -912,7 +912,7 @@ DummyKeyboardBrightnessControlDelegate* delegate = new DummyKeyboardBrightnessControlDelegate; GetController()->SetKeyboardBrightnessControlDelegate( - scoped_ptr<KeyboardBrightnessControlDelegate>(delegate).Pass()); + scoped_ptr<KeyboardBrightnessControlDelegate>(delegate)); EXPECT_EQ(0, delegate->handle_keyboard_brightness_down_count()); EXPECT_TRUE(ProcessInController(alt_brightness_down)); EXPECT_EQ(1, delegate->handle_keyboard_brightness_down_count()); @@ -1146,7 +1146,7 @@ DummyImeControlDelegate* delegate = new DummyImeControlDelegate; GetController()->SetImeControlDelegate( - scoped_ptr<ImeControlDelegate>(delegate).Pass()); + scoped_ptr<ImeControlDelegate>(delegate)); EXPECT_EQ(0, delegate->handle_next_ime_count()); EXPECT_FALSE(ProcessInController(shift_alt_press)); EXPECT_TRUE(ProcessInController(shift_alt)); @@ -1408,7 +1408,7 @@ DummyBrightnessControlDelegate* delegate = new DummyBrightnessControlDelegate; GetController()->SetBrightnessControlDelegate( - scoped_ptr<BrightnessControlDelegate>(delegate).Pass()); + scoped_ptr<BrightnessControlDelegate>(delegate)); EXPECT_EQ(0, delegate->handle_brightness_down_count()); EXPECT_TRUE(ProcessInController(brightness_down)); EXPECT_EQ(1, delegate->handle_brightness_down_count()); @@ -1428,7 +1428,7 @@ EXPECT_TRUE(ProcessInController(volume_up)); TestVolumeControlDelegate* delegate = new TestVolumeControlDelegate; ash::Shell::GetInstance()->system_tray_delegate()->SetVolumeControlDelegate( - scoped_ptr<VolumeControlDelegate>(delegate).Pass()); + scoped_ptr<VolumeControlDelegate>(delegate)); EXPECT_EQ(0, delegate->handle_volume_mute_count()); EXPECT_TRUE(ProcessInController(volume_mute)); EXPECT_EQ(1, delegate->handle_volume_mute_count()); @@ -1495,7 +1495,7 @@ // For testing the deprecated and new IME shortcuts. DummyImeControlDelegate* delegate = new DummyImeControlDelegate; GetController()->SetImeControlDelegate( - scoped_ptr<ImeControlDelegate>(delegate).Pass()); + scoped_ptr<ImeControlDelegate>(delegate)); } ui::Accelerator CreateAccelerator(const AcceleratorData& data) const {
diff --git a/ash/accelerators/accelerator_filter_unittest.cc b/ash/accelerators/accelerator_filter_unittest.cc index aebec8d4..9eefbbd 100644 --- a/ash/accelerators/accelerator_filter_unittest.cc +++ b/ash/accelerators/accelerator_filter_unittest.cc
@@ -94,7 +94,7 @@ scoped_ptr<ui::AcceleratorHistory> accelerator_history(new ui::AcceleratorHistory()); ::wm::AcceleratorFilter filter( - scoped_ptr< ::wm::AcceleratorDelegate>(new AcceleratorDelegate).Pass(), + scoped_ptr<::wm::AcceleratorDelegate>(new AcceleratorDelegate), accelerator_history.get()); aura::Window* root_window = Shell::GetPrimaryRootWindow();
diff --git a/ash/accelerators/accelerator_interactive_uitest_chromeos.cc b/ash/accelerators/accelerator_interactive_uitest_chromeos.cc index 4947f56..162ba64c 100644 --- a/ash/accelerators/accelerator_interactive_uitest_chromeos.cc +++ b/ash/accelerators/accelerator_interactive_uitest_chromeos.cc
@@ -168,7 +168,7 @@ // Test VOLUME_MUTE, VOLUME_DOWN, and VOLUME_UP. TestVolumeControlDelegate* volume_delegate = new TestVolumeControlDelegate; shell()->system_tray_delegate()->SetVolumeControlDelegate( - scoped_ptr<VolumeControlDelegate>(volume_delegate).Pass()); + scoped_ptr<VolumeControlDelegate>(volume_delegate)); // VOLUME_MUTE. EXPECT_EQ(0, volume_delegate->handle_volume_mute_count()); SendKeyPressSync(ui::VKEY_VOLUME_MUTE, false, false, false);
diff --git a/ash/accelerators/key_hold_detector.cc b/ash/accelerators/key_hold_detector.cc index 99a9abb..0c8d1ed 100644 --- a/ash/accelerators/key_hold_detector.cc +++ b/ash/accelerators/key_hold_detector.cc
@@ -4,6 +4,8 @@ #include "ash/accelerators/key_hold_detector.h" +#include <utility> + #include "ash/shell.h" #include "base/message_loop/message_loop.h" #include "ui/aura/window_tracker.h" @@ -43,8 +45,7 @@ } // namespace KeyHoldDetector::KeyHoldDetector(scoped_ptr<Delegate> delegate) - : state_(INITIAL), - delegate_(delegate.Pass()) {} + : state_(INITIAL), delegate_(std::move(delegate)) {} KeyHoldDetector::~KeyHoldDetector() {}
diff --git a/ash/accelerators/magnifier_key_scroller.cc b/ash/accelerators/magnifier_key_scroller.cc index f5198dc..b9cd646 100644 --- a/ash/accelerators/magnifier_key_scroller.cc +++ b/ash/accelerators/magnifier_key_scroller.cc
@@ -4,6 +4,8 @@ #include "ash/accelerators/magnifier_key_scroller.h" +#include <utility> + #include "ash/accelerators/key_hold_detector.h" #include "ash/ash_switches.h" #include "ash/magnifier/magnification_controller.h" @@ -36,7 +38,7 @@ // static scoped_ptr<ui::EventHandler> MagnifierKeyScroller::CreateHandler() { scoped_ptr<KeyHoldDetector::Delegate> delegate(new MagnifierKeyScroller()); - return scoped_ptr<ui::EventHandler>(new KeyHoldDetector(delegate.Pass())); + return scoped_ptr<ui::EventHandler>(new KeyHoldDetector(std::move(delegate))); } bool MagnifierKeyScroller::ShouldProcessEvent(const ui::KeyEvent* event) const {
diff --git a/ash/accelerators/spoken_feedback_toggler.cc b/ash/accelerators/spoken_feedback_toggler.cc index 5cd9eba..28897de 100644 --- a/ash/accelerators/spoken_feedback_toggler.cc +++ b/ash/accelerators/spoken_feedback_toggler.cc
@@ -4,6 +4,8 @@ #include "ash/accelerators/spoken_feedback_toggler.h" +#include <utility> + #include "ash/accelerators/key_hold_detector.h" #include "ash/accessibility_delegate.h" #include "ash/shell.h" @@ -27,7 +29,7 @@ // static scoped_ptr<ui::EventHandler> SpokenFeedbackToggler::CreateHandler() { scoped_ptr<KeyHoldDetector::Delegate> delegate(new SpokenFeedbackToggler()); - return scoped_ptr<ui::EventHandler>(new KeyHoldDetector(delegate.Pass())); + return scoped_ptr<ui::EventHandler>(new KeyHoldDetector(std::move(delegate))); } bool SpokenFeedbackToggler::ShouldProcessEvent(
diff --git a/ash/display/display_color_manager_chromeos.cc b/ash/display/display_color_manager_chromeos.cc index 1ae844f..12419789 100644 --- a/ash/display/display_color_manager_chromeos.cc +++ b/ash/display/display_color_manager_chromeos.cc
@@ -4,6 +4,8 @@ #include "ash/display/display_color_manager_chromeos.h" +#include <utility> + #include "base/bind.h" #include "base/bind_helpers.h" #include "base/command_line.h" @@ -129,7 +131,7 @@ blocking_pool_, FROM_HERE, request, base::Bind(&DisplayColorManager::UpdateCalibrationData, AsWeakPtr(), display->display_id(), display->product_id(), - base::Passed(data.Pass()))); + base::Passed(std::move(data)))); } void DisplayColorManager::UpdateCalibrationData(
diff --git a/ash/display/display_error_observer_chromeos.cc b/ash/display/display_error_observer_chromeos.cc index 123ef7e..c08e640 100644 --- a/ash/display/display_error_observer_chromeos.cc +++ b/ash/display/display_error_observer_chromeos.cc
@@ -4,6 +4,8 @@ #include "ash/display/display_error_observer_chromeos.h" +#include <utility> + #include "ash/system/system_notifier.h" #include "grit/ash_resources.h" #include "grit/ash_strings.h" @@ -52,7 +54,8 @@ message_center::NotifierId(message_center::NotifierId::SYSTEM_COMPONENT, system_notifier::kNotifierDisplayError), message_center::RichNotificationData(), NULL)); - message_center::MessageCenter::Get()->AddNotification(notification.Pass()); + message_center::MessageCenter::Get()->AddNotification( + std::move(notification)); } base::string16
diff --git a/ash/display/resolution_notification_controller.cc b/ash/display/resolution_notification_controller.cc index bd31c95..609b4ea0 100644 --- a/ash/display/resolution_notification_controller.cc +++ b/ash/display/resolution_notification_controller.cc
@@ -4,6 +4,8 @@ #include "ash/display/resolution_notification_controller.h" +#include <utility> + #include "ash/display/display_info.h" #include "ash/display/display_manager.h" #include "ash/shell.h" @@ -235,7 +237,7 @@ data, new ResolutionChangeNotificationDelegate( this, change_info_->timeout_count > 0))); notification->SetSystemPriority(); - message_center->AddNotification(notification.Pass()); + message_center->AddNotification(std::move(notification)); } void ResolutionNotificationController::OnTimerTick() {
diff --git a/ash/shell.cc b/ash/shell.cc index e54163d..192d9d72 100644 --- a/ash/shell.cc +++ b/ash/shell.cc
@@ -1062,7 +1062,7 @@ // Set accelerator controller delegates. accelerator_controller_->SetBrightnessControlDelegate( scoped_ptr<ash::BrightnessControlDelegate>( - new ash::system::BrightnessControllerChromeos).Pass()); + new ash::system::BrightnessControllerChromeos)); power_event_observer_.reset(new PowerEventObserver()); user_activity_notifier_.reset(
diff --git a/ash/system/chromeos/bluetooth/bluetooth_notification_controller.cc b/ash/system/chromeos/bluetooth/bluetooth_notification_controller.cc index bb8164d..eb12ea7 100644 --- a/ash/system/chromeos/bluetooth/bluetooth_notification_controller.cc +++ b/ash/system/chromeos/bluetooth/bluetooth_notification_controller.cc
@@ -4,6 +4,8 @@ #include "ash/system/chromeos/bluetooth/bluetooth_notification_controller.h" +#include <utility> + #include "ash/system/system_notifier.h" #include "base/bind.h" #include "base/callback.h" @@ -283,7 +285,8 @@ message_center::NotifierId(message_center::NotifierId::SYSTEM_COMPONENT, system_notifier::kNotifierBluetooth), optional, NULL)); - message_center::MessageCenter::Get()->AddNotification(notification.Pass()); + message_center::MessageCenter::Get()->AddNotification( + std::move(notification)); } void BluetoothNotificationController::NotifyPairing( @@ -311,7 +314,8 @@ system_notifier::kNotifierBluetooth), optional, new BluetoothPairingNotificationDelegate( adapter_, device->GetAddress()))); - message_center::MessageCenter::Get()->AddNotification(notification.Pass()); + message_center::MessageCenter::Get()->AddNotification( + std::move(notification)); } void BluetoothNotificationController::NotifyPairedDevice( @@ -336,7 +340,8 @@ message_center::NotifierId(message_center::NotifierId::SYSTEM_COMPONENT, system_notifier::kNotifierBluetooth), optional, NULL)); - message_center::MessageCenter::Get()->AddNotification(notification.Pass()); + message_center::MessageCenter::Get()->AddNotification( + std::move(notification)); } } // namespace ash
diff --git a/ash/system/chromeos/power/battery_notification.cc b/ash/system/chromeos/power/battery_notification.cc index 664aa39..cd8b3ae 100644 --- a/ash/system/chromeos/power/battery_notification.cc +++ b/ash/system/chromeos/power/battery_notification.cc
@@ -94,8 +94,7 @@ MessageCenter* message_center, TrayPower::NotificationState notification_state) : message_center_(message_center) { - message_center_->AddNotification( - CreateNotification(notification_state).Pass()); + message_center_->AddNotification(CreateNotification(notification_state)); } BatteryNotification::~BatteryNotification() { @@ -106,8 +105,8 @@ void BatteryNotification::Update( TrayPower::NotificationState notification_state) { if (message_center_->FindVisibleNotificationById(kBatteryNotificationId)) { - message_center_->UpdateNotification( - kBatteryNotificationId, CreateNotification(notification_state).Pass()); + message_center_->UpdateNotification(kBatteryNotificationId, + CreateNotification(notification_state)); } }
diff --git a/ash/system/chromeos/power/tray_power.cc b/ash/system/chromeos/power/tray_power.cc index a23b52a5..01557ef 100644 --- a/ash/system/chromeos/power/tray_power.cc +++ b/ash/system/chromeos/power/tray_power.cc
@@ -4,6 +4,8 @@ #include "ash/system/chromeos/power/tray_power.h" +#include <utility> + #include "ash/accessibility_delegate.h" #include "ash/ash_switches.h" #include "ash/shell.h" @@ -230,7 +232,7 @@ system_notifier::kNotifierPower), message_center::RichNotificationData(), new UsbNotificationDelegate(this))); - message_center_->AddNotification(notification.Pass()); + message_center_->AddNotification(std::move(notification)); return true; } else if (!usb_charger_is_connected && usb_charger_was_connected_) { // USB charger was unplugged or was identified as a different type while
diff --git a/ash/system/chromeos/screen_security/screen_capture_tray_item.cc b/ash/system/chromeos/screen_security/screen_capture_tray_item.cc index 6dc8360..ecd157f2 100644 --- a/ash/system/chromeos/screen_security/screen_capture_tray_item.cc +++ b/ash/system/chromeos/screen_security/screen_capture_tray_item.cc
@@ -4,6 +4,8 @@ #include "ash/system/chromeos/screen_security/screen_capture_tray_item.h" +#include <utility> + #include "ash/shell.h" #include "ash/system/system_notifier.h" #include "grit/ash_resources.h" @@ -66,7 +68,8 @@ system_notifier::kNotifierScreenCapture), data, new tray::ScreenNotificationDelegate(this))); notification->SetSystemPriority(); - message_center::MessageCenter::Get()->AddNotification(notification.Pass()); + message_center::MessageCenter::Get()->AddNotification( + std::move(notification)); } std::string ScreenCaptureTrayItem::GetNotificationId() {
diff --git a/ash/system/chromeos/screen_security/screen_share_tray_item.cc b/ash/system/chromeos/screen_security/screen_share_tray_item.cc index 1a23b7f6..1c8d8a0 100644 --- a/ash/system/chromeos/screen_security/screen_share_tray_item.cc +++ b/ash/system/chromeos/screen_security/screen_share_tray_item.cc
@@ -4,6 +4,8 @@ #include "ash/system/chromeos/screen_security/screen_share_tray_item.h" +#include <utility> + #include "ash/shell.h" #include "ash/system/system_notifier.h" #include "grit/ash_resources.h" @@ -74,7 +76,8 @@ system_notifier::kNotifierScreenShare), data, new tray::ScreenNotificationDelegate(this))); notification->SetSystemPriority(); - message_center::MessageCenter::Get()->AddNotification(notification.Pass()); + message_center::MessageCenter::Get()->AddNotification( + std::move(notification)); } std::string ScreenShareTrayItem::GetNotificationId() {
diff --git a/ash/system/chromeos/session/logout_button_tray.cc b/ash/system/chromeos/session/logout_button_tray.cc index 1b7addcb..f076e8c3f 100644 --- a/ash/system/chromeos/session/logout_button_tray.cc +++ b/ash/system/chromeos/session/logout_button_tray.cc
@@ -4,6 +4,8 @@ #include "ash/system/chromeos/session/logout_button_tray.h" +#include <utility> + #include "ash/shelf/shelf_types.h" #include "ash/shell.h" #include "ash/system/chromeos/session/logout_confirmation_controller.h" @@ -83,7 +85,7 @@ insets += gfx::Insets(0, kLogoutButtonHorizontalExtraPadding, 0, kLogoutButtonHorizontalExtraPadding); border->set_insets(insets); - SetBorder(border.Pass()); + SetBorder(std::move(border)); set_animate_on_state_change(false); SetMinSize(gfx::Size(0, kShelfItemHeight));
diff --git a/ash/system/chromeos/session/logout_confirmation_controller.cc b/ash/system/chromeos/session/logout_confirmation_controller.cc index fdf1cc6..970903d 100644 --- a/ash/system/chromeos/session/logout_confirmation_controller.cc +++ b/ash/system/chromeos/session/logout_confirmation_controller.cc
@@ -4,6 +4,8 @@ #include "ash/system/chromeos/session/logout_confirmation_controller.h" +#include <utility> + #include "ash/session/session_state_delegate.h" #include "ash/shell.h" #include "ash/system/chromeos/session/logout_confirmation_dialog.h" @@ -56,7 +58,7 @@ void LogoutConfirmationController::SetClockForTesting( scoped_ptr<base::TickClock> clock) { - clock_ = clock.Pass(); + clock_ = std::move(clock); } void LogoutConfirmationController::OnLockStateChanged(bool locked) {
diff --git a/ash/system/chromeos/session/tray_session_length_limit.cc b/ash/system/chromeos/session/tray_session_length_limit.cc index 980e7a5..c1db839 100644 --- a/ash/system/chromeos/session/tray_session_length_limit.cc +++ b/ash/system/chromeos/session/tray_session_length_limit.cc
@@ -5,6 +5,7 @@ #include "ash/system/chromeos/session/tray_session_length_limit.h" #include <algorithm> +#include <utility> #include "ash/shell.h" #include "ash/system/chromeos/label_tray_view.h" @@ -161,9 +162,10 @@ data, NULL /* delegate */)); notification->SetSystemPriority(); if (message_center->FindVisibleNotificationById(kNotificationId)) - message_center->UpdateNotification(kNotificationId, notification.Pass()); + message_center->UpdateNotification(kNotificationId, + std::move(notification)); else - message_center->AddNotification(notification.Pass()); + message_center->AddNotification(std::move(notification)); last_limit_state_ = limit_state_; }
diff --git a/ash/system/chromeos/supervised/tray_supervised_user.cc b/ash/system/chromeos/supervised/tray_supervised_user.cc index 65b7481..9e6d6b21 100644 --- a/ash/system/chromeos/supervised/tray_supervised_user.cc +++ b/ash/system/chromeos/supervised/tray_supervised_user.cc
@@ -4,6 +4,8 @@ #include "ash/system/chromeos/supervised/tray_supervised_user.h" +#include <utility> + #include "ash/shell.h" #include "ash/system/chromeos/label_tray_view.h" #include "ash/system/system_notifier.h" @@ -100,7 +102,8 @@ bundle.GetImageNamed(GetSupervisedUserIconId()), system_notifier::kNotifierSupervisedUser, base::Closure() /* null callback */)); - message_center::MessageCenter::Get()->AddNotification(notification.Pass()); + message_center::MessageCenter::Get()->AddNotification( + std::move(notification)); } void TraySupervisedUser::CreateOrUpdateSupervisedWarningNotification() {
diff --git a/ash/system/chromeos/tray_display.cc b/ash/system/chromeos/tray_display.cc index e4341ff9..3018344 100644 --- a/ash/system/chromeos/tray_display.cc +++ b/ash/system/chromeos/tray_display.cc
@@ -4,6 +4,7 @@ #include "ash/system/chromeos/tray_display.h" +#include <utility> #include <vector> #include "ash/display/display_manager.h" @@ -401,7 +402,8 @@ new message_center::HandleNotificationClickedDelegate( base::Bind(&OpenSettings)))); - message_center::MessageCenter::Get()->AddNotification(notification.Pass()); + message_center::MessageCenter::Get()->AddNotification( + std::move(notification)); } views::View* TrayDisplay::CreateDefaultView(user::LoginStatus status) {
diff --git a/ash/virtual_keyboard_controller_unittest.cc b/ash/virtual_keyboard_controller_unittest.cc index f7a59ef7..610c6d4 100644 --- a/ash/virtual_keyboard_controller_unittest.cc +++ b/ash/virtual_keyboard_controller_unittest.cc
@@ -4,6 +4,7 @@ #include "ash/virtual_keyboard_controller.h" +#include <utility> #include <vector> #include "ash/shell.h" @@ -47,7 +48,7 @@ void SetEventBlocker( scoped_ptr<ScopedDisableInternalMouseAndKeyboard> blocker) { Shell::GetInstance()->maximize_mode_controller()->event_blocker_ = - blocker.Pass(); + std::move(blocker); } void SetUp() override { @@ -103,7 +104,7 @@ ->EnableMaximizeModeWindowManager(true); scoped_ptr<ScopedDisableInternalMouseAndKeyboard> blocker( new MockEventBlocker); - SetEventBlocker(blocker.Pass()); + SetEventBlocker(std::move(blocker)); } class VirtualKeyboardControllerAutoTest : public VirtualKeyboardControllerTest,
diff --git a/ash/wm/cursor_manager_chromeos.cc b/ash/wm/cursor_manager_chromeos.cc index 3a1162f..9835a083 100644 --- a/ash/wm/cursor_manager_chromeos.cc +++ b/ash/wm/cursor_manager_chromeos.cc
@@ -4,6 +4,8 @@ #include "ash/wm/cursor_manager_chromeos.h" +#include <utility> + #include "base/logging.h" #include "ui/events/event.h" #include "ui/keyboard/keyboard_util.h" @@ -12,10 +14,8 @@ namespace ash { -CursorManager::CursorManager( - scoped_ptr< ::wm::NativeCursorManager> delegate) - : ::wm::CursorManager(delegate.Pass()) { -} +CursorManager::CursorManager(scoped_ptr<::wm::NativeCursorManager> delegate) + : ::wm::CursorManager(std::move(delegate)) {} CursorManager::~CursorManager() { }
diff --git a/ash/wm/maximize_mode/maximize_mode_controller_unittest.cc b/ash/wm/maximize_mode/maximize_mode_controller_unittest.cc index fe94cc0..3d384bf9 100644 --- a/ash/wm/maximize_mode/maximize_mode_controller_unittest.cc +++ b/ash/wm/maximize_mode/maximize_mode_controller_unittest.cc
@@ -2,11 +2,12 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include <math.h> -#include <vector> - #include "ash/wm/maximize_mode/maximize_mode_controller.h" +#include <math.h> +#include <utility> +#include <vector> + #include "ash/ash_switches.h" #include "ash/display/display_manager.h" #include "ash/shell.h" @@ -120,7 +121,7 @@ scoped_ptr<base::TickClock> tick_clock( test_tick_clock_ = new base::SimpleTestTickClock()); test_tick_clock_->Advance(base::TimeDelta::FromSeconds(1)); - maximize_mode_controller()->SetTickClockForTest(tick_clock.Pass()); + maximize_mode_controller()->SetTickClockForTest(std::move(tick_clock)); } void AdvanceTickClock(const base::TimeDelta& delta) {
diff --git a/base/BUILD.gn b/base/BUILD.gn index 7a95a2f..6ebec967 100644 --- a/base/BUILD.gn +++ b/base/BUILD.gn
@@ -1891,6 +1891,7 @@ deps += [ ":base_java", ":base_java_unittest_support", + "//base/android/jni_generator:jni_generator_tests", ] # TODO(brettw) I think this should not be here, we should not be using
diff --git a/base/allocator/BUILD.gn b/base/allocator/BUILD.gn index ee75b64..44de819d 100644 --- a/base/allocator/BUILD.gn +++ b/base/allocator/BUILD.gn
@@ -48,6 +48,23 @@ "TCMALLOC_FOR_DEBUGALLOCATION", ] } + if (is_clang) { + cflags = [ + # tcmalloc initializes some fields in the wrong order. + "-Wno-reorder", + + # tcmalloc contains some unused local template specializations. + "-Wno-unused-function", + + # tcmalloc uses COMPILE_ASSERT without static_assert but with + # typedefs. + "-Wno-unused-local-typedefs", + + # for magic2_ in debugallocation.cc (only built in Debug builds) + # typedefs. + "-Wno-unused-private-field", + ] + } } # This config and libc modification are only used on Windows.
diff --git a/base/allocator/allocator.gyp b/base/allocator/allocator.gyp index 33508ab..45a95bbd 100644 --- a/base/allocator/allocator.gyp +++ b/base/allocator/allocator.gyp
@@ -284,6 +284,20 @@ '<(tcmalloc_dir)/src/debugallocation.cc', '<(tcmalloc_dir)/src/tcmalloc.cc', ], + 'variables': { + 'clang_warning_flags': [ + # tcmalloc initializes some fields in the wrong order. + '-Wno-reorder', + # tcmalloc contains some unused local template specializations. + '-Wno-unused-function', + # tcmalloc uses COMPILE_ASSERT without static_assert but with + # typedefs. + '-Wno-unused-local-typedefs', + # for magic2_ in debugallocation.cc (only built in Debug builds) + # typedefs. + '-Wno-unused-private-field', + ], + }, 'conditions': [ ['OS=="linux" or OS=="freebsd" or OS=="solaris" or OS=="android"', { 'sources!': [
diff --git a/base/android/context_utils.cc b/base/android/context_utils.cc index 5e10f21..fd62c45f 100644 --- a/base/android/context_utils.cc +++ b/base/android/context_utils.cc
@@ -33,7 +33,7 @@ } // namespace -const jobject GetApplicationContext() { +jobject GetApplicationContext() { DCHECK(!g_application_context.Get().is_null()); return g_application_context.Get().obj(); }
diff --git a/base/android/context_utils.h b/base/android/context_utils.h index 67e6335..52895a9 100644 --- a/base/android/context_utils.h +++ b/base/android/context_utils.h
@@ -16,7 +16,7 @@ // Gets a global ref to the application context set with // InitApplicationContext(). Ownership is retained by the function - the caller // must NOT release it. -const BASE_EXPORT jobject GetApplicationContext(); +BASE_EXPORT jobject GetApplicationContext(); // Initialize the global application context object. // Either this or the Java equivalent ContextUtils.initApplicationContext must
diff --git a/base/android/jni_generator/BUILD.gn b/base/android/jni_generator/BUILD.gn new file mode 100644 index 0000000..a4b01d7c --- /dev/null +++ b/base/android/jni_generator/BUILD.gn
@@ -0,0 +1,57 @@ +# Copyright 2016 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +import("//build/config/android/rules.gni") +import("//testing/test.gni") + +# GYP: //base/android/jni_generator/jni_generator.gyp:jni_generator_py_tests +action("jni_generator_py_tests") { + _stamp = "$target_gen_dir/jni_generator_py_tests.stamp" + inputs = [ + "jni_generator.py", + "jni_generator_tests.py", + "java/src/org/chromium/example/jni_generator/SampleForTests.java", + "golden_sample_for_tests_jni.h", + ] + outputs = [ + _stamp, + ] + script = "jni_generator_tests.py" + args = [ + "--stamp", + rebase_path(_stamp, root_build_dir), + ] +} + +# GYP: //base/android/jni_generator/jni_generator.gyp:jni_sample_header +generate_jni("jni_sample_header") { + sources = [ + "java/src/org/chromium/example/jni_generator/SampleForTests.java", + ] + jni_package = "example" +} + +# GYP: //base/android/jni_generator/jni_generator.gyp:jni_sample_java +android_library("jni_sample_java") { + DEPRECATED_java_in_dir = "java/src" + deps = [ + "//base:base_java", + ] +} + +# This executable doesn't actually run, but at least serves to test that +# generated bindings compile properly. +# GYP: //base/android/jni_generator/jni_generator.gyp:jni_generator_tests +executable("jni_generator_tests") { + deps = [ + ":jni_generator_py_tests", + ":jni_sample_header", + ":jni_sample_java", + "//base", + ] + sources = [ + "sample_for_tests.cc", + "sample_for_tests.h", + ] +}
diff --git a/base/android/jni_generator/jni_generator.gyp b/base/android/jni_generator/jni_generator.gyp index 4a17f3e..ce936a0 100644 --- a/base/android/jni_generator/jni_generator.gyp +++ b/base/android/jni_generator/jni_generator.gyp
@@ -4,6 +4,7 @@ { 'targets': [ + # GYP: //base/android/jni_generator:jni_generator_tests { 'target_name': 'jni_generator_py_tests', 'type': 'none', @@ -29,6 +30,7 @@ }, ], }, + # GYP: //base/android/jni_generator:jni_sample_header { 'target_name': 'jni_sample_header', 'type': 'none', @@ -40,6 +42,7 @@ }, 'includes': [ '../../../build/jni_generator.gypi' ], }, + # GYP: //base/android/jni_generator:jni_sample_java { 'target_name': 'jni_sample_java', 'type': 'none', @@ -51,6 +54,7 @@ ], 'includes': [ '../../../build/java.gypi' ], }, + # GYP: //base/android/jni_generator:jni_generator_tests { 'target_name': 'jni_generator_tests', 'type': 'executable',
diff --git a/base/android/jni_generator/sample_for_tests.cc b/base/android/jni_generator/sample_for_tests.cc index 3fca39a..08e5ac96 100644 --- a/base/android/jni_generator/sample_for_tests.cc +++ b/base/android/jni_generator/sample_for_tests.cc
@@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include <iostream> + #include "base/android/jni_generator/sample_for_tests.h" #include "base/android/jni_android.h" @@ -62,6 +64,7 @@ it != map_.end(); ++it) { long key = it->first; std::string value = it->second; + std::cout << key << value; } map_.clear(); } @@ -97,10 +100,6 @@ return ScopedJavaLocalRef<jobject>(); } -static jint InnerFunction(JNIEnv*, jclass) { - return 0; -} - } // namespace android } // namespace base @@ -118,6 +117,8 @@ int bar = base::android::Java_SampleForTests_javaMethod( env, my_java_object, 1, 2); + std::cout << foo << bar; + for (int i = 0; i < 10; ++i) { // Creates a "struct" that will then be used by the java side. ScopedJavaLocalRef<jobject> struct_a = @@ -127,5 +128,9 @@ env, my_java_object, struct_a.obj()); } base::android::Java_SampleForTests_iterateAndDoSomething(env, my_java_object); + base::android::Java_SampleForTests_packagePrivateJavaMethod(env, + my_java_object); + base::android::Java_SampleForTests_methodThatThrowsException(env, + my_java_object); return 0; }
diff --git a/base/memory/scoped_ptr_unittest.cc b/base/memory/scoped_ptr_unittest.cc index 6022293..f091596 100644 --- a/base/memory/scoped_ptr_unittest.cc +++ b/base/memory/scoped_ptr_unittest.cc
@@ -11,6 +11,7 @@ #include "base/bind.h" #include "base/callback.h" #include "base/macros.h" +#include "build/build_config.h" #include "testing/gtest/include/gtest/gtest.h" namespace { @@ -401,6 +402,7 @@ EXPECT_TRUE(scoper3.get()); } +#if !(defined(OS_ANDROID) || (defined(OS_LINUX) && !defined(OS_CHROMEOS))) // Test uncaught Pass() does not have side effects, because Pass() // is implemented by std::move(). // TODO(danakj): Remove this test case when we remove Pass(). @@ -416,6 +418,7 @@ EXPECT_TRUE(rvalue); } EXPECT_EQ(0, constructed); +#endif // Test that passing to function which does nothing does not leak. {
diff --git a/base/move.h b/base/move.h index f90e9e89..66d85212 100644 --- a/base/move.h +++ b/base/move.h
@@ -9,6 +9,7 @@ #include "base/compiler_specific.h" #include "base/macros.h" +#include "build/build_config.h" // TODO(crbug.com/566182): DEPRECATED! // Use DISALLOW_COPY_AND_ASSIGN instead, or if your type will be used in @@ -30,6 +31,17 @@ // for more details. // TODO(crbug.com/566182): Remove this macro and use DISALLOW_COPY_AND_ASSIGN // everywhere instead. +#if defined(OS_ANDROID) || (defined(OS_LINUX) && !defined(OS_CHROMEOS)) +#define DISALLOW_COPY_AND_ASSIGN_WITH_MOVE_FOR_BIND(type) \ + private: \ + type(const type&) = delete; \ + void operator=(const type&) = delete; \ + \ + public: \ + typedef void MoveOnlyTypeForCPP03; \ + \ + private: +#else #define DISALLOW_COPY_AND_ASSIGN_WITH_MOVE_FOR_BIND(type) \ private: \ type(const type&) = delete; \ @@ -40,5 +52,6 @@ typedef void MoveOnlyTypeForCPP03; \ \ private: +#endif #endif // BASE_MOVE_H_
diff --git a/base/numerics/safe_numerics_unittest.cc b/base/numerics/safe_numerics_unittest.cc index 5242e13..cb63ad0 100644 --- a/base/numerics/safe_numerics_unittest.cc +++ b/base/numerics/safe_numerics_unittest.cc
@@ -350,7 +350,6 @@ "Comparison must be sign preserving and value preserving"); const CheckedNumeric<Dst> checked_dst = SrcLimits::max(); - ; TEST_EXPECTED_VALIDITY(RANGE_VALID, checked_dst); if (MaxExponent<Dst>::value > MaxExponent<Src>::value) { if (MaxExponent<Dst>::value >= MaxExponent<Src>::value * 2 - 1) {
diff --git a/blimp/common/proto/blimp_message.proto b/blimp/common/proto/blimp_message.proto index 733c21fd..db73e03c 100644 --- a/blimp/common/proto/blimp_message.proto +++ b/blimp/common/proto/blimp_message.proto
@@ -66,7 +66,8 @@ // Feature-specific messages follow. // Only one of these fields may be set per BlimpMessage. - // TODO(kmarshall): use a 'oneof' union when it's supported in Chromium. + // TODO(kmarshall): use a 'oneof' union when it's supported in Chromium. See + // crbug.com/570371. optional TabControlMessage tab_control = 1000; optional NavigationMessage navigation = 1001; optional RenderWidgetMessage render_widget = 1002;
diff --git a/blimp/common/proto/input.proto b/blimp/common/proto/input.proto index 7b9a4043..a411fc4 100644 --- a/blimp/common/proto/input.proto +++ b/blimp/common/proto/input.proto
@@ -87,7 +87,8 @@ // Input event specific messages follow. // Only one of these fields may be set per InputMessage. - // TODO(dtrainor): use a 'oneof' union when it's supported in Chromium. + // TODO(dtrainor): use a 'oneof' union when it's supported in Chromium. See + // crbug.com/570371. optional GestureScrollBegin gesture_scroll_begin = 4; optional GestureScrollUpdate gesture_scroll_update = 5; optional GestureFlingStart gesture_fling_start = 6;
diff --git a/blimp/common/proto/tab_control.proto b/blimp/common/proto/tab_control.proto index d71397c..ead55f04 100644 --- a/blimp/common/proto/tab_control.proto +++ b/blimp/common/proto/tab_control.proto
@@ -28,6 +28,7 @@ // Feature-specific messages follow. // Only one of these fields may be set per TabControlMessage. - // TODO(kmarshall): use a 'oneof' union when it's supported in Chromium. + // TODO(kmarshall): use a 'oneof' union when it's supported in Chromium. See + // crbug.com/570371. optional SizeMessage size = 1000; }
diff --git a/build/android/gyp/write_build_config.py b/build/android/gyp/write_build_config.py index f84958c1..a61f980 100755 --- a/build/android/gyp/write_build_config.py +++ b/build/android/gyp/write_build_config.py
@@ -101,6 +101,7 @@ GetDepConfig(p) for p in direct_deps_config_paths] self.all_deps_configs = [ GetDepConfig(p) for p in self.all_deps_config_paths] + self.direct_deps_config_paths = direct_deps_config_paths def All(self, wanted_type=None): if type is None: @@ -115,6 +116,11 @@ def AllConfigPaths(self): return self.all_deps_config_paths + def RemoveNonDirectDep(self, path): + if path in self.direct_deps_config_paths: + raise Exception('Cannot remove direct dep.') + self.all_deps_config_paths.remove(path) + self.all_deps_configs.remove(GetDepConfig(path)) def _MergeAssets(all_assets): """Merges all assets from the given deps. @@ -180,6 +186,8 @@ parser.add_option('--package-name', help='Java package name for these resources.') parser.add_option('--android-manifest', help='Path to android manifest.') + parser.add_option('--is-locale-resource', action='store_true', + help='Whether it is locale resource.') # android_assets options parser.add_option('--asset-sources', help='List of asset sources.') @@ -216,6 +224,8 @@ help='Whether proguard is enabled for this apk.') parser.add_option('--proguard-info', help='Path to the proguard .info output for this apk.') + parser.add_option('--has-alternative-locale-resource', action='store_true', + help='Whether there is alternative-locale-resource in direct deps') options, args = parser.parse_args(argv) @@ -265,6 +275,21 @@ deps = Deps(direct_deps_config_paths) + # Remove other locale resources if there is alternative_locale_resource in + # direct deps. + if options.has_alternative_locale_resource: + alternative = [r['path'] for r in deps.Direct('android_resources') + if r.get('is_locale_resource')] + # We can only have one locale resources in direct deps. + if len(alternative) != 1: + raise Exception('The number of locale resource in direct deps is wrong %d' + % len(alternative)) + unwanted = [r['path'] for r in deps.All('android_resources') + if r.get('is_locale_resource') and r['path'] not in alternative] + for p in unwanted: + deps.RemoveNonDirectDep(p) + + direct_library_deps = deps.Direct('java_library') all_library_deps = deps.All('java_library') @@ -362,6 +387,8 @@ deps_info['package_name'] = options.package_name if options.r_text: deps_info['r_text'] = options.r_text + if options.is_locale_resource: + deps_info['is_locale_resource'] = True if options.type in ('android_resources','android_apk', 'resource_rewriter'): config['resources'] = {}
diff --git a/build/android/pylib/gtest/filter/webkit_unit_tests_disabled b/build/android/pylib/gtest/filter/webkit_unit_tests_disabled index 1ffa325..64cedc0 100644 --- a/build/android/pylib/gtest/filter/webkit_unit_tests_disabled +++ b/build/android/pylib/gtest/filter/webkit_unit_tests_disabled
@@ -3,7 +3,7 @@ # crbug.com/159935 WebCompositorInputHandlerImplTest.gestureFlingAnimates WebCompositorInputHandlerImplTest.gestureFlingTransferResets -WebPageSerializerTest.HTMLNodes +WebFrameSerializerTest.HTMLNodes # crbug.com/241730 ScrollAnimatorNoneTest.CurveMathQuartic
diff --git a/build/common.gypi b/build/common.gypi index c3bc3dff..cbea957 100644 --- a/build/common.gypi +++ b/build/common.gypi
@@ -3140,12 +3140,8 @@ }, 'conditions': [ [ 'os_posix==1 and OS!="mac" and OS!="ios"', { - # We don't want to get warnings from third-party code, - # so remove any existing warning-enabling flags like -Wall. - 'cflags!': [ - '-Wall', - '-Wextra', - ], + # Remove -Wextra for third-party code. + 'cflags!': [ '-Wextra' ], 'cflags_cc': [ # Don't warn about hash_map in third-party code. '-Wno-deprecated', @@ -3155,10 +3151,11 @@ # This is off by default in gcc but on in Ubuntu's gcc(!). '-Wno-format', ], - 'cflags_cc!': [ - # Necessary because llvm.org/PR10448 is WONTFIX (crbug.com/90453). - '-Wsign-compare', - ] + }], + [ 'os_posix==1 and clang!=1 and OS!="mac" and OS!="ios"', { + # When we don't control the compiler, don't use -Wall for + # third-party code either. + 'cflags!': [ '-Wall' ], }], # TODO: Fix all warnings on chromeos too. [ 'os_posix==1 and OS!="mac" and OS!="ios" and (clang!=1 or chromeos==1)', { @@ -3210,7 +3207,7 @@ [ 'OS=="mac" or OS=="ios"', { 'xcode_settings': { - 'WARNING_CFLAGS!': ['-Wall', '-Wextra'], + 'WARNING_CFLAGS!': ['-Wextra'], }, 'conditions': [ ['buildtype=="Official"', { @@ -3723,6 +3720,10 @@ 'variables': { 'werror%': '-Werror', 'libraries_for_target%': '', + 'conditions' : [ + # Enable -Wextra for chromium_code when we control the compiler. + ['clang==1', { 'wextra': '-Wextra' }, { 'wextra': '-Wno-extra' }], + ], }, 'defines': [ '_FILE_OFFSET_BITS=64', @@ -3732,6 +3733,7 @@ '-pthread', '-fno-strict-aliasing', # See http://crbug.com/32204 '-Wall', + '<(wextra)', # Don't warn about unused function params. We use those everywhere. '-Wno-unused-parameter', # Don't warn about the "struct foo f = {0};" initialization pattern. @@ -3748,9 +3750,6 @@ # Make inline functions have hidden visiblity by default. # Surprisingly, not covered by -fvisibility=hidden. '-fvisibility-inlines-hidden', - # GCC turns on -Wsign-compare for C++ under -Wall, but clang doesn't, - # so we specify it explicitly. (llvm.org/PR10448, crbug.com/90453) - '-Wsign-compare', ], 'ldflags': [ '-pthread', '-Wl,-z,noexecstack',
diff --git a/build/config/android/internal_rules.gni b/build/config/android/internal_rules.gni index 2c9e0c59..9432170 100644 --- a/build/config/android/internal_rules.gni +++ b/build/config/android/internal_rules.gni
@@ -16,7 +16,7 @@ android_sdk_jar = "$android_sdk/android.jar" rebased_android_sdk_jar = rebase_path(android_sdk_jar, root_build_dir) -android_aapt_path = "$rebased_android_sdk_build_tools/aapt" +android_default_aapt_path = "$rebased_android_sdk_build_tools/aapt" android_configuration_name = "Release" if (is_debug) { @@ -89,9 +89,16 @@ _proguard_jar_path = "//third_party/proguard/lib/proguard.jar" _output_jar_path = invoker.output_jar_path inputs = [ - android_sdk_jar, _proguard_jar_path, ] + if (defined(invoker.alternative_android_sdk_jar)) { + inputs += [ invoker.alternative_android_sdk_jar ] + _rebased_android_sdk_jar = + rebase_path(invoker.alternative_android_sdk_jar) + } else { + inputs += [ android_sdk_jar ] + _rebased_android_sdk_jar = rebased_android_sdk_jar + } if (defined(invoker.inputs)) { inputs += invoker.inputs } @@ -112,7 +119,7 @@ "--output-path", rebase_path(_output_jar_path, root_build_dir), "--classpath", - rebased_android_sdk_jar, + _rebased_android_sdk_jar, ] if (defined(invoker.args)) { args += invoker.args @@ -489,6 +496,13 @@ rebase_path(invoker.r_text, root_build_dir), ] } + if (defined(invoker.is_locale_resource) && invoker.is_locale_resource) { + args += [ "--is-locale-resource" ] + } + if (defined(invoker.has_alternative_locale_resource) && + invoker.has_alternative_locale_resource) { + args += [ "--has-alternative-locale-resource" ] + } } if (is_apk) { @@ -868,6 +882,10 @@ _shared_resources = defined(invoker.shared_resources) && invoker.shared_resources assert(_shared_resources || true) # Mark as used. + _app_as_shared_lib = + defined(invoker.app_as_shared_lib) && invoker.app_as_shared_lib + assert(_app_as_shared_lib || true) # Mark as used. + assert(!(_shared_resources && _app_as_shared_lib)) _keystore_path = invoker.keystore_path _keystore_name = invoker.keystore_name @@ -906,13 +924,19 @@ invoker.resource_packaged_apk_path, ] + if (defined(invoker.android_aapt_path)) { + _android_aapt_path = invoker.android_aapt_path + } else { + _android_aapt_path = android_default_aapt_path + } + args = [ "--depfile", rebase_path(depfile, root_build_dir), "--android-sdk", rebased_android_sdk, "--aapt-path", - android_aapt_path, + _android_aapt_path, "--configuration-name=$android_configuration_name", "--android-manifest", rebase_path(invoker.android_manifest, root_build_dir), @@ -933,6 +957,9 @@ if (_shared_resources) { args += [ "--shared-resources" ] } + if (_app_as_shared_lib) { + args += [ "--app-as-shared-lib" ] + } if (_split_densities != []) { args += [ "--create-density-splits" ] foreach(_density, _split_densities) { @@ -956,7 +983,11 @@ _package_resources_target_name = "${target_name}__package_resources" package_resources_helper(_package_resources_target_name) { - forward_variables_from(invoker, [ "extensions_to_not_compress" ]) + forward_variables_from(invoker, + [ + "android_aapt_path", + "extensions_to_not_compress", + ]) deps = _deps android_manifest = _android_manifest resource_packaged_apk_path = _resource_packaged_apk_path @@ -999,7 +1030,11 @@ # TODO(agrieve): See if we can speed up this step by swapping the manifest # from the result of the main package_resources step. package_resources_helper(_incremental_package_resources_target_name) { - forward_variables_from(invoker, [ "extensions_to_not_compress" ]) + forward_variables_from(invoker, + [ + "android_aapt_path", + "extensions_to_not_compress", + ]) deps = _incremental_deps + [ ":$_generate_incremental_manifest_target_name" ] android_manifest = _incremental_android_manifest @@ -1735,13 +1770,20 @@ _rebased_all_resource_dirs = rebase_path(_all_resource_dirs, root_build_dir) rebase_build_config = rebase_path(build_config, root_build_dir) + + if (defined(invoker.android_aapt_path)) { + _android_aapt_path = invoker.android_aapt_path + } else { + _android_aapt_path = android_default_aapt_path + } + args = [ "--depfile", rebase_path(depfile, root_build_dir), "--android-sdk", rebase_path(android_sdk, root_build_dir), "--aapt-path", - android_aapt_path, + _android_aapt_path, "--android-manifest", rebase_path(android_manifest, root_build_dir), "--resource-dirs=$_rebased_all_resource_dirs", @@ -1775,6 +1817,10 @@ args += [ "--shared-resources" ] } + if (defined(invoker.app_as_shared_lib) && invoker.app_as_shared_lib) { + args += [ "--app-as-shared-lib" ] + } + if (defined(invoker.include_all_resources) && invoker.include_all_resources) { args += [ "--include-all-resources" ]
diff --git a/build/config/android/rules.gni b/build/config/android/rules.gni index c9388af8..7d93fe6 100644 --- a/build/config/android/rules.gni +++ b/build/config/android/rules.gni
@@ -517,6 +517,7 @@ build_config = _build_config resources_zip = _resources_zip type = "android_resources" + is_locale_resource = true } action("${target_name}__create_resources_zip") { @@ -576,10 +577,10 @@ # custom_package: java package for generated .java files. # v14_skip: If true, don't run v14 resource generator on this. Defaults to # false. (see build/android/gyp/generate_v14_compatible_resources.py) -# # shared_resources: If true make a resource package that can be loaded by a # different application at runtime to access the package's resources. -# +# app_as_shared_lib: If true make a resource package that can be loaded as +# both shared_resources and normal application. # Example: # android_resources("foo_resources") { @@ -635,6 +636,7 @@ deps = [] forward_variables_from(invoker, [ + "app_as_shared_lib", "android_manifest", "custom_package", "deps", @@ -1182,6 +1184,10 @@ # and (possibly) native libraries. # # Variables +# alternative_android_sdk_jar: The alternative android sdk jar used in +# proguard. +# android_aapt_path: Android aapt tool to replace default one to build +# resource. # android_manifest: Path to AndroidManifest.xml. # android_manifest_dep: Target that generates AndroidManifest (if applicable) # chromium_code: If true, extra analysis warning/errors will be enabled. @@ -1221,6 +1227,8 @@ # testonly: Marks this target as "test-only". # write_asset_list: Adds an extra file to the assets, which contains a list of # all other asset files. +# alternative_locale_resource_dep: The locale resource target which overrides +# any exsting locale resources in dep graph. # # DEPRECATED_java_in_dir: Directory containing java files. All .java files in # this directory will be included in the library. This is only supported to @@ -1394,6 +1402,11 @@ deps += invoker.deps } + if (defined(invoker.alternative_locale_resource_dep)) { + deps += [ invoker.alternative_locale_resource_dep ] + has_alternative_locale_resource = true + } + proguard_enabled = _proguard_enabled if (_proguard_enabled) { proguard_info = "$_proguard_jar_path.info" @@ -1409,6 +1422,8 @@ process_resources(process_resources_target) { forward_variables_from(invoker, [ + "android_aapt_path", + "app_as_shared_lib", "include_all_resources", "shared_resources", ]) @@ -1540,6 +1555,7 @@ } _proguard_target = "${_template_name}__proguard" proguard(_proguard_target) { + forward_variables_from(invoker, [ "alternative_android_sdk_jar" ]) deps = [ ":$build_config_target", ":$java_target", @@ -1669,6 +1685,8 @@ deps = [] forward_variables_from(invoker, [ + "android_aapt_path", + "app_as_shared_lib", "deps", "extensions_to_not_compress", "language_splits", @@ -1761,6 +1779,7 @@ deps = [] forward_variables_from(invoker, [ + "android_aapt_path", "deps", "native_lib_placeholders", "public_deps",
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn index 97eb672..732f71ac 100644 --- a/build/config/compiler/BUILD.gn +++ b/build/config/compiler/BUILD.gn
@@ -894,15 +894,11 @@ if (is_win) { cflags = [ "/W4" ] # Warning level 4. } else { - cflags = [ - "-Wall", - - # GCC turns on -Wsign-compare for C++ under -Wall, but clang doesn't, - # so we specify it explicitly. - # TODO(fischman): remove this if http://llvm.org/PR10448 obsoletes it. - # http://code.google.com/p/chromium/issues/detail?id=90453 - "-Wsign-compare", - ] + cflags = [ "-Wall" ] + if (is_clang) { + # Enable -Wextra for chromium_code when we control the compiler. + cflags += [ "-Wextra" ] + } # In Chromium code, we define __STDC_foo_MACROS in order to get the # C99 macros on Mac and Linux. @@ -944,6 +940,10 @@ "_CRT_NONSTDC_NO_WARNINGS", "_CRT_NONSTDC_NO_DEPRECATE", ] + } else if (is_clang && !is_nacl) { + # TODO(thakis): Remove !is_nacl once + # https://codereview.webrtc.org/1552863002/ made its way into chromium. + cflags += [ "-Wall" ] } if (is_linux) {
diff --git a/build/linux/sysroot_scripts/packagelist.wheezy.amd64 b/build/linux/sysroot_scripts/packagelist.wheezy.amd64 index 6ec0440..aafb84a 100644 --- a/build/linux/sysroot_scripts/packagelist.wheezy.amd64 +++ b/build/linux/sysroot_scripts/packagelist.wheezy.amd64
@@ -100,6 +100,7 @@ main/libx/libxdamage/libxdamage1_1.1.3-2_amd64.deb main/libx/libxdamage/libxdamage-dev_1.1.3-2_amd64.deb main/libx/libxdmcp/libxdmcp6_1.1.1-1_amd64.deb +main/libx/libxdmcp/libxdmcp-dev_1.1.1-1_amd64.deb main/libx/libxext/libxext6_1.3.1-2+deb7u1_amd64.deb main/libx/libxext/libxext-dev_1.3.1-2+deb7u1_amd64.deb main/libx/libxfixes/libxfixes3_5.0-4+deb7u1_amd64.deb @@ -160,5 +161,6 @@ main/x/x11proto-render/x11proto-render-dev_0.11.1-2_all.deb main/x/x11proto-scrnsaver/x11proto-scrnsaver-dev_1.2.2-1_all.deb main/x/x11proto-xext/x11proto-xext-dev_7.2.1-1_all.deb +main/x/x11proto-xinerama/x11proto-xinerama-dev_1.2.1-2_all.deb main/z/zlib/zlib1g_1.2.7.dfsg-13_amd64.deb main/z/zlib/zlib1g-dev_1.2.7.dfsg-13_amd64.deb
diff --git a/build/linux/sysroot_scripts/packagelist.wheezy.arm b/build/linux/sysroot_scripts/packagelist.wheezy.arm index 5efb90e..76d0f597 100644 --- a/build/linux/sysroot_scripts/packagelist.wheezy.arm +++ b/build/linux/sysroot_scripts/packagelist.wheezy.arm
@@ -99,6 +99,7 @@ main/libx/libxdamage/libxdamage1_1.1.3-2+b1_armhf.deb main/libx/libxdamage/libxdamage-dev_1.1.3-2+b1_armhf.deb main/libx/libxdmcp/libxdmcp6_1.1.1-1_armhf.deb +main/libx/libxdmcp/libxdmcp-dev_1.1.1-1_armhf.deb main/libx/libxext/libxext6_1.3.1-2+deb7u1_armhf.deb main/libx/libxext/libxext-dev_1.3.1-2+deb7u1_armhf.deb main/libx/libxfixes/libxfixes3_5.0-4+deb7u1_armhf.deb @@ -159,5 +160,6 @@ main/x/x11proto-render/x11proto-render-dev_0.11.1-2_all.deb main/x/x11proto-scrnsaver/x11proto-scrnsaver-dev_1.2.2-1_all.deb main/x/x11proto-xext/x11proto-xext-dev_7.2.1-1_all.deb +main/x/x11proto-xinerama/x11proto-xinerama-dev_1.2.1-2_all.deb main/z/zlib/zlib1g_1.2.7.dfsg-13_armhf.deb main/z/zlib/zlib1g-dev_1.2.7.dfsg-13_armhf.deb
diff --git a/build/linux/sysroot_scripts/packagelist.wheezy.i386 b/build/linux/sysroot_scripts/packagelist.wheezy.i386 index 86feb8e..d29229d8 100644 --- a/build/linux/sysroot_scripts/packagelist.wheezy.i386 +++ b/build/linux/sysroot_scripts/packagelist.wheezy.i386
@@ -100,6 +100,7 @@ main/libx/libxdamage/libxdamage1_1.1.3-2_i386.deb main/libx/libxdamage/libxdamage-dev_1.1.3-2_i386.deb main/libx/libxdmcp/libxdmcp6_1.1.1-1_i386.deb +main/libx/libxdmcp/libxdmcp-dev_1.1.1-1_i386.deb main/libx/libxext/libxext6_1.3.1-2+deb7u1_i386.deb main/libx/libxext/libxext-dev_1.3.1-2+deb7u1_i386.deb main/libx/libxfixes/libxfixes3_5.0-4+deb7u1_i386.deb @@ -160,5 +161,6 @@ main/x/x11proto-render/x11proto-render-dev_0.11.1-2_all.deb main/x/x11proto-scrnsaver/x11proto-scrnsaver-dev_1.2.2-1_all.deb main/x/x11proto-xext/x11proto-xext-dev_7.2.1-1_all.deb +main/x/x11proto-xinerama/x11proto-xinerama-dev_1.2.1-2_all.deb main/z/zlib/zlib1g_1.2.7.dfsg-13_i386.deb main/z/zlib/zlib1g-dev_1.2.7.dfsg-13_i386.deb
diff --git a/build/linux/sysroot_scripts/packagelist.wheezy.mipsel b/build/linux/sysroot_scripts/packagelist.wheezy.mipsel index 95a1a41..4160d39b 100644 --- a/build/linux/sysroot_scripts/packagelist.wheezy.mipsel +++ b/build/linux/sysroot_scripts/packagelist.wheezy.mipsel
@@ -98,6 +98,7 @@ main/libx/libxdamage/libxdamage1_1.1.3-2_mipsel.deb main/libx/libxdamage/libxdamage-dev_1.1.3-2_mipsel.deb main/libx/libxdmcp/libxdmcp6_1.1.1-1_mipsel.deb +main/libx/libxdmcp/libxdmcp-dev_1.1.1-1_mipsel.deb main/libx/libxext/libxext6_1.3.1-2+deb7u1_mipsel.deb main/libx/libxext/libxext-dev_1.3.1-2+deb7u1_mipsel.deb main/libx/libxfixes/libxfixes3_5.0-4+deb7u1_mipsel.deb @@ -158,5 +159,6 @@ main/x/x11proto-render/x11proto-render-dev_0.11.1-2_all.deb main/x/x11proto-scrnsaver/x11proto-scrnsaver-dev_1.2.2-1_all.deb main/x/x11proto-xext/x11proto-xext-dev_7.2.1-1_all.deb +main/x/x11proto-xinerama/x11proto-xinerama-dev_1.2.1-2_all.deb main/z/zlib/zlib1g_1.2.7.dfsg-13_mipsel.deb main/z/zlib/zlib1g-dev_1.2.7.dfsg-13_mipsel.deb
diff --git a/build/linux/sysroot_scripts/sysroot-creator-wheezy.sh b/build/linux/sysroot_scripts/sysroot-creator-wheezy.sh index c04f1157..bb17d3fed 100755 --- a/build/linux/sysroot_scripts/sysroot-creator-wheezy.sh +++ b/build/linux/sysroot_scripts/sysroot-creator-wheezy.sh
@@ -142,6 +142,7 @@ libxdamage1 libxdamage-dev libxdmcp6 + libxdmcp-dev libxext6 libxext-dev libxfixes3 @@ -175,6 +176,7 @@ x11proto-render-dev x11proto-scrnsaver-dev x11proto-xext-dev + x11proto-xinerama-dev zlib1g zlib1g-dev "
diff --git a/cc/BUILD.gn b/cc/BUILD.gn index 4f1b235..88fff04 100644 --- a/cc/BUILD.gn +++ b/cc/BUILD.gn
@@ -123,6 +123,8 @@ "layers/delegated_renderer_layer_impl.h", "layers/draw_properties.cc", "layers/draw_properties.h", + "layers/empty_content_layer_client.cc", + "layers/empty_content_layer_client.h", "layers/heads_up_display_layer.cc", "layers/heads_up_display_layer.h", "layers/heads_up_display_layer_impl.cc",
diff --git a/cc/animation/scroll_offset_animation_curve.cc b/cc/animation/scroll_offset_animation_curve.cc index 6cd823f..371f4f6d 100644 --- a/cc/animation/scroll_offset_animation_curve.cc +++ b/cc/animation/scroll_offset_animation_curve.cc
@@ -19,6 +19,8 @@ namespace { +const double kEpsilon = 0.01f; + static float MaximumDimension(const gfx::Vector2dF& delta) { return std::abs(delta.x()) > std::abs(delta.y()) ? delta.x() : delta.y(); } @@ -125,6 +127,33 @@ return std::move(curve_clone); } +static double VelocityBasedDurationBound(gfx::Vector2dF old_delta, + double old_normalized_velocity, + double old_duration, + gfx::Vector2dF new_delta) { + double old_delta_max_dimension = MaximumDimension(old_delta); + double new_delta_max_dimension = MaximumDimension(new_delta); + + // If we are already at the target, stop animating. + if (std::abs(new_delta_max_dimension) < kEpsilon) + return 0; + + // Guard against division by zero. + if (std::abs(old_delta_max_dimension) < kEpsilon || + std::abs(old_normalized_velocity) < kEpsilon) { + return std::numeric_limits<double>::infinity(); + } + + // Estimate how long it will take to reach the new target at our present + // velocity, with some fudge factor to account for the "ease out". + double old_true_velocity = + old_normalized_velocity * old_delta_max_dimension / old_duration; + double bound = (new_delta_max_dimension / old_true_velocity) * 2.5f; + + // If bound < 0 we are moving in the opposite direction. + return bound < 0 ? std::numeric_limits<double>::infinity() : bound; +} + void ScrollOffsetAnimationCurve::UpdateTarget( double t, const gfx::ScrollOffset& new_target) { @@ -135,28 +164,36 @@ double old_duration = (total_animation_duration_ - last_retarget_).InSecondsF(); - double new_duration = - SegmentDuration(new_delta, duration_behavior_).InSecondsF(); - - double old_velocity = timing_function_->Velocity( + double old_normalized_velocity = timing_function_->Velocity( (t - last_retarget_.InSecondsF()) / old_duration); + // Use the velocity-based duration bound when it is less than the constant + // segment duration. This minimizes the "rubber-band" bouncing effect when + // old_normalized_velocity is large and new_delta is small. + double new_duration = + std::min(SegmentDuration(new_delta, duration_behavior_).InSecondsF(), + VelocityBasedDurationBound(old_delta, old_normalized_velocity, + old_duration, new_delta)); + + if (new_duration < kEpsilon) { + // We are already at or very close to the new target. Stop animating. + target_value_ = new_target; + total_animation_duration_ = base::TimeDelta::FromSecondsD(t); + return; + } + // TimingFunction::Velocity gives the slope of the curve from 0 to 1. // To match the "true" velocity in px/sec we must adjust this slope for // differences in duration and scroll delta between old and new curves. - const double kEpsilon = 0.01f; - double new_delta_max_dimension = MaximumDimension(new_delta); - double new_velocity = - new_delta_max_dimension < kEpsilon // Guard against division by 0. - ? old_velocity - : old_velocity * (new_duration / old_duration) * - (MaximumDimension(old_delta) / new_delta_max_dimension); + double new_normalized_velocity = + old_normalized_velocity * (new_duration / old_duration) * + (MaximumDimension(old_delta) / MaximumDimension(new_delta)); initial_value_ = current_position; target_value_ = new_target; total_animation_duration_ = base::TimeDelta::FromSecondsD(t + new_duration); last_retarget_ = base::TimeDelta::FromSecondsD(t); - timing_function_ = EaseOutWithInitialVelocity(new_velocity); + timing_function_ = EaseOutWithInitialVelocity(new_normalized_velocity); } } // namespace cc
diff --git a/cc/animation/scroll_offset_animation_curve_unittest.cc b/cc/animation/scroll_offset_animation_curve_unittest.cc index 4638ecf..7044b03a 100644 --- a/cc/animation/scroll_offset_animation_curve_unittest.cc +++ b/cc/animation/scroll_offset_animation_curve_unittest.cc
@@ -128,64 +128,29 @@ gfx::ScrollOffset initial_value(0.f, 0.f); gfx::ScrollOffset target_value(0.f, 3600.f); scoped_ptr<ScrollOffsetAnimationCurve> curve( - ScrollOffsetAnimationCurve::Create(target_value, - EaseInOutTimingFunction::Create())); - curve->SetInitialValue(initial_value); - EXPECT_EQ(1.0, curve->Duration().InSecondsF()); - EXPECT_EQ(1800.0, curve->GetValue(base::TimeDelta::FromSecondsD(0.5)).y()); - EXPECT_EQ(3600.0, curve->GetValue(base::TimeDelta::FromSecondsD(1.0)).y()); - - curve->UpdateTarget(0.5, gfx::ScrollOffset(0.0, 9900.0)); - - EXPECT_EQ(2.0, curve->Duration().InSecondsF()); - EXPECT_EQ(1800.0, curve->GetValue(base::TimeDelta::FromSecondsD(0.5)).y()); - EXPECT_NEAR(5410.05, curve->GetValue(base::TimeDelta::FromSecondsD(1.0)).y(), - 0.01); - EXPECT_EQ(9900.0, curve->GetValue(base::TimeDelta::FromSecondsD(2.0)).y()); - - curve->UpdateTarget(1.0, gfx::ScrollOffset(0.0, 7200.0)); - - EXPECT_NEAR(1.705, curve->Duration().InSecondsF(), 0.01); - EXPECT_NEAR(5410.05, curve->GetValue(base::TimeDelta::FromSecondsD(1.0)).y(), - 0.01); - EXPECT_EQ(7200.0, curve->GetValue(base::TimeDelta::FromSecondsD(1.705)).y()); -} - -TEST(ScrollOffsetAnimationCurveTest, UpdateTargetWithLargeVelocity) { - gfx::ScrollOffset initial_value(0.f, 0.f); - gfx::ScrollOffset target_value(0.f, 900.f); - scoped_ptr<ScrollOffsetAnimationCurve> curve( - ScrollOffsetAnimationCurve::Create(target_value, - EaseInOutTimingFunction::Create())); - curve->SetInitialValue(initial_value); - EXPECT_EQ(0.5, curve->Duration().InSecondsF()); - - EXPECT_EQ(450.0, curve->GetValue(base::TimeDelta::FromSecondsD(0.25)).y()); - - // This leads to a new computed velocity larger than 5000. - curve->UpdateTarget(0.25, gfx::ScrollOffset(0.0, 450.0001)); - - EXPECT_NEAR(0.25015, curve->Duration().InSecondsF(), 0.0001); - EXPECT_NEAR(450.0, - curve->GetValue(base::TimeDelta::FromSecondsD(0.22501)).y(), - 0.001); - EXPECT_NEAR(450.0, - curve->GetValue(base::TimeDelta::FromSecondsD(0.225015)).y(), - 0.001); -} - -TEST(ScrollOffsetAnimationCurveTest, UpdateTargetConstantDuration) { - gfx::ScrollOffset initial_value(0.f, 0.f); - gfx::ScrollOffset target_value(0.f, 3600.f); - scoped_ptr<ScrollOffsetAnimationCurve> curve( ScrollOffsetAnimationCurve::Create( target_value, EaseInOutTimingFunction::Create(), ScrollOffsetAnimationCurve::DurationBehavior::CONSTANT)); curve->SetInitialValue(initial_value); EXPECT_EQ(0.2, curve->Duration().InSecondsF()); + EXPECT_EQ(1800.0, curve->GetValue(base::TimeDelta::FromSecondsD(0.1)).y()); + EXPECT_EQ(3600.0, curve->GetValue(base::TimeDelta::FromSecondsD(0.2)).y()); curve->UpdateTarget(0.1, gfx::ScrollOffset(0.0, 9900.0)); + EXPECT_EQ(0.3, curve->Duration().InSecondsF()); + EXPECT_EQ(1800.0, curve->GetValue(base::TimeDelta::FromSecondsD(0.1)).y()); + EXPECT_NEAR(6827.59, curve->GetValue(base::TimeDelta::FromSecondsD(0.2)).y(), + 0.01); + EXPECT_EQ(9900.0, curve->GetValue(base::TimeDelta::FromSecondsD(0.3)).y()); + + curve->UpdateTarget(0.2, gfx::ScrollOffset(0.0, 7200.0)); + + // A closer target at high velocity reduces the duration. + EXPECT_NEAR(0.22, curve->Duration().InSecondsF(), 0.01); + EXPECT_NEAR(6827.59, curve->GetValue(base::TimeDelta::FromSecondsD(0.2)).y(), + 0.01); + EXPECT_EQ(7200.0, curve->GetValue(base::TimeDelta::FromSecondsD(0.22)).y()); } } // namespace
diff --git a/cc/cc.gyp b/cc/cc.gyp index bd5dadb..d9bebc4 100644 --- a/cc/cc.gyp +++ b/cc/cc.gyp
@@ -185,6 +185,8 @@ 'layers/delegated_renderer_layer_impl.h', 'layers/draw_properties.cc', 'layers/draw_properties.h', + 'layers/empty_content_layer_client.cc', + 'layers/empty_content_layer_client.h', 'layers/heads_up_display_layer.cc', 'layers/heads_up_display_layer.h', 'layers/heads_up_display_layer_impl.cc',
diff --git a/cc/layers/empty_content_layer_client.cc b/cc/layers/empty_content_layer_client.cc new file mode 100644 index 0000000..1eac1a18 --- /dev/null +++ b/cc/layers/empty_content_layer_client.cc
@@ -0,0 +1,45 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "cc/layers/empty_content_layer_client.h" + +#include "cc/playback/display_item_list.h" +#include "cc/playback/display_item_list_settings.h" +#include "ui/gfx/geometry/rect.h" + +namespace cc { + +namespace { +base::LazyInstance<EmptyContentLayerClient> g_empty_content_layer_client = + LAZY_INSTANCE_INITIALIZER; +} + +// static +ContentLayerClient* EmptyContentLayerClient::GetInstance() { + return g_empty_content_layer_client.Pointer(); +} + +EmptyContentLayerClient::EmptyContentLayerClient() {} + +EmptyContentLayerClient::~EmptyContentLayerClient() {} + +gfx::Rect EmptyContentLayerClient::PaintableRegion() { + return gfx::Rect(); +} + +scoped_refptr<DisplayItemList> +EmptyContentLayerClient::PaintContentsToDisplayList( + PaintingControlSetting painting_status) { + return DisplayItemList::Create(gfx::Rect(), DisplayItemListSettings()); +} + +bool EmptyContentLayerClient::FillsBoundsCompletely() const { + return false; +} + +size_t EmptyContentLayerClient::GetApproximateUnsharedMemoryUsage() const { + return 0u; +} + +} // namespace cc
diff --git a/cc/layers/empty_content_layer_client.h b/cc/layers/empty_content_layer_client.h new file mode 100644 index 0000000..2554b8af --- /dev/null +++ b/cc/layers/empty_content_layer_client.h
@@ -0,0 +1,47 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CC_LAYERS_EMPTY_CONTENT_LAYER_CLIENT_H_ +#define CC_LAYERS_EMPTY_CONTENT_LAYER_CLIENT_H_ + +#include "base/lazy_instance.h" +#include "base/macros.h" +#include "base/memory/scoped_ptr.h" +#include "cc/base/cc_export.h" +#include "cc/layers/content_layer_client.h" +#include "ui/gfx/geometry/rect.h" + +namespace cc { + +class DisplayItemList; + +// This is used by deserialized PictureLayers which have no local +// ContentLayerClient but still have valid content from the original serialized +// PictureLayer. The PictureLayer class requires a valid ContentLayerClient to +// determine if it can draw. This is a dummy client to keep the logic fairly +// straightforward. This is also used by unit tests for creating dummy +// PictureLayers. +class CC_EXPORT EmptyContentLayerClient : public ContentLayerClient { + public: + static ContentLayerClient* GetInstance(); + + // ContentLayerClient implementation. + gfx::Rect PaintableRegion() override; + scoped_refptr<DisplayItemList> PaintContentsToDisplayList( + PaintingControlSetting painting_status) override; + bool FillsBoundsCompletely() const override; + size_t GetApproximateUnsharedMemoryUsage() const override; + + private: + friend struct base::DefaultLazyInstanceTraits<EmptyContentLayerClient>; + + EmptyContentLayerClient(); + ~EmptyContentLayerClient() override; + + DISALLOW_COPY_AND_ASSIGN(EmptyContentLayerClient); +}; + +} // namespace cc + +#endif // CC_LAYERS_EMPTY_CONTENT_LAYER_CLIENT_H_
diff --git a/cc/layers/layer.cc b/cc/layers/layer.cc index 663f4ae..9d82b58 100644 --- a/cc/layers/layer.cc +++ b/cc/layers/layer.cc
@@ -1361,7 +1361,7 @@ } void Layer::SetTypeForProtoSerialization(proto::LayerNode* proto) const { - proto->set_type(proto::LayerType::Base); + proto->set_type(proto::LayerType::LAYER); } void Layer::ToLayerNodeProto(proto::LayerNode* proto) const {
diff --git a/cc/layers/layer_proto_converter.cc b/cc/layers/layer_proto_converter.cc index 65e1b14..6564e0bf 100644 --- a/cc/layers/layer_proto_converter.cc +++ b/cc/layers/layer_proto_converter.cc
@@ -5,8 +5,10 @@ #include "cc/layers/layer_proto_converter.h" #include "base/stl_util.h" +#include "cc/layers/empty_content_layer_client.h" #include "cc/layers/layer.h" #include "cc/layers/layer_settings.h" +#include "cc/layers/picture_layer.h" #include "cc/proto/layer.pb.h" #include "cc/trees/layer_tree_host_common.h" #include "cc/trees/layer_tree_settings.h" @@ -103,8 +105,15 @@ return iter->second; DCHECK(proto.has_type()); switch (proto.type()) { - case proto::Base: + // Fall through and build a base layer. This won't have any special layer + // properties but still maintains the layer hierarchy if we run into a + // layer type we don't support. + case proto::UNKNOWN: + case proto::LAYER: return Layer::Create(LayerSettings()).get(); + case proto::PICTURE_LAYER: + return PictureLayer::Create(LayerSettings(), + EmptyContentLayerClient::GetInstance()); } // TODO(nyquist): Add the rest of the necessary LayerTypes. This function // should not return null.
diff --git a/cc/layers/layer_proto_converter_unittest.cc b/cc/layers/layer_proto_converter_unittest.cc index 0a85b44..e1a30e6 100644 --- a/cc/layers/layer_proto_converter_unittest.cc +++ b/cc/layers/layer_proto_converter_unittest.cc
@@ -4,8 +4,10 @@ #include "cc/layers/layer_proto_converter.h" +#include "cc/layers/empty_content_layer_client.h" #include "cc/layers/layer.h" #include "cc/layers/layer_settings.h" +#include "cc/layers/picture_layer.h" #include "cc/proto/layer.pb.h" #include "cc/test/fake_layer_tree_host.h" #include "cc/test/fake_layer_tree_host_client.h" @@ -48,21 +50,21 @@ scoped_refptr<Layer> old_root = Layer::Create(LayerSettings()); proto::LayerNode root_node; root_node.set_id(old_root->id()); - root_node.set_type(proto::LayerType::Base); + root_node.set_type(proto::LayerType::LAYER); proto::LayerNode* child_a_node = root_node.add_children(); child_a_node->set_id(442); - child_a_node->set_type(proto::LayerType::Base); + child_a_node->set_type(proto::LayerType::LAYER); child_a_node->set_parent_id(old_root->id()); // root_node proto::LayerNode* child_b_node = root_node.add_children(); child_b_node->set_id(443); - child_b_node->set_type(proto::LayerType::Base); + child_b_node->set_type(proto::LayerType::LAYER); child_b_node->set_parent_id(old_root->id()); // root_node proto::LayerNode* child_c_node = child_b_node->add_children(); child_c_node->set_id(444); - child_c_node->set_type(proto::LayerType::Base); + child_c_node->set_type(proto::LayerType::LAYER); child_c_node->set_parent_id(child_b_node->id()); scoped_refptr<Layer> new_root = @@ -95,21 +97,21 @@ */ proto::LayerNode root_node; root_node.set_id(441); - root_node.set_type(proto::LayerType::Base); + root_node.set_type(proto::LayerType::LAYER); proto::LayerNode* child_a_node = root_node.add_children(); child_a_node->set_id(442); - child_a_node->set_type(proto::LayerType::Base); + child_a_node->set_type(proto::LayerType::LAYER); child_a_node->set_parent_id(root_node.id()); proto::LayerNode* child_b_node = root_node.add_children(); child_b_node->set_id(443); - child_b_node->set_type(proto::LayerType::Base); + child_b_node->set_type(proto::LayerType::LAYER); child_b_node->set_parent_id(root_node.id()); proto::LayerNode* child_c_node = child_b_node->add_children(); child_c_node->set_id(444); - child_c_node->set_type(proto::LayerType::Base); + child_c_node->set_type(proto::LayerType::LAYER); child_c_node->set_parent_id(child_b_node->id()); scoped_refptr<Layer> old_root = Layer::Create(LayerSettings()); @@ -339,5 +341,38 @@ root->SetLayerTreeHost(nullptr); } +TEST_F(LayerProtoConverterTest, PictureLayerTypeSerialization) { + // Make sure that PictureLayers serialize to the + // proto::LayerType::PICTURE_LAYER type. + scoped_refptr<PictureLayer> layer = PictureLayer::Create( + LayerSettings(), EmptyContentLayerClient::GetInstance()); + + proto::LayerNode layer_hierarchy; + LayerProtoConverter::SerializeLayerHierarchy(layer.get(), &layer_hierarchy); + EXPECT_EQ(proto::LayerType::PICTURE_LAYER, layer_hierarchy.type()); +} + +TEST_F(LayerProtoConverterTest, PictureLayerTypeDeserialization) { + // Make sure that proto::LayerType::PICTURE_LAYER ends up building a + // PictureLayer. + scoped_refptr<Layer> old_root = PictureLayer::Create( + LayerSettings(), EmptyContentLayerClient::GetInstance()); + proto::LayerNode root_node; + root_node.set_id(old_root->id()); + root_node.set_type(proto::LayerType::PICTURE_LAYER); + + scoped_refptr<Layer> new_root = + LayerProtoConverter::DeserializeLayerHierarchy(old_root, root_node); + + // Validate that the ids are equal. + EXPECT_EQ(old_root->id(), new_root->id()); + + // Check that the layer type is equal by using the type this layer would + // serialize to. + proto::LayerNode layer_node; + new_root->SetTypeForProtoSerialization(&layer_node); + EXPECT_EQ(proto::LayerType::PICTURE_LAYER, layer_node.type()); +} + } // namespace } // namespace cc
diff --git a/cc/layers/picture_layer.cc b/cc/layers/picture_layer.cc index 811e8068..284f2a3 100644 --- a/cc/layers/picture_layer.cc +++ b/cc/layers/picture_layer.cc
@@ -8,6 +8,9 @@ #include "cc/layers/content_layer_client.h" #include "cc/layers/picture_layer_impl.h" #include "cc/playback/display_list_recording_source.h" +#include "cc/proto/cc_conversions.h" +#include "cc/proto/gfx_conversions.h" +#include "cc/proto/layer.pb.h" #include "cc/trees/layer_tree_host.h" #include "cc/trees/layer_tree_impl.h" #include "third_party/skia/include/core/SkPictureRecorder.h" @@ -50,25 +53,7 @@ PictureLayerImpl* layer_impl = static_cast<PictureLayerImpl*>(base_layer); // TODO(danakj): Make is_mask_ a constructor parameter for PictureLayer. DCHECK_EQ(layer_impl->is_mask(), is_mask_); - - int source_frame_number = layer_tree_host()->source_frame_number(); - gfx::Size impl_bounds = layer_impl->bounds(); - gfx::Size recording_source_bounds = recording_source_->GetSize(); - - // If update called, then recording source size must match bounds pushed to - // impl layer. - DCHECK(update_source_frame_number_ != source_frame_number || - impl_bounds == recording_source_bounds) - << " bounds " << impl_bounds.ToString() << " recording source " - << recording_source_bounds.ToString(); - - if (update_source_frame_number_ != source_frame_number && - recording_source_bounds != impl_bounds) { - // Update may not get called for the layer (if it's not in the viewport - // for example, even though it has resized making the recording source no - // longer valid. In this case just destroy the recording source. - recording_source_->SetEmptyBounds(); - } + DropRecordingSourceContentIfInvalid(); layer_impl->SetNearestNeighbor(nearest_neighbor_); @@ -198,8 +183,70 @@ return client_ && Layer::HasDrawableContent(); } +void PictureLayer::SetTypeForProtoSerialization(proto::LayerNode* proto) const { + proto->set_type(proto::LayerType::PICTURE_LAYER); +} + +void PictureLayer::LayerSpecificPropertiesToProto( + proto::LayerProperties* proto) { + Layer::LayerSpecificPropertiesToProto(proto); + DropRecordingSourceContentIfInvalid(); + + proto::PictureLayerProperties* picture = proto->mutable_picture(); + recording_source_->ToProtobuf(picture->mutable_recording_source()); + RegionToProto(*invalidation_.region(), picture->mutable_invalidation()); + RectToProto(last_updated_visible_layer_rect_, + picture->mutable_last_updated_visible_layer_rect()); + picture->set_is_mask(is_mask_); + picture->set_nearest_neighbor(nearest_neighbor_); + + picture->set_update_source_frame_number(update_source_frame_number_); + + invalidation_.Clear(); +} + +void PictureLayer::FromLayerSpecificPropertiesProto( + const proto::LayerProperties& proto) { + Layer::FromLayerSpecificPropertiesProto(proto); + const proto::PictureLayerProperties& picture = proto.picture(); + recording_source_->FromProtobuf(picture.recording_source()); + + Region new_invalidation = RegionFromProto(picture.invalidation()); + invalidation_.Swap(&new_invalidation); + last_updated_visible_layer_rect_ = + ProtoToRect(picture.last_updated_visible_layer_rect()); + is_mask_ = picture.is_mask(); + nearest_neighbor_ = picture.nearest_neighbor(); + + update_source_frame_number_ = picture.update_source_frame_number(); +} + void PictureLayer::RunMicroBenchmark(MicroBenchmark* benchmark) { benchmark->RunOnLayer(this); } +void PictureLayer::DropRecordingSourceContentIfInvalid() { + int source_frame_number = layer_tree_host()->source_frame_number(); + gfx::Size recording_source_bounds = recording_source_->GetSize(); + + gfx::Size layer_bounds = bounds(); + if (paint_properties().source_frame_number == source_frame_number) + layer_bounds = paint_properties().bounds; + + // If update called, then recording source size must match bounds pushed to + // impl layer. + DCHECK(update_source_frame_number_ != source_frame_number || + layer_bounds == recording_source_bounds) + << " bounds " << layer_bounds.ToString() << " recording source " + << recording_source_bounds.ToString(); + + if (update_source_frame_number_ != source_frame_number && + recording_source_bounds != layer_bounds) { + // Update may not get called for the layer (if it's not in the viewport + // for example), even though it has resized making the recording source no + // longer valid. In this case just destroy the recording source. + recording_source_->SetEmptyBounds(); + } +} + } // namespace cc
diff --git a/cc/layers/picture_layer.h b/cc/layers/picture_layer.h index 7f1345e..b7e7152 100644 --- a/cc/layers/picture_layer.h +++ b/cc/layers/picture_layer.h
@@ -53,10 +53,18 @@ ~PictureLayer() override; bool HasDrawableContent() const override; + void SetTypeForProtoSerialization(proto::LayerNode* proto) const override; + void LayerSpecificPropertiesToProto(proto::LayerProperties* proto) override; + void FromLayerSpecificPropertiesProto( + const proto::LayerProperties& proto) override; bool is_mask() const { return is_mask_; } private: + friend class TestSerializationPictureLayer; + + void DropRecordingSourceContentIfInvalid(); + ContentLayerClient* client_; scoped_ptr<DisplayListRecordingSource> recording_source_; devtools_instrumentation::
diff --git a/cc/layers/picture_layer_unittest.cc b/cc/layers/picture_layer_unittest.cc index 9568bde2..df72639c 100644 --- a/cc/layers/picture_layer_unittest.cc +++ b/cc/layers/picture_layer_unittest.cc
@@ -8,9 +8,11 @@ #include "base/thread_task_runner_handle.h" #include "cc/layers/content_layer_client.h" +#include "cc/layers/empty_content_layer_client.h" #include "cc/layers/layer_settings.h" #include "cc/layers/picture_layer_impl.h" #include "cc/playback/display_item_list_settings.h" +#include "cc/proto/layer.pb.h" #include "cc/test/fake_display_list_recording_source.h" #include "cc/test/fake_layer_tree_host.h" #include "cc/test/fake_picture_layer.h" @@ -23,23 +25,144 @@ #include "testing/gtest/include/gtest/gtest.h" namespace cc { -namespace { -class MockContentLayerClient : public ContentLayerClient { +class TestSerializationPictureLayer : public PictureLayer { public: - gfx::Rect PaintableRegion() override { return gfx::Rect(); } - scoped_refptr<DisplayItemList> PaintContentsToDisplayList( - PaintingControlSetting picture_control) override { - return DisplayItemList::Create(gfx::Rect(), DisplayItemListSettings()); + static scoped_refptr<TestSerializationPictureLayer> Create( + const gfx::Size& recording_source_viewport) { + return make_scoped_refptr(new TestSerializationPictureLayer( + LayerSettings(), EmptyContentLayerClient::GetInstance(), + FakeDisplayListRecordingSource::CreateFilledRecordingSource( + recording_source_viewport), + recording_source_viewport)); } - bool FillsBoundsCompletely() const override { return false; }; - size_t GetApproximateUnsharedMemoryUsage() const override { return 0; } + + FakeDisplayListRecordingSource* recording_source() { + return static_cast<FakeDisplayListRecordingSource*>( + recording_source_.get()); + } + + void set_invalidation(const Region& invalidation) { + *invalidation_.region() = invalidation; + } + + void set_last_updated_visible_layer_rect(const gfx::Rect& rect) { + last_updated_visible_layer_rect_ = rect; + } + + void set_update_source_frame_number(int number) { + update_source_frame_number_ = number; + } + + void set_is_mask(bool is_mask) { is_mask_ = is_mask; } + + void set_nearest_neighbor(bool nearest_neighbor) { + nearest_neighbor_ = nearest_neighbor; + } + + void ValidateSerialization() { + proto::LayerProperties proto; + LayerSpecificPropertiesToProto(&proto); + + FakeLayerTreeHostClient host_client(FakeLayerTreeHostClient::DIRECT_3D); + TestTaskGraphRunner task_graph_runner; + scoped_ptr<FakeLayerTreeHost> host = + FakeLayerTreeHost::Create(&host_client, &task_graph_runner); + scoped_refptr<TestSerializationPictureLayer> layer = + TestSerializationPictureLayer::Create(recording_source_viewport_); + host->SetRootLayer(layer); + layer->FromLayerSpecificPropertiesProto(proto); + + // Validate that the PictureLayer specific fields are properly set. + EXPECT_TRUE(recording_source()->EqualsTo(*layer->recording_source())); + EXPECT_EQ(last_updated_visible_layer_rect_, + layer->last_updated_visible_layer_rect_); + EXPECT_EQ(update_source_frame_number_, layer->update_source_frame_number_); + EXPECT_EQ(is_mask_, layer->is_mask_); + EXPECT_EQ(nearest_neighbor_, layer->nearest_neighbor_); + } + + private: + TestSerializationPictureLayer(const LayerSettings& settings, + ContentLayerClient* client, + scoped_ptr<DisplayListRecordingSource> source, + const gfx::Size& recording_source_viewport) + : PictureLayer(settings, client, std::move(source)), + recording_source_viewport_(recording_source_viewport) {} + ~TestSerializationPictureLayer() override {} + + gfx::Size recording_source_viewport_; + + DISALLOW_COPY_AND_ASSIGN(TestSerializationPictureLayer); }; +namespace { + +TEST(PictureLayerTest, TestSetAllPropsSerializationDeserialization) { + FakeLayerTreeHostClient host_client(FakeLayerTreeHostClient::DIRECT_3D); + TestTaskGraphRunner task_graph_runner; + scoped_ptr<FakeLayerTreeHost> host = + FakeLayerTreeHost::Create(&host_client, &task_graph_runner); + + gfx::Size recording_source_viewport(256, 256); + scoped_refptr<TestSerializationPictureLayer> layer = + TestSerializationPictureLayer::Create(recording_source_viewport); + host->SetRootLayer(layer); + + Region region(gfx::Rect(14, 15, 16, 17)); + layer->set_invalidation(region); + layer->set_last_updated_visible_layer_rect(gfx::Rect(5, 6, 7, 8)); + layer->set_is_mask(true); + layer->set_nearest_neighbor(true); + + layer->SetBounds(recording_source_viewport); + layer->set_update_source_frame_number(0); + layer->recording_source()->SetDisplayListUsesCachedPicture(false); + layer->recording_source()->add_draw_rect( + gfx::Rect(recording_source_viewport)); + layer->recording_source()->SetGenerateDiscardableImagesMetadata(true); + layer->recording_source()->Rerecord(); + layer->ValidateSerialization(); +} + +TEST(PictureLayerTest, TestSerializationDeserialization) { + FakeLayerTreeHostClient host_client(FakeLayerTreeHostClient::DIRECT_3D); + TestTaskGraphRunner task_graph_runner; + scoped_ptr<FakeLayerTreeHost> host = + FakeLayerTreeHost::Create(&host_client, &task_graph_runner); + + gfx::Size recording_source_viewport(256, 256); + scoped_refptr<TestSerializationPictureLayer> layer = + TestSerializationPictureLayer::Create(recording_source_viewport); + host->SetRootLayer(layer); + + layer->SetBounds(recording_source_viewport); + layer->set_update_source_frame_number(0); + layer->recording_source()->SetDisplayListUsesCachedPicture(false); + layer->recording_source()->add_draw_rect( + gfx::Rect(recording_source_viewport)); + layer->recording_source()->SetGenerateDiscardableImagesMetadata(true); + layer->recording_source()->Rerecord(); + layer->ValidateSerialization(); +} + +TEST(PictureLayerTest, TestEmptySerializationDeserialization) { + FakeLayerTreeHostClient host_client(FakeLayerTreeHostClient::DIRECT_3D); + TestTaskGraphRunner task_graph_runner; + scoped_ptr<FakeLayerTreeHost> host = + FakeLayerTreeHost::Create(&host_client, &task_graph_runner); + + gfx::Size recording_source_viewport(256, 256); + scoped_refptr<TestSerializationPictureLayer> layer = + TestSerializationPictureLayer::Create(recording_source_viewport); + host->SetRootLayer(layer); + layer->ValidateSerialization(); +} + TEST(PictureLayerTest, NoTilesIfEmptyBounds) { - MockContentLayerClient client; + ContentLayerClient* client = EmptyContentLayerClient::GetInstance(); scoped_refptr<PictureLayer> layer = - PictureLayer::Create(LayerSettings(), &client); + PictureLayer::Create(LayerSettings(), client); layer->SetBounds(gfx::Size(10, 10)); FakeLayerTreeHostClient host_client(FakeLayerTreeHostClient::DIRECT_3D); @@ -83,10 +206,10 @@ FakeDisplayListRecordingSource* recording_source = recording_source_owned.get(); - MockContentLayerClient client; + ContentLayerClient* client = EmptyContentLayerClient::GetInstance(); scoped_refptr<FakePictureLayer> layer = FakePictureLayer::CreateWithRecordingSource( - LayerSettings(), &client, std::move(recording_source_owned)); + LayerSettings(), client, std::move(recording_source_owned)); FakeLayerTreeHostClient host_client(FakeLayerTreeHostClient::DIRECT_3D); TestTaskGraphRunner task_graph_runner; @@ -99,7 +222,7 @@ gfx::Rect layer_rect(layer_bounds); Region invalidation(layer_rect); recording_source->UpdateAndExpandInvalidation( - &client, &invalidation, layer_bounds, layer_rect, 1, + client, &invalidation, layer_bounds, layer_rect, 1, DisplayListRecordingSource::RECORD_NORMALLY); // Layer is suitable for gpu rasterization by default. @@ -126,9 +249,9 @@ TestSharedBitmapManager shared_bitmap_manager; TestTaskGraphRunner task_graph_runner; - MockContentLayerClient client; + ContentLayerClient* client = EmptyContentLayerClient::GetInstance(); scoped_refptr<FakePictureLayer> layer = - FakePictureLayer::Create(LayerSettings(), &client); + FakePictureLayer::Create(LayerSettings(), client); LayerTreeHost::InitParams params; params.client = &host_client1;
diff --git a/cc/playback/display_list_recording_source.cc b/cc/playback/display_list_recording_source.cc index 90542381..37dc906 100644 --- a/cc/playback/display_list_recording_source.cc +++ b/cc/playback/display_list_recording_source.cc
@@ -61,7 +61,8 @@ proto->set_clear_canvas_with_debug_color(clear_canvas_with_debug_color_); proto->set_solid_color(static_cast<uint64_t>(solid_color_)); proto->set_background_color(static_cast<uint64_t>(background_color_)); - display_list_->ToProtobuf(proto->mutable_display_list()); + if (display_list_) + display_list_->ToProtobuf(proto->mutable_display_list()); } void DisplayListRecordingSource::FromProtobuf( @@ -77,9 +78,16 @@ clear_canvas_with_debug_color_ = proto.clear_canvas_with_debug_color(); solid_color_ = static_cast<SkColor>(proto.solid_color()); background_color_ = static_cast<SkColor>(proto.background_color()); - display_list_ = DisplayItemList::CreateFromProto(proto.display_list()); - FinishDisplayItemListUpdate(); + // This might not exist if the |display_list_| of the serialized + // DisplayListRecordingSource was null, wich can happen if |Clear()| is + // called. + if (proto.has_display_list()) { + display_list_ = DisplayItemList::CreateFromProto(proto.display_list()); + FinishDisplayItemListUpdate(); + } else { + display_list_ = nullptr; + } } void DisplayListRecordingSource::UpdateInvalidationForNewViewport(
diff --git a/cc/playback/display_list_recording_source_unittest.cc b/cc/playback/display_list_recording_source_unittest.cc index b687160..1649566 100644 --- a/cc/playback/display_list_recording_source_unittest.cc +++ b/cc/playback/display_list_recording_source_unittest.cc
@@ -42,6 +42,19 @@ EXPECT_TRUE(source->EqualsTo(new_source)); } +TEST(DisplayListRecordingSourceTest, TestNullDisplayListSerialization) { + gfx::Rect recorded_viewport(0, 0, 256, 256); + + scoped_ptr<FakeDisplayListRecordingSource> recording_source = + CreateRecordingSource(recorded_viewport); + recording_source->SetDisplayListUsesCachedPicture(false); + recording_source->SetGenerateDiscardableImagesMetadata(true); + recording_source->Rerecord(); + recording_source->SetEmptyBounds(); + + ValidateRecordingSourceSerialization(recording_source.get()); +} + TEST(DisplayListRecordingSourceTest, TestEmptySerializationDeserialization) { gfx::Rect recorded_viewport(0, 0, 256, 256);
diff --git a/cc/proto/layer.proto b/cc/proto/layer.proto index d7b3ce3..41b3f2d 100644 --- a/cc/proto/layer.proto +++ b/cc/proto/layer.proto
@@ -4,6 +4,7 @@ syntax = "proto2"; +import "display_list_recording_source.proto"; import "layer_position_constraint.proto"; import "point3f.proto"; import "pointf.proto"; @@ -22,7 +23,9 @@ // Identifies the type of cc:Layer a LayerNode represents. It is used to // facilitate reconstruction of a Layer of the correct type on the client. enum LayerType { - Base = 1; + UNKNOWN = 0; + LAYER = 1; + PICTURE_LAYER = 2; // TODO(nyquist): Add the rest of the necessary LayerTypes. }; @@ -58,6 +61,11 @@ // The Layer base class and each descendant have different proto messages // for their specific properties. optional BaseLayerProperties base = 5; + + // Only one of these fields may be set per LayerProperties. + // TODO(dtrainor): use a 'oneof' union when it's supported in Chromium. See + // crbug.com/570371. + optional PictureLayerProperties picture = 6; } message BaseLayerProperties { @@ -121,3 +129,13 @@ // TODO(nyquist): Figure out what to do with FrameTimingRequests. // repeated FrameTimingRequest frame_timing_requests = 49; } + +message PictureLayerProperties { + optional DisplayListRecordingSource recording_source = 1; + optional Region invalidation = 2; + optional Rect last_updated_visible_layer_rect = 3; + optional bool is_mask = 4; + optional bool nearest_neighbor = 5; + + optional int64 update_source_frame_number = 6; +} \ No newline at end of file
diff --git a/cc/test/fake_display_list_recording_source.cc b/cc/test/fake_display_list_recording_source.cc index fe0a127..01e60485 100644 --- a/cc/test/fake_display_list_recording_source.cc +++ b/cc/test/fake_display_list_recording_source.cc
@@ -27,6 +27,14 @@ bool FakeDisplayListRecordingSource::EqualsTo( const FakeDisplayListRecordingSource& other) { + // The DisplayItemLists are equal if they are both null or they are both not + // null and render to the same thing. + bool display_lists_equal = !display_list_ && !other.display_list_; + if (display_list_ && other.display_list_) { + display_lists_equal = AreDisplayListDrawingResultsSame( + recorded_viewport_, display_list_, other.display_list_); + } + return recorded_viewport_ == other.recorded_viewport_ && size_ == other.size_ && slow_down_raster_scale_factor_for_debug_ == @@ -38,9 +46,7 @@ clear_canvas_with_debug_color_ == other.clear_canvas_with_debug_color_ && solid_color_ == other.solid_color_ && - background_color_ == other.background_color_ && - AreDisplayListDrawingResultsSame(recorded_viewport_, display_list_, - other.display_list_); + background_color_ == other.background_color_ && display_lists_equal; } } // namespace cc
diff --git a/chrome/VERSION b/chrome/VERSION index a92b7e3..8edcd37 100644 --- a/chrome/VERSION +++ b/chrome/VERSION
@@ -1,4 +1,4 @@ MAJOR=49 MINOR=0 -BUILD=2608 +BUILD=2613 PATCH=0
diff --git a/chrome/android/chrome_public_apk_tmpl.gni b/chrome/android/chrome_public_apk_tmpl.gni index 26ae9fc..57974ef4 100644 --- a/chrome/android/chrome_public_apk_tmpl.gni +++ b/chrome/android/chrome_public_apk_tmpl.gni
@@ -37,7 +37,9 @@ } if (chromium_linker_supported) { - use_chromium_linker = chrome_public_apk_use_chromium_linker + if (!defined(use_chromium_linker)) { + use_chromium_linker = chrome_public_apk_use_chromium_linker + } # TODO: Enable packed relocations for x64. See: b/20532404 if (current_cpu != "x64") {
diff --git a/chrome/android/java/res/drawable-hdpi/infobar_update_uma.png b/chrome/android/java/res/drawable-hdpi/infobar_update_uma.png deleted file mode 100644 index b8d47df..0000000 --- a/chrome/android/java/res/drawable-hdpi/infobar_update_uma.png +++ /dev/null Binary files differ
diff --git a/chrome/android/java/res/drawable-mdpi/infobar_update_uma.png b/chrome/android/java/res/drawable-mdpi/infobar_update_uma.png deleted file mode 100644 index 304476d..0000000 --- a/chrome/android/java/res/drawable-mdpi/infobar_update_uma.png +++ /dev/null Binary files differ
diff --git a/chrome/android/java/res/drawable-xhdpi/infobar_update_uma.png b/chrome/android/java/res/drawable-xhdpi/infobar_update_uma.png deleted file mode 100644 index af911bd6..0000000 --- a/chrome/android/java/res/drawable-xhdpi/infobar_update_uma.png +++ /dev/null Binary files differ
diff --git a/chrome/android/java/res/drawable-xxhdpi/infobar_update_uma.png b/chrome/android/java/res/drawable-xxhdpi/infobar_update_uma.png deleted file mode 100644 index 904c9d98..0000000 --- a/chrome/android/java/res/drawable-xxhdpi/infobar_update_uma.png +++ /dev/null Binary files differ
diff --git a/chrome/android/java/res/drawable-xxxhdpi/infobar_update_uma.png b/chrome/android/java/res/drawable-xxxhdpi/infobar_update_uma.png deleted file mode 100644 index 41319d4..0000000 --- a/chrome/android/java/res/drawable-xxxhdpi/infobar_update_uma.png +++ /dev/null Binary files differ
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java index 31cdf81..bc8b28e 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
@@ -519,13 +519,11 @@ @Override public void onLoadStopped(Tab tab, boolean toDifferentDocument) { postDeferredStartupIfNeeded(); - showUpdateInfoBarIfNecessary(); } @Override public void onPageLoadFinished(Tab tab) { postDeferredStartupIfNeeded(); - showUpdateInfoBarIfNecessary(); OfflinePageUtils.showOfflineSnackbarIfNecessary(ChromeActivity.this, tab); } @@ -695,7 +693,6 @@ } }); - getChromeApplication().getUpdateInfoBarHelper().checkForUpdateOnBackgroundThread(this); UpdateMenuItemHelper.getInstance().checkForUpdateOnBackgroundThread(this); removeSnapshotDatabase(); @@ -1012,13 +1009,6 @@ } /** - * @return Whether the update infobar may be shown. - */ - public boolean mayShowUpdateInfoBar() { - return true; - } - - /** * Add the specified tab to bookmarks or allows to edit the bookmark if the specified tab is * already bookmarked. If a new bookmark is added, a snackbar will be shown. * @param tabToBookmark The tab that needs to be bookmarked. @@ -1524,10 +1514,6 @@ } } - private void showUpdateInfoBarIfNecessary() { - getChromeApplication().getUpdateInfoBarHelper().showUpdateInfobarIfNecessary(this); - } - /** * Determines whether the ContentView is currently visible and not hidden by an overlay * @return true if the ContentView is fully hidden by another view (i.e. the tab stack)
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeApplication.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeApplication.java index c6b483d..2e681b47 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeApplication.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeApplication.java
@@ -61,7 +61,6 @@ import org.chromium.chrome.browser.net.spdyproxy.DataReductionProxySettings; import org.chromium.chrome.browser.notifications.NotificationUIManager; import org.chromium.chrome.browser.omaha.RequestGenerator; -import org.chromium.chrome.browser.omaha.UpdateInfoBarHelper; import org.chromium.chrome.browser.partnercustomizations.PartnerBrowserCustomizations; import org.chromium.chrome.browser.physicalweb.PhysicalWebBleClient; import org.chromium.chrome.browser.policy.PolicyAuditor; @@ -176,7 +175,6 @@ private final BackgroundProcessing mBackgroundProcessing = new BackgroundProcessing(); private final PowerBroadcastReceiver mPowerBroadcastReceiver = new PowerBroadcastReceiver(); - private final UpdateInfoBarHelper mUpdateInfoBarHelper = new UpdateInfoBarHelper(); // Used to trigger variation changes (such as seed fetches) upon application foregrounding. private VariationsSession mVariationsSession; @@ -672,14 +670,6 @@ } /** - * @return The UpdateInfoBarHelper used to inform the user about updates. - */ - public UpdateInfoBarHelper getUpdateInfoBarHelper() { - // TODO(aurimas): make UpdateInfoBarHelper have its own static instance. - return mUpdateInfoBarHelper; - } - - /** * @return An instance of {@link GSAHelper} that handles the start point of chrome's integration * with GSA. */
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java index 43828a7..21ec2618 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
@@ -1216,11 +1216,6 @@ return getCompositorViewHolder() != null && !getCompositorViewHolder().isTabInteractive(); } - @Override - public boolean mayShowUpdateInfoBar() { - return !isOverlayVisible(); - } - // App Menu related code ----------------------------------------------------------------------- @Override
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omaha/OmahaUpdateInfobar.java b/chrome/android/java/src/org/chromium/chrome/browser/omaha/OmahaUpdateInfobar.java deleted file mode 100644 index 5e4c1ed..0000000 --- a/chrome/android/java/src/org/chromium/chrome/browser/omaha/OmahaUpdateInfobar.java +++ /dev/null
@@ -1,148 +0,0 @@ -// Copyright 2015 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.chrome.browser.omaha; - -import android.annotation.TargetApi; -import android.content.ActivityNotFoundException; -import android.content.Context; -import android.content.Intent; -import android.net.Uri; -import android.os.AsyncTask; -import android.os.Build; -import android.os.Environment; -import android.os.StatFs; -import android.os.SystemClock; -import android.util.Log; - -import org.chromium.base.VisibleForTesting; -import org.chromium.base.metrics.RecordHistogram; -import org.chromium.chrome.R; -import org.chromium.chrome.browser.infobar.ConfirmInfoBar; -import org.chromium.chrome.browser.infobar.InfoBar; -import org.chromium.chrome.browser.infobar.InfoBarListeners; - -import java.io.File; -import java.util.concurrent.TimeUnit; - - -/** - * An InfoBar implementation that displays a message and a button that sends a user to the - * given URL. - */ -public class OmahaUpdateInfobar extends ConfirmInfoBar { - private static final String TAG = "OmahaUpdateInfobar"; - private static final int ACTION_CLOSED = 0; - private static final int ACTION_CLICKED_UPDATE_SUCCESS = 1; - private static final int ACTION_CLICKED_UPDATE_FAIL = 2; - private static final int ACTION_DISMISSED = 3; - private static final int ACTION_MAX = 3; - - private final String mUrl; - private final Context mActivityContext; - private boolean mActionTaken; - private final long mShownTime; - - /** - * Listens for the InfoBar being dismissed and checks whether it was caused by a user action - * on the InfoBar or another event which caused the InfoBar to be dimissed implicitly - * (e.g. user entered a new url in the omnibox.) - */ - private static class DismissListener implements InfoBarListeners.Confirm { - @Override - public void onInfoBarDismissed(InfoBar infoBar) { - assert infoBar instanceof OmahaUpdateInfobar; - - OmahaUpdateInfobar infoBarInstance = (OmahaUpdateInfobar) infoBar; - // If the user hasn't taken an action and the infobar is getting dismissed, then - // record that it was dismissed. - if (!infoBarInstance.mActionTaken) { - infoBarInstance.recordHistograms(ACTION_DISMISSED); - } - } - - @Override - public void onConfirmInfoBarButtonClicked(ConfirmInfoBar infoBar, boolean confirm) { - // Ignored. - } - } - - public OmahaUpdateInfobar(Context activityContext, String message, String buttonMessage, - String url) { - super(new DismissListener(), R.drawable.infobar_update_uma, null, message, null, - buttonMessage, null); - mActivityContext = activityContext; - mUrl = url; - mShownTime = SystemClock.uptimeMillis(); - recordInternalStorageSize(); - } - - private void recordHistograms(int action) { - RecordHistogram.recordEnumeratedHistogram("GoogleUpdate.InfoBar.ActionTaken", - action, ACTION_MAX); - RecordHistogram.recordMediumTimesHistogram("GoogleUpdate.InfoBar.TimeShown", - SystemClock.uptimeMillis() - mShownTime, TimeUnit.MILLISECONDS); - } - - private void recordInternalStorageSize() { - new AsyncTask<Void, Void, Void>() { - @Override - protected Void doInBackground(Void... params) { - File path = Environment.getDataDirectory(); - StatFs statFs = new StatFs(path.getAbsolutePath()); - int size; - if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR2) { - size = getSize(statFs); - } else { - size = getSizeUpdatedApi(statFs); - } - RecordHistogram.recordLinearCountHistogram( - "GoogleUpdate.InfoBar.InternalStorageSizeAvailable", size, 1, 200, 100); - return null; - } - }.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); - } - - @TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR2) - private static int getSizeUpdatedApi(StatFs statFs) { - return (int) statFs.getAvailableBytes() / (1024 * 1024); - } - - @SuppressWarnings("deprecation") - private static int getSize(StatFs statFs) { - int blockSize = statFs.getBlockSize(); - int availableBlocks = statFs.getAvailableBlocks(); - int size = (blockSize * availableBlocks) / (1024 * 1024); - return size; - } - - @Override - public void onCloseButtonClicked() { - mActionTaken = true; - recordHistograms(ACTION_CLOSED); - super.onCloseButtonClicked(); - } - - @Override - public void onButtonClicked(boolean isPrimaryButton) { - mActionTaken = true; - dismissJavaOnlyInfoBar(); - - // Fire an intent to open the URL. - try { - Intent launchIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(mUrl)); - mActivityContext.startActivity(launchIntent); - recordHistograms(ACTION_CLICKED_UPDATE_SUCCESS); - } catch (ActivityNotFoundException e) { - Log.e(TAG, "Failed to launch Activity for: " + mUrl); - recordHistograms(ACTION_CLICKED_UPDATE_FAIL); - } - } - - /** Returns the URL that is supposed to be opened when the button is clicked. */ - @VisibleForTesting - public String getUrl() { - return mUrl; - } -}
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omaha/UpdateInfoBarHelper.java b/chrome/android/java/src/org/chromium/chrome/browser/omaha/UpdateInfoBarHelper.java deleted file mode 100644 index f7348cc..0000000 --- a/chrome/android/java/src/org/chromium/chrome/browser/omaha/UpdateInfoBarHelper.java +++ /dev/null
@@ -1,83 +0,0 @@ -// Copyright 2015 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.chrome.browser.omaha; - -import android.content.res.Resources; -import android.os.AsyncTask; - -import org.chromium.base.ThreadUtils; -import org.chromium.chrome.R; -import org.chromium.chrome.browser.ChromeActivity; -import org.chromium.chrome.browser.tab.Tab; - -/** - * Shows an InfoBar indicating that a new version of Chrome is available. - */ -public class UpdateInfoBarHelper { - /** Whether OmahaClient has already been checked for an update. */ - private boolean mAlreadyCheckedForUpdates; - - /** Whether to show the InfoBar indicating a new version is available. */ - private boolean mMustShowInfoBar; - - /** URL to direct the user to when Omaha detects a newer version available. */ - private String mUpdateURL; - - /** Checks if the OmahaClient knows about an update. */ - public void checkForUpdateOnBackgroundThread(final ChromeActivity activity) { - ThreadUtils.assertOnUiThread(); - - if (mAlreadyCheckedForUpdates) return; - mAlreadyCheckedForUpdates = true; - - new AsyncTask<Void, Void, Void>() { - @Override - protected Void doInBackground(Void... params) { - if (OmahaClient.isNewerVersionAvailable(activity)) { - mUpdateURL = OmahaClient.getMarketURL(activity); - mMustShowInfoBar = true; - } else { - mMustShowInfoBar = false; - } - return null; - } - - @Override - protected void onPostExecute(Void result) { - if (activity.isActivityDestroyed()) return; - showUpdateInfobarIfNecessary(activity); - } - }.execute(); - } - - /** Shows the InfoBar if it needs to be shown. */ - public void showUpdateInfobarIfNecessary(ChromeActivity activity) { - if (mMustShowInfoBar) showUpdateInfoBar(activity); - } - - /** Shows an InfoBar indicating that a new version of Chrome is available. */ - private void showUpdateInfoBar(ChromeActivity activity) { - ThreadUtils.assertOnUiThread(); - - // Don't show the InfoBar if it doesn't make sense to. - Tab currentTab = activity.getActivityTab(); - boolean tabIsInvalid = currentTab == null || currentTab.isNativePage(); - boolean mayShowUpdateInfoBar = activity.mayShowUpdateInfoBar(); - boolean urlIsInvalid = mUpdateURL == null; - if (tabIsInvalid || !mayShowUpdateInfoBar || urlIsInvalid) { - mMustShowInfoBar = true; - return; - } - - // Create and show the InfoBar. - Resources resources = activity.getResources(); - String message = resources.getString(R.string.update_available_infobar); - String button = resources.getString(R.string.update_available_infobar_button); - OmahaUpdateInfobar updateBar = - new OmahaUpdateInfobar(activity, message, button, mUpdateURL); - currentTab.getInfoBarContainer().addInfoBar(updateBar); - mMustShowInfoBar = false; - } -}
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWebUma.java b/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWebUma.java index 17344c2..ecc6016f 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWebUma.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWebUma.java
@@ -312,24 +312,51 @@ } } - private static Object[] parseJsonArray(String jsonArrayStr, Class<?> itemType) { + private static Number[] parseJsonNumberArray(String jsonArrayStr) { try { JSONArray values = new JSONArray(jsonArrayStr); - Object[] arr = new Object[values.length()]; + Number[] array = new Number[values.length()]; for (int i = 0; i < values.length(); i++) { - arr[i] = values.get(i); - if (arr[i].getClass() != itemType) return null; + Object object = values.get(i); + if (!(object instanceof Number)) { + return null; + } + array[i] = (Number) object; } - return arr; + return array; } catch (JSONException e) { return null; } } + private static Long[] parseJsonLongArray(String jsonArrayStr) { + Number[] numbers = parseJsonNumberArray(jsonArrayStr); + if (numbers == null) { + return null; + } + Long[] array = new Long[numbers.length]; + for (int i = 0; i < numbers.length; i++) { + array[i] = numbers[i].longValue(); + } + return array; + } + + private static Integer[] parseJsonIntegerArray(String jsonArrayStr) { + Number[] numbers = parseJsonNumberArray(jsonArrayStr); + if (numbers == null) { + return null; + } + Integer[] array = new Integer[numbers.length]; + for (int i = 0; i < numbers.length; i++) { + array[i] = numbers[i].intValue(); + } + return array; + } + private static void uploadTimes(String jsonTimesStr, final String key, final TimeUnit tu) { - Long[] times = (Long[]) parseJsonArray(jsonTimesStr, Long.class); + Long[] times = parseJsonLongArray(jsonTimesStr); if (times == null) { - Log.e(TAG, "Error reporting " + key); + Log.e(TAG, "Error reporting " + key + " with values: " + jsonTimesStr); return; } for (Long time : times) { @@ -338,9 +365,9 @@ } private static void uploadCounts(String jsonCountsStr, final String key) { - Integer[] counts = (Integer[]) parseJsonArray(jsonCountsStr, Long.class); + Integer[] counts = parseJsonIntegerArray(jsonCountsStr); if (counts == null) { - Log.e(TAG, "Error reporting " + key); + Log.e(TAG, "Error reporting " + key + " with values: " + jsonCountsStr); return; } for (Integer count: counts) {
diff --git a/chrome/android/java/strings/android_chrome_strings.grd b/chrome/android/java/strings/android_chrome_strings.grd index f9f30aa2..edf7066 100644 --- a/chrome/android/java/strings/android_chrome_strings.grd +++ b/chrome/android/java/strings/android_chrome_strings.grd
@@ -2101,12 +2101,6 @@ <message name="IDS_READER_MODE_EXPANDED_TITLE" desc="Message shown on the reader mode button bar when it is opened to show reader mode. Reader mode extracts content and removes clutter from a web page and puts the result in a panel making it easier to read."> Mobile-friendly view </message> - <message name="IDS_UPDATE_AVAILABLE_INFOBAR" desc="Text to display when a new update is detected."> - Chrome is out of date. Important security improvements and new features are available in the latest version. - </message> - <message name="IDS_UPDATE_AVAILABLE_INFOBAR_BUTTON" desc="Open market button. [CHAR-LIMIT=32]"> - Update - </message> <message name="IDS_FRE_LABEL" desc="First Run Experience Strings"> First Run Experience </message>
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/omaha/OmahaUpdateInfoBarTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/omaha/OmahaUpdateInfoBarTest.java deleted file mode 100644 index 8cf0327..0000000 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/omaha/OmahaUpdateInfoBarTest.java +++ /dev/null
@@ -1,308 +0,0 @@ -// Copyright 2015 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.chrome.browser.omaha; - -import android.content.Context; -import android.test.suitebuilder.annotation.MediumTest; - -import org.chromium.base.test.util.Feature; -import org.chromium.base.test.util.UrlUtils; -import org.chromium.chrome.browser.ChromeActivity; -import org.chromium.chrome.browser.UrlConstants; -import org.chromium.chrome.browser.infobar.InfoBar; -import org.chromium.chrome.test.ChromeActivityTestCaseBase; -import org.chromium.content.browser.test.util.Criteria; -import org.chromium.content.browser.test.util.CriteriaHelper; - -import java.util.List; - -/** - * Checks to see that Main is properly displaying InfoBars when an update is detected. - */ -public class OmahaUpdateInfoBarTest extends ChromeActivityTestCaseBase<ChromeActivity> { - private static final String HTML_FILENAME_1 = - "chrome/test/data/android/omahaupdateinfobar/omaha_update_infobar_test_page_1.html"; - private static final String HTML_FILENAME_2 = - "chrome/test/data/android/omahaupdateinfobar/omaha_update_infobar_test_page_2.html"; - - private static final long MS_TIMEOUT = 2000; - private static final long MS_INTERVAL = 500; - - public OmahaUpdateInfoBarTest() { - super(ChromeActivity.class); - } - - /** Reports versions that we want back to OmahaClient. */ - private static class MockVersionNumberGetter extends VersionNumberGetter { - // Both of these strings must be of the format "#.#.#.#". - private final String mCurrentVersion; - private final String mLatestVersion; - - private boolean mAskedForCurrentVersion; - private boolean mAskedForLatestVersion; - - public MockVersionNumberGetter(String currentVersion, String latestVersion) { - mCurrentVersion = currentVersion; - mLatestVersion = latestVersion; - } - - @Override - public String getCurrentlyUsedVersion(Context applicationContext) { - assertNotNull("Never set the current version", mCurrentVersion); - mAskedForCurrentVersion = true; - return mCurrentVersion; - } - - @Override - public String getLatestKnownVersion( - Context applicationContext, String prefPackage, String prefLatestVersion) { - assertNotNull("Never set the latest version", mLatestVersion); - mAskedForLatestVersion = true; - return mLatestVersion; - } - - public boolean askedForCurrentVersion() { - return mAskedForCurrentVersion; - } - - public boolean askedForLatestVersion() { - return mAskedForLatestVersion; - } - } - - /** Reports a dummy market URL back to OmahaClient. */ - private static class MockMarketURLGetter extends MarketURLGetter { - private final String mURL; - - MockMarketURLGetter(String url) { - mURL = url; - } - - @Override - public String getMarketURL( - Context applicationContext, String prefPackage, String prefMarketUrl) { - return mURL; - } - } - - private MockVersionNumberGetter mMockVersionNumberGetter; - private MockMarketURLGetter mMockMarketURLGetter; - - @Override - public void setUp() throws Exception { - super.setUp(); - - // This test explicitly tests for the infobar, so turn it on. - OmahaClient.setEnableUpdateDetection(true); - } - - @Override - public void startMainActivity() throws InterruptedException { - // Don't start Main until we've had a chance to override everything. - } - - /** - * Prepares Main before actually launching it. This is required since we don't have all of the - * info we need in setUp(). - * @param currentVersion Version to report as the current version of Chrome - * @param latestVersion Version to report is available by Omaha - * @param url URL to show. null = NTP. - */ - private void prepareAndStartMainActivity(String currentVersion, String latestVersion, - String url) throws Exception { - if (url == null) url = UrlConstants.NTP_URL; - - // Report fake versions back to Main when it asks. - mMockVersionNumberGetter = new MockVersionNumberGetter(currentVersion, latestVersion); - OmahaClient.setVersionNumberGetterForTests(mMockVersionNumberGetter); - - // Report a dummy URL to Omaha. - mMockMarketURLGetter = new MockMarketURLGetter( - "https://market.android.com/details?id=com.google.android.apps.chrome"); - OmahaClient.setMarketURLGetterForTests(mMockMarketURLGetter); - - // Start up main. - startMainActivityWithURL(url); - - // Check to make sure that the version numbers get queried. - waitForVersionNumbersQueried(); - } - - private void waitForVersionNumbersQueried() throws Exception { - CriteriaHelper.pollForCriteria( - new Criteria("Main didn't ask Omaha for version numbers.") { - @Override - public boolean isSatisfied() { - return mMockVersionNumberGetter.askedForCurrentVersion() - && mMockVersionNumberGetter.askedForLatestVersion(); - } - }, - MS_TIMEOUT, MS_INTERVAL); - } - - /** - * Checks to see if one of the InfoBars is a NavigateToURLInfoBar pointing to the market. - */ - private boolean correctInfoBarExists() { - // Check the current InfoBars for a NavigateToURLInfoBar. - List<InfoBar> infobars = getInfoBars(); - if (infobars == null) { - return false; - } - - // Check if one of the InfoBars is pointing to the market URL. - Context context = getInstrumentation().getTargetContext(); - String expectedURL = OmahaClient.getMarketURL(context); - for (int i = 0; i < infobars.size(); ++i) { - if (infobars.get(i) instanceof OmahaUpdateInfobar) { - OmahaUpdateInfobar bar = (OmahaUpdateInfobar) infobars.get(i); - if (expectedURL.equals(bar.getUrl())) { - return true; - } - } - } - return false; - } - - /** - * Waits until the NavigateToURLInfoBar appears for the current tab. - */ - private void correctInfoBarAdded() throws Exception { - CriteriaHelper.pollForCriteria( - new Criteria() { - @Override - public boolean isSatisfied() { - return correctInfoBarExists(); - - } - }, - MS_TIMEOUT, MS_INTERVAL); - } - - /** - * Waits until the NavigateToURLInfoBar goes away. - */ - private void correctInfoBarRemoved() throws Exception { - CriteriaHelper.pollForCriteria( - new Criteria() { - @Override - public boolean isSatisfied() { - return !correctInfoBarExists(); - - } - }, - MS_TIMEOUT, MS_INTERVAL); - } - - /** - * Checks to see that the InfoBar is created when an update is detected. - */ - private void checkInfobarAppearsAndIsDismissed(String currentVersion, String latestVersion, - String url) throws Exception { - prepareAndStartMainActivity(currentVersion, latestVersion, url); - - if (url == null) { - // The InfoBar shouldn't be created yet because we're on the NTP. - try { - correctInfoBarAdded(); - fail("Infobar should not have been added"); - } catch (AssertionError e) { - // TODO(tedchoc): This is horrible and should never timeout to determine success. - } - - // Navigate somewhere else and then check for the InfoBar. - loadUrl(UrlUtils.getIsolatedTestFileUrl(HTML_FILENAME_1)); - correctInfoBarAdded(); - } else { - // The InfoBar be shown ASAP since we're not on the NTP. - correctInfoBarAdded(); - } - - // Make sure the InfoBar doesn't disappear immediately. - try { - correctInfoBarRemoved(); - fail("InfoBar was removed too quickly."); - } catch (AssertionError e) { - // TODO(tedchoc): This is horrible and should never timeout to determine success. - } - - // Make sure the InfoBar goes away once we navigate somewhere else on the same tab. - loadUrl(UrlUtils.getIsolatedTestFileUrl(HTML_FILENAME_2)); - correctInfoBarRemoved(); - } - - /** - * Makes sure that no InfoBar is shown at all, after the initial page load or after - * moving away. - */ - private void checkInfobarDoesNotAppear(String currentVersion, String latestVersion, String url) - throws Exception { - prepareAndStartMainActivity(currentVersion, latestVersion, url); - try { - correctInfoBarAdded(); - fail("Infobar is showing."); - } catch (AssertionError e) { - // TODO(tedchoc): This is horrible and should never timeout to determine success. - } - loadUrl(UrlUtils.getIsolatedTestFileUrl(HTML_FILENAME_2)); - try { - correctInfoBarAdded(); - fail("Infobar is now showing"); - } catch (AssertionError e) { - // TODO(tedchoc): This is horrible and should never timeout to determine success. - } - } - - @MediumTest - @Feature({"Omaha"}) - public void testCurrentVersionIsOlderNTP() throws Exception { - checkInfobarAppearsAndIsDismissed("0.0.0.0", "1.2.3.4", null); - } - - @MediumTest - @Feature({"Omaha"}) - public void testCurrentVersionIsOlderNotNTP() throws Exception { - checkInfobarAppearsAndIsDismissed("0.0.0.0", "1.2.3.4", - UrlUtils.getIsolatedTestFileUrl(HTML_FILENAME_1)); - } - - @MediumTest - @Feature({"Omaha"}) - public void testCurrentVersionIsSameNTP() throws Exception { - checkInfobarDoesNotAppear("1.2.3.4", "1.2.3.4", null); - } - - @MediumTest - @Feature({"Omaha"}) - public void testCurrentVersionIsSameNotNTP() throws Exception { - checkInfobarDoesNotAppear("1.2.3.4", "1.2.3.4", - UrlUtils.getIsolatedTestFileUrl(HTML_FILENAME_1)); - } - - @MediumTest - @Feature({"Omaha"}) - public void testCurrentVersionIsNewerNTP() throws Exception { - checkInfobarDoesNotAppear("27.0.1453.42", "26.0.1410.49", null); - } - - @MediumTest - @Feature({"Omaha"}) - public void testCurrentVersionIsNewerNotNTP() throws Exception { - checkInfobarDoesNotAppear("27.0.1453.42", "26.0.1410.49", - UrlUtils.getIsolatedTestFileUrl(HTML_FILENAME_1)); - } - - @MediumTest - @Feature({"Omaha"}) - public void testNoVersionKnownNTP() throws Exception { - checkInfobarDoesNotAppear("1.2.3.4", "0", null); - } - - @MediumTest - @Feature({"Omaha"}) - public void testNoVersionKnownNotNTP() throws Exception { - checkInfobarDoesNotAppear("1.2.3.4", "", UrlUtils.getIsolatedTestFileUrl(HTML_FILENAME_1)); - } -}
diff --git a/chrome/app/media_router_strings.grdp b/chrome/app/media_router_strings.grdp index 79808ce..282f3232 100644 --- a/chrome/app/media_router_strings.grdp +++ b/chrome/app/media_router_strings.grdp
@@ -48,6 +48,17 @@ Report an issue </message> + <!-- First Run Flow --> + <message name="IDS_MEDIA_ROUTER_FIRST_RUN_FLOW_TITLE" desc="Title of the first run flow, which is shown to the user the first time they use Media Router, until they acknowledge the message. This is a welcome message that introduces Media Router to the user."> + Welcome to the Cast experience in Chromium! + </message> + <message name="IDS_MEDIA_ROUTER_FIRST_RUN_FLOW_TEXT" desc="Text of the first run flow, which is shown to the user the first time they use Media Router. This is an introductory description of what Media Router does."> + You can use this feature to display content from Chromium on your TV or other devices. + </message> + <message name="IDS_MEDIA_ROUTER_FIRST_RUN_FLOW_BUTTON" desc="Acknowledge button for the first run flow, which, on click, will dismiss the first run flow and set the current profile's preference that the user has acknowledged the first run flow."> + Ok, got it + </message> + <!-- Issue Actions --> <message name="IDS_MEDIA_ROUTER_DISMISS_BUTTON" desc="Dismiss button, which, on click, will dismiss the current issue."> Dismiss
diff --git a/chrome/browser/android/banners/app_banner_infobar_delegate_android.cc b/chrome/browser/android/banners/app_banner_infobar_delegate_android.cc index 450d117f..43204e5 100644 --- a/chrome/browser/android/banners/app_banner_infobar_delegate_android.cc +++ b/chrome/browser/android/banners/app_banner_infobar_delegate_android.cc
@@ -162,6 +162,11 @@ platform)); } +infobars::InfoBarDelegate::InfoBarIdentifier +AppBannerInfoBarDelegateAndroid::GetIdentifier() const { + return APP_BANNER_INFOBAR_DELEGATE_ANDROID; +} + gfx::Image AppBannerInfoBarDelegateAndroid::GetIcon() const { return gfx::Image::CreateFrom1xBitmap(*app_icon_.get()); }
diff --git a/chrome/browser/android/banners/app_banner_infobar_delegate_android.h b/chrome/browser/android/banners/app_banner_infobar_delegate_android.h index f5160bfb..049f0de 100644 --- a/chrome/browser/android/banners/app_banner_infobar_delegate_android.h +++ b/chrome/browser/android/banners/app_banner_infobar_delegate_android.h
@@ -69,6 +69,7 @@ const std::string& platform); // ConfirmInfoBarDelegate: + infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override; gfx::Image GetIcon() const override; void InfoBarDismissed() override; base::string16 GetMessageText() const override;
diff --git a/chrome/browser/android/data_usage/tab_data_use_entry_unittest.cc b/chrome/browser/android/data_usage/tab_data_use_entry_unittest.cc index e91529e..2522ed3 100644 --- a/chrome/browser/android/data_usage/tab_data_use_entry_unittest.cc +++ b/chrome/browser/android/data_usage/tab_data_use_entry_unittest.cc
@@ -73,7 +73,7 @@ tab_entry_.reset(new TabDataUseEntry(tab_model_.get())); } - const size_t GetMaxSessionsPerTab() const { + size_t GetMaxSessionsPerTab() const { return tab_model_->max_sessions_per_tab(); }
diff --git a/chrome/browser/android/download/android_download_manager_overwrite_infobar_delegate.cc b/chrome/browser/android/download/android_download_manager_overwrite_infobar_delegate.cc index 5bb6bf1..090306cc 100644 --- a/chrome/browser/android/download/android_download_manager_overwrite_infobar_delegate.cc +++ b/chrome/browser/android/download/android_download_manager_overwrite_infobar_delegate.cc
@@ -53,6 +53,11 @@ download_info_.Reset(env, download_info); } +infobars::InfoBarDelegate::InfoBarIdentifier +AndroidDownloadManagerOverwriteInfoBarDelegate::GetIdentifier() const { + return ANDROID_DOWNLOAD_MANAGER_OVERWRITE_INFOBAR_DELEGATE; +} + bool AndroidDownloadManagerOverwriteInfoBarDelegate::OverwriteExistingFile() { bool tab_closed = ChromeDownloadDelegate::EnqueueDownloadManagerRequest( chrome_download_delegate_.obj(), true, download_info_.obj());
diff --git a/chrome/browser/android/download/android_download_manager_overwrite_infobar_delegate.h b/chrome/browser/android/download/android_download_manager_overwrite_infobar_delegate.h index d794a81..aad793e8 100644 --- a/chrome/browser/android/download/android_download_manager_overwrite_infobar_delegate.h +++ b/chrome/browser/android/download/android_download_manager_overwrite_infobar_delegate.h
@@ -40,6 +40,7 @@ jobject download_info); // DownloadOverwriteInfoBarDelegate: + infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override; bool OverwriteExistingFile() override; bool CreateNewFile() override; std::string GetFileName() const override;
diff --git a/chrome/browser/android/download/chrome_download_manager_overwrite_infobar_delegate.cc b/chrome/browser/android/download/chrome_download_manager_overwrite_infobar_delegate.cc index c40a584..2d291d3 100644 --- a/chrome/browser/android/download/chrome_download_manager_overwrite_infobar_delegate.cc +++ b/chrome/browser/android/download/chrome_download_manager_overwrite_infobar_delegate.cc
@@ -41,6 +41,11 @@ file_selected_callback_(file_selected_callback) { } +infobars::InfoBarDelegate::InfoBarIdentifier +ChromeDownloadManagerOverwriteInfoBarDelegate::GetIdentifier() const { + return CHROME_DOWNLOAD_MANAGER_OVERWRITE_INFOBAR_DELEGATE; +} + bool ChromeDownloadManagerOverwriteInfoBarDelegate::OverwriteExistingFile() { file_selected_callback_.Run(suggested_download_path_); return true;
diff --git a/chrome/browser/android/download/chrome_download_manager_overwrite_infobar_delegate.h b/chrome/browser/android/download/chrome_download_manager_overwrite_infobar_delegate.h index 4fcf0ae..3d56309 100644 --- a/chrome/browser/android/download/chrome_download_manager_overwrite_infobar_delegate.h +++ b/chrome/browser/android/download/chrome_download_manager_overwrite_infobar_delegate.h
@@ -38,6 +38,7 @@ const DownloadTargetDeterminerDelegate::FileSelectedCallback& callback); // DownloadOverwriteInfoBarDelegate: + infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override; bool OverwriteExistingFile() override; bool CreateNewFile() override; std::string GetFileName() const override;
diff --git a/chrome/browser/android/fullscreen/fullscreen_infobar_delegate.cc b/chrome/browser/android/fullscreen/fullscreen_infobar_delegate.cc index 441e3f9d..b18fb57 100644 --- a/chrome/browser/android/fullscreen/fullscreen_infobar_delegate.cc +++ b/chrome/browser/android/fullscreen/fullscreen_infobar_delegate.cc
@@ -60,6 +60,11 @@ infobar()->owner()->RemoveInfoBar(infobar()); } +infobars::InfoBarDelegate::InfoBarIdentifier +FullscreenInfoBarDelegate::GetIdentifier() const { + return FULLSCREEN_INFOBAR_DELEGATE; +} + int FullscreenInfoBarDelegate::GetIconId() const { return IDR_ANDROID_INFOBAR_FULLSCREEN; }
diff --git a/chrome/browser/android/fullscreen/fullscreen_infobar_delegate.h b/chrome/browser/android/fullscreen/fullscreen_infobar_delegate.h index 8b9eefd..bf5e92f 100644 --- a/chrome/browser/android/fullscreen/fullscreen_infobar_delegate.h +++ b/chrome/browser/android/fullscreen/fullscreen_infobar_delegate.h
@@ -29,6 +29,7 @@ const base::android::JavaParamRef<jobject>& obj); // ConfirmInfoBarDelegate: + infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override; int GetIconId() const override; base::string16 GetMessageText() const override; base::string16 GetButtonLabel(InfoBarButton button) const override;
diff --git a/chrome/browser/android/hung_renderer_infobar_delegate.cc b/chrome/browser/android/hung_renderer_infobar_delegate.cc index 7b35b1c9..ffdbbc0 100644 --- a/chrome/browser/android/hung_renderer_infobar_delegate.cc +++ b/chrome/browser/android/hung_renderer_infobar_delegate.cc
@@ -38,6 +38,11 @@ LogEvent(TAB_CLOSED); } +infobars::InfoBarDelegate::InfoBarIdentifier +HungRendererInfoBarDelegate::GetIdentifier() const { + return HUNG_RENDERER_INFOBAR_DELEGATE; +} + void HungRendererInfoBarDelegate::InfoBarDismissed() { LogEvent(CLOSE_CLICKED); }
diff --git a/chrome/browser/android/hung_renderer_infobar_delegate.h b/chrome/browser/android/hung_renderer_infobar_delegate.h index 16b12d5..14f45f9c 100644 --- a/chrome/browser/android/hung_renderer_infobar_delegate.h +++ b/chrome/browser/android/hung_renderer_infobar_delegate.h
@@ -48,6 +48,7 @@ ~HungRendererInfoBarDelegate() override; // ConfirmInfoBarDelegate: + infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override; void InfoBarDismissed() override; HungRendererInfoBarDelegate* AsHungRendererInfoBarDelegate() override; int GetIconId() const override;
diff --git a/chrome/browser/android/media/media_throttle_infobar_delegate.cc b/chrome/browser/android/media/media_throttle_infobar_delegate.cc index 09a2db5f..b7c7987 100644 --- a/chrome/browser/android/media/media_throttle_infobar_delegate.cc +++ b/chrome/browser/android/media/media_throttle_infobar_delegate.cc
@@ -52,6 +52,11 @@ UMA_THROTTLE_INFOBAR_RESPONSE_COUNT); } +infobars::InfoBarDelegate::InfoBarIdentifier +MediaThrottleInfoBarDelegate::GetIdentifier() const { + return MEDIA_THROTTLE_INFOBAR_DELEGATE; +} + MediaThrottleInfoBarDelegate* MediaThrottleInfoBarDelegate::AsMediaThrottleInfoBarDelegate() { return this;
diff --git a/chrome/browser/android/media/media_throttle_infobar_delegate.h b/chrome/browser/android/media/media_throttle_infobar_delegate.h index ca05c8e..621f16a 100644 --- a/chrome/browser/android/media/media_throttle_infobar_delegate.h +++ b/chrome/browser/android/media/media_throttle_infobar_delegate.h
@@ -41,6 +41,7 @@ const DecodeRequestGrantedCallback& callback); // ConfirmInfoBarDelegate: + infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override; MediaThrottleInfoBarDelegate* AsMediaThrottleInfoBarDelegate() override; base::string16 GetMessageText() const override; int GetIconId() const override;
diff --git a/chrome/browser/android/offline_pages/offline_page_utils.cc b/chrome/browser/android/offline_pages/offline_page_utils.cc index 6f4a624..5fdaa58 100644 --- a/chrome/browser/android/offline_pages/offline_page_utils.cc +++ b/chrome/browser/android/offline_pages/offline_page_utils.cc
@@ -122,7 +122,7 @@ } // static -const bool OfflinePageUtils::HasOfflinePages( +bool OfflinePageUtils::HasOfflinePages( content::BrowserContext* browser_context) { DCHECK(browser_context);
diff --git a/chrome/browser/android/offline_pages/offline_page_utils.h b/chrome/browser/android/offline_pages/offline_page_utils.h index f06d964..77d4d08e 100644 --- a/chrome/browser/android/offline_pages/offline_page_utils.h +++ b/chrome/browser/android/offline_pages/offline_page_utils.h
@@ -46,7 +46,7 @@ const GURL& online_url); // Checks whether any offline page is saved. - static const bool HasOfflinePages(content::BrowserContext* browser_context); + static bool HasOfflinePages(content::BrowserContext* browser_context); }; } // namespace offline_pages
diff --git a/chrome/browser/apps/window_controls_browsertest.cc b/chrome/browser/apps/window_controls_browsertest.cc index 33cad925..8204eae 100644 --- a/chrome/browser/apps/window_controls_browsertest.cc +++ b/chrome/browser/apps/window_controls_browsertest.cc
@@ -4,6 +4,7 @@ #include "chrome/browser/apps/app_browsertest_util.h" #include "chrome/browser/profiles/profile.h" +#include "components/infobars/core/infobar_delegate.h" #include "content/public/test/browser_test_utils.h" #include "extensions/browser/process_manager.h" #include "extensions/common/switches.h"
diff --git a/chrome/browser/banners/app_banner_infobar_delegate_desktop.cc b/chrome/browser/banners/app_banner_infobar_delegate_desktop.cc index ca913eb..604f8ab9 100644 --- a/chrome/browser/banners/app_banner_infobar_delegate_desktop.cc +++ b/chrome/browser/banners/app_banner_infobar_delegate_desktop.cc
@@ -94,6 +94,11 @@ return true; } +infobars::InfoBarDelegate::InfoBarIdentifier +AppBannerInfoBarDelegateDesktop::GetIdentifier() const { + return APP_BANNER_INFOBAR_DELEGATE_DESKTOP; +} + void AppBannerInfoBarDelegateDesktop::InfoBarDismissed() { TrackUserResponse(USER_RESPONSE_WEB_APP_DISMISSED); has_user_interaction_ = true;
diff --git a/chrome/browser/banners/app_banner_infobar_delegate_desktop.h b/chrome/browser/banners/app_banner_infobar_delegate_desktop.h index c6b332b..d0a4cfc7 100644 --- a/chrome/browser/banners/app_banner_infobar_delegate_desktop.h +++ b/chrome/browser/banners/app_banner_infobar_delegate_desktop.h
@@ -48,6 +48,7 @@ bool Accept() override; // InfoBarDelegate override. + infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override; void InfoBarDismissed() override; protected:
diff --git a/chrome/browser/browser_resources.grd b/chrome/browser/browser_resources.grd index af4faff..970b607e 100644 --- a/chrome/browser/browser_resources.grd +++ b/chrome/browser/browser_resources.grd
@@ -25,8 +25,14 @@ </if> <if expr="not is_android"> <structure name="IDR_DOWNLOADS_DOWNLOADS_HTML" file="resources\downloads\downloads.html" flattenhtml="true" allowexternalscript="true" type="chrome_html" /> - <structure name="IDR_MD_DOWNLOADS_DOWNLOADS_HTML" file="resources\md_downloads\downloads.html" flattenhtml="true" allowexternalscript="true" type="chrome_html" /> - <structure name="IDR_MD_DOWNLOADS_VULCANIZED_HTML" file="resources\md_downloads\vulcanized.html" flattenhtml="true" allowexternalscript="true" type="chrome_html" /> + <if expr="use_vulcanize"> + <then> + <structure name="IDR_MD_DOWNLOADS_VULCANIZED_HTML" file="resources\md_downloads\vulcanized.html" flattenhtml="true" allowexternalscript="true" type="chrome_html" /> + </then> + <else> + <structure name="IDR_MD_DOWNLOADS_DOWNLOADS_HTML" file="resources\md_downloads\downloads.html" flattenhtml="true" allowexternalscript="true" type="chrome_html" /> + </else> + </if> </if> <if expr="enable_extensions"> <structure name="IDR_EXTENSIONS_HTML" file="resources\extensions\extensions.html" flattenhtml="true" type="chrome_html" /> @@ -124,23 +130,29 @@ <include name="IDR_MD_DOWNLOADS_2X_INCOGNITO_MARKER_PNG" file="resources\md_downloads\2x\incognito_marker.png" type="BINDATA" /> <include name="IDR_MD_DOWNLOADS_1X_NO_DOWNLOADS_PNG" file="resources\md_downloads\1x\no_downloads.png" type="BINDATA" /> <include name="IDR_MD_DOWNLOADS_2X_NO_DOWNLOADS_PNG" file="resources\md_downloads\2x\no_downloads.png" type="BINDATA" /> - <include name="IDR_MD_DOWNLOADS_ACTION_SERVICE_HTML" file="resources\md_downloads\action_service.html" type="BINDATA" /> - <include name="IDR_MD_DOWNLOADS_ACTION_SERVICE_JS" file="resources\md_downloads\action_service.js" type="BINDATA" /> - <include name="IDR_MD_DOWNLOADS_CONSTANTS_HTML" file="resources\md_downloads\constants.html" type="BINDATA" /> - <include name="IDR_MD_DOWNLOADS_CONSTANTS_JS" file="resources\md_downloads\constants.js" type="BINDATA" /> - <include name="IDR_MD_DOWNLOADS_CRISPER_JS" file="resources\md_downloads\crisper.js" flattenhtml="true" type="BINDATA" /> - <include name="IDR_MD_DOWNLOADS_DOWNLOADS_JS" file="resources\md_downloads\downloads.js" type="BINDATA" /> - <include name="IDR_MD_DOWNLOADS_I18N_SETUP_HTML" file="resources\md_downloads\i18n_setup.html" type="BINDATA" /> - <include name="IDR_MD_DOWNLOADS_ITEM_CSS" file="resources\md_downloads\item.css" type="BINDATA" flattenhtml="true" /> - <include name="IDR_MD_DOWNLOADS_ITEM_HTML" file="resources\md_downloads\item.html" type="BINDATA" /> - <include name="IDR_MD_DOWNLOADS_ITEM_JS" file="resources\md_downloads\item.js" type="BINDATA" /> - <include name="IDR_MD_DOWNLOADS_MANAGER_CSS" file="resources\md_downloads\manager.css" type="BINDATA" flattenhtml="true" /> - <include name="IDR_MD_DOWNLOADS_MANAGER_HTML" file="resources\md_downloads\manager.html" type="BINDATA" /> - <include name="IDR_MD_DOWNLOADS_MANAGER_JS" file="resources\md_downloads\manager.js" type="BINDATA" /> - <include name="IDR_MD_DOWNLOADS_SHARED_STYLE_CSS" file="resources\md_downloads\shared_style.css" type="BINDATA" /> - <include name="IDR_MD_DOWNLOADS_TOOLBAR_CSS" file="resources\md_downloads\toolbar.css" type="BINDATA" /> - <include name="IDR_MD_DOWNLOADS_TOOLBAR_HTML" file="resources\md_downloads\toolbar.html" type="BINDATA" /> - <include name="IDR_MD_DOWNLOADS_TOOLBAR_JS" file="resources\md_downloads\toolbar.js" type="BINDATA" /> + <if expr="use_vulcanize"> + <then> + <include name="IDR_MD_DOWNLOADS_CRISPER_JS" file="resources\md_downloads\crisper.js" flattenhtml="true" type="BINDATA" /> + </then> + <else> + <include name="IDR_MD_DOWNLOADS_ACTION_SERVICE_HTML" file="resources\md_downloads\action_service.html" type="BINDATA" /> + <include name="IDR_MD_DOWNLOADS_ACTION_SERVICE_JS" file="resources\md_downloads\action_service.js" type="BINDATA" /> + <include name="IDR_MD_DOWNLOADS_CONSTANTS_HTML" file="resources\md_downloads\constants.html" type="BINDATA" /> + <include name="IDR_MD_DOWNLOADS_CONSTANTS_JS" file="resources\md_downloads\constants.js" type="BINDATA" /> + <include name="IDR_MD_DOWNLOADS_DOWNLOADS_JS" file="resources\md_downloads\downloads.js" type="BINDATA" /> + <include name="IDR_MD_DOWNLOADS_I18N_SETUP_HTML" file="resources\md_downloads\i18n_setup.html" type="BINDATA" /> + <include name="IDR_MD_DOWNLOADS_ITEM_CSS" file="resources\md_downloads\item.css" type="BINDATA" flattenhtml="true" /> + <include name="IDR_MD_DOWNLOADS_ITEM_HTML" file="resources\md_downloads\item.html" type="BINDATA" /> + <include name="IDR_MD_DOWNLOADS_ITEM_JS" file="resources\md_downloads\item.js" type="BINDATA" /> + <include name="IDR_MD_DOWNLOADS_MANAGER_CSS" file="resources\md_downloads\manager.css" type="BINDATA" flattenhtml="true" /> + <include name="IDR_MD_DOWNLOADS_MANAGER_HTML" file="resources\md_downloads\manager.html" type="BINDATA" /> + <include name="IDR_MD_DOWNLOADS_MANAGER_JS" file="resources\md_downloads\manager.js" type="BINDATA" /> + <include name="IDR_MD_DOWNLOADS_SHARED_STYLE_CSS" file="resources\md_downloads\shared_style.css" type="BINDATA" /> + <include name="IDR_MD_DOWNLOADS_TOOLBAR_CSS" file="resources\md_downloads\toolbar.css" type="BINDATA" /> + <include name="IDR_MD_DOWNLOADS_TOOLBAR_HTML" file="resources\md_downloads\toolbar.html" type="BINDATA" /> + <include name="IDR_MD_DOWNLOADS_TOOLBAR_JS" file="resources\md_downloads\toolbar.js" type="BINDATA" /> + </else> + </if> </if> <if expr="enable_extensions"> <include name="IDR_EXTENSION_COMMAND_LIST_JS" file="resources\extensions\extension_command_list.js" flattenhtml="true" type="BINDATA" /> @@ -281,6 +293,7 @@ <if expr="enable_print_preview"> <include name="IDR_PRINT_PREVIEW_HTML" file="resources\print_preview\print_preview.html" flattenhtml="true" allowexternalscript="true" type="BINDATA" /> <include name="IDR_PRINT_PREVIEW_JS" file="resources\print_preview\print_preview.js" flattenhtml="true" type="BINDATA" /> + <include name="IDR_PRINT_PREVIEW_PDF_PREVIEW_HTML" file="resources\print_preview\pdf_preview.html" flattenhtml="true" allowexternalscript="true" type="BINDATA" /> <include name="IDR_PRINT_PREVIEW_IMAGES_PRINTER" file="resources\print_preview\images\printer.png" type="BINDATA" /> <include name="IDR_PRINT_PREVIEW_IMAGES_PRINTER_SHARED"
diff --git a/chrome/browser/chrome_quota_permission_context.cc b/chrome/browser/chrome_quota_permission_context.cc index f90279d..95b3b02 100644 --- a/chrome/browser/chrome_quota_permission_context.cc +++ b/chrome/browser/chrome_quota_permission_context.cc
@@ -172,6 +172,7 @@ ~RequestQuotaInfoBarDelegate() override; // ConfirmInfoBarDelegate: + infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override; base::string16 GetMessageText() const override; bool Accept() override; bool Cancel() override; @@ -219,6 +220,11 @@ } } +infobars::InfoBarDelegate::InfoBarIdentifier +RequestQuotaInfoBarDelegate::GetIdentifier() const { + return REQUEST_QUOTA_INFOBAR_DELEGATE; +} + base::string16 RequestQuotaInfoBarDelegate::GetMessageText() const { // If the site requested larger quota than this threshold, show a different // message to the user.
diff --git a/chrome/browser/chromeos/accessibility/accessibility_manager.cc b/chrome/browser/chromeos/accessibility/accessibility_manager.cc index e6fe5f91..e18961c 100644 --- a/chrome/browser/chromeos/accessibility/accessibility_manager.cc +++ b/chrome/browser/chromeos/accessibility/accessibility_manager.cc
@@ -6,6 +6,7 @@ #include <stddef.h> #include <stdint.h> +#include <utility> #include "ash/audio/sounds.h" #include "ash/autoclick/autoclick_controller.h" @@ -1175,9 +1176,9 @@ extensions::events::ACCESSIBILITY_PRIVATE_ON_INTRODUCE_CHROME_VOX, extensions::api::accessibility_private::OnIntroduceChromeVox:: kEventName, - event_args.Pass())); + std::move(event_args))); event_router->DispatchEventWithLazyListener( - extension_misc::kChromeVoxExtensionId, event.Pass()); + extension_misc::kChromeVoxExtensionId, std::move(event)); } should_speak_chrome_vox_announcements_on_user_screen_ =
diff --git a/chrome/browser/chromeos/accessibility/spoken_feedback_event_rewriter.cc b/chrome/browser/chromeos/accessibility/spoken_feedback_event_rewriter.cc index f7421b4..f4a6105 100644 --- a/chrome/browser/chromeos/accessibility/spoken_feedback_event_rewriter.cc +++ b/chrome/browser/chromeos/accessibility/spoken_feedback_event_rewriter.cc
@@ -5,6 +5,7 @@ #include "chrome/browser/chromeos/accessibility/spoken_feedback_event_rewriter.h" #include <string> +#include <utility> #include "ash/shell.h" #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" @@ -107,7 +108,7 @@ void SpokenFeedbackEventRewriter::SetDelegateForTest( scoped_ptr<SpokenFeedbackEventRewriterDelegate> delegate) { - delegate_ = delegate.Pass(); + delegate_ = std::move(delegate); } ui::EventRewriteStatus SpokenFeedbackEventRewriter::RewriteEvent(
diff --git a/chrome/browser/chromeos/app_mode/fake_cws.cc b/chrome/browser/chromeos/app_mode/fake_cws.cc index 43474b5..e49396e 100644 --- a/chrome/browser/chromeos/app_mode/fake_cws.cc +++ b/chrome/browser/chromeos/app_mode/fake_cws.cc
@@ -4,6 +4,8 @@ #include "chrome/browser/chromeos/app_mode/fake_cws.h" +#include <utility> + #include "base/bind.h" #include "base/command_line.h" #include "base/files/file_util.h" @@ -200,7 +202,7 @@ http_response->set_code(net::HTTP_OK); http_response->set_content_type("text/xml"); http_response->set_content(update_check_content); - return http_response.Pass(); + return std::move(http_response); } } }
diff --git a/chrome/browser/chromeos/app_mode/kiosk_app_external_loader.cc b/chrome/browser/chromeos/app_mode/kiosk_app_external_loader.cc index fa977ac..684b67f 100644 --- a/chrome/browser/chromeos/app_mode/kiosk_app_external_loader.cc +++ b/chrome/browser/chromeos/app_mode/kiosk_app_external_loader.cc
@@ -4,6 +4,8 @@ #include "chrome/browser/chromeos/app_mode/kiosk_app_external_loader.h" +#include <utility> + #include "base/values.h" #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" @@ -17,7 +19,7 @@ void KioskAppExternalLoader::SetCurrentAppExtensions( scoped_ptr<base::DictionaryValue> prefs) { - prefs_ = prefs.Pass(); + prefs_ = std::move(prefs); StartLoading(); }
diff --git a/chrome/browser/chromeos/app_mode/kiosk_app_manager.cc b/chrome/browser/chromeos/app_mode/kiosk_app_manager.cc index 9da50402..495add5e 100644 --- a/chrome/browser/chromeos/app_mode/kiosk_app_manager.cc +++ b/chrome/browser/chromeos/app_mode/kiosk_app_manager.cc
@@ -5,9 +5,9 @@ #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" #include <stddef.h> - #include <map> #include <set> +#include <utility> #include "base/barrier_closure.h" #include "base/bind.h" @@ -505,7 +505,7 @@ scoped_ptr<base::DictionaryValue> prefs(new base::DictionaryValue); base::DictionaryValue* extension_copy = extension->DeepCopy(); prefs->Set(id, extension_copy); - external_loader_->SetCurrentAppExtensions(prefs.Pass()); + external_loader_->SetCurrentAppExtensions(std::move(prefs)); } else { LOG(ERROR) << "Can't find app in the cached externsions" << " id = " << id; @@ -523,9 +523,9 @@ extension_urls::GetWebstoreUpdateUrl().spec()); extension_entry->SetBoolean( extensions::ExternalProviderImpl::kIsFromWebstore, true); - prefs->Set(id, extension_entry.Pass()); + prefs->Set(id, std::move(extension_entry)); } - secondary_app_external_loader_->SetCurrentAppExtensions(prefs.Pass()); + secondary_app_external_loader_->SetCurrentAppExtensions(std::move(prefs)); } void KioskAppManager::UpdateExternalCache() { @@ -696,7 +696,7 @@ prefs->Set(apps_[i]->app_id(), entry.release()); } - external_cache_->UpdateExtensionsList(prefs.Pass()); + external_cache_->UpdateExtensionsList(std::move(prefs)); RetryFailedAppDataFetch();
diff --git a/chrome/browser/chromeos/app_mode/kiosk_diagnosis_runner.cc b/chrome/browser/chromeos/app_mode/kiosk_diagnosis_runner.cc index 384d1a2..0342e2d2 100644 --- a/chrome/browser/chromeos/app_mode/kiosk_diagnosis_runner.cc +++ b/chrome/browser/chromeos/app_mode/kiosk_diagnosis_runner.cc
@@ -4,6 +4,8 @@ #include "chrome/browser/chromeos/app_mode/kiosk_diagnosis_runner.h" +#include <utility> + #include "base/bind.h" #include "base/macros.h" #include "base/memory/singleton.h" @@ -108,7 +110,7 @@ it != sys_info.end(); ++it) { (*sys_logs.get())[it->get()->key] = it->get()->value; } - feedback_data->SetAndCompressSystemInfo(sys_logs.Pass()); + feedback_data->SetAndCompressSystemInfo(std::move(sys_logs)); extensions::FeedbackService* service = extensions::FeedbackPrivateAPI::GetFactoryInstance()
diff --git a/chrome/browser/chromeos/attestation/attestation_policy_observer.cc b/chrome/browser/chromeos/attestation/attestation_policy_observer.cc index 08decb5..e400fa8 100644 --- a/chrome/browser/chromeos/attestation/attestation_policy_observer.cc +++ b/chrome/browser/chromeos/attestation/attestation_policy_observer.cc
@@ -5,6 +5,7 @@ #include "chrome/browser/chromeos/attestation/attestation_policy_observer.h" #include <string> +#include <utility> #include "base/bind.h" #include "base/callback.h" @@ -156,9 +157,8 @@ if (!attestation_flow_) { scoped_ptr<ServerProxy> attestation_ca_client(new AttestationCAClient()); default_attestation_flow_.reset(new AttestationFlow( - cryptohome::AsyncMethodCaller::GetInstance(), - cryptohome_client_, - attestation_ca_client.Pass())); + cryptohome::AsyncMethodCaller::GetInstance(), cryptohome_client_, + std::move(attestation_ca_client))); attestation_flow_ = default_attestation_flow_.get(); }
diff --git a/chrome/browser/chromeos/attestation/platform_verification_flow.cc b/chrome/browser/chromeos/attestation/platform_verification_flow.cc index 4fda73640..a756de0 100644 --- a/chrome/browser/chromeos/attestation/platform_verification_flow.cc +++ b/chrome/browser/chromeos/attestation/platform_verification_flow.cc
@@ -4,6 +4,8 @@ #include "chrome/browser/chromeos/attestation/platform_verification_flow.h" +#include <utility> + #include "base/command_line.h" #include "base/logging.h" #include "base/macros.h" @@ -155,9 +157,7 @@ DCHECK_CURRENTLY_ON(content::BrowserThread::UI); scoped_ptr<ServerProxy> attestation_ca_client(new AttestationCAClient()); default_attestation_flow_.reset(new AttestationFlow( - async_caller_, - cryptohome_client_, - attestation_ca_client.Pass())); + async_caller_, cryptohome_client_, std::move(attestation_ca_client))); attestation_flow_ = default_attestation_flow_.get(); default_delegate_.reset(new DefaultDelegate()); delegate_ = default_delegate_.get();
diff --git a/chrome/browser/chromeos/attestation/platform_verification_impl.cc b/chrome/browser/chromeos/attestation/platform_verification_impl.cc index 89b098a9..67029ee3 100644 --- a/chrome/browser/chromeos/attestation/platform_verification_impl.cc +++ b/chrome/browser/chromeos/attestation/platform_verification_impl.cc
@@ -3,6 +3,9 @@ // found in the LICENSE file. #include "chrome/browser/chromeos/attestation/platform_verification_impl.h" + +#include <utility> + #include "content/public/browser/browser_thread.h" #include "content/public/browser/web_contents.h" @@ -20,13 +23,13 @@ DCHECK(render_frame_host); // The created object is strongly bound to (and owned by) the pipe. - new PlatformVerificationImpl(render_frame_host, request.Pass()); + new PlatformVerificationImpl(render_frame_host, std::move(request)); } PlatformVerificationImpl::PlatformVerificationImpl( content::RenderFrameHost* render_frame_host, mojo::InterfaceRequest<PlatformVerification> request) - : binding_(this, request.Pass()), + : binding_(this, std::move(request)), render_frame_host_(render_frame_host), weak_factory_(this) { DCHECK(render_frame_host);
diff --git a/chrome/browser/chromeos/base/locale_util.cc b/chrome/browser/chromeos/base/locale_util.cc index 1dfa962..1499049 100644 --- a/chrome/browser/chromeos/base/locale_util.cc +++ b/chrome/browser/chromeos/base/locale_util.cc
@@ -4,6 +4,7 @@ #include "chrome/browser/chromeos/base/locale_util.h" +#include <utility> #include <vector> #include "chrome/browser/browser_process.h" @@ -120,9 +121,8 @@ base::Closure reloader( base::Bind(&SwitchLanguageDoReloadLocale, base::Unretained(data.get()))); content::BrowserThread::PostBlockingPoolTaskAndReply( - FROM_HERE, - reloader, - base::Bind(&FinishSwitchLanguage, base::Passed(data.Pass()))); + FROM_HERE, reloader, + base::Bind(&FinishSwitchLanguage, base::Passed(std::move(data)))); } } // namespace locale_util
diff --git a/chrome/browser/chromeos/certificate_provider/certificate_provider_service.cc b/chrome/browser/chromeos/certificate_provider/certificate_provider_service.cc index a6038410..e6efa854 100644 --- a/chrome/browser/chromeos/certificate_provider/certificate_provider_service.cc +++ b/chrome/browser/chromeos/certificate_provider/certificate_provider_service.cc
@@ -5,6 +5,7 @@ #include "chrome/browser/chromeos/certificate_provider/certificate_provider_service.h" #include <stddef.h> +#include <utility> #include "base/bind.h" #include "base/bind_helpers.h" @@ -313,7 +314,7 @@ DCHECK(!delegate_); DCHECK(delegate); - delegate_ = delegate.Pass(); + delegate_ = std::move(delegate); cert_key_provider_.reset( new CertKeyProviderImpl(base::ThreadTaskRunnerHandle::Get(), weak_factory_.GetWeakPtr(), &certificate_map_));
diff --git a/chrome/browser/chromeos/certificate_provider/certificate_provider_service_factory.cc b/chrome/browser/chromeos/certificate_provider/certificate_provider_service_factory.cc index 73bbe095..ec0039b 100644 --- a/chrome/browser/chromeos/certificate_provider/certificate_provider_service_factory.cc +++ b/chrome/browser/chromeos/certificate_provider/certificate_provider_service_factory.cc
@@ -5,6 +5,7 @@ #include "chrome/browser/chromeos/certificate_provider/certificate_provider_service_factory.h" #include <string> +#include <utility> #include <vector> #include "base/logging.h" @@ -97,8 +98,8 @@ internal_args->AppendInteger(request_id); scoped_ptr<extensions::Event> event(new extensions::Event( extensions::events::CERTIFICATEPROVIDER_ON_CERTIFICATES_REQUESTED, - event_name, internal_args.Pass())); - event_router_->BroadcastEvent(event.Pass()); + event_name, std::move(internal_args))); + event_router_->BroadcastEvent(std::move(event)); } bool DefaultDelegate::DispatchSignRequestToExtension( @@ -140,13 +141,13 @@ scoped_ptr<base::ListValue> internal_args(new base::ListValue); internal_args->AppendInteger(request_id); - internal_args->Append(request.ToValue().Pass()); + internal_args->Append(request.ToValue()); event_router_->DispatchEventToExtension( extension_id, make_scoped_ptr(new extensions::Event( extensions::events::CERTIFICATEPROVIDER_ON_SIGN_DIGEST_REQUESTED, - event_name, internal_args.Pass()))); + event_name, std::move(internal_args)))); return true; }
diff --git a/chrome/browser/chromeos/certificate_provider/certificate_provider_service_unittest.cc b/chrome/browser/chromeos/certificate_provider/certificate_provider_service_unittest.cc index 4fb0c01..bec9790 100644 --- a/chrome/browser/chromeos/certificate_provider/certificate_provider_service_unittest.cc +++ b/chrome/browser/chromeos/certificate_provider/certificate_provider_service_unittest.cc
@@ -5,8 +5,8 @@ #include "chrome/browser/chromeos/certificate_provider/certificate_provider_service.h" #include <stdint.h> - #include <set> +#include <utility> #include "base/bind.h" #include "base/macros.h" @@ -139,7 +139,7 @@ cert_info2_(CreateCertInfo("client_2.pem")) { scoped_ptr<TestDelegate> test_delegate(new TestDelegate); test_delegate_ = test_delegate.get(); - service_->SetDelegate(test_delegate.Pass()); + service_->SetDelegate(std::move(test_delegate)); certificate_provider_ = service_->CreateCertificateProvider(); EXPECT_TRUE(certificate_provider_);
diff --git a/chrome/browser/chromeos/certificate_provider/certificate_requests.cc b/chrome/browser/chromeos/certificate_provider/certificate_requests.cc index 8804c2f..448a644 100644 --- a/chrome/browser/chromeos/certificate_provider/certificate_requests.cc +++ b/chrome/browser/chromeos/certificate_provider/certificate_requests.cc
@@ -5,6 +5,7 @@ #include "chrome/browser/chromeos/certificate_provider/certificate_requests.h" #include <set> +#include <utility> #include "base/bind.h" #include "base/callback.h" @@ -59,7 +60,7 @@ base::Bind(timeout_callback, request_id)); const auto insert_result = - requests_.insert(std::make_pair(request_id, state.Pass())); + requests_.insert(std::make_pair(request_id, std::move(state))); DCHECK(insert_result.second) << "request id already in use."; return request_id; }
diff --git a/chrome/browser/chromeos/chrome_browser_main_chromeos.cc b/chrome/browser/chromeos/chrome_browser_main_chromeos.cc index dbb7b66..71dc2fb 100644 --- a/chrome/browser/chromeos/chrome_browser_main_chromeos.cc +++ b/chrome/browser/chromeos/chrome_browser_main_chromeos.cc
@@ -5,8 +5,8 @@ #include "chrome/browser/chromeos/chrome_browser_main_chromeos.h" #include <stddef.h> - #include <string> +#include <utility> #include <vector> #include "ash/ash_switches.h" @@ -214,7 +214,7 @@ service_providers.push_back(new ScreenLockServiceProvider); service_providers.push_back(new ConsoleServiceProvider( make_scoped_ptr(new ChromeConsoleServiceProviderDelegate))); - CrosDBusService::Initialize(service_providers.Pass()); + CrosDBusService::Initialize(std::move(service_providers)); // Initialize PowerDataCollector after DBusThreadManager is initialized. PowerDataCollector::Initialize(); @@ -575,7 +575,7 @@ scoped_ptr<GuestLanguageSetCallbackData> data( new GuestLanguageSetCallbackData(profile)); locale_util::SwitchLanguageCallback callback(base::Bind( - &GuestLanguageSetCallbackData::Callback, base::Passed(data.Pass()))); + &GuestLanguageSetCallbackData::Callback, base::Passed(std::move(data)))); const user_manager::User* const user = ProfileHelper::Get()->GetUserByProfile(profile); UserSessionManager::GetInstance()->RespectLocalePreference(
diff --git a/chrome/browser/chromeos/customization/customization_document.cc b/chrome/browser/chromeos/customization/customization_document.cc index 6ca7285..b3261702 100644 --- a/chrome/browser/chromeos/customization/customization_document.cc +++ b/chrome/browser/chromeos/customization/customization_document.cc
@@ -5,6 +5,7 @@ #include "chrome/browser/chromeos/customization/customization_document.h" #include <algorithm> +#include <utility> #include "base/bind.h" #include "base/bind_helpers.h" @@ -713,11 +714,11 @@ entry->SetString(extensions::ExternalProviderImpl::kExternalUpdateUrl, extension_urls::GetWebstoreUpdateUrl().spec()); } - prefs->Set(app_id, entry.Pass()); + prefs->Set(app_id, std::move(entry)); } } - return prefs.Pass(); + return prefs; } void ServicesCustomizationDocument::UpdateCachedManifest(Profile* profile) { @@ -809,13 +810,10 @@ } wallpaper_downloader_.reset(new CustomizationWallpaperDownloader( - g_browser_process->system_request_context(), - wallpaper_url, - dir, - file, + g_browser_process->system_request_context(), wallpaper_url, dir, file, base::Bind(&ServicesCustomizationDocument::OnOEMWallpaperDownloaded, weak_ptr_factory_.GetWeakPtr(), - base::Passed(applying.Pass())))); + base::Passed(std::move(applying))))); wallpaper_downloader_->Start(); } @@ -860,11 +858,10 @@ base::Bind(&CheckWallpaperCacheExists, GetCustomizedWallpaperDownloadedFileName(), base::Unretained(exists.get())); - base::Closure on_checked_closure = - base::Bind(&ServicesCustomizationDocument::OnCheckedWallpaperCacheExists, - weak_ptr_factory_.GetWeakPtr(), - base::Passed(exists.Pass()), - base::Passed(applying.Pass())); + base::Closure on_checked_closure = base::Bind( + &ServicesCustomizationDocument::OnCheckedWallpaperCacheExists, + weak_ptr_factory_.GetWeakPtr(), base::Passed(std::move(exists)), + base::Passed(std::move(applying))); if (!content::BrowserThread::PostBlockingPoolTaskAndReply( FROM_HERE, check_file_exists, on_checked_closure)) { LOG(WARNING) << "Failed to start check Wallpaper cache exists."; @@ -878,7 +875,7 @@ DCHECK(exists); DCHECK(applying); - ApplyWallpaper(*exists, applying.Pass()); + ApplyWallpaper(*exists, std::move(applying)); } void ServicesCustomizationDocument::ApplyWallpaper( @@ -919,11 +916,11 @@ if (GURL(current_url).is_valid() && default_wallpaper_file_exists) { VLOG(1) << "ServicesCustomizationDocument::ApplyWallpaper() : reuse existing"; - OnOEMWallpaperDownloaded(applying.Pass(), true, GURL(current_url)); + OnOEMWallpaperDownloaded(std::move(applying), true, GURL(current_url)); } else { VLOG(1) << "ServicesCustomizationDocument::ApplyWallpaper() : start download"; - StartOEMWallpaperDownload(wallpaper_url, applying.Pass()); + StartOEMWallpaperDownload(wallpaper_url, std::move(applying)); } }
diff --git a/chrome/browser/chromeos/customization/customization_document_unittest.cc b/chrome/browser/chromeos/customization/customization_document_unittest.cc index 4de5800..a1d7356 100644 --- a/chrome/browser/chromeos/customization/customization_document_unittest.cc +++ b/chrome/browser/chromeos/customization/customization_document_unittest.cc
@@ -4,6 +4,8 @@ #include "chrome/browser/chromeos/customization/customization_document.h" +#include <utility> + #include "base/message_loop/message_loop.h" #include "base/prefs/testing_pref_service.h" #include "base/run_loop.h" @@ -164,7 +166,7 @@ scoped_ptr<net::FakeURLFetcher> fetcher( new net::FakeURLFetcher(url, d, response_data, response_code, status)); OnRequestCreate(url, fetcher.get()); - return fetcher.Pass(); + return fetcher; } MOCK_METHOD2(OnRequestCreate, void(const GURL&, net::FakeURLFetcher*)); @@ -287,7 +289,7 @@ scoped_ptr<syncable_prefs::PrefServiceSyncable> prefs( factory.CreateSyncable(registry.get())); chrome::RegisterUserProfilePrefs(registry.get()); - profile_builder.SetPrefService(prefs.Pass()); + profile_builder.SetPrefService(std::move(prefs)); return profile_builder.Build(); }
diff --git a/chrome/browser/chromeos/customization/customization_wallpaper_downloader.cc b/chrome/browser/chromeos/customization/customization_wallpaper_downloader.cc index 08537c6..4ec2ff2 100644 --- a/chrome/browser/chromeos/customization/customization_wallpaper_downloader.cc +++ b/chrome/browser/chromeos/customization/customization_wallpaper_downloader.cc
@@ -6,6 +6,7 @@ #include <math.h> #include <algorithm> +#include <utility> #include "base/files/file_util.h" #include "content/public/browser/browser_thread.h" @@ -127,8 +128,7 @@ base::Unretained(success.get())); base::Closure on_created_closure = base::Bind(&CustomizationWallpaperDownloader::OnWallpaperDirectoryCreated, - weak_factory_.GetWeakPtr(), - base::Passed(success.Pass())); + weak_factory_.GetWeakPtr(), base::Passed(std::move(success))); if (!content::BrowserThread::PostBlockingPoolTaskAndReply( FROM_HERE, mkdir_closure, on_created_closure)) { LOG(WARNING) << "Failed to start Customized Wallpaper download."; @@ -176,8 +176,7 @@ base::Unretained(success.get())); base::Closure on_rename_closure = base::Bind(&CustomizationWallpaperDownloader::OnTemporaryFileRenamed, - weak_factory_.GetWeakPtr(), - base::Passed(success.Pass())); + weak_factory_.GetWeakPtr(), base::Passed(std::move(success))); if (!content::BrowserThread::PostBlockingPoolTaskAndReply( FROM_HERE, rename_closure, on_rename_closure)) { LOG(WARNING)
diff --git a/chrome/browser/chromeos/customization/customization_wallpaper_downloader_browsertest.cc b/chrome/browser/chromeos/customization/customization_wallpaper_downloader_browsertest.cc index 62b4d5f..04f72c7 100644 --- a/chrome/browser/chromeos/customization/customization_wallpaper_downloader_browsertest.cc +++ b/chrome/browser/chromeos/customization/customization_wallpaper_downloader_browsertest.cc
@@ -140,7 +140,7 @@ new net::HttpResponseHeaders(std::string()); download_headers->AddHeader("Content-Type: image/jpeg"); fetcher->set_response_headers(download_headers); - return fetcher.Pass(); + return fetcher; } void Initialize(net::FakeURLFetcherFactory* factory) {
diff --git a/chrome/browser/chromeos/display/display_preferences_unittest.cc b/chrome/browser/chromeos/display/display_preferences_unittest.cc index 4d7f5cb7..1c93b18 100644 --- a/chrome/browser/chromeos/display/display_preferences_unittest.cc +++ b/chrome/browser/chromeos/display/display_preferences_unittest.cc
@@ -5,8 +5,8 @@ #include "chrome/browser/chromeos/display/display_preferences.h" #include <stdint.h> - #include <string> +#include <utility> #include <vector> #include "ash/display/display_layout_store.h" @@ -137,7 +137,7 @@ pref_data->Get(name, &layout_value); if (layout_value) static_cast<base::DictionaryValue*>(layout_value) - ->Set(key, value.Pass()); + ->Set(key, std::move(value)); } else { scoped_ptr<base::DictionaryValue> layout_value( new base::DictionaryValue());
diff --git a/chrome/browser/chromeos/drive/debug_info_collector.cc b/chrome/browser/chromeos/drive/debug_info_collector.cc index cf50912b..81221f7d 100644 --- a/chrome/browser/chromeos/drive/debug_info_collector.cc +++ b/chrome/browser/chromeos/drive/debug_info_collector.cc
@@ -4,6 +4,8 @@ #include "chrome/browser/chromeos/drive/debug_info_collector.h" +#include <utility> + #include "base/callback.h" #include "base/logging.h" #include "google_apis/drive/task_util.h" @@ -32,7 +34,7 @@ DCHECK(!callback.is_null()); if (error != FILE_ERROR_OK) entry.reset(); - callback.Run(error, entry.Pass()); + callback.Run(error, std::move(entry)); } // Runs the callback with arguments. @@ -43,7 +45,7 @@ DCHECK(!callback.is_null()); if (error != FILE_ERROR_OK) entries.reset(); - callback.Run(error, entries.Pass()); + callback.Run(error, std::move(entries)); } } // namespace
diff --git a/chrome/browser/chromeos/drive/drive_file_stream_reader.cc b/chrome/browser/chromeos/drive/drive_file_stream_reader.cc index 317ce4d..e1be50b 100644 --- a/chrome/browser/chromeos/drive/drive_file_stream_reader.cc +++ b/chrome/browser/chromeos/drive/drive_file_stream_reader.cc
@@ -5,9 +5,9 @@ #include "chrome/browser/chromeos/drive/drive_file_stream_reader.h" #include <stddef.h> - #include <algorithm> #include <cstring> +#include <utility> #include "base/callback_helpers.h" #include "base/logging.h" @@ -98,7 +98,7 @@ LocalReaderProxy::LocalReaderProxy( scoped_ptr<util::LocalFileReader> file_reader, int64_t length) - : file_reader_(file_reader.Pass()), + : file_reader_(std::move(file_reader)), remaining_length_(length), weak_ptr_factory_(this) { DCHECK(file_reader_); @@ -419,7 +419,7 @@ new internal::NetworkReaderProxy( range_start, range_length, entry->file_info().size(), cancel_download_closure_)); - callback.Run(net::OK, entry.Pass()); + callback.Run(net::OK, std::move(entry)); return; } @@ -453,8 +453,8 @@ } reader_proxy_.reset( - new internal::LocalReaderProxy(file_reader.Pass(), length)); - callback.Run(net::OK, entry.Pass()); + new internal::LocalReaderProxy(std::move(file_reader), length)); + callback.Run(net::OK, std::move(entry)); } void DriveFileStreamReader::OnGetContent( @@ -462,7 +462,7 @@ scoped_ptr<std::string> data) { DCHECK(thread_checker_.CalledOnValidThread()); DCHECK(reader_proxy_); - reader_proxy_->OnGetContent(data.Pass()); + reader_proxy_->OnGetContent(std::move(data)); } void DriveFileStreamReader::OnGetFileContentCompletion(
diff --git a/chrome/browser/chromeos/drive/drive_file_stream_reader_unittest.cc b/chrome/browser/chromeos/drive/drive_file_stream_reader_unittest.cc index 4126cfb38..36751a0 100644 --- a/chrome/browser/chromeos/drive/drive_file_stream_reader_unittest.cc +++ b/chrome/browser/chromeos/drive/drive_file_stream_reader_unittest.cc
@@ -6,8 +6,8 @@ #include <stddef.h> #include <stdint.h> - #include <string> +#include <utility> #include "base/bind.h" #include "base/files/file_path.h" @@ -75,7 +75,7 @@ ASSERT_EQ(net::OK, callback.WaitForResult()); // Test instance. - LocalReaderProxy proxy(file_reader.Pass(), file_content_.size()); + LocalReaderProxy proxy(std::move(file_reader), file_content_.size()); // Make sure the read content is as same as the file. std::string content; @@ -96,7 +96,7 @@ ASSERT_EQ(net::OK, callback.WaitForResult()); // Test instance. - LocalReaderProxy proxy(file_reader.Pass(), expected_content.size()); + LocalReaderProxy proxy(std::move(file_reader), expected_content.size()); // Make sure the read content is as same as the file. std::string content; @@ -141,7 +141,7 @@ // And when the data is supplied, the callback will be called. scoped_ptr<std::string> data(new std::string("abcde")); - proxy.OnGetContent(data.Pass()); + proxy.OnGetContent(std::move(data)); // The returned data should be fit to the buffer size. result = callback.GetResult(result); @@ -155,9 +155,9 @@ // Supply the data before calling Read operation. data.reset(new std::string("fg")); - proxy.OnGetContent(data.Pass()); + proxy.OnGetContent(std::move(data)); data.reset(new std::string("hij")); - proxy.OnGetContent(data.Pass()); // Now 10 bytes are supplied. + proxy.OnGetContent(std::move(data)); // Now 10 bytes are supplied. // The data should be concatenated if possible. result = proxy.Read(buffer.get(), kBufferSize, callback.callback()); @@ -191,11 +191,11 @@ // And when the data is supplied, the callback will be called. scoped_ptr<std::string> data(new std::string("abcde")); - proxy.OnGetContent(data.Pass()); + proxy.OnGetContent(std::move(data)); data.reset(new std::string("fgh")); - proxy.OnGetContent(data.Pass()); + proxy.OnGetContent(std::move(data)); data.reset(new std::string("ijklmno")); - proxy.OnGetContent(data.Pass()); + proxy.OnGetContent(std::move(data)); // The returned data should be fit to the buffer size. result = callback.GetResult(result); @@ -209,9 +209,9 @@ // Supply the data before calling Read operation. data.reset(new std::string("pqrs")); - proxy.OnGetContent(data.Pass()); + proxy.OnGetContent(std::move(data)); data.reset(new std::string("tuvwxyz")); - proxy.OnGetContent(data.Pass()); // 't' is the 20-th byte. + proxy.OnGetContent(std::move(data)); // 't' is the 20-th byte. // The data should be concatenated if possible. result = proxy.Read(buffer.get(), kBufferSize, callback.callback()); @@ -257,7 +257,7 @@ // Supply the data before an error. scoped_ptr<std::string> data(new std::string("abcde")); - proxy.OnGetContent(data.Pass()); + proxy.OnGetContent(std::move(data)); // Emulate that an error is found. proxy.OnCompleted(FILE_ERROR_FAILED);
diff --git a/chrome/browser/chromeos/drive/file_task_executor.cc b/chrome/browser/chromeos/drive/file_task_executor.cc index cfeb681..d9a813f 100644 --- a/chrome/browser/chromeos/drive/file_task_executor.cc +++ b/chrome/browser/chromeos/drive/file_task_executor.cc
@@ -5,8 +5,8 @@ #include "chrome/browser/chromeos/drive/file_task_executor.h" #include <stddef.h> - #include <string> +#include <utility> #include <vector> #include "chrome/browser/chromeos/drive/drive_integration_service.h" @@ -70,11 +70,10 @@ FileTaskExecutor::FileTaskExecutor( scoped_ptr<FileTaskExecutorDelegate> delegate, const std::string& app_id) - : delegate_(delegate.Pass()), - app_id_(app_id), - current_index_(0), - weak_ptr_factory_(this) { -} + : delegate_(std::move(delegate)), + app_id_(app_id), + current_index_(0), + weak_ptr_factory_(this) {} FileTaskExecutor::~FileTaskExecutor() { }
diff --git a/chrome/browser/chromeos/drive/fileapi/async_file_util.cc b/chrome/browser/chromeos/drive/fileapi/async_file_util.cc index 958cb4d..04bc7c9 100644 --- a/chrome/browser/chromeos/drive/fileapi/async_file_util.cc +++ b/chrome/browser/chromeos/drive/fileapi/async_file_util.cc
@@ -4,6 +4,8 @@ #include "chrome/browser/chromeos/drive/fileapi/async_file_util.h" +#include <utility> + #include "base/callback.h" #include "base/files/file_path.h" #include "base/logging.h" @@ -75,7 +77,7 @@ // It will be provided as a FileSystem::OpenFileCallback's argument later. // (crbug.com/259184). callback.Run( - file.Pass(), + std::move(file), base::Bind(&google_apis::RunTaskWithTaskRunner, BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), close_callback_on_ui_thread));
diff --git a/chrome/browser/chromeos/drive/fileapi/fileapi_worker.cc b/chrome/browser/chromeos/drive/fileapi/fileapi_worker.cc index d0f85fa1..c2ae8c6 100644 --- a/chrome/browser/chromeos/drive/fileapi/fileapi_worker.cc +++ b/chrome/browser/chromeos/drive/fileapi/fileapi_worker.cc
@@ -5,6 +5,7 @@ #include "chrome/browser/chromeos/drive/fileapi/fileapi_worker.h" #include <stddef.h> +#include <utility> #include "base/files/file_path.h" #include "base/logging.h" @@ -148,7 +149,7 @@ void RunOpenFileCallback(const OpenFileCallback& callback, const base::Closure& close_callback, base::File file) { - callback.Run(file.Pass(), close_callback); + callback.Run(std::move(file), close_callback); } base::File OpenFile(const base::FilePath& path, int flags) {
diff --git a/chrome/browser/chromeos/extensions/accessibility_features_apitest.cc b/chrome/browser/chromeos/extensions/accessibility_features_apitest.cc index 4b3a11f2..30f0451 100644 --- a/chrome/browser/chromeos/extensions/accessibility_features_apitest.cc +++ b/chrome/browser/chromeos/extensions/accessibility_features_apitest.cc
@@ -69,7 +69,7 @@ bool ShouldModifyingFeatureSucceed() const { return GetParam(); } // Returns preference path for accessibility features as defined by the API. - const char* const GetPrefForFeature(const std::string& feature) { + const char* GetPrefForFeature(const std::string& feature) { if (feature == "spokenFeedback") return prefs::kAccessibilitySpokenFeedbackEnabled; if (feature == "largeCursor")
diff --git a/chrome/browser/chromeos/extensions/default_app_order.cc b/chrome/browser/chromeos/extensions/default_app_order.cc index f1b7121..69bb7e1b 100644 --- a/chrome/browser/chromeos/extensions/default_app_order.cc +++ b/chrome/browser/chromeos/extensions/default_app_order.cc
@@ -4,6 +4,8 @@ #include "chrome/browser/chromeos/extensions/default_app_order.h" +#include <utility> + #include "base/bind.h" #include "base/bind_helpers.h" #include "base/files/file_path.h" @@ -74,7 +76,7 @@ } scoped_ptr<base::ListValue> ordinal_list_value = - base::ListValue::From(value.Pass()); + base::ListValue::From(std::move(value)); if (!ordinal_list_value) LOG(WARNING) << "Expect a JSON list in file " << path.value();
diff --git a/chrome/browser/chromeos/extensions/device_local_account_external_policy_loader.cc b/chrome/browser/chromeos/extensions/device_local_account_external_policy_loader.cc index 73b78e40..eb8497d63 100644 --- a/chrome/browser/chromeos/extensions/device_local_account_external_policy_loader.cc +++ b/chrome/browser/chromeos/extensions/device_local_account_external_policy_loader.cc
@@ -4,6 +4,8 @@ #include "chrome/browser/chromeos/extensions/device_local_account_external_policy_loader.h" +#include <utility> + #include "base/callback.h" #include "base/logging.h" #include "base/prefs/pref_value_map.h" @@ -108,7 +110,7 @@ } } - external_cache_->UpdateExtensionsList(prefs.Pass()); + external_cache_->UpdateExtensionsList(std::move(prefs)); } } // namespace chromeos
diff --git a/chrome/browser/chromeos/extensions/dictionary_event_router.cc b/chrome/browser/chromeos/extensions/dictionary_event_router.cc index 8ca8b9ca..7630ed52 100644 --- a/chrome/browser/chromeos/extensions/dictionary_event_router.cc +++ b/chrome/browser/chromeos/extensions/dictionary_event_router.cc
@@ -5,6 +5,7 @@ #include "chrome/browser/chromeos/extensions/dictionary_event_router.h" #include <string> +#include <utility> #include "base/json/json_writer.h" #include "base/values.h" @@ -47,9 +48,9 @@ // The router will only send the event to extensions that are listening. scoped_ptr<extensions::Event> event(new extensions::Event( extensions::events::INPUT_METHOD_PRIVATE_ON_DICTIONARY_LOADED, - extensions::InputMethodAPI::kOnDictionaryLoaded, args.Pass())); + extensions::InputMethodAPI::kOnDictionaryLoaded, std::move(args))); event->restrict_to_browser_context = context_; - router->BroadcastEvent(event.Pass()); + router->BroadcastEvent(std::move(event)); } void ExtensionDictionaryEventRouter::OnCustomDictionaryLoaded() { @@ -81,9 +82,9 @@ // The router will only send the event to extensions that are listening. scoped_ptr<extensions::Event> event(new extensions::Event( extensions::events::INPUT_METHOD_PRIVATE_ON_DICTIONARY_CHANGED, - extensions::InputMethodAPI::kOnDictionaryChanged, args.Pass())); + extensions::InputMethodAPI::kOnDictionaryChanged, std::move(args))); event->restrict_to_browser_context = context_; - router->BroadcastEvent(event.Pass()); + router->BroadcastEvent(std::move(event)); } } // namespace chromeos
diff --git a/chrome/browser/chromeos/extensions/echo_private_api.cc b/chrome/browser/chromeos/extensions/echo_private_api.cc index cec7110a..2b18a30 100644 --- a/chrome/browser/chromeos/extensions/echo_private_api.cc +++ b/chrome/browser/chromeos/extensions/echo_private_api.cc
@@ -5,6 +5,7 @@ #include "chrome/browser/chromeos/extensions/echo_private_api.h" #include <string> +#include <utility> #include "base/bind.h" #include "base/files/file_util.h" @@ -103,7 +104,7 @@ PrefService* local_state = g_browser_process->local_state(); DictionaryPrefUpdate offer_update(local_state, prefs::kEchoCheckedOffers); - offer_update->SetWithoutPathExpansion("echo." + service_id, dict.Pass()); + offer_update->SetWithoutPathExpansion("echo." + service_id, std::move(dict)); return true; }
diff --git a/chrome/browser/chromeos/extensions/external_cache.cc b/chrome/browser/chromeos/extensions/external_cache.cc index 714dd6b..fe3abf6 100644 --- a/chrome/browser/chromeos/extensions/external_cache.cc +++ b/chrome/browser/chromeos/extensions/external_cache.cc
@@ -5,6 +5,7 @@ #include "chrome/browser/chromeos/extensions/external_cache.h" #include <stddef.h> +#include <utility> #include "base/bind.h" #include "base/bind_helpers.h" @@ -70,7 +71,7 @@ void ExternalCache::UpdateExtensionsList( scoped_ptr<base::DictionaryValue> prefs) { - extensions_ = prefs.Pass(); + extensions_ = std::move(prefs); if (extensions_->empty()) { // If list of know extensions is empty, don't init cache on disk. It is
diff --git a/chrome/browser/chromeos/extensions/external_cache_unittest.cc b/chrome/browser/chromeos/extensions/external_cache_unittest.cc index ac5e54fb..5b31a83 100644 --- a/chrome/browser/chromeos/extensions/external_cache_unittest.cc +++ b/chrome/browser/chromeos/extensions/external_cache_unittest.cc
@@ -7,6 +7,7 @@ #include <map> #include <set> #include <string> +#include <utility> #include "base/files/file_path.h" #include "base/files/file_util.h" @@ -170,7 +171,7 @@ CreateExtensionFile(cache_dir, kTestExtensionId3, "3"); prefs->Set(kTestExtensionId4, CreateEntryWithUpdateUrl(false)); - external_cache.UpdateExtensionsList(prefs.Pass()); + external_cache.UpdateExtensionsList(std::move(prefs)); WaitForCompletion(); ASSERT_TRUE(provided_prefs()); @@ -289,7 +290,7 @@ AddInstalledExtension(kTestExtensionId1, "1"); - external_cache.UpdateExtensionsList(prefs.Pass()); + external_cache.UpdateExtensionsList(std::move(prefs)); WaitForCompletion(); ASSERT_TRUE(provided_prefs());
diff --git a/chrome/browser/chromeos/extensions/file_manager/event_router.cc b/chrome/browser/chromeos/extensions/file_manager/event_router.cc index c4ea0fe..49fd5b6 100644 --- a/chrome/browser/chromeos/extensions/file_manager/event_router.cc +++ b/chrome/browser/chromeos/extensions/file_manager/event_router.cc
@@ -5,6 +5,7 @@ #include "chrome/browser/chromeos/extensions/file_manager/event_router.h" #include <stddef.h> +#include <utility> #include "base/bind.h" #include "base/command_line.h" @@ -101,8 +102,9 @@ extensions::events::HistogramValue histogram_value, const std::string& event_name, scoped_ptr<base::ListValue> event_args) { - extensions::EventRouter::Get(profile)->BroadcastEvent(make_scoped_ptr( - new extensions::Event(histogram_value, event_name, event_args.Pass()))); + extensions::EventRouter::Get(profile) + ->BroadcastEvent(make_scoped_ptr(new extensions::Event( + histogram_value, event_name, std::move(event_args)))); } // Sends an event named |event_name| with arguments |event_args| to an extension @@ -115,7 +117,7 @@ scoped_ptr<base::ListValue> event_args) { extensions::EventRouter::Get(profile)->DispatchEventToExtension( extension_id, make_scoped_ptr(new extensions::Event( - histogram_value, event_name, event_args.Pass()))); + histogram_value, event_name, std::move(event_args)))); } file_manager_private::MountCompletedStatus @@ -357,8 +359,9 @@ extensions::events::HistogramValue histogram_value, const std::string& event_name, scoped_ptr<base::ListValue> event_args) override { - ::file_manager::DispatchEventToExtension( - profile_, extension_id, histogram_value, event_name, event_args.Pass()); + ::file_manager::DispatchEventToExtension(profile_, extension_id, + histogram_value, event_name, + std::move(event_args)); } private:
diff --git a/chrome/browser/chromeos/extensions/file_manager/file_stream_md5_digester.cc b/chrome/browser/chromeos/extensions/file_manager/file_stream_md5_digester.cc index 62b84e92..4d65523 100644 --- a/chrome/browser/chromeos/extensions/file_manager/file_stream_md5_digester.cc +++ b/chrome/browser/chromeos/extensions/file_manager/file_stream_md5_digester.cc
@@ -4,6 +4,8 @@ #include "chrome/browser/chromeos/extensions/file_manager/file_stream_md5_digester.h" +#include <utility> + #include "base/callback.h" #include "net/base/net_errors.h" #include "storage/browser/fileapi/file_stream_reader.h" @@ -25,7 +27,7 @@ void FileStreamMd5Digester::GetMd5Digest( scoped_ptr<storage::FileStreamReader> stream_reader, const ResultCallback& callback) { - reader_ = stream_reader.Pass(); + reader_ = std::move(stream_reader); base::MD5Init(&md5_context_); // Start the read/hash.
diff --git a/chrome/browser/chromeos/extensions/file_manager/private_api_drive.cc b/chrome/browser/chromeos/extensions/file_manager/private_api_drive.cc index 7f2f1d70..feacc46 100644 --- a/chrome/browser/chromeos/extensions/file_manager/private_api_drive.cc +++ b/chrome/browser/chromeos/extensions/file_manager/private_api_drive.cc
@@ -6,6 +6,7 @@ #include <map> #include <set> +#include <utility> #include "base/command_line.h" #include "chrome/browser/browser_process.h" @@ -369,7 +370,8 @@ DCHECK_CURRENTLY_ON(BrowserThread::UI); DCHECK(!callback_.is_null()); - callback_.Run(properties_.Pass(), drive::FileErrorToBaseFileError(error)); + callback_.Run(std::move(properties_), + drive::FileErrorToBaseFileError(error)); BrowserThread::DeleteSoon(BrowserThread::UI, FROM_HERE, this); } @@ -503,7 +505,7 @@ DCHECK_CURRENTLY_ON(BrowserThread::UI); DCHECK(!callback_.is_null()); - callback_.Run(properties_.Pass(), result); + callback_.Run(std::move(properties_), result); BrowserThread::DeleteSoon(BrowserThread::UI, FROM_HERE, this); }
diff --git a/chrome/browser/chromeos/extensions/file_manager/private_api_misc.cc b/chrome/browser/chromeos/extensions/file_manager/private_api_misc.cc index 7ed0859..2bf13ab 100644 --- a/chrome/browser/chromeos/extensions/file_manager/private_api_misc.cc +++ b/chrome/browser/chromeos/extensions/file_manager/private_api_misc.cc
@@ -516,7 +516,7 @@ return RespondNow(ArgumentList( api::file_manager_private::GetProvidingExtensions::Results::Create( - providing_extensions).Pass())); + providing_extensions))); } FileManagerPrivateAddProvidedFileSystemFunction::
diff --git a/chrome/browser/chromeos/extensions/file_manager/private_api_util.cc b/chrome/browser/chromeos/extensions/file_manager/private_api_util.cc index 74354fc..eb81bec 100644 --- a/chrome/browser/chromeos/extensions/file_manager/private_api_util.cc +++ b/chrome/browser/chromeos/extensions/file_manager/private_api_util.cc
@@ -5,8 +5,8 @@ #include "chrome/browser/chromeos/extensions/file_manager/private_api_util.h" #include <stddef.h> - #include <string> +#include <utility> #include "base/files/file_path.h" #include "base/macros.h" @@ -162,7 +162,7 @@ const int index = params->selected_files.size(); const base::FilePath& file_path = params->file_paths[index]; params->selected_files.push_back(ui::SelectedFileInfo(file_path, local_path)); - GetSelectedFileInfoInternal(profile, params.Pass()); + GetSelectedFileInfoInternal(profile, std::move(params)); } } // namespace
diff --git a/chrome/browser/chromeos/extensions/file_system_provider/file_system_provider_api.cc b/chrome/browser/chromeos/extensions/file_system_provider/file_system_provider_api.cc index 402fd65..ddd681e 100644 --- a/chrome/browser/chromeos/extensions/file_system_provider/file_system_provider_api.cc +++ b/chrome/browser/chromeos/extensions/file_system_provider/file_system_provider_api.cc
@@ -5,6 +5,7 @@ #include "chrome/browser/chromeos/extensions/file_system_provider/file_system_provider_api.h" #include <string> +#include <utility> #include <vector> #include "base/memory/linked_ptr.h" @@ -283,8 +284,9 @@ scoped_ptr<Params> params(Params::Create(*args_)); EXTENSION_FUNCTION_VALIDATE(params); - return FulfillRequest(RequestValue::CreateForUnmountSuccess(params.Pass()), - false /* has_more */); + return FulfillRequest( + RequestValue::CreateForUnmountSuccess(std::move(params)), + false /* has_more */); } bool @@ -294,7 +296,7 @@ EXTENSION_FUNCTION_VALIDATE(params); return FulfillRequest( - RequestValue::CreateForGetMetadataSuccess(params.Pass()), + RequestValue::CreateForGetMetadataSuccess(std::move(params)), false /* has_more */); } @@ -304,8 +306,9 @@ scoped_ptr<Params> params(Params::Create(*args_)); EXTENSION_FUNCTION_VALIDATE(params); - return FulfillRequest(RequestValue::CreateForGetActionsSuccess(params.Pass()), - false /* has_more */); + return FulfillRequest( + RequestValue::CreateForGetActionsSuccess(std::move(params)), + false /* has_more */); } bool FileSystemProviderInternalReadDirectoryRequestedSuccessFunction:: @@ -317,7 +320,7 @@ const bool has_more = params->has_more; return FulfillRequest( - RequestValue::CreateForReadDirectorySuccess(params.Pass()), has_more); + RequestValue::CreateForReadDirectorySuccess(std::move(params)), has_more); } bool @@ -329,8 +332,8 @@ EXTENSION_FUNCTION_VALIDATE(params); const bool has_more = params->has_more; - return FulfillRequest(RequestValue::CreateForReadFileSuccess(params.Pass()), - has_more); + return FulfillRequest( + RequestValue::CreateForReadFileSuccess(std::move(params)), has_more); } bool @@ -341,7 +344,7 @@ return FulfillRequest( scoped_ptr<RequestValue>( - RequestValue::CreateForOperationSuccess(params.Pass())), + RequestValue::CreateForOperationSuccess(std::move(params))), false /* has_more */); } @@ -351,7 +354,7 @@ EXTENSION_FUNCTION_VALIDATE(params); const base::File::Error error = ProviderErrorToFileError(params->error); - return RejectRequest(RequestValue::CreateForOperationError(params.Pass()), + return RejectRequest(RequestValue::CreateForOperationError(std::move(params)), error); }
diff --git a/chrome/browser/chromeos/extensions/file_system_provider/file_system_provider_apitest.cc b/chrome/browser/chromeos/extensions/file_system_provider/file_system_provider_apitest.cc index 76879e1..d2be6b0 100644 --- a/chrome/browser/chromeos/extensions/file_system_provider/file_system_provider_apitest.cc +++ b/chrome/browser/chromeos/extensions/file_system_provider/file_system_provider_apitest.cc
@@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include <utility> + #include "base/files/file.h" #include "base/macros.h" #include "base/memory/scoped_ptr.h" @@ -99,7 +101,7 @@ new NotificationButtonClicker(file_system->GetFileSystemInfo())); file_system->GetRequestManager()->AddObserver(clicker.get()); - clickers_.push_back(clicker.Pass()); + clickers_.push_back(std::move(clicker)); } void OnProvidedFileSystemUnmount(
diff --git a/chrome/browser/chromeos/extensions/file_system_provider/provider_function.cc b/chrome/browser/chromeos/extensions/file_system_provider/provider_function.cc index 3ad1db8c..2c7b5d4 100644 --- a/chrome/browser/chromeos/extensions/file_system_provider/provider_function.cc +++ b/chrome/browser/chromeos/extensions/file_system_provider/provider_function.cc
@@ -2,8 +2,9 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chrome/browser/chromeos/extensions/file_system_provider/file_system_provider_api.h" +#include <utility> +#include "chrome/browser/chromeos/extensions/file_system_provider/file_system_provider_api.h" #include "chrome/browser/chromeos/file_system_provider/provided_file_system_interface.h" #include "chrome/browser/chromeos/file_system_provider/request_manager.h" #include "chrome/browser/chromeos/file_system_provider/request_value.h" @@ -127,7 +128,7 @@ scoped_ptr<chromeos::file_system_provider::RequestValue> value, base::File::Error error) { const base::File::Error result = - request_manager_->RejectRequest(request_id_, value.Pass(), error); + request_manager_->RejectRequest(request_id_, std::move(value), error); if (result != base::File::FILE_OK) { SetError(FileErrorToString(result)); return false; @@ -140,7 +141,7 @@ scoped_ptr<RequestValue> value, bool has_more) { const base::File::Error result = - request_manager_->FulfillRequest(request_id_, value.Pass(), has_more); + request_manager_->FulfillRequest(request_id_, std::move(value), has_more); if (result != base::File::FILE_OK) { SetError(FileErrorToString(result)); return false;
diff --git a/chrome/browser/chromeos/extensions/input_method_api.cc b/chrome/browser/chromeos/extensions/input_method_api.cc index 52a54c9..ce70b36 100644 --- a/chrome/browser/chromeos/extensions/input_method_api.cc +++ b/chrome/browser/chromeos/extensions/input_method_api.cc
@@ -5,9 +5,9 @@ #include "chrome/browser/chromeos/extensions/input_method_api.h" #include <stddef.h> - #include <set> #include <string> +#include <utility> #include "base/command_line.h" #include "base/lazy_instance.h" @@ -170,7 +170,7 @@ return RespondNow(Error("Sync service is not ready for current profile.")); scoped_ptr<base::Value> ret(new base::FundamentalValue( profile_sync_service->IsEncryptEverythingEnabled())); - return RespondNow(OneArgument(ret.Pass())); + return RespondNow(OneArgument(std::move(ret))); #endif }
diff --git a/chrome/browser/chromeos/extensions/input_method_event_router.cc b/chrome/browser/chromeos/extensions/input_method_event_router.cc index 2680ee31..ee495ed4 100644 --- a/chrome/browser/chromeos/extensions/input_method_event_router.cc +++ b/chrome/browser/chromeos/extensions/input_method_event_router.cc
@@ -5,6 +5,7 @@ #include "chrome/browser/chromeos/extensions/input_method_event_router.h" #include <algorithm> +#include <utility> #include "base/json/json_writer.h" #include "base/values.h" @@ -47,9 +48,9 @@ // The router will only send the event to extensions that are listening. scoped_ptr<extensions::Event> event(new extensions::Event( extensions::events::INPUT_METHOD_PRIVATE_ON_CHANGED, - extensions::InputMethodAPI::kOnInputMethodChanged, args.Pass())); + extensions::InputMethodAPI::kOnInputMethodChanged, std::move(args))); event->restrict_to_browser_context = context_; - router->BroadcastEvent(event.Pass()); + router->BroadcastEvent(std::move(event)); } } // namespace chromeos
diff --git a/chrome/browser/chromeos/extensions/launcher_search_provider.cc b/chrome/browser/chromeos/extensions/launcher_search_provider.cc index f041e1e5..7321170 100644 --- a/chrome/browser/chromeos/extensions/launcher_search_provider.cc +++ b/chrome/browser/chromeos/extensions/launcher_search_provider.cc
@@ -4,6 +4,8 @@ #include "chrome/browser/chromeos/extensions/launcher_search_provider.h" +#include <utility> + #include "base/memory/scoped_ptr.h" #include "chrome/browser/chromeos/launcher_search_provider/error_reporter.h" #include "chrome/browser/chromeos/launcher_search_provider/launcher_search_provider_service.h" @@ -27,7 +29,7 @@ scoped_ptr<ErrorReporter> error_reporter( new ErrorReporter(render_frame_host())); Service* const service = Service::Get(GetProfile()); - service->SetSearchResults(extension(), error_reporter.Pass(), + service->SetSearchResults(extension(), std::move(error_reporter), params->query_id, params->results); return true;
diff --git a/chrome/browser/chromeos/extensions/media_player_event_router.cc b/chrome/browser/chromeos/extensions/media_player_event_router.cc index 85daba8..9994857 100644 --- a/chrome/browser/chromeos/extensions/media_player_event_router.cc +++ b/chrome/browser/chromeos/extensions/media_player_event_router.cc
@@ -4,6 +4,8 @@ #include "chrome/browser/chromeos/extensions/media_player_event_router.h" +#include <utility> + #include "base/memory/singleton.h" #include "content/public/browser/browser_context.h" #include "extensions/browser/event_router.h" @@ -19,8 +21,8 @@ if (context && EventRouter::Get(context)) { scoped_ptr<base::ListValue> args(new base::ListValue()); scoped_ptr<Event> event( - new Event(histogram_value, event_name, args.Pass())); - EventRouter::Get(context)->BroadcastEvent(event.Pass()); + new Event(histogram_value, event_name, std::move(args))); + EventRouter::Get(context)->BroadcastEvent(std::move(event)); } }
diff --git a/chrome/browser/chromeos/extensions/users_private/users_private_apitest.cc b/chrome/browser/chromeos/extensions/users_private/users_private_apitest.cc index 9eb36eb5..afd52fa 100644 --- a/chrome/browser/chromeos/extensions/users_private/users_private_apitest.cc +++ b/chrome/browser/chromeos/extensions/users_private/users_private_apitest.cc
@@ -46,7 +46,7 @@ } pref_object->value.reset(value); - return pref_object.Pass(); + return pref_object; } bool AppendToListCrosSetting(const std::string& pref_name,
diff --git a/chrome/browser/chromeos/extensions/wallpaper_api.cc b/chrome/browser/chromeos/extensions/wallpaper_api.cc index b8293a9..64be4aa 100644 --- a/chrome/browser/chromeos/extensions/wallpaper_api.cc +++ b/chrome/browser/chromeos/extensions/wallpaper_api.cc
@@ -5,6 +5,7 @@ #include "chrome/browser/chromeos/extensions/wallpaper_api.h" #include <string> +#include <utility> #include <vector> #include "ash/desktop_background/desktop_background_controller.h" @@ -159,10 +160,8 @@ // request thumbnail in the javascript callback. task_runner->PostTask( FROM_HERE, - base::Bind(&WallpaperSetWallpaperFunction::GenerateThumbnail, - this, - thumbnail_path, - base::Passed(deep_copy.Pass()))); + base::Bind(&WallpaperSetWallpaperFunction::GenerateThumbnail, this, + thumbnail_path, base::Passed(std::move(deep_copy)))); } else { // Save current extenion name. It will be displayed in the component // wallpaper picker app. If current extension is the component wallpaper @@ -187,9 +186,9 @@ extensions::events::WALLPAPER_PRIVATE_ON_WALLPAPER_CHANGED_BY_3RD_PARTY, extensions::api::wallpaper_private::OnWallpaperChangedBy3rdParty:: kEventName, - event_args.Pass())); + std::move(event_args))); event_router->DispatchEventToExtension(extension_misc::kWallpaperManagerId, - event.Pass()); + std::move(event)); } void WallpaperSetWallpaperFunction::GenerateThumbnail(
diff --git a/chrome/browser/chromeos/extensions/wallpaper_private_api.cc b/chrome/browser/chromeos/extensions/wallpaper_private_api.cc index 5573784c..9da0e427 100644 --- a/chrome/browser/chromeos/extensions/wallpaper_private_api.cc +++ b/chrome/browser/chromeos/extensions/wallpaper_private_api.cc
@@ -7,6 +7,7 @@ #include <map> #include <set> #include <string> +#include <utility> #include <vector> #include "ash/desktop_background/desktop_background_controller.h" @@ -497,11 +498,9 @@ // ImageSkia is not RefCountedThreadSafe. Use a deep copied ImageSkia if // post to another thread. BrowserThread::PostTask( - BrowserThread::UI, - FROM_HERE, + BrowserThread::UI, FROM_HERE, base::Bind(&WallpaperPrivateSetWallpaperFunction::SetDecodedWallpaper, - this, - base::Passed(deep_copy.Pass()))); + this, base::Passed(std::move(deep_copy)))); base::FilePath wallpaper_dir; CHECK(PathService::Get(chrome::DIR_CHROMEOS_WALLPAPERS, &wallpaper_dir));
diff --git a/chrome/browser/chromeos/file_manager/external_filesystem_apitest.cc b/chrome/browser/chromeos/file_manager/external_filesystem_apitest.cc index 6990183..7013726 100644 --- a/chrome/browser/chromeos/file_manager/external_filesystem_apitest.cc +++ b/chrome/browser/chromeos/file_manager/external_filesystem_apitest.cc
@@ -188,7 +188,7 @@ if (error != google_apis::HTTP_SUCCESS) return scoped_ptr<google_apis::FileResource>(); - return entry.Pass(); + return entry; } scoped_ptr<google_apis::FileResource> AddFileToDriveService(
diff --git a/chrome/browser/chromeos/file_manager/file_browser_handlers.cc b/chrome/browser/chromeos/file_manager/file_browser_handlers.cc index 5f254ca..d32408e 100644 --- a/chrome/browser/chromeos/file_manager/file_browser_handlers.cc +++ b/chrome/browser/chromeos/file_manager/file_browser_handlers.cc
@@ -5,9 +5,9 @@ #include "chrome/browser/chromeos/file_manager/file_browser_handlers.h" #include <stddef.h> - #include <algorithm> #include <set> +#include <utility> #include "base/bind.h" #include "base/command_line.h" @@ -262,7 +262,7 @@ file_definition_list->push_back(file_definition); } - return file_definition_list.Pass(); + return file_definition_list; } FileBrowserHandlerExecutor::FileBrowserHandlerExecutor( @@ -341,10 +341,9 @@ } if (handler_pid > 0) { - SetupPermissionsAndDispatchEvent(file_definition_list.Pass(), - entry_definition_list.Pass(), - handler_pid, - NULL); + SetupPermissionsAndDispatchEvent(std::move(file_definition_list), + std::move(entry_definition_list), + handler_pid, NULL); } else { // We have to wake the handler background page before we proceed. extensions::LazyBackgroundTaskQueue* queue = @@ -354,14 +353,12 @@ return; } queue->AddPendingTask( - profile_, - extension_->id(), + profile_, extension_->id(), base::Bind( &FileBrowserHandlerExecutor::SetupPermissionsAndDispatchEvent, weak_ptr_factory_.GetWeakPtr(), - base::Passed(file_definition_list.Pass()), - base::Passed(entry_definition_list.Pass()), - handler_pid)); + base::Passed(std::move(file_definition_list)), + base::Passed(std::move(entry_definition_list)), handler_pid)); } } @@ -409,11 +406,11 @@ file_def->SetBoolean("fileIsDirectory", iter->is_directory); } - scoped_ptr<extensions::Event> event( - new extensions::Event(extensions::events::FILE_BROWSER_HANDLER_ON_EXECUTE, - "fileBrowserHandler.onExecute", event_args.Pass())); + scoped_ptr<extensions::Event> event(new extensions::Event( + extensions::events::FILE_BROWSER_HANDLER_ON_EXECUTE, + "fileBrowserHandler.onExecute", std::move(event_args))); event->restrict_to_browser_context = profile_; - router->DispatchEventToExtension(extension_->id(), event.Pass()); + router->DispatchEventToExtension(extension_->id(), std::move(event)); ExecuteDoneOnUIThread(true); }
diff --git a/chrome/browser/chromeos/file_manager/file_tasks_unittest.cc b/chrome/browser/chromeos/file_manager/file_tasks_unittest.cc index 76d5587bf..36e17a21 100644 --- a/chrome/browser/chromeos/file_manager/file_tasks_unittest.cc +++ b/chrome/browser/chromeos/file_manager/file_tasks_unittest.cc
@@ -179,7 +179,7 @@ ScopedVector<std::string> foo_mime_types; foo_mime_types.push_back(new std::string("text/plain")); foo_mime_types.push_back(new std::string("text/html")); - foo_app->set_primary_mimetypes(foo_mime_types.Pass()); + foo_app->set_primary_mimetypes(std::move(foo_mime_types)); // Bar.app can only handle "text/plain". scoped_ptr<google_apis::AppResource> bar_app(new google_apis::AppResource); @@ -189,14 +189,14 @@ bar_app->set_object_type("bar_object_type"); ScopedVector<std::string> bar_mime_types; bar_mime_types.push_back(new std::string("text/plain")); - bar_app->set_primary_mimetypes(bar_mime_types.Pass()); + bar_app->set_primary_mimetypes(std::move(bar_mime_types)); // Prepare DriveAppRegistry from Foo.app and Bar.app. ScopedVector<google_apis::AppResource> app_resources; app_resources.push_back(foo_app.release()); app_resources.push_back(bar_app.release()); google_apis::AppList app_list; - app_list.set_items(app_resources.Pass()); + app_list.set_items(std::move(app_resources)); drive::DriveAppRegistry drive_app_registry(NULL); drive_app_registry.UpdateFromAppList(app_list); @@ -708,12 +708,12 @@ baz_app->set_object_type("baz_object_type"); ScopedVector<std::string> baz_mime_types; baz_mime_types.push_back(new std::string("text/plain")); - baz_app->set_primary_mimetypes(baz_mime_types.Pass()); + baz_app->set_primary_mimetypes(std::move(baz_mime_types)); // Set up DriveAppRegistry. ScopedVector<google_apis::AppResource> app_resources; app_resources.push_back(baz_app.release()); google_apis::AppList app_list; - app_list.set_items(app_resources.Pass()); + app_list.set_items(std::move(app_resources)); drive::DriveAppRegistry drive_app_registry(NULL); drive_app_registry.UpdateFromAppList(app_list); @@ -760,13 +760,13 @@ foo_app->set_object_type("foo_object_type"); ScopedVector<std::string> foo_extensions; foo_extensions.push_back(new std::string("gdoc")); // Not ".gdoc" - foo_app->set_primary_file_extensions(foo_extensions.Pass()); + foo_app->set_primary_file_extensions(std::move(foo_extensions)); // Prepare DriveAppRegistry from Foo.app. ScopedVector<google_apis::AppResource> app_resources; app_resources.push_back(foo_app.release()); google_apis::AppList app_list; - app_list.set_items(app_resources.Pass()); + app_list.set_items(std::move(app_resources)); drive::DriveAppRegistry drive_app_registry(NULL); drive_app_registry.UpdateFromAppList(app_list);
diff --git a/chrome/browser/chromeos/file_manager/fileapi_util.cc b/chrome/browser/chromeos/file_manager/fileapi_util.cc index 2535a36..6f2d0395 100644 --- a/chrome/browser/chromeos/file_manager/fileapi_util.cc +++ b/chrome/browser/chromeos/file_manager/fileapi_util.cc
@@ -5,6 +5,7 @@ #include "chrome/browser/chromeos/file_manager/fileapi_util.h" #include <stddef.h> +#include <utility> #include "base/files/file.h" #include "base/files/file_path.h" @@ -122,7 +123,7 @@ // either, if the conversion is finished, or ResolveURL() is terminated, and // the callback not called because of shutdown. scoped_ptr<FileDefinitionListConverter> self_deleter(this); - ConvertNextIterator(self_deleter.Pass(), file_definition_list_.begin()); + ConvertNextIterator(std::move(self_deleter), file_definition_list_.begin()); } void FileDefinitionListConverter::ConvertNextIterator( @@ -131,13 +132,12 @@ if (iterator == file_definition_list_.end()) { // The converter object will be destroyed since |self_deleter| gets out of // scope. - callback_.Run(result_.Pass()); + callback_.Run(std::move(result_)); return; } if (!file_system_context_.get()) { - OnIteratorConverted(self_deleter.Pass(), - iterator, + OnIteratorConverted(std::move(self_deleter), iterator, CreateEntryDefinitionWithError( base::File::FILE_ERROR_INVALID_OPERATION)); return; @@ -169,8 +169,7 @@ DCHECK_CURRENTLY_ON(BrowserThread::UI); if (error != base::File::FILE_OK) { - OnIteratorConverted(self_deleter.Pass(), - iterator, + OnIteratorConverted(std::move(self_deleter), iterator, CreateEntryDefinitionWithError(error)); return; } @@ -201,7 +200,7 @@ root_virtual_path.AppendRelativePath(iterator->virtual_path, &full_path); entry_definition.full_path = full_path; - OnIteratorConverted(self_deleter.Pass(), iterator, entry_definition); + OnIteratorConverted(std::move(self_deleter), iterator, entry_definition); } void FileDefinitionListConverter::OnIteratorConverted( @@ -209,7 +208,7 @@ FileDefinitionList::const_iterator iterator, const EntryDefinition& entry_definition) { result_->push_back(entry_definition); - ConvertNextIterator(self_deleter.Pass(), ++iterator); + ConvertNextIterator(std::move(self_deleter), ++iterator); } // Helper function to return the converted definition entry directly, without @@ -282,14 +281,14 @@ base::FilePath virtual_path; if (!context->external_backend()->GetVirtualPath( selected_info_list[i].file_path, &virtual_path)) { - NotifyError(lifetime.Pass()); + NotifyError(std::move(lifetime)); return; } const GURL url = CreateIsolatedURLFromVirtualPath( *context_, origin, virtual_path).ToGURL(); if (!url.is_valid()) { - NotifyError(lifetime.Pass()); + NotifyError(std::move(lifetime)); return; } @@ -313,7 +312,7 @@ return; } - NotifyComplete(lifetime.Pass()); + NotifyComplete(std::move(lifetime)); } ~ConvertSelectedFileInfoListToFileChooserFileInfoListImpl() { @@ -346,7 +345,7 @@ } if (!it->file_system_url.is_valid()) { - FillMetadataOnIOThread(lifetime.Pass(), it + 1); + FillMetadataOnIOThread(std::move(lifetime), it + 1); return; } @@ -381,7 +380,7 @@ it->length = file_info.size; it->modification_time = file_info.last_modified; it->is_directory = file_info.is_directory; - FillMetadataOnIOThread(lifetime.Pass(), it + 1); + FillMetadataOnIOThread(std::move(lifetime), it + 1); } // Returns a result to the |callback_|.
diff --git a/chrome/browser/chromeos/file_manager/zip_file_creator.cc b/chrome/browser/chromeos/file_manager/zip_file_creator.cc index 6af8346..823ee1a 100644 --- a/chrome/browser/chromeos/file_manager/zip_file_creator.cc +++ b/chrome/browser/chromeos/file_manager/zip_file_creator.cc
@@ -4,6 +4,8 @@ #include "chrome/browser/chromeos/file_manager/zip_file_creator.h" +#include <utility> + #include "base/bind.h" #include "base/callback_helpers.h" #include "base/message_loop/message_loop.h" @@ -88,7 +90,7 @@ void ZipFileCreator::StartProcessOnIOThread(base::File dest_file) { DCHECK_CURRENTLY_ON(BrowserThread::IO); - base::FileDescriptor dest_fd(dest_file.Pass()); + base::FileDescriptor dest_fd(std::move(dest_file)); UtilityProcessHost* host = UtilityProcessHost::Create( this,
diff --git a/chrome/browser/chromeos/file_system_provider/provided_file_system_info.h b/chrome/browser/chromeos/file_system_provider/provided_file_system_info.h index 677e839..d6ea5e1 100644 --- a/chrome/browser/chromeos/file_system_provider/provided_file_system_info.h +++ b/chrome/browser/chromeos/file_system_provider/provided_file_system_info.h
@@ -49,8 +49,8 @@ bool supports_notify_tag() const { return supports_notify_tag_; } int opened_files_limit() const { return opened_files_limit_; } const base::FilePath& mount_path() const { return mount_path_; } - const bool configurable() const { return configurable_; } - const bool watchable() const { return watchable_; } + bool configurable() const { return configurable_; } + bool watchable() const { return watchable_; } extensions::FileSystemProviderSource source() const { return source_; } private:
diff --git a/chrome/browser/chromeos/file_system_provider/service_unittest.cc b/chrome/browser/chromeos/file_system_provider/service_unittest.cc index 0d5ea1e..8dea081 100644 --- a/chrome/browser/chromeos/file_system_provider/service_unittest.cc +++ b/chrome/browser/chromeos/file_system_provider/service_unittest.cc
@@ -151,10 +151,10 @@ it->second.last_tag = watcher.last_tag; } - ProvidedFileSystemInfo* const file_system_info() const { + const ProvidedFileSystemInfo* file_system_info() const { return file_system_info_.get(); } - Watchers* const watchers() const { return watchers_.get(); } + const Watchers* watchers() const { return watchers_.get(); } private: scoped_ptr<ProvidedFileSystemInfo> file_system_info_;
diff --git a/chrome/browser/chromeos/fileapi/external_file_url_request_job.cc b/chrome/browser/chromeos/fileapi/external_file_url_request_job.cc index a07cf107..c40bb347 100644 --- a/chrome/browser/chromeos/fileapi/external_file_url_request_job.cc +++ b/chrome/browser/chromeos/fileapi/external_file_url_request_job.cc
@@ -5,6 +5,7 @@ #include "chrome/browser/chromeos/fileapi/external_file_url_request_job.h" #include <algorithm> +#include <utility> #include <vector> #include "base/bind.h" @@ -245,7 +246,7 @@ DCHECK(file_system_context.get()); file_system_context_ = file_system_context; - isolated_file_system_scope_ = isolated_file_system_scope.Pass(); + isolated_file_system_scope_ = std::move(isolated_file_system_scope); file_system_url_ = file_system_url; mime_type_ = mime_type;
diff --git a/chrome/browser/chromeos/first_run/drive_first_run_controller.cc b/chrome/browser/chromeos/first_run/drive_first_run_controller.cc index 854682a..d81a9ea 100644 --- a/chrome/browser/chromeos/first_run/drive_first_run_controller.cc +++ b/chrome/browser/chromeos/first_run/drive_first_run_controller.cc
@@ -5,6 +5,7 @@ #include "chrome/browser/chromeos/first_run/drive_first_run_controller.h" #include <stdint.h> +#include <utility> #include "ash/shell.h" #include "ash/system/tray/system_tray_delegate.h" @@ -472,7 +473,8 @@ kDriveHostedAppId), data, new DriveOfflineNotificationDelegate(profile_))); notification->set_priority(message_center::LOW_PRIORITY); - message_center::MessageCenter::Get()->AddNotification(notification.Pass()); + message_center::MessageCenter::Get()->AddNotification( + std::move(notification)); } } // namespace chromeos
diff --git a/chrome/browser/chromeos/input_method/component_extension_ime_manager_impl.cc b/chrome/browser/chromeos/input_method/component_extension_ime_manager_impl.cc index 4162710..48fb019b 100644 --- a/chrome/browser/chromeos/input_method/component_extension_ime_manager_impl.cc +++ b/chrome/browser/chromeos/input_method/component_extension_ime_manager_impl.cc
@@ -175,7 +175,7 @@ LOG(ERROR) << "Failed at getting manifest"; return scoped_ptr<base::DictionaryValue>( - static_cast<base::DictionaryValue*>(manifest.release())).Pass(); + static_cast<base::DictionaryValue*>(manifest.release())); } // static
diff --git a/chrome/browser/chromeos/input_method/input_method_engine.cc b/chrome/browser/chromeos/input_method/input_method_engine.cc index 5d5431a3..1f8c72b 100644 --- a/chrome/browser/chromeos/input_method/input_method_engine.cc +++ b/chrome/browser/chromeos/input_method/input_method_engine.cc
@@ -4,6 +4,8 @@ #include "chrome/browser/chromeos/input_method/input_method_engine.h" +#include <utility> + #undef FocusIn #undef FocusOut #undef RootWindow @@ -173,7 +175,7 @@ DCHECK(observer) << "Observer must not be null."; // TODO(komatsu): It is probably better to set observer out of Initialize. - observer_ = observer.Pass(); + observer_ = std::move(observer); extension_id_ = extension_id; profile_ = profile; }
diff --git a/chrome/browser/chromeos/input_method/input_method_engine_unittest.cc b/chrome/browser/chromeos/input_method/input_method_engine_unittest.cc index 42cdf3b..cc6537ee 100644 --- a/chrome/browser/chromeos/input_method/input_method_engine_unittest.cc +++ b/chrome/browser/chromeos/input_method/input_method_engine_unittest.cc
@@ -2,6 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "chrome/browser/chromeos/input_method/input_method_engine.h" + +#include <utility> + #include "base/logging.h" #include "base/macros.h" #include "base/metrics/histogram.h" @@ -9,7 +13,6 @@ #include "base/metrics/statistics_recorder.h" #include "base/test/histogram_tester.h" #include "chrome/browser/chromeos/input_method/input_method_configuration.h" -#include "chrome/browser/chromeos/input_method/input_method_engine.h" #include "chrome/browser/chromeos/input_method/mock_input_method_manager.h" #include "chrome/browser/profiles/profile_manager.h" #include "testing/gtest/include/gtest/gtest.h" @@ -59,11 +62,11 @@ ime_list.push_back(ext1); delegate->set_ime_list(ime_list); comp_ime_manager->Initialize( - scoped_ptr<ComponentExtensionIMEManagerDelegate>(delegate).Pass()); + scoped_ptr<ComponentExtensionIMEManagerDelegate>(delegate)); MockInputMethodManager* manager = new MockInputMethodManager; manager->SetComponentExtensionIMEManager( - scoped_ptr<ComponentExtensionIMEManager>(comp_ime_manager).Pass()); + scoped_ptr<ComponentExtensionIMEManager>(comp_ime_manager)); InitializeForTesting(manager); } @@ -140,7 +143,7 @@ engine_.reset(new InputMethodEngine()); observer_ = new TestObserver(); scoped_ptr<ui::IMEEngineObserver> observer_ptr(observer_); - engine_->Initialize(observer_ptr.Pass(), + engine_->Initialize(std::move(observer_ptr), whitelisted ? kTestExtensionId : kTestExtensionId2, ProfileManager::GetActiveUserProfile()); }
diff --git a/chrome/browser/chromeos/input_method/input_method_manager_impl.cc b/chrome/browser/chromeos/input_method/input_method_manager_impl.cc index f3239391..f5ed114 100644 --- a/chrome/browser/chromeos/input_method/input_method_manager_impl.cc +++ b/chrome/browser/chromeos/input_method/input_method_manager_impl.cc
@@ -5,10 +5,9 @@ #include "chrome/browser/chromeos/input_method/input_method_manager_impl.h" #include <stdint.h> - #include <algorithm> // std::find - #include <sstream> +#include <utility> #include "base/bind.h" #include "base/hash.h" @@ -200,7 +199,7 @@ result->push_back( InputMethodUtil::GetFallbackInputMethodDescriptor()); } - return result.Pass(); + return result; } const std::vector<std::string>& @@ -846,7 +845,7 @@ InputMethodManagerImpl::InputMethodManagerImpl( scoped_ptr<InputMethodDelegate> delegate, bool enable_extension_loading) - : delegate_(delegate.Pass()), + : delegate_(std::move(delegate)), ui_session_(STATE_LOGIN_SCREEN), state_(NULL), util_(delegate_.get()), @@ -860,7 +859,7 @@ // Initializes the system IME list. scoped_ptr<ComponentExtensionIMEManagerDelegate> comp_delegate( new ComponentExtensionIMEManagerImpl()); - component_extension_ime_manager_->Initialize(comp_delegate.Pass()); + component_extension_ime_manager_->Initialize(std::move(comp_delegate)); const InputMethodDescriptors& descriptors = component_extension_ime_manager_->GetAllIMEAsInputMethodDescriptor(); util_.ResetInputMethods(descriptors); @@ -923,7 +922,7 @@ scoped_ptr<InputMethodDescriptors> InputMethodManagerImpl::GetSupportedInputMethods() const { - return scoped_ptr<InputMethodDescriptors>(new InputMethodDescriptors).Pass(); + return scoped_ptr<InputMethodDescriptors>(new InputMethodDescriptors); } const InputMethodDescriptor* InputMethodManagerImpl::LookupInputMethod( @@ -1130,7 +1129,7 @@ void InputMethodManagerImpl::InitializeComponentExtensionForTesting( scoped_ptr<ComponentExtensionIMEManagerDelegate> delegate) { - component_extension_ime_manager_->Initialize(delegate.Pass()); + component_extension_ime_manager_->Initialize(std::move(delegate)); util_.ResetInputMethods( component_extension_ime_manager_->GetAllIMEAsInputMethodDescriptor()); }
diff --git a/chrome/browser/chromeos/input_method/input_method_manager_impl_unittest.cc b/chrome/browser/chromeos/input_method/input_method_manager_impl_unittest.cc index 401ad6e..fce9d5f 100644 --- a/chrome/browser/chromeos/input_method/input_method_manager_impl_unittest.cc +++ b/chrome/browser/chromeos/input_method/input_method_manager_impl_unittest.cc
@@ -5,8 +5,8 @@ #include "chrome/browser/chromeos/input_method/input_method_manager_impl.h" #include <stddef.h> - #include <algorithm> +#include <utility> #include "base/bind.h" #include "base/bind_helpers.h" @@ -194,7 +194,7 @@ ImeIdFromEngineId(kExt2Engine1Id), descriptors, mock_engine_handler_.get()); - manager_->InitializeComponentExtensionForTesting(delegate.Pass()); + manager_->InitializeComponentExtensionForTesting(std::move(delegate)); } void InitImeList() {
diff --git a/chrome/browser/chromeos/input_method/mock_input_method_manager.cc b/chrome/browser/chromeos/input_method/mock_input_method_manager.cc index ef233ac..d125529 100644 --- a/chrome/browser/chromeos/input_method/mock_input_method_manager.cc +++ b/chrome/browser/chromeos/input_method/mock_input_method_manager.cc
@@ -4,6 +4,8 @@ #include "chrome/browser/chromeos/input_method/mock_input_method_manager.h" +#include <utility> + namespace chromeos { namespace input_method { @@ -53,7 +55,7 @@ scoped_ptr<InputMethodDescriptors> result(new InputMethodDescriptors); result->push_back( InputMethodUtil::GetFallbackInputMethodDescriptor()); - return result.Pass(); + return result; } scoped_ptr<InputMethodDescriptors> @@ -61,7 +63,7 @@ scoped_ptr<InputMethodDescriptors> result(new InputMethodDescriptors); result->push_back( InputMethodUtil::GetFallbackInputMethodDescriptor()); - return result.Pass(); + return result; } const std::vector<std::string>& @@ -195,7 +197,7 @@ void MockInputMethodManager::SetComponentExtensionIMEManager( scoped_ptr<ComponentExtensionIMEManager> comp_ime_manager) { - comp_ime_manager_ = comp_ime_manager.Pass(); + comp_ime_manager_ = std::move(comp_ime_manager); } void MockInputMethodManager::set_application_locale(const std::string& value) {
diff --git a/chrome/browser/chromeos/launcher_search_provider/launcher_search_provider_service.cc b/chrome/browser/chromeos/launcher_search_provider/launcher_search_provider_service.cc index b455815..c7245420 100644 --- a/chrome/browser/chromeos/launcher_search_provider/launcher_search_provider_service.cc +++ b/chrome/browser/chromeos/launcher_search_provider/launcher_search_provider_service.cc
@@ -5,6 +5,7 @@ #include "chrome/browser/chromeos/launcher_search_provider/launcher_search_provider_service.h" #include <stdint.h> +#include <utility> #include "base/memory/scoped_vector.h" #include "base/strings/utf_string_conversions.h" @@ -135,7 +136,7 @@ search_result->set_title(base::UTF8ToUTF16(result->title)); search_results.push_back(search_result); } - provider_->SetSearchResults(extension->id(), search_results.Pass()); + provider_->SetSearchResults(extension->id(), std::move(search_results)); } bool Service::IsQueryRunning() const {
diff --git a/chrome/browser/chromeos/login/auth/cryptohome_authenticator_unittest.cc b/chrome/browser/chromeos/login/auth/cryptohome_authenticator_unittest.cc index a108b0ff..13fe01e 100644 --- a/chrome/browser/chromeos/login/auth/cryptohome_authenticator_unittest.cc +++ b/chrome/browser/chromeos/login/auth/cryptohome_authenticator_unittest.cc
@@ -2,11 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chrome/browser/chromeos/login/auth/chrome_cryptohome_authenticator.h" #include <stdint.h> - #include <string> +#include <utility> #include <vector> #include "base/command_line.h" @@ -18,6 +17,7 @@ #include "base/run_loop.h" #include "base/strings/string_util.h" #include "base/strings/stringprintf.h" +#include "chrome/browser/chromeos/login/auth/chrome_cryptohome_authenticator.h" #include "chrome/browser/chromeos/login/users/scoped_user_manager_enabler.h" #include "chrome/browser/chromeos/ownership/owner_settings_service_chromeos.h" #include "chrome/browser/chromeos/ownership/owner_settings_service_chromeos_factory.h" @@ -259,12 +259,12 @@ if (key_type) { key_definition.provider_data.push_back( cryptohome::KeyDefinition::ProviderData("type")); - key_definition.provider_data.back().number = key_type.Pass(); + key_definition.provider_data.back().number = std::move(key_type); } if (salt) { key_definition.provider_data.push_back( cryptohome::KeyDefinition::ProviderData("salt")); - key_definition.provider_data.back().bytes = salt.Pass(); + key_definition.provider_data.back().bytes = std::move(salt); } EXPECT_CALL(*mock_homedir_methods_, GetKeyDataEx(cryptohome::Identification(
diff --git a/chrome/browser/chromeos/login/easy_unlock/easy_unlock_tpm_key_manager.cc b/chrome/browser/chromeos/login/easy_unlock/easy_unlock_tpm_key_manager.cc index 99ce54b..bc2ac9d 100644 --- a/chrome/browser/chromeos/login/easy_unlock/easy_unlock_tpm_key_manager.cc +++ b/chrome/browser/chromeos/login/easy_unlock/easy_unlock_tpm_key_manager.cc
@@ -7,6 +7,7 @@ #include <cryptohi.h> #include <keyhi.h> #include <stdint.h> +#include <utility> #include "base/base64.h" #include "base/bind.h" @@ -53,7 +54,7 @@ crypto::ScopedPK11Slot system_slot = crypto::GetSystemNSSKeySlot(callback_on_origin_thread); if (system_slot) - callback_on_origin_thread.Run(system_slot.Pass()); + callback_on_origin_thread.Run(std::move(system_slot)); } // Relays |EnsureUserTpmInitializedOnIOThread| callback to @@ -76,7 +77,7 @@ crypto::ScopedPK11Slot private_slot = crypto::GetPrivateSlotForChromeOSUser( username_hash, callback_on_origin_thread); if (private_slot) - callback_on_origin_thread.Run(private_slot.Pass()); + callback_on_origin_thread.Run(std::move(private_slot)); } // Checks if a private RSA key associated with |public_key| can be found in @@ -96,7 +97,7 @@ crypto::FindNSSKeyFromPublicKeyInfoInSlot(public_key_vector, slot)); if (!rsa_key || SECKEY_GetPrivateKeyType(rsa_key.get()) != rsaKey) return nullptr; - return rsa_key.Pass(); + return rsa_key; } // Signs |data| using a private key associated with |public_key| and stored in
diff --git a/chrome/browser/chromeos/login/eula_browsertest.cc b/chrome/browser/chromeos/login/eula_browsertest.cc index b0bd0808..17343436 100644 --- a/chrome/browser/chromeos/login/eula_browsertest.cc +++ b/chrome/browser/chromeos/login/eula_browsertest.cc
@@ -43,7 +43,7 @@ scoped_ptr<net::FakeURLFetcher> fetcher( new net::FakeURLFetcher(url, d, response_data, response_code, status)); OnRequestCreate(url, fetcher.get()); - return fetcher.Pass(); + return fetcher; } MOCK_METHOD2(OnRequestCreate, void(const GURL&, net::FakeURLFetcher*));
diff --git a/chrome/browser/chromeos/login/kiosk_browsertest.cc b/chrome/browser/chromeos/login/kiosk_browsertest.cc index 5bc093d5..4f5b187f 100644 --- a/chrome/browser/chromeos/login/kiosk_browsertest.cc +++ b/chrome/browser/chromeos/login/kiosk_browsertest.cc
@@ -808,7 +808,7 @@ content::BrowserThread::PostTask( content::BrowserThread::FILE, FROM_HERE, base::Bind(&LockAndUnlock, base::Passed(&lock))); - return auto_lock.Pass(); + return auto_lock; } MockUserManager* mock_user_manager() { return mock_user_manager_.get(); }
diff --git a/chrome/browser/chromeos/login/profile_auth_data_unittest.cc b/chrome/browser/chromeos/login/profile_auth_data_unittest.cc index 2973727..887e2d37 100644 --- a/chrome/browser/chromeos/login/profile_auth_data_unittest.cc +++ b/chrome/browser/chromeos/login/profile_auth_data_unittest.cc
@@ -5,6 +5,7 @@ #include "chrome/browser/chromeos/login/profile_auth_data.h" #include <string> +#include <utility> #include "base/bind.h" #include "base/bind_helpers.h" @@ -229,7 +230,8 @@ GetChannelIDs(browser_context) ->SetChannelID(make_scoped_ptr(new net::ChannelIDStore::ChannelID( - kChannelIDServerIdentifier, base::Time(), channel_id_key.Pass()))); + kChannelIDServerIdentifier, base::Time(), + std::move(channel_id_key)))); } net::URLRequestContext* ProfileAuthDataTest::GetRequestContext(
diff --git a/chrome/browser/chromeos/login/saml/saml_browsertest.cc b/chrome/browser/chromeos/login/saml/saml_browsertest.cc index fb3ca9ce..4a8bffc 100644 --- a/chrome/browser/chromeos/login/saml/saml_browsertest.cc +++ b/chrome/browser/chromeos/login/saml/saml_browsertest.cc
@@ -4,6 +4,7 @@ #include <cstring> #include <string> +#include <utility> #include "base/bind.h" #include "base/bind_helpers.h" @@ -251,7 +252,7 @@ http_response->AddCustomHeader( "Set-cookie", base::StringPrintf("saml=%s", cookie_value_.c_str())); - return http_response.Pass(); + return std::move(http_response); } scoped_ptr<HttpResponse> FakeSamlIdp::BuildHTMLResponse( @@ -271,7 +272,7 @@ http_response->set_content(response_html); http_response->set_content_type("text/html"); - return http_response.Pass(); + return std::move(http_response); } // A FakeCryptohomeClient that stores the salted and hashed secret passed to
diff --git a/chrome/browser/chromeos/login/screens/chrome_user_selection_screen.cc b/chrome/browser/chromeos/login/screens/chrome_user_selection_screen.cc index d8bd84b6..42e5bf6a 100644 --- a/chrome/browser/chromeos/login/screens/chrome_user_selection_screen.cc +++ b/chrome/browser/chromeos/login/screens/chrome_user_selection_screen.cc
@@ -4,6 +4,8 @@ #include "chrome/browser/chromeos/login/screens/chrome_user_selection_screen.h" +#include <utility> + #include "base/bind.h" #include "base/location.h" #include "base/logging.h" @@ -182,7 +184,7 @@ const bool two_or_more_recommended_locales = recommended_locales.size() >= 2; // Notify the UI. - view_->SetPublicSessionLocales(account_id, available_locales.Pass(), + view_->SetPublicSessionLocales(account_id, std::move(available_locales), default_locale, two_or_more_recommended_locales); }
diff --git a/chrome/browser/chromeos/login/screens/hid_detection_screen.cc b/chrome/browser/chromeos/login/screens/hid_detection_screen.cc index 0891fce..7d62abe 100644 --- a/chrome/browser/chromeos/login/screens/hid_detection_screen.cc +++ b/chrome/browser/chromeos/login/screens/hid_detection_screen.cc
@@ -4,6 +4,8 @@ #include "chrome/browser/chromeos/login/screens/hid_detection_screen.h" +#include <utility> + #include "base/bind.h" #include "base/metrics/histogram.h" #include "base/strings/string_number_conversions.h" @@ -533,7 +535,7 @@ void HIDDetectionScreen::OnStartDiscoverySession( scoped_ptr<device::BluetoothDiscoverySession> discovery_session) { VLOG(1) << "BT Discovery session started"; - discovery_session_ = discovery_session.Pass(); + discovery_session_ = std::move(discovery_session); UpdateDevices(); }
diff --git a/chrome/browser/chromeos/login/screens/network_screen.cc b/chrome/browser/chromeos/login/screens/network_screen.cc index 8d83dc04..4f8c808 100644 --- a/chrome/browser/chromeos/login/screens/network_screen.cc +++ b/chrome/browser/chromeos/login/screens/network_screen.cc
@@ -4,6 +4,8 @@ #include "chrome/browser/chromeos/login/screens/network_screen.h" +#include <utility> + #include "base/location.h" #include "base/logging.h" #include "base/prefs/pref_service.h" @@ -415,7 +417,7 @@ scoped_ptr<locale_util::LanguageSwitchResult> language_switch_result) { UILanguageListResolvedCallback callback = base::Bind( &NetworkScreen::OnLanguageListResolved, weak_factory_.GetWeakPtr()); - ResolveUILanguageList(language_switch_result.Pass(), callback); + ResolveUILanguageList(std::move(language_switch_result), callback); } void NetworkScreen::OnLanguageListResolved(
diff --git a/chrome/browser/chromeos/login/screens/terms_of_service_screen.cc b/chrome/browser/chromeos/login/screens/terms_of_service_screen.cc index 164a8f4..6efa543 100644 --- a/chrome/browser/chromeos/login/screens/terms_of_service_screen.cc +++ b/chrome/browser/chromeos/login/screens/terms_of_service_screen.cc
@@ -5,6 +5,7 @@ #include "chrome/browser/chromeos/login/screens/terms_of_service_screen.h" #include <string> +#include <utility> #include "base/location.h" #include "base/logging.h" @@ -128,7 +129,7 @@ download_timer_.Stop(); // Destroy the fetcher when this method returns. - scoped_ptr<net::URLFetcher> fetcher(terms_of_service_fetcher_.Pass()); + scoped_ptr<net::URLFetcher> fetcher(std::move(terms_of_service_fetcher_)); if (!actor_) return;
diff --git a/chrome/browser/chromeos/login/signin/oauth2_browsertest.cc b/chrome/browser/chromeos/login/signin/oauth2_browsertest.cc index 52921142..4afacc1d 100644 --- a/chrome/browser/chromeos/login/signin/oauth2_browsertest.cc +++ b/chrome/browser/chromeos/login/signin/oauth2_browsertest.cc
@@ -3,6 +3,7 @@ // found in the LICENSE file. #include <string> +#include <utility> #include "base/macros.h" #include "base/message_loop/message_loop.h" @@ -551,7 +552,7 @@ return scoped_ptr<HttpResponse>(); // Request not understood. } - return http_response.Pass(); + return std::move(http_response); } // True if we have already served the test page.
diff --git a/chrome/browser/chromeos/login/supervised/supervised_user_test_base.cc b/chrome/browser/chromeos/login/supervised/supervised_user_test_base.cc index 9cd935c..e329a961d 100644 --- a/chrome/browser/chromeos/login/supervised/supervised_user_test_base.cc +++ b/chrome/browser/chromeos/login/supervised/supervised_user_test_base.cc
@@ -78,7 +78,7 @@ const syncer::SyncData& data = processor_->changes().front().sync_data(); EXPECT_EQ(syncer::SUPERVISED_USERS, data.GetDataType()); result->CopyFrom(data.GetSpecifics().managed_user()); - return result.Pass(); + return result; } void SupervisedUsersSyncTestAdapter::AddChange( @@ -127,7 +127,7 @@ const syncer::SyncData& data = processor_->changes().front().sync_data(); EXPECT_EQ(syncer::SUPERVISED_USER_SHARED_SETTINGS, data.GetDataType()); result->CopyFrom(data.GetSpecifics().managed_user_shared_setting()); - return result.Pass(); + return result; } void SupervisedUsersSharedSettingsSyncTestAdapter::AddChange(
diff --git a/chrome/browser/chromeos/login/ui/login_display_host_impl.cc b/chrome/browser/chromeos/login/ui/login_display_host_impl.cc index 9d88728..86d43b4 100644 --- a/chrome/browser/chromeos/login/ui/login_display_host_impl.cc +++ b/chrome/browser/chromeos/login/ui/login_display_host_impl.cc
@@ -4,6 +4,7 @@ #include "chrome/browser/chromeos/login/ui/login_display_host_impl.h" +#include <utility> #include <vector> #include "ash/audio/sounds.h" @@ -1265,7 +1266,7 @@ first_screen_name, startup_manifest, display_host)); locale_util::SwitchLanguageCallback callback( - base::Bind(&OnLanguageSwitchedCallback, base::Passed(data.Pass()))); + base::Bind(&OnLanguageSwitchedCallback, base::Passed(std::move(data)))); // Load locale keyboards here. Hardware layout would be automatically enabled. locale_util::SwitchLanguage(locale, true, true /* login_layouts_only */,
diff --git a/chrome/browser/chromeos/login/users/avatar/user_image_loader.cc b/chrome/browser/chromeos/login/users/avatar/user_image_loader.cc index a545a13..0048914 100644 --- a/chrome/browser/chromeos/login/users/avatar/user_image_loader.cc +++ b/chrome/browser/chromeos/login/users/avatar/user_image_loader.cc
@@ -4,6 +4,8 @@ #include "chrome/browser/chromeos/login/users/avatar/user_image_loader.h" +#include <utility> + #include "base/bind.h" #include "base/bind_helpers.h" #include "base/files/file_path.h" @@ -86,7 +88,7 @@ // In case ReadFileToString() fails, |data| is empty and DecodeImage() calls // back to OnDecodeImageFailed(). - DecodeImage(data.Pass(), image_info); + DecodeImage(std::move(data), image_info); } void UserImageLoader::DecodeImage(const scoped_ptr<std::string> data,
diff --git a/chrome/browser/chromeos/login/users/avatar/user_image_manager_impl.cc b/chrome/browser/chromeos/login/users/avatar/user_image_manager_impl.cc index 62270c54..0e1c819 100644 --- a/chrome/browser/chromeos/login/users/avatar/user_image_manager_impl.cc +++ b/chrome/browser/chromeos/login/users/avatar/user_image_manager_impl.cc
@@ -5,6 +5,7 @@ #include "chrome/browser/chromeos/login/users/avatar/user_image_manager_impl.h" #include <stddef.h> +#include <utility> #include "base/bind.h" #include "base/files/file_path.h" @@ -376,11 +377,9 @@ // * This is safe because the image_loader_ employs a hardened JPEG decoder // that protects against malicious invalid image data being used to attack // the login screen or another user session currently in progress. - parent_->image_loader_->Start(data.Pass(), - login::kMaxUserImageSize, - base::Bind(&Job::OnLoadImageDone, - weak_factory_.GetWeakPtr(), - true)); + parent_->image_loader_->Start( + std::move(data), login::kMaxUserImageSize, + base::Bind(&Job::OnLoadImageDone, weak_factory_.GetWeakPtr(), true)); } void UserImageManagerImpl::Job::SetToPath(const base::FilePath& path, @@ -735,7 +734,7 @@ DCHECK(IsUserImageManaged()); if (data) { job_.reset(new Job(this)); - job_->SetToImageData(data.Pass()); + job_->SetToImageData(std::move(data)); } }
diff --git a/chrome/browser/chromeos/login/users/avatar/user_image_manager_test_util.cc b/chrome/browser/chromeos/login/users/avatar/user_image_manager_test_util.cc index 17eb2ca2..06ad4380 100644 --- a/chrome/browser/chromeos/login/users/avatar/user_image_manager_test_util.cc +++ b/chrome/browser/chromeos/login/users/avatar/user_image_manager_test_util.cc
@@ -6,8 +6,8 @@ #include <stddef.h> #include <stdint.h> - #include <string> +#include <utility> #include "base/files/file_util.h" #include "base/memory/ref_counted.h" @@ -59,7 +59,7 @@ ImageDecoder::StartWithOptions(this, image_data, ImageDecoder::ROBUST_JPEG_CODEC, false); run_loop_.Run(); - return decoded_image_.Pass(); + return std::move(decoded_image_); } void ImageLoader::OnImageDecoded(const SkBitmap& decoded_image) {
diff --git a/chrome/browser/chromeos/login/users/chrome_user_manager_impl.cc b/chrome/browser/chromeos/login/users/chrome_user_manager_impl.cc index cf03f6a7..f383c98 100644 --- a/chrome/browser/chromeos/login/users/chrome_user_manager_impl.cc +++ b/chrome/browser/chromeos/login/users/chrome_user_manager_impl.cc
@@ -5,9 +5,9 @@ #include "chrome/browser/chromeos/login/users/chrome_user_manager_impl.h" #include <stddef.h> - #include <cstddef> #include <set> +#include <utility> #include "ash/multi_profile_uma.h" #include "base/bind.h" @@ -470,9 +470,11 @@ const AccountId account_id = user_manager::known_user::GetAccountId(user_id, std::string()); if (policy == policy::key::kUserAvatarImage) - GetUserImageManager(account_id)->OnExternalDataFetched(policy, data.Pass()); + GetUserImageManager(account_id) + ->OnExternalDataFetched(policy, std::move(data)); else if (policy == policy::key::kWallpaperImage) - WallpaperManager::Get()->OnPolicyFetched(policy, account_id, data.Pass()); + WallpaperManager::Get()->OnPolicyFetched(policy, account_id, + std::move(data)); else NOTREACHED(); }
diff --git a/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc b/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc index 8acbf4f..587cce1 100644 --- a/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc +++ b/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc
@@ -5,8 +5,8 @@ #include "chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.h" #include <stdint.h> - #include <numeric> +#include <utility> #include <vector> #include "ash/ash_constants.h" @@ -206,7 +206,7 @@ started_load_at_ = base::Time::Now(); if (default_) { - manager->DoSetDefaultWallpaper(account_id_, on_finish_.Pass()); + manager->DoSetDefaultWallpaper(account_id_, std::move(on_finish_)); } else if (!user_wallpaper_.isNull()) { ash::Shell::GetInstance() ->desktop_background_controller() @@ -217,10 +217,10 @@ base::Bind(&WallpaperManager::GetCustomWallpaperInternal, account_id_, info_, wallpaper_path_, true /* update wallpaper */, base::ThreadTaskRunnerHandle::Get(), - base::Passed(on_finish_.Pass()), + base::Passed(std::move(on_finish_)), manager->weak_factory_.GetWeakPtr())); } else if (!info_.location.empty()) { - manager->LoadWallpaper(account_id_, info_, true, on_finish_.Pass()); + manager->LoadWallpaper(account_id_, info_, true, std::move(on_finish_)); } else { // PendingWallpaper was created and never initialized? NOTREACHED(); @@ -346,10 +346,10 @@ if (ShouldUseCustomizedDefaultWallpaper()) { SetDefaultWallpaperPath(GetCustomizedWallpaperDefaultRescaledFileName( wallpaper::kSmallWallpaperSuffix), - scoped_ptr<gfx::ImageSkia>().Pass(), + scoped_ptr<gfx::ImageSkia>(), GetCustomizedWallpaperDefaultRescaledFileName( wallpaper::kLargeWallpaperSuffix), - scoped_ptr<gfx::ImageSkia>().Pass()); + scoped_ptr<gfx::ImageSkia>()); } base::CommandLine* command_line = GetCommandLine(); @@ -449,7 +449,7 @@ return; wallpaper_loader_->Start( - data.Pass(), + std::move(data), 0, // Do not crop. base::Bind(&WallpaperManager::SetPolicyControlledWallpaper, weak_factory_.GetWeakPtr(), account_id)); @@ -511,11 +511,9 @@ // TODO(bshe): This may break if RawImage becomes RefCountedMemory. blocking_task_runner->PostTask( FROM_HERE, - base::Bind(&WallpaperManager::SaveCustomWallpaper, - user_id_hash, + base::Bind(&WallpaperManager::SaveCustomWallpaper, user_id_hash, base::FilePath(wallpaper_info.location), - wallpaper_info.layout, - base::Passed(deep_copy.Pass()))); + wallpaper_info.layout, base::Passed(std::move(deep_copy)))); } std::string relative_path = base::FilePath(user_id_hash).Append(file).value(); @@ -583,8 +581,8 @@ default_wallpaper_image_.reset(); if (!file->empty()) { loaded_wallpapers_for_test_++; - StartLoadAndSetDefaultWallpaper( - *file, layout, on_finish.Pass(), &default_wallpaper_image_); + StartLoadAndSetDefaultWallpaper(*file, layout, std::move(on_finish), + &default_wallpaper_image_); return; } @@ -926,7 +924,7 @@ SetUserWallpaperInfo(account_id, info, true); if (update_wallpaper) - DoSetDefaultWallpaper(account_id, on_finish.Pass()); + DoSetDefaultWallpaper(account_id, std::move(on_finish)); return; } @@ -958,7 +956,7 @@ 0, // Do not crop. base::Bind(&WallpaperManager::OnWallpaperDecoded, weak_factory_.GetWeakPtr(), account_id, info.layout, - update_wallpaper, base::Passed(on_finish.Pass()))); + update_wallpaper, base::Passed(std::move(on_finish)))); } void WallpaperManager::SetCustomizedDefaultWallpaperAfterCheck( @@ -978,14 +976,12 @@ downloaded_file.value(), 0, // Do not crop. base::Bind(&WallpaperManager::OnCustomizedDefaultWallpaperDecoded, - weak_factory_.GetWeakPtr(), - wallpaper_url, - base::Passed(rescaled_files.Pass()))); + weak_factory_.GetWeakPtr(), wallpaper_url, + base::Passed(std::move(rescaled_files)))); } else { - SetDefaultWallpaperPath(rescaled_files->path_rescaled_small(), - scoped_ptr<gfx::ImageSkia>().Pass(), - rescaled_files->path_rescaled_large(), - scoped_ptr<gfx::ImageSkia>().Pass()); + SetDefaultWallpaperPath( + rescaled_files->path_rescaled_small(), scoped_ptr<gfx::ImageSkia>(), + rescaled_files->path_rescaled_large(), scoped_ptr<gfx::ImageSkia>()); } } @@ -1005,10 +1001,9 @@ PrefService* pref_service = g_browser_process->local_state(); pref_service->SetString(prefs::kCustomizationDefaultWallpaperURL, wallpaper_url.spec()); - SetDefaultWallpaperPath(rescaled_files->path_rescaled_small(), - small_wallpaper_image.Pass(), - rescaled_files->path_rescaled_large(), - large_wallpaper_image.Pass()); + SetDefaultWallpaperPath( + rescaled_files->path_rescaled_small(), std::move(small_wallpaper_image), + rescaled_files->path_rescaled_large(), std::move(large_wallpaper_image)); VLOG(1) << "Customized default wallpaper applied."; } @@ -1057,11 +1052,9 @@ path.value(), 0, // Do not crop. base::Bind(&WallpaperManager::OnDefaultWallpaperDecoded, - weak_factory_.GetWeakPtr(), - path, - layout, + weak_factory_.GetWeakPtr(), path, layout, base::Unretained(result_out), - base::Passed(on_finish.Pass()))); + base::Passed(std::move(on_finish)))); } void WallpaperManager::SetDefaultWallpaperPath( @@ -1104,8 +1097,7 @@ } if (need_update_screen) { - DoSetDefaultWallpaper(EmptyAccountId(), - MovableOnDestroyCallbackHolder().Pass()); + DoSetDefaultWallpaper(EmptyAccountId(), MovableOnDestroyCallbackHolder()); } }
diff --git a/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager_policy_browsertest.cc b/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager_policy_browsertest.cc index c52b3f76..07a7f86 100644 --- a/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager_policy_browsertest.cc +++ b/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager_policy_browsertest.cc
@@ -163,7 +163,7 @@ user_key_bits.size()), static_cast<int>(user_key_bits.size())); user_policy_builder->policy_data().set_username(account_id.GetUserEmail()); - return user_policy_builder.Pass(); + return user_policy_builder; } // LoginManagerTest:
diff --git a/chrome/browser/chromeos/login/wizard_controller.cc b/chrome/browser/chromeos/login/wizard_controller.cc index 932d2df..62c32e3e 100644 --- a/chrome/browser/chromeos/login/wizard_controller.cc +++ b/chrome/browser/chromeos/login/wizard_controller.cc
@@ -8,8 +8,8 @@ #include <stddef.h> #include <stdlib.h> #include <sys/types.h> - #include <string> +#include <utility> #include <vector> #include "base/bind.h" @@ -1358,7 +1358,7 @@ void WizardController::OnSharkConnected( scoped_ptr<pairing_chromeos::HostPairingController> remora_controller) { VLOG(1) << "OnSharkConnected"; - remora_controller_ = remora_controller.Pass(); + remora_controller_ = std::move(remora_controller); base::MessageLoop::current()->DeleteSoon( FROM_HERE, shark_connection_listener_.release()); shark_controller_detected_ = true;
diff --git a/chrome/browser/chromeos/login/wizard_controller_browsertest.cc b/chrome/browser/chromeos/login/wizard_controller_browsertest.cc index 28bcd45..ada3381 100644 --- a/chrome/browser/chromeos/login/wizard_controller_browsertest.cc +++ b/chrome/browser/chromeos/login/wizard_controller_browsertest.cc
@@ -917,7 +917,7 @@ void SetUpOnMainThread() override { base::PrefServiceFactory factory; factory.set_user_prefs(make_scoped_refptr(new PrefStoreStub())); - local_state_ = factory.Create(new PrefRegistrySimple()).Pass(); + local_state_ = factory.Create(new PrefRegistrySimple()); WizardController::set_local_state_for_testing(local_state_.get()); WizardControllerTest::SetUpOnMainThread();
diff --git a/chrome/browser/chromeos/mobile/mobile_activator_unittest.cc b/chrome/browser/chromeos/mobile/mobile_activator_unittest.cc index 40af942..7135da7 100644 --- a/chrome/browser/chromeos/mobile/mobile_activator_unittest.cc +++ b/chrome/browser/chromeos/mobile/mobile_activator_unittest.cc
@@ -5,6 +5,7 @@ #include "chrome/browser/chromeos/mobile/mobile_activator.h" #include <stddef.h> +#include <utility> #include "base/macros.h" #include "base/message_loop/message_loop.h" @@ -289,7 +290,7 @@ const base::Closure& success_callback, const network_handler::ErrorCallback& error_callback) { scoped_ptr<base::DictionaryValue> value; - error_callback.Run("", value.Pass()); + error_callback.Run("", std::move(value)); } TEST_F(MobileActivatorTest, OTASPScheduling) {
diff --git a/chrome/browser/chromeos/net/cert_verify_proc_chromeos.cc b/chrome/browser/chromeos/net/cert_verify_proc_chromeos.cc index 59f6a5b3..71a0d48 100644 --- a/chrome/browser/chromeos/net/cert_verify_proc_chromeos.cc +++ b/chrome/browser/chromeos/net/cert_verify_proc_chromeos.cc
@@ -4,6 +4,8 @@ #include "chrome/browser/chromeos/net/cert_verify_proc_chromeos.h" +#include <utility> + #include "net/cert/test_root_certs.h" #include "net/cert/x509_certificate.h" @@ -31,8 +33,8 @@ crypto::ScopedPK11Slot public_slot) { // Only the software slot is passed, since that is the only one where user // trust settings are stored. - profile_filter_.Init( - public_slot.Pass(), crypto::ScopedPK11Slot(), crypto::ScopedPK11Slot()); + profile_filter_.Init(std::move(public_slot), crypto::ScopedPK11Slot(), + crypto::ScopedPK11Slot()); } CertVerifyProcChromeOS::~CertVerifyProcChromeOS() {}
diff --git a/chrome/browser/chromeos/net/client_cert_filter_chromeos.cc b/chrome/browser/chromeos/net/client_cert_filter_chromeos.cc index 69b86b54..3e890712 100644 --- a/chrome/browser/chromeos/net/client_cert_filter_chromeos.cc +++ b/chrome/browser/chromeos/net/client_cert_filter_chromeos.cc
@@ -4,6 +4,8 @@ #include "chrome/browser/chromeos/net/client_cert_filter_chromeos.h" +#include <utility> + #include "base/bind.h" #include "crypto/nss_util_internal.h" #include "net/cert/x509_certificate.h" @@ -31,14 +33,13 @@ if (use_system_slot_) { system_slot_ = crypto::GetSystemNSSKeySlot( - base::Bind(&ClientCertFilterChromeOS::GotSystemSlot, - weak_ptr_factory_.GetWeakPtr())).Pass(); + base::Bind(&ClientCertFilterChromeOS::GotSystemSlot, + weak_ptr_factory_.GetWeakPtr())); } - private_slot_ = - crypto::GetPrivateSlotForChromeOSUser( - username_hash_, base::Bind(&ClientCertFilterChromeOS::GotPrivateSlot, - weak_ptr_factory_.GetWeakPtr())).Pass(); + private_slot_ = crypto::GetPrivateSlotForChromeOSUser( + username_hash_, base::Bind(&ClientCertFilterChromeOS::GotPrivateSlot, + weak_ptr_factory_.GetWeakPtr())); // If the returned slot is null, GotPrivateSlot will be called back // eventually. If it is not null, the private slot was available synchronously @@ -61,7 +62,7 @@ void ClientCertFilterChromeOS::GotSystemSlot( crypto::ScopedPK11Slot system_slot) { - system_slot_ = system_slot.Pass(); + system_slot_ = std::move(system_slot); if (InitIfSlotsAvailable() && !init_callback_.is_null()) { init_callback_.Run(); init_callback_.Reset(); @@ -71,7 +72,7 @@ void ClientCertFilterChromeOS::GotPrivateSlot( crypto::ScopedPK11Slot private_slot) { waiting_for_private_slot_ = false; - private_slot_ = private_slot.Pass(); + private_slot_ = std::move(private_slot); if (InitIfSlotsAvailable() && !init_callback_.is_null()) { init_callback_.Run(); init_callback_.Reset(); @@ -82,8 +83,7 @@ if ((use_system_slot_ && !system_slot_) || waiting_for_private_slot_) return false; nss_profile_filter_.Init(crypto::GetPublicSlotForChromeOSUser(username_hash_), - private_slot_.Pass(), - system_slot_.Pass()); + std::move(private_slot_), std::move(system_slot_)); return true; }
diff --git a/chrome/browser/chromeos/net/client_cert_store_chromeos.cc b/chrome/browser/chromeos/net/client_cert_store_chromeos.cc index 86b40643..300cd69 100644 --- a/chrome/browser/chromeos/net/client_cert_store_chromeos.cc +++ b/chrome/browser/chromeos/net/client_cert_store_chromeos.cc
@@ -6,6 +6,7 @@ #include <cert.h> #include <algorithm> +#include <utility> #include "base/bind.h" #include "base/bind_helpers.h" @@ -39,7 +40,8 @@ scoped_ptr<CertificateProvider> cert_provider, scoped_ptr<CertFilter> cert_filter, const PasswordDelegateFactory& password_delegate_factory) - : cert_provider_(cert_provider.Pass()), cert_filter_(cert_filter.Pass()) {} + : cert_provider_(std::move(cert_provider)), + cert_filter_(std::move(cert_filter)) {} ClientCertStoreChromeOS::~ClientCertStoreChromeOS() {} @@ -99,7 +101,7 @@ net::CertificateList* selected_certs) { net::CertificateList unfiltered_certs; net::ClientCertStoreNSS::GetPlatformCertsOnWorkerThread( - password_delegate.Pass(), &unfiltered_certs); + std::move(password_delegate), &unfiltered_certs); unfiltered_certs.erase( std::remove_if(unfiltered_certs.begin(), unfiltered_certs.end(),
diff --git a/chrome/browser/chromeos/net/network_portal_detector_impl.cc b/chrome/browser/chromeos/net/network_portal_detector_impl.cc index fa99dc0..394fc91e 100644 --- a/chrome/browser/chromeos/net/network_portal_detector_impl.cc +++ b/chrome/browser/chromeos/net/network_portal_detector_impl.cc
@@ -319,7 +319,7 @@ PortalDetectorStrategy::StrategyId id) { if (id == strategy_->Id()) return; - strategy_ = PortalDetectorStrategy::CreateById(id, this).Pass(); + strategy_ = PortalDetectorStrategy::CreateById(id, this); StopDetection(); StartDetectionIfIdle(); }
diff --git a/chrome/browser/chromeos/net/network_portal_notification_controller.cc b/chrome/browser/chromeos/net/network_portal_notification_controller.cc index d9b913e6..ebe95ba7 100644 --- a/chrome/browser/chromeos/net/network_portal_notification_controller.cc +++ b/chrome/browser/chromeos/net/network_portal_notification_controller.cc
@@ -354,7 +354,7 @@ base::UTF8ToUTF16(network->name())), icon, base::string16(), GURL(), notifier_id, data, delegate.get())); notification->SetSystemPriority(); - return notification.Pass(); + return notification; } scoped_ptr<message_center::Notification> NetworkPortalNotificationController:: @@ -404,7 +404,7 @@ notificationText, icon, base::string16() /* display_source */, GURL(), notifier_id, data, delegate.get())); notification->SetSystemPriority(); - return notification.Pass(); + return notification; } scoped_ptr<Notification> NetworkPortalNotificationController::GetNotification(
diff --git a/chrome/browser/chromeos/ownership/owner_settings_service_chromeos.cc b/chrome/browser/chromeos/ownership/owner_settings_service_chromeos.cc index 56151cc6..5007461 100644 --- a/chrome/browser/chromeos/ownership/owner_settings_service_chromeos.cc +++ b/chrome/browser/chromeos/ownership/owner_settings_service_chromeos.cc
@@ -6,9 +6,9 @@ #include <keyhi.h> #include <stdint.h> - #include <algorithm> #include <string> +#include <utility> #include "base/bind.h" #include "base/bind_helpers.h" @@ -474,7 +474,7 @@ if (!settings->SerializeToString(policy->mutable_policy_value())) return scoped_ptr<em::PolicyData>(); - return policy.Pass(); + return policy; } // static @@ -779,7 +779,7 @@ has_pending_management_settings_ = false; bool rv = AssembleAndSignPolicyAsync( - content::BrowserThread::GetBlockingPool(), policy.Pass(), + content::BrowserThread::GetBlockingPool(), std::move(policy), base::Bind(&OwnerSettingsServiceChromeOS::OnPolicyAssembledAndSigned, store_settings_factory_.GetWeakPtr())); if (!rv) @@ -793,10 +793,9 @@ return; } device_settings_service_->Store( - policy_response.Pass(), + std::move(policy_response), base::Bind(&OwnerSettingsServiceChromeOS::OnSignedPolicyStored, - store_settings_factory_.GetWeakPtr(), - true /* success */)); + store_settings_factory_.GetWeakPtr(), true /* success */)); } void OwnerSettingsServiceChromeOS::OnSignedPolicyStored(bool success) {
diff --git a/chrome/browser/chromeos/platform_keys/key_permissions.cc b/chrome/browser/chromeos/platform_keys/key_permissions.cc index e080a63..605db91 100644 --- a/chrome/browser/chromeos/platform_keys/key_permissions.cc +++ b/chrome/browser/chromeos/platform_keys/key_permissions.cc
@@ -4,6 +4,8 @@ #include "chrome/browser/chromeos/platform_keys/key_permissions.h" +#include <utility> + #include "base/base64.h" #include "base/bind.h" #include "base/callback.h" @@ -293,7 +295,7 @@ } new_state->Append(new_entry.release()); } - return new_state.Pass(); + return std::move(new_state); } KeyPermissions::PermissionsForExtension::KeyEntry* @@ -373,14 +375,15 @@ const std::string& extension_id, const PermissionsCallback& callback, scoped_ptr<base::Value> value) { - callback.Run(make_scoped_ptr(new PermissionsForExtension( - extension_id, value.Pass(), profile_prefs_, profile_policies_, this))); + callback.Run(make_scoped_ptr( + new PermissionsForExtension(extension_id, std::move(value), + profile_prefs_, profile_policies_, this))); } void KeyPermissions::SetPlatformKeysOfExtension(const std::string& extension_id, scoped_ptr<base::Value> value) { extensions_state_store_->SetExtensionValue( - extension_id, kStateStorePlatformKeys, value.Pass()); + extension_id, kStateStorePlatformKeys, std::move(value)); } const base::DictionaryValue* KeyPermissions::GetPrefsEntry(
diff --git a/chrome/browser/chromeos/platform_keys/platform_keys_nss.cc b/chrome/browser/chromeos/platform_keys/platform_keys_nss.cc index 6ed2898..d1d9877 100644 --- a/chrome/browser/chromeos/platform_keys/platform_keys_nss.cc +++ b/chrome/browser/chromeos/platform_keys/platform_keys_nss.cc
@@ -10,6 +10,7 @@ #include <secder.h> #include <stddef.h> #include <stdint.h> +#include <utility> #include "base/bind.h" #include "base/bind_helpers.h" @@ -541,7 +542,7 @@ void DidSelectCertificatesOnIOThread( scoped_ptr<SelectCertificatesState> state) { DCHECK_CURRENTLY_ON(BrowserThread::IO); - state->CallBack(FROM_HERE, state->certs_.Pass(), + state->CallBack(FROM_HERE, std::move(state->certs_), std::string() /* no error */); } @@ -583,7 +584,8 @@ client_certs->push_back(*it); } - state->CallBack(FROM_HERE, client_certs.Pass(), std::string() /* no error */); + state->CallBack(FROM_HERE, std::move(client_certs), + std::string() /* no error */); } // Passes the obtained certificates to the worker thread for filtering. Used by @@ -591,7 +593,7 @@ void DidGetCertificates(scoped_ptr<GetCertificatesState> state, scoped_ptr<net::CertificateList> all_certs) { DCHECK_CURRENTLY_ON(BrowserThread::IO); - state->certs_ = all_certs.Pass(); + state->certs_ = std::move(all_certs); base::WorkerPool::PostTask( FROM_HERE, base::Bind(&FilterCertificatesOnWorkerThread, base::Passed(&state)), @@ -691,7 +693,8 @@ if (cert_db->GetSystemSlot()) token_ids->push_back(kTokenIdSystem); - state->CallBack(FROM_HERE, token_ids.Pass(), std::string() /* no error */); + state->CallBack(FROM_HERE, std::move(token_ids), + std::string() /* no error */); } } // namespace
diff --git a/chrome/browser/chromeos/platform_keys/platform_keys_service.cc b/chrome/browser/chromeos/platform_keys/platform_keys_service.cc index 8d73702..0eae654e 100644 --- a/chrome/browser/chromeos/platform_keys/platform_keys_service.cc +++ b/chrome/browser/chromeos/platform_keys/platform_keys_service.cc
@@ -135,7 +135,7 @@ void GotPermissions(scoped_ptr<KeyPermissions::PermissionsForExtension> extension_permissions) { - extension_permissions_ = extension_permissions.Pass(); + extension_permissions_ = std::move(extension_permissions); DoStep(); } @@ -234,7 +234,7 @@ void GotPermissions(scoped_ptr<KeyPermissions::PermissionsForExtension> extension_permissions) { - extension_permissions_ = extension_permissions.Pass(); + extension_permissions_ = std::move(extension_permissions); DoStep(); } @@ -310,7 +310,7 @@ KeyPermissions* key_permissions, PlatformKeysService* service) : request_(request), - input_client_certificates_(input_client_certificates.Pass()), + input_client_certificates_(std::move(input_client_certificates)), interactive_(interactive), extension_id_(extension_id), callback_(callback), @@ -372,7 +372,7 @@ void GotPermissions(scoped_ptr<KeyPermissions::PermissionsForExtension> extension_permissions) { - extension_permissions_ = extension_permissions.Pass(); + extension_permissions_ = std::move(extension_permissions); DoStep(); } @@ -515,7 +515,7 @@ // necessary but this ensures that the permissions were updated correctly. CHECK(!selected_cert_ || (filtered_certs->size() == 1 && filtered_certs->front() == selected_cert_)); - callback_.Run(filtered_certs.Pass(), std::string() /* no error */); + callback_.Run(std::move(filtered_certs), std::string() /* no error */); DoStep(); } @@ -564,7 +564,7 @@ void PlatformKeysService::SetSelectDelegate( scoped_ptr<SelectDelegate> delegate) { - select_delegate_ = delegate.Pass(); + select_delegate_ = std::move(delegate); } void PlatformKeysService::GenerateRSAKey(const std::string& token_id, @@ -611,8 +611,8 @@ content::WebContents* web_contents) { DCHECK_CURRENTLY_ON(BrowserThread::UI); StartOrQueueTask(make_scoped_ptr(new SelectTask( - request, client_certificates.Pass(), interactive, extension_id, callback, - web_contents, &key_permissions_, this))); + request, std::move(client_certificates), interactive, extension_id, + callback, web_contents, &key_permissions_, this))); } void PlatformKeysService::StartOrQueueTask(scoped_ptr<Task> task) {
diff --git a/chrome/browser/chromeos/policy/affiliated_cloud_policy_invalidator_unittest.cc b/chrome/browser/chromeos/policy/affiliated_cloud_policy_invalidator_unittest.cc index d2052235..d49a647d 100644 --- a/chrome/browser/chromeos/policy/affiliated_cloud_policy_invalidator_unittest.cc +++ b/chrome/browser/chromeos/policy/affiliated_cloud_policy_invalidator_unittest.cc
@@ -5,8 +5,8 @@ #include "chrome/browser/chromeos/policy/affiliated_cloud_policy_invalidator.h" #include <stdint.h> - #include <string> +#include <utility> #include "base/macros.h" #include "base/run_loop.h" @@ -90,7 +90,7 @@ EXPECT_CALL(*policy_client, SetupRegistration("token", "device-id")) .WillOnce(WithArgs<1>(Invoke(policy_client, &MockCloudPolicyClient::SetDMToken))); - core.Connect(policy_client_owner.Pass()); + core.Connect(std::move(policy_client_owner)); Mock::VerifyAndClearExpectations(&policy_client); core.StartRefreshScheduler();
diff --git a/chrome/browser/chromeos/policy/affiliated_invalidation_service_provider_impl_unittest.cc b/chrome/browser/chromeos/policy/affiliated_invalidation_service_provider_impl_unittest.cc index fdd9d15..b112fa9 100644 --- a/chrome/browser/chromeos/policy/affiliated_invalidation_service_provider_impl_unittest.cc +++ b/chrome/browser/chromeos/policy/affiliated_invalidation_service_provider_impl_unittest.cc
@@ -5,6 +5,7 @@ #include "chrome/browser/chromeos/policy/affiliated_invalidation_service_provider_impl.h" #include <string> +#include <utility> #include "base/macros.h" #include "base/memory/scoped_ptr.h" @@ -50,7 +51,7 @@ invalidation_service->SetInvalidatorState( syncer::TRANSIENT_INVALIDATION_ERROR); return make_scoped_ptr(new invalidation::ProfileInvalidationProvider( - invalidation_service.Pass())); + std::move(invalidation_service))); } } // namespace
diff --git a/chrome/browser/chromeos/policy/blocking_login_browsertest.cc b/chrome/browser/chromeos/policy/blocking_login_browsertest.cc index b6f7972..a57f3ac 100644 --- a/chrome/browser/chromeos/policy/blocking_login_browsertest.cc +++ b/chrome/browser/chromeos/policy/blocking_login_browsertest.cc
@@ -177,7 +177,7 @@ } } - return response.Pass(); + return response; } // Creates a new canned response that will respond with the given HTTP
diff --git a/chrome/browser/chromeos/policy/browser_policy_connector_chromeos.cc b/chrome/browser/chromeos/policy/browser_policy_connector_chromeos.cc index 8ed5b15..ff1db857 100644 --- a/chrome/browser/chromeos/policy/browser_policy_connector_chromeos.cc +++ b/chrome/browser/chromeos/policy/browser_policy_connector_chromeos.cc
@@ -5,6 +5,8 @@ #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" #include <string> +#include <utility> + #include "base/bind.h" #include "base/command_line.h" #include "base/files/file_path.h" @@ -139,8 +141,8 @@ install_attributes_.get(), GetBackgroundTaskRunner())); device_cloud_policy_manager_ = new DeviceCloudPolicyManagerChromeOS( - device_cloud_policy_store.Pass(), base::ThreadTaskRunnerHandle::Get(), - state_keys_broker_.get()); + std::move(device_cloud_policy_store), + base::ThreadTaskRunnerHandle::Get(), state_keys_broker_.get()); AddPolicyProvider( scoped_ptr<ConfigurationPolicyProvider>(device_cloud_policy_manager_)); } @@ -168,7 +170,7 @@ new DeviceManagementServiceConfiguration( GetDeviceManagementServerUrlForConsumer())); consumer_device_management_service_.reset( - new DeviceManagementService(configuration.Pass())); + new DeviceManagementService(std::move(configuration))); consumer_device_management_service_->ScheduleInitialization( kServiceInitializationStartupDelay); } @@ -291,12 +293,12 @@ void BrowserPolicyConnectorChromeOS::SetConsumerManagementServiceForTesting( scoped_ptr<ConsumerManagementService> service) { - consumer_management_service_ = service.Pass(); + consumer_management_service_ = std::move(service); } void BrowserPolicyConnectorChromeOS::SetDeviceCloudPolicyInitializerForTesting( scoped_ptr<DeviceCloudPolicyInitializer> initializer) { - device_cloud_policy_initializer_ = initializer.Pass(); + device_cloud_policy_initializer_ = std::move(initializer); } // static
diff --git a/chrome/browser/chromeos/policy/cloud_external_data_manager_base.cc b/chrome/browser/chromeos/policy/cloud_external_data_manager_base.cc index 82cc488..eafe096 100644 --- a/chrome/browser/chromeos/policy/cloud_external_data_manager_base.cc +++ b/chrome/browser/chromeos/policy/cloud_external_data_manager_base.cc
@@ -6,9 +6,9 @@ #include <stddef.h> #include <stdint.h> - #include <map> #include <string> +#include <utility> #include <vector> #include "base/bind.h" @@ -171,8 +171,7 @@ scoped_ptr<ExternalPolicyDataFetcher> external_policy_data_fetcher) { DCHECK(!updater_); updater_.reset(new ExternalPolicyDataUpdater( - task_runner_, - external_policy_data_fetcher.Pass(), + task_runner_, std::move(external_policy_data_fetcher), kMaxParallelFetches)); for (FetchCallbackMap::const_iterator it = pending_downloads_.begin(); it != pending_downloads_.end(); ++it) { @@ -267,7 +266,7 @@ data.get())) { // If the external data referenced by |policy| exists in the cache and // matches the expected hash, pass it to the callback. - RunCallback(callback, data.Pass()); + RunCallback(callback, std::move(data)); return; }
diff --git a/chrome/browser/chromeos/policy/cloud_external_data_manager_base_test_util.cc b/chrome/browser/chromeos/policy/cloud_external_data_manager_base_test_util.cc index 5672fa8..4fa0f3e 100644 --- a/chrome/browser/chromeos/policy/cloud_external_data_manager_base_test_util.cc +++ b/chrome/browser/chromeos/policy/cloud_external_data_manager_base_test_util.cc
@@ -4,6 +4,8 @@ #include "chrome/browser/chromeos/policy/cloud_external_data_manager_base_test_util.h" +#include <utility> + #include "base/callback.h" #include "base/memory/weak_ptr.h" #include "base/strings/string_number_conversions.h" @@ -23,7 +25,7 @@ void ExternalDataFetchCallback(scoped_ptr<std::string>* destination, const base::Closure& done_callback, scoped_ptr<std::string> data) { - *destination = data.Pass(); + *destination = std::move(data); done_callback.Run(); } @@ -35,7 +37,7 @@ metadata->SetStringWithoutPathExpansion("url", url); metadata->SetStringWithoutPathExpansion("hash", base::HexEncode(hash.c_str(), hash.size())); - return metadata.Pass(); + return metadata; } void SetExternalDataReference(CloudPolicyCore* core,
diff --git a/chrome/browser/chromeos/policy/cloud_external_data_manager_base_unittest.cc b/chrome/browser/chromeos/policy/cloud_external_data_manager_base_unittest.cc index d4cb4a8..4749636 100644 --- a/chrome/browser/chromeos/policy/cloud_external_data_manager_base_unittest.cc +++ b/chrome/browser/chromeos/policy/cloud_external_data_manager_base_unittest.cc
@@ -97,7 +97,7 @@ net::FakeURLFetcherFactory::CreateURLFetcher(id, url, request_type, delegate); EXPECT_TRUE(fetcher); - return fetcher.Pass(); + return fetcher; } } // namespace @@ -204,7 +204,7 @@ metadata->SetStringWithoutPathExpansion("url", url); metadata->SetStringWithoutPathExpansion("hash", base::HexEncode(hash.c_str(), hash.size())); - return metadata.Pass(); + return metadata; } void CloudExternalDataManagerBaseTest::SetExternalDataReference(
diff --git a/chrome/browser/chromeos/policy/cloud_external_data_policy_observer.cc b/chrome/browser/chromeos/policy/cloud_external_data_policy_observer.cc index bb0881d..8b2d4fd 100644 --- a/chrome/browser/chromeos/policy/cloud_external_data_policy_observer.cc +++ b/chrome/browser/chromeos/policy/cloud_external_data_policy_observer.cc
@@ -5,6 +5,7 @@ #include "chrome/browser/chromeos/policy/cloud_external_data_policy_observer.h" #include <set> +#include <utility> #include <vector> #include "base/bind.h" @@ -311,7 +312,7 @@ FetchWeakPtrMap::iterator it = fetch_weak_ptrs_.find(user_id); DCHECK(it != fetch_weak_ptrs_.end()); fetch_weak_ptrs_.erase(it); - delegate_->OnExternalDataFetched(policy_, user_id, data.Pass()); + delegate_->OnExternalDataFetched(policy_, user_id, std::move(data)); } } // namespace policy
diff --git a/chrome/browser/chromeos/policy/configuration_policy_handler_chromeos.cc b/chrome/browser/chromeos/policy/configuration_policy_handler_chromeos.cc index 2c7642e..ca22ba6f 100644 --- a/chrome/browser/chromeos/policy/configuration_policy_handler_chromeos.cc +++ b/chrome/browser/chromeos/policy/configuration_policy_handler_chromeos.cc
@@ -5,8 +5,8 @@ #include "chrome/browser/chromeos/policy/configuration_policy_handler_chromeos.h" #include <stdint.h> - #include <string> +#include <utility> #include <vector> #include "base/callback.h" @@ -255,7 +255,7 @@ // Currently, only the per-network configuration is stored in a pref. Ignore // |global_network_config| and |certificates|. - prefs->SetValue(pref_path_, network_configs.Pass()); + prefs->SetValue(pref_path_, std::move(network_configs)); } void NetworkConfigurationPolicyHandler::PrepareForDisplaying( @@ -329,7 +329,7 @@ pinned_apps_list->Append(app_dict); } } - prefs->SetValue(pref_path(), pinned_apps_list.Pass()); + prefs->SetValue(pref_path(), std::move(pinned_apps_list)); } } @@ -417,35 +417,35 @@ value = GetValue(dict, kScreenDimDelayAC); if (value) - prefs->SetValue(prefs::kPowerAcScreenDimDelayMs, value.Pass()); + prefs->SetValue(prefs::kPowerAcScreenDimDelayMs, std::move(value)); value = GetValue(dict, kScreenOffDelayAC); if (value) - prefs->SetValue(prefs::kPowerAcScreenOffDelayMs, value.Pass()); + prefs->SetValue(prefs::kPowerAcScreenOffDelayMs, std::move(value)); value = GetValue(dict, kIdleWarningDelayAC); if (value) - prefs->SetValue(prefs::kPowerAcIdleWarningDelayMs, value.Pass()); + prefs->SetValue(prefs::kPowerAcIdleWarningDelayMs, std::move(value)); value = GetValue(dict, kIdleDelayAC); if (value) - prefs->SetValue(prefs::kPowerAcIdleDelayMs, value.Pass()); + prefs->SetValue(prefs::kPowerAcIdleDelayMs, std::move(value)); value = GetAction(dict, kIdleActionAC); if (value) - prefs->SetValue(prefs::kPowerAcIdleAction, value.Pass()); + prefs->SetValue(prefs::kPowerAcIdleAction, std::move(value)); value = GetValue(dict, kScreenDimDelayBattery); if (value) - prefs->SetValue(prefs::kPowerBatteryScreenDimDelayMs, value.Pass()); + prefs->SetValue(prefs::kPowerBatteryScreenDimDelayMs, std::move(value)); value = GetValue(dict, kScreenOffDelayBattery); if (value) - prefs->SetValue(prefs::kPowerBatteryScreenOffDelayMs, value.Pass()); + prefs->SetValue(prefs::kPowerBatteryScreenOffDelayMs, std::move(value)); value = GetValue(dict, kIdleWarningDelayBattery); if (value) - prefs->SetValue(prefs::kPowerBatteryIdleWarningDelayMs, value.Pass()); + prefs->SetValue(prefs::kPowerBatteryIdleWarningDelayMs, std::move(value)); value = GetValue(dict, kIdleDelayBattery); if (value) - prefs->SetValue(prefs::kPowerBatteryIdleDelayMs, value.Pass()); + prefs->SetValue(prefs::kPowerBatteryIdleDelayMs, std::move(value)); value = GetAction(dict, kIdleActionBattery); if (value) - prefs->SetValue(prefs::kPowerBatteryIdleAction, value.Pass()); + prefs->SetValue(prefs::kPowerBatteryIdleAction, std::move(value)); } ScreenLockDelayPolicyHandler::ScreenLockDelayPolicyHandler( @@ -474,10 +474,10 @@ value = GetValue(dict, kScreenLockDelayAC); if (value) - prefs->SetValue(prefs::kPowerAcScreenLockDelayMs, value.Pass()); + prefs->SetValue(prefs::kPowerAcScreenLockDelayMs, std::move(value)); value = GetValue(dict, kScreenLockDelayBattery); if (value) - prefs->SetValue(prefs::kPowerBatteryScreenLockDelayMs, value.Pass()); + prefs->SetValue(prefs::kPowerBatteryScreenLockDelayMs, std::move(value)); } } // namespace policy
diff --git a/chrome/browser/chromeos/policy/consumer_unenrollment_handler_unittest.cc b/chrome/browser/chromeos/policy/consumer_unenrollment_handler_unittest.cc index c9717879..17143896c 100644 --- a/chrome/browser/chromeos/policy/consumer_unenrollment_handler_unittest.cc +++ b/chrome/browser/chromeos/policy/consumer_unenrollment_handler_unittest.cc
@@ -4,6 +4,8 @@ #include "chrome/browser/chromeos/policy/consumer_unenrollment_handler.h" +#include <utility> + #include "base/bind.h" #include "base/bind_helpers.h" #include "base/memory/scoped_ptr.h" @@ -56,8 +58,7 @@ install_attributes_.get(), base::ThreadTaskRunnerHandle::Get())); fake_manager_.reset(new FakeDeviceCloudPolicyManager( - store_.Pass(), - base::ThreadTaskRunnerHandle::Get())); + std::move(store_), base::ThreadTaskRunnerHandle::Get())); // Set up FakeOwnerSettingsService. fake_owner_settings_service_.reset(new chromeos::FakeOwnerSettingsService(
diff --git a/chrome/browser/chromeos/policy/device_cloud_policy_initializer.cc b/chrome/browser/chromeos/policy/device_cloud_policy_initializer.cc index f5af5d2..1f42f98 100644 --- a/chrome/browser/chromeos/policy/device_cloud_policy_initializer.cc +++ b/chrome/browser/chromeos/policy/device_cloud_policy_initializer.cc
@@ -4,6 +4,8 @@ #include "chrome/browser/chromeos/policy/device_cloud_policy_initializer.h" +#include <utility> + #include "base/bind.h" #include "base/bind_helpers.h" #include "base/callback.h" @@ -211,7 +213,7 @@ enrollment_handler_.reset(); if (status.status() == EnrollmentStatus::STATUS_SUCCESS) { - StartConnection(client.Pass()); + StartConnection(std::move(client)); } else { // Some attempts to create a client may be blocked because the enrollment // was in progress. We give it a try again. @@ -260,7 +262,7 @@ void DeviceCloudPolicyInitializer::StartConnection( scoped_ptr<CloudPolicyClient> client) { if (!manager_->core()->service()) - manager_->StartConnection(client.Pass(), install_attributes_); + manager_->StartConnection(std::move(client), install_attributes_); } } // namespace policy
diff --git a/chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.cc b/chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.cc index 8e4853b18..f00e68f8 100644 --- a/chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.cc +++ b/chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.cc
@@ -5,6 +5,7 @@ #include "chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.h" #include <stddef.h> +#include <utility> #include "base/bind.h" #include "base/bind_helpers.h" @@ -116,11 +117,10 @@ task_runner, BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE), BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)), - device_store_(store.Pass()), + device_store_(std::move(store)), state_keys_broker_(state_keys_broker), task_runner_(task_runner), - local_state_(nullptr) { -} + local_state_(nullptr) {} DeviceCloudPolicyManagerChromeOS::~DeviceCloudPolicyManagerChromeOS() {} @@ -250,7 +250,7 @@ if (ForcedReEnrollmentEnabled()) client_to_connect->SetStateKeysToUpload(state_keys_broker_->state_keys()); - core()->Connect(client_to_connect.Pass()); + core()->Connect(std::move(client_to_connect)); core()->StartRefreshScheduler(); core()->StartRemoteCommandsService( scoped_ptr<RemoteCommandsFactory>(new DeviceCommandsFactoryChromeOS()));
diff --git a/chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos_unittest.cc b/chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos_unittest.cc index e383d94a4..a258309e 100644 --- a/chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos_unittest.cc +++ b/chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos_unittest.cc
@@ -5,8 +5,8 @@ #include "chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.h" #include <stdint.h> - #include <algorithm> +#include <utility> #include "base/bind.h" #include "base/bind_helpers.h" @@ -83,8 +83,9 @@ scoped_ptr<DeviceCloudPolicyStoreChromeOS> store, const scoped_refptr<base::SequencedTaskRunner>& task_runner, ServerBackedStateKeysBroker* state_keys_broker) - : DeviceCloudPolicyManagerChromeOS( - store.Pass(), task_runner, state_keys_broker) {} + : DeviceCloudPolicyManagerChromeOS(std::move(store), + task_runner, + state_keys_broker) {} ~TestingDeviceCloudPolicyManagerChromeOS() override {} };
diff --git a/chrome/browser/chromeos/policy/device_cloud_policy_store_chromeos.cc b/chrome/browser/chromeos/policy/device_cloud_policy_store_chromeos.cc index 71841dab..3f64fc5 100644 --- a/chrome/browser/chromeos/policy/device_cloud_policy_store_chromeos.cc +++ b/chrome/browser/chromeos/policy/device_cloud_policy_store_chromeos.cc
@@ -4,6 +4,8 @@ #include "chrome/browser/chromeos/policy/device_cloud_policy_store_chromeos.h" +#include <utility> + #include "base/bind.h" #include "base/logging.h" #include "base/metrics/histogram.h" @@ -112,7 +114,7 @@ validator->ValidateDomain(install_attributes_->GetDomain()); validator->ValidatePolicyType(dm_protocol::kChromeDevicePolicyType); validator->ValidatePayload(); - return validator.Pass(); + return validator; } void DeviceCloudPolicyStoreChromeOS::OnPolicyToStoreValidated( @@ -125,7 +127,7 @@ } device_settings_service_->Store( - validator->policy().Pass(), + std::move(validator->policy()), base::Bind(&DeviceCloudPolicyStoreChromeOS::OnPolicyStored, weak_factory_.GetWeakPtr())); }
diff --git a/chrome/browser/chromeos/policy/device_local_account_browsertest.cc b/chrome/browser/chromeos/policy/device_local_account_browsertest.cc index 8d7c527..d628acd 100644 --- a/chrome/browser/chromeos/policy/device_local_account_browsertest.cc +++ b/chrome/browser/chromeos/policy/device_local_account_browsertest.cc
@@ -2,11 +2,13 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include <stddef.h> +#include "chrome/browser/chromeos/policy/device_local_account.h" +#include <stddef.h> #include <map> #include <set> #include <string> +#include <utility> #include <vector> #include "ash/shell.h" @@ -58,7 +60,6 @@ #include "chrome/browser/chromeos/login/wizard_controller.h" #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" #include "chrome/browser/chromeos/policy/cloud_external_data_manager_base_test_util.h" -#include "chrome/browser/chromeos/policy/device_local_account.h" #include "chrome/browser/chromeos/policy/device_local_account_policy_service.h" #include "chrome/browser/chromeos/policy/device_policy_builder.h" #include "chrome/browser/chromeos/policy/device_policy_cros_browser_test.h" @@ -337,7 +338,7 @@ http_response->set_code(net::HTTP_OK); http_response->set_content(content); http_response->set_content_type("text/xml"); - return http_response.Pass(); + return std::move(http_response); } TestingUpdateManifestProvider::~TestingUpdateManifestProvider() {
diff --git a/chrome/browser/chromeos/policy/device_local_account_policy_provider.cc b/chrome/browser/chromeos/policy/device_local_account_policy_provider.cc index cf5d3db..e00adae 100644 --- a/chrome/browser/chromeos/policy/device_local_account_policy_provider.cc +++ b/chrome/browser/chromeos/policy/device_local_account_policy_provider.cc
@@ -4,6 +4,8 @@ #include "chrome/browser/chromeos/policy/device_local_account_policy_provider.h" +#include <utility> + #include "base/bind.h" #include "base/values.h" #include "chrome/browser/chromeos/policy/device_local_account.h" @@ -26,7 +28,7 @@ scoped_ptr<PolicyMap> chrome_policy_overrides) : user_id_(user_id), service_(service), - chrome_policy_overrides_(chrome_policy_overrides.Pass()), + chrome_policy_overrides_(std::move(chrome_policy_overrides)), store_initialized_(false), waiting_for_policy_refresh_(false), weak_factory_(this) { @@ -96,8 +98,8 @@ scoped_ptr<DeviceLocalAccountPolicyProvider> provider( new DeviceLocalAccountPolicyProvider(user_id, device_local_account_policy_service, - chrome_policy_overrides.Pass())); - return provider.Pass(); + std::move(chrome_policy_overrides))); + return provider; } bool DeviceLocalAccountPolicyProvider::IsInitializationComplete( @@ -184,7 +186,7 @@ } } - UpdatePolicy(bundle.Pass()); + UpdatePolicy(std::move(bundle)); } } // namespace policy
diff --git a/chrome/browser/chromeos/policy/device_local_account_policy_service.cc b/chrome/browser/chromeos/policy/device_local_account_policy_service.cc index d513998..5463d6e 100644 --- a/chrome/browser/chromeos/policy/device_local_account_policy_service.cc +++ b/chrome/browser/chromeos/policy/device_local_account_policy_service.cc
@@ -4,6 +4,7 @@ #include "chrome/browser/chromeos/policy/device_local_account_policy_service.h" +#include <utility> #include <vector> #include "base/bind.h" @@ -74,7 +75,7 @@ device_management_service, request_context)); client->SetupRegistration(policy_data->request_token(), policy_data->device_id()); - return client.Pass(); + return client; } // Get the subdirectory of the force-installed extension cache and the component @@ -127,7 +128,7 @@ account_id_(account.account_id), user_id_(account.user_id), component_policy_cache_path_(component_policy_cache_path), - store_(store.Pass()), + store_(std::move(store)), extension_tracker_(account, store_.get(), &schema_registry_), external_data_manager_(external_data_manager), core_(dm_protocol::kChromePublicAccountPolicyType, @@ -181,7 +182,7 @@ return; CreateComponentCloudPolicyService(request_context, client.get()); - core_.Connect(client.Pass()); + core_.Connect(std::move(client)); external_data_manager_->Connect(request_context); core_.StartRefreshScheduler(); UpdateRefreshDelay(); @@ -238,14 +239,9 @@ content::BrowserThread::FILE))); component_policy_service_.reset(new ComponentCloudPolicyService( - this, - &schema_registry_, - core(), - client, - resource_cache.Pass(), - request_context, - content::BrowserThread::GetMessageLoopProxyForThread( - content::BrowserThread::FILE), + this, &schema_registry_, core(), client, std::move(resource_cache), + request_context, content::BrowserThread::GetMessageLoopProxyForThread( + content::BrowserThread::FILE), content::BrowserThread::GetMessageLoopProxyForThread( content::BrowserThread::IO))); } @@ -467,16 +463,12 @@ external_data_service_->GetExternalDataManager(it->account_id, store.get()); broker.reset(new DeviceLocalAccountPolicyBroker( - *it, - component_policy_cache_root_.Append( - GetCacheSubdirectoryForAccountID(it->account_id)), - store.Pass(), - external_data_manager, + *it, component_policy_cache_root_.Append( + GetCacheSubdirectoryForAccountID(it->account_id)), + std::move(store), external_data_manager, base::Bind(&DeviceLocalAccountPolicyService::NotifyPolicyUpdated, - base::Unretained(this), - it->user_id), - base::ThreadTaskRunnerHandle::Get(), - invalidation_service_provider_)); + base::Unretained(this), it->user_id), + base::ThreadTaskRunnerHandle::Get(), invalidation_service_provider_)); } // Fire up the cloud connection for fetching policy for the account from
diff --git a/chrome/browser/chromeos/policy/device_local_account_policy_store.cc b/chrome/browser/chromeos/policy/device_local_account_policy_store.cc index a56b1b09..ca88b669 100644 --- a/chrome/browser/chromeos/policy/device_local_account_policy_store.cc +++ b/chrome/browser/chromeos/policy/device_local_account_policy_store.cc
@@ -4,6 +4,8 @@ #include "chrome/browser/chromeos/policy/device_local_account_policy_store.h" +#include <utility> + #include "base/bind.h" #include "base/callback.h" #include "chrome/browser/browser_process.h" @@ -61,8 +63,7 @@ scoped_ptr<em::PolicyFetchResponse> policy(new em::PolicyFetchResponse()); if (policy->ParseFromString(policy_blob)) { CheckKeyAndValidate( - false, - policy.Pass(), + false, std::move(policy), base::Bind(&DeviceLocalAccountPolicyStore::UpdatePolicy, weak_factory_.GetWeakPtr())); } else { @@ -81,7 +82,8 @@ return; } - InstallPolicy(validator->policy_data().Pass(), validator->payload().Pass()); + InstallPolicy(std::move(validator->policy_data()), + std::move(validator->payload())); status_ = STATUS_OK; NotifyStoreLoaded(); } @@ -148,7 +150,7 @@ } scoped_ptr<UserCloudPolicyValidator> validator( - UserCloudPolicyValidator::Create(policy_response.Pass(), + UserCloudPolicyValidator::Create(std::move(policy_response), background_task_runner())); validator->ValidateUsername(account_id_, false); validator->ValidatePolicyType(dm_protocol::kChromePublicAccountPolicyType);
diff --git a/chrome/browser/chromeos/policy/device_network_configuration_updater.cc b/chrome/browser/chromeos/policy/device_network_configuration_updater.cc index ba867169..6acddad 100644 --- a/chrome/browser/chromeos/policy/device_network_configuration_updater.cc +++ b/chrome/browser/chromeos/policy/device_network_configuration_updater.cc
@@ -30,7 +30,7 @@ network_device_handler, cros_settings)); updater->Init(); - return updater.Pass(); + return updater; } DeviceNetworkConfigurationUpdater::DeviceNetworkConfigurationUpdater(
diff --git a/chrome/browser/chromeos/policy/device_status_collector.cc b/chrome/browser/chromeos/policy/device_status_collector.cc index bc0d2e3..ae70fac6 100644 --- a/chrome/browser/chromeos/policy/device_status_collector.cc +++ b/chrome/browser/chromeos/policy/device_status_collector.cc
@@ -226,7 +226,7 @@ if (AccountId::FromUserEmail(device_local_account.user_id) == user->GetAccountId()) { return make_scoped_ptr( - new policy::DeviceLocalAccount(device_local_account)).Pass(); + new policy::DeviceLocalAccount(device_local_account)); } } LOG(WARNING) << "Kiosk app not found in list of device-local accounts"; @@ -540,7 +540,7 @@ if (chromeos::KioskAppManager::Get()->GetApp(account->kiosk_app_id, ¤t_app) && current_app.was_auto_launched_with_zero_delay) { - return account.Pass(); + return account; } } // No auto-launched kiosk session active.
diff --git a/chrome/browser/chromeos/policy/device_status_collector_browsertest.cc b/chrome/browser/chromeos/policy/device_status_collector_browsertest.cc index 410a462..656cddf 100644 --- a/chrome/browser/chromeos/policy/device_status_collector_browsertest.cc +++ b/chrome/browser/chromeos/policy/device_status_collector_browsertest.cc
@@ -6,8 +6,8 @@ #include <stddef.h> #include <stdint.h> - #include <string> +#include <utility> #include <vector> #include "base/bind.h" @@ -135,7 +135,7 @@ } void set_kiosk_account(scoped_ptr<policy::DeviceLocalAccount> account) { - kiosk_account_ = account.Pass(); + kiosk_account_ = std::move(account); } scoped_ptr<policy::DeviceLocalAccount> @@ -987,7 +987,7 @@ // Should not report session status if session status reporting is disabled. settings_helper_.SetBoolean(chromeos::kReportDeviceSessionStatus, false); status_collector_->set_kiosk_account(make_scoped_ptr( - new policy::DeviceLocalAccount(fake_device_local_account_)).Pass()); + new policy::DeviceLocalAccount(fake_device_local_account_))); // Set up a device-local account for single-app kiosk mode. MockRunningKioskApp(fake_device_local_account_); @@ -998,7 +998,7 @@ TEST_F(DeviceStatusCollectorTest, ReportSessionStatus) { settings_helper_.SetBoolean(chromeos::kReportDeviceSessionStatus, true); status_collector_->set_kiosk_account(make_scoped_ptr( - new policy::DeviceLocalAccount(fake_device_local_account_)).Pass()); + new policy::DeviceLocalAccount(fake_device_local_account_))); // Set up a device-local account for single-app kiosk mode. MockRunningKioskApp(fake_device_local_account_); @@ -1285,7 +1285,7 @@ TEST_F(DeviceStatusCollectorNetworkInterfacesTest, NetworkInterfaces) { // Mock that we are in kiosk mode so we report network state. status_collector_->set_kiosk_account(make_scoped_ptr( - new policy::DeviceLocalAccount(fake_device_local_account_)).Pass()); + new policy::DeviceLocalAccount(fake_device_local_account_))); // Interfaces should be reported by default. GetStatus();
diff --git a/chrome/browser/chromeos/policy/enrollment_handler_chromeos.cc b/chrome/browser/chromeos/policy/enrollment_handler_chromeos.cc index bf8e1f1..a92cd51 100644 --- a/chrome/browser/chromeos/policy/enrollment_handler_chromeos.cc +++ b/chrome/browser/chromeos/policy/enrollment_handler_chromeos.cc
@@ -4,6 +4,8 @@ #include "chrome/browser/chromeos/policy/enrollment_handler_chromeos.h" +#include <utility> + #include "base/bind.h" #include "base/logging.h" #include "base/message_loop/message_loop.h" @@ -77,7 +79,7 @@ install_attributes_(install_attributes), state_keys_broker_(state_keys_broker), owner_settings_service_(owner_settings_service), - client_(client.Pass()), + client_(std::move(client)), background_task_runner_(background_task_runner), enrollment_config_(enrollment_config), auth_token_(auth_token), @@ -116,7 +118,7 @@ scoped_ptr<CloudPolicyClient> EnrollmentHandlerChromeOS::ReleaseClient() { Stop(); - return client_.Pass(); + return std::move(client_); } void EnrollmentHandlerChromeOS::OnPolicyFetched(CloudPolicyClient* client) { @@ -277,7 +279,7 @@ DeviceCloudPolicyValidator* validator) { CHECK_EQ(STEP_VALIDATION, enrollment_step_); if (validator->success()) { - policy_ = validator->policy().Pass(); + policy_ = std::move(validator->policy()); username_ = validator->policy_data()->username(); device_id_ = validator->policy_data()->device_id(); request_token_ = validator->policy_data()->request_token();
diff --git a/chrome/browser/chromeos/policy/fake_device_cloud_policy_manager.cc b/chrome/browser/chromeos/policy/fake_device_cloud_policy_manager.cc index e16cc985..6c1541a 100644 --- a/chrome/browser/chromeos/policy/fake_device_cloud_policy_manager.cc +++ b/chrome/browser/chromeos/policy/fake_device_cloud_policy_manager.cc
@@ -4,6 +4,8 @@ #include "chrome/browser/chromeos/policy/fake_device_cloud_policy_manager.h" +#include <utility> + #include "base/callback.h" #include "chrome/browser/chromeos/policy/device_cloud_policy_store_chromeos.h" @@ -12,9 +14,8 @@ FakeDeviceCloudPolicyManager::FakeDeviceCloudPolicyManager( scoped_ptr<DeviceCloudPolicyStoreChromeOS> store, const scoped_refptr<base::SequencedTaskRunner>& task_runner) - : DeviceCloudPolicyManagerChromeOS(store.Pass(), task_runner, NULL), - unregister_result_(true) { -} + : DeviceCloudPolicyManagerChromeOS(std::move(store), task_runner, NULL), + unregister_result_(true) {} FakeDeviceCloudPolicyManager::~FakeDeviceCloudPolicyManager() { Shutdown();
diff --git a/chrome/browser/chromeos/policy/login_profile_policy_provider.cc b/chrome/browser/chromeos/policy/login_profile_policy_provider.cc index 30135be..c0bd83a 100644 --- a/chrome/browser/chromeos/policy/login_profile_policy_provider.cc +++ b/chrome/browser/chromeos/policy/login_profile_policy_provider.cc
@@ -5,6 +5,7 @@ #include "chrome/browser/chromeos/policy/login_profile_policy_provider.h" #include <string> +#include <utility> #include "base/bind.h" #include "base/callback.h" @@ -202,7 +203,7 @@ } } - UpdatePolicy(bundle.Pass()); + UpdatePolicy(std::move(bundle)); } } // namespace policy
diff --git a/chrome/browser/chromeos/policy/network_configuration_updater_unittest.cc b/chrome/browser/chromeos/policy/network_configuration_updater_unittest.cc index 1f2ffd3..f6ce495 100644 --- a/chrome/browser/chromeos/policy/network_configuration_updater_unittest.cc +++ b/chrome/browser/chromeos/policy/network_configuration_updater_unittest.cc
@@ -3,6 +3,7 @@ // found in the LICENSE file. #include <stddef.h> +#include <utility> #include "base/bind.h" #include "base/bind_helpers.h" @@ -270,7 +271,7 @@ if (set_cert_importer) { EXPECT_TRUE(certificate_importer_owned_); updater->SetCertificateImporterForTest( - certificate_importer_owned_.Pass()); + std::move(certificate_importer_owned_)); } network_configuration_updater_.reset(updater); return updater; @@ -518,7 +519,8 @@ certificate_importer_->SetExpectedONCSource(onc::ONC_SOURCE_USER_POLICY); ASSERT_TRUE(certificate_importer_owned_); - updater->SetCertificateImporterForTest(certificate_importer_owned_.Pass()); + updater->SetCertificateImporterForTest( + std::move(certificate_importer_owned_)); EXPECT_EQ(1u, certificate_importer_->GetAndResetImportCount()); }
diff --git a/chrome/browser/chromeos/policy/recommendation_restorer_unittest.cc b/chrome/browser/chromeos/policy/recommendation_restorer_unittest.cc index c096b6a..ee5e3d5 100644 --- a/chrome/browser/chromeos/policy/recommendation_restorer_unittest.cc +++ b/chrome/browser/chromeos/policy/recommendation_restorer_unittest.cc
@@ -4,6 +4,8 @@ #include "chrome/browser/chromeos/policy/recommendation_restorer.h" +#include <utility> + #include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/prefs/pref_notifier_impl.h" @@ -136,7 +138,7 @@ void RecommendationRestorerTest::CreateLoginProfile() { ASSERT_FALSE(restorer_); TestingProfile* profile = profile_manager_.CreateTestingProfile( - chrome::kInitialProfile, prefs_owner_.Pass(), + chrome::kInitialProfile, std::move(prefs_owner_), base::UTF8ToUTF16(chrome::kInitialProfile), 0, std::string(), TestingProfile::TestingFactories()); restorer_ = RecommendationRestorerFactory::GetForProfile(profile); @@ -146,8 +148,8 @@ void RecommendationRestorerTest::CreateUserProfile() { ASSERT_FALSE(restorer_); TestingProfile* profile = profile_manager_.CreateTestingProfile( - "user", prefs_owner_.Pass(), base::UTF8ToUTF16("user"), 0, std::string(), - TestingProfile::TestingFactories()); + "user", std::move(prefs_owner_), base::UTF8ToUTF16("user"), 0, + std::string(), TestingProfile::TestingFactories()); restorer_ = RecommendationRestorerFactory::GetForProfile(profile); EXPECT_TRUE(restorer_); }
diff --git a/chrome/browser/chromeos/policy/remote_commands/device_command_screenshot_job.cc b/chrome/browser/chromeos/policy/remote_commands/device_command_screenshot_job.cc index 1b1e6998..f719de75 100644 --- a/chrome/browser/chromeos/policy/remote_commands/device_command_screenshot_job.cc +++ b/chrome/browser/chromeos/policy/remote_commands/device_command_screenshot_job.cc
@@ -5,6 +5,7 @@ #include "chrome/browser/chromeos/policy/remote_commands/device_command_screenshot_job.h" #include <fstream> +#include <utility> #include "ash/shell.h" #include "base/bind.h" @@ -93,7 +94,7 @@ DeviceCommandScreenshotJob::DeviceCommandScreenshotJob( scoped_ptr<Delegate> screenshot_delegate) : num_pending_screenshots_(0), - screenshot_delegate_(screenshot_delegate.Pass()), + screenshot_delegate_(std::move(screenshot_delegate)), weak_ptr_factory_(this) { DCHECK(screenshot_delegate_); } @@ -179,7 +180,7 @@ upload_job_->AddDataSegment( base::StringPrintf(kNameFieldTemplate, screenshot_entry.first), base::StringPrintf(kFilenameFieldTemplate, screenshot_entry.first), - header_fields, data.Pass()); + header_fields, std::move(data)); } upload_job_->Start(); }
diff --git a/chrome/browser/chromeos/policy/remote_commands/device_command_screenshot_job_unittest.cc b/chrome/browser/chromeos/policy/remote_commands/device_command_screenshot_job_unittest.cc index b0f9075..84af7fc 100644 --- a/chrome/browser/chromeos/policy/remote_commands/device_command_screenshot_job_unittest.cc +++ b/chrome/browser/chromeos/policy/remote_commands/device_command_screenshot_job_unittest.cc
@@ -2,7 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "chrome/browser/chromeos/policy/remote_commands/device_command_screenshot_job.h" + #include <map> +#include <utility> #include <vector> #include "ash/test/ash_test_base.h" @@ -15,7 +18,6 @@ #include "base/threading/sequenced_worker_pool.h" #include "base/time/time.h" #include "base/values.h" -#include "chrome/browser/chromeos/policy/remote_commands/device_command_screenshot_job.h" #include "content/public/browser/browser_thread.h" #include "content/public/test/test_browser_thread_bundle.h" #include "policy/proto/device_management_backend.pb.h" @@ -87,8 +89,7 @@ scoped_ptr<UploadJob::ErrorCode> error_code) : upload_url_(upload_url), delegate_(delegate), - error_code_(error_code.Pass()) { -} + error_code_(std::move(error_code)) {} MockUploadJob::~MockUploadJob() { } @@ -158,9 +159,8 @@ MockScreenshotDelegate::MockScreenshotDelegate( scoped_ptr<UploadJob::ErrorCode> upload_job_error_code, bool screenshot_allowed) - : upload_job_error_code_(upload_job_error_code.Pass()), - screenshot_allowed_(screenshot_allowed) { -} + : upload_job_error_code_(std::move(upload_job_error_code)), + screenshot_allowed_(screenshot_allowed) {} MockScreenshotDelegate::~MockScreenshotDelegate() { } @@ -184,8 +184,8 @@ scoped_ptr<UploadJob> MockScreenshotDelegate::CreateUploadJob( const GURL& upload_url, UploadJob::Delegate* delegate) { - return make_scoped_ptr( - new MockUploadJob(upload_url, delegate, upload_job_error_code_.Pass())); + return make_scoped_ptr(new MockUploadJob(upload_url, delegate, + std::move(upload_job_error_code_))); } } // namespace @@ -299,8 +299,9 @@ using ErrorCode = UploadJob::ErrorCode; scoped_ptr<ErrorCode> error_code( new ErrorCode(UploadJob::AUTHENTICATION_ERROR)); - scoped_ptr<RemoteCommandJob> job(new DeviceCommandScreenshotJob( - make_scoped_ptr(new MockScreenshotDelegate(error_code.Pass(), true)))); + scoped_ptr<RemoteCommandJob> job( + new DeviceCommandScreenshotJob(make_scoped_ptr( + new MockScreenshotDelegate(std::move(error_code), true)))); InitializeScreenshotJob(job.get(), kUniqueID, test_start_time_, kMockUploadUrl); bool success = job->Run(
diff --git a/chrome/browser/chromeos/policy/restore_on_startup_browsertest_chromeos.cc b/chrome/browser/chromeos/policy/restore_on_startup_browsertest_chromeos.cc index 570427db..8d7cecc 100644 --- a/chrome/browser/chromeos/policy/restore_on_startup_browsertest_chromeos.cc +++ b/chrome/browser/chromeos/policy/restore_on_startup_browsertest_chromeos.cc
@@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include <utility> + #include "base/command_line.h" #include "base/macros.h" #include "base/memory/scoped_ptr.h" @@ -60,7 +62,7 @@ scoped_ptr<base::ListValue> urls(new base::ListValue); urls->AppendString(kStartUpURL1); urls->AppendString(kStartUpURL2); - policy->Set(key::kRestoreOnStartupURLs, urls.Pass()); + policy->Set(key::kRestoreOnStartupURLs, std::move(urls)); } void RestoreOnStartupTestChromeOS::LogInAndVerifyStartUpURLs() {
diff --git a/chrome/browser/chromeos/policy/status_uploader.cc b/chrome/browser/chromeos/policy/status_uploader.cc index 30fd673a..d53e0ba 100644 --- a/chrome/browser/chromeos/policy/status_uploader.cc +++ b/chrome/browser/chromeos/policy/status_uploader.cc
@@ -5,6 +5,7 @@ #include "chrome/browser/chromeos/policy/status_uploader.h" #include <algorithm> +#include <utility> #include "base/bind.h" #include "base/bind_helpers.h" @@ -35,7 +36,7 @@ scoped_ptr<DeviceStatusCollector> collector, const scoped_refptr<base::SequencedTaskRunner>& task_runner) : client_(client), - collector_(collector.Pass()), + collector_(std::move(collector)), task_runner_(task_runner), upload_frequency_( base::TimeDelta::FromMilliseconds(kDefaultUploadDelayMs)),
diff --git a/chrome/browser/chromeos/policy/status_uploader_unittest.cc b/chrome/browser/chromeos/policy/status_uploader_unittest.cc index e7169145..74a2286 100644 --- a/chrome/browser/chromeos/policy/status_uploader_unittest.cc +++ b/chrome/browser/chromeos/policy/status_uploader_unittest.cc
@@ -2,12 +2,15 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "chrome/browser/chromeos/policy/status_uploader.h" + +#include <utility> + #include "base/prefs/testing_pref_service.h" #include "base/test/test_simple_task_runner.h" #include "base/time/time.h" #include "chrome/browser/chromeos/policy/device_local_account.h" #include "chrome/browser/chromeos/policy/device_status_collector.h" -#include "chrome/browser/chromeos/policy/status_uploader.h" #include "chrome/browser/chromeos/settings/scoped_cros_settings_test_helper.h" #include "chromeos/settings/cros_settings_names.h" #include "components/policy/core/common/cloud/cloud_policy_client.h" @@ -136,7 +139,7 @@ TEST_F(StatusUploaderTest, BasicTest) { EXPECT_TRUE(task_runner_->GetPendingTasks().empty()); - StatusUploader uploader(&client_, collector_.Pass(), task_runner_); + StatusUploader uploader(&client_, std::move(collector_), task_runner_); EXPECT_EQ(1U, task_runner_->GetPendingTasks().size()); // On startup, first update should happen immediately. EXPECT_EQ(base::TimeDelta(), task_runner_->NextPendingTaskDelay()); @@ -151,7 +154,7 @@ const base::TimeDelta expected_delay = base::TimeDelta::FromMilliseconds( new_delay); EXPECT_TRUE(task_runner_->GetPendingTasks().empty()); - StatusUploader uploader(&client_, collector_.Pass(), task_runner_); + StatusUploader uploader(&client_, std::move(collector_), task_runner_); ASSERT_EQ(1U, task_runner_->GetPendingTasks().size()); // On startup, first update should happen immediately. EXPECT_EQ(base::TimeDelta(), task_runner_->NextPendingTaskDelay()); @@ -167,7 +170,7 @@ // Keep a pointer to the mock collector because collector_ gets cleared // when it is passed to the StatusUploader constructor below. MockDeviceStatusCollector* const mock_collector = collector_.get(); - StatusUploader uploader(&client_, collector_.Pass(), task_runner_); + StatusUploader uploader(&client_, std::move(collector_), task_runner_); EXPECT_CALL(*mock_collector, GetDeviceStatus(_)).WillRepeatedly(Return(true)); EXPECT_CALL(*mock_collector, GetDeviceSessionStatus(_)).WillRepeatedly( Return(true)); @@ -187,7 +190,7 @@ // Keep a pointer to the mock collector because collector_ gets cleared // when it is passed to the StatusUploader constructor below. MockDeviceStatusCollector* mock_collector = collector_.get(); - StatusUploader uploader(&client_, collector_.Pass(), task_runner_); + StatusUploader uploader(&client_, std::move(collector_), task_runner_); EXPECT_CALL(*mock_collector, GetDeviceStatus(_)).WillOnce(Return(false)); EXPECT_CALL(*mock_collector, GetDeviceSessionStatus(_)).WillOnce( Return(false)); @@ -204,7 +207,7 @@ // Keep a pointer to the mock collector because collector_ gets cleared // when it is passed to the StatusUploader constructor below. MockDeviceStatusCollector* const mock_collector = collector_.get(); - StatusUploader uploader(&client_, collector_.Pass(), task_runner_); + StatusUploader uploader(&client_, std::move(collector_), task_runner_); EXPECT_CALL(*mock_collector, GetDeviceStatus(_)).WillRepeatedly(Return(true)); EXPECT_CALL(*mock_collector, GetDeviceSessionStatus(_)).WillRepeatedly( Return(true)); @@ -219,7 +222,7 @@ #if defined(USE_X11) || defined(USE_OZONE) TEST_F(StatusUploaderTest, NoUploadAfterUserInput) { - StatusUploader uploader(&client_, collector_.Pass(), task_runner_); + StatusUploader uploader(&client_, std::move(collector_), task_runner_); // Should allow data upload before there is user input. EXPECT_TRUE(uploader.IsSessionDataUploadAllowed()); @@ -244,7 +247,7 @@ #endif TEST_F(StatusUploaderTest, NoUploadAfterVideoCapture) { - StatusUploader uploader(&client_, collector_.Pass(), task_runner_); + StatusUploader uploader(&client_, std::move(collector_), task_runner_); // Should allow data upload before there is video capture. EXPECT_TRUE(uploader.IsSessionDataUploadAllowed());
diff --git a/chrome/browser/chromeos/policy/system_log_uploader.cc b/chrome/browser/chromeos/policy/system_log_uploader.cc index 5bea0a9..bb68674 100644 --- a/chrome/browser/chromeos/policy/system_log_uploader.cc +++ b/chrome/browser/chromeos/policy/system_log_uploader.cc
@@ -2,6 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "chrome/browser/chromeos/policy/system_log_uploader.h" + +#include <utility> + #include "base/bind.h" #include "base/bind_helpers.h" #include "base/command_line.h" @@ -14,7 +18,6 @@ #include "base/strings/stringprintf.h" #include "base/task_runner_util.h" #include "chrome/browser/browser_process.h" -#include "chrome/browser/chromeos/policy/system_log_uploader.h" #include "chrome/browser/chromeos/policy/upload_job_impl.h" #include "chrome/browser/chromeos/settings/device_oauth2_token_service.h" #include "chrome/browser/chromeos/settings/device_oauth2_token_service_factory.h" @@ -85,7 +88,7 @@ system_logs->push_back(std::make_pair( file_path, policy::SystemLogUploader::RemoveSensitiveData(data))); } - return system_logs.Pass(); + return system_logs; } // An implementation of the |SystemLogUploader::Delegate|, that is used to @@ -193,7 +196,7 @@ : retry_count_(0), upload_frequency_(GetUploadFrequency()), task_runner_(task_runner), - syslog_delegate_(syslog_delegate.Pass()), + syslog_delegate_(std::move(syslog_delegate)), upload_enabled_(false), weak_factory_(this) { if (!syslog_delegate_) @@ -326,7 +329,7 @@ kContentTypePlainText)); upload_job_->AddDataSegment( base::StringPrintf(kNameFieldTemplate, file_number), syslog_entry.first, - header_fields, data.Pass()); + header_fields, std::move(data)); ++file_number; } upload_job_->Start();
diff --git a/chrome/browser/chromeos/policy/system_log_uploader_unittest.cc b/chrome/browser/chromeos/policy/system_log_uploader_unittest.cc index f445efab..e30311c 100644 --- a/chrome/browser/chromeos/policy/system_log_uploader_unittest.cc +++ b/chrome/browser/chromeos/policy/system_log_uploader_unittest.cc
@@ -2,10 +2,13 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "chrome/browser/chromeos/policy/system_log_uploader.h" + +#include <utility> + #include "base/strings/stringprintf.h" #include "base/test/test_simple_task_runner.h" #include "base/time/time.h" -#include "chrome/browser/chromeos/policy/system_log_uploader.h" #include "chrome/browser/chromeos/settings/scoped_cros_settings_test_helper.h" #include "content/public/test/test_browser_thread_bundle.h" #include "content/public/test/test_utils.h" @@ -187,7 +190,7 @@ scoped_ptr<MockSystemLogDelegate> syslog_delegate( new MockSystemLogDelegate(false, SystemLogUploader::SystemLogs())); syslog_delegate->set_upload_allowed(false); - SystemLogUploader uploader(syslog_delegate.Pass(), task_runner_); + SystemLogUploader uploader(std::move(syslog_delegate), task_runner_); task_runner_->RunPendingTasks(); } @@ -200,7 +203,7 @@ new MockSystemLogDelegate(false, SystemLogUploader::SystemLogs())); syslog_delegate->set_upload_allowed(true); settings_helper_.SetBoolean(chromeos::kSystemLogUploadEnabled, true); - SystemLogUploader uploader(syslog_delegate.Pass(), task_runner_); + SystemLogUploader uploader(std::move(syslog_delegate), task_runner_); EXPECT_EQ(1U, task_runner_->GetPendingTasks().size()); @@ -217,7 +220,7 @@ new MockSystemLogDelegate(true, SystemLogUploader::SystemLogs())); syslog_delegate->set_upload_allowed(true); settings_helper_.SetBoolean(chromeos::kSystemLogUploadEnabled, true); - SystemLogUploader uploader(syslog_delegate.Pass(), task_runner_); + SystemLogUploader uploader(std::move(syslog_delegate), task_runner_); EXPECT_EQ(1U, task_runner_->GetPendingTasks().size()); @@ -244,7 +247,7 @@ new MockSystemLogDelegate(false, system_logs)); syslog_delegate->set_upload_allowed(true); settings_helper_.SetBoolean(chromeos::kSystemLogUploadEnabled, true); - SystemLogUploader uploader(syslog_delegate.Pass(), task_runner_); + SystemLogUploader uploader(std::move(syslog_delegate), task_runner_); EXPECT_EQ(1U, task_runner_->GetPendingTasks().size()); @@ -262,7 +265,7 @@ MockSystemLogDelegate* mock_delegate = syslog_delegate.get(); settings_helper_.SetBoolean(chromeos::kSystemLogUploadEnabled, true); mock_delegate->set_upload_allowed(true); - SystemLogUploader uploader(syslog_delegate.Pass(), task_runner_); + SystemLogUploader uploader(std::move(syslog_delegate), task_runner_); EXPECT_EQ(1U, task_runner_->GetPendingTasks().size()); RunPendingUploadTaskAndCheckNext(uploader,
diff --git a/chrome/browser/chromeos/policy/upload_job_impl.cc b/chrome/browser/chromeos/policy/upload_job_impl.cc index 0dc3e12..f1a4783 100644 --- a/chrome/browser/chromeos/policy/upload_job_impl.cc +++ b/chrome/browser/chromeos/policy/upload_job_impl.cc
@@ -5,6 +5,7 @@ #include "chrome/browser/chromeos/policy/upload_job_impl.h" #include <set> +#include <utility> #include "base/logging.h" #include "base/macros.h" @@ -114,7 +115,7 @@ const std::map<std::string, std::string>& header_entries) : name_(name), filename_(filename), - data_(data.Pass()), + data_(std::move(data)), header_entries_(header_entries) { DCHECK(data_); } @@ -133,7 +134,7 @@ } scoped_ptr<std::string> DataSegment::GetData() { - return data_.Pass(); + return std::move(data_); } bool DataSegment::CheckIfDataContains(const std::string& chunk) { @@ -173,7 +174,7 @@ token_service_(token_service), url_context_getter_(url_context_getter), delegate_(delegate), - boundary_generator_(boundary_generator.Pass()), + boundary_generator_(std::move(boundary_generator)), state_(IDLE), retry_(0) { DCHECK(token_service_); @@ -199,8 +200,8 @@ return; scoped_ptr<DataSegment> data_segment( - new DataSegment(name, filename, data.Pass(), header_entries)); - data_segments_.push_back(data_segment.Pass()); + new DataSegment(name, filename, std::move(data), header_entries)); + data_segments_.push_back(std::move(data_segment)); } void UploadJobImpl::Start() {
diff --git a/chrome/browser/chromeos/policy/upload_job_unittest.cc b/chrome/browser/chromeos/policy/upload_job_unittest.cc index f98efaed..85f88cb 100644 --- a/chrome/browser/chromeos/policy/upload_job_unittest.cc +++ b/chrome/browser/chromeos/policy/upload_job_unittest.cc
@@ -173,7 +173,7 @@ const GURL GetServerURL() const { return test_server_.GetURL(kUploadPath); } void SetExpectedError(scoped_ptr<UploadJob::ErrorCode> expected_error) { - expected_error_ = expected_error.Pass(); + expected_error_ = std::move(expected_error); } // testing::Test: @@ -192,20 +192,21 @@ protected: scoped_ptr<UploadJob> PrepareUploadJob(scoped_ptr< UploadJobImpl::MimeBoundaryGenerator> mime_boundary_generator) { - scoped_ptr<UploadJob> upload_job(new UploadJobImpl( - GetServerURL(), kRobotAccountId, &oauth2_service_, - request_context_getter_.get(), this, mime_boundary_generator.Pass())); + scoped_ptr<UploadJob> upload_job( + new UploadJobImpl(GetServerURL(), kRobotAccountId, &oauth2_service_, + request_context_getter_.get(), this, + std::move(mime_boundary_generator))); std::map<std::string, std::string> header_entries; header_entries.insert(std::make_pair(kCustomField1, "CUSTOM1")); scoped_ptr<std::string> data(new std::string(kTestPayload1)); upload_job->AddDataSegment("Name1", "file1.ext", header_entries, - data.Pass()); + std::move(data)); header_entries.insert(std::make_pair(kCustomField2, "CUSTOM2")); scoped_ptr<std::string> data2(new std::string(kTestPayload2)); - upload_job->AddDataSegment("Name2", "", header_entries, data2.Pass()); - return upload_job.Pass(); + upload_job->AddDataSegment("Name2", "", header_entries, std::move(data2)); + return upload_job; } content::TestBrowserThreadBundle test_browser_thread_bundle_; @@ -238,14 +239,14 @@ const size_t pos = authorization_header.find(" "); if (pos == std::string::npos) { response->set_code(net::HTTP_UNAUTHORIZED); - return response.Pass(); + return std::move(response); } const std::string token = authorization_header.substr(pos + 1); response->set_code(oauth2_service_.IsTokenValid(token) ? net::HTTP_OK : net::HTTP_UNAUTHORIZED); - return response.Pass(); + return std::move(response); } }; @@ -307,7 +308,7 @@ new net::test_server::BasicHttpResponse); response->set_code(net::HTTP_OK); EXPECT_EQ(expected_content_, request.content); - return response.Pass(); + return std::move(response); } void SetExpectedRequestContent(const std::string& expected_content) {
diff --git a/chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.cc b/chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.cc index 98c3026..7e3610c 100644 --- a/chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.cc +++ b/chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.cc
@@ -5,6 +5,7 @@ #include "chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.h" #include <set> +#include <utility> #include "base/bind.h" #include "base/bind_helpers.h" @@ -92,8 +93,8 @@ task_runner, file_task_runner, io_task_runner), - store_(store.Pass()), - external_data_manager_(external_data_manager.Pass()), + store_(std::move(store)), + external_data_manager_(std::move(external_data_manager)), component_policy_cache_path_(component_policy_cache_path), wait_for_policy_fetch_(wait_for_policy_fetch), policy_fetch_timeout_(false, false) { @@ -132,7 +133,7 @@ device_management_service, request_context)); CreateComponentCloudPolicyService(component_policy_cache_path_, request_context, cloud_policy_client.get()); - core()->Connect(cloud_policy_client.Pass()); + core()->Connect(std::move(cloud_policy_client)); client()->AddObserver(this); external_data_manager_->Connect(request_context);
diff --git a/chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos_browsertest.cc b/chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos_browsertest.cc index c96a4bb..49251a7 100644 --- a/chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos_browsertest.cc +++ b/chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos_browsertest.cc
@@ -3,6 +3,7 @@ // found in the LICENSE file. #include <string> +#include <utility> #include "base/macros.h" #include "base/memory/scoped_ptr.h" @@ -26,7 +27,7 @@ list->AppendString("chrome://policy"); list->AppendString("chrome://about"); - policy->Set(key::kRestoreOnStartupURLs, list.Pass()); + policy->Set(key::kRestoreOnStartupURLs, std::move(list)); policy->SetInteger(key::kRestoreOnStartup, SessionStartupPref::kPrefValueURLs); }
diff --git a/chrome/browser/chromeos/policy/user_cloud_policy_manager_factory_chromeos.cc b/chrome/browser/chromeos/policy/user_cloud_policy_manager_factory_chromeos.cc index 14dc8d34..3fad89c 100644 --- a/chrome/browser/chromeos/policy/user_cloud_policy_manager_factory_chromeos.cc +++ b/chrome/browser/chromeos/policy/user_cloud_policy_manager_factory_chromeos.cc
@@ -4,6 +4,8 @@ #include "chrome/browser/chromeos/policy/user_cloud_policy_manager_factory_chromeos.h" +#include <utility> + #include "base/bind.h" #include "base/command_line.h" #include "base/files/file_path.h" @@ -198,7 +200,7 @@ scoped_ptr<UserCloudPolicyManagerChromeOS> manager( new UserCloudPolicyManagerChromeOS( - store.Pass(), external_data_manager.Pass(), + std::move(store), std::move(external_data_manager), component_policy_cache_dir, wait_for_initial_policy, initial_policy_fetch_timeout, base::ThreadTaskRunnerHandle::Get(), file_task_runner, io_task_runner)); @@ -217,7 +219,7 @@ DCHECK(managers_.find(profile) == managers_.end()); managers_[profile] = manager.get(); - return manager.Pass(); + return manager; } void UserCloudPolicyManagerFactoryChromeOS::BrowserContextShutdown(
diff --git a/chrome/browser/chromeos/policy/user_cloud_policy_store_chromeos.cc b/chrome/browser/chromeos/policy/user_cloud_policy_store_chromeos.cc index b4db86e..96e73e0f 100644 --- a/chrome/browser/chromeos/policy/user_cloud_policy_store_chromeos.cc +++ b/chrome/browser/chromeos/policy/user_cloud_policy_store_chromeos.cc
@@ -5,6 +5,7 @@ #include "chrome/browser/chromeos/policy/user_cloud_policy_store_chromeos.h" #include <stddef.h> +#include <utility> #include "base/bind.h" #include "base/bind_helpers.h" @@ -155,7 +156,7 @@ void LegacyPolicyCacheLoader::CheckLoadFinished() { if (!token_loader_.get() && !policy_cache_.get()) - callback_.Run(dm_token_, device_id_, status_, policy_.Pass()); + callback_.Run(dm_token_, device_id_, status_, std::move(policy_)); } // static @@ -257,7 +258,7 @@ policy_key_loaded_ = true; scoped_ptr<UserCloudPolicyValidator> validator = - CreateValidatorForLoad(policy.Pass()); + CreateValidatorForLoad(std::move(policy)); validator->RunValidation(); OnRetrievedPolicyValidated(validator.get()); } @@ -265,9 +266,8 @@ void UserCloudPolicyStoreChromeOS::ValidatePolicyForStore( scoped_ptr<em::PolicyFetchResponse> policy) { // Create and configure a validator. - scoped_ptr<UserCloudPolicyValidator> validator = - CreateValidator(policy.Pass(), - CloudPolicyValidatorBase::TIMESTAMP_REQUIRED); + scoped_ptr<UserCloudPolicyValidator> validator = CreateValidator( + std::move(policy), CloudPolicyValidatorBase::TIMESTAMP_REQUIRED); validator->ValidateUsername(username_, true); if (policy_key_.empty()) { validator->ValidateInitialKey(GetPolicyVerificationKey(), @@ -368,7 +368,7 @@ scoped_ptr<em::PolicyFetchResponse> policy) { // Create and configure a validator for the loaded policy. scoped_ptr<UserCloudPolicyValidator> validator = - CreateValidatorForLoad(policy.Pass()); + CreateValidatorForLoad(std::move(policy)); // Start validation. The Validator will delete itself once validation is // complete. validator.release()->StartValidation( @@ -391,7 +391,8 @@ return; } - InstallPolicy(validator->policy_data().Pass(), validator->payload().Pass()); + InstallPolicy(std::move(validator->policy_data()), + std::move(validator->payload())); status_ = STATUS_OK; // Policy has been loaded successfully. This indicates that new-style policy @@ -415,9 +416,8 @@ if (policy.get()) { // Create and configure a validator for the loaded legacy policy. Note that // the signature on this policy is not verified. - scoped_ptr<UserCloudPolicyValidator> validator = - CreateValidator(policy.Pass(), - CloudPolicyValidatorBase::TIMESTAMP_REQUIRED); + scoped_ptr<UserCloudPolicyValidator> validator = CreateValidator( + std::move(policy), CloudPolicyValidatorBase::TIMESTAMP_REQUIRED); validator->ValidateUsername(username_, true); validator.release()->StartValidation( base::Bind(&UserCloudPolicyStoreChromeOS::OnLegacyPolicyValidated, @@ -436,7 +436,8 @@ validation_status_ = validator->status(); if (validator->success()) { status_ = STATUS_OK; - InstallPolicy(validator->policy_data().Pass(), validator->payload().Pass()); + InstallPolicy(std::move(validator->policy_data()), + std::move(validator->payload())); // Clear the public key version. The public key version field would // otherwise indicate that we have key installed in the store when in fact @@ -556,7 +557,7 @@ UserCloudPolicyStoreChromeOS::CreateValidatorForLoad( scoped_ptr<em::PolicyFetchResponse> policy) { scoped_ptr<UserCloudPolicyValidator> validator = CreateValidator( - policy.Pass(), CloudPolicyValidatorBase::TIMESTAMP_NOT_BEFORE); + std::move(policy), CloudPolicyValidatorBase::TIMESTAMP_NOT_BEFORE); validator->ValidateUsername(username_, true); const bool allow_rotation = false; const std::string empty_key = std::string(); @@ -566,6 +567,6 @@ // value for the verification key. validator->ValidateSignature( policy_key_, empty_key, ExtractDomain(username_), allow_rotation); - return validator.Pass(); + return validator; } } // namespace policy
diff --git a/chrome/browser/chromeos/policy/user_network_configuration_updater.cc b/chrome/browser/chromeos/policy/user_network_configuration_updater.cc index 3221bf1..6fac05e 100644 --- a/chrome/browser/chromeos/policy/user_network_configuration_updater.cc +++ b/chrome/browser/chromeos/policy/user_network_configuration_updater.cc
@@ -4,6 +4,8 @@ #include "chrome/browser/chromeos/policy/user_network_configuration_updater.h" +#include <utility> + #include "base/bind.h" #include "base/bind_helpers.h" #include "base/logging.h" @@ -39,7 +41,7 @@ policy_service, network_config_handler)); updater->Init(); - return updater.Pass(); + return updater; } void UserNetworkConfigurationUpdater::AddTrustedCertsObserver( @@ -77,7 +79,7 @@ void UserNetworkConfigurationUpdater::SetCertificateImporterForTest( scoped_ptr<chromeos::onc::CertificateImporter> certificate_importer) { - SetCertificateImporter(certificate_importer.Pass()); + SetCertificateImporter(std::move(certificate_importer)); } void UserNetworkConfigurationUpdater::GetWebTrustedCertificates( @@ -148,7 +150,7 @@ void UserNetworkConfigurationUpdater::SetCertificateImporter( scoped_ptr<chromeos::onc::CertificateImporter> certificate_importer) { - certificate_importer_ = certificate_importer.Pass(); + certificate_importer_ = std::move(certificate_importer); if (pending_certificates_onc_) ImportCertificates(*pending_certificates_onc_);
diff --git a/chrome/browser/chromeos/policy/user_policy_test_helper.cc b/chrome/browser/chromeos/policy/user_policy_test_helper.cc index ecc45eb2..b439621 100644 --- a/chrome/browser/chromeos/policy/user_policy_test_helper.cc +++ b/chrome/browser/chromeos/policy/user_policy_test_helper.cc
@@ -4,6 +4,8 @@ #include "chrome/browser/chromeos/policy/user_policy_test_helper.h" +#include <utility> + #include "base/command_line.h" #include "base/files/file_path.h" #include "base/files/file_util.h" @@ -45,8 +47,9 @@ managed_users_list->AppendString("*"); base::DictionaryValue root_dict; - root_dict.SetWithoutPathExpansion(policyType, policy_type_dict.Pass()); - root_dict.SetWithoutPathExpansion("managed_users", managed_users_list.Pass()); + root_dict.SetWithoutPathExpansion(policyType, std::move(policy_type_dict)); + root_dict.SetWithoutPathExpansion("managed_users", + std::move(managed_users_list)); root_dict.SetStringWithoutPathExpansion("policy_user", account_id); root_dict.SetIntegerWithoutPathExpansion("current_key_index", 0);
diff --git a/chrome/browser/chromeos/power/power_prefs_unittest.cc b/chrome/browser/chromeos/power/power_prefs_unittest.cc index 1f0e5f4..1380f8f 100644 --- a/chrome/browser/chromeos/power/power_prefs_unittest.cc +++ b/chrome/browser/chromeos/power/power_prefs_unittest.cc
@@ -5,6 +5,7 @@ #include "chrome/browser/chromeos/power/power_prefs.h" #include <string> +#include <utility> #include "base/command_line.h" #include "base/files/file_path.h" @@ -179,7 +180,7 @@ TestingProfile::Builder builder; builder.SetPath( profile_manager_.profiles_dir().AppendASCII(chrome::kInitialProfile)); - builder.SetPrefService(login_profile_prefs.Pass()); + builder.SetPrefService(std::move(login_profile_prefs)); TestingProfile* login_profile = builder.BuildIncognito( profile_manager_.CreateTestingProfile(chrome::kInitialProfile));
diff --git a/chrome/browser/chromeos/power/renderer_freezer.cc b/chrome/browser/chromeos/power/renderer_freezer.cc index c239444..6e407ae 100644 --- a/chrome/browser/chromeos/power/renderer_freezer.cc +++ b/chrome/browser/chromeos/power/renderer_freezer.cc
@@ -5,6 +5,7 @@ #include "chrome/browser/chromeos/power/renderer_freezer.h" #include <string> +#include <utility> #include "base/bind.h" #include "base/logging.h" @@ -31,8 +32,7 @@ namespace chromeos { RendererFreezer::RendererFreezer(scoped_ptr<RendererFreezer::Delegate> delegate) - : delegate_(delegate.Pass()), - weak_factory_(this) { + : delegate_(std::move(delegate)), weak_factory_(this) { delegate_->CheckCanFreezeRenderers( base::Bind(&RendererFreezer::OnCheckCanFreezeRenderersComplete, weak_factory_.GetWeakPtr()));
diff --git a/chrome/browser/chromeos/preferences_unittest.cc b/chrome/browser/chromeos/preferences_unittest.cc index 2e4b1cbf..5a313ad 100644 --- a/chrome/browser/chromeos/preferences_unittest.cc +++ b/chrome/browser/chromeos/preferences_unittest.cc
@@ -4,6 +4,8 @@ #include "chrome/browser/chromeos/preferences.h" +#include <utility> + #include "base/json/json_string_value_serializer.h" #include "base/macros.h" #include "base/prefs/pref_member.h" @@ -126,7 +128,7 @@ ~MyMockInputMethodManager() override {} scoped_ptr<InputMethodDescriptors> GetSupportedInputMethods() const override { - return whitelist_.GetSupportedInputMethods().Pass(); + return whitelist_.GetSupportedInputMethods(); } std::string last_input_method_id_; @@ -270,11 +272,11 @@ scoped_ptr<ComponentExtensionIMEManagerDelegate> delegate(mock_delegate); scoped_ptr<ComponentExtensionIMEManager> component_extension_ime_manager( new ComponentExtensionIMEManager); - component_extension_ime_manager->Initialize(delegate.Pass()); + component_extension_ime_manager->Initialize(std::move(delegate)); // Add the ComponentExtensionIMEManager to the mock InputMethodManager. mock_manager_->SetComponentExtensionIMEManager( - component_extension_ime_manager.Pass()); + std::move(component_extension_ime_manager)); } std::vector<ComponentExtensionIME> CreateImeList() {
diff --git a/chrome/browser/chromeos/printer_detector/printer_detector.cc b/chrome/browser/chromeos/printer_detector/printer_detector.cc index f3652355..42bba81 100644 --- a/chrome/browser/chromeos/printer_detector/printer_detector.cc +++ b/chrome/browser/chromeos/printer_detector/printer_detector.cc
@@ -5,6 +5,7 @@ #include "chrome/browser/chromeos/printer_detector/printer_detector.h" #include <stdint.h> +#include <utility> #include "base/bind.h" #include "base/bind_helpers.h" @@ -176,7 +177,7 @@ webstore_widget_private_api::OnShowWidget::kEventName, webstore_widget_private_api::OnShowWidget::Create(options))); event_router->DispatchEventToExtension(extension_misc::kWebstoreWidgetAppId, - event.Pass()); + std::move(event)); } private:
diff --git a/chrome/browser/chromeos/resource_reporter/resource_reporter.cc b/chrome/browser/chromeos/resource_reporter/resource_reporter.cc index c66d0a3c..d9842e2 100644 --- a/chrome/browser/chromeos/resource_reporter/resource_reporter.cc +++ b/chrome/browser/chromeos/resource_reporter/resource_reporter.cc
@@ -6,6 +6,7 @@ #include <cstdint> #include <queue> +#include <utility> #include "base/bind.h" #include "base/rand_util.h" @@ -263,7 +264,7 @@ GET_ENUM_VAL(TaskProcessPriority::BACKGROUND) : GET_ENUM_VAL(TaskProcessPriority::FOREGROUND), GET_ENUM_VAL(TaskProcessPriority::NUM_PRIORITIES)); - return sample.Pass(); + return sample; } // static @@ -408,7 +409,7 @@ kRapporUsageRangeFlagsField, GET_ENUM_VAL(GetCpuUsageRange(sampled_cpu_task->cpu_percent)), GET_ENUM_VAL(CpuUsageRange::NUM_RANGES)); - rappor_service->RecordSampleObj(kCpuRapporMetric, cpu_sample.Pass()); + rappor_service->RecordSampleObj(kCpuRapporMetric, std::move(cpu_sample)); } // Use weighted random sampling to select a task to report in the memory @@ -422,7 +423,7 @@ GET_ENUM_VAL(GetMemoryUsageRange(sampled_memory_task->memory_bytes)), GET_ENUM_VAL(MemoryUsageRange::NUM_RANGES)); rappor_service->RecordSampleObj(kMemoryRapporMetric, - memory_sample.Pass()); + std::move(memory_sample)); } } }
diff --git a/chrome/browser/chromeos/settings/device_oauth2_token_service_delegate.cc b/chrome/browser/chromeos/settings/device_oauth2_token_service_delegate.cc index e561af8..672d08b0 100644 --- a/chrome/browser/chromeos/settings/device_oauth2_token_service_delegate.cc +++ b/chrome/browser/chromeos/settings/device_oauth2_token_service_delegate.cc
@@ -44,11 +44,10 @@ service_account_identity_subscription_( CrosSettings::Get() ->AddSettingsObserver( - kServiceAccountIdentity, - base::Bind(&DeviceOAuth2TokenServiceDelegate:: - OnServiceAccountIdentityChanged, - base::Unretained(this))) - .Pass()), + kServiceAccountIdentity, + base::Bind(&DeviceOAuth2TokenServiceDelegate:: + OnServiceAccountIdentityChanged, + base::Unretained(this)))), weak_ptr_factory_(this) { // Pull in the system salt. SystemSaltGetter::Get()->GetSystemSalt(
diff --git a/chrome/browser/chromeos/settings/device_settings_provider.cc b/chrome/browser/chromeos/settings/device_settings_provider.cc index 5abbff3..4d2073eb 100644 --- a/chrome/browser/chromeos/settings/device_settings_provider.cc +++ b/chrome/browser/chromeos/settings/device_settings_provider.cc
@@ -5,6 +5,7 @@ #include "chrome/browser/chromeos/settings/device_settings_provider.h" #include <stddef.h> +#include <utility> #include "base/bind.h" #include "base/bind_helpers.h" @@ -166,7 +167,7 @@ it != whitelist.end(); ++it) { list->Append(new base::StringValue(*it)); } - new_values_cache->SetValue(kAccountsPrefUsers, list.Pass()); + new_values_cache->SetValue(kAccountsPrefUsers, std::move(list)); scoped_ptr<base::ListValue> account_list(new base::ListValue()); const em::DeviceLocalAccountsProto device_local_accounts_proto = @@ -202,10 +203,10 @@ kAccountsPrefDeviceLocalAccountsKeyType, policy::DeviceLocalAccount::TYPE_PUBLIC_SESSION); } - account_list->Append(entry_dict.Pass()); + account_list->Append(std::move(entry_dict)); } new_values_cache->SetValue(kAccountsPrefDeviceLocalAccounts, - account_list.Pass()); + std::move(account_list)); if (policy.has_device_local_accounts()) { if (policy.device_local_accounts().has_auto_login_id()) { @@ -235,7 +236,7 @@ it != flags.end(); ++it) { list->Append(new base::StringValue(*it)); } - new_values_cache->SetValue(kStartUpFlags, list.Pass()); + new_values_cache->SetValue(kStartUpFlags, std::move(list)); } if (policy.has_saml_settings()) { @@ -287,7 +288,8 @@ i != allowed_connection_types.end(); ++i) { list->Append(new base::FundamentalValue(*i)); } - new_values_cache->SetValue(kAllowedConnectionTypesForUpdate, list.Pass()); + new_values_cache->SetValue(kAllowedConnectionTypesForUpdate, + std::move(list)); } } @@ -582,7 +584,7 @@ policy->set_username(device_settings_service_->GetUsername()); CHECK(device_settings_.SerializeToString(policy->mutable_policy_value())); if (!device_settings_service_->GetOwnerSettingsService() - ->CommitTentativeDeviceSettings(policy.Pass())) { + ->CommitTentativeDeviceSettings(std::move(policy))) { LOG(ERROR) << "Can't store policy"; } }
diff --git a/chrome/browser/chromeos/settings/device_settings_service.cc b/chrome/browser/chromeos/settings/device_settings_service.cc index a696102c..6820575 100644 --- a/chrome/browser/chromeos/settings/device_settings_service.cc +++ b/chrome/browser/chromeos/settings/device_settings_service.cc
@@ -4,6 +4,8 @@ #include "chrome/browser/chromeos/settings/device_settings_service.h" +#include <utility> + #include "base/bind.h" #include "base/logging.h" #include "base/message_loop/message_loop.h" @@ -117,9 +119,8 @@ const base::Closure& callback) { Enqueue(linked_ptr<SessionManagerOperation>(new StoreSettingsOperation( base::Bind(&DeviceSettingsService::HandleCompletedOperation, - weak_factory_.GetWeakPtr(), - callback), - policy.Pass()))); + weak_factory_.GetWeakPtr(), callback), + std::move(policy)))); } DeviceSettingsService::OwnershipStatus @@ -252,8 +253,8 @@ } if (status == STORE_SUCCESS) { - policy_data_ = operation->policy_data().Pass(); - device_settings_ = operation->device_settings().Pass(); + policy_data_ = std::move(operation->policy_data()); + device_settings_ = std::move(operation->device_settings()); load_retries_left_ = kMaxLoadRetries; } else if (status != STORE_KEY_UNAVAILABLE) { LOG(ERROR) << "Session manager operation failed: " << status;
diff --git a/chrome/browser/chromeos/settings/session_manager_operation.cc b/chrome/browser/chromeos/settings/session_manager_operation.cc index 13a64f1..8b2283a 100644 --- a/chrome/browser/chromeos/settings/session_manager_operation.cc +++ b/chrome/browser/chromeos/settings/session_manager_operation.cc
@@ -4,6 +4,8 @@ #include "chrome/browser/chromeos/settings/session_manager_operation.h" +#include <utility> + #include "base/bind.h" #include "base/bind_helpers.h" #include "base/files/file_path.h" @@ -152,10 +154,9 @@ base::SequencedWorkerPool::SKIP_ON_SHUTDOWN); policy::DeviceCloudPolicyValidator* validator = - policy::DeviceCloudPolicyValidator::Create(policy.Pass(), + policy::DeviceCloudPolicyValidator::Create(std::move(policy), background_task_runner); - // Policy auto-generated by session manager doesn't include a timestamp, so // the timestamp shouldn't be verified in that case. // @@ -192,8 +193,8 @@ DeviceSettingsService::STORE_VALIDATION_ERROR; if (validator->success()) { status = DeviceSettingsService::STORE_SUCCESS; - policy_data_ = validator->policy_data().Pass(); - device_settings_ = validator->payload().Pass(); + policy_data_ = std::move(validator->policy_data()); + device_settings_ = std::move(validator->payload()); } else { LOG(ERROR) << "Policy validation failed: " << validator->status(); @@ -220,7 +221,7 @@ const Callback& callback, scoped_ptr<em::PolicyFetchResponse> policy) : SessionManagerOperation(callback), - policy_(policy.Pass()), + policy_(std::move(policy)), weak_factory_(this) {} StoreSettingsOperation::~StoreSettingsOperation() {}
diff --git a/chrome/browser/chromeos/system/automatic_reboot_manager.cc b/chrome/browser/chromeos/system/automatic_reboot_manager.cc index 76f4221..acaaa2e 100644 --- a/chrome/browser/chromeos/system/automatic_reboot_manager.cc +++ b/chrome/browser/chromeos/system/automatic_reboot_manager.cc
@@ -8,9 +8,9 @@ #include <stddef.h> #include <sys/stat.h> #include <sys/types.h> - #include <algorithm> #include <string> +#include <utility> #include "base/bind.h" #include "base/bind_helpers.h" @@ -151,7 +151,7 @@ AutomaticRebootManager::AutomaticRebootManager( scoped_ptr<base::TickClock> clock) - : clock_(clock.Pass()), + : clock_(std::move(clock)), have_boot_time_(false), have_update_reboot_needed_time_(false), reboot_reason_(AutomaticRebootManagerObserver::REBOOT_REASON_UNKNOWN),
diff --git a/chrome/browser/chromeos/system/timezone_util.cc b/chrome/browser/chromeos/system/timezone_util.cc index 4692d843..a4e66af 100644 --- a/chrome/browser/chromeos/system/timezone_util.cc +++ b/chrome/browser/chromeos/system/timezone_util.cc
@@ -158,7 +158,7 @@ option->Append(new base::StringValue(GetTimezoneName(*timezone))); timezoneList->Append(option); } - return timezoneList.Pass(); + return timezoneList; } bool HasSystemTimezonePolicy() {
diff --git a/chrome/browser/chromeos/system_logs/debug_log_writer.cc b/chrome/browser/chromeos/system_logs/debug_log_writer.cc index 92ff9b0f..3aad0adc 100644 --- a/chrome/browser/chromeos/system_logs/debug_log_writer.cc +++ b/chrome/browser/chromeos/system_logs/debug_log_writer.cc
@@ -5,6 +5,7 @@ #include "chrome/browser/chromeos/system_logs/debug_log_writer.h" #include <stdint.h> +#include <utility> #include "base/bind.h" #include "base/bind_helpers.h" @@ -76,12 +77,8 @@ scoped_refptr<base::TaskRunner> task_runner = GetSequencedTaskRunner(sequence_token_name); chromeos::DBusThreadManager::Get()->GetDebugDaemonClient()->DumpDebugLogs( - should_compress, - file->Pass(), - task_runner, - base::Bind(&WriteDebugLogToFileCompleted, - file_path, - sequence_token_name, + should_compress, std::move(*file), task_runner, + base::Bind(&WriteDebugLogToFileCompleted, file_path, sequence_token_name, callback)); }
diff --git a/chrome/browser/devtools/devtools_ui_bindings.cc b/chrome/browser/devtools/devtools_ui_bindings.cc index ba62f47..37707765 100644 --- a/chrome/browser/devtools/devtools_ui_bindings.cc +++ b/chrome/browser/devtools/devtools_ui_bindings.cc
@@ -126,6 +126,7 @@ ~DevToolsConfirmInfoBarDelegate() override; private: + infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override; base::string16 GetMessageText() const override; base::string16 GetButtonLabel(InfoBarButton button) const override; bool Accept() override; @@ -150,6 +151,11 @@ callback_.Run(false); } +infobars::InfoBarDelegate::InfoBarIdentifier +DevToolsConfirmInfoBarDelegate::GetIdentifier() const { + return DEV_TOOLS_CONFIRM_INFOBAR_DELEGATE; +} + base::string16 DevToolsConfirmInfoBarDelegate::GetMessageText() const { return message_; }
diff --git a/chrome/browser/devtools/global_confirm_info_bar.cc b/chrome/browser/devtools/global_confirm_info_bar.cc index 1a88612..79dab81 100644 --- a/chrome/browser/devtools/global_confirm_info_bar.cc +++ b/chrome/browser/devtools/global_confirm_info_bar.cc
@@ -25,6 +25,7 @@ friend class GlobalConfirmInfoBar; // ConfirmInfoBarDelegate overrides + infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override; base::string16 GetMessageText() const override; int GetButtons() const override; base::string16 GetButtonLabel(InfoBarButton button) const override; @@ -51,6 +52,12 @@ GlobalConfirmInfoBar::DelegateProxy::~DelegateProxy() { } +infobars::InfoBarDelegate::InfoBarIdentifier +GlobalConfirmInfoBar::DelegateProxy::GetIdentifier() const { + return global_info_bar_ ? global_info_bar_->delegate_->GetIdentifier() + : INVALID; +} + base::string16 GlobalConfirmInfoBar::DelegateProxy::GetMessageText() const { return global_info_bar_ ? global_info_bar_->delegate_->GetMessageText() : base::string16();
diff --git a/chrome/browser/download/download_request_infobar_delegate_android.cc b/chrome/browser/download/download_request_infobar_delegate_android.cc index 8f6e5570..dc8265e 100644 --- a/chrome/browser/download/download_request_infobar_delegate_android.cc +++ b/chrome/browser/download/download_request_infobar_delegate_android.cc
@@ -54,6 +54,11 @@ base::WeakPtr<DownloadRequestLimiter::TabDownloadState> host) : ConfirmInfoBarDelegate(), responded_(false), host_(host) {} +infobars::InfoBarDelegate::InfoBarIdentifier +DownloadRequestInfoBarDelegateAndroid::GetIdentifier() const { + return DOWNLOAD_REQUEST_INFOBAR_DELEGATE_ANDROID; +} + int DownloadRequestInfoBarDelegateAndroid::GetIconId() const { return IDR_INFOBAR_MULTIPLE_DOWNLOADS; }
diff --git a/chrome/browser/download/download_request_infobar_delegate_android.h b/chrome/browser/download/download_request_infobar_delegate_android.h index 41112e31..eab8f13 100644 --- a/chrome/browser/download/download_request_infobar_delegate_android.h +++ b/chrome/browser/download/download_request_infobar_delegate_android.h
@@ -47,6 +47,7 @@ base::WeakPtr<DownloadRequestLimiter::TabDownloadState> host); // ConfirmInfoBarDelegate: + infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override; int GetIconId() const override; base::string16 GetMessageText() const override; base::string16 GetButtonLabel(InfoBarButton button) const override;
diff --git a/chrome/browser/download/notification/download_item_notification.cc b/chrome/browser/download/notification/download_item_notification.cc index f26854f..4c48127 100644 --- a/chrome/browser/download/notification/download_item_notification.cc +++ b/chrome/browser/download/notification/download_item_notification.cc
@@ -414,8 +414,7 @@ UpdateNotificationIcon(); std::vector<message_center::ButtonInfo> notification_actions; - scoped_ptr<std::vector<DownloadCommands::Command>> actions( - GetExtraActions().Pass()); + scoped_ptr<std::vector<DownloadCommands::Command>> actions(GetExtraActions()); button_actions_.reset(new std::vector<DownloadCommands::Command>); for (auto it = actions->begin(); it != actions->end(); it++) { @@ -643,7 +642,7 @@ actions->push_back(DownloadCommands::DISCARD); actions->push_back(DownloadCommands::KEEP); } - return actions.Pass(); + return actions; } switch (item_->GetState()) { @@ -667,7 +666,7 @@ case content::DownloadItem::MAX_DOWNLOAD_STATE: NOTREACHED(); } - return actions.Pass(); + return actions; } base::string16 DownloadItemNotification::GetTitle() const {
diff --git a/chrome/browser/download/notification/download_item_notification_unittest.cc b/chrome/browser/download/notification/download_item_notification_unittest.cc index 635483d1..211349f4 100644 --- a/chrome/browser/download/notification/download_item_notification_unittest.cc +++ b/chrome/browser/download/notification/download_item_notification_unittest.cc
@@ -5,6 +5,7 @@ #include "chrome/browser/download/notification/download_item_notification.h" #include <stddef.h> +#include <utility> #include "base/macros.h" #include "base/message_loop/message_loop.h" @@ -74,8 +75,8 @@ profile_ = profile_manager_->CreateTestingProfile("test-user"); scoped_ptr<NotificationUIManager> ui_manager(new StubNotificationUIManager); - TestingBrowserProcess::GetGlobal()-> - SetNotificationUIManager(ui_manager.Pass()); + TestingBrowserProcess::GetGlobal()->SetNotificationUIManager( + std::move(ui_manager)); download_notification_manager_.reset( new DownloadNotificationManagerForProfile(profile_, nullptr));
diff --git a/chrome/browser/download/notification/download_notification_browsertest.cc b/chrome/browser/download/notification/download_notification_browsertest.cc index 3293f97..ea910c5 100644 --- a/chrome/browser/download/notification/download_notification_browsertest.cc +++ b/chrome/browser/download/notification/download_notification_browsertest.cc
@@ -3,6 +3,7 @@ // found in the LICENSE file. #include <stddef.h> +#include <utility> #include "base/command_line.h" #include "base/macros.h" @@ -338,7 +339,7 @@ test_delegate->GetDownloadIdReceiverCallback().Run( content::DownloadItem::kInvalidId + 1); DownloadServiceFactory::GetForBrowserContext(profile) - ->SetDownloadManagerDelegateForTesting(test_delegate.Pass()); + ->SetDownloadManagerDelegateForTesting(std::move(test_delegate)); DownloadNotificationTestBase::SetUpOnMainThread(); } @@ -359,7 +360,8 @@ incognito_test_delegate.reset( new TestChromeDownloadManagerDelegate(incognito_profile)); DownloadServiceFactory::GetForBrowserContext(incognito_profile) - ->SetDownloadManagerDelegateForTesting(incognito_test_delegate.Pass()); + ->SetDownloadManagerDelegateForTesting( + std::move(incognito_test_delegate)); } TestChromeDownloadManagerDelegate* GetIncognitoDownloadManagerDelegate()
diff --git a/chrome/browser/download/save_page_browsertest.cc b/chrome/browser/download/save_page_browsertest.cc index a7e0a548..fbbe0e3f 100644 --- a/chrome/browser/download/save_page_browsertest.cc +++ b/chrome/browser/download/save_page_browsertest.cc
@@ -908,10 +908,7 @@ count++; pos++; } - // TODO(lukasza): Need to dedupe savable resources (i.e. 1.png) across frames. - // This will be fixed by crrev.com/1417323006. - // EXPECT_EQ(1, count) - // << "Verify number of image/png parts in the mhtml output"; + EXPECT_EQ(1, count) << "Verify number of image/png parts in the mhtml output"; } // Test suite that verifies that the frame tree "looks" the same before
diff --git a/chrome/browser/extensions/api/braille_display_private/braille_controller_brlapi.cc b/chrome/browser/extensions/api/braille_display_private/braille_controller_brlapi.cc index 531b5c34..dd505a6 100644 --- a/chrome/browser/extensions/api/braille_display_private/braille_controller_brlapi.cc +++ b/chrome/browser/extensions/api/braille_display_private/braille_controller_brlapi.cc
@@ -6,10 +6,10 @@ #include <stddef.h> #include <stdint.h> - #include <algorithm> #include <cerrno> #include <cstring> +#include <utility> #include <vector> #include "base/bind.h" @@ -95,7 +95,7 @@ display_state->text_cell_count.reset(new int(size)); } } - return display_state.Pass(); + return display_state; } void BrailleControllerImpl::WriteDots(const std::vector<char>& cells) { @@ -287,7 +287,7 @@ } scoped_ptr<KeyEvent> event = BrlapiKeyCodeToEvent(code); if (event) - DispatchKeyEvent(event.Pass()); + DispatchKeyEvent(std::move(event)); } }
diff --git a/chrome/browser/extensions/api/braille_display_private/braille_display_private_apitest.cc b/chrome/browser/extensions/api/braille_display_private/braille_display_private_apitest.cc index ef922bf..f5f6b594 100644 --- a/chrome/browser/extensions/api/braille_display_private/braille_display_private_apitest.cc +++ b/chrome/browser/extensions/api/braille_display_private/braille_display_private_apitest.cc
@@ -287,7 +287,7 @@ MockEventDelegate* SetMockEventDelegate(BrailleDisplayPrivateAPI* api) { MockEventDelegate* delegate = new MockEventDelegate(); api->SetEventDelegateForTest( - scoped_ptr<BrailleDisplayPrivateAPI::EventDelegate>(delegate).Pass()); + scoped_ptr<BrailleDisplayPrivateAPI::EventDelegate>(delegate)); return delegate; }
diff --git a/chrome/browser/extensions/api/braille_display_private/brlapi_keycode_map.cc b/chrome/browser/extensions/api/braille_display_private/brlapi_keycode_map.cc index cc4469e5..e77426b 100644 --- a/chrome/browser/extensions/api/braille_display_private/brlapi_keycode_map.cc +++ b/chrome/browser/extensions/api/braille_display_private/brlapi_keycode_map.cc
@@ -165,7 +165,7 @@ } if (result->command == KEY_COMMAND_NONE) result.reset(); - return result.Pass(); + return result; } } // namespace braille_display_private
diff --git a/chrome/browser/extensions/api/debugger/debugger_api.cc b/chrome/browser/extensions/api/debugger/debugger_api.cc index e36fb72..7e238b2 100644 --- a/chrome/browser/extensions/api/debugger/debugger_api.cc +++ b/chrome/browser/extensions/api/debugger/debugger_api.cc
@@ -101,6 +101,7 @@ // ConfirmInfoBarDelegate: Type GetInfoBarType() const override; + infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override; bool ShouldExpire(const NavigationDetails& details) const override; void InfoBarDismissed() override; base::string16 GetMessageText() const override; @@ -128,6 +129,11 @@ return WARNING_TYPE; } +infobars::InfoBarDelegate::InfoBarIdentifier +ExtensionDevToolsInfoBarDelegate::GetIdentifier() const { + return EXTENSION_DEV_TOOLS_INFOBAR_DELEGATE; +} + bool ExtensionDevToolsInfoBarDelegate::ShouldExpire( const NavigationDetails& details) const { return false;
diff --git a/chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_api_chromeos_unittest.cc b/chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_api_chromeos_unittest.cc index 9713bf8..2f75977 100644 --- a/chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_api_chromeos_unittest.cc +++ b/chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_api_chromeos_unittest.cc
@@ -2,7 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_api.h" + #include <string> +#include <utility> #include "base/bind.h" #include "base/command_line.h" @@ -11,7 +14,6 @@ #include "base/strings/stringprintf.h" #include "base/thread_task_runner_handle.h" #include "base/values.h" -#include "chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_api.h" #include "chrome/browser/extensions/extension_api_unittest.h" #include "chrome/browser/extensions/extension_function_test_utils.h" #include "chrome/browser/extensions/extension_system_factory.h" @@ -231,9 +233,7 @@ args->Append(StringToBinaryValue(public_key_2)); ASSERT_TRUE(extension_function_test_utils::RunFunction( - function.get(), - args.Pass(), - browser(), + function.get(), std::move(args), browser(), extension_function_test_utils::NONE)); EXPECT_EQ(expected_result, GetSingleBinaryResultAsString(function.get())); @@ -279,9 +279,7 @@ api::ToString(api::SIGNATURE_TYPE_HMAC_SHA256)); ASSERT_TRUE(extension_function_test_utils::RunFunction( - function.get(), - args.Pass(), - browser(), + function.get(), std::move(args), browser(), extension_function_test_utils::NONE)); EXPECT_EQ(expected_result, GetSingleBinaryResultAsString(function.get())); @@ -311,9 +309,7 @@ args->Append(options); ASSERT_TRUE(extension_function_test_utils::RunFunction( - function.get(), - args.Pass(), - browser(), + function.get(), std::move(args), browser(), extension_function_test_utils::NONE)); EXPECT_EQ(expected_result, GetSingleBinaryResultAsString(function.get())); @@ -352,9 +348,7 @@ api::ToString(api::SIGNATURE_TYPE_ECDSA_P256_SHA256)); ASSERT_TRUE(extension_function_test_utils::RunFunction( - function.get(), - args.Pass(), - browser(), + function.get(), std::move(args), browser(), extension_function_test_utils::NONE)); EXPECT_EQ(expected_result, GetSingleBinaryResultAsString(function.get())); @@ -392,9 +386,7 @@ api::ToString(api::SIGNATURE_TYPE_HMAC_SHA256)); ASSERT_TRUE(extension_function_test_utils::RunFunction( - function.get(), - args.Pass(), - browser(), + function.get(), std::move(args), browser(), extension_function_test_utils::NONE)); EXPECT_EQ(expected_result, GetSingleBinaryResultAsString(function.get())); @@ -424,9 +416,7 @@ args->Append(options); ASSERT_TRUE(extension_function_test_utils::RunFunction( - function.get(), - args.Pass(), - browser(), + function.get(), std::move(args), browser(), extension_function_test_utils::NONE)); EXPECT_EQ(expected_result, GetSingleBinaryResultAsString(function.get())); @@ -462,9 +452,7 @@ api::ToString(api::SIGNATURE_TYPE_ECDSA_P256_SHA256)); ASSERT_TRUE(extension_function_test_utils::RunFunction( - function.get(), - args.Pass(), - browser(), + function.get(), std::move(args), browser(), extension_function_test_utils::NONE)); EXPECT_EQ(expected_result, GetSingleBinaryResultAsString(function.get())); @@ -490,7 +478,7 @@ service->Initialize( EasyUnlockAppManager::Create(extensions::ExtensionSystem::Get(context), -1 /* manifest id */, base::FilePath())); - return service.Pass(); + return std::move(service); } // A fake EventRouter that logs event it dispatches for testing. @@ -499,7 +487,7 @@ FakeEventRouter(Profile* profile, scoped_ptr<extensions::TestExtensionPrefs> extension_prefs) : EventRouter(profile, extension_prefs->prefs()), - extension_prefs_(extension_prefs.Pass()), + extension_prefs_(std::move(extension_prefs)), event_count_(0) {} void DispatchEventToExtension(const std::string& extension_id, @@ -526,7 +514,7 @@ scoped_ptr<extensions::TestExtensionPrefs> extension_prefs( new extensions::TestExtensionPrefs(base::ThreadTaskRunnerHandle::Get())); return make_scoped_ptr(new FakeEventRouter(static_cast<Profile*>(profile), - extension_prefs.Pass())); + std::move(extension_prefs))); } TEST_F(EasyUnlockPrivateApiTest, AutoPairing) {
diff --git a/chrome/browser/extensions/api/enterprise_platform_keys/enterprise_platform_keys_api.cc b/chrome/browser/extensions/api/enterprise_platform_keys/enterprise_platform_keys_api.cc index 8db3ce21..5dcaea9 100644 --- a/chrome/browser/extensions/api/enterprise_platform_keys/enterprise_platform_keys_api.cc +++ b/chrome/browser/extensions/api/enterprise_platform_keys/enterprise_platform_keys_api.cc
@@ -4,6 +4,8 @@ #include "chrome/browser/extensions/api/enterprise_platform_keys/enterprise_platform_keys_api.h" +#include <utility> + #include "base/bind.h" #include "base/values.h" #include "chrome/browser/chromeos/platform_keys/platform_keys.h" @@ -115,7 +117,7 @@ scoped_ptr<base::ListValue> results(new base::ListValue()); results->Append(client_certs.release()); - Respond(ArgumentList(results.Pass())); + Respond(ArgumentList(std::move(results))); } EnterprisePlatformKeysImportCertificateFunction::
diff --git a/chrome/browser/extensions/api/enterprise_platform_keys_private/enterprise_platform_keys_private_api.cc b/chrome/browser/extensions/api/enterprise_platform_keys_private/enterprise_platform_keys_private_api.cc index 004f4e1..3b3ca19 100644 --- a/chrome/browser/extensions/api/enterprise_platform_keys_private/enterprise_platform_keys_private_api.cc +++ b/chrome/browser/extensions/api/enterprise_platform_keys_private/enterprise_platform_keys_private_api.cc
@@ -5,6 +5,7 @@ #include "chrome/browser/extensions/api/enterprise_platform_keys_private/enterprise_platform_keys_private_api.h" #include <string> +#include <utility> #include "base/base64.h" #include "base/callback.h" @@ -79,9 +80,8 @@ ->GetInstallAttributes()) { scoped_ptr<chromeos::attestation::ServerProxy> ca_client( new chromeos::attestation::AttestationCAClient()); - default_attestation_flow_.reset( - new chromeos::attestation::AttestationFlow( - async_caller_, cryptohome_client_, ca_client.Pass())); + default_attestation_flow_.reset(new chromeos::attestation::AttestationFlow( + async_caller_, cryptohome_client_, std::move(ca_client))); attestation_flow_ = default_attestation_flow_.get(); }
diff --git a/chrome/browser/extensions/api/file_system/file_system_api.cc b/chrome/browser/extensions/api/file_system/file_system_api.cc index 2193382..b997ee1 100644 --- a/chrome/browser/extensions/api/file_system/file_system_api.cc +++ b/chrome/browser/extensions/api/file_system/file_system_api.cc
@@ -1458,9 +1458,8 @@ std::vector<linked_ptr<Volume>> result_volume_list; FillVolumeList(chrome_details_.GetProfile(), &result_volume_list); - return RespondNow( - ArgumentList(api::file_system::GetVolumeList::Results::Create( - result_volume_list).Pass())); + return RespondNow(ArgumentList( + api::file_system::GetVolumeList::Results::Create(result_volume_list))); } #endif
diff --git a/chrome/browser/extensions/api/file_system/request_file_system_notification.cc b/chrome/browser/extensions/api/file_system/request_file_system_notification.cc index 7a5bbb5..b1cddde 100644 --- a/chrome/browser/extensions/api/file_system/request_file_system_notification.cc +++ b/chrome/browser/extensions/api/file_system/request_file_system_notification.cc
@@ -4,6 +4,8 @@ #include "chrome/browser/extensions/api/file_system/request_file_system_notification.h" +#include <utility> + #include "base/memory/ref_counted.h" #include "base/strings/string16.h" #include "base/strings/utf_string_conversions.h" @@ -63,7 +65,7 @@ notification_id), data, delegate)); - return notification.Pass(); + return notification; } } // namespace @@ -83,7 +85,7 @@ extension, volume, writable, request_file_system_notification.get() /* delegate */)); if (notification.get()) - request_file_system_notification->Show(notification.Pass()); + request_file_system_notification->Show(std::move(notification)); } void RequestFileSystemNotification::SetAppImage(const std::string& id, @@ -94,7 +96,7 @@ if (pending_notification_.get()) { pending_notification_->set_icon(*extension_icon_.get()); g_browser_process->message_center()->AddNotification( - pending_notification_.Pass()); + std::move(pending_notification_)); } } @@ -119,5 +121,5 @@ pending_notification_->set_icon(*extension_icon_.get()); g_browser_process->message_center()->AddNotification( - pending_notification_.Pass()); + std::move(pending_notification_)); }
diff --git a/chrome/browser/extensions/api/image_writer_private/test_utils.cc b/chrome/browser/extensions/api/image_writer_private/test_utils.cc index 4b5b7d00..51f84d4c 100644 --- a/chrome/browser/extensions/api/image_writer_private/test_utils.cc +++ b/chrome/browser/extensions/api/image_writer_private/test_utils.cc
@@ -5,6 +5,7 @@ #include "chrome/browser/extensions/api/image_writer_private/test_utils.h" #include <string.h> +#include <utility> #include "build/build_config.h" @@ -168,7 +169,7 @@ chromeos::DBusThreadManager::GetSetterForTesting(); scoped_ptr<chromeos::ImageBurnerClient> image_burner_fake(new ImageWriterFakeImageBurnerClient()); - dbus_setter->SetImageBurnerClient(image_burner_fake.Pass()); + dbus_setter->SetImageBurnerClient(std::move(image_burner_fake)); } FakeDiskMountManager* disk_manager = new FakeDiskMountManager();
diff --git a/chrome/browser/extensions/api/input_ime/input_ime_api_chromeos.cc b/chrome/browser/extensions/api/input_ime/input_ime_api_chromeos.cc index bd863808..db2ad970 100644 --- a/chrome/browser/extensions/api/input_ime/input_ime_api_chromeos.cc +++ b/chrome/browser/extensions/api/input_ime/input_ime_api_chromeos.cc
@@ -5,6 +5,7 @@ #include "chrome/browser/extensions/api/input_ime/input_ime_api.h" #include <stddef.h> +#include <utility> #include "base/macros.h" #include "chrome/browser/chromeos/input_method/input_method_engine.h" @@ -92,7 +93,8 @@ input_ime::ParseScreenType(GetCurrentScreenType()))); DispatchEventToExtension(extensions::events::INPUT_IME_ON_ACTIVATE, - input_ime::OnActivate::kEventName, args.Pass()); + input_ime::OnActivate::kEventName, + std::move(args)); } void OnInputContextUpdate( @@ -111,7 +113,7 @@ DispatchEventToExtension( extensions::events::INPUT_IME_ON_INPUT_CONTEXT_UPDATE, - input_ime::OnInputContextUpdate::kEventName, args.Pass()); + input_ime::OnInputContextUpdate::kEventName, std::move(args)); } bool IsInterestedInKeyEvent() const override { @@ -148,7 +150,7 @@ DispatchEventToExtension(extensions::events::INPUT_IME_ON_CANDIDATE_CLICKED, input_ime::OnCandidateClicked::kEventName, - args.Pass()); + std::move(args)); } void OnMenuItemActivated(const std::string& component_id, @@ -162,7 +164,7 @@ DispatchEventToExtension( extensions::events::INPUT_IME_ON_MENU_ITEM_ACTIVATED, - input_ime::OnMenuItemActivated::kEventName, args.Pass()); + input_ime::OnMenuItemActivated::kEventName, std::move(args)); } void OnSurroundingTextChanged(const std::string& component_id, @@ -184,7 +186,7 @@ DispatchEventToExtension( extensions::events::INPUT_IME_ON_SURROUNDING_TEXT_CHANGED, - input_ime::OnSurroundingTextChanged::kEventName, args.Pass()); + input_ime::OnSurroundingTextChanged::kEventName, std::move(args)); } void OnCompositionBoundsChanged( @@ -217,7 +219,7 @@ DispatchEventToExtension( extensions::events::INPUT_METHOD_PRIVATE_ON_COMPOSITION_BOUNDS_CHANGED, - kOnCompositionBoundsChangedEventName, args.Pass()); + kOnCompositionBoundsChangedEventName, std::move(args)); } private: @@ -250,10 +252,10 @@ } scoped_ptr<extensions::Event> event( - new extensions::Event(histogram_value, event_name, args.Pass())); + new extensions::Event(histogram_value, event_name, std::move(args))); event->restrict_to_browser_context = profile_; extensions::EventRouter::Get(profile_) - ->DispatchEventToExtension(extension_id_, event.Pass()); + ->DispatchEventToExtension(extension_id_, std::move(event)); } // The component IME extensions need to know the current screen type (e.g. @@ -331,7 +333,7 @@ scoped_ptr<ui::IMEEngineObserver> observer( new ImeObserverChromeOS(extension_id, profile_)); chromeos::InputMethodEngine* engine = new chromeos::InputMethodEngine(); - engine->Initialize(observer.Pass(), extension_id.c_str(), profile_); + engine->Initialize(std::move(observer), extension_id.c_str(), profile_); engine_map_[extension_id] = engine; chromeos::UserSessionManager::GetInstance() ->GetDefaultIMEState(profile_)
diff --git a/chrome/browser/extensions/api/log_private/log_private_api_chromeos.cc b/chrome/browser/extensions/api/log_private/log_private_api_chromeos.cc index 50cbf75..b9af69b 100644 --- a/chrome/browser/extensions/api/log_private/log_private_api_chromeos.cc +++ b/chrome/browser/extensions/api/log_private/log_private_api_chromeos.cc
@@ -5,6 +5,7 @@ #include "chrome/browser/extensions/api/log_private/log_private_api.h" #include <string> +#include <utility> #include <vector> #include "base/command_line.h" @@ -252,9 +253,9 @@ event_args->Append(value->DeepCopy()); scoped_ptr<Event> event( new Event(::extensions::events::LOG_PRIVATE_ON_CAPTURED_EVENTS, - ::events::kOnCapturedEvents, event_args.Pass())); + ::events::kOnCapturedEvents, std::move(event_args))); EventRouter::Get(browser_context_) - ->DispatchEventToExtension(*ix, event.Pass()); + ->DispatchEventToExtension(*ix, std::move(event)); } } @@ -293,8 +294,8 @@ write_to_file_observer_.reset(new net::WriteToFileNetLogObserver()); write_to_file_observer_->set_capture_mode( net::NetLogCaptureMode::IncludeCookiesAndCredentials()); - write_to_file_observer_->StartObserving(io_thread->net_log(), file->Pass(), - nullptr, nullptr); + write_to_file_observer_->StartObserving(io_thread->net_log(), + std::move(*file), nullptr, nullptr); } void LogPrivateAPI::MaybeStartNetInternalLogging(
diff --git a/chrome/browser/extensions/api/log_private/log_private_apitest_chromeos.cc b/chrome/browser/extensions/api/log_private/log_private_apitest_chromeos.cc index dac69c7..bddbdab7 100644 --- a/chrome/browser/extensions/api/log_private/log_private_apitest_chromeos.cc +++ b/chrome/browser/extensions/api/log_private/log_private_apitest_chromeos.cc
@@ -3,6 +3,7 @@ // found in the LICENSE file. #include <string> +#include <utility> #include "base/files/file_path.h" #include "base/files/file_util.h" @@ -34,7 +35,7 @@ base::File file, scoped_refptr<base::TaskRunner> task_runner, const GetDebugLogsCallback& callback) override { - base::File* file_param = new base::File(file.Pass()); + base::File* file_param = new base::File(std::move(file)); task_runner->PostTaskAndReply( FROM_HERE, base::Bind( @@ -82,7 +83,7 @@ response->set_content( "<html><head><title>LogPrivateTest</title>" "</head><body>Hello!</body></html>"); - return response.Pass(); + return std::move(response); } };
diff --git a/chrome/browser/extensions/api/messaging/incognito_connectability.cc b/chrome/browser/extensions/api/messaging/incognito_connectability.cc index d647ae40..1caac20 100644 --- a/chrome/browser/extensions/api/messaging/incognito_connectability.cc +++ b/chrome/browser/extensions/api/messaging/incognito_connectability.cc
@@ -50,6 +50,7 @@ // ConfirmInfoBarDelegate: Type GetInfoBarType() const override; + infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override; base::string16 GetMessageText() const override; base::string16 GetButtonLabel(InfoBarButton button) const override; bool Accept() override; @@ -91,6 +92,11 @@ return PAGE_ACTION_TYPE; } +infobars::InfoBarDelegate::InfoBarIdentifier +IncognitoConnectabilityInfoBarDelegate::GetIdentifier() const { + return INCOGNITO_CONNECTABILITY_INFOBAR_DELEGATE; +} + base::string16 IncognitoConnectabilityInfoBarDelegate::GetMessageText() const { return message_; }
diff --git a/chrome/browser/extensions/api/messaging/native_message_host_chromeos.cc b/chrome/browser/extensions/api/messaging/native_message_host_chromeos.cc index 143efcd..c7ad6dd 100644 --- a/chrome/browser/extensions/api/messaging/native_message_host_chromeos.cc +++ b/chrome/browser/extensions/api/messaging/native_message_host_chromeos.cc
@@ -5,6 +5,7 @@ #include "extensions/browser/api/messaging/native_message_host.h" #include <string> +#include <utility> #include "base/bind.h" #include "base/bind_helpers.h" @@ -106,8 +107,8 @@ content::BrowserThread::GetMessageLoopProxyForThread( content::BrowserThread::FILE)); scoped_ptr<NativeMessageHost> host(new remoting::It2MeNativeMessagingHost( - context.Pass(), host_factory.Pass())); - return host.Pass(); + std::move(context), std::move(host_factory))); + return host; } // If you modify the list of allowed_origins, don't forget to update
diff --git a/chrome/browser/extensions/api/networking_private/networking_private_apitest.cc b/chrome/browser/extensions/api/networking_private/networking_private_apitest.cc index a74c977..85b1c50 100644 --- a/chrome/browser/extensions/api/networking_private/networking_private_apitest.cc +++ b/chrome/browser/extensions/api/networking_private/networking_private_apitest.cc
@@ -3,8 +3,8 @@ // found in the LICENSE file. #include <stddef.h> - #include <map> +#include <utility> #include <vector> #include "base/command_line.h" @@ -39,7 +39,7 @@ class TestDelegate : public NetworkingPrivateDelegate { public: explicit TestDelegate(scoped_ptr<VerifyDelegate> verify_delegate) - : NetworkingPrivateDelegate(verify_delegate.Pass()), fail_(false) {} + : NetworkingPrivateDelegate(std::move(verify_delegate)), fail_(false) {} ~TestDelegate() override {} @@ -97,7 +97,7 @@ ::onc::network_config::kEthernet); network->SetString(::onc::network_config::kGUID, kGuid); result->Append(network.release()); - success_callback.Run(result.Pass()); + success_callback.Run(std::move(result)); } } @@ -165,20 +165,20 @@ result.reset(new base::ListValue); result->AppendString(::onc::network_config::kEthernet); } - return result.Pass(); + return result; } scoped_ptr<DeviceStateList> GetDeviceStateList() override { scoped_ptr<DeviceStateList> result; if (fail_) - return result.Pass(); + return result; result.reset(new DeviceStateList); scoped_ptr<api::networking_private::DeviceStateProperties> properties( new api::networking_private::DeviceStateProperties); properties->type = api::networking_private::NETWORK_TYPE_ETHERNET; properties->state = api::networking_private::DEVICE_STATE_TYPE_ENABLED; - result->push_back(properties.Pass()); - return result.Pass(); + result->push_back(std::move(properties)); + return result; } bool EnableNetworkType(const std::string& type) override { @@ -211,7 +211,7 @@ result->SetString(::onc::network_config::kGUID, guid); result->SetString(::onc::network_config::kType, ::onc::network_config::kWiFi); - success_callback.Run(result.Pass()); + success_callback.Run(std::move(result)); } } @@ -293,7 +293,7 @@ TestVerifyDelegate* verify_delegate = new TestVerifyDelegate; scoped_ptr<NetworkingPrivateDelegate::VerifyDelegate> verify_delegate_ptr( verify_delegate); - s_test_delegate_ = new TestDelegate(verify_delegate_ptr.Pass()); + s_test_delegate_ = new TestDelegate(std::move(verify_delegate_ptr)); verify_delegate->set_owner(s_test_delegate_); } }
diff --git a/chrome/browser/extensions/api/networking_private/networking_private_chromeos_apitest.cc b/chrome/browser/extensions/api/networking_private/networking_private_chromeos_apitest.cc index e8336cc..537d0631f 100644 --- a/chrome/browser/extensions/api/networking_private/networking_private_chromeos_apitest.cc +++ b/chrome/browser/extensions/api/networking_private/networking_private_chromeos_apitest.cc
@@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include <utility> + #include "base/bind.h" #include "base/callback.h" #include "base/command_line.h" @@ -264,11 +266,11 @@ content::BrowserContext* context) { scoped_ptr<CryptoVerifyStub> crypto_verify(new CryptoVerifyStub); scoped_ptr<NetworkingPrivateDelegate> result( - new NetworkingPrivateChromeOS(context, crypto_verify.Pass())); + new NetworkingPrivateChromeOS(context, std::move(crypto_verify))); scoped_ptr<NetworkingPrivateDelegate::UIDelegate> ui_delegate( new UIDelegateStub); - result->set_ui_delegate(ui_delegate.Pass()); - return result.Pass(); + result->set_ui_delegate(std::move(ui_delegate)); + return std::move(result); } void SetUpOnMainThread() override {
diff --git a/chrome/browser/extensions/api/platform_keys/platform_keys_api.cc b/chrome/browser/extensions/api/platform_keys/platform_keys_api.cc index e683c056..65e143e0 100644 --- a/chrome/browser/extensions/api/platform_keys/platform_keys_api.cc +++ b/chrome/browser/extensions/api/platform_keys/platform_keys_api.cc
@@ -5,7 +5,7 @@ #include "chrome/browser/extensions/api/platform_keys/platform_keys_api.h" #include <stddef.h> - +#include <utility> #include <vector> #include "base/bind.h" @@ -229,7 +229,8 @@ } service->SelectClientCertificates( - request, client_certs.Pass(), params->details.interactive, extension_id(), + request, std::move(client_certs), params->details.interactive, + extension_id(), base::Bind(&PlatformKeysInternalSelectClientCertificatesFunction:: OnSelectedCertificates, this), @@ -353,7 +354,7 @@ VerifyTrustAPI::GetFactoryInstance() ->Get(browser_context()) - ->Verify(params.Pass(), extension_id(), + ->Verify(std::move(params), extension_id(), base::Bind(&PlatformKeysVerifyTLSServerCertificateFunction:: FinishedVerification, this));
diff --git a/chrome/browser/extensions/api/settings_private/prefs_util.cc b/chrome/browser/extensions/api/settings_private/prefs_util.cc index cb9ad421..ec10184 100644 --- a/chrome/browser/extensions/api/settings_private/prefs_util.cc +++ b/chrome/browser/extensions/api/settings_private/prefs_util.cc
@@ -284,7 +284,7 @@ settings_private::PolicyEnforcement::POLICY_ENFORCEMENT_ENFORCED; pref_object->policy_source_name.reset(new std::string( user_manager::UserManager::Get()->GetPrimaryUser()->email())); - return pref_object.Pass(); + return pref_object; } if (IsPrefEnterpriseManaged(name)) { // Enterprise managed prefs are treated the same as device policy restricted @@ -293,7 +293,7 @@ settings_private::PolicySource::POLICY_SOURCE_DEVICE_POLICY; pref_object->policy_enforcement = settings_private::PolicyEnforcement::POLICY_ENFORCEMENT_ENFORCED; - return pref_object.Pass(); + return pref_object; } #endif @@ -326,7 +326,7 @@ settings_private::PolicyEnforcement::POLICY_ENFORCEMENT_ENFORCED; pref_object->policy_source_name.reset(new std::string( user_manager::UserManager::Get()->GetOwnerAccountId().GetUserEmail())); - return pref_object.Pass(); + return pref_object; } #endif
diff --git a/chrome/browser/extensions/api/terminal/terminal_private_api.cc b/chrome/browser/extensions/api/terminal/terminal_private_api.cc index 49326bc9..d9cd4a5a 100644 --- a/chrome/browser/extensions/api/terminal/terminal_private_api.cc +++ b/chrome/browser/extensions/api/terminal/terminal_private_api.cc
@@ -4,6 +4,8 @@ #include "chrome/browser/extensions/api/terminal/terminal_private_api.h" +#include <utility> + #include "base/bind.h" #include "base/json/json_writer.h" #include "base/sys_info.h" @@ -65,8 +67,8 @@ if (profile && event_router) { scoped_ptr<extensions::Event> event(new extensions::Event( extensions::events::TERMINAL_PRIVATE_ON_PROCESS_OUTPUT, - terminal_private::OnProcessOutput::kEventName, args.Pass())); - event_router->DispatchEventToExtension(extension_id, event.Pass()); + terminal_private::OnProcessOutput::kEventName, std::move(args))); + event_router->DispatchEventToExtension(extension_id, std::move(event)); } }
diff --git a/chrome/browser/extensions/api/virtual_keyboard_private/chrome_virtual_keyboard_delegate.cc b/chrome/browser/extensions/api/virtual_keyboard_private/chrome_virtual_keyboard_delegate.cc index 4dbe70a9..1343ad3 100644 --- a/chrome/browser/extensions/api/virtual_keyboard_private/chrome_virtual_keyboard_delegate.cc +++ b/chrome/browser/extensions/api/virtual_keyboard_private/chrome_virtual_keyboard_delegate.cc
@@ -5,6 +5,7 @@ #include "chrome/browser/extensions/api/virtual_keyboard_private/chrome_virtual_keyboard_delegate.h" #include <string> +#include <utility> #include "ash/shell.h" #include "base/command_line.h" @@ -87,7 +88,7 @@ GenerateFeatureFlag("voiceinput", keyboard::IsVoiceInputEnabled())); features->AppendString(GenerateFeatureFlag("experimental", keyboard::IsExperimentalInputViewEnabled())); - results->Set("features", features.Pass()); + results->Set("features", std::move(features)); return true; }
diff --git a/chrome/browser/extensions/api/webstore_widget_private/app_installer.cc b/chrome/browser/extensions/api/webstore_widget_private/app_installer.cc index d96397c0..ea5e34b 100644 --- a/chrome/browser/extensions/api/webstore_widget_private/app_installer.cc +++ b/chrome/browser/extensions/api/webstore_widget_private/app_installer.cc
@@ -67,7 +67,7 @@ prompt->SetWebstoreData(localized_user_count(), show_user_count(), average_rating(), rating_count()); - return prompt.Pass(); + return prompt; } bool AppInstaller::ShouldShowPostInstallUI() const {
diff --git a/chrome/browser/extensions/component_loader.cc b/chrome/browser/extensions/component_loader.cc index c8731117..78cf6b9 100644 --- a/chrome/browser/extensions/component_loader.cc +++ b/chrome/browser/extensions/component_loader.cc
@@ -109,7 +109,7 @@ bool localized = extension_l10n_util::LocalizeExtension( root_directory, manifest.get(), &error); CHECK(localized) << error; - return manifest.Pass(); + return manifest; } bool IsNormalSession() {
diff --git a/chrome/browser/extensions/theme_installed_infobar_delegate.cc b/chrome/browser/extensions/theme_installed_infobar_delegate.cc index f097275..98d52ab72 100644 --- a/chrome/browser/extensions/theme_installed_infobar_delegate.cc +++ b/chrome/browser/extensions/theme_installed_infobar_delegate.cc
@@ -111,6 +111,11 @@ return PAGE_ACTION_TYPE; } +infobars::InfoBarDelegate::InfoBarIdentifier +ThemeInstalledInfoBarDelegate::GetIdentifier() const { + return THEME_INSTALLED_INFOBAR_DELEGATE; +} + int ThemeInstalledInfoBarDelegate::GetIconId() const { return IDR_INFOBAR_THEME; }
diff --git a/chrome/browser/extensions/theme_installed_infobar_delegate.h b/chrome/browser/extensions/theme_installed_infobar_delegate.h index 384ae1a..d440aca 100644 --- a/chrome/browser/extensions/theme_installed_infobar_delegate.h +++ b/chrome/browser/extensions/theme_installed_infobar_delegate.h
@@ -43,6 +43,7 @@ // ConfirmInfoBarDelegate: Type GetInfoBarType() const override; + infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override; int GetIconId() const override; gfx::VectorIconId GetVectorIconId() const override; ThemeInstalledInfoBarDelegate* AsThemePreviewInfobarDelegate() override;
diff --git a/chrome/browser/geolocation/geolocation_infobar_delegate_android.cc b/chrome/browser/geolocation/geolocation_infobar_delegate_android.cc index 73de4aca4..02ad6d84 100644 --- a/chrome/browser/geolocation/geolocation_infobar_delegate_android.cc +++ b/chrome/browser/geolocation/geolocation_infobar_delegate_android.cc
@@ -36,6 +36,11 @@ GeolocationInfoBarDelegateAndroid::~GeolocationInfoBarDelegateAndroid() {} +infobars::InfoBarDelegate::InfoBarIdentifier +GeolocationInfoBarDelegateAndroid::GetIdentifier() const { + return GEOLOCATION_INFOBAR_DELEGATE_ANDROID; +} + int GeolocationInfoBarDelegateAndroid::GetIconId() const { return IDR_ANDROID_INFOBAR_GEOLOCATION; }
diff --git a/chrome/browser/geolocation/geolocation_infobar_delegate_android.h b/chrome/browser/geolocation/geolocation_infobar_delegate_android.h index ecb28ea232..3757955b 100644 --- a/chrome/browser/geolocation/geolocation_infobar_delegate_android.h +++ b/chrome/browser/geolocation/geolocation_infobar_delegate_android.h
@@ -29,6 +29,7 @@ ~GeolocationInfoBarDelegateAndroid() override; // PermissionInfoBarDelegate: + infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override; int GetIconId() const override; base::string16 GetMessageText() const override;
diff --git a/chrome/browser/gpu/three_d_api_observer.cc b/chrome/browser/gpu/three_d_api_observer.cc index 3d342955..2fa88038 100644 --- a/chrome/browser/gpu/three_d_api_observer.cc +++ b/chrome/browser/gpu/three_d_api_observer.cc
@@ -39,6 +39,7 @@ ~ThreeDAPIInfoBarDelegate() override; // ConfirmInfoBarDelegate: + infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override; int GetIconId() const override; bool EqualsDelegate(infobars::InfoBarDelegate* delegate) const override; ThreeDAPIInfoBarDelegate* AsThreeDAPIInfoBarDelegate() override; @@ -87,6 +88,11 @@ } } +infobars::InfoBarDelegate::InfoBarIdentifier +ThreeDAPIInfoBarDelegate::GetIdentifier() const { + return THREE_D_API_INFOBAR_DELEGATE; +} + int ThreeDAPIInfoBarDelegate::GetIconId() const { return IDR_INFOBAR_3D_BLOCKED; }
diff --git a/chrome/browser/infobars/insecure_content_infobar_delegate.cc b/chrome/browser/infobars/insecure_content_infobar_delegate.cc index eed7ece..8af7856 100644 --- a/chrome/browser/infobars/insecure_content_infobar_delegate.cc +++ b/chrome/browser/infobars/insecure_content_infobar_delegate.cc
@@ -51,6 +51,11 @@ InsecureContentInfoBarDelegate::~InsecureContentInfoBarDelegate() { } +infobars::InfoBarDelegate::InfoBarIdentifier +InsecureContentInfoBarDelegate::GetIdentifier() const { + return INSECURE_CONTENT_INFOBAR_DELEGATE; +} + void InsecureContentInfoBarDelegate::InfoBarDismissed() { UMA_HISTOGRAM_ENUMERATION("InsecureContentInfoBarDelegateV2", DISPLAY_INFOBAR_DISMISSED, NUM_EVENTS);
diff --git a/chrome/browser/infobars/insecure_content_infobar_delegate.h b/chrome/browser/infobars/insecure_content_infobar_delegate.h index 84c0487a..7403ad0 100644 --- a/chrome/browser/infobars/insecure_content_infobar_delegate.h +++ b/chrome/browser/infobars/insecure_content_infobar_delegate.h
@@ -31,6 +31,7 @@ ~InsecureContentInfoBarDelegate() override; // ConfirmInfoBarDelegate: + infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override; void InfoBarDismissed() override; InsecureContentInfoBarDelegate* AsInsecureContentInfoBarDelegate() override; base::string16 GetMessageText() const override;
diff --git a/chrome/browser/io_thread_unittest.cc b/chrome/browser/io_thread_unittest.cc index 25527cdc..f3321ee 100644 --- a/chrome/browser/io_thread_unittest.cc +++ b/chrome/browser/io_thread_unittest.cc
@@ -685,7 +685,9 @@ scoped_ptr<IOThread> io_thread_; }; -TEST_F(IOThreadTestWithIOThreadObject, UpdateNegotiateDisableCnameLookup) { +// https://crbug.com/570703 +TEST_F(IOThreadTestWithIOThreadObject, + DISABLED_UpdateNegotiateDisableCnameLookup) { // This test uses the kDisableAuthNegotiateCnameLookup to check that // the HttpAuthPreferences are correctly initialized and running on the // IO thread. The other preferences are tested by the HttpAuthPreferences @@ -700,7 +702,8 @@ base::Unretained(this), true)); } -TEST_F(IOThreadTestWithIOThreadObject, UpdateEnableAuthNegotiatePort) { +// https://crbug.com/570703 +TEST_F(IOThreadTestWithIOThreadObject, DISABLED_UpdateEnableAuthNegotiatePort) { pref_service()->SetBoolean(prefs::kEnableAuthNegotiatePort, false); RunOnIOThreadBlocking( base::Bind(&IOThreadTestWithIOThreadObject::CheckNegotiateEnablePort, @@ -712,6 +715,7 @@ } // Flaky: https://crbug.com/570605. +// https://crbug.com/570703 TEST_F(IOThreadTestWithIOThreadObject, DISABLED_UpdateServerWhitelist) { GURL url("http://test.example.com"); @@ -726,7 +730,8 @@ base::Unretained(this), true, url)); } -TEST_F(IOThreadTestWithIOThreadObject, UpdateDelegateWhitelist) { +// https://crbug.com/570703 +TEST_F(IOThreadTestWithIOThreadObject, DISABLED_UpdateDelegateWhitelist) { GURL url("http://test.example.com"); pref_service()->SetString(prefs::kAuthNegotiateDelegateWhitelist, ""); @@ -742,7 +747,9 @@ #if defined(OS_ANDROID) // AuthAndroidNegotiateAccountType is only used on Android. -TEST_F(IOThreadTestWithIOThreadObject, UpdateAuthAndroidNegotiateAccountType) { +// https://crbug.com/570703 +TEST_F(IOThreadTestWithIOThreadObject, + DISABLED_UpdateAuthAndroidNegotiateAccountType) { pref_service()->SetString(prefs::kAuthAndroidNegotiateAccountType, "acc1"); RunOnIOThreadBlocking(base::Bind( &IOThreadTestWithIOThreadObject::CheckAuthAndroidNegoitateAccountType,
diff --git a/chrome/browser/media/encrypted_media_browsertest.cc b/chrome/browser/media/encrypted_media_browsertest.cc index 316d1ea6..738b6d8 100644 --- a/chrome/browser/media/encrypted_media_browsertest.cc +++ b/chrome/browser/media/encrypted_media_browsertest.cc
@@ -236,13 +236,12 @@ const std::string& key_system) { #if defined(WIDEVINE_CDM_AVAILABLE) if (IsWidevine(key_system)) { - scoped_ptr<TestLicenseServerConfig> config = - scoped_ptr<TestLicenseServerConfig>(new WVTestLicenseServerConfig()); + scoped_ptr<TestLicenseServerConfig> config(new WVTestLicenseServerConfig); if (config->IsPlatformSupported()) - return config.Pass(); + return config; } #endif // defined(WIDEVINE_CDM_AVAILABLE) - return scoped_ptr<TestLicenseServerConfig>(); + return nullptr; } protected:
diff --git a/chrome/browser/media/media_stream_infobar_delegate_android.cc b/chrome/browser/media/media_stream_infobar_delegate_android.cc index bcbc4290..ab1c0462 100644 --- a/chrome/browser/media/media_stream_infobar_delegate_android.cc +++ b/chrome/browser/media/media_stream_infobar_delegate_android.cc
@@ -71,6 +71,11 @@ return controller_->IsAskingForAudio(); } +infobars::InfoBarDelegate::InfoBarIdentifier +MediaStreamInfoBarDelegateAndroid::GetIdentifier() const { + return MEDIA_STREAM_INFOBAR_DELEGATE_ANDROID; +} + MediaStreamInfoBarDelegateAndroid::MediaStreamInfoBarDelegateAndroid( scoped_ptr<MediaStreamDevicesController> controller) : ConfirmInfoBarDelegate(), controller_(std::move(controller)) {
diff --git a/chrome/browser/media/media_stream_infobar_delegate_android.h b/chrome/browser/media/media_stream_infobar_delegate_android.h index 52243c1e..8e2d8dd 100644 --- a/chrome/browser/media/media_stream_infobar_delegate_android.h +++ b/chrome/browser/media/media_stream_infobar_delegate_android.h
@@ -38,6 +38,7 @@ scoped_ptr<MediaStreamDevicesController> controller); // ConfirmInfoBarDelegate: + infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override; Type GetInfoBarType() const override; int GetIconId() const override; void InfoBarDismissed() override;
diff --git a/chrome/browser/media/midi_permission_infobar_delegate_android.cc b/chrome/browser/media/midi_permission_infobar_delegate_android.cc index 94c8f52..c7e4a139 100644 --- a/chrome/browser/media/midi_permission_infobar_delegate_android.cc +++ b/chrome/browser/media/midi_permission_infobar_delegate_android.cc
@@ -36,6 +36,11 @@ MidiPermissionInfoBarDelegateAndroid::~MidiPermissionInfoBarDelegateAndroid() {} +infobars::InfoBarDelegate::InfoBarIdentifier +MidiPermissionInfoBarDelegateAndroid::GetIdentifier() const { + return MIDI_PERMISSION_INFOBAR_DELEGATE_ANDROID; +} + int MidiPermissionInfoBarDelegateAndroid::GetIconId() const { return IDR_INFOBAR_MIDI; }
diff --git a/chrome/browser/media/midi_permission_infobar_delegate_android.h b/chrome/browser/media/midi_permission_infobar_delegate_android.h index b332eeb..49b9fa6 100644 --- a/chrome/browser/media/midi_permission_infobar_delegate_android.h +++ b/chrome/browser/media/midi_permission_infobar_delegate_android.h
@@ -33,6 +33,7 @@ ~MidiPermissionInfoBarDelegateAndroid() override; // ConfirmInfoBarDelegate: + infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override; int GetIconId() const override; base::string16 GetMessageText() const override;
diff --git a/chrome/browser/media/protected_media_identifier_infobar_delegate_android.cc b/chrome/browser/media/protected_media_identifier_infobar_delegate_android.cc index ddf049cb..8cc0816e9 100644 --- a/chrome/browser/media/protected_media_identifier_infobar_delegate_android.cc +++ b/chrome/browser/media/protected_media_identifier_infobar_delegate_android.cc
@@ -41,6 +41,11 @@ ProtectedMediaIdentifierInfoBarDelegateAndroid:: ~ProtectedMediaIdentifierInfoBarDelegateAndroid() {} +infobars::InfoBarDelegate::InfoBarIdentifier +ProtectedMediaIdentifierInfoBarDelegateAndroid::GetIdentifier() const { + return PROTECTED_MEDIA_IDENTIFIER_INFOBAR_DELEGATE_ANDROID; +} + int ProtectedMediaIdentifierInfoBarDelegateAndroid::GetIconId() const { return IDR_ANDROID_INFOBAR_PROTECTED_MEDIA_IDENTIFIER; }
diff --git a/chrome/browser/media/protected_media_identifier_infobar_delegate_android.h b/chrome/browser/media/protected_media_identifier_infobar_delegate_android.h index 630e9fa..e1b672e 100644 --- a/chrome/browser/media/protected_media_identifier_infobar_delegate_android.h +++ b/chrome/browser/media/protected_media_identifier_infobar_delegate_android.h
@@ -32,6 +32,7 @@ private: // ConfirmInfoBarDelegate: + infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override; int GetIconId() const override; base::string16 GetMessageText() const override; base::string16 GetLinkText() const override;
diff --git a/chrome/browser/metrics/perf/perf_provider_chromeos.cc b/chrome/browser/metrics/perf/perf_provider_chromeos.cc index 15bcf4c..b8c5504 100644 --- a/chrome/browser/metrics/perf/perf_provider_chromeos.cc +++ b/chrome/browser/metrics/perf/perf_provider_chromeos.cc
@@ -5,10 +5,10 @@ #include "chrome/browser/metrics/perf/perf_provider_chromeos.h" #include <stddef.h> - #include <algorithm> #include <map> #include <string> +#include <utility> #include "base/bind.h" #include "base/callback.h" @@ -592,7 +592,7 @@ scoped_ptr<SampledProfile> sampled_profile(new SampledProfile); sampled_profile->set_trigger_event(SampledProfile::PERIODIC_COLLECTION); - CollectIfNecessary(sampled_profile.Pass()); + CollectIfNecessary(std::move(sampled_profile)); } void PerfProvider::CollectPerfDataAfterResume( @@ -604,7 +604,7 @@ sampled_profile->set_suspend_duration_ms(sleep_duration.InMilliseconds()); sampled_profile->set_ms_after_resume(time_after_resume.InMilliseconds()); - CollectIfNecessary(sampled_profile.Pass()); + CollectIfNecessary(std::move(sampled_profile)); } void PerfProvider::CollectPerfDataAfterSessionRestore( @@ -616,7 +616,7 @@ sampled_profile->set_ms_after_restore(time_after_restore.InMilliseconds()); sampled_profile->set_num_tabs_restored(num_tabs_restored); - CollectIfNecessary(sampled_profile.Pass()); + CollectIfNecessary(std::move(sampled_profile)); last_session_restore_collection_time_ = base::TimeTicks::Now(); }
diff --git a/chrome/browser/metrics/perf/perf_provider_chromeos_unittest.cc b/chrome/browser/metrics/perf/perf_provider_chromeos_unittest.cc index 59207c2..badbf31 100644 --- a/chrome/browser/metrics/perf/perf_provider_chromeos_unittest.cc +++ b/chrome/browser/metrics/perf/perf_provider_chromeos_unittest.cc
@@ -5,8 +5,8 @@ #include "chrome/browser/metrics/perf/perf_provider_chromeos.h" #include <stdint.h> - #include <string> +#include <utility> #include <vector> #include "base/macros.h" @@ -115,7 +115,7 @@ bool incognito_launched) { scoped_ptr<TestIncognitoObserver> observer(new TestIncognitoObserver); observer->set_incognito_launched(incognito_launched); - return observer.Pass(); + return std::move(observer); } private: @@ -203,9 +203,7 @@ perf_provider_->ParseOutputProtoIfValid( TestIncognitoObserver::CreateWithIncognitoLaunched(false), - sampled_profile.Pass(), - kPerfSuccess, - std::vector<uint8_t>(), + std::move(sampled_profile), kPerfSuccess, std::vector<uint8_t>(), std::vector<uint8_t>()); std::vector<SampledProfile> stored_profiles; @@ -218,10 +216,8 @@ perf_provider_->ParseOutputProtoIfValid( TestIncognitoObserver::CreateWithIncognitoLaunched(false), - sampled_profile.Pass(), - kPerfSuccess, - SerializeMessageToVector(perf_data_proto_), - std::vector<uint8_t>()); + std::move(sampled_profile), kPerfSuccess, + SerializeMessageToVector(perf_data_proto_), std::vector<uint8_t>()); std::vector<SampledProfile> stored_profiles; EXPECT_TRUE(perf_provider_->GetSampledProfiles(&stored_profiles)); @@ -243,9 +239,7 @@ perf_provider_->ParseOutputProtoIfValid( TestIncognitoObserver::CreateWithIncognitoLaunched(false), - sampled_profile.Pass(), - kPerfSuccess, - std::vector<uint8_t>(), + std::move(sampled_profile), kPerfSuccess, std::vector<uint8_t>(), SerializeMessageToVector(perf_stat_proto_)); std::vector<SampledProfile> stored_profiles; @@ -268,8 +262,7 @@ perf_provider_->ParseOutputProtoIfValid( TestIncognitoObserver::CreateWithIncognitoLaunched(false), - sampled_profile.Pass(), - kPerfSuccess, + std::move(sampled_profile), kPerfSuccess, SerializeMessageToVector(perf_data_proto_), SerializeMessageToVector(perf_stat_proto_)); @@ -284,10 +277,8 @@ perf_provider_->ParseOutputProtoIfValid( TestIncognitoObserver::CreateWithIncognitoLaunched(false), - sampled_profile.Pass(), - kPerfFailure, - SerializeMessageToVector(perf_data_proto_), - std::vector<uint8_t>()); + std::move(sampled_profile), kPerfFailure, + SerializeMessageToVector(perf_data_proto_), std::vector<uint8_t>()); // Should not have been stored. std::vector<SampledProfile> stored_profiles; @@ -302,19 +293,15 @@ perf_provider_->ParseOutputProtoIfValid( TestIncognitoObserver::CreateWithIncognitoLaunched(false), - sampled_profile.Pass(), - kPerfSuccess, - SerializeMessageToVector(perf_data_proto_), - std::vector<uint8_t>()); + std::move(sampled_profile), kPerfSuccess, + SerializeMessageToVector(perf_data_proto_), std::vector<uint8_t>()); sampled_profile.reset(new SampledProfile); sampled_profile->set_trigger_event(SampledProfile::RESTORE_SESSION); sampled_profile->set_ms_after_restore(3000); perf_provider_->ParseOutputProtoIfValid( TestIncognitoObserver::CreateWithIncognitoLaunched(false), - sampled_profile.Pass(), - kPerfSuccess, - std::vector<uint8_t>(), + std::move(sampled_profile), kPerfSuccess, std::vector<uint8_t>(), SerializeMessageToVector(perf_stat_proto_)); sampled_profile.reset(new SampledProfile); @@ -323,18 +310,14 @@ sampled_profile->set_ms_after_resume(1500); perf_provider_->ParseOutputProtoIfValid( TestIncognitoObserver::CreateWithIncognitoLaunched(false), - sampled_profile.Pass(), - kPerfSuccess, - SerializeMessageToVector(perf_data_proto_), - std::vector<uint8_t>()); + std::move(sampled_profile), kPerfSuccess, + SerializeMessageToVector(perf_data_proto_), std::vector<uint8_t>()); sampled_profile.reset(new SampledProfile); sampled_profile->set_trigger_event(SampledProfile::PERIODIC_COLLECTION); perf_provider_->ParseOutputProtoIfValid( TestIncognitoObserver::CreateWithIncognitoLaunched(false), - sampled_profile.Pass(), - kPerfSuccess, - std::vector<uint8_t>(), + std::move(sampled_profile), kPerfSuccess, std::vector<uint8_t>(), SerializeMessageToVector(perf_stat_proto_)); std::vector<SampledProfile> stored_profiles; @@ -385,10 +368,8 @@ perf_provider_->ParseOutputProtoIfValid( TestIncognitoObserver::CreateWithIncognitoLaunched(false), - sampled_profile.Pass(), - kPerfSuccess, - SerializeMessageToVector(perf_data_proto_), - std::vector<uint8_t>()); + std::move(sampled_profile), kPerfSuccess, + SerializeMessageToVector(perf_data_proto_), std::vector<uint8_t>()); std::vector<SampledProfile> stored_profiles1; EXPECT_TRUE(perf_provider_->GetSampledProfiles(&stored_profiles1)); @@ -407,9 +388,7 @@ sampled_profile->set_ms_after_restore(3000); perf_provider_->ParseOutputProtoIfValid( TestIncognitoObserver::CreateWithIncognitoLaunched(false), - sampled_profile.Pass(), - kPerfSuccess, - std::vector<uint8_t>(), + std::move(sampled_profile), kPerfSuccess, std::vector<uint8_t>(), SerializeMessageToVector(perf_stat_proto_)); std::vector<SampledProfile> stored_profiles2; @@ -430,10 +409,8 @@ // An incognito window opens. perf_provider_->ParseOutputProtoIfValid( TestIncognitoObserver::CreateWithIncognitoLaunched(true), - sampled_profile.Pass(), - kPerfSuccess, - SerializeMessageToVector(perf_data_proto_), - std::vector<uint8_t>()); + std::move(sampled_profile), kPerfSuccess, + SerializeMessageToVector(perf_data_proto_), std::vector<uint8_t>()); std::vector<SampledProfile> stored_profiles_empty; EXPECT_FALSE(perf_provider_->GetSampledProfiles(&stored_profiles_empty)); @@ -443,9 +420,7 @@ // Incognito window is still open. perf_provider_->ParseOutputProtoIfValid( TestIncognitoObserver::CreateWithIncognitoLaunched(true), - sampled_profile.Pass(), - kPerfSuccess, - std::vector<uint8_t>(), + std::move(sampled_profile), kPerfSuccess, std::vector<uint8_t>(), SerializeMessageToVector(perf_stat_proto_)); EXPECT_FALSE(perf_provider_->GetSampledProfiles(&stored_profiles_empty)); @@ -457,10 +432,8 @@ // Incognito window closes. perf_provider_->ParseOutputProtoIfValid( TestIncognitoObserver::CreateWithIncognitoLaunched(false), - sampled_profile.Pass(), - kPerfSuccess, - SerializeMessageToVector(perf_data_proto_), - std::vector<uint8_t>()); + std::move(sampled_profile), kPerfSuccess, + SerializeMessageToVector(perf_data_proto_), std::vector<uint8_t>()); std::vector<SampledProfile> stored_profiles3; EXPECT_TRUE(perf_provider_->GetSampledProfiles(&stored_profiles3));
diff --git a/chrome/browser/nacl_host/nacl_infobar_delegate.cc b/chrome/browser/nacl_host/nacl_infobar_delegate.cc index 0b98c923..3bb7131 100644 --- a/chrome/browser/nacl_host/nacl_infobar_delegate.cc +++ b/chrome/browser/nacl_host/nacl_infobar_delegate.cc
@@ -38,6 +38,11 @@ NaClInfoBarDelegate::~NaClInfoBarDelegate() { } +infobars::InfoBarDelegate::InfoBarIdentifier +NaClInfoBarDelegate::GetIdentifier() const { + return NACL_INFOBAR_DELEGATE; +} + base::string16 NaClInfoBarDelegate::GetMessageText() const { return l10n_util::GetStringUTF16(IDS_NACL_APP_MISSING_ARCH_MESSAGE); }
diff --git a/chrome/browser/nacl_host/nacl_infobar_delegate.h b/chrome/browser/nacl_host/nacl_infobar_delegate.h index 1be0d2f..7545fd7 100644 --- a/chrome/browser/nacl_host/nacl_infobar_delegate.h +++ b/chrome/browser/nacl_host/nacl_infobar_delegate.h
@@ -18,6 +18,7 @@ NaClInfoBarDelegate(); ~NaClInfoBarDelegate() override; + infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override; base::string16 GetMessageText() const override; int GetButtons() const override; base::string16 GetLinkText() const override;
diff --git a/chrome/browser/net/nss_context_chromeos.cc b/chrome/browser/net/nss_context_chromeos.cc index 045e6ff..3841eb2f 100644 --- a/chrome/browser/net/nss_context_chromeos.cc +++ b/chrome/browser/net/nss_context_chromeos.cc
@@ -4,6 +4,8 @@ #include "chrome/browser/net/nss_context.h" +#include <utility> + #include "base/macros.h" #include "base/memory/weak_ptr.h" #include "base/supports_user_data.h" @@ -28,7 +30,7 @@ base::Bind(&NSSCertDatabaseChromeOSManager::DidGetPrivateSlot, weak_ptr_factory_.GetWeakPtr()))); if (private_slot) - DidGetPrivateSlot(private_slot.Pass()); + DidGetPrivateSlot(std::move(private_slot)); } ~NSSCertDatabaseChromeOSManager() override { @@ -53,7 +55,7 @@ DCHECK_CURRENTLY_ON(content::BrowserThread::IO); nss_cert_database_.reset(new net::NSSCertDatabaseChromeOS( crypto::GetPublicSlotForChromeOSUser(username_hash_), - private_slot.Pass())); + std::move(private_slot))); ReadyCallbackList callback_list; callback_list.swap(ready_callback_list_); @@ -99,7 +101,7 @@ void SetSystemSlot(crypto::ScopedPK11Slot system_slot, net::NSSCertDatabaseChromeOS* db) { - db->SetSystemSlot(system_slot.Pass()); + db->SetSystemSlot(std::move(system_slot)); } void SetSystemSlotOfDBForResourceContext(content::ResourceContext* context, @@ -142,5 +144,5 @@ base::Bind(&SetSystemSlotOfDBForResourceContext, context); crypto::ScopedPK11Slot system_slot = crypto::GetSystemNSSKeySlot(callback); if (system_slot) - callback.Run(system_slot.Pass()); + callback.Run(std::move(system_slot)); }
diff --git a/chrome/browser/net/spdyproxy/data_reduction_proxy_infobar_delegate_android.cc b/chrome/browser/net/spdyproxy/data_reduction_proxy_infobar_delegate_android.cc index 583ae735..7da15b5 100644 --- a/chrome/browser/net/spdyproxy/data_reduction_proxy_infobar_delegate_android.cc +++ b/chrome/browser/net/spdyproxy/data_reduction_proxy_infobar_delegate_android.cc
@@ -33,6 +33,11 @@ DataReductionProxyInfoBarDelegateAndroid(const std::string& link_url) : ConfirmInfoBarDelegate(), link_url_(link_url) {} +infobars::InfoBarDelegate::InfoBarIdentifier +DataReductionProxyInfoBarDelegateAndroid::GetIdentifier() const { + return DATA_REDUCTION_PROXY_INFOBAR_DELEGATE_ANDROID; +} + bool DataReductionProxyInfoBarDelegateAndroid::ShouldExpire( const NavigationDetails& details) const { return false;
diff --git a/chrome/browser/net/spdyproxy/data_reduction_proxy_infobar_delegate_android.h b/chrome/browser/net/spdyproxy/data_reduction_proxy_infobar_delegate_android.h index 5a487b3..82a0946 100644 --- a/chrome/browser/net/spdyproxy/data_reduction_proxy_infobar_delegate_android.h +++ b/chrome/browser/net/spdyproxy/data_reduction_proxy_infobar_delegate_android.h
@@ -39,6 +39,7 @@ scoped_ptr<DataReductionProxyInfoBarDelegateAndroid> delegate); // ConfirmInfoBarDelegate + infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override; bool ShouldExpire(const NavigationDetails& details) const override; base::string16 GetMessageText() const override; int GetButtons() const override;
diff --git a/chrome/browser/notifications/notification_permission_infobar_delegate.cc b/chrome/browser/notifications/notification_permission_infobar_delegate.cc index d932c001..eea756d 100644 --- a/chrome/browser/notifications/notification_permission_infobar_delegate.cc +++ b/chrome/browser/notifications/notification_permission_infobar_delegate.cc
@@ -39,6 +39,11 @@ NotificationPermissionInfobarDelegate::~NotificationPermissionInfobarDelegate() {} +infobars::InfoBarDelegate::InfoBarIdentifier +NotificationPermissionInfobarDelegate::GetIdentifier() const { + return NOTIFICATION_PERMISSION_INFOBAR_DELEGATE; +} + int NotificationPermissionInfobarDelegate::GetIconId() const { return IDR_ANDROID_INFOBAR_NOTIFICATIONS; }
diff --git a/chrome/browser/notifications/notification_permission_infobar_delegate.h b/chrome/browser/notifications/notification_permission_infobar_delegate.h index bc81585..7478d81e 100644 --- a/chrome/browser/notifications/notification_permission_infobar_delegate.h +++ b/chrome/browser/notifications/notification_permission_infobar_delegate.h
@@ -28,6 +28,7 @@ ~NotificationPermissionInfobarDelegate() override; // PermissionInfoBarDelegate: + infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override; int GetIconId() const override; base::string16 GetMessageText() const override;
diff --git a/chrome/browser/password_manager/auto_signin_first_run_infobar_delegate.cc b/chrome/browser/password_manager/auto_signin_first_run_infobar_delegate.cc index 42cacedf24..fe6e8d6f 100644 --- a/chrome/browser/password_manager/auto_signin_first_run_infobar_delegate.cc +++ b/chrome/browser/password_manager/auto_signin_first_run_infobar_delegate.cc
@@ -51,6 +51,11 @@ profile->GetPrefs()); } +infobars::InfoBarDelegate::InfoBarIdentifier +AutoSigninFirstRunInfoBarDelegate::GetIdentifier() const { + return AUTO_SIGNIN_FIRST_RUN_INFOBAR_DELEGATE; +} + base::string16 AutoSigninFirstRunInfoBarDelegate::GetButtonLabel( InfoBarButton button) const { return l10n_util::GetStringUTF16(IDS_ONE_CLICK_SIGNIN_DIALOG_OK_BUTTON);
diff --git a/chrome/browser/password_manager/auto_signin_first_run_infobar_delegate.h b/chrome/browser/password_manager/auto_signin_first_run_infobar_delegate.h index 3355984..8fba5c4e 100644 --- a/chrome/browser/password_manager/auto_signin_first_run_infobar_delegate.h +++ b/chrome/browser/password_manager/auto_signin_first_run_infobar_delegate.h
@@ -22,6 +22,7 @@ ~AutoSigninFirstRunInfoBarDelegate() override; + infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override; base::string16 GetButtonLabel(InfoBarButton button) const override; bool Accept() override; bool Cancel() override;
diff --git a/chrome/browser/password_manager/generated_password_saved_infobar_delegate_android.cc b/chrome/browser/password_manager/generated_password_saved_infobar_delegate_android.cc index fdae9fd8..e7a74ed0 100644 --- a/chrome/browser/password_manager/generated_password_saved_infobar_delegate_android.cc +++ b/chrome/browser/password_manager/generated_password_saved_infobar_delegate_android.cc
@@ -65,6 +65,11 @@ return PAGE_ACTION_TYPE; } +infobars::InfoBarDelegate::InfoBarIdentifier +GeneratedPasswordSavedInfoBarDelegateAndroid::GetIdentifier() const { + return GENERATED_PASSWORD_SAVED_INFOBAR_DELEGATE_ANDROID; +} + int GeneratedPasswordSavedInfoBarDelegateAndroid::GetIconId() const { return IDR_INFOBAR_SAVE_PASSWORD; }
diff --git a/chrome/browser/password_manager/generated_password_saved_infobar_delegate_android.h b/chrome/browser/password_manager/generated_password_saved_infobar_delegate_android.h index fb63352..9c91298 100644 --- a/chrome/browser/password_manager/generated_password_saved_infobar_delegate_android.h +++ b/chrome/browser/password_manager/generated_password_saved_infobar_delegate_android.h
@@ -41,6 +41,7 @@ // infobars::InfoBarDelegate: Type GetInfoBarType() const override; + infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override; int GetIconId() const override; // The translated text of the message to display.
diff --git a/chrome/browser/password_manager/save_password_infobar_delegate.cc b/chrome/browser/password_manager/save_password_infobar_delegate.cc index 2ad6ed3e..a0f854a 100644 --- a/chrome/browser/password_manager/save_password_infobar_delegate.cc +++ b/chrome/browser/password_manager/save_password_infobar_delegate.cc
@@ -123,6 +123,11 @@ : base::string16(); } +infobars::InfoBarDelegate::InfoBarIdentifier +SavePasswordInfoBarDelegate::GetIdentifier() const { + return SAVE_PASSWORD_INFOBAR_DELEGATE; +} + void SavePasswordInfoBarDelegate::InfoBarDismissed() { DCHECK(form_to_save_.get()); infobar_response_ = password_manager::metrics_util::INFOBAR_DISMISSED;
diff --git a/chrome/browser/password_manager/save_password_infobar_delegate.h b/chrome/browser/password_manager/save_password_infobar_delegate.h index 14f7a71..e0c90460 100644 --- a/chrome/browser/password_manager/save_password_infobar_delegate.h +++ b/chrome/browser/password_manager/save_password_infobar_delegate.h
@@ -47,6 +47,7 @@ base::string16 GetFirstRunExperienceMessage(); // ConfirmInfoBarDelegate: + infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override; void InfoBarDismissed() override; base::string16 GetButtonLabel(InfoBarButton button) const override; bool Accept() override;
diff --git a/chrome/browser/pepper_broker_infobar_delegate.cc b/chrome/browser/pepper_broker_infobar_delegate.cc index 57ac28c..99d367d1 100644 --- a/chrome/browser/pepper_broker_infobar_delegate.cc +++ b/chrome/browser/pepper_broker_infobar_delegate.cc
@@ -93,6 +93,11 @@ callback_.Run(false); } +infobars::InfoBarDelegate::InfoBarIdentifier +PepperBrokerInfoBarDelegate::GetIdentifier() const { + return PEPPER_BROKER_INFOBAR_DELEGATE; +} + int PepperBrokerInfoBarDelegate::GetIconId() const { return IDR_INFOBAR_PLUGIN_INSTALL; }
diff --git a/chrome/browser/pepper_broker_infobar_delegate.h b/chrome/browser/pepper_broker_infobar_delegate.h index 3b03de48..cce3364 100644 --- a/chrome/browser/pepper_broker_infobar_delegate.h +++ b/chrome/browser/pepper_broker_infobar_delegate.h
@@ -43,6 +43,7 @@ ~PepperBrokerInfoBarDelegate() override; // ConfirmInfoBarDelegate: + infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override; int GetIconId() const override; base::string16 GetMessageText() const override; base::string16 GetButtonLabel(InfoBarButton button) const override;
diff --git a/chrome/browser/permissions/permission_update_infobar_delegate_android.cc b/chrome/browser/permissions/permission_update_infobar_delegate_android.cc index 1999ae0..c42887e7 100644 --- a/chrome/browser/permissions/permission_update_infobar_delegate_android.cc +++ b/chrome/browser/permissions/permission_update_infobar_delegate_android.cc
@@ -148,6 +148,11 @@ base::android::AttachCurrentThread(), java_delegate_.obj()); } +infobars::InfoBarDelegate::InfoBarIdentifier +PermissionUpdateInfoBarDelegate::GetIdentifier() const { + return PERMISSION_UPDATE_INFOBAR_DELEGATE; +} + int PermissionUpdateInfoBarDelegate::GetIconId() const { return IDR_INFOBAR_WARNING; }
diff --git a/chrome/browser/permissions/permission_update_infobar_delegate_android.h b/chrome/browser/permissions/permission_update_infobar_delegate_android.h index 4aeb168..853823d0 100644 --- a/chrome/browser/permissions/permission_update_infobar_delegate_android.h +++ b/chrome/browser/permissions/permission_update_infobar_delegate_android.h
@@ -68,6 +68,9 @@ const PermissionUpdatedCallback& callback); ~PermissionUpdateInfoBarDelegate() override; + // InfoBarDelegate: + infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override; + // PermissionInfoBarDelegate: int GetIconId() const override; base::string16 GetMessageText() const override;
diff --git a/chrome/browser/plugins/chrome_plugin_service_filter.cc b/chrome/browser/plugins/chrome_plugin_service_filter.cc index 6fc88d83d..fd1fa51 100644 --- a/chrome/browser/plugins/chrome_plugin_service_filter.cc +++ b/chrome/browser/plugins/chrome_plugin_service_filter.cc
@@ -77,6 +77,7 @@ ~NPAPIRemovalInfoBarDelegate() override; // ConfirmInfobarDelegate: + infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override; int GetIconId() const override; base::string16 GetMessageText() const override; int GetButtons() const override; @@ -151,6 +152,11 @@ NPAPIRemovalInfoBarDelegate::~NPAPIRemovalInfoBarDelegate() { } +infobars::InfoBarDelegate::InfoBarIdentifier +NPAPIRemovalInfoBarDelegate::GetIdentifier() const { + return NPAPI_REMOVAL_INFOBAR_DELEGATE; +} + int NPAPIRemovalInfoBarDelegate::GetIconId() const { return IDR_INFOBAR_WARNING; }
diff --git a/chrome/browser/plugins/plugin_infobar_delegates.cc b/chrome/browser/plugins/plugin_infobar_delegates.cc index 80cb2eb..35fb5ff 100644 --- a/chrome/browser/plugins/plugin_infobar_delegates.cc +++ b/chrome/browser/plugins/plugin_infobar_delegates.cc
@@ -103,6 +103,11 @@ content::RecordAction(UserMetricsAction("OutdatedPluginInfobar.Closed")); } +infobars::InfoBarDelegate::InfoBarIdentifier +OutdatedPluginInfoBarDelegate::GetIdentifier() const { + return OUTDATED_PLUGIN_INFOBAR_DELEGATE; +} + void OutdatedPluginInfoBarDelegate::InfoBarDismissed() { content::RecordAction(UserMetricsAction("OutdatedPluginInfobar.Dismissed")); } @@ -234,6 +239,11 @@ PluginMetroModeInfoBarDelegate::~PluginMetroModeInfoBarDelegate() { } +infobars::InfoBarDelegate::InfoBarIdentifier +PluginMetroModeInfoBarDelegate::GetIdentifier() const { + return PLUGIN_METRO_MODE_INFOBAR_DELEGATE; +} + int PluginMetroModeInfoBarDelegate::GetIconId() const { return IDR_INFOBAR_PLUGIN_INSTALL; }
diff --git a/chrome/browser/plugins/plugin_infobar_delegates.h b/chrome/browser/plugins/plugin_infobar_delegates.h index d6a9488..2b88461 100644 --- a/chrome/browser/plugins/plugin_infobar_delegates.h +++ b/chrome/browser/plugins/plugin_infobar_delegates.h
@@ -48,6 +48,7 @@ ~OutdatedPluginInfoBarDelegate() override; // ConfirmInfoBarDelegate: + infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override; void InfoBarDismissed() override; int GetIconId() const override; base::string16 GetMessageText() const override; @@ -102,6 +103,7 @@ ~PluginMetroModeInfoBarDelegate() override; // ConfirmInfoBarDelegate: + infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override; int GetIconId() const override; base::string16 GetMessageText() const override; int GetButtons() const override;
diff --git a/chrome/browser/plugins/plugin_observer.cc b/chrome/browser/plugins/plugin_observer.cc index ed901b1..4285ab6 100644 --- a/chrome/browser/plugins/plugin_observer.cc +++ b/chrome/browser/plugins/plugin_observer.cc
@@ -25,6 +25,7 @@ #include "components/content_settings/core/browser/host_content_settings_map.h" #include "components/infobars/core/confirm_infobar_delegate.h" #include "components/infobars/core/infobar.h" +#include "components/infobars/core/infobar_delegate.h" #include "components/infobars/core/simple_alert_infobar_delegate.h" #include "components/metrics_services_manager/metrics_services_manager.h" #include "content/public/browser/plugin_service.h" @@ -137,6 +138,7 @@ ~ReloadPluginInfoBarDelegate() override; // ConfirmInfobarDelegate: + infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override; int GetIconId() const override; gfx::VectorIconId GetVectorIconId() const override; base::string16 GetMessageText() const override; @@ -166,6 +168,11 @@ ReloadPluginInfoBarDelegate::~ReloadPluginInfoBarDelegate(){ } +infobars::InfoBarDelegate::InfoBarIdentifier +ReloadPluginInfoBarDelegate::GetIdentifier() const { + return RELOAD_PLUGIN_INFOBAR_DELEGATE; +} + int ReloadPluginInfoBarDelegate::GetIconId() const { return IDR_INFOBAR_PLUGIN_CRASHED; } @@ -417,6 +424,7 @@ PluginService::GetInstance()->GetPluginDisplayNameByPath(plugin_path); SimpleAlertInfoBarDelegate::Create( InfoBarService::FromWebContents(web_contents()), + infobars::InfoBarDelegate::PLUGIN_OBSERVER, IDR_INFOBAR_PLUGIN_CRASHED, #if !defined(OS_MACOSX) && !defined(OS_IOS) && !defined(OS_ANDROID) gfx::VectorIconId::EXTENSION_CRASHED,
diff --git a/chrome/browser/policy/configuration_policy_handler_list_factory.cc b/chrome/browser/policy/configuration_policy_handler_list_factory.cc index 6e5e3947..05518590 100644 --- a/chrome/browser/policy/configuration_policy_handler_list_factory.cc +++ b/chrome/browser/policy/configuration_policy_handler_list_factory.cc
@@ -6,6 +6,7 @@ #include <limits.h> #include <stddef.h> +#include <utility> #include "base/bind.h" #include "base/macros.h" @@ -802,12 +803,12 @@ // http://crbug.com/346229 handlers->AddHandler( make_scoped_ptr(new LegacyPoliciesDeprecatingPolicyHandler( - power_management_idle_legacy_policies.Pass(), + std::move(power_management_idle_legacy_policies), make_scoped_ptr( new PowerManagementIdleSettingsPolicyHandler(chrome_schema))))); handlers->AddHandler( make_scoped_ptr(new LegacyPoliciesDeprecatingPolicyHandler( - screen_lock_legacy_policies.Pass(), + std::move(screen_lock_legacy_policies), make_scoped_ptr(new ScreenLockDelayPolicyHandler(chrome_schema))))); handlers->AddHandler( make_scoped_ptr(new ExternalDataPolicyHandler(key::kUserAvatarImage)));
diff --git a/chrome/browser/policy/policy_browsertest.cc b/chrome/browser/policy/policy_browsertest.cc index f6c1a1b..70b102d 100644 --- a/chrome/browser/policy/policy_browsertest.cc +++ b/chrome/browser/policy/policy_browsertest.cc
@@ -4,9 +4,9 @@ #include <stddef.h> #include <stdint.h> - #include <algorithm> #include <string> +#include <utility> #include <vector> #include "ash/display/display_manager.h" @@ -713,7 +713,7 @@ // is tied to the test instead. chrome_screenshot_grabber->screenshot_grabber()->AddObserver(&observer_); ash::Shell::GetInstance()->accelerator_controller()->SetScreenshotDelegate( - chrome_screenshot_grabber.Pass()); + std::move(chrome_screenshot_grabber)); SetScreenshotPolicy(enabled); ash::Shell::GetInstance()->accelerator_controller()->PerformActionIfEnabled(
diff --git a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc b/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc index 0cbefeb..ab7e8b9 100644 --- a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc +++ b/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc
@@ -4,6 +4,8 @@ #include "chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.h" +#include <utility> + #include "build/build_config.h" #include "chrome/browser/autocomplete/in_memory_url_index_factory.h" #include "chrome/browser/autocomplete/shortcuts_backend_factory.h" @@ -263,12 +265,12 @@ new extensions::NetworkingPrivateVerifyDelegateFactoryImpl); extensions::NetworkingPrivateDelegateFactory::GetInstance() ->SetVerifyDelegateFactory( - networking_private_verify_delegate_factory.Pass()); + std::move(networking_private_verify_delegate_factory)); scoped_ptr<extensions::NetworkingPrivateUIDelegateFactoryImpl> networking_private_ui_delegate_factory( new extensions::NetworkingPrivateUIDelegateFactoryImpl); extensions::NetworkingPrivateDelegateFactory::GetInstance() - ->SetUIDelegateFactory(networking_private_ui_delegate_factory.Pass()); + ->SetUIDelegateFactory(std::move(networking_private_ui_delegate_factory)); #endif #endif #if !defined(OS_ANDROID)
diff --git a/chrome/browser/profiles/profile_io_data.cc b/chrome/browser/profiles/profile_io_data.cc index 5c85410..20d93b9 100644 --- a/chrome/browser/profiles/profile_io_data.cc +++ b/chrome/browser/profiles/profile_io_data.cc
@@ -513,7 +513,7 @@ scoped_ptr<policy::PolicyCertVerifier> verifier = policy::PolicyCertServiceFactory::CreateForProfile(profile); policy_cert_verifier_ = verifier.get(); - cert_verifier_ = verifier.Pass(); + cert_verifier_ = std::move(verifier); #endif // The URLBlacklistManager has to be created on the UI thread to register // observers of |pref_service|, and it also has to clean up on @@ -1097,7 +1097,7 @@ if (use_system_key_slot_) EnableNSSSystemKeySlotForResourceContext(resource_context_.get()); - certificate_provider_ = profile_params_->certificate_provider.Pass(); + certificate_provider_ = std::move(profile_params_->certificate_provider); #endif if (g_cert_verifier_for_testing) { @@ -1109,7 +1109,7 @@ // The private slot won't be ready by this point. It shouldn't be necessary // for cert trust purposes anyway. scoped_refptr<net::CertVerifyProc> verify_proc( - new chromeos::CertVerifyProcChromeOS(public_slot.Pass())); + new chromeos::CertVerifyProcChromeOS(std::move(public_slot))); if (policy_cert_verifier_) { DCHECK_EQ(policy_cert_verifier_, cert_verifier_.get()); policy_cert_verifier_->InitializeOnIOThread(verify_proc);
diff --git a/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.css b/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.css index 5a5f09f..c9ca9f1 100644 --- a/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.css +++ b/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.css
@@ -43,6 +43,36 @@ text-decoration: none; } +#first-run-button { + background-color: white; +} + +#first-run-button-container { + display: flex; + flex-direction: row; + justify-content: flex-end; +} + +#first-run-flow { + background-color: rgb(33, 150, 243); + padding: 24px 16px 4px 16px; +} + +#first-run-text, +#first-run-title { + color: white; + padding-bottom: 24px; +} + +#first-run-text { + font-size: 1.0em; + line-height: 1.5em; +} + +#first-run-title { + font-size: 1.25em; +} + #issue-banner { margin-top: var(--container-header-height); width: 100%;
diff --git a/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.html b/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.html index 60028b5..d8138f9 100644 --- a/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.html +++ b/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.html
@@ -14,6 +14,18 @@ <link rel="import" type="css" href="../../media_router_common.css"> <link rel="import" type="css" href="media_router_container.css"> <template> + <template is="dom-if" if="[[showFirstRunFlow_]]"> + <div id="first-run-flow"> + <div id="first-run-title">[[firstRunFlowTitle_]]</div> + <div id="first-run-text">[[firstRunFlowText_]]</div> + <div id="first-run-button-container"> + <paper-button id="first-run-button" class="button" + on-click="acknowledgeFirstRunFlow_"> + <span>[[firstRunFlowButtonText_]]</span> + </paper-button> + </div> + </div> + </template> <media-router-header id="container-header" class$="[[currentView_]]" view="[[currentView_]]" heading-text="[[computeHeaderText_(currentView_, headerText)]]"
diff --git a/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js b/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js index 3dd40bd..c9858792 100644 --- a/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js +++ b/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js
@@ -75,6 +75,36 @@ }, /** + * The text for the first run flow button. + * @private {string} + */ + firstRunFlowButtonText_: { + type: String, + readOnly: true, + value: loadTimeData.getString('firstRunFlowButton'), + }, + + /** + * The text description for the first run flow. + * @private {string} + */ + firstRunFlowText_: { + type: String, + readOnly: true, + value: loadTimeData.getString('firstRunFlowText'), + }, + + /** + * The header of the first run flow. + * @private {string} + */ + firstRunFlowTitle_: { + type: String, + readOnly: true, + value: loadTimeData.getString('firstRunFlowTitle'), + }, + + /** * The header text for the sink list. * @type {string} */ @@ -162,6 +192,15 @@ }, /** + * Whether to show the first run flow. + * @private {boolean} + */ + showFirstRunFlow_: { + type: Boolean, + value: false, + }, + + /** * The cast mode shown to the user. Initially set to auto mode. (See * media_router.CastMode documentation for details on auto mode.) * This value may be changed in one of the following ways: @@ -248,6 +287,16 @@ }, /** + * Fires an acknowledge-first-run-flow event. This is call when the first run + * flow button is clicked. + * + * @private + */ + acknowledgeFirstRunFlow_: function() { + this.fire('acknowledge-first-run-flow'); + }, + + /** * Checks that the currently selected cast mode is still in the * updated list of available cast modes. If not, then update the selected * cast mode to the first available cast mode on the list. @@ -623,6 +672,7 @@ return; this.userHasSelectedCastMode_ = true; + this.fire('cast-mode-selected', {castModeType: clickedMode.type}); // The list of sinks to show will be the same if the shown cast mode did // not change, regardless of whether the user selected it explicitly. @@ -685,6 +735,7 @@ */ onSinkClick_: function(event) { this.showOrCreateRoute_(this.$.sinkList.itemForElement(event.target)); + this.fire('sink-click', {index: event.model.index}); }, /** @@ -819,6 +870,7 @@ var route = this.sinkToRouteMap_[sink.id]; if (route) { this.showRouteDetails_(route); + this.fire('navigate-sink-list-to-details'); } else if (this.currentLaunchingSinkId_ == '') { // Allow one launch at a time. this.fire('create-route', { @@ -875,9 +927,11 @@ * @private */ toggleCastModeHidden_: function() { - if (this.currentView_ == media_router.MediaRouterView.CAST_MODE_LIST) + if (this.currentView_ == media_router.MediaRouterView.CAST_MODE_LIST) { this.showSinkList_(); - else + } else { this.showCastModeList_(); + this.fire('navigate-to-cast-mode-list'); + } }, });
diff --git a/chrome/browser/resources/media_router/media_router.js b/chrome/browser/resources/media_router/media_router.js index 0c55b88..fe27a8ad 100644 --- a/chrome/browser/resources/media_router/media_router.js +++ b/chrome/browser/resources/media_router/media_router.js
@@ -22,12 +22,19 @@ container = $('media-router-container'); media_router.ui.setContainer(container); + container.addEventListener('back-click', onNavigateToSinkList); + container.addEventListener('cast-mode-selected', onCastModeSelected); container.addEventListener('close-button-click', onCloseDialogEvent); container.addEventListener('close-dialog', onCloseDialogEvent); container.addEventListener('close-route-click', onCloseRouteClick); container.addEventListener('create-route', onCreateRoute); container.addEventListener('issue-action-click', onIssueActionClick); + container.addEventListener('navigate-sink-list-to-details', + onNavigateToDetails); + container.addEventListener('navigate-to-cast-mode-list', + onNavigateToCastMode); container.addEventListener('report-sink-count', onSinkCountReported); + container.addEventListener('sink-click', onSinkClick); } /** @@ -57,6 +64,18 @@ } /** + * Reports the selected cast mode. + * Called when the user selects a cast mode from the picker. + * + * @param {{detail: {castModeType: number}}} data + * Parameters in |data|.detail: + * castModeType - type of cast mode selected by the user. + */ + function onCastModeSelected(data) { + media_router.browserApi.reportSelectedCastMode(data.detail.castModeType); + } + + /** * Creates a media route. * Called when the user requests to create a media route. * @@ -83,6 +102,48 @@ } /** + * Reports the index of the sink that was clicked. + * Called when the user selects a sink on the sink list. + * + * @param {{detail: {index: number}}} data + * Paramters in |data|.detail: + * index - the index of the clicked sink. + */ + function onSinkClick(data) { + media_router.browserApi.reportClickedSinkIndex(data.detail.index); + } + + /** + * Reports the user navigation to the cast mode view. + * Called when the user clicks the drop arrow to navigate to the cast mode + * view on the dialog. + */ + function onNavigateToCastMode() { + media_router.browserApi.reportNavigateToView( + media_router.MediaRouterView.CAST_MODE_LIST); + } + + /** + * Reports the user navigation the route details view. + * Called when the user clicks on a sink to navigate to the route details + * view. + */ + function onNavigateToDetails() { + media_router.browserApi.reportNavigateToView( + media_router.MediaRouterView.ROUTE_DETAILS); + } + + /** + * Reports the user navigation the sink list view. + * Called when the user clicks on the back button from the route details view + * to the sink list view. + */ + function onNavigateToSinkList() { + media_router.browserApi.reportNavigateToView( + media_router.MediaRouterView.SINK_LIST); + } + + /** * Reports the current sink count. * Called 3 seconds after the dialog is initially opened. *
diff --git a/chrome/browser/resources/media_router/media_router_ui_interface.js b/chrome/browser/resources/media_router/media_router_ui_interface.js index 14f2323..92f23b9 100644 --- a/chrome/browser/resources/media_router/media_router_ui_interface.js +++ b/chrome/browser/resources/media_router/media_router_ui_interface.js
@@ -138,7 +138,7 @@ * @param {!media_router.Route} route */ function closeRoute(route) { - chrome.send('closeRoute', [{routeId: route.id}]); + chrome.send('closeRoute', [{routeId: route.id, isLocal: route.isLocal}]); } /** @@ -149,6 +149,33 @@ } /** + * Reports the index of the selected sink. + * + * @param {number} sinkIndex + */ + function reportClickedSinkIndex(sinkIndex) { + chrome.send('reportClickedSinkIndex', [sinkIndex]); + } + + /** + * Reports the navigation to the specified view. + * + * @param {string} view + */ + function reportNavigateToView(view) { + chrome.send('reportNavigateToView', [view]); + } + + /** + * Reports the cast mode that the user selected. + * + * @param {number} castModeType + */ + function reportSelectedCastMode(castModeType) { + chrome.send('reportSelectedCastMode', [castModeType]); + } + + /** * Reports the current number of sinks. * * @param {number} sinkCount @@ -182,6 +209,9 @@ closeDialog: closeDialog, closeRoute: closeRoute, onInitialDataReceived: onInitialDataReceived, + reportClickedSinkIndex: reportClickedSinkIndex, + reportNavigateToView: reportNavigateToView, + reportSelectedCastMode: reportSelectedCastMode, reportSinkCount: reportSinkCount, requestInitialData: requestInitialData, requestRoute: requestRoute,
diff --git a/chrome/browser/resources/pdf/index.html b/chrome/browser/resources/pdf/index.html index 6f6204c2..3c5253d 100644 --- a/chrome/browser/resources/pdf/index.html +++ b/chrome/browser/resources/pdf/index.html
@@ -1,6 +1,7 @@ <!doctype html> <html i18n-values="dir:textdirection;lang:language"> <head> + <base href="chrome-extension://mhjfbmdgcfjbbpaeojofohoefgiehjai/"> <meta charset="utf-8"> <!-- Must be before any other scripts or Polymer imports. --> <script src="chrome://resources/js/polymer_config.js"></script>
diff --git a/chrome/browser/resources/pdf/manifest.json b/chrome/browser/resources/pdf/manifest.json index d819757..b153845 100644 --- a/chrome/browser/resources/pdf/manifest.json +++ b/chrome/browser/resources/pdf/manifest.json
@@ -15,17 +15,11 @@ "application/pdf" ], "content_security_policy": "script-src 'self' blob: filesystem: chrome://resources; object-src * blob: filesystem: data:; plugin-types application/x-google-chrome-pdf", - // This is to work-around an issue where this extension is not granted - // permission to access chrome://resources when iframed for print preview. - // See https://crbug.com/444752. - "content_scripts": [ - { - "matches": ["chrome://print/*"], - "js": ["content_script.js"] - } - ], "mime_types_handler": "index.html", "web_accessible_resources": [ - "index.html" + "*.js", + "*.html", + "*.css", + "*.png" ] }
diff --git a/chrome/browser/resources/pdf/pdf_scripting_api.js b/chrome/browser/resources/pdf/pdf_scripting_api.js index c75820c..28bf795 100644 --- a/chrome/browser/resources/pdf/pdf_scripting_api.js +++ b/chrome/browser/resources/pdf/pdf_scripting_api.js
@@ -56,7 +56,8 @@ this.setPlugin(plugin); window.addEventListener('message', function(event) { - if (event.origin != 'chrome-extension://mhjfbmdgcfjbbpaeojofohoefgiehjai') { + if (event.origin != 'chrome-extension://mhjfbmdgcfjbbpaeojofohoefgiehjai' && + event.origin != 'chrome://print') { console.error('Received message that was not from the extension: ' + event); return; @@ -271,12 +272,10 @@ function PDFCreateOutOfProcessPlugin(src) { var client = new PDFScriptingAPI(window); var iframe = window.document.createElement('iframe'); + iframe.setAttribute('src', 'pdf_preview.html?' + src); // Prevent the frame from being tab-focusable. iframe.setAttribute('tabindex', '-1'); - var EXTENSION_URL = - 'chrome-extension://mhjfbmdgcfjbbpaeojofohoefgiehjai/index.html'; - iframe.setAttribute('src', EXTENSION_URL + '?' + src); iframe.onload = function() { client.setPlugin(iframe.contentWindow); };
diff --git a/chrome/browser/resources/print_preview/pdf_preview.html b/chrome/browser/resources/print_preview/pdf_preview.html new file mode 100644 index 0000000..ba3ea35 --- /dev/null +++ b/chrome/browser/resources/print_preview/pdf_preview.html
@@ -0,0 +1 @@ +<include src="../pdf/index.html"> \ No newline at end of file
diff --git a/chrome/browser/signin/easy_unlock_service_regular.cc b/chrome/browser/signin/easy_unlock_service_regular.cc index 6e3e466..cbee08b6 100644 --- a/chrome/browser/signin/easy_unlock_service_regular.cc +++ b/chrome/browser/signin/easy_unlock_service_regular.cc
@@ -145,7 +145,7 @@ dict->SetString("permitRecord.id", b64_public_key); dict->SetString("permitRecord.type", "license"); dict->SetString("permitRecord.data", b64_public_key); - device_list->Append(dict.Pass()); + device_list->Append(std::move(dict)); } // TODO(tengs): Rename this function after the easy_unlock app is replaced.
diff --git a/chrome/browser/signin/easy_unlock_service_unittest_chromeos.cc b/chrome/browser/signin/easy_unlock_service_unittest_chromeos.cc index 074695c..118c2b2f 100644 --- a/chrome/browser/signin/easy_unlock_service_unittest_chromeos.cc +++ b/chrome/browser/signin/easy_unlock_service_unittest_chromeos.cc
@@ -2,10 +2,12 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include <stddef.h> +#include "chrome/browser/signin/easy_unlock_service.h" +#include <stddef.h> #include <map> #include <string> +#include <utility> #include "base/macros.h" #include "base/memory/scoped_ptr.h" @@ -15,7 +17,6 @@ #include "chrome/browser/chromeos/login/users/scoped_user_manager_enabler.h" #include "chrome/browser/chromeos/profiles/profile_helper.h" #include "chrome/browser/signin/easy_unlock_app_manager.h" -#include "chrome/browser/signin/easy_unlock_service.h" #include "chrome/browser/signin/easy_unlock_service_factory.h" #include "chrome/browser/signin/easy_unlock_service_regular.h" #include "chrome/browser/signin/signin_manager_factory.h" @@ -145,7 +146,7 @@ return scoped_ptr<TestAppManager>(); scoped_ptr<TestAppManager> app_manager(new TestAppManager()); mapping_[context] = app_manager.get(); - return app_manager.Pass(); + return app_manager; } // Finds a TestAppManager created for |context|. Returns NULL if no @@ -187,8 +188,8 @@ scoped_ptr<EasyUnlockServiceRegular> service( new EasyUnlockServiceRegular(Profile::FromBrowserContext(context))); - service->Initialize(app_manager.Pass()); - return service.Pass(); + service->Initialize(std::move(app_manager)); + return std::move(service); } class EasyUnlockServiceTest : public testing::Test {
diff --git a/chrome/browser/ssl/ssl_add_certificate.cc b/chrome/browser/ssl/ssl_add_certificate.cc index 312b663..97117f45 100644 --- a/chrome/browser/ssl/ssl_add_certificate.cc +++ b/chrome/browser/ssl/ssl_add_certificate.cc
@@ -13,6 +13,7 @@ #include "chrome/grit/generated_resources.h" #include "components/infobars/core/confirm_infobar_delegate.h" #include "components/infobars/core/infobar.h" +#include "components/infobars/core/infobar_delegate.h" #include "components/infobars/core/simple_alert_infobar_delegate.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/render_frame_host.h" @@ -45,6 +46,7 @@ // ConfirmInfoBarDelegate: Type GetInfoBarType() const override; + infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override; int GetIconId() const override; gfx::VectorIconId GetVectorIconId() const override; base::string16 GetMessageText() const override; @@ -79,6 +81,11 @@ return PAGE_ACTION_TYPE; } +infobars::InfoBarDelegate::InfoBarIdentifier +SSLAddCertificateInfoBarDelegate::GetIdentifier() const { + return SSL_ADD_CERTIFICATE_INFOBAR_DELEGATE; +} + int SSLAddCertificateInfoBarDelegate::GetIconId() const { // TODO(davidben): Use a more appropriate icon. return IDR_INFOBAR_SAVE_PASSWORD; @@ -131,7 +138,9 @@ // TODO(davidben): Use a more appropriate icon. // TODO(davidben): Display a more user-friendly error string. SimpleAlertInfoBarDelegate::Create( - InfoBarService::FromWebContents(web_contents), IDR_INFOBAR_SAVE_PASSWORD, + InfoBarService::FromWebContents(web_contents), + infobars::InfoBarDelegate::SSL_ADD_CERTIFICATE, + IDR_INFOBAR_SAVE_PASSWORD, #if !defined(OS_MACOSX) gfx::VectorIconId::AUTOLOGIN, #else
diff --git a/chrome/browser/storage/durable_storage_permission_infobar_delegate_android.cc b/chrome/browser/storage/durable_storage_permission_infobar_delegate_android.cc index 2036ca47..75b08059 100644 --- a/chrome/browser/storage/durable_storage_permission_infobar_delegate_android.cc +++ b/chrome/browser/storage/durable_storage_permission_infobar_delegate_android.cc
@@ -37,6 +37,11 @@ requesting_frame_(requesting_frame), display_languages_(display_languages) {} +infobars::InfoBarDelegate::InfoBarIdentifier +DurableStoragePermissionInfoBarDelegateAndroid::GetIdentifier() const { + return DURABLE_STORAGE_PERMISSION_INFOBAR_DELEGATE_ANDROID; +} + base::string16 DurableStoragePermissionInfoBarDelegateAndroid::GetMessageText() const { return l10n_util::GetStringFUTF16(
diff --git a/chrome/browser/storage/durable_storage_permission_infobar_delegate_android.h b/chrome/browser/storage/durable_storage_permission_infobar_delegate_android.h index a8b4829..54a9102 100644 --- a/chrome/browser/storage/durable_storage_permission_infobar_delegate_android.h +++ b/chrome/browser/storage/durable_storage_permission_infobar_delegate_android.h
@@ -32,6 +32,7 @@ const PermissionSetCallback& callback); ~DurableStoragePermissionInfoBarDelegateAndroid() override = default; + infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override; base::string16 GetMessageText() const override; GURL requesting_frame_;
diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn index 9c3f3681..cff9a199 100644 --- a/chrome/browser/ui/BUILD.gn +++ b/chrome/browser/ui/BUILD.gn
@@ -142,6 +142,7 @@ ".", "//chrome") deps += [ + "//chrome/common:features", "//components/copresence", "//components/feedback/proto", "//components/proximity_auth/webui",
diff --git a/chrome/browser/ui/android/content_settings/popup_blocked_infobar_delegate.cc b/chrome/browser/ui/android/content_settings/popup_blocked_infobar_delegate.cc index 7860068..e15607d 100644 --- a/chrome/browser/ui/android/content_settings/popup_blocked_infobar_delegate.cc +++ b/chrome/browser/ui/android/content_settings/popup_blocked_infobar_delegate.cc
@@ -53,6 +53,11 @@ PopupBlockedInfoBarDelegate::~PopupBlockedInfoBarDelegate() { } +infobars::InfoBarDelegate::InfoBarIdentifier +PopupBlockedInfoBarDelegate::GetIdentifier() const { + return POPUP_BLOCKED_INFOBAR_DELEGATE; +} + int PopupBlockedInfoBarDelegate::GetIconId() const { return IDR_BLOCKED_POPUPS; }
diff --git a/chrome/browser/ui/android/content_settings/popup_blocked_infobar_delegate.h b/chrome/browser/ui/android/content_settings/popup_blocked_infobar_delegate.h index 1377ff6..c193cd6 100644 --- a/chrome/browser/ui/android/content_settings/popup_blocked_infobar_delegate.h +++ b/chrome/browser/ui/android/content_settings/popup_blocked_infobar_delegate.h
@@ -29,6 +29,7 @@ HostContentSettingsMap* map); // ConfirmInfoBarDelegate: + infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override; int GetIconId() const override; PopupBlockedInfoBarDelegate* AsPopupBlockedInfoBarDelegate() override; base::string16 GetMessageText() const override;
diff --git a/chrome/browser/ui/app_list/arc/arc_app_list_prefs.cc b/chrome/browser/ui/app_list/arc/arc_app_list_prefs.cc index fd534ed..11ede87 100644 --- a/chrome/browser/ui/app_list/arc/arc_app_list_prefs.cc +++ b/chrome/browser/ui/app_list/arc/arc_app_list_prefs.cc
@@ -233,7 +233,7 @@ activity, ready_apps_.count(app_id) > 0)); - return app_info.Pass(); + return app_info; } bool ArcAppListPrefs::IsRegistered(const std::string& app_id) {
diff --git a/chrome/browser/ui/app_list/search/launcher_search/launcher_search_icon_image_loader.cc b/chrome/browser/ui/app_list/search/launcher_search/launcher_search_icon_image_loader.cc index 562c538..d580196d 100644 --- a/chrome/browser/ui/app_list/search/launcher_search/launcher_search_icon_image_loader.cc +++ b/chrome/browser/ui/app_list/search/launcher_search/launcher_search_icon_image_loader.cc
@@ -4,6 +4,8 @@ #include "chrome/browser/ui/app_list/search/launcher_search/launcher_search_icon_image_loader.h" +#include <utility> + #include "base/strings/string_util.h" #include "chrome/browser/chromeos/launcher_search_provider/error_reporter.h" #include "extensions/common/constants.h" @@ -34,8 +36,7 @@ extension_(extension), icon_url_(icon_url), icon_size_(icon_dimension, icon_dimension), - error_reporter_(error_reporter.Pass()) { -} + error_reporter_(std::move(error_reporter)) {} LauncherSearchIconImageLoader::~LauncherSearchIconImageLoader() { }
diff --git a/chrome/browser/ui/app_list/search/launcher_search/launcher_search_icon_image_loader_impl.cc b/chrome/browser/ui/app_list/search/launcher_search/launcher_search_icon_image_loader_impl.cc index 2286f560..171fbc6 100644 --- a/chrome/browser/ui/app_list/search/launcher_search/launcher_search_icon_image_loader_impl.cc +++ b/chrome/browser/ui/app_list/search/launcher_search/launcher_search_icon_image_loader_impl.cc
@@ -4,6 +4,8 @@ #include "chrome/browser/ui/app_list/search/launcher_search/launcher_search_icon_image_loader_impl.h" +#include <utility> + #include "chrome/browser/extensions/extension_util.h" #include "extensions/browser/image_loader.h" #include "extensions/common/file_util.h" @@ -22,9 +24,8 @@ profile, extension, icon_dimension, - error_reporter.Pass()), - weak_ptr_factory_(this) { -} + std::move(error_reporter)), + weak_ptr_factory_(this) {} LauncherSearchIconImageLoaderImpl::~LauncherSearchIconImageLoaderImpl() { }
diff --git a/chrome/browser/ui/app_list/search/launcher_search/launcher_search_provider.cc b/chrome/browser/ui/app_list/search/launcher_search/launcher_search_provider.cc index a5e3028..1827f637 100644 --- a/chrome/browser/ui/app_list/search/launcher_search/launcher_search_provider.cc +++ b/chrome/browser/ui/app_list/search/launcher_search/launcher_search_provider.cc
@@ -4,6 +4,8 @@ #include "chrome/browser/ui/app_list/search/launcher_search/launcher_search_provider.h" +#include <utility> + #include "base/stl_util.h" #include "base/strings/utf_string_conversions.h" #include "chrome/browser/chromeos/launcher_search_provider/launcher_search_provider_service.h" @@ -59,8 +61,8 @@ DCHECK(Service::Get(profile_)->IsQueryRunning()); // Add this extension's results (erasing any existing results). - extension_results_[extension_id] = - make_scoped_ptr(new ScopedVector<LauncherSearchResult>(results.Pass())); + extension_results_[extension_id] = make_scoped_ptr( + new ScopedVector<LauncherSearchResult>(std::move(results))); // Update results with other extension results. ClearResults();
diff --git a/chrome/browser/ui/app_list/search/launcher_search/launcher_search_result.cc b/chrome/browser/ui/app_list/search/launcher_search/launcher_search_result.cc index 34c3bf7..b5ea308 100644 --- a/chrome/browser/ui/app_list/search/launcher_search/launcher_search_result.cc +++ b/chrome/browser/ui/app_list/search/launcher_search/launcher_search_result.cc
@@ -4,6 +4,8 @@ #include "chrome/browser/ui/app_list/search/launcher_search/launcher_search_result.h" +#include <utility> + #include "base/strings/utf_string_conversions.h" #include "chrome/browser/chromeos/launcher_search_provider/launcher_search_provider_service.h" #include "chrome/browser/ui/app_list/search/launcher_search/launcher_search_icon_image_loader_impl.h" @@ -37,7 +39,7 @@ icon_image_loader_.reset(new LauncherSearchIconImageLoaderImpl( icon_url, profile, extension, GetPreferredIconDimension(), - error_reporter.Pass())); + std::move(error_reporter))); icon_image_loader_->LoadResources(); Initialize();
diff --git a/chrome/browser/ui/ash/ash_init.cc b/chrome/browser/ui/ash/ash_init.cc index 25378c5..007c7f5b 100644 --- a/chrome/browser/ui/ash/ash_init.cc +++ b/chrome/browser/ui/ash/ash_init.cc
@@ -77,7 +77,7 @@ content::BrowserThread::GetBlockingPool()->GetSequenceToken(), base::SequencedWorkerPool::SKIP_ON_SHUTDOWN)); shell->accelerator_controller()->SetImeControlDelegate( - scoped_ptr<ash::ImeControlDelegate>(new ImeController).Pass()); + scoped_ptr<ash::ImeControlDelegate>(new ImeController)); shell->high_contrast_controller()->SetEnabled( chromeos::AccessibilityManager::Get()->IsHighContrastEnabled());
diff --git a/chrome/browser/ui/ash/cast_config_delegate_chromeos.cc b/chrome/browser/ui/ash/cast_config_delegate_chromeos.cc index d723b1d..2a21071 100644 --- a/chrome/browser/ui/ash/cast_config_delegate_chromeos.cc +++ b/chrome/browser/ui/ash/cast_config_delegate_chromeos.cc
@@ -5,8 +5,8 @@ #include "chrome/browser/ui/ash/cast_config_delegate_chromeos.h" #include <stddef.h> - #include <string> +#include <utility> #include "base/macros.h" #include "base/memory/scoped_ptr.h" @@ -78,9 +78,9 @@ scoped_ptr<extensions::Event> event(new extensions::Event( extensions::events::CAST_DEVICES_PRIVATE_ON_UPDATE_DEVICES_REQUESTED, extensions::api::cast_devices_private::UpdateDevicesRequested::kEventName, - args.Pass())); + std::move(args))); extensions::EventRouter::Get(GetProfile()) - ->DispatchEventToExtension(FindCastExtension()->id(), event.Pass()); + ->DispatchEventToExtension(FindCastExtension()->id(), std::move(event)); } void CastConfigDelegateChromeos::CastToReceiver( @@ -90,9 +90,9 @@ scoped_ptr<extensions::Event> event(new extensions::Event( extensions::events::CAST_DEVICES_PRIVATE_ON_START_CAST, extensions::api::cast_devices_private::StartCast::kEventName, - args.Pass())); + std::move(args))); extensions::EventRouter::Get(GetProfile()) - ->DispatchEventToExtension(FindCastExtension()->id(), event.Pass()); + ->DispatchEventToExtension(FindCastExtension()->id(), std::move(event)); } void CastConfigDelegateChromeos::StopCasting(const std::string& activity_id) { @@ -101,9 +101,9 @@ scoped_ptr<extensions::Event> event(new extensions::Event( extensions::events::CAST_DEVICES_PRIVATE_ON_STOP_CAST, extensions::api::cast_devices_private::StopCast::kEventName, - args.Pass())); + std::move(args))); extensions::EventRouter::Get(GetProfile()) - ->DispatchEventToExtension(FindCastExtension()->id(), event.Pass()); + ->DispatchEventToExtension(FindCastExtension()->id(), std::move(event)); } bool CastConfigDelegateChromeos::HasOptions() const {
diff --git a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_unittest.cc b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_unittest.cc index b06ac6fa0..63b1f27 100644 --- a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_unittest.cc +++ b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_unittest.cc
@@ -867,7 +867,7 @@ browser->window()->Show(); NavigateAndCommitActiveTabWithTitle(browser.get(), GURL(url), ASCIIToUTF16(title)); - return browser.Pass(); + return browser; } // Creates a running V1 application.
diff --git a/chrome/browser/ui/ash/multi_user/multi_user_context_menu_chromeos.cc b/chrome/browser/ui/ash/multi_user/multi_user_context_menu_chromeos.cc index 26f3dae..d3579d61 100644 --- a/chrome/browser/ui/ash/multi_user/multi_user_context_menu_chromeos.cc +++ b/chrome/browser/ui/ash/multi_user/multi_user_context_menu_chromeos.cc
@@ -70,7 +70,7 @@ ash::SessionStateDelegate* delegate = ash::Shell::GetInstance()->session_state_delegate(); if (!delegate) - return model.Pass(); + return model; int logged_in_users = delegate->NumberOfLoggedInUsers(); if (logged_in_users > 1) { @@ -79,7 +79,7 @@ chrome::MultiUserWindowManager::GetInstance(); const AccountId& account_id = manager->GetWindowOwner(window); if (!account_id.is_valid() || !window) - return model.Pass(); + return model; chromeos::MultiUserContextMenuChromeos* menu = new chromeos::MultiUserContextMenuChromeos(window); model.reset(menu); @@ -94,7 +94,7 @@ base::ASCIIToUTF16(user_info->GetEmail()))); } } - return model.Pass(); + return model; } void OnAcceptTeleportWarning(const AccountId& account_id,
diff --git a/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc b/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc index 4f8f8c6..9141a8b 100644 --- a/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc +++ b/chrome/browser/ui/ash/system_tray_delegate_chromeos.cc
@@ -5,10 +5,10 @@ #include "chrome/browser/ui/ash/system_tray_delegate_chromeos.h" #include <stddef.h> - #include <algorithm> #include <set> #include <string> +#include <utility> #include <vector> #include "ash/ash_switches.h" @@ -1230,7 +1230,7 @@ if (!should_run_bluetooth_discovery_) return; VLOG(1) << "Claiming new Bluetooth device discovery session."; - bluetooth_discovery_session_ = discovery_session.Pass(); + bluetooth_discovery_session_ = std::move(discovery_session); GetSystemTrayNotifier()->NotifyBluetoothDiscoveringChanged(); }
diff --git a/chrome/browser/ui/chrome_select_file_policy.cc b/chrome/browser/ui/chrome_select_file_policy.cc index 1b32227..3d91e92f 100644 --- a/chrome/browser/ui/chrome_select_file_policy.cc +++ b/chrome/browser/ui/chrome_select_file_policy.cc
@@ -12,6 +12,7 @@ #include "chrome/browser/infobars/infobar_service.h" #include "chrome/common/pref_names.h" #include "chrome/grit/generated_resources.h" +#include "components/infobars/core/infobar_delegate.h" #include "components/infobars/core/simple_alert_infobar_delegate.h" #include "ui/base/l10n/l10n_util.h" #include "ui/gfx/vector_icons_public.h" @@ -32,6 +33,7 @@ if (source_contents_) { SimpleAlertInfoBarDelegate::Create( InfoBarService::FromWebContents(source_contents_), + infobars::InfoBarDelegate::CHROME_SELECT_FILE_POLICY, infobars::InfoBarDelegate::kNoIconID, gfx::VectorIconId::VECTOR_ICON_NONE, l10n_util::GetStringUTF16(IDS_FILE_SELECTION_DIALOG_INFOBAR), true);
diff --git a/chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm b/chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm index c26ebd8..2111a8c 100644 --- a/chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm +++ b/chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm
@@ -40,6 +40,7 @@ #include "chrome/browser/ui/tabs/tab_strip_model.h" #include "chrome/test/base/in_process_browser_test.h" #include "chrome/test/base/testing_profile.h" +#include "components/infobars/core/infobar_delegate.h" #include "components/infobars/core/simple_alert_infobar_delegate.h" #include "content/public/browser/web_contents.h" #include "content/public/test/test_utils.h" @@ -211,6 +212,7 @@ SimpleAlertInfoBarDelegate::Create( InfoBarService::FromWebContents( browser->tab_strip_model()->GetActiveWebContents()), + infobars::InfoBarDelegate::TEST_INFOBAR, 0, gfx::VectorIconId::VECTOR_ICON_NONE, base::string16(), false); }
diff --git a/chrome/browser/ui/cocoa/infobars/mock_confirm_infobar_delegate.cc b/chrome/browser/ui/cocoa/infobars/mock_confirm_infobar_delegate.cc index c94b2e9..68511d6 100644 --- a/chrome/browser/ui/cocoa/infobars/mock_confirm_infobar_delegate.cc +++ b/chrome/browser/ui/cocoa/infobars/mock_confirm_infobar_delegate.cc
@@ -25,6 +25,11 @@ owner_->OnInfoBarDelegateClosed(this); } +infobars::InfoBarDelegate::InfoBarIdentifier +MockConfirmInfoBarDelegate::GetIdentifier() const { + return TEST_INFOBAR; +} + int MockConfirmInfoBarDelegate::GetIconId() const { icon_accessed_ = true; return kNoIconID;
diff --git a/chrome/browser/ui/cocoa/infobars/mock_confirm_infobar_delegate.h b/chrome/browser/ui/cocoa/infobars/mock_confirm_infobar_delegate.h index 63c859d..5a02484 100644 --- a/chrome/browser/ui/cocoa/infobars/mock_confirm_infobar_delegate.h +++ b/chrome/browser/ui/cocoa/infobars/mock_confirm_infobar_delegate.h
@@ -37,6 +37,7 @@ private: // ConfirmInfoBarDelegate: + infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override; int GetIconId() const override; base::string16 GetMessageText() const override; base::string16 GetButtonLabel(InfoBarButton button) const override;
diff --git a/chrome/browser/ui/cocoa/keystone_infobar_delegate.mm b/chrome/browser/ui/cocoa/keystone_infobar_delegate.mm index 0127678..a400f00 100644 --- a/chrome/browser/ui/cocoa/keystone_infobar_delegate.mm +++ b/chrome/browser/ui/cocoa/keystone_infobar_delegate.mm
@@ -52,6 +52,7 @@ void SetCanExpire() { can_expire_ = true; } // ConfirmInfoBarDelegate + infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override; int GetIconId() const override; bool ShouldExpire(const NavigationDetails& details) const override; base::string16 GetMessageText() const override; @@ -105,6 +106,11 @@ KeystonePromotionInfoBarDelegate::~KeystonePromotionInfoBarDelegate() { } +infobars::InfoBarDelegate::InfoBarIdentifier +KeystonePromotionInfoBarDelegate::GetIdentifier() const { + return KEYSTONE_PROMOTION_INFOBAR_DELEGATE; +} + int KeystonePromotionInfoBarDelegate::GetIconId() const { return IDR_PRODUCT_LOGO_32; }
diff --git a/chrome/browser/ui/collected_cookies_infobar_delegate.cc b/chrome/browser/ui/collected_cookies_infobar_delegate.cc index 1f51589..d84aca9 100644 --- a/chrome/browser/ui/collected_cookies_infobar_delegate.cc +++ b/chrome/browser/ui/collected_cookies_infobar_delegate.cc
@@ -33,6 +33,11 @@ return PAGE_ACTION_TYPE; } +infobars::InfoBarDelegate::InfoBarIdentifier +CollectedCookiesInfoBarDelegate::GetIdentifier() const { + return COLLECTED_COOKIES_INFOBAR_DELEGATE; +} + int CollectedCookiesInfoBarDelegate::GetIconId() const { return IDR_INFOBAR_COOKIE; }
diff --git a/chrome/browser/ui/collected_cookies_infobar_delegate.h b/chrome/browser/ui/collected_cookies_infobar_delegate.h index 5636df7..4407123 100644 --- a/chrome/browser/ui/collected_cookies_infobar_delegate.h +++ b/chrome/browser/ui/collected_cookies_infobar_delegate.h
@@ -27,6 +27,7 @@ // ConfirmInfoBarDelegate: Type GetInfoBarType() const override; + infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override; int GetIconId() const override; gfx::VectorIconId GetVectorIconId() const override; base::string16 GetMessageText() const override;
diff --git a/chrome/browser/ui/extensions/extension_install_ui_default.cc b/chrome/browser/ui/extensions/extension_install_ui_default.cc index 704ff3c..b954ca4 100644 --- a/chrome/browser/ui/extensions/extension_install_ui_default.cc +++ b/chrome/browser/ui/extensions/extension_install_ui_default.cc
@@ -86,6 +86,7 @@ ~ErrorInfoBarDelegate() override; // ConfirmInfoBarDelegate: + infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override; base::string16 GetMessageText() const override; int GetButtons() const override; base::string16 GetLinkText() const override; @@ -111,6 +112,11 @@ ErrorInfoBarDelegate::~ErrorInfoBarDelegate() { } +infobars::InfoBarDelegate::InfoBarIdentifier +ErrorInfoBarDelegate::GetIdentifier() const { + return INSTALLATION_ERROR_INFOBAR_DELEGATE; +} + base::string16 ErrorInfoBarDelegate::GetMessageText() const { return error_.message(); }
diff --git a/chrome/browser/ui/hung_plugin_tab_helper.cc b/chrome/browser/ui/hung_plugin_tab_helper.cc index 3da82e5..50d43242 100644 --- a/chrome/browser/ui/hung_plugin_tab_helper.cc +++ b/chrome/browser/ui/hung_plugin_tab_helper.cc
@@ -147,6 +147,7 @@ ~HungPluginInfoBarDelegate() override; // ConfirmInfoBarDelegate: + infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override; int GetIconId() const override; base::string16 GetMessageText() const override; int GetButtons() const override; @@ -187,6 +188,11 @@ HungPluginInfoBarDelegate::~HungPluginInfoBarDelegate() { } +infobars::InfoBarDelegate::InfoBarIdentifier +HungPluginInfoBarDelegate::GetIdentifier() const { + return HUNG_PLUGIN_INFOBAR_DELEGATE; +} + int HungPluginInfoBarDelegate::GetIconId() const { return IDR_INFOBAR_PLUGIN_CRASHED; }
diff --git a/chrome/browser/ui/libgtk2ui/gtk2_ui.cc b/chrome/browser/ui/libgtk2ui/gtk2_ui.cc index 2f71c1e..f3e98fc 100644 --- a/chrome/browser/ui/libgtk2ui/gtk2_ui.cc +++ b/chrome/browser/ui/libgtk2ui/gtk2_ui.cc
@@ -81,218 +81,192 @@ namespace { class GtkThemeIconSource : public gfx::ImageSkiaSource { - public: - GtkThemeIconSource(int id, const char* icon, bool enabled) - : id_(id), - icon_(icon), - enabled_(enabled) { - } + public: + GtkThemeIconSource(int id, const char* icon, bool enabled) + : id_(id), icon_(icon), enabled_(enabled) {} - ~GtkThemeIconSource() override {} + ~GtkThemeIconSource() override {} - gfx::ImageSkiaRep GetImageForScale(float scale) override { - ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); - SkBitmap default_icon = rb.GetImageNamed(id_).AsBitmap(); + gfx::ImageSkiaRep GetImageForScale(float scale) override { + ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); + SkBitmap default_icon = rb.GetImageNamed(id_).AsBitmap(); - int scalew = default_icon.width() * scale; - int scaleh = default_icon.height() * scale; + int scalew = default_icon.width() * scale; + int scaleh = default_icon.height() * scale; - // Ask GTK to render the icon to a buffer, which we will steal from. - GtkIconTheme* icon_theme = gtk_icon_theme_get_default(); - GdkPixbuf* gdk_icon = gtk_icon_theme_load_icon( - icon_theme, - icon_, - 20 * scale, - (GtkIconLookupFlags)0, - NULL); + // Ask GTK to render the icon to a buffer, which we will steal from. + GtkIconTheme* icon_theme = gtk_icon_theme_get_default(); + GdkPixbuf* gdk_icon = gtk_icon_theme_load_icon( + icon_theme, icon_, 20 * scale, (GtkIconLookupFlags)0, NULL); - // This can theoretically happen if an icon theme doesn't provide a - // specific image. This should realistically never happen, but I bet there - // are some theme authors who don't reliably provide all icons. - if (!gdk_icon) - return gfx::ImageSkiaRep(); + // This can theoretically happen if an icon theme doesn't provide a + // specific image. This should realistically never happen, but I bet there + // are some theme authors who don't reliably provide all icons. + if (!gdk_icon) + return gfx::ImageSkiaRep(); #if GTK_MAJOR_VERSION == 2 - GtkIconSource* icon_source = gtk_icon_source_new(); - gtk_icon_source_set_pixbuf(icon_source, gdk_icon); + GtkIconSource* icon_source = gtk_icon_source_new(); + gtk_icon_source_set_pixbuf(icon_source, gdk_icon); - GdkPixbuf* temp = gtk_style_render_icon( - gtk_rc_get_style(NativeThemeGtk2::instance()->GetButton()), - icon_source, - GTK_TEXT_DIR_NONE, - enabled_ ? GTK_STATE_NORMAL : GTK_STATE_INSENSITIVE, - (GtkIconSize)-1, - NativeThemeGtk2::instance()->GetButton(), - NULL); + GdkPixbuf* temp = gtk_style_render_icon( + gtk_rc_get_style(NativeThemeGtk2::instance()->GetButton()), icon_source, + GTK_TEXT_DIR_NONE, enabled_ ? GTK_STATE_NORMAL : GTK_STATE_INSENSITIVE, + (GtkIconSize)-1, NativeThemeGtk2::instance()->GetButton(), NULL); - gtk_icon_source_free(icon_source); - g_object_unref(gdk_icon); + gtk_icon_source_free(icon_source); + g_object_unref(gdk_icon); - gdk_icon = temp; + gdk_icon = temp; #endif - SkBitmap retval; - retval.allocN32Pixels(scalew, scaleh); - retval.eraseColor(0); + SkBitmap retval; + retval.allocN32Pixels(scalew, scaleh); + retval.eraseColor(0); - const SkBitmap icon = GdkPixbufToImageSkia(gdk_icon); - g_object_unref(gdk_icon); + const SkBitmap icon = GdkPixbufToImageSkia(gdk_icon); + g_object_unref(gdk_icon); - SkCanvas canvas(retval); - SkPaint paint; + SkCanvas canvas(retval); + SkPaint paint; #if GTK_MAJOR_VERSION > 2 - if (!enabled_) - paint.setAlpha(128); + if (!enabled_) + paint.setAlpha(128); #endif - canvas.drawBitmap(icon, - (scalew / 2) - (icon.width() / 2), - (scaleh / 2) - (icon.height() / 2), - &paint); + canvas.drawBitmap(icon, (scalew / 2) - (icon.width() / 2), + (scaleh / 2) - (icon.height() / 2), &paint); - return gfx::ImageSkiaRep(retval, scale); - } + return gfx::ImageSkiaRep(retval, scale); + } - private: - int id_; - const char* icon_; - bool enabled_; + private: + int id_; + const char* icon_; + bool enabled_; - DISALLOW_COPY_AND_ASSIGN(GtkThemeIconSource); + DISALLOW_COPY_AND_ASSIGN(GtkThemeIconSource); }; - class GtkButtonImageSource : public gfx::ImageSkiaSource { - public: - GtkButtonImageSource(const char* idr_string, gfx::Size size) - : width_(size.width()), - height_(size.height()) { - is_blue_ = !!strstr(idr_string, "IDR_BLUE"); - focus_ = !!strstr(idr_string, "_FOCUSED_"); + public: + GtkButtonImageSource(const char* idr_string, gfx::Size size) + : width_(size.width()), height_(size.height()) { + is_blue_ = !!strstr(idr_string, "IDR_BLUE"); + focus_ = !!strstr(idr_string, "_FOCUSED_"); - if (strstr(idr_string, "_DISABLED")) { - state_ = ui::NativeTheme::kDisabled; - } else if (strstr(idr_string, "_HOVER")) { - state_ = ui::NativeTheme::kHovered; - } else if (strstr(idr_string, "_PRESSED")) { - state_ = ui::NativeTheme::kPressed; - } else { - state_ = ui::NativeTheme::kNormal; - } + if (strstr(idr_string, "_DISABLED")) { + state_ = ui::NativeTheme::kDisabled; + } else if (strstr(idr_string, "_HOVER")) { + state_ = ui::NativeTheme::kHovered; + } else if (strstr(idr_string, "_PRESSED")) { + state_ = ui::NativeTheme::kPressed; + } else { + state_ = ui::NativeTheme::kNormal; } + } - ~GtkButtonImageSource() override {} + ~GtkButtonImageSource() override {} - gfx::ImageSkiaRep GetImageForScale(float scale) override { - int width = width_ * scale; - int height = height_ * scale; + gfx::ImageSkiaRep GetImageForScale(float scale) override { + int width = width_ * scale; + int height = height_ * scale; - SkBitmap border; - border.allocN32Pixels(width, height); - border.eraseColor(0); + SkBitmap border; + border.allocN32Pixels(width, height); + border.eraseColor(0); - // Create a temporary GTK button to snapshot - GtkWidget* window = gtk_offscreen_window_new(); - GtkWidget* button = gtk_toggle_button_new(); + // Create a temporary GTK button to snapshot + GtkWidget* window = gtk_offscreen_window_new(); + GtkWidget* button = gtk_toggle_button_new(); - if (state_ == ui::NativeTheme::kPressed) - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), true); - else if (state_ == ui::NativeTheme::kDisabled) - gtk_widget_set_sensitive(button, false); + if (state_ == ui::NativeTheme::kPressed) + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), true); + else if (state_ == ui::NativeTheme::kDisabled) + gtk_widget_set_sensitive(button, false); - gtk_widget_set_size_request(button, width, height); - gtk_container_add(GTK_CONTAINER(window), button); + gtk_widget_set_size_request(button, width, height); + gtk_container_add(GTK_CONTAINER(window), button); - if (is_blue_) - TurnButtonBlue(button); + if (is_blue_) + TurnButtonBlue(button); - gtk_widget_show_all(window); + gtk_widget_show_all(window); - - cairo_surface_t* surface = cairo_image_surface_create_for_data( + cairo_surface_t* surface = cairo_image_surface_create_for_data( static_cast<unsigned char*>(border.getAddr(0, 0)), - CAIRO_FORMAT_ARGB32, - width, height, - width * 4); - cairo_t* cr = cairo_create(surface); + CAIRO_FORMAT_ARGB32, width, height, width * 4); + cairo_t* cr = cairo_create(surface); #if GTK_MAJOR_VERSION == 2 - if (focus_) - GTK_WIDGET_SET_FLAGS(button, GTK_HAS_FOCUS); + if (focus_) + GTK_WIDGET_SET_FLAGS(button, GTK_HAS_FOCUS); - int w, h; - GdkPixmap* pixmap; + int w, h; + GdkPixmap* pixmap; - { - // http://crbug.com/346740 - ANNOTATE_SCOPED_MEMORY_LEAK; - pixmap = gtk_widget_get_snapshot(button, NULL); - } + { + // http://crbug.com/346740 + ANNOTATE_SCOPED_MEMORY_LEAK; + pixmap = gtk_widget_get_snapshot(button, NULL); + } - gdk_drawable_get_size(GDK_DRAWABLE(pixmap), &w, &h); - GdkColormap* colormap = gdk_drawable_get_colormap(pixmap); - GdkPixbuf* pixbuf = gdk_pixbuf_get_from_drawable(NULL, - GDK_DRAWABLE(pixmap), - colormap, - 0, 0, 0, 0, w, h); + gdk_drawable_get_size(GDK_DRAWABLE(pixmap), &w, &h); + GdkColormap* colormap = gdk_drawable_get_colormap(pixmap); + GdkPixbuf* pixbuf = gdk_pixbuf_get_from_drawable( + NULL, GDK_DRAWABLE(pixmap), colormap, 0, 0, 0, 0, w, h); - gdk_cairo_set_source_pixbuf(cr, pixbuf, 0, 0); - cairo_paint(cr); + gdk_cairo_set_source_pixbuf(cr, pixbuf, 0, 0); + cairo_paint(cr); - g_object_unref(pixbuf); - g_object_unref(pixmap); + g_object_unref(pixbuf); + g_object_unref(pixmap); #else - gtk_widget_draw(button, cr); + gtk_widget_draw(button, cr); - // There's probably a better way to do this - if (focus_) - gtk_render_focus(gtk_widget_get_style_context(button), - cr, 0, 0, width, height); + // There's probably a better way to do this + if (focus_) + gtk_render_focus(gtk_widget_get_style_context(button), cr, 0, 0, + width, height); #endif - cairo_destroy(cr); - cairo_surface_destroy(surface); + cairo_destroy(cr); + cairo_surface_destroy(surface); - gtk_widget_destroy(window); + gtk_widget_destroy(window); - return gfx::ImageSkiaRep(border, scale); - } + return gfx::ImageSkiaRep(border, scale); + } - private: - bool is_blue_; - bool focus_; - ui::NativeTheme::State state_; - int width_; - int height_; + private: + bool is_blue_; + bool focus_; + ui::NativeTheme::State state_; + int width_; + int height_; - DISALLOW_COPY_AND_ASSIGN(GtkButtonImageSource); + DISALLOW_COPY_AND_ASSIGN(GtkButtonImageSource); }; - class GtkButtonPainter : public views::Painter { - public: - explicit GtkButtonPainter(std::string idr) : idr_(idr) {} - ~GtkButtonPainter() override {} + public: + explicit GtkButtonPainter(std::string idr) : idr_(idr) {} + ~GtkButtonPainter() override {} - gfx::Size GetMinimumSize() const override { - return gfx::Size(); - } - void Paint(gfx::Canvas* canvas, const gfx::Size& size) override { - gfx::ImageSkiaSource* source = - new GtkButtonImageSource(idr_.c_str(), size); - gfx::ImageSkia image(source, 1); - canvas->DrawImageInt(image, 0, 0); - } + gfx::Size GetMinimumSize() const override { return gfx::Size(); } + void Paint(gfx::Canvas* canvas, const gfx::Size& size) override { + gfx::ImageSkiaSource* source = new GtkButtonImageSource(idr_.c_str(), size); + gfx::ImageSkia image(source, 1); + canvas->DrawImageInt(image, 0, 0); + } - private: - std::string idr_; + private: + std::string idr_; - DISALLOW_COPY_AND_ASSIGN(GtkButtonPainter); + DISALLOW_COPY_AND_ASSIGN(GtkButtonPainter); }; - - struct GObjectDeleter { void operator()(void* ptr) { g_object_unref(ptr); @@ -783,7 +757,6 @@ } return std::move(gtk_border); - ; } void Gtk2UI::AddWindowButtonOrderObserver(
diff --git a/chrome/browser/ui/libgtk2ui/native_theme_gtk2.cc b/chrome/browser/ui/libgtk2ui/native_theme_gtk2.cc index 5cf2fa7..371e13dd 100644 --- a/chrome/browser/ui/libgtk2ui/native_theme_gtk2.cc +++ b/chrome/browser/ui/libgtk2ui/native_theme_gtk2.cc
@@ -12,6 +12,7 @@ #include "chrome/browser/ui/libgtk2ui/gtk2_util.h" #include "chrome/browser/ui/libgtk2ui/skia_utils_gtk2.h" #include "third_party/skia/include/core/SkColor.h" +#include "ui/gfx/color_palette.h" #include "ui/gfx/color_utils.h" #include "ui/gfx/geometry/rect.h" #include "ui/gfx/geometry/size.h" @@ -319,6 +320,10 @@ // return GetTextColor(GetButton(), NORMAL); case kColorId_CallToActionColor: return GetSystemColor(kColorId_LinkEnabled); + // TODO(estade): set proper values for these. + case kColorId_MdTextButtonEnabledColor: + case kColorId_MdTextButtonDisabledColor: + return gfx::kPlaceholderColor; // Textfield case kColorId_TextfieldDefaultColor:
diff --git a/chrome/browser/ui/omnibox/alternate_nav_infobar_delegate.cc b/chrome/browser/ui/omnibox/alternate_nav_infobar_delegate.cc index 65e81148..5cbea8e5 100644 --- a/chrome/browser/ui/omnibox/alternate_nav_infobar_delegate.cc +++ b/chrome/browser/ui/omnibox/alternate_nav_infobar_delegate.cc
@@ -103,6 +103,11 @@ return PAGE_ACTION_TYPE; } +infobars::InfoBarDelegate::InfoBarIdentifier +AlternateNavInfoBarDelegate::GetIdentifier() const { + return ALTERNATE_NAV_INFOBAR_DELEGATE; +} + int AlternateNavInfoBarDelegate::GetIconId() const { return IDR_INFOBAR_ALT_NAV_URL; }
diff --git a/chrome/browser/ui/omnibox/alternate_nav_infobar_delegate.h b/chrome/browser/ui/omnibox/alternate_nav_infobar_delegate.h index 202faf0..cad0325 100644 --- a/chrome/browser/ui/omnibox/alternate_nav_infobar_delegate.h +++ b/chrome/browser/ui/omnibox/alternate_nav_infobar_delegate.h
@@ -46,6 +46,7 @@ // InfoBarDelegate: Type GetInfoBarType() const override; + infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override; int GetIconId() const override; gfx::VectorIconId GetVectorIconId() const override;
diff --git a/chrome/browser/ui/startup/bad_flags_prompt.cc b/chrome/browser/ui/startup/bad_flags_prompt.cc index d1f4c53..1588029 100644 --- a/chrome/browser/ui/startup/bad_flags_prompt.cc +++ b/chrome/browser/ui/startup/bad_flags_prompt.cc
@@ -18,6 +18,7 @@ #include "chrome/grit/chromium_strings.h" #include "chrome/grit/generated_resources.h" #include "components/autofill/core/common/autofill_switches.h" +#include "components/infobars/core/infobar_delegate.h" #include "components/infobars/core/simple_alert_infobar_delegate.h" #include "components/invalidation/impl/invalidation_switches.h" #include "components/nacl/common/nacl_switches.h" @@ -100,6 +101,7 @@ if (base::CommandLine::ForCurrentProcess()->HasSwitch(*flag)) { SimpleAlertInfoBarDelegate::Create( InfoBarService::FromWebContents(web_contents), + infobars::InfoBarDelegate::BAD_FLAGS_PROMPT, infobars::InfoBarDelegate::kNoIconID, gfx::VectorIconId::VECTOR_ICON_NONE, l10n_util::GetStringFUTF16(
diff --git a/chrome/browser/ui/startup/default_browser_prompt.cc b/chrome/browser/ui/startup/default_browser_prompt.cc index 3a17518..9443190 100644 --- a/chrome/browser/ui/startup/default_browser_prompt.cc +++ b/chrome/browser/ui/startup/default_browser_prompt.cc
@@ -66,6 +66,7 @@ // ConfirmInfoBarDelegate: Type GetInfoBarType() const override; + infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override; int GetIconId() const override; gfx::VectorIconId GetVectorIconId() const override; bool ShouldExpire(const NavigationDetails& details) const override; @@ -128,6 +129,11 @@ #endif } +infobars::InfoBarDelegate::InfoBarIdentifier +DefaultBrowserInfoBarDelegate::GetIdentifier() const { + return DEFAULT_BROWSER_INFOBAR_DELEGATE; +} + int DefaultBrowserInfoBarDelegate::GetIconId() const { return IDR_PRODUCT_LOGO_32; }
diff --git a/chrome/browser/ui/startup/google_api_keys_infobar_delegate.cc b/chrome/browser/ui/startup/google_api_keys_infobar_delegate.cc index bb3f387..e032c15 100644 --- a/chrome/browser/ui/startup/google_api_keys_infobar_delegate.cc +++ b/chrome/browser/ui/startup/google_api_keys_infobar_delegate.cc
@@ -29,6 +29,11 @@ GoogleApiKeysInfoBarDelegate::~GoogleApiKeysInfoBarDelegate() { } +infobars::InfoBarDelegate::InfoBarIdentifier +GoogleApiKeysInfoBarDelegate::GetIdentifier() const { + return GOOGLE_API_KEYS_INFOBAR_DELEGATE; +} + base::string16 GoogleApiKeysInfoBarDelegate::GetMessageText() const { return l10n_util::GetStringUTF16(IDS_MISSING_GOOGLE_API_KEYS); }
diff --git a/chrome/browser/ui/startup/google_api_keys_infobar_delegate.h b/chrome/browser/ui/startup/google_api_keys_infobar_delegate.h index 789aba1..74591ab 100644 --- a/chrome/browser/ui/startup/google_api_keys_infobar_delegate.h +++ b/chrome/browser/ui/startup/google_api_keys_infobar_delegate.h
@@ -24,6 +24,7 @@ GoogleApiKeysInfoBarDelegate(); ~GoogleApiKeysInfoBarDelegate() override; + infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override; base::string16 GetMessageText() const override; int GetButtons() const override; base::string16 GetLinkText() const override;
diff --git a/chrome/browser/ui/startup/obsolete_system_infobar_delegate.cc b/chrome/browser/ui/startup/obsolete_system_infobar_delegate.cc index 1166b2b..9bbad757 100644 --- a/chrome/browser/ui/startup/obsolete_system_infobar_delegate.cc +++ b/chrome/browser/ui/startup/obsolete_system_infobar_delegate.cc
@@ -28,6 +28,11 @@ ObsoleteSystemInfoBarDelegate::~ObsoleteSystemInfoBarDelegate() { } +infobars::InfoBarDelegate::InfoBarIdentifier +ObsoleteSystemInfoBarDelegate::GetIdentifier() const { + return OBSOLETE_SYSTEM_INFOBAR_DELEGATE; +} + base::string16 ObsoleteSystemInfoBarDelegate::GetMessageText() const { return ObsoleteSystem::LocalizedObsoleteString(); }
diff --git a/chrome/browser/ui/startup/obsolete_system_infobar_delegate.h b/chrome/browser/ui/startup/obsolete_system_infobar_delegate.h index 3b409b8..081db02 100644 --- a/chrome/browser/ui/startup/obsolete_system_infobar_delegate.h +++ b/chrome/browser/ui/startup/obsolete_system_infobar_delegate.h
@@ -25,6 +25,7 @@ ObsoleteSystemInfoBarDelegate(); ~ObsoleteSystemInfoBarDelegate() override; + infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override; base::string16 GetMessageText() const override; int GetButtons() const override; base::string16 GetLinkText() const override;
diff --git a/chrome/browser/ui/startup/session_crashed_infobar_delegate.cc b/chrome/browser/ui/startup/session_crashed_infobar_delegate.cc index cf63b383..7d4148c2 100644 --- a/chrome/browser/ui/startup/session_crashed_infobar_delegate.cc +++ b/chrome/browser/ui/startup/session_crashed_infobar_delegate.cc
@@ -56,6 +56,11 @@ } } +infobars::InfoBarDelegate::InfoBarIdentifier +SessionCrashedInfoBarDelegate::GetIdentifier() const { + return SESSION_CRASHED_INFOBAR_DELEGATE; +} + int SessionCrashedInfoBarDelegate::GetIconId() const { return IDR_INFOBAR_RESTORE_SESSION; }
diff --git a/chrome/browser/ui/startup/session_crashed_infobar_delegate.h b/chrome/browser/ui/startup/session_crashed_infobar_delegate.h index 82f45af..115f8d4 100644 --- a/chrome/browser/ui/startup/session_crashed_infobar_delegate.h +++ b/chrome/browser/ui/startup/session_crashed_infobar_delegate.h
@@ -23,6 +23,7 @@ ~SessionCrashedInfoBarDelegate() override; // ConfirmInfoBarDelegate: + infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override; int GetIconId() const override; gfx::VectorIconId GetVectorIconId() const override; base::string16 GetMessageText() const override;
diff --git a/chrome/browser/ui/toolbar/media_router_contextual_menu.cc b/chrome/browser/ui/toolbar/media_router_contextual_menu.cc index 3732064..4d649f04 100644 --- a/chrome/browser/ui/toolbar/media_router_contextual_menu.cc +++ b/chrome/browser/ui/toolbar/media_router_contextual_menu.cc
@@ -3,6 +3,7 @@ // found in the LICENSE file. #include "base/logging.h" +#include "base/metrics/user_metrics.h" #include "chrome/app/chrome_command_ids.h" #include "chrome/browser/media/router/media_router_factory.h" #include "chrome/browser/media/router/media_router_mojo_impl.h" @@ -86,6 +87,8 @@ break; case IDC_MEDIA_ROUTER_HELP: chrome::ShowSingletonTab(browser_, GURL(kCastHelpCenterPageUrl)); + base::RecordAction(base::UserMetricsAction( + "MediaRouter_Ui_Navigate_Help")); break; case IDC_MEDIA_ROUTER_LEARN_MORE: chrome::ShowSingletonTab(browser_, GURL(kCastLearnMorePageUrl));
diff --git a/chrome/browser/ui/views/infobars/confirm_infobar.cc b/chrome/browser/ui/views/infobars/confirm_infobar.cc index b2ba6769..61f39be 100644 --- a/chrome/browser/ui/views/infobars/confirm_infobar.cc +++ b/chrome/browser/ui/views/infobars/confirm_infobar.cc
@@ -70,18 +70,24 @@ AddChildView(label_); if (delegate->GetButtons() & ConfirmInfoBarDelegate::BUTTON_OK) { - ok_button_ = CreateLabelButton( - this, delegate->GetButtonLabel(ConfirmInfoBarDelegate::BUTTON_OK)); - if (delegate->OKButtonTriggersUACPrompt()) + if (delegate->OKButtonTriggersUACPrompt()) { + // Use a label button even in MD mode as MD buttons don't support icons. + views::LabelButton* ok_button = CreateLabelButton( + this, delegate->GetButtonLabel(ConfirmInfoBarDelegate::BUTTON_OK)); elevation_icon_setter_.reset(new ElevationIconSetter( - ok_button_, + ok_button, base::Bind(&ConfirmInfoBar::Layout, base::Unretained(this)))); + ok_button_ = ok_button; + } else { + ok_button_ = CreateTextButton( + this, delegate->GetButtonLabel(ConfirmInfoBarDelegate::BUTTON_OK)); + } AddChildView(ok_button_); ok_button_->SizeToPreferredSize(); } if (delegate->GetButtons() & ConfirmInfoBarDelegate::BUTTON_CANCEL) { - cancel_button_ = CreateLabelButton( + cancel_button_ = CreateTextButton( this, delegate->GetButtonLabel(ConfirmInfoBarDelegate::BUTTON_CANCEL)); AddChildView(cancel_button_);
diff --git a/chrome/browser/ui/views/infobars/confirm_infobar.h b/chrome/browser/ui/views/infobars/confirm_infobar.h index 76335054..0813acff3 100644 --- a/chrome/browser/ui/views/infobars/confirm_infobar.h +++ b/chrome/browser/ui/views/infobars/confirm_infobar.h
@@ -14,8 +14,8 @@ class ElevationIconSetter; namespace views { +class Button; class Label; -class LabelButton; } // An infobar that shows a message, up to two optional buttons, and an optional, @@ -45,8 +45,8 @@ int NonLabelWidth() const; views::Label* label_; - views::LabelButton* ok_button_; - views::LabelButton* cancel_button_; + views::Button* ok_button_; + views::Button* cancel_button_; views::Link* link_; scoped_ptr<ElevationIconSetter> elevation_icon_setter_;
diff --git a/chrome/browser/ui/views/infobars/infobar_view.cc b/chrome/browser/ui/views/infobars/infobar_view.cc index 55f4e611..b3cd2e2 100644 --- a/chrome/browser/ui/views/infobars/infobar_view.cc +++ b/chrome/browser/ui/views/infobars/infobar_view.cc
@@ -32,6 +32,7 @@ #include "ui/views/controls/button/image_button.h" #include "ui/views/controls/button/label_button.h" #include "ui/views/controls/button/label_button_border.h" +#include "ui/views/controls/button/md_text_button.h" #include "ui/views/controls/button/menu_button.h" #include "ui/views/controls/image_view.h" #include "ui/views/controls/label.h" @@ -113,35 +114,41 @@ } // static +views::Button* InfoBarView::CreateTextButton( + views::ButtonListener* listener, + const base::string16& text) { + if (!ui::MaterialDesignController::IsModeMaterial()) + return CreateLabelButton(listener, text); + + return new views::MdTextButton(listener, text); +} + +// static views::LabelButton* InfoBarView::CreateLabelButton( views::ButtonListener* listener, const base::string16& text) { views::LabelButton* button = new views::LabelButton(listener, text); - if (ui::MaterialDesignController::IsModeMaterial()) { - button->SetStyle(views::Button::STYLE_BUTTON); - } else { - scoped_ptr<views::LabelButtonAssetBorder> button_border( - new views::LabelButtonAssetBorder(views::Button::STYLE_TEXTBUTTON)); - const int kNormalImageSet[] = IMAGE_GRID(IDR_INFOBARBUTTON_NORMAL); - button_border->SetPainter( - false, views::Button::STATE_NORMAL, - views::Painter::CreateImageGridPainter(kNormalImageSet)); - const int kHoveredImageSet[] = IMAGE_GRID(IDR_INFOBARBUTTON_HOVER); - button_border->SetPainter( - false, views::Button::STATE_HOVERED, - views::Painter::CreateImageGridPainter(kHoveredImageSet)); - const int kPressedImageSet[] = IMAGE_GRID(IDR_INFOBARBUTTON_PRESSED); - button_border->SetPainter( - false, views::Button::STATE_PRESSED, - views::Painter::CreateImageGridPainter(kPressedImageSet)); + scoped_ptr<views::LabelButtonAssetBorder> button_border( + new views::LabelButtonAssetBorder(views::Button::STYLE_TEXTBUTTON)); + const int kNormalImageSet[] = IMAGE_GRID(IDR_INFOBARBUTTON_NORMAL); + button_border->SetPainter( + false, views::Button::STATE_NORMAL, + views::Painter::CreateImageGridPainter(kNormalImageSet)); + const int kHoveredImageSet[] = IMAGE_GRID(IDR_INFOBARBUTTON_HOVER); + button_border->SetPainter( + false, views::Button::STATE_HOVERED, + views::Painter::CreateImageGridPainter(kHoveredImageSet)); + const int kPressedImageSet[] = IMAGE_GRID(IDR_INFOBARBUTTON_PRESSED); + button_border->SetPainter( + false, views::Button::STATE_PRESSED, + views::Painter::CreateImageGridPainter(kPressedImageSet)); - button->SetBorder(std::move(button_border)); - button->set_animate_on_state_change(false); - button->SetTextColor(views::Button::STATE_NORMAL, GetInfobarTextColor()); - button->SetTextColor(views::Button::STATE_HOVERED, GetInfobarTextColor()); - ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); - button->SetFontList(rb.GetFontList(ui::ResourceBundle::MediumFont)); - } + button->SetBorder(std::move(button_border)); + button->set_animate_on_state_change(false); + button->SetTextColor(views::Button::STATE_NORMAL, GetInfobarTextColor()); + button->SetTextColor(views::Button::STATE_HOVERED, GetInfobarTextColor()); + ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); + button->SetFontList(rb.GetFontList(ui::ResourceBundle::MediumFont)); button->SetFocusable(true); return button; }
diff --git a/chrome/browser/ui/views/infobars/infobar_view.h b/chrome/browser/ui/views/infobars/infobar_view.h index 30f9726..9192848 100644 --- a/chrome/browser/ui/views/infobars/infobar_view.h +++ b/chrome/browser/ui/views/infobars/infobar_view.h
@@ -58,6 +58,11 @@ // Creates a focusable button for use on an infobar. The appearance is // customized for infobars (except in Material mode). // NOTE: Subclasses must ignore button presses if we're unowned. + static views::Button* CreateTextButton(views::ButtonListener* listener, + const base::string16& text); + + // Like CreateTextButton, but specifically creates a LabelButton. + // TODO(estade): remove this function when MD is default. static views::LabelButton* CreateLabelButton(views::ButtonListener* listener, const base::string16& text);
diff --git a/chrome/browser/ui/views/location_bar/zoom_bubble_view.cc b/chrome/browser/ui/views/location_bar/zoom_bubble_view.cc index 6cc5768..f00115d 100644 --- a/chrome/browser/ui/views/location_bar/zoom_bubble_view.cc +++ b/chrome/browser/ui/views/location_bar/zoom_bubble_view.cc
@@ -191,7 +191,6 @@ views::LabelButton* set_default_button = new views::LabelButton( this, l10n_util::GetStringUTF16(IDS_ZOOM_SET_DEFAULT)); set_default_button->SetStyle(views::Button::STYLE_BUTTON); - set_default_button->SetHorizontalAlignment(gfx::ALIGN_CENTER); grid_layout->AddView(set_default_button); StartTimerIfNecessary();
diff --git a/chrome/browser/ui/views/platform_keys_certificate_selector_chromeos.cc b/chrome/browser/ui/views/platform_keys_certificate_selector_chromeos.cc index 8f200d5..e1f5b72 100644 --- a/chrome/browser/ui/views/platform_keys_certificate_selector_chromeos.cc +++ b/chrome/browser/ui/views/platform_keys_certificate_selector_chromeos.cc
@@ -5,6 +5,7 @@ #include "chrome/browser/ui/views/platform_keys_certificate_selector_chromeos.h" #include <stddef.h> +#include <utility> #include "base/callback_helpers.h" #include "base/memory/ref_counted.h" @@ -48,7 +49,7 @@ views::StyledLabel::RangeStyleInfo bold_style; bold_style.font_style = gfx::Font::BOLD; label->AddStyleRange(gfx::Range(offset, offset + name.size()), bold_style); - CertificateSelector::InitWithText(label.Pass()); + CertificateSelector::InitWithText(std::move(label)); } bool PlatformKeysCertificateSelector::Cancel() {
diff --git a/chrome/browser/ui/website_settings/website_settings_infobar_delegate.cc b/chrome/browser/ui/website_settings/website_settings_infobar_delegate.cc index aa37049..e36553f 100644 --- a/chrome/browser/ui/website_settings/website_settings_infobar_delegate.cc +++ b/chrome/browser/ui/website_settings/website_settings_infobar_delegate.cc
@@ -34,6 +34,11 @@ return PAGE_ACTION_TYPE; } +infobars::InfoBarDelegate::InfoBarIdentifier +WebsiteSettingsInfoBarDelegate::GetIdentifier() const { + return WEBSITE_SETTINGS_INFOBAR_DELEGATE; +} + int WebsiteSettingsInfoBarDelegate::GetIconId() const { return IDR_INFOBAR_ALT_NAV_URL; }
diff --git a/chrome/browser/ui/website_settings/website_settings_infobar_delegate.h b/chrome/browser/ui/website_settings/website_settings_infobar_delegate.h index f40b114..f57e7a6 100644 --- a/chrome/browser/ui/website_settings/website_settings_infobar_delegate.h +++ b/chrome/browser/ui/website_settings/website_settings_infobar_delegate.h
@@ -27,6 +27,7 @@ // ConfirmInfoBarDelegate: Type GetInfoBarType() const override; + infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override; int GetIconId() const override; gfx::VectorIconId GetVectorIconId() const override; base::string16 GetMessageText() const override;
diff --git a/chrome/browser/ui/webui/chromeos/emulator/device_emulator_message_handler.cc b/chrome/browser/ui/webui/chromeos/emulator/device_emulator_message_handler.cc index 4ae24a74..8f5dd34 100644 --- a/chrome/browser/ui/webui/chromeos/emulator/device_emulator_message_handler.cc +++ b/chrome/browser/ui/webui/chromeos/emulator/device_emulator_message_handler.cc
@@ -5,6 +5,7 @@ #include "chrome/browser/ui/webui/chromeos/emulator/device_emulator_message_handler.h" #include <stdint.h> +#include <utility> #include "ash/shell.h" #include "ash/system/tray/system_tray_delegate.h" @@ -239,7 +240,7 @@ // Get each device's properties. for (const dbus::ObjectPath& path : paths) { scoped_ptr<base::DictionaryValue> device = GetDeviceInfo(path); - devices.Append(device.Pass()); + devices.Append(std::move(device)); } scoped_ptr<base::ListValue> predefined_devices = @@ -301,7 +302,7 @@ audio_node->SetString("name", node.name); audio_node->SetBoolean("active", node.active); - audio_nodes.Append(audio_node.Pass()); + audio_nodes.Append(std::move(audio_node)); } web_ui()->CallJavascriptFunction(kUpdateAudioNodes, audio_nodes); } @@ -561,9 +562,9 @@ uuids->AppendString(uuid); } - device->Set("uuids", uuids.Pass()); + device->Set("uuids", std::move(uuids)); - return device.Pass(); + return device; } } // namespace chromeos
diff --git a/chrome/browser/ui/webui/chromeos/login/l10n_util.cc b/chrome/browser/ui/webui/chromeos/login/l10n_util.cc index 4e9effb..44e1148 100644 --- a/chrome/browser/ui/webui/chromeos/login/l10n_util.cc +++ b/chrome/browser/ui/webui/chromeos/login/l10n_util.cc
@@ -55,7 +55,7 @@ input_method->SetString( "title", util->GetInputMethodLongNameStripped(method)); input_method->SetBoolean("selected", ime_id == selected); - return input_method.Pass(); + return input_method; } // Returns true if element was inserted. @@ -284,7 +284,7 @@ CreateLanguageEntry(pair.first, out_display_names[i], pair.second)); } - return language_list.Pass(); + return language_list; } // Invokes |callback| with a list of keyboard layouts that can be used for @@ -321,7 +321,7 @@ CreateInputMethodsEntry(*ime, selected).release()); } - callback.Run(input_methods_list.Pass()); + callback.Run(std::move(input_methods_list)); } // For "UI Language" drop-down menu at OOBE screen we need to decide which @@ -439,7 +439,7 @@ language_native_display_name, language_native_display_name)); AdjustUILanguageList(std::string(), language_list.get()); - return language_list.Pass(); + return language_list; } scoped_ptr<base::ListValue> GetUILanguageList( @@ -458,7 +458,7 @@ : StartupCustomizationDocument::GetInstance()->configured_locales(), true)); AdjustUILanguageList(selected, languages_list.get()); - return languages_list.Pass(); + return languages_list; } std::string FindMostRelevantLocale( @@ -567,7 +567,7 @@ selected).release()); manager->GetActiveIMEState()->EnableInputMethod(us_keyboard_id); } - return input_methods_list.Pass(); + return input_methods_list; } void GetKeyboardLayoutsForLocale(
diff --git a/chrome/browser/ui/webui/chromeos/login/network_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/network_screen_handler.cc index d4d07bf..29d9aee 100644 --- a/chrome/browser/ui/webui/chromeos/login/network_screen_handler.cc +++ b/chrome/browser/ui/webui/chromeos/login/network_screen_handler.cc
@@ -250,7 +250,7 @@ CrosSettings::Get()->GetString(kSystemTimezone, ¤t_timezone_id); scoped_ptr<base::ListValue> timezone_list(new base::ListValue); - scoped_ptr<base::ListValue> timezones = system::GetTimezoneList().Pass(); + scoped_ptr<base::ListValue> timezones = system::GetTimezoneList(); for (size_t i = 0; i < timezones->GetSize(); ++i) { const base::ListValue* timezone = NULL; CHECK(timezones->GetList(i, &timezone));
diff --git a/chrome/browser/ui/webui/help/version_updater_chromeos_unittest.cc b/chrome/browser/ui/webui/help/version_updater_chromeos_unittest.cc index 70a00e4c..150e9df 100644 --- a/chrome/browser/ui/webui/help/version_updater_chromeos_unittest.cc +++ b/chrome/browser/ui/webui/help/version_updater_chromeos_unittest.cc
@@ -50,7 +50,7 @@ scoped_ptr<DBusThreadManagerSetter> dbus_setter = DBusThreadManager::GetSetterForTesting(); dbus_setter->SetUpdateEngineClient( - scoped_ptr<UpdateEngineClient>(fake_update_engine_client_).Pass()); + scoped_ptr<UpdateEngineClient>(fake_update_engine_client_)); EXPECT_CALL(*mock_user_manager_, IsCurrentUserOwner()) .WillRepeatedly(Return(false));
diff --git a/chrome/browser/ui/webui/md_downloads/md_downloads_ui.cc b/chrome/browser/ui/webui/md_downloads/md_downloads_ui.cc index 95d3a4e..733f9c5d 100644 --- a/chrome/browser/ui/webui/md_downloads/md_downloads_ui.cc +++ b/chrome/browser/ui/webui/md_downloads/md_downloads_ui.cc
@@ -17,6 +17,7 @@ #include "chrome/browser/ui/webui/md_downloads/md_downloads_dom_handler.h" #include "chrome/browser/ui/webui/theme_source.h" #include "chrome/common/chrome_switches.h" +#include "chrome/common/features.h" #include "chrome/common/pref_names.h" #include "chrome/common/url_constants.h" #include "chrome/grit/chromium_strings.h" @@ -102,14 +103,17 @@ IDR_MD_DOWNLOADS_1X_NO_DOWNLOADS_PNG); source->AddResourcePath("2x/no_downloads.png", IDR_MD_DOWNLOADS_2X_NO_DOWNLOADS_PNG); + +#if BUILDFLAG(USE_VULCANIZE) + source->AddResourcePath("crisper.js", IDR_MD_DOWNLOADS_CRISPER_JS); + source->SetDefaultResource(IDR_MD_DOWNLOADS_VULCANIZED_HTML); +#else source->AddResourcePath("action_service.html", IDR_MD_DOWNLOADS_ACTION_SERVICE_HTML); source->AddResourcePath("action_service.js", IDR_MD_DOWNLOADS_ACTION_SERVICE_JS); source->AddResourcePath("constants.html", IDR_MD_DOWNLOADS_CONSTANTS_HTML); source->AddResourcePath("constants.js", IDR_MD_DOWNLOADS_CONSTANTS_JS); - source->AddResourcePath("crisper.js", IDR_MD_DOWNLOADS_CRISPER_JS); - source->AddResourcePath("dev.html", IDR_MD_DOWNLOADS_DOWNLOADS_HTML); source->AddResourcePath("downloads.js", IDR_MD_DOWNLOADS_DOWNLOADS_JS); source->AddResourcePath("i18n_setup.html", IDR_MD_DOWNLOADS_I18N_SETUP_HTML); source->AddResourcePath("item.css", IDR_MD_DOWNLOADS_ITEM_CSS); @@ -123,8 +127,9 @@ source->AddResourcePath("toolbar.css", IDR_MD_DOWNLOADS_TOOLBAR_CSS); source->AddResourcePath("toolbar.html", IDR_MD_DOWNLOADS_TOOLBAR_HTML); source->AddResourcePath("toolbar.js", IDR_MD_DOWNLOADS_TOOLBAR_JS); + source->SetDefaultResource(IDR_MD_DOWNLOADS_DOWNLOADS_HTML); +#endif - source->SetDefaultResource(IDR_MD_DOWNLOADS_VULCANIZED_HTML); source->SetJsonPath("strings.js"); return source;
diff --git a/chrome/browser/ui/webui/media_router/media_router_localized_strings_provider.cc b/chrome/browser/ui/webui/media_router/media_router_localized_strings_provider.cc index ae504a3..00d123d 100644 --- a/chrome/browser/ui/webui/media_router/media_router_localized_strings_provider.cc +++ b/chrome/browser/ui/webui/media_router/media_router_localized_strings_provider.cc
@@ -34,6 +34,12 @@ } void AddMediaRouterContainerStrings(content::WebUIDataSource* html_source) { + html_source->AddLocalizedString("firstRunFlowButton", + IDS_MEDIA_ROUTER_FIRST_RUN_FLOW_BUTTON); + html_source->AddLocalizedString("firstRunFlowText", + IDS_MEDIA_ROUTER_FIRST_RUN_FLOW_TEXT); + html_source->AddLocalizedString("firstRunFlowTitle", + IDS_MEDIA_ROUTER_FIRST_RUN_FLOW_TITLE); html_source->AddLocalizedString("autoCastMode", IDS_MEDIA_ROUTER_AUTO_CAST_MODE); html_source->AddLocalizedString("deviceMissing",
diff --git a/chrome/browser/ui/webui/media_router/media_router_webui_message_handler.cc b/chrome/browser/ui/webui/media_router/media_router_webui_message_handler.cc index 34eeac2..0a5026e4 100644 --- a/chrome/browser/ui/webui/media_router/media_router_webui_message_handler.cc +++ b/chrome/browser/ui/webui/media_router/media_router_webui_message_handler.cc
@@ -8,6 +8,8 @@ #include "base/bind.h" #include "base/metrics/histogram_macros.h" +#include "base/metrics/sparse_histogram.h" +#include "base/metrics/user_metrics.h" #include "base/strings/stringprintf.h" #include "chrome/browser/media/router/issue.h" #include "chrome/browser/ui/webui/media_router/media_router_ui.h" @@ -28,6 +30,9 @@ const char kActOnIssue[] = "actOnIssue"; const char kCloseRoute[] = "closeRoute"; const char kCloseDialog[] = "closeDialog"; +const char kReportClickedSinkIndex[] = "reportClickedSinkIndex"; +const char kReportNavigateToView[] = "reportNavigateToView"; +const char kReportSelectedCastMode[] = "reportSelectedCastMode"; const char kReportSinkCount[] = "reportSinkCount"; const char kOnInitialDataReceived[] = "onInitialDataReceived"; @@ -249,6 +254,18 @@ base::Bind(&MediaRouterWebUIMessageHandler::OnCloseDialog, base::Unretained(this))); web_ui()->RegisterMessageCallback( + kReportClickedSinkIndex, + base::Bind(&MediaRouterWebUIMessageHandler::OnReportClickedSinkIndex, + base::Unretained(this))); + web_ui()->RegisterMessageCallback( + kReportSelectedCastMode, + base::Bind(&MediaRouterWebUIMessageHandler::OnReportSelectedCastMode, + base::Unretained(this))); + web_ui()->RegisterMessageCallback( + kReportNavigateToView, + base::Bind(&MediaRouterWebUIMessageHandler::OnReportNavigateToView, + base::Unretained(this))); + web_ui()->RegisterMessageCallback( kReportSinkCount, base::Bind(&MediaRouterWebUIMessageHandler::OnReportSinkCount, base::Unretained(this))); @@ -364,12 +381,15 @@ DVLOG(1) << "OnCloseRoute"; const base::DictionaryValue* args_dict = nullptr; std::string route_id; + bool is_local = false; if (!args->GetDictionary(0, &args_dict) || - !args_dict->GetString("routeId", &route_id)) { + !args_dict->GetString("routeId", &route_id) || + !args_dict->GetBoolean("isLocal", &is_local)) { DVLOG(1) << "Unable to extract args."; return; } media_router_ui_->CloseRoute(route_id); + UMA_HISTOGRAM_BOOLEAN("MediaRouter.Ui.Action.StopRoute", !is_local); } void MediaRouterWebUIMessageHandler::OnCloseDialog( @@ -382,6 +402,51 @@ media_router_ui_->Close(); } +void MediaRouterWebUIMessageHandler::OnReportClickedSinkIndex( + const base::ListValue* args) { + DVLOG(1) << "OnReportClickedSinkIndex"; + int index; + if (!args->GetInteger(0, &index)) { + DVLOG(1) << "Unable to extract args."; + return; + } + UMA_HISTOGRAM_SPARSE_SLOWLY("MediaRouter.Ui.Action.StartLocalPosition", + std::min(index, 100)); +} + +void MediaRouterWebUIMessageHandler::OnReportNavigateToView( + const base::ListValue* args) { + DVLOG(1) << "OnReportNavigateToView"; + std::string view; + if (!args->GetString(0, &view)) { + DVLOG(1) << "Unable to extract args."; + return; + } + + if (view == "cast-mode-list") { + base::RecordAction(base::UserMetricsAction( + "MediaRouter_Ui_Navigate_SinkListToSource")); + } else if (view == "route-details") { + base::RecordAction(base::UserMetricsAction( + "MediaRouter_Ui_Navigate_SinkListToRouteDetails")); + } else if (view == "sink-list") { + base::RecordAction(base::UserMetricsAction( + "MediaRouter_Ui_Navigate_RouteDetailsToSinkList")); + } +} + +void MediaRouterWebUIMessageHandler::OnReportSelectedCastMode( + const base::ListValue* args) { + DVLOG(1) << "OnReportSelectedCastMode"; + int cast_mode_type; + if (!args->GetInteger(0, &cast_mode_type)) { + DVLOG(1) << "Unable to extract args."; + return; + } + UMA_HISTOGRAM_SPARSE_SLOWLY("MediaRouter.Ui.Navigate.SourceSelection", + cast_mode_type); +} + void MediaRouterWebUIMessageHandler::OnReportSinkCount( const base::ListValue* args) { DVLOG(1) << "OnReportSinkCount";
diff --git a/chrome/browser/ui/webui/media_router/media_router_webui_message_handler.h b/chrome/browser/ui/webui/media_router/media_router_webui_message_handler.h index af9074d..3a43dcf 100644 --- a/chrome/browser/ui/webui/media_router/media_router_webui_message_handler.h +++ b/chrome/browser/ui/webui/media_router/media_router_webui_message_handler.h
@@ -58,6 +58,9 @@ void OnActOnIssue(const base::ListValue* args); void OnCloseRoute(const base::ListValue* args); void OnCloseDialog(const base::ListValue* args); + void OnReportClickedSinkIndex(const base::ListValue* args); + void OnReportNavigateToView(const base::ListValue* args); + void OnReportSelectedCastMode(const base::ListValue* args); void OnReportSinkCount(const base::ListValue* args); void OnInitialDataReceived(const base::ListValue* args);
diff --git a/chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler.cc b/chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler.cc index 6b0b6f8f..2e1016b 100644 --- a/chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler.cc +++ b/chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler.cc
@@ -5,8 +5,8 @@ #include "chrome/browser/ui/webui/options/chromeos/core_chromeos_options_handler.h" #include <stddef.h> - #include <string> +#include <utility> #include "ash/session/session_state_delegate.h" #include "ash/shell.h" @@ -413,7 +413,7 @@ scoped_ptr<base::Value> value(FetchPref(setting_name)); if (!value.get()) NOTREACHED(); - DispatchPrefChangeNotification(setting_name, value.Pass()); + DispatchPrefChangeNotification(setting_name, std::move(value)); } void CoreChromeOSOptionsHandler::NotifyProxyPrefsChanged() { @@ -424,7 +424,7 @@ proxy_config_service_, kProxySettings[i], &value); DCHECK(value); scoped_ptr<base::Value> ptr(value); - DispatchPrefChangeNotification(kProxySettings[i], ptr.Pass()); + DispatchPrefChangeNotification(kProxySettings[i], std::move(ptr)); } }
diff --git a/chrome/browser/ui/webui/print_preview/print_preview_ui.cc b/chrome/browser/ui/webui/print_preview/print_preview_ui.cc index 1c2c19e2..8ef6e074 100644 --- a/chrome/browser/ui/webui/print_preview/print_preview_ui.cc +++ b/chrome/browser/ui/webui/print_preview/print_preview_ui.cc
@@ -367,6 +367,8 @@ source->SetJsonPath("strings.js"); source->AddResourcePath("print_preview.js", IDR_PRINT_PREVIEW_JS); + source->AddResourcePath("pdf_preview.html", + IDR_PRINT_PREVIEW_PDF_PREVIEW_HTML); source->AddResourcePath("images/printer.png", IDR_PRINT_PREVIEW_IMAGES_PRINTER); source->AddResourcePath("images/printer_shared.png", @@ -383,6 +385,8 @@ IDR_PRINT_PREVIEW_IMAGES_MOBILE_SHARED); source->SetDefaultResource(IDR_PRINT_PREVIEW_HTML); source->SetRequestFilter(base::Bind(&HandleRequestCallback)); + source->OverrideContentSecurityPolicyFrameSrc("frame-src 'self';"); + source->DisableDenyXFrameOptions(); source->OverrideContentSecurityPolicyObjectSrc("object-src 'self';"); source->AddLocalizedString("moreOptionsLabel", IDS_MORE_OPTIONS_LABEL); source->AddLocalizedString("lessOptionsLabel", IDS_LESS_OPTIONS_LABEL);
diff --git a/chrome/browser/ui/webui/voice_search_ui.cc b/chrome/browser/ui/webui/voice_search_ui.cc index 08c27ca..5c680f63 100644 --- a/chrome/browser/ui/webui/voice_search_ui.cc +++ b/chrome/browser/ui/webui/voice_search_ui.cc
@@ -5,6 +5,7 @@ #include "chrome/browser/ui/webui/voice_search_ui.h" #include <string> +#include <utility> #include "base/command_line.h" #include "base/files/file_enumerator.h" @@ -199,15 +200,11 @@ } base::ListValue* raw_list = list.get(); content::BrowserThread::PostTask( - content::BrowserThread::FILE, - FROM_HERE, - base::Bind( - &AddSharedModulePlatformsOnFileThread, - raw_list, - path, - base::Bind(&VoiceSearchDomHandler::ReturnVoiceSearchInfo, - weak_factory_.GetWeakPtr(), - base::Passed(list.Pass())))); + content::BrowserThread::FILE, FROM_HERE, + base::Bind(&AddSharedModulePlatformsOnFileThread, raw_list, path, + base::Bind(&VoiceSearchDomHandler::ReturnVoiceSearchInfo, + weak_factory_.GetWeakPtr(), + base::Passed(std::move(list))))); } // Adds information regarding the system and chrome version info to list.
diff --git a/chrome/chrome_browser_ui.gypi b/chrome/chrome_browser_ui.gypi index c6d1b2f..1bb44e1 100644 --- a/chrome/chrome_browser_ui.gypi +++ b/chrome/chrome_browser_ui.gypi
@@ -3327,6 +3327,7 @@ '../components/components.gyp:feedback_proto', '../device/bluetooth/bluetooth.gyp:device_bluetooth', '../third_party/libusb/libusb.gyp:libusb', + 'chrome_features.gyp:chrome_common_features', ], 'sources': [ '<@(chrome_browser_ui_non_mobile_sources)',
diff --git a/chrome/chrome_features.gyp b/chrome/chrome_features.gyp index 6ff5d76..deb1b98b 100644 --- a/chrome/chrome_features.gyp +++ b/chrome/chrome_features.gyp
@@ -16,6 +16,7 @@ 'buildflag_flags': [ 'ENABLE_GOOGLE_NOW=<(enable_google_now)', 'ANDROID_JAVA_UI=<(android_java_ui)', + 'USE_VULCANIZE=<(use_vulcanize)', ], }, },
diff --git a/chrome/chrome_features.gypi b/chrome/chrome_features.gypi index 06488b1e..1042f41 100644 --- a/chrome/chrome_features.gypi +++ b/chrome/chrome_features.gypi
@@ -21,17 +21,23 @@ 'enable_google_now%': 1, }] ], + + # Use vulcanized HTML/CSS/JS resources to speed up WebUI (chrome://) + # pages. https://github.com/polymer/vulcanize + 'use_vulcanize%': 1, }, # Anything in the conditions needs to be copied to the outer scope to be # accessible. 'enable_google_now%': '<(enable_google_now)', 'android_java_ui%': '<(android_java_ui)', + 'use_vulcanize%': '<(use_vulcanize)', # Grit defines based on the feature flags. These must be manually added to # grit targets. 'chrome_grit_defines': [ '-D', 'enable_google_now=<(enable_google_now)', + '-D', 'use_vulcanize=<(use_vulcanize)', ] }, }
diff --git a/chrome/chrome_public_test_apk.isolate b/chrome/chrome_public_test_apk.isolate index 62b43ea..136ef46 100644 --- a/chrome/chrome_public_test_apk.isolate +++ b/chrome/chrome_public_test_apk.isolate
@@ -14,7 +14,6 @@ '<(DEPTH)/chrome/test/data/android/media/', '<(DEPTH)/chrome/test/data/android/navigate/', '<(DEPTH)/chrome/test/data/android/ok.txt', - '<(DEPTH)/chrome/test/data/android/omahaupdateinfobar/', '<(DEPTH)/chrome/test/data/android/prerender/', '<(DEPTH)/chrome/test/data/android/redirect/about.html', '<(DEPTH)/chrome/test/data/android/simple.html',
diff --git a/chrome/chrome_resources.gyp b/chrome/chrome_resources.gyp index 6d15442..3036b08 100644 --- a/chrome/chrome_resources.gyp +++ b/chrome/chrome_resources.gyp
@@ -203,6 +203,11 @@ 'variables': { 'grit_grd_file': 'browser/browser_resources.grd', 'grit_additional_defines': [ + # TODO(dbeam): 'chrome_grit_defines' should just be appended to + # this list of 'grit_additional_defines' via the top of this file, + # but they're not for some reason. Maybe because they're in + # different scopes? + '<@(chrome_grit_defines)', '-E', 'additional_modules_list_file=<(additional_modules_list_file)', '-E', 'root_gen_dir=<(SHARED_INTERMEDIATE_DIR)', ],
diff --git a/chrome/common/BUILD.gn b/chrome/common/BUILD.gn index c9909410..edd9bc0 100644 --- a/chrome/common/BUILD.gn +++ b/chrome/common/BUILD.gn
@@ -43,6 +43,7 @@ flags = [ "ENABLE_GOOGLE_NOW=$enable_google_now", "ANDROID_JAVA_UI=$android_java_ui", + "USE_VULCANIZE=$use_vulcanize", ] }
diff --git a/chrome/common/extensions/api/file_browser_handlers/file_browser_handler_manifest_unittest.cc b/chrome/common/extensions/api/file_browser_handlers/file_browser_handler_manifest_unittest.cc index 868d216f..66f10a2 100644 --- a/chrome/common/extensions/api/file_browser_handlers/file_browser_handler_manifest_unittest.cc +++ b/chrome/common/extensions/api/file_browser_handlers/file_browser_handler_manifest_unittest.cc
@@ -57,7 +57,7 @@ std::move(extensions::ListBuilder().Append("fileBrowserHandler"))); extensions::ExtensionBuilder bad_app_builder; - bad_app_builder.SetManifest(bad_manifest_value.Pass()); + bad_app_builder.SetManifest(std::move(bad_manifest_value)); scoped_refptr<extensions::Extension> bad_app(bad_app_builder.Build()); EXPECT_FALSE(FileBrowserHandler::GetHandlers(bad_app.get()));
diff --git a/chrome/common/features.gni b/chrome/common/features.gni index 3188c6c..7095deb3 100644 --- a/chrome/common/features.gni +++ b/chrome/common/features.gni
@@ -13,6 +13,13 @@ # Default to true if compiling for android, but allow this being overriden # through the environment. android_java_ui = is_android + + # Use vulcanized HTML/CSS/JS resources to speed up WebUI (chrome://) + # pages. https://github.com/polymer/vulcanize + use_vulcanize = true } -chrome_grit_defines = [ "enable_google_now=$enable_google_now" ] +chrome_grit_defines = [ + "enable_google_now=$enable_google_now", + "use_vulcanize=$use_vulcanize", +]
diff --git a/chrome/test/base/chrome_render_view_host_test_harness.cc b/chrome/test/base/chrome_render_view_host_test_harness.cc index 64d0867..ac6085a2 100644 --- a/chrome/test/base/chrome_render_view_host_test_harness.cc +++ b/chrome/test/base/chrome_render_view_host_test_harness.cc
@@ -36,7 +36,7 @@ scoped_ptr<SigninManagerBase> signin( new SigninManagerBase(signin_client, account_tracker_service)); signin->Initialize(NULL); - return signin.Pass(); + return std::move(signin); #else scoped_ptr<FakeSigninManager> manager(new FakeSigninManager( signin_client, ProfileOAuth2TokenServiceFactory::GetForProfile(profile),
diff --git a/chrome/test/data/android/omahaupdateinfobar/omaha_update_infobar_test_page_1.html b/chrome/test/data/android/omahaupdateinfobar/omaha_update_infobar_test_page_1.html deleted file mode 100644 index e951a702..0000000 --- a/chrome/test/data/android/omahaupdateinfobar/omaha_update_infobar_test_page_1.html +++ /dev/null
@@ -1,8 +0,0 @@ -<html> - <head> - <title>OmahaUpdateInfoBarTest page 1</title> - </head> - <body> - I'm a body! - </body> -</html>
diff --git a/chrome/test/data/android/omahaupdateinfobar/omaha_update_infobar_test_page_2.html b/chrome/test/data/android/omahaupdateinfobar/omaha_update_infobar_test_page_2.html deleted file mode 100644 index 354273c..0000000 --- a/chrome/test/data/android/omahaupdateinfobar/omaha_update_infobar_test_page_2.html +++ /dev/null
@@ -1,8 +0,0 @@ -<html> - <head> - <title>OmahaUpdateInfoBarTest page 2</title> - </head> - <body> - I'm a different body than the one you looked at! - </body> -</html>
diff --git a/chrome/test/data/webui/media_router/media_router_container_tests.js b/chrome/test/data/webui/media_router/media_router_container_tests.js index 88571b6..7fc1da1f 100644 --- a/chrome/test/data/webui/media_router/media_router_container_tests.js +++ b/chrome/test/data/webui/media_router/media_router_container_tests.js
@@ -162,6 +162,20 @@ setTimeout(done); }); + // Tests for 'acknowledge-first-run-flow' event firing when the + // 'first-run-button' button is clicked. + test('first run button click', function(done) { + container.showFirstRunFlow_ = true; + + setTimeout(function() { + container.addEventListener('acknowledge-first-run-flow', function() { + done(); + }); + MockInteractions.tap(container.shadowRoot.getElementById( + 'first-run-button')); + }); + }); + // Tests for 'create-route' event firing when a sink with no associated // route is clicked. test('select sink without a route', function(done) {
diff --git a/chromecast/crash/linux/dump_info.h b/chromecast/crash/linux/dump_info.h index a225636..08f0fb6a 100644 --- a/chromecast/crash/linux/dump_info.h +++ b/chromecast/crash/linux/dump_info.h
@@ -62,7 +62,7 @@ // } scoped_ptr<base::Value> GetAsValue() const; const MinidumpParams& params() const { return params_; } - const bool valid() const { return valid_; } + bool valid() const { return valid_; } private: // Checks if parsed JSON in |value| is valid, if so populates the object's
diff --git a/chromeos/CHROMEOS_LKGM b/chromeos/CHROMEOS_LKGM index 99eedaa..38a5dad 100644 --- a/chromeos/CHROMEOS_LKGM +++ b/chromeos/CHROMEOS_LKGM
@@ -1 +1 @@ -7780.0.0 \ No newline at end of file +7795.0.0 \ No newline at end of file
diff --git a/chromeos/attestation/attestation_flow.cc b/chromeos/attestation/attestation_flow.cc index 7cfdc87..ec2b12e 100644 --- a/chromeos/attestation/attestation_flow.cc +++ b/chromeos/attestation/attestation_flow.cc
@@ -4,6 +4,8 @@ #include "chromeos/attestation/attestation_flow.h" +#include <utility> + #include "base/bind.h" #include "chromeos/cryptohome/async_method_caller.h" #include "chromeos/dbus/cryptohome_client.h" @@ -87,9 +89,8 @@ scoped_ptr<ServerProxy> server_proxy) : async_caller_(async_caller), cryptohome_client_(cryptohome_client), - server_proxy_(server_proxy.Pass()), - weak_factory_(this) { -} + server_proxy_(std::move(server_proxy)), + weak_factory_(this) {} AttestationFlow::~AttestationFlow() { }
diff --git a/chromeos/attestation/attestation_flow_unittest.cc b/chromeos/attestation/attestation_flow_unittest.cc index 578393b..99b98bd 100644 --- a/chromeos/attestation/attestation_flow_unittest.cc +++ b/chromeos/attestation/attestation_flow_unittest.cc
@@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include <utility> + #include "base/bind.h" #include "base/memory/scoped_ptr.h" #include "base/run_loop.h" @@ -139,7 +141,7 @@ base::Unretained(&observer)); scoped_ptr<ServerProxy> proxy_interface(proxy.release()); - AttestationFlow flow(&async_caller, &client, proxy_interface.Pass()); + AttestationFlow flow(&async_caller, &client, std::move(proxy_interface)); flow.GetCertificate(PROFILE_ENTERPRISE_USER_CERTIFICATE, "fake@test.com", "fake_origin", true, mock_callback); Run(); @@ -167,7 +169,7 @@ base::Unretained(&observer)); scoped_ptr<ServerProxy> proxy_interface(proxy.release()); - AttestationFlow flow(&async_caller, &client, proxy_interface.Pass()); + AttestationFlow flow(&async_caller, &client, std::move(proxy_interface)); flow.GetCertificate(PROFILE_ENTERPRISE_USER_CERTIFICATE, "", "", true, mock_callback); Run(); @@ -198,7 +200,7 @@ base::Unretained(&observer)); scoped_ptr<ServerProxy> proxy_interface(proxy.release()); - AttestationFlow flow(&async_caller, &client, proxy_interface.Pass()); + AttestationFlow flow(&async_caller, &client, std::move(proxy_interface)); flow.GetCertificate(PROFILE_ENTERPRISE_USER_CERTIFICATE, "", "", true, mock_callback); Run(); @@ -234,7 +236,7 @@ base::Unretained(&observer)); scoped_ptr<ServerProxy> proxy_interface(proxy.release()); - AttestationFlow flow(&async_caller, &client, proxy_interface.Pass()); + AttestationFlow flow(&async_caller, &client, std::move(proxy_interface)); flow.GetCertificate(PROFILE_ENTERPRISE_USER_CERTIFICATE, "", "", true, mock_callback); Run(); @@ -278,7 +280,7 @@ base::Unretained(&observer)); scoped_ptr<ServerProxy> proxy_interface(proxy.release()); - AttestationFlow flow(&async_caller, &client, proxy_interface.Pass()); + AttestationFlow flow(&async_caller, &client, std::move(proxy_interface)); flow.GetCertificate(PROFILE_ENTERPRISE_MACHINE_CERTIFICATE, "", "", true, mock_callback); Run(); @@ -307,7 +309,7 @@ base::Unretained(&observer)); scoped_ptr<ServerProxy> proxy_interface(proxy.release()); - AttestationFlow flow(&async_caller, &client, proxy_interface.Pass()); + AttestationFlow flow(&async_caller, &client, std::move(proxy_interface)); flow.GetCertificate(PROFILE_ENTERPRISE_USER_CERTIFICATE, "", "", true, mock_callback); Run(); @@ -339,7 +341,7 @@ base::Unretained(&observer)); scoped_ptr<ServerProxy> proxy_interface(proxy.release()); - AttestationFlow flow(&async_caller, &client, proxy_interface.Pass()); + AttestationFlow flow(&async_caller, &client, std::move(proxy_interface)); flow.GetCertificate(PROFILE_ENTERPRISE_USER_CERTIFICATE, "", "", true, mock_callback); Run(); @@ -364,7 +366,7 @@ base::Unretained(&observer)); scoped_ptr<ServerProxy> proxy_interface(proxy.release()); - AttestationFlow flow(&async_caller, &client, proxy_interface.Pass()); + AttestationFlow flow(&async_caller, &client, std::move(proxy_interface)); flow.GetCertificate(PROFILE_ENTERPRISE_USER_CERTIFICATE, "", "", true, mock_callback); Run(); @@ -411,7 +413,7 @@ base::Unretained(&observer)); scoped_ptr<ServerProxy> proxy_interface(proxy.release()); - AttestationFlow flow(&async_caller, &client, proxy_interface.Pass()); + AttestationFlow flow(&async_caller, &client, std::move(proxy_interface)); flow.GetCertificate(PROFILE_ENTERPRISE_USER_CERTIFICATE, "", "", false, mock_callback); Run(); @@ -442,7 +444,7 @@ base::Unretained(&observer)); scoped_ptr<ServerProxy> proxy_interface(proxy.release()); - AttestationFlow flow(&async_caller, &client, proxy_interface.Pass()); + AttestationFlow flow(&async_caller, &client, std::move(proxy_interface)); flow.GetCertificate(PROFILE_ENTERPRISE_USER_CERTIFICATE, "", "", false, mock_callback); Run(); @@ -477,7 +479,7 @@ base::Unretained(&observer)); scoped_ptr<ServerProxy> proxy_interface(proxy.release()); - AttestationFlow flow(&async_caller, &client, proxy_interface.Pass()); + AttestationFlow flow(&async_caller, &client, std::move(proxy_interface)); flow.GetCertificate(PROFILE_ENTERPRISE_USER_CERTIFICATE, "", "", true, mock_callback); Run();
diff --git a/chromeos/cert_loader.cc b/chromeos/cert_loader.cc index 0940f52..b5ac9e5 100644 --- a/chromeos/cert_loader.cc +++ b/chromeos/cert_loader.cc
@@ -5,6 +5,7 @@ #include "chromeos/cert_loader.h" #include <algorithm> +#include <utility> #include "base/bind.h" #include "base/location.h" @@ -157,7 +158,7 @@ VLOG(1) << "UpdateCertificates: " << cert_list->size(); // Ignore any existing certificates. - cert_list_ = cert_list.Pass(); + cert_list_ = std::move(cert_list); bool initial_load = !certificates_loaded_; certificates_loaded_ = true;
diff --git a/chromeos/cert_loader_unittest.cc b/chromeos/cert_loader_unittest.cc index f594f93a..9057013 100644 --- a/chromeos/cert_loader_unittest.cc +++ b/chromeos/cert_loader_unittest.cc
@@ -5,6 +5,7 @@ #include "chromeos/cert_loader.h" #include <stddef.h> +#include <utility> #include "base/bind.h" #include "base/files/file_util.h" @@ -39,7 +40,8 @@ public: TestNSSCertDatabase(crypto::ScopedPK11Slot public_slot, crypto::ScopedPK11Slot private_slot) - : NSSCertDatabaseChromeOS(public_slot.Pass(), private_slot.Pass()) {} + : NSSCertDatabaseChromeOS(std::move(public_slot), + std::move(private_slot)) {} ~TestNSSCertDatabase() override {} void NotifyOfCertAdded(const net::X509Certificate* cert) {
diff --git a/chromeos/cryptohome/homedir_methods_unittest.cc b/chromeos/cryptohome/homedir_methods_unittest.cc index f6174add..19b039d 100644 --- a/chromeos/cryptohome/homedir_methods_unittest.cc +++ b/chromeos/cryptohome/homedir_methods_unittest.cc
@@ -5,6 +5,7 @@ #include "chromeos/cryptohome/homedir_methods.h" #include <stdint.h> +#include <utility> #include "base/bind.h" #include "base/bind_helpers.h" @@ -91,7 +92,7 @@ new chromeos::MockCryptohomeClient); cryptohome_client_ = cryptohome_client.get(); chromeos::DBusThreadManager::GetSetterForTesting()->SetCryptohomeClient( - cryptohome_client.Pass()); + std::move(cryptohome_client)); HomedirMethods::Initialize(); }
diff --git a/chromeos/dbus/blocking_method_caller.cc b/chromeos/dbus/blocking_method_caller.cc index 22315a5..f95254be 100644 --- a/chromeos/dbus/blocking_method_caller.cc +++ b/chromeos/dbus/blocking_method_caller.cc
@@ -60,7 +60,7 @@ // http://crbug.com/125360 base::ThreadRestrictions::ScopedAllowWait allow_wait; on_blocking_method_call_.Wait(); - return response.Pass(); + return response; } } // namespace chromeos
diff --git a/chromeos/dbus/dbus_thread_manager.cc b/chromeos/dbus/dbus_thread_manager.cc index fe590216..c7365de 100644 --- a/chromeos/dbus/dbus_thread_manager.cc +++ b/chromeos/dbus/dbus_thread_manager.cc
@@ -4,6 +4,8 @@ #include "chromeos/dbus/dbus_thread_manager.h" +#include <utility> + #include "base/command_line.h" #include "base/sys_info.h" #include "base/threading/thread.h" @@ -50,7 +52,7 @@ static bool g_using_dbus_thread_manager_for_testing = false; DBusThreadManager::DBusThreadManager(scoped_ptr<DBusClientBundle> client_bundle) - : client_bundle_(client_bundle.Pass()) { + : client_bundle_(std::move(client_bundle)) { dbus::statistics::Initialize(); if (client_bundle_->IsUsingAnyRealClient()) { @@ -388,174 +390,185 @@ void DBusThreadManagerSetter::SetAmplifierClient( scoped_ptr<AmplifierClient> client) { - DBusThreadManager::Get()->client_bundle_->amplifier_client_ = client.Pass(); + DBusThreadManager::Get()->client_bundle_->amplifier_client_ = + std::move(client); } void DBusThreadManagerSetter::SetAudioDspClient( scoped_ptr<AudioDspClient> client) { - DBusThreadManager::Get()->client_bundle_->audio_dsp_client_ = client.Pass(); + DBusThreadManager::Get()->client_bundle_->audio_dsp_client_ = + std::move(client); } void DBusThreadManagerSetter::SetCrasAudioClient( scoped_ptr<CrasAudioClient> client) { - DBusThreadManager::Get()->client_bundle_->cras_audio_client_ = client.Pass(); + DBusThreadManager::Get()->client_bundle_->cras_audio_client_ = + std::move(client); } void DBusThreadManagerSetter::SetCrosDisksClient( scoped_ptr<CrosDisksClient> client) { - DBusThreadManager::Get()->client_bundle_->cros_disks_client_ = client.Pass(); + DBusThreadManager::Get()->client_bundle_->cros_disks_client_ = + std::move(client); } void DBusThreadManagerSetter::SetCryptohomeClient( scoped_ptr<CryptohomeClient> client) { - DBusThreadManager::Get()->client_bundle_->cryptohome_client_ = client.Pass(); + DBusThreadManager::Get()->client_bundle_->cryptohome_client_ = + std::move(client); } void DBusThreadManagerSetter::SetDebugDaemonClient( scoped_ptr<DebugDaemonClient> client) { DBusThreadManager::Get()->client_bundle_->debug_daemon_client_ = - client.Pass(); + std::move(client); } void DBusThreadManagerSetter::SetEasyUnlockClient( scoped_ptr<EasyUnlockClient> client) { - DBusThreadManager::Get()->client_bundle_->easy_unlock_client_ = client.Pass(); + DBusThreadManager::Get()->client_bundle_->easy_unlock_client_ = + std::move(client); } void DBusThreadManagerSetter::SetLorgnetteManagerClient( scoped_ptr<LorgnetteManagerClient> client) { DBusThreadManager::Get()->client_bundle_->lorgnette_manager_client_ = - client.Pass(); + std::move(client); } void DBusThreadManagerSetter::SetShillDeviceClient( scoped_ptr<ShillDeviceClient> client) { DBusThreadManager::Get()->client_bundle_->shill_device_client_ = - client.Pass(); + std::move(client); } void DBusThreadManagerSetter::SetShillIPConfigClient( scoped_ptr<ShillIPConfigClient> client) { DBusThreadManager::Get()->client_bundle_->shill_ipconfig_client_ = - client.Pass(); + std::move(client); } void DBusThreadManagerSetter::SetShillManagerClient( scoped_ptr<ShillManagerClient> client) { DBusThreadManager::Get()->client_bundle_->shill_manager_client_ = - client.Pass(); + std::move(client); } void DBusThreadManagerSetter::SetShillServiceClient( scoped_ptr<ShillServiceClient> client) { DBusThreadManager::Get()->client_bundle_->shill_service_client_ = - client.Pass(); + std::move(client); } void DBusThreadManagerSetter::SetShillProfileClient( scoped_ptr<ShillProfileClient> client) { DBusThreadManager::Get()->client_bundle_->shill_profile_client_ = - client.Pass(); + std::move(client); } void DBusThreadManagerSetter::SetShillThirdPartyVpnDriverClient( scoped_ptr<ShillThirdPartyVpnDriverClient> client) { DBusThreadManager::Get() - ->client_bundle_->shill_third_party_vpn_driver_client_ = client.Pass(); + ->client_bundle_->shill_third_party_vpn_driver_client_ = + std::move(client); } void DBusThreadManagerSetter::SetGsmSMSClient( scoped_ptr<GsmSMSClient> client) { - DBusThreadManager::Get()->client_bundle_->gsm_sms_client_ = client.Pass(); + DBusThreadManager::Get()->client_bundle_->gsm_sms_client_ = std::move(client); } void DBusThreadManagerSetter::SetImageBurnerClient( scoped_ptr<ImageBurnerClient> client) { DBusThreadManager::Get()->client_bundle_->image_burner_client_ = - client.Pass(); + std::move(client); } void DBusThreadManagerSetter::SetIntrospectableClient( scoped_ptr<IntrospectableClient> client) { DBusThreadManager::Get()->client_bundle_->introspectable_client_ = - client.Pass(); + std::move(client); } void DBusThreadManagerSetter::SetModemMessagingClient( scoped_ptr<ModemMessagingClient> client) { DBusThreadManager::Get()->client_bundle_->modem_messaging_client_ = - client.Pass(); + std::move(client); } void DBusThreadManagerSetter::SetNfcAdapterClient( scoped_ptr<NfcAdapterClient> client) { - DBusThreadManager::Get()->client_bundle_->nfc_adapter_client_ = client.Pass(); + DBusThreadManager::Get()->client_bundle_->nfc_adapter_client_ = + std::move(client); } void DBusThreadManagerSetter::SetNfcDeviceClient( scoped_ptr<NfcDeviceClient> client) { - DBusThreadManager::Get()->client_bundle_->nfc_device_client_ = client.Pass(); + DBusThreadManager::Get()->client_bundle_->nfc_device_client_ = + std::move(client); } void DBusThreadManagerSetter::SetNfcManagerClient( scoped_ptr<NfcManagerClient> client) { - DBusThreadManager::Get()->client_bundle_->nfc_manager_client_ = client.Pass(); + DBusThreadManager::Get()->client_bundle_->nfc_manager_client_ = + std::move(client); } void DBusThreadManagerSetter::SetNfcRecordClient( scoped_ptr<NfcRecordClient> client) { - DBusThreadManager::Get()->client_bundle_->nfc_record_client_ = client.Pass(); + DBusThreadManager::Get()->client_bundle_->nfc_record_client_ = + std::move(client); } void DBusThreadManagerSetter::SetNfcTagClient( scoped_ptr<NfcTagClient> client) { - DBusThreadManager::Get()->client_bundle_->nfc_tag_client_ = client.Pass(); + DBusThreadManager::Get()->client_bundle_->nfc_tag_client_ = std::move(client); } void DBusThreadManagerSetter::SetPeerDaemonManagerClient( scoped_ptr<PeerDaemonManagerClient> client) { DBusThreadManager::Get()->client_bundle_->peer_daemon_manager_client_ = - client.Pass(); + std::move(client); } void DBusThreadManagerSetter::SetPermissionBrokerClient( scoped_ptr<PermissionBrokerClient> client) { DBusThreadManager::Get()->client_bundle_->permission_broker_client_ = - client.Pass(); + std::move(client); } void DBusThreadManagerSetter::SetPrivetDaemonManagerClient( scoped_ptr<PrivetDaemonManagerClient> client) { DBusThreadManager::Get()->client_bundle_->privet_daemon_manager_client_ = - client.Pass(); + std::move(client); } void DBusThreadManagerSetter::SetPowerManagerClient( scoped_ptr<PowerManagerClient> client) { DBusThreadManager::Get()->client_bundle_->power_manager_client_ = - client.Pass(); + std::move(client); } void DBusThreadManagerSetter::SetSessionManagerClient( scoped_ptr<SessionManagerClient> client) { DBusThreadManager::Get()->client_bundle_->session_manager_client_ = - client.Pass(); + std::move(client); } void DBusThreadManagerSetter::SetSMSClient(scoped_ptr<SMSClient> client) { - DBusThreadManager::Get()->client_bundle_->sms_client_ = client.Pass(); + DBusThreadManager::Get()->client_bundle_->sms_client_ = std::move(client); } void DBusThreadManagerSetter::SetSystemClockClient( scoped_ptr<SystemClockClient> client) { DBusThreadManager::Get()->client_bundle_->system_clock_client_ = - client.Pass(); + std::move(client); } void DBusThreadManagerSetter::SetUpdateEngineClient( scoped_ptr<UpdateEngineClient> client) { DBusThreadManager::Get()->client_bundle_->update_engine_client_ = - client.Pass(); + std::move(client); } } // namespace chromeos
diff --git a/chromeos/dbus/debug_daemon_client.cc b/chromeos/dbus/debug_daemon_client.cc index c0f05ff..5358c941 100644 --- a/chromeos/dbus/debug_daemon_client.cc +++ b/chromeos/dbus/debug_daemon_client.cc
@@ -567,7 +567,7 @@ scoped_ptr<dbus::FileDescriptor> file_descriptor(new dbus::FileDescriptor); file_descriptor->PutValue(pipe_write_end.TakePlatformFile()); file_descriptor->CheckValidity(); - return file_descriptor.Pass(); + return file_descriptor; } // Called when a CheckValidity response is received.
diff --git a/chromeos/dbus/permission_broker_client.cc b/chromeos/dbus/permission_broker_client.cc index b862f75..5ddf0d4 100644 --- a/chromeos/dbus/permission_broker_client.cc +++ b/chromeos/dbus/permission_broker_client.cc
@@ -5,6 +5,7 @@ #include "chromeos/dbus/permission_broker_client.h" #include <stdint.h> +#include <utility> #include "base/bind.h" #include "base/macros.h" @@ -155,7 +156,7 @@ LOG(WARNING) << "Access request method call failed."; } - callback.Run(fd.Pass()); + callback.Run(std::move(fd)); } dbus::ObjectProxy* proxy_;
diff --git a/chromeos/dbus/pipe_reader.cc b/chromeos/dbus/pipe_reader.cc index 497f514..70b44b35 100644 --- a/chromeos/dbus/pipe_reader.cc +++ b/chromeos/dbus/pipe_reader.cc
@@ -44,7 +44,7 @@ LOG(ERROR) << "Unable to post initial read"; return base::File(); } - return pipe_write_end.Pass(); + return pipe_write_end; } void PipeReader::OnDataReady(int byte_count) {
diff --git a/chromeos/dbus/services/console_service_provider.cc b/chromeos/dbus/services/console_service_provider.cc index 71a3479..6bd7f119 100644 --- a/chromeos/dbus/services/console_service_provider.cc +++ b/chromeos/dbus/services/console_service_provider.cc
@@ -4,6 +4,8 @@ #include "chromeos/dbus/services/console_service_provider.h" +#include <utility> + #include "base/bind.h" #include "dbus/message.h" #include "third_party/cros_system_api/dbus/service_constants.h" @@ -17,15 +19,13 @@ bool status) { dbus::MessageWriter writer(response.get()); writer.AppendBool(status); - response_sender.Run(response.Pass()); + response_sender.Run(std::move(response)); } } // namespace ConsoleServiceProvider::ConsoleServiceProvider(scoped_ptr<Delegate> delegate) - : delegate_(delegate.Pass()), - weak_ptr_factory_(this) { -} + : delegate_(std::move(delegate)), weak_ptr_factory_(this) {} ConsoleServiceProvider::~ConsoleServiceProvider() { }
diff --git a/chromeos/dbus/services/cros_dbus_service.cc b/chromeos/dbus/services/cros_dbus_service.cc index 6f482ac5..672bc862 100644 --- a/chromeos/dbus/services/cros_dbus_service.cc +++ b/chromeos/dbus/services/cros_dbus_service.cc
@@ -5,6 +5,7 @@ #include "chromeos/dbus/services/cros_dbus_service.h" #include <stddef.h> +#include <utility> #include "base/bind.h" #include "base/stl_util.h" @@ -31,8 +32,7 @@ : service_started_(false), origin_thread_id_(base::PlatformThread::CurrentId()), bus_(bus), - service_providers_(service_providers.Pass()) { - } + service_providers_(std::move(service_providers)) {} ~CrosDBusServiceImpl() override { } @@ -111,7 +111,7 @@ } dbus::Bus* bus = DBusThreadManager::Get()->GetSystemBus(); if (base::SysInfo::IsRunningOnChromeOS() && bus) { - auto* service = new CrosDBusServiceImpl(bus, service_providers.Pass()); + auto* service = new CrosDBusServiceImpl(bus, std::move(service_providers)); g_cros_dbus_service = service; service->Start(); } else { @@ -128,7 +128,7 @@ LOG(WARNING) << "CrosDBusService was already initialized"; return; } - auto* service = new CrosDBusServiceImpl(bus, service_providers.Pass()); + auto* service = new CrosDBusServiceImpl(bus, std::move(service_providers)); service->Start(); g_cros_dbus_service = service; VLOG(1) << "CrosDBusService initialized";
diff --git a/chromeos/dbus/services/cros_dbus_service_unittest.cc b/chromeos/dbus/services/cros_dbus_service_unittest.cc index 1a0a25f..0e65ebf 100644 --- a/chromeos/dbus/services/cros_dbus_service_unittest.cc +++ b/chromeos/dbus/services/cros_dbus_service_unittest.cc
@@ -4,6 +4,8 @@ #include "chromeos/dbus/services/cros_dbus_service.h" +#include <utility> + #include "base/bind.h" #include "base/logging.h" #include "base/memory/ref_counted.h" @@ -66,8 +68,8 @@ // Initialize the cros service with the mocks injected. ScopedVector<CrosDBusService::ServiceProviderInterface> service_providers; service_providers.push_back(mock_proxy_resolution_service_provider); - CrosDBusService::InitializeForTesting( - mock_bus_.get(), service_providers.Pass()); + CrosDBusService::InitializeForTesting(mock_bus_.get(), + std::move(service_providers)); } void TearDown() override {
diff --git a/chromeos/dbus/services/display_power_service_provider.cc b/chromeos/dbus/services/display_power_service_provider.cc index 1dc1d688..73dbd67 100644 --- a/chromeos/dbus/services/display_power_service_provider.cc +++ b/chromeos/dbus/services/display_power_service_provider.cc
@@ -4,6 +4,8 @@ #include "chromeos/dbus/services/display_power_service_provider.h" +#include <utility> + #include "base/bind.h" #include "dbus/message.h" @@ -22,9 +24,7 @@ DisplayPowerServiceProvider::DisplayPowerServiceProvider( scoped_ptr<Delegate> delegate) - : delegate_(delegate.Pass()), - weak_ptr_factory_(this) { -} + : delegate_(std::move(delegate)), weak_ptr_factory_(this) {} DisplayPowerServiceProvider::~DisplayPowerServiceProvider() {}
diff --git a/chromeos/dbus/services/proxy_resolution_service_provider.cc b/chromeos/dbus/services/proxy_resolution_service_provider.cc index 8c760aa..ec1a754d 100644 --- a/chromeos/dbus/services/proxy_resolution_service_provider.cc +++ b/chromeos/dbus/services/proxy_resolution_service_provider.cc
@@ -4,6 +4,8 @@ #include "chromeos/dbus/services/proxy_resolution_service_provider.h" +#include <utility> + #include "base/bind.h" #include "base/bind_helpers.h" #include "base/macros.h" @@ -51,10 +53,9 @@ }; explicit ProxyResolverImpl(scoped_ptr<ProxyResolverDelegate> delegate) - : delegate_(delegate.Pass()), + : delegate_(std::move(delegate)), origin_thread_(base::ThreadTaskRunnerHandle::Get()), - weak_ptr_factory_(this) { - } + weak_ptr_factory_(this) {} ~ProxyResolverImpl() override { DCHECK(OnOriginThread()); @@ -267,7 +268,7 @@ ProxyResolutionServiceProvider* ProxyResolutionServiceProvider::Create( scoped_ptr<ProxyResolverDelegate> delegate) { return new ProxyResolutionServiceProvider( - new ProxyResolverImpl(delegate.Pass())); + new ProxyResolverImpl(std::move(delegate))); } ProxyResolverInterface::~ProxyResolverInterface() {
diff --git a/chromeos/dbus/services/service_provider_test_helper.cc b/chromeos/dbus/services/service_provider_test_helper.cc index 67162441..7407946c 100644 --- a/chromeos/dbus/services/service_provider_test_helper.cc +++ b/chromeos/dbus/services/service_provider_test_helper.cc
@@ -4,6 +4,8 @@ #include "chromeos/dbus/services/service_provider_test_helper.h" +#include <utility> + #include "base/bind.h" #include "dbus/message.h" #include "dbus/mock_bus.h" @@ -155,7 +157,7 @@ void ServiceProviderTestHelper::OnResponse( scoped_ptr<dbus::Response> response) { - response_ = response.Pass(); + response_ = std::move(response); response_received_ = true; if (base::MessageLoop::current()->is_running()) base::MessageLoop::current()->QuitWhenIdle();
diff --git a/chromeos/geolocation/simple_geolocation_unittest.cc b/chromeos/geolocation/simple_geolocation_unittest.cc index ba4eb2e9..6c8fb429 100644 --- a/chromeos/geolocation/simple_geolocation_unittest.cc +++ b/chromeos/geolocation/simple_geolocation_unittest.cc
@@ -79,7 +79,7 @@ new net::HttpResponseHeaders(std::string()); download_headers->AddHeader("Content-Type: application/json"); fetcher->set_response_headers(download_headers); - return fetcher.Pass(); + return fetcher; } void Initialize(net::FakeURLFetcherFactory* factory) {
diff --git a/chromeos/login/auth/cryptohome_authenticator.cc b/chromeos/login/auth/cryptohome_authenticator.cc index 4a80b2b..df430d08d 100644 --- a/chromeos/login/auth/cryptohome_authenticator.cc +++ b/chromeos/login/auth/cryptohome_authenticator.cc
@@ -53,7 +53,7 @@ if (result->GetKeyType() == Key::KEY_TYPE_PASSWORD_PLAIN) result->Transform(Key::KEY_TYPE_SALTED_SHA256_TOP_HALF, system_salt); - return result.Pass(); + return result; } // Records status and calls resolver->Resolve().
diff --git a/chromeos/network/firewall_hole.cc b/chromeos/network/firewall_hole.cc index 3839b3a..29abf03 100644 --- a/chromeos/network/firewall_hole.cc +++ b/chromeos/network/firewall_hole.cc
@@ -7,6 +7,7 @@ #include <fcntl.h> #include <stdint.h> #include <unistd.h> +#include <utility> #include "base/bind.h" #include "base/location.h" @@ -139,7 +140,7 @@ bool success) { if (success) { callback.Run(make_scoped_ptr( - new FirewallHole(type, port, interface, lifeline_fd.Pass()))); + new FirewallHole(type, port, interface, std::move(lifeline_fd)))); } else { callback.Run(nullptr); } @@ -152,7 +153,6 @@ : type_(type), port_(port), interface_(interface), - lifeline_fd_(lifeline_fd.Pass()) { -} + lifeline_fd_(std::move(lifeline_fd)) {} } // namespace chromeos
diff --git a/chromeos/network/managed_network_configuration_handler_impl.cc b/chromeos/network/managed_network_configuration_handler_impl.cc index 8e1c910..cdbc963 100644 --- a/chromeos/network/managed_network_configuration_handler_impl.cc +++ b/chromeos/network/managed_network_configuration_handler_impl.cc
@@ -4,6 +4,7 @@ #include "chromeos/network/managed_network_configuration_handler_impl.h" +#include <utility> #include <vector> #include "base/bind.h" @@ -339,7 +340,7 @@ } } - SetShillProperties(service_path, shill_dictionary.Pass(), callback, + SetShillProperties(service_path, std::move(shill_dictionary), callback, error_callback); } @@ -818,7 +819,7 @@ !shill_properties_copy->GetStringWithoutPathExpansion( shill::kDeviceProperty, &device_path) || device_path.empty()) { - send_callback.Run(service_path, shill_properties_copy.Pass()); + send_callback.Run(service_path, std::move(shill_properties_copy)); return; } @@ -851,7 +852,7 @@ // Create a "Device" dictionary in |network_properties|. network_properties->SetWithoutPathExpansion( shill::kDeviceProperty, device_properties.DeepCopy()); - send_callback.Run(service_path, network_properties.Pass()); + send_callback.Run(service_path, std::move(network_properties)); } void ManagedNetworkConfigurationHandlerImpl::GetDevicePropertiesFailure( @@ -861,7 +862,7 @@ const std::string& error_name, scoped_ptr<base::DictionaryValue> error_data) { NET_LOG_ERROR("Error getting device properties", service_path); - send_callback.Run(service_path, network_properties.Pass()); + send_callback.Run(service_path, std::move(network_properties)); }
diff --git a/chromeos/network/managed_network_configuration_handler_unittest.cc b/chromeos/network/managed_network_configuration_handler_unittest.cc index e22b161..30b1891 100644 --- a/chromeos/network/managed_network_configuration_handler_unittest.cc +++ b/chromeos/network/managed_network_configuration_handler_unittest.cc
@@ -236,11 +236,11 @@ mock_profile_client_ = new StrictMock<MockShillProfileClient>(); mock_service_client_ = new StrictMock<MockShillServiceClient>(); dbus_setter->SetShillManagerClient( - scoped_ptr<ShillManagerClient>(mock_manager_client_).Pass()); + scoped_ptr<ShillManagerClient>(mock_manager_client_)); dbus_setter->SetShillProfileClient( - scoped_ptr<ShillProfileClient>(mock_profile_client_).Pass()); + scoped_ptr<ShillProfileClient>(mock_profile_client_)); dbus_setter->SetShillServiceClient( - scoped_ptr<ShillServiceClient>(mock_service_client_).Pass()); + scoped_ptr<ShillServiceClient>(mock_service_client_)); SetNetworkConfigurationHandlerExpectations();
diff --git a/chromeos/network/network_configuration_handler_unittest.cc b/chromeos/network/network_configuration_handler_unittest.cc index be4194a..a5be195 100644 --- a/chromeos/network/network_configuration_handler_unittest.cc +++ b/chromeos/network/network_configuration_handler_unittest.cc
@@ -188,11 +188,11 @@ mock_profile_client_ = new MockShillProfileClient(); mock_service_client_ = new MockShillServiceClient(); dbus_setter->SetShillManagerClient( - scoped_ptr<ShillManagerClient>(mock_manager_client_).Pass()); + scoped_ptr<ShillManagerClient>(mock_manager_client_)); dbus_setter->SetShillProfileClient( - scoped_ptr<ShillProfileClient>(mock_profile_client_).Pass()); + scoped_ptr<ShillProfileClient>(mock_profile_client_)); dbus_setter->SetShillServiceClient( - scoped_ptr<ShillServiceClient>(mock_service_client_).Pass()); + scoped_ptr<ShillServiceClient>(mock_service_client_)); EXPECT_CALL(*mock_service_client_, GetProperties(_, _)).Times(AnyNumber()); EXPECT_CALL(*mock_manager_client_, GetProperties(_)).Times(AnyNumber());
diff --git a/chromeos/network/network_device_handler_impl.cc b/chromeos/network/network_device_handler_impl.cc index ccb560ea..753bebc0 100644 --- a/chromeos/network/network_device_handler_impl.cc +++ b/chromeos/network/network_device_handler_impl.cc
@@ -6,6 +6,7 @@ #include <stddef.h> #include <stdint.h> +#include <utility> #include "base/bind.h" #include "base/location.h" @@ -257,7 +258,7 @@ network_handler::CreateDBusErrorData( device_path, error_name, error_detail, dbus_error_name, dbus_error_message)); - error_callback.Run(error_name, error_data.Pass()); + error_callback.Run(error_name, std::move(error_data)); } void CallPerformTDLSOperation( @@ -572,7 +573,7 @@ return NULL; scoped_ptr<base::DictionaryValue> error_data(new base::DictionaryValue); error_data->SetString(network_handler::kErrorName, kErrorDeviceMissing); - error_callback.Run(kErrorDeviceMissing, error_data.Pass()); + error_callback.Run(kErrorDeviceMissing, std::move(error_data)); return NULL; }
diff --git a/chromeos/network/network_handler_callbacks.cc b/chromeos/network/network_handler_callbacks.cc index 5d15182b..278cfcc 100644 --- a/chromeos/network/network_handler_callbacks.cc +++ b/chromeos/network/network_handler_callbacks.cc
@@ -4,6 +4,8 @@ #include "chromeos/network/network_handler_callbacks.h" +#include <utility> + #include "base/logging.h" #include "base/values.h" #include "components/device_event_log/device_event_log.h" @@ -85,7 +87,7 @@ return; scoped_ptr<base::DictionaryValue> error_data(CreateDBusErrorData( path, error_name, detail, dbus_error_name, dbus_error_message)); - error_callback.Run(error_name, error_data.Pass()); + error_callback.Run(error_name, std::move(error_data)); } void GetPropertiesCallback(const DictionaryResultCallback& callback,
diff --git a/chromeos/network/network_state_handler.cc b/chromeos/network/network_state_handler.cc index dfcc0e6f..5f4738a6 100644 --- a/chromeos/network/network_state_handler.cc +++ b/chromeos/network/network_state_handler.cc
@@ -999,7 +999,7 @@ technologies.push_back(new std::string(shill::kTypeVPN)); CHECK_GT(technologies.size(), 0ul); - return technologies.Pass(); + return technologies; } } // namespace chromeos
diff --git a/chromeos/network/network_state_unittest.cc b/chromeos/network/network_state_unittest.cc index 0d48cdc..25684ae 100644 --- a/chromeos/network/network_state_unittest.cc +++ b/chromeos/network/network_state_unittest.cc
@@ -5,6 +5,7 @@ #include "chromeos/network/network_state.h" #include <stdint.h> +#include <utility> #include "base/i18n/streaming_utf8_validator.h" #include "base/macros.h" @@ -228,7 +229,7 @@ shill::kProviderThirdPartyVpn); provider->SetStringWithoutPathExpansion( shill::kHostProperty, "third-party-vpn-provider-extension-id"); - EXPECT_TRUE(SetProperty(shill::kProviderProperty, provider.Pass())); + EXPECT_TRUE(SetProperty(shill::kProviderProperty, std::move(provider))); SignalInitialPropertiesReceived(); EXPECT_EQ(network_state_.vpn_provider_type(), shill::kProviderThirdPartyVpn); EXPECT_EQ(network_state_.third_party_vpn_provider_extension_id(),
diff --git a/chromeos/network/network_ui_data.cc b/chromeos/network/network_ui_data.cc index 614dc40..4406a71 100644 --- a/chromeos/network/network_ui_data.cc +++ b/chromeos/network/network_ui_data.cc
@@ -4,6 +4,8 @@ #include "chromeos/network/network_ui_data.h" +#include <utility> + #include "base/logging.h" #include "base/values.h" @@ -88,7 +90,7 @@ } void NetworkUIData::set_user_settings(scoped_ptr<base::DictionaryValue> dict) { - user_settings_ = dict.Pass(); + user_settings_ = std::move(dict); } std::string NetworkUIData::GetONCSourceAsString() const { @@ -114,7 +116,7 @@ ui_data->onc_source_ = onc_source; - return ui_data.Pass(); + return ui_data; } } // namespace chromeos
diff --git a/chromeos/network/network_util.cc b/chromeos/network/network_util.cc index a0f8181..ebaef513 100644 --- a/chromeos/network/network_util.cc +++ b/chromeos/network/network_util.cc
@@ -183,7 +183,7 @@ scoped_ptr<base::DictionaryValue> onc_dictionary = TranslateShillServiceToONCPart(*shill_dictionary, onc_source, &onc::kNetworkWithStateSignature, network); - return onc_dictionary.Pass(); + return onc_dictionary; } scoped_ptr<base::ListValue> TranslateNetworkListToONC( @@ -201,7 +201,7 @@ TranslateNetworkStateToONC(state); network_properties_list->Append(onc_dictionary.release()); } - return network_properties_list.Pass(); + return network_properties_list; } std::string TranslateONCTypeToShill(const std::string& onc_type) {
diff --git a/chromeos/network/onc/onc_mapper.cc b/chromeos/network/onc/onc_mapper.cc index 83c0e258..c580f75e 100644 --- a/chromeos/network/onc/onc_mapper.cc +++ b/chromeos/network/onc/onc_mapper.cc
@@ -40,7 +40,7 @@ } } - return result_value.Pass(); + return result_value; } scoped_ptr<base::DictionaryValue> Mapper::MapObject( @@ -53,7 +53,7 @@ MapFields(signature, onc_object, &found_unknown_field, error, result.get()); if (found_unknown_field) *error = true; - return result.Pass(); + return result; } scoped_ptr<base::Value> Mapper::MapPrimitive(const OncValueSignature& signature, @@ -129,7 +129,7 @@ else DCHECK(*nested_error); } - return result_array.Pass(); + return result_array; } scoped_ptr<base::Value> Mapper::MapEntry(int index,
diff --git a/chromeos/network/onc/onc_merger.cc b/chromeos/network/onc/onc_merger.cc index 1662920116..dab1d2db 100644 --- a/chromeos/network/onc/onc_merger.cc +++ b/chromeos/network/onc/onc_merger.cc
@@ -6,6 +6,7 @@ #include <set> #include <string> +#include <utility> #include <vector> #include "base/logging.h" @@ -77,7 +78,7 @@ result_editable->SetWithoutPathExpansion( it.key(), GetEditableFlags(*child_policy).release()); } - return result_editable.Pass(); + return result_editable; } // This is the base class for merging a list of DictionaryValues in @@ -123,7 +124,7 @@ } DictionaryPtr merged_dict(MergeNestedDictionaries(key, nested_dicts)); if (!merged_dict->empty()) - merged_value = merged_dict.Pass(); + merged_value = std::move(merged_dict); } else { std::vector<const base::Value*> values; for (DictPtrs::const_iterator it_inner = dicts.begin(); @@ -140,7 +141,7 @@ result->SetWithoutPathExpansion(key, merged_value.release()); } } - return result.Pass(); + return result; } protected: @@ -397,7 +398,7 @@ << "Values do not match: " << key << " Effective: " << *effective_value; // Return the un-augmented field. - return effective_value.Pass(); + return effective_value; } if (values.active_setting) { // Unmanaged networks have assigned (active) values. @@ -454,7 +455,7 @@ } if (augmented_value->empty()) augmented_value.reset(); - return augmented_value.Pass(); + return std::move(augmented_value); } // MergeListOfDictionaries override. @@ -475,7 +476,7 @@ } else { result = MergeToEffective::MergeNestedDictionaries(key, dicts); } - return result.Pass(); + return result; } private:
diff --git a/chromeos/network/onc/onc_normalizer.cc b/chromeos/network/onc/onc_normalizer.cc index c38c3908..327d597 100644 --- a/chromeos/network/onc/onc_normalizer.cc +++ b/chromeos/network/onc/onc_normalizer.cc
@@ -30,7 +30,7 @@ scoped_ptr<base::DictionaryValue> result = MapObject(*object_signature, onc_object, &error); DCHECK(!error); - return result.Pass(); + return result; } scoped_ptr<base::DictionaryValue> Normalizer::MapObject( @@ -65,7 +65,7 @@ else if (&signature == &kWiFiSignature) NormalizeWiFi(normalized.get()); - return normalized.Pass(); + return normalized; } namespace {
diff --git a/chromeos/network/onc/onc_test_utils.cc b/chromeos/network/onc/onc_test_utils.cc index 7afc0d89..6a5c84e0 100644 --- a/chromeos/network/onc/onc_test_utils.cc +++ b/chromeos/network/onc/onc_test_utils.cc
@@ -4,6 +4,8 @@ #include "chromeos/network/onc/onc_test_utils.h" +#include <utility> + #include "base/files/file_path.h" #include "base/files/file_util.h" #include "base/json/json_file_value_serializer.h" @@ -57,7 +59,7 @@ CHECK(content != NULL) << "Couldn't json-deserialize file '" << filename << "': " << error_message; - dict = base::DictionaryValue::From(content.Pass()); + dict = base::DictionaryValue::From(std::move(content)); CHECK(dict) << "File '" << filename << "' does not contain a dictionary as expected, but type " << content->GetType();
diff --git a/chromeos/network/onc/onc_translator_onc_to_shill.cc b/chromeos/network/onc/onc_translator_onc_to_shill.cc index 6ce1eab..682688a 100644 --- a/chromeos/network/onc/onc_translator_onc_to_shill.cc +++ b/chromeos/network/onc/onc_translator_onc_to_shill.cc
@@ -8,9 +8,8 @@ // - The local translation of an object depending on the associated signature // see LocalTranslator::TranslateFields -#include "chromeos/network/onc/onc_translator.h" - #include <string> +#include <utility> #include "base/json/json_reader.h" #include "base/json/json_writer.h" @@ -20,6 +19,7 @@ #include "base/values.h" #include "chromeos/network/onc/onc_signature.h" #include "chromeos/network/onc/onc_translation_tables.h" +#include "chromeos/network/onc/onc_translator.h" #include "chromeos/network/onc/onc_utils.h" #include "chromeos/network/shill_property_util.h" #include "components/onc/onc_constants.h" @@ -175,7 +175,7 @@ // Shill wants all Provider/VPN fields to be strings. translated = ConvertValueToString(it.value()); } - AddValueAccordingToSignature(it.key(), translated.Pass()); + AddValueAccordingToSignature(it.key(), std::move(translated)); } } @@ -421,7 +421,7 @@ CHECK(onc_signature != NULL); scoped_ptr<base::DictionaryValue> shill_dictionary(new base::DictionaryValue); TranslateONCHierarchy(*onc_signature, onc_object, shill_dictionary.get()); - return shill_dictionary.Pass(); + return shill_dictionary; } } // namespace onc
diff --git a/chromeos/network/onc/onc_translator_shill_to_onc.cc b/chromeos/network/onc/onc_translator_shill_to_onc.cc index 62aa868..a5a5b9b 100644 --- a/chromeos/network/onc/onc_translator_shill_to_onc.cc +++ b/chromeos/network/onc/onc_translator_shill_to_onc.cc
@@ -2,9 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chromeos/network/onc/onc_translator.h" - #include <string> +#include <utility> #include "base/json/json_reader.h" #include "base/json/json_writer.h" @@ -17,6 +16,7 @@ #include "chromeos/network/network_util.h" #include "chromeos/network/onc/onc_signature.h" #include "chromeos/network/onc/onc_translation_tables.h" +#include "chromeos/network/onc/onc_translator.h" #include "chromeos/network/onc/onc_utils.h" #include "chromeos/network/shill_property_util.h" #include "components/onc/onc_constants.h" @@ -183,7 +183,7 @@ } else { CopyPropertiesAccordingToSignature(); } - return onc_object_.Pass(); + return std::move(onc_object_); } void ShillToONCTranslator::TranslateEthernet() {
diff --git a/chromeos/network/onc/onc_utils.cc b/chromeos/network/onc/onc_utils.cc index 55f5091..cb2ea8b 100644 --- a/chromeos/network/onc/onc_utils.cc +++ b/chromeos/network/onc/onc_utils.cc
@@ -163,7 +163,7 @@ return nullptr; } - return new_root.Pass(); + return new_root; } std::string GetSourceAsString(ONCSource source) { @@ -912,7 +912,7 @@ } else { NOTREACHED(); } - return proxy_dict.Pass(); + return proxy_dict; } scoped_ptr<base::DictionaryValue> ConvertProxyConfigToOncProxySettings( @@ -985,7 +985,7 @@ return nullptr; } } - return proxy_settings.Pass(); + return proxy_settings; } } // namespace onc
diff --git a/chromeos/network/onc/onc_validator.cc b/chromeos/network/onc/onc_validator.cc index 12c602f..a7d3342 100644 --- a/chromeos/network/onc/onc_validator.cc +++ b/chromeos/network/onc/onc_validator.cc
@@ -96,7 +96,7 @@ Mapper::MapValue(signature, onc_value, error); if (repaired) CHECK_EQ(repaired->GetType(), signature.onc_type); - return repaired.Pass(); + return repaired; } scoped_ptr<base::DictionaryValue> Validator::MapObject( @@ -145,7 +145,7 @@ } if (valid) { - return repaired.Pass(); + return repaired; } else { DCHECK(error_or_warning_found_); error_or_warning_found_ = *error = true; @@ -177,7 +177,7 @@ LOG(WARNING) << message; } - return result.Pass(); + return result; } scoped_ptr<base::ListValue> Validator::MapArray( @@ -195,7 +195,7 @@ &array_signature != &kCertificateListSignature) { *nested_error = nested_error_in_current_array; } - return result.Pass(); + return result; } scoped_ptr<base::Value> Validator::MapEntry(int index, @@ -208,7 +208,7 @@ Mapper::MapEntry(index, signature, onc_value, error); DCHECK_EQ(str, path_.back()); path_.pop_back(); - return result.Pass(); + return result; } bool Validator::ValidateObjectDefault(const OncValueSignature& signature,
diff --git a/chromeos/network/onc/onc_validator_unittest.cc b/chromeos/network/onc/onc_validator_unittest.cc index 7fc6a26..a9725b9 100644 --- a/chromeos/network/onc/onc_validator_unittest.cc +++ b/chromeos/network/onc/onc_validator_unittest.cc
@@ -40,7 +40,7 @@ validator.reset(new Validator(false, false, false, managed_onc)); } validator->SetOncSource(onc_source); - original_object_ = onc_object.Pass(); + original_object_ = std::move(onc_object); repaired_object_ = validator->ValidateAndRepairObject(signature, *original_object_, &validation_result_);
diff --git a/chromeos/network/policy_util.cc b/chromeos/network/policy_util.cc index 7c2d0de..2467419 100644 --- a/chromeos/network/policy_util.cc +++ b/chromeos/network/policy_util.cc
@@ -4,6 +4,8 @@ #include "chromeos/network/policy_util.h" +#include <utility> + #include "base/logging.h" #include "base/values.h" #include "chromeos/network/network_profile.h" @@ -264,7 +266,7 @@ } } - return augmented_onc_network.Pass(); + return augmented_onc_network; } void SetShillPropertiesForGlobalPolicy( @@ -387,14 +389,14 @@ onc::MaskCredentialsInOncObject(onc::kNetworkConfigurationSignature, *user_settings, kFakeCredential)); - ui_data->set_user_settings(sanitized_user_settings.Pass()); + ui_data->set_user_settings(std::move(sanitized_user_settings)); } shill_property_util::SetUIData(*ui_data, shill_dictionary.get()); VLOG(2) << "Created Shill properties: " << *shill_dictionary; - return shill_dictionary.Pass(); + return shill_dictionary; } const base::DictionaryValue* FindMatchingPolicy(
diff --git a/chromeos/network/prohibited_technologies_handler_unittest.cc b/chromeos/network/prohibited_technologies_handler_unittest.cc index 931e727..78983d1 100644 --- a/chromeos/network/prohibited_technologies_handler_unittest.cc +++ b/chromeos/network/prohibited_technologies_handler_unittest.cc
@@ -5,6 +5,7 @@ #include "chromeos/network/prohibited_technologies_handler.h" #include <string> +#include <utility> #include "base/bind.h" #include "base/callback.h" @@ -77,11 +78,12 @@ void PreparePolicies() { scoped_ptr<base::ListValue> val(new base::ListValue()); val->AppendString("WiFi"); - global_config_disable_wifi.Set("DisableNetworkTypes", val.Pass()); + global_config_disable_wifi.Set("DisableNetworkTypes", std::move(val)); val.reset(new base::ListValue()); val->AppendString("WiFi"); val->AppendString("Cellular"); - global_config_disable_wifi_and_cell.Set("DisableNetworkTypes", val.Pass()); + global_config_disable_wifi_and_cell.Set("DisableNetworkTypes", + std::move(val)); } void TearDown() override {
diff --git a/chromeos/network/shill_property_util.cc b/chromeos/network/shill_property_util.cc index e47c7ad4..5020ae9 100644 --- a/chromeos/network/shill_property_util.cc +++ b/chromeos/network/shill_property_util.cc
@@ -215,7 +215,7 @@ scoped_ptr<NetworkUIData> ui_data = GetUIDataFromValue(*ui_data_value); if (!ui_data) LOG(ERROR) << "UIData is not a valid JSON dictionary."; - return ui_data.Pass(); + return ui_data; } void SetUIData(const NetworkUIData& ui_data,
diff --git a/chromeos/system/statistics_provider.cc b/chromeos/system/statistics_provider.cc index afa67ded..7d33b04 100644 --- a/chromeos/system/statistics_provider.cc +++ b/chromeos/system/statistics_provider.cc
@@ -218,8 +218,7 @@ const base::DictionaryValue* GetRegionDictionary() const; // Returns extractor from regional_data_extractors_ or nullptr. - const RegionDataExtractor GetRegionalDataExtractor( - const std::string& name) const; + RegionDataExtractor GetRegionalDataExtractor(const std::string& name) const; bool load_statistics_started_; NameValuePairsParser::NameValueMap machine_info_; @@ -272,7 +271,7 @@ return region_dict; } -const StatisticsProviderImpl::RegionDataExtractor +StatisticsProviderImpl::RegionDataExtractor StatisticsProviderImpl::GetRegionalDataExtractor( const std::string& name) const { const auto it = regional_data_extractors_.find(name);
diff --git a/chromeos/timezone/timezone_provider.cc b/chromeos/timezone/timezone_provider.cc index 08e10e5..591e9f00 100644 --- a/chromeos/timezone/timezone_provider.cc +++ b/chromeos/timezone/timezone_provider.cc
@@ -6,6 +6,7 @@ #include <algorithm> #include <iterator> +#include <utility> #include "base/bind.h" #include "base/logging.h" @@ -55,7 +56,7 @@ requests_.resize(requests_.size() - 1); } - callback.Run(timezone.Pass(), server_error); + callback.Run(std::move(timezone), server_error); } } // namespace chromeos
diff --git a/chromeos/timezone/timezone_request.cc b/chromeos/timezone/timezone_request.cc index 4d787bd..46c0a9b 100644 --- a/chromeos/timezone/timezone_request.cc +++ b/chromeos/timezone/timezone_request.cc
@@ -5,8 +5,8 @@ #include "chromeos/timezone/timezone_request.h" #include <stddef.h> - #include <string> +#include <utility> #include "base/json/json_reader.h" #include "base/metrics/histogram.h" @@ -275,21 +275,21 @@ if (!http_success) { PrintTimeZoneError(server_url, "No response received", timezone.get()); RecordUmaEvent(TIMEZONE_REQUEST_EVENT_RESPONSE_EMPTY); - return timezone.Pass(); + return timezone; } if (status_code != net::HTTP_OK) { std::string message = "Returned error code "; message += base::IntToString(status_code); PrintTimeZoneError(server_url, message, timezone.get()); RecordUmaEvent(TIMEZONE_REQUEST_EVENT_RESPONSE_NOT_OK); - return timezone.Pass(); + return timezone; } if (!ParseServerResponse(server_url, response_body, timezone.get())) - return timezone.Pass(); + return timezone; RecordUmaEvent(TIMEZONE_REQUEST_EVENT_RESPONSE_SUCCESS); - return timezone.Pass(); + return timezone; } } // namespace @@ -400,7 +400,7 @@ // callback.Run() usually destroys TimeZoneRequest, because this is the way // callback is implemented in TimeZoneProvider. - callback.Run(timezone.Pass(), server_error); + callback.Run(std::move(timezone), server_error); // "this" is already destroyed here. }
diff --git a/chromeos/timezone/timezone_unittest.cc b/chromeos/timezone/timezone_unittest.cc index 37c608c8..b26ae54 100644 --- a/chromeos/timezone/timezone_unittest.cc +++ b/chromeos/timezone/timezone_unittest.cc
@@ -3,6 +3,7 @@ // found in the LICENSE file. #include <stddef.h> +#include <utility> #include "base/macros.h" #include "base/message_loop/message_loop.h" @@ -118,7 +119,7 @@ new net::HttpResponseHeaders(std::string()); download_headers->AddHeader("Content-Type: application/json"); fetcher->set_response_headers(download_headers); - return fetcher.Pass(); + return fetcher; } void Initialize(net::FakeURLFetcherFactory* factory) { @@ -177,7 +178,7 @@ void OnRequestDone(scoped_ptr<TimeZoneResponseData> timezone, bool server_error) { - timezone_ = timezone.Pass(); + timezone_ = std::move(timezone); server_error_ = server_error; message_loop_runner_->Quit();
diff --git a/chromeos/tools/onc_validator/onc_validator.cc b/chromeos/tools/onc_validator/onc_validator.cc index e80d612..c825103 100644 --- a/chromeos/tools/onc_validator/onc_validator.cc +++ b/chromeos/tools/onc_validator/onc_validator.cc
@@ -3,9 +3,9 @@ // found in the LICENSE file. #include <stddef.h> - #include <cstdio> #include <iostream> +#include <utility> #include "base/command_line.h" #include "base/files/file_path.h" @@ -100,7 +100,7 @@ } scoped_ptr<base::DictionaryValue> dict = - base::DictionaryValue::From(value.Pass()); + base::DictionaryValue::From(std::move(value)); if (!dict) { LOG(ERROR) << "File '" << filename << "' does not contain a dictionary as expected, but type "
diff --git a/components/autofill/core/browser/autofill_cc_infobar_delegate.cc b/components/autofill/core/browser/autofill_cc_infobar_delegate.cc index 69f2955d..97703b2 100644 --- a/components/autofill/core/browser/autofill_cc_infobar_delegate.cc +++ b/components/autofill/core/browser/autofill_cc_infobar_delegate.cc
@@ -60,6 +60,11 @@ had_user_interaction_ = true; } +infobars::InfoBarDelegate::InfoBarIdentifier +AutofillCCInfoBarDelegate::GetIdentifier() const { + return AUTOFILL_CC_INFOBAR_DELEGATE; +} + infobars::InfoBarDelegate::Type AutofillCCInfoBarDelegate::GetInfoBarType() const { return PAGE_ACTION_TYPE;
diff --git a/components/autofill/core/browser/autofill_cc_infobar_delegate.h b/components/autofill/core/browser/autofill_cc_infobar_delegate.h index 55c6de0..8e50a05 100644 --- a/components/autofill/core/browser/autofill_cc_infobar_delegate.h +++ b/components/autofill/core/browser/autofill_cc_infobar_delegate.h
@@ -48,6 +48,7 @@ // ConfirmInfoBarDelegate: Type GetInfoBarType() const override; + infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override; int GetIconId() const override; gfx::VectorIconId GetVectorIconId() const override; bool ShouldExpire(const NavigationDetails& details) const override;
diff --git a/components/autofill/core/browser/autofill_external_delegate_unittest.cc b/components/autofill/core/browser/autofill_external_delegate_unittest.cc index ee4db91..9897db4 100644 --- a/components/autofill/core/browser/autofill_external_delegate_unittest.cc +++ b/components/autofill/core/browser/autofill_external_delegate_unittest.cc
@@ -329,7 +329,6 @@ autofill_item.push_back(Suggestion()); autofill_item[0].value = ASCIIToUTF16("Rick"); autofill_item[0].frontend_id = kAutofillProfileId; - ; external_delegate_->OnSuggestionsReturned(kQueryId, autofill_item); }
diff --git a/components/crash/content/app/breakpad_linux.cc b/components/crash/content/app/breakpad_linux.cc index 07700791..fa9f620 100644 --- a/components/crash/content/app/breakpad_linux.cc +++ b/components/crash/content/app/breakpad_linux.cc
@@ -76,7 +76,7 @@ // where we either a) know the call cannot fail, or b) there is nothing we // can do when a call fails, we mark the return code as ignored. This avoids // spurious compiler warnings. -#define IGNORE_RET(x) do { if (x); } while (0) +#define IGNORE_RET(x) ignore_result(x) using crash_reporter::GetCrashReporterClient; using google_breakpad::ExceptionHandler;
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_tamper_detection_unittest.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_tamper_detection_unittest.cc index 636e7e12..ea8bd2d 100644 --- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_tamper_detection_unittest.cc +++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_tamper_detection_unittest.cc
@@ -40,8 +40,9 @@ base::MD5Digest digest; base::MD5Sum(input.c_str(), input.size(), &digest); std::string base64encoded; - base::Base64Encode(std::string((char*)digest.a, arraysize(digest.a)), - &base64encoded); + base::Base64Encode( + std::string(reinterpret_cast<char*>(digest.a), arraysize(digest.a)), + &base64encoded); return base64encoded; } @@ -98,9 +99,7 @@ namespace data_reduction_proxy { -class DataReductionProxyTamperDetectionTest : public testing::Test { - -}; +using DataReductionProxyTamperDetectionTest = testing::Test; // Tests function ValidateChromeProxyHeader. TEST_F(DataReductionProxyTamperDetectionTest, ChromeProxy) { @@ -709,7 +708,6 @@ int original_content_length; int content_length; int compression_ratio; - ; } tests[] = { // Checks the correctness of histogram for Video {"HTTP/1.1 200 OK\n" @@ -847,4 +845,4 @@ } } -} // namespace +} // namespace data_reduction_proxy
diff --git a/components/drive/change_list_loader_unittest.cc b/components/drive/change_list_loader_unittest.cc index 4a34775..cef19aef 100644 --- a/components/drive/change_list_loader_unittest.cc +++ b/components/drive/change_list_loader_unittest.cc
@@ -127,7 +127,7 @@ google_apis::test_util::CreateCopyResultCallback(&error, &entry)); base::RunLoop().RunUntilIdle(); EXPECT_EQ(google_apis::HTTP_CREATED, error); - return entry.Pass(); + return entry; } content::TestBrowserThreadBundle thread_bundle_;
diff --git a/components/drive/change_list_processor_unittest.cc b/components/drive/change_list_processor_unittest.cc index 9a8473f..1d1f73e 100644 --- a/components/drive/change_list_processor_unittest.cc +++ b/components/drive/change_list_processor_unittest.cc
@@ -6,6 +6,7 @@ #include <stddef.h> #include <stdint.h> +#include <utility> #include "base/files/scoped_temp_dir.h" #include "base/macros.h" @@ -98,7 +99,7 @@ change_lists[0]->mutable_parent_resource_ids()->push_back(""); change_lists[0]->set_largest_changestamp(kBaseResourceListChangestamp); - return change_lists.Pass(); + return change_lists; } class ChangeListProcessorTest : public testing::Test { @@ -132,8 +133,7 @@ about_resource->set_root_folder_id(kRootId); ChangeListProcessor processor(metadata_.get(), nullptr); - return processor.Apply(about_resource.Pass(), - changes.Pass(), + return processor.Apply(std::move(about_resource), std::move(changes), false /* is_delta_update */); } @@ -147,9 +147,9 @@ about_resource->set_root_folder_id(kRootId); ChangeListProcessor processor(metadata_.get(), nullptr); - FileError error = processor.Apply(about_resource.Pass(), - changes.Pass(), - true /* is_delta_update */); + FileError error = + processor.Apply(std::move(about_resource), std::move(changes), + true /* is_delta_update */); *changed_files = processor.changed_files(); return error; } @@ -162,7 +162,7 @@ base::FilePath::FromUTF8Unsafe(path), entry.get()); if (error != FILE_ERROR_OK) entry.reset(); - return entry.Pass(); + return entry; } content::TestBrowserThreadBundle thread_bundle_; @@ -246,7 +246,7 @@ FileChange changed_files; EXPECT_EQ(FILE_ERROR_OK, - ApplyChangeList(change_lists.Pass(), &changed_files)); + ApplyChangeList(std::move(change_lists), &changed_files)); int64_t changestamp = 0; EXPECT_EQ(FILE_ERROR_OK, metadata_->GetLargestChangestamp(&changestamp)); @@ -281,7 +281,7 @@ FileChange changed_files; EXPECT_EQ(FILE_ERROR_OK, - ApplyChangeList(change_lists.Pass(), &changed_files)); + ApplyChangeList(std::move(change_lists), &changed_files)); int64_t changestamp = 0; EXPECT_EQ(FILE_ERROR_OK, metadata_->GetLargestChangestamp(&changestamp)); @@ -317,7 +317,7 @@ EXPECT_EQ(FILE_ERROR_OK, ApplyFullResourceList(CreateBaseChangeList())); FileChange changed_files; EXPECT_EQ(FILE_ERROR_OK, - ApplyChangeList(change_lists.Pass(), &changed_files)); + ApplyChangeList(std::move(change_lists), &changed_files)); int64_t changestamp = 0; EXPECT_EQ(FILE_ERROR_OK, metadata_->GetLargestChangestamp(&changestamp)); @@ -350,7 +350,7 @@ EXPECT_EQ(FILE_ERROR_OK, ApplyFullResourceList(CreateBaseChangeList())); FileChange changed_files; EXPECT_EQ(FILE_ERROR_OK, - ApplyChangeList(change_lists.Pass(), &changed_files)); + ApplyChangeList(std::move(change_lists), &changed_files)); EXPECT_EQ(2U, changed_files.size()); EXPECT_TRUE(changed_files.count(base::FilePath::FromUTF8Unsafe( "drive/root/Directory 1/SubDirectory File 1.txt"))); @@ -389,7 +389,7 @@ EXPECT_EQ(FILE_ERROR_OK, ApplyFullResourceList(CreateBaseChangeList())); FileChange changed_files; EXPECT_EQ(FILE_ERROR_OK, - ApplyChangeList(change_lists.Pass(), &changed_files)); + ApplyChangeList(std::move(change_lists), &changed_files)); int64_t changestamp = 0; EXPECT_EQ(FILE_ERROR_OK, metadata_->GetLargestChangestamp(&changestamp)); @@ -410,7 +410,7 @@ // Apply. EXPECT_EQ(FILE_ERROR_OK, - ApplyChangeList(change_lists.Pass(), &changed_files)); + ApplyChangeList(std::move(change_lists), &changed_files)); EXPECT_EQ(FILE_ERROR_OK, metadata_->GetLargestChangestamp(&changestamp)); EXPECT_EQ(16687, changestamp); EXPECT_FALSE(GetResourceEntry("drive/root/Added file.txt")); @@ -438,7 +438,7 @@ EXPECT_EQ(FILE_ERROR_OK, ApplyFullResourceList(CreateBaseChangeList())); FileChange changed_files; EXPECT_EQ(FILE_ERROR_OK, - ApplyChangeList(change_lists.Pass(), &changed_files)); + ApplyChangeList(std::move(change_lists), &changed_files)); int64_t changestamp = 0; EXPECT_EQ(FILE_ERROR_OK, metadata_->GetLargestChangestamp(&changestamp)); EXPECT_EQ(16730, changestamp); @@ -460,7 +460,7 @@ // Apply. EXPECT_EQ(FILE_ERROR_OK, - ApplyChangeList(change_lists.Pass(), &changed_files)); + ApplyChangeList(std::move(change_lists), &changed_files)); EXPECT_EQ(FILE_ERROR_OK, metadata_->GetLargestChangestamp(&changestamp)); EXPECT_EQ(16770, changestamp); EXPECT_FALSE(GetResourceEntry("drive/root/Directory 1/Added file.txt")); @@ -500,7 +500,7 @@ EXPECT_EQ(FILE_ERROR_OK, ApplyFullResourceList(CreateBaseChangeList())); FileChange changed_files; EXPECT_EQ(FILE_ERROR_OK, - ApplyChangeList(change_lists.Pass(), &changed_files)); + ApplyChangeList(std::move(change_lists), &changed_files)); int64_t changestamp = 0; EXPECT_EQ(FILE_ERROR_OK, metadata_->GetLargestChangestamp(&changestamp)); @@ -538,11 +538,11 @@ util::GetDriveMyDriveRootPath(), &root)); const int64_t kNewChangestamp = 12345; ResourceEntryVector refreshed_entries; - EXPECT_EQ(FILE_ERROR_OK, ChangeListProcessor::RefreshDirectory( - metadata_.get(), - DirectoryFetchInfo(root.local_id(), kRootId, kNewChangestamp), - change_list.Pass(), - &refreshed_entries)); + EXPECT_EQ(FILE_ERROR_OK, + ChangeListProcessor::RefreshDirectory( + metadata_.get(), + DirectoryFetchInfo(root.local_id(), kRootId, kNewChangestamp), + std::move(change_list), &refreshed_entries)); // "new_file" should be added. ResourceEntry entry; @@ -575,11 +575,11 @@ util::GetDriveMyDriveRootPath(), &root)); const int64_t kNewChangestamp = 12345; ResourceEntryVector refreshed_entries; - EXPECT_EQ(FILE_ERROR_OK, ChangeListProcessor::RefreshDirectory( - metadata_.get(), - DirectoryFetchInfo(root.local_id(), kRootId, kNewChangestamp), - change_list.Pass(), - &refreshed_entries)); + EXPECT_EQ(FILE_ERROR_OK, + ChangeListProcessor::RefreshDirectory( + metadata_.get(), + DirectoryFetchInfo(root.local_id(), kRootId, kNewChangestamp), + std::move(change_list), &refreshed_entries)); // "new_file" should not be added. ResourceEntry entry; @@ -605,7 +605,7 @@ FileChange changed_files; EXPECT_EQ(FILE_ERROR_OK, - ApplyChangeList(change_lists.Pass(), &changed_files)); + ApplyChangeList(std::move(change_lists), &changed_files)); // "new_file" should be added under drive/other. ResourceEntry entry; @@ -650,7 +650,7 @@ // Apply the change. FileChange changed_files; EXPECT_EQ(FILE_ERROR_OK, - ApplyChangeList(change_lists.Pass(), &changed_files)); + ApplyChangeList(std::move(change_lists), &changed_files)); // The change is rejected due to the old modification date. ResourceEntry entry;
diff --git a/components/drive/directory_loader_unittest.cc b/components/drive/directory_loader_unittest.cc index 7f559c0..810a3db 100644 --- a/components/drive/directory_loader_unittest.cc +++ b/components/drive/directory_loader_unittest.cc
@@ -122,7 +122,7 @@ google_apis::test_util::CreateCopyResultCallback(&error, &entry)); base::RunLoop().RunUntilIdle(); EXPECT_EQ(google_apis::HTTP_CREATED, error); - return entry.Pass(); + return entry; } content::TestBrowserThreadBundle thread_bundle_;
diff --git a/components/drive/file_system_unittest.cc b/components/drive/file_system_unittest.cc index b43cf82..354c3e4 100644 --- a/components/drive/file_system_unittest.cc +++ b/components/drive/file_system_unittest.cc
@@ -178,7 +178,7 @@ google_apis::test_util::CreateCopyResultCallback(&error, &entry)); content::RunAllBlockingPoolTasksUntilIdle(); - return entry.Pass(); + return entry; } // Gets directory info by path synchronously. @@ -193,7 +193,7 @@ content::RunAllBlockingPoolTasksUntilIdle(); if (error != FILE_ERROR_OK) entries.reset(); - return entries.Pass(); + return entries; } // Used to implement ReadDirectorySync().
diff --git a/components/gcm_driver/gcm_driver_desktop.cc b/components/gcm_driver/gcm_driver_desktop.cc index dbb6dba..b967fea 100644 --- a/components/gcm_driver/gcm_driver_desktop.cc +++ b/components/gcm_driver/gcm_driver_desktop.cc
@@ -480,7 +480,7 @@ else timer.reset(new base::Timer(true, false)); - gcm_client_->UpdateHeartbeatTimer(timer.Pass()); + gcm_client_->UpdateHeartbeatTimer(std::move(timer)); #endif }
diff --git a/components/history/core/browser/android/android_history_types.h b/components/history/core/browser/android/android_history_types.h index 41fad30..50cc5450 100644 --- a/components/history/core/browser/android/android_history_types.h +++ b/components/history/core/browser/android/android_history_types.h
@@ -127,7 +127,7 @@ set_value_explicitly(PARENT_ID); parent_id_ = parent_id; } - const int64_t parent_id() const { return parent_id_; } + int64_t parent_id() const { return parent_id_; } // The internal URLID void set_url_id(URLID url_id) {
diff --git a/components/infobars/core/infobar_container.cc b/components/infobars/core/infobar_container.cc index 90ba064..9176dcd 100644 --- a/components/infobars/core/infobar_container.cc +++ b/components/infobars/core/infobar_container.cc
@@ -8,6 +8,9 @@ #include "base/auto_reset.h" #include "base/logging.h" +#include "base/metrics/histogram_base.h" +#include "base/metrics/metrics_hashes.h" +#include "base/metrics/sparse_histogram.h" #include "build/build_config.h" #include "components/infobars/core/infobar.h" #include "components/infobars/core/infobar_delegate.h" @@ -152,6 +155,11 @@ PlatformSpecificAddInfoBar(infobar, position); infobar->set_container(this); infobar->Show(animate); + + // Record the infobar being displayed. + DCHECK_NE(InfoBarDelegate::INVALID, infobar->delegate()->GetIdentifier()); + UMA_HISTOGRAM_SPARSE_SLOWLY("InfoBar.Shown", + infobar->delegate()->GetIdentifier()); } } // namespace infobars
diff --git a/components/infobars/core/infobar_delegate.h b/components/infobars/core/infobar_delegate.h index 7508de8..3ba72ef 100644 --- a/components/infobars/core/infobar_delegate.h +++ b/components/infobars/core/infobar_delegate.h
@@ -60,6 +60,65 @@ UNKNOWN_INFOBAR, }; + // Unique identifier for every InfoBarDelegate subclass. + // KEEP IN SYNC WITH THE InfoBarIdentifier ENUM IN histograms.xml. + // NEW VALUES MUST BE APPENDED AND AVOID CHANGING ANY PRE-EXISTING VALUES. + enum InfoBarIdentifier { + INVALID = -1, + TEST_INFOBAR = 0, + APP_BANNER_INFOBAR_DELEGATE_ANDROID = 1, + APP_BANNER_INFOBAR_DELEGATE_DESKTOP = 2, + ANDROID_DOWNLOAD_MANAGER_OVERWRITE_INFOBAR_DELEGATE = 3, + CHROME_DOWNLOAD_MANAGER_OVERWRITE_INFOBAR_DELEGATE = 4, + DOWNLOAD_REQUEST_INFOBAR_DELEGATE_ANDROID = 5, + FULLSCREEN_INFOBAR_DELEGATE = 6, + HUNG_PLUGIN_INFOBAR_DELEGATE = 7, + HUNG_RENDERER_INFOBAR_DELEGATE = 8, + MEDIA_STREAM_INFOBAR_DELEGATE_ANDROID = 9, + MEDIA_THROTTLE_INFOBAR_DELEGATE = 10, + REQUEST_QUOTA_INFOBAR_DELEGATE = 11, + DEV_TOOLS_CONFIRM_INFOBAR_DELEGATE = 12, + EXTENSION_DEV_TOOLS_INFOBAR_DELEGATE = 13, + INCOGNITO_CONNECTABILITY_INFOBAR_DELEGATE = 14, + THEME_INSTALLED_INFOBAR_DELEGATE = 15, + GEOLOCATION_INFOBAR_DELEGATE_ANDROID = 16, + THREE_D_API_INFOBAR_DELEGATE = 17, + INSECURE_CONTENT_INFOBAR_DELEGATE = 18, + MIDI_PERMISSION_INFOBAR_DELEGATE_ANDROID = 19, + PROTECTED_MEDIA_IDENTIFIER_INFOBAR_DELEGATE_ANDROID = 20, + NACL_INFOBAR_DELEGATE = 21, + DATA_REDUCTION_PROXY_INFOBAR_DELEGATE_ANDROID = 22, + NOTIFICATION_PERMISSION_INFOBAR_DELEGATE = 23, + AUTO_SIGNIN_FIRST_RUN_INFOBAR_DELEGATE = 24, + GENERATED_PASSWORD_SAVED_INFOBAR_DELEGATE_ANDROID = 25, + SAVE_PASSWORD_INFOBAR_DELEGATE = 26, + PEPPER_BROKER_INFOBAR_DELEGATE = 27, + PERMISSION_UPDATE_INFOBAR_DELEGATE = 28, + DURABLE_STORAGE_PERMISSION_INFOBAR_DELEGATE_ANDROID = 29, + NPAPI_REMOVAL_INFOBAR_DELEGATE = 30, + OUTDATED_PLUGIN_INFOBAR_DELEGATE = 31, + PLUGIN_METRO_MODE_INFOBAR_DELEGATE = 32, + RELOAD_PLUGIN_INFOBAR_DELEGATE = 33, + PLUGIN_OBSERVER = 34, + SSL_ADD_CERTIFICATE = 35, + SSL_ADD_CERTIFICATE_INFOBAR_DELEGATE = 36, + POPUP_BLOCKED_INFOBAR_DELEGATE = 37, + CHROME_SELECT_FILE_POLICY = 38, + KEYSTONE_PROMOTION_INFOBAR_DELEGATE = 39, + COLLECTED_COOKIES_INFOBAR_DELEGATE = 40, + INSTALLATION_ERROR_INFOBAR_DELEGATE = 41, + ALTERNATE_NAV_INFOBAR_DELEGATE = 42, + BAD_FLAGS_PROMPT = 43, + DEFAULT_BROWSER_INFOBAR_DELEGATE = 44, + GOOGLE_API_KEYS_INFOBAR_DELEGATE = 45, + OBSOLETE_SYSTEM_INFOBAR_DELEGATE = 46, + SESSION_CRASHED_INFOBAR_DELEGATE = 47, + WEBSITE_SETTINGS_INFOBAR_DELEGATE = 48, + AUTOFILL_CC_INFOBAR_DELEGATE = 49, + TRANSLATE_INFOBAR_DELEGATE = 50, + IOS_CHROME_SAVE_PASSWORD_INFOBAR_DELEGATE = 51 + }; + // Describes navigation events, used to decide whether infobars should be // dismissed. struct NavigationDetails { @@ -84,6 +143,11 @@ // as background color) of the infobar. virtual Type GetInfoBarType() const; + // Returns a unique value identifying the infobar. + // New implementers must append a new value to the InfoBarIdentifier enum here + // and in histograms.xml. + virtual InfoBarIdentifier GetIdentifier() const = 0; + virtual InfoBarAutomationType GetInfoBarAutomationType() const; // Returns the resource ID of the icon to be shown for this InfoBar. If the
diff --git a/components/infobars/core/simple_alert_infobar_delegate.cc b/components/infobars/core/simple_alert_infobar_delegate.cc index ce84d8f..51c98e9 100644 --- a/components/infobars/core/simple_alert_infobar_delegate.cc +++ b/components/infobars/core/simple_alert_infobar_delegate.cc
@@ -11,21 +11,24 @@ // static void SimpleAlertInfoBarDelegate::Create( infobars::InfoBarManager* infobar_manager, + infobars::InfoBarDelegate::InfoBarIdentifier infobar_identifier, int icon_id, gfx::VectorIconId vector_icon_id, const base::string16& message, bool auto_expire) { infobar_manager->AddInfoBar(infobar_manager->CreateConfirmInfoBar( scoped_ptr<ConfirmInfoBarDelegate>(new SimpleAlertInfoBarDelegate( - icon_id, vector_icon_id, message, auto_expire)))); + infobar_identifier, icon_id, vector_icon_id, message, auto_expire)))); } SimpleAlertInfoBarDelegate::SimpleAlertInfoBarDelegate( + infobars::InfoBarDelegate::InfoBarIdentifier infobar_identifier, int icon_id, gfx::VectorIconId vector_icon_id, const base::string16& message, bool auto_expire) : ConfirmInfoBarDelegate(), + infobar_identifier_(infobar_identifier), icon_id_(icon_id), vector_icon_id_(vector_icon_id), message_(message), @@ -34,6 +37,11 @@ SimpleAlertInfoBarDelegate::~SimpleAlertInfoBarDelegate() { } +infobars::InfoBarDelegate::InfoBarIdentifier +SimpleAlertInfoBarDelegate::GetIdentifier() const { + return infobar_identifier_; +} + int SimpleAlertInfoBarDelegate::GetIconId() const { return icon_id_; }
diff --git a/components/infobars/core/simple_alert_infobar_delegate.h b/components/infobars/core/simple_alert_infobar_delegate.h index 23d7c37..2e47f9ae 100644 --- a/components/infobars/core/simple_alert_infobar_delegate.h +++ b/components/infobars/core/simple_alert_infobar_delegate.h
@@ -20,26 +20,33 @@ // Creates a simple alert infobar and delegate and adds the infobar to // |infobar_manager|. If |vector_icon_id| is not VECTOR_ICON_NONE, it will be // shown; otherwise, |icon_id| (if present) will be used as the icon. - static void Create(infobars::InfoBarManager* infobar_manager, - int icon_id, - gfx::VectorIconId vector_icon_id, - const base::string16& message, - bool auto_expire); + // |infobar_identifier| names what class triggered the infobar for metrics. + static void Create( + infobars::InfoBarManager* infobar_manager, + infobars::InfoBarDelegate::InfoBarIdentifier infobar_identifier, + int icon_id, + gfx::VectorIconId vector_icon_id, + const base::string16& message, + bool auto_expire); private: - SimpleAlertInfoBarDelegate(int icon_id, - gfx::VectorIconId vector_icon_id, - const base::string16& message, - bool auto_expire); + SimpleAlertInfoBarDelegate( + infobars::InfoBarDelegate::InfoBarIdentifier infobar_identifier, + int icon_id, + gfx::VectorIconId vector_icon_id, + const base::string16& message, + bool auto_expire); ~SimpleAlertInfoBarDelegate() override; // ConfirmInfoBarDelegate: + infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override; int GetIconId() const override; gfx::VectorIconId GetVectorIconId() const override; bool ShouldExpire(const NavigationDetails& details) const override; base::string16 GetMessageText() const override; int GetButtons() const override; + infobars::InfoBarDelegate::InfoBarIdentifier infobar_identifier_; const int icon_id_; gfx::VectorIconId vector_icon_id_; base::string16 message_;
diff --git a/components/message_port/web_message_port_channel_impl.cc b/components/message_port/web_message_port_channel_impl.cc index 8a85173e..dca8b4f 100644 --- a/components/message_port/web_message_port_channel_impl.cc +++ b/components/message_port/web_message_port_channel_impl.cc
@@ -34,7 +34,6 @@ } *channel1 = new WebMessagePortChannelImpl(std::move(pipe1)); - ; *channel2 = new WebMessagePortChannelImpl(std::move(pipe2)); }
diff --git a/components/metrics/leak_detector/leak_analyzer.h b/components/metrics/leak_detector/leak_analyzer.h index 167aa71..bf98c6c 100644 --- a/components/metrics/leak_detector/leak_analyzer.h +++ b/components/metrics/leak_detector/leak_analyzer.h
@@ -66,7 +66,8 @@ std::map<ValueType, uint32_t, std::less<ValueType>, - Allocator<std::pair<ValueType, uint32_t>>> suspected_histogram_; + Allocator<std::pair<const ValueType, uint32_t>>> + suspected_histogram_; // Array of allocated values that passed the suspicion threshold and are being // reported.
diff --git a/components/mus/mus_app.cc b/components/mus/mus_app.cc index ff44dbc..d319aa6 100644 --- a/components/mus/mus_app.cc +++ b/components/mus/mus_app.cc
@@ -98,12 +98,11 @@ MandolineUIServicesApp::CreateClientConnectionForEmbedAtWindow( ws::ConnectionManager* connection_manager, mojo::InterfaceRequest<mojom::WindowTree> tree_request, - ConnectionSpecificId creator_id, const ws::WindowId& root_id, uint32_t policy_bitmask, mojom::WindowTreeClientPtr client) { - scoped_ptr<ws::WindowTreeImpl> service(new ws::WindowTreeImpl( - connection_manager, creator_id, root_id, policy_bitmask)); + scoped_ptr<ws::WindowTreeImpl> service( + new ws::WindowTreeImpl(connection_manager, root_id, policy_bitmask)); return new ws::DefaultClientConnection(std::move(service), connection_manager, std::move(tree_request), std::move(client));
diff --git a/components/mus/mus_app.h b/components/mus/mus_app.h index bae8ed7..5be9031 100644 --- a/components/mus/mus_app.h +++ b/components/mus/mus_app.h
@@ -63,7 +63,6 @@ ws::ClientConnection* CreateClientConnectionForEmbedAtWindow( ws::ConnectionManager* connection_manager, mojo::InterfaceRequest<mojom::WindowTree> tree_request, - ConnectionSpecificId creator_id, const ws::WindowId& root_id, uint32_t policy_bitmask, mojom::WindowTreeClientPtr client) override;
diff --git a/components/mus/ws/connection_manager.cc b/components/mus/ws/connection_manager.cc index 45f65ec4..9f14860 100644 --- a/components/mus/ws/connection_manager.cc +++ b/components/mus/ws/connection_manager.cc
@@ -141,14 +141,13 @@ } WindowTreeImpl* ConnectionManager::EmbedAtWindow( - ConnectionSpecificId creator_id, const WindowId& window_id, uint32_t policy_bitmask, mojom::WindowTreeClientPtr client) { mojom::WindowTreePtr service_ptr; ClientConnection* client_connection = delegate_->CreateClientConnectionForEmbedAtWindow( - this, GetProxy(&service_ptr), creator_id, window_id, policy_bitmask, + this, GetProxy(&service_ptr), window_id, policy_bitmask, std::move(client)); AddConnection(client_connection); client_connection->service()->Init(client_connection->client(),
diff --git a/components/mus/ws/connection_manager.h b/components/mus/ws/connection_manager.h index f16ac18..21e91ed 100644 --- a/components/mus/ws/connection_manager.h +++ b/components/mus/ws/connection_manager.h
@@ -70,8 +70,7 @@ // See description of WindowTree::Embed() for details. This assumes // |transport_window_id| is valid. - WindowTreeImpl* EmbedAtWindow(ConnectionSpecificId creator_id, - const WindowId& window_id, + WindowTreeImpl* EmbedAtWindow(const WindowId& window_id, uint32_t policy_bitmask, mojom::WindowTreeClientPtr client);
diff --git a/components/mus/ws/connection_manager_delegate.h b/components/mus/ws/connection_manager_delegate.h index 730be4b..56acda4 100644 --- a/components/mus/ws/connection_manager_delegate.h +++ b/components/mus/ws/connection_manager_delegate.h
@@ -32,7 +32,6 @@ virtual ClientConnection* CreateClientConnectionForEmbedAtWindow( ConnectionManager* connection_manager, mojo::InterfaceRequest<mojom::WindowTree> tree_request, - ConnectionSpecificId creator_id, const WindowId& root_id, uint32_t policy_bitmask, mojom::WindowTreeClientPtr client) = 0;
diff --git a/components/mus/ws/window_tree_host_connection.cc b/components/mus/ws/window_tree_host_connection.cc index f488fc4..6f78af3d 100644 --- a/components/mus/ws/window_tree_host_connection.cc +++ b/components/mus/ws/window_tree_host_connection.cc
@@ -62,7 +62,7 @@ void WindowTreeHostConnectionImpl::OnDisplayInitialized() { connection_manager()->AddHost(this); set_window_tree(connection_manager()->EmbedAtWindow( - kInvalidConnectionId, window_tree_host()->root_window()->id(), + window_tree_host()->root_window()->id(), mojom::WindowTree::ACCESS_POLICY_EMBED_ROOT, std::move(client_))); }
diff --git a/components/mus/ws/window_tree_impl.cc b/components/mus/ws/window_tree_impl.cc index f80dfcb..fb2c92a 100644 --- a/components/mus/ws/window_tree_impl.cc +++ b/components/mus/ws/window_tree_impl.cc
@@ -64,12 +64,10 @@ }; WindowTreeImpl::WindowTreeImpl(ConnectionManager* connection_manager, - ConnectionSpecificId creator_id, const WindowId& root_id, uint32_t policy_bitmask) : connection_manager_(connection_manager), id_(connection_manager_->GetAndAdvanceNextConnectionId()), - creator_id_(creator_id), client_(nullptr), event_ack_id_(0), is_embed_root_(false), @@ -133,8 +131,6 @@ } void WindowTreeImpl::OnWillDestroyWindowTreeImpl(WindowTreeImpl* connection) { - if (creator_id_ == connection->id()) - creator_id_ = kInvalidConnectionId; const ServerWindow* connection_root = connection->root_ ? connection->GetWindow(*connection->root_) : nullptr; if (connection_root && @@ -225,7 +221,7 @@ return false; PrepareForEmbed(window_id); WindowTreeImpl* new_connection = connection_manager_->EmbedAtWindow( - id_, window_id, policy_bitmask, std::move(client)); + window_id, policy_bitmask, std::move(client)); if (is_embed_root_) *connection_id = new_connection->id(); return true;
diff --git a/components/mus/ws/window_tree_impl.h b/components/mus/ws/window_tree_impl.h index 93a3c5b..e883bb3 100644 --- a/components/mus/ws/window_tree_impl.h +++ b/components/mus/ws/window_tree_impl.h
@@ -45,7 +45,6 @@ public mojom::WindowManagerInternalClient { public: WindowTreeImpl(ConnectionManager* connection_manager, - ConnectionSpecificId creator_id, const WindowId& root_id, uint32_t policy_bitmask); ~WindowTreeImpl() override; @@ -53,7 +52,6 @@ void Init(mojom::WindowTreeClient* client, mojom::WindowTreePtr tree); ConnectionSpecificId id() const { return id_; } - ConnectionSpecificId creator_id() const { return creator_id_; } mojom::WindowTreeClient* client() { return client_; } @@ -277,10 +275,6 @@ // Id of this connection as assigned by ConnectionManager. const ConnectionSpecificId id_; - // ID of the connection that created us. If 0 it indicates either we were - // created by the root, or the connection that created us has been destroyed. - ConnectionSpecificId creator_id_; - mojom::WindowTreeClient* client_; scoped_ptr<mus::ws::AccessPolicy> access_policy_;
diff --git a/components/mus/ws/window_tree_unittest.cc b/components/mus/ws/window_tree_unittest.cc index 7d3509f..722f1974 100644 --- a/components/mus/ws/window_tree_unittest.cc +++ b/components/mus/ws/window_tree_unittest.cc
@@ -192,13 +192,12 @@ ClientConnection* CreateClientConnectionForEmbedAtWindow( ConnectionManager* connection_manager, mojo::InterfaceRequest<mus::mojom::WindowTree> service_request, - ConnectionSpecificId creator_id, const WindowId& root_id, uint32_t policy_bitmask, mus::mojom::WindowTreeClientPtr client) override { // Used by ConnectionManager::AddRoot. - scoped_ptr<WindowTreeImpl> service(new WindowTreeImpl( - connection_manager, creator_id, root_id, policy_bitmask)); + scoped_ptr<WindowTreeImpl> service( + new WindowTreeImpl(connection_manager, root_id, policy_bitmask)); last_connection_ = new TestClientConnection(std::move(service)); return last_connection_; } @@ -222,7 +221,7 @@ void OnDisplayInitialized() override { connection_manager()->AddHost(this); set_window_tree(connection_manager()->EmbedAtWindow( - kInvalidConnectionId, window_tree_host()->root_window()->id(), + window_tree_host()->root_window()->id(), mus::mojom::WindowTree::ACCESS_POLICY_EMBED_ROOT, mus::mojom::WindowTreeClientPtr())); }
diff --git a/components/nacl/renderer/plugin/plugin.gypi b/components/nacl/renderer/plugin/plugin.gypi index e7f31710..ea82a68 100644 --- a/components/nacl/renderer/plugin/plugin.gypi +++ b/components/nacl/renderer/plugin/plugin.gypi
@@ -33,9 +33,6 @@ 'cflags': [ '-Wno-long-long', ], - 'cflags!': [ - '-Wno-unused-parameter', # be a bit stricter to match NaCl flags. - ], 'conditions': [ ['asan!=1 and msan!=1 and ubsan_vptr!=1', { 'ldflags': [
diff --git a/components/ownership/owner_key_util.cc b/components/ownership/owner_key_util.cc index a049729..55b5fd42 100644 --- a/components/ownership/owner_key_util.cc +++ b/components/ownership/owner_key_util.cc
@@ -4,6 +4,8 @@ #include "components/ownership/owner_key_util.h" +#include <utility> + namespace ownership { /////////////////////////////////////////////////////////////////////////// @@ -18,8 +20,8 @@ /////////////////////////////////////////////////////////////////////////// // PrivateKey -PrivateKey::PrivateKey(crypto::ScopedSECKEYPrivateKey key) : key_(key.Pass()) { -} +PrivateKey::PrivateKey(crypto::ScopedSECKEYPrivateKey key) + : key_(std::move(key)) {} PrivateKey::~PrivateKey() { }
diff --git a/components/ownership/owner_key_util_impl.cc b/components/ownership/owner_key_util_impl.cc index 0d36ede6..04547ce 100644 --- a/components/ownership/owner_key_util_impl.cc +++ b/components/ownership/owner_key_util_impl.cc
@@ -63,7 +63,7 @@ crypto::FindNSSKeyFromPublicKeyInfoInSlot(key, slot)); if (!private_key || SECKEY_GetPrivateKeyType(private_key.get()) != rsaKey) return nullptr; - return private_key.Pass(); + return private_key; } bool OwnerKeyUtilImpl::IsPublicKeyPresent() {
diff --git a/components/ownership/owner_settings_service.cc b/components/ownership/owner_settings_service.cc index b15609e..4990594 100644 --- a/components/ownership/owner_settings_service.cc +++ b/components/ownership/owner_settings_service.cc
@@ -37,7 +37,7 @@ new em::PolicyFetchResponse()); if (!policy->SerializeToString(policy_response->mutable_policy_data())) { LOG(ERROR) << "Failed to encode policy payload."; - return scoped_ptr<em::PolicyFetchResponse>(nullptr).Pass(); + return scoped_ptr<em::PolicyFetchResponse>(nullptr); } ScopedSGNContext sign_context( @@ -62,7 +62,7 @@ reinterpret_cast<const char*>(signature_item.data), signature_item.len); SECITEM_FreeItem(&signature_item, PR_FALSE); - return policy_response.Pass(); + return policy_response; } } // namepace
diff --git a/components/pairing/bluetooth_controller_pairing_controller.cc b/components/pairing/bluetooth_controller_pairing_controller.cc index 1a6fe808..ca341d9 100644 --- a/components/pairing/bluetooth_controller_pairing_controller.cc +++ b/components/pairing/bluetooth_controller_pairing_controller.cc
@@ -4,6 +4,8 @@ #include "components/pairing/bluetooth_controller_pairing_controller.h" +#include <utility> + #include "base/bind.h" #include "base/logging.h" #include "base/strings/string_util.h" @@ -132,7 +134,7 @@ void BluetoothControllerPairingController::OnStartDiscoverySession( scoped_ptr<device::BluetoothDiscoverySession> discovery_session) { DCHECK(thread_checker_.CalledOnValidThread()); - discovery_session_ = discovery_session.Pass(); + discovery_session_ = std::move(discovery_session); ChangeStage(STAGE_DEVICES_DISCOVERY); for (const auto& device : adapter_->GetDevices())
diff --git a/components/pairing/shark_connection_listener.cc b/components/pairing/shark_connection_listener.cc index a6bc655f..961d962 100644 --- a/components/pairing/shark_connection_listener.cc +++ b/components/pairing/shark_connection_listener.cc
@@ -4,6 +4,8 @@ #include "components/pairing/shark_connection_listener.h" +#include <utility> + #include "base/logging.h" #include "base/threading/thread_restrictions.h" #include "components/pairing/bluetooth_host_pairing_controller.h" @@ -25,7 +27,7 @@ void SharkConnectionListener::PairingStageChanged(Stage new_stage) { if (new_stage == HostPairingController::STAGE_WAITING_FOR_CODE_CONFIRMATION) { controller_->RemoveObserver(this); - callback_.Run(controller_.Pass()); + callback_.Run(std::move(controller_)); callback_.Reset(); } }
diff --git a/components/policy/core/common/proxy_policy_provider.cc b/components/policy/core/common/proxy_policy_provider.cc index 7a89197..74f95c9 100644 --- a/components/policy/core/common/proxy_policy_provider.cc +++ b/components/policy/core/common/proxy_policy_provider.cc
@@ -4,6 +4,8 @@ #include "components/policy/core/common/proxy_policy_provider.h" +#include <utility> + #include "base/logging.h" #include "base/memory/scoped_ptr.h" #include "components/policy/core/common/policy_bundle.h" @@ -48,7 +50,7 @@ // if SetDelegate() was never called before. scoped_ptr<PolicyBundle> bundle(new PolicyBundle()); bundle->CopyFrom(policies()); - UpdatePolicy(bundle.Pass()); + UpdatePolicy(std::move(bundle)); } } @@ -57,7 +59,7 @@ DCHECK_EQ(delegate_, provider); scoped_ptr<PolicyBundle> bundle(new PolicyBundle()); bundle->CopyFrom(delegate_->policies()); - UpdatePolicy(bundle.Pass()); + UpdatePolicy(std::move(bundle)); } } // namespace policy
diff --git a/components/policy/core/common/proxy_policy_provider_unittest.cc b/components/policy/core/common/proxy_policy_provider_unittest.cc index 196f3fc..142e3536 100644 --- a/components/policy/core/common/proxy_policy_provider_unittest.cc +++ b/components/policy/core/common/proxy_policy_provider_unittest.cc
@@ -38,7 +38,7 @@ static scoped_ptr<PolicyBundle> CopyBundle(const PolicyBundle& bundle) { scoped_ptr<PolicyBundle> copy(new PolicyBundle()); copy->CopyFrom(bundle); - return copy.Pass(); + return copy; } private:
diff --git a/components/rlz/rlz_tracker.cc b/components/rlz/rlz_tracker.cc index 00b8dd9a..32284b8 100644 --- a/components/rlz/rlz_tracker.cc +++ b/components/rlz/rlz_tracker.cc
@@ -9,6 +9,7 @@ #include "components/rlz/rlz_tracker.h" #include <algorithm> +#include <utility> #include "base/bind.h" #include "base/message_loop/message_loop.h" @@ -177,14 +178,14 @@ // RLZTracker::SetRlzDelegate is called at Profile creation time which can // happens multiple time on ChromeOS, so do nothing if the delegate already // exists. - tracker->SetDelegate(delegate.Pass()); + tracker->SetDelegate(std::move(delegate)); } } void RLZTracker::SetDelegate(scoped_ptr<RLZTrackerDelegate> delegate) { DCHECK(delegate); DCHECK(!delegate_); - delegate_ = delegate.Pass(); + delegate_ = std::move(delegate); worker_pool_token_ = delegate_->GetBlockingPool()->GetSequenceToken(); }
diff --git a/components/storage_monitor/storage_monitor_chromeos_unittest.cc b/components/storage_monitor/storage_monitor_chromeos_unittest.cc index 053ef14..a34c9e8 100644 --- a/components/storage_monitor/storage_monitor_chromeos_unittest.cc +++ b/components/storage_monitor/storage_monitor_chromeos_unittest.cc
@@ -5,6 +5,7 @@ #include "components/storage_monitor/storage_monitor_chromeos.h" #include <stdint.h> +#include <utility> #include "base/files/file_util.h" #include "base/files/scoped_temp_dir.h" @@ -173,7 +174,7 @@ TestStorageMonitor::Destroy(); monitor_ = new TestStorageMonitorCros(); scoped_ptr<StorageMonitor> pass_monitor(monitor_); - StorageMonitor::SetStorageMonitorForTesting(pass_monitor.Pass()); + StorageMonitor::SetStorageMonitorForTesting(std::move(pass_monitor)); monitor_->Init(); monitor_->AddObserver(mock_storage_observer_.get());
diff --git a/components/test_runner/event_sender.cc b/components/test_runner/event_sender.cc index df15076..a5fcc7b 100644 --- a/components/test_runner/event_sender.cc +++ b/components/test_runner/event_sender.cc
@@ -636,8 +636,6 @@ .SetProperty("forceLayoutOnEvents", &EventSenderBindings::ForceLayoutOnEvents, &EventSenderBindings::SetForceLayoutOnEvents) - .SetProperty("dragMode", &EventSenderBindings::IsDragMode, - &EventSenderBindings::SetIsDragMode) #if defined(OS_WIN) .SetProperty("WM_KEYDOWN", &EventSenderBindings::WmKeyDown, &EventSenderBindings::SetWmKeyDown) @@ -654,10 +652,10 @@ .SetProperty("WM_SYSCHAR", &EventSenderBindings::WmSysChar, &EventSenderBindings::SetWmSysChar) .SetProperty("WM_SYSDEADCHAR", &EventSenderBindings::WmSysDeadChar, - &EventSenderBindings::SetWmSysDeadChar); -#else - ; + &EventSenderBindings::SetWmSysDeadChar) #endif + .SetProperty("dragMode", &EventSenderBindings::IsDragMode, + &EventSenderBindings::SetIsDragMode); } void EventSenderBindings::EnableDOMUIEventLogging() { @@ -996,7 +994,7 @@ return; } - int modifiers = -1; // Default to the modifier implied by button_number + int modifiers = -1; // Default to the modifier implied by button_number if (!args->PeekNext().IsEmpty()) { modifiers = GetKeyModifiersFromV8(args->isolate(), args->PeekNext()); } @@ -1493,7 +1491,7 @@ event_down.modifiers |= WebInputEvent::ShiftKey; // See if KeyLocation argument is given. - switch(location) { + switch (location) { case DOMKeyLocationStandard: break; case DOMKeyLocationLeft: @@ -1596,7 +1594,7 @@ #if defined(OS_WIN) current_buttons_ &= ~GetWebMouseEventModifierForButton(WebMouseEvent::ButtonRight); - pressed_button_= WebMouseEvent::ButtonNone; + pressed_button_ = WebMouseEvent::ButtonNone; InitMouseEvent(WebInputEvent::MouseUp, WebMouseEvent::ButtonRight, @@ -2004,7 +2002,7 @@ click_count_, 0, &event); - HandleInputEventOnViewOrPopup(event); + HandleInputEventOnViewOrPopup(event); } @@ -2047,7 +2045,7 @@ } void EventSender::MouseScrollBy(gin::Arguments* args) { - WebMouseWheelEvent event; + WebMouseWheelEvent event; InitMouseWheelEvent(args, false, &event); HandleInputEventOnViewOrPopup(event); } @@ -2096,8 +2094,9 @@ || touch_point->state == WebTouchPoint::StateCancelled) { touch_points_.erase(touch_points_.begin() + i); --i; - } else + } else { touch_point->state = WebTouchPoint::StateStationary; + } } }
diff --git a/components/timers/alarm_timer_chromeos.cc b/components/timers/alarm_timer_chromeos.cc index 57b1c0c0..0cb25fa 100644 --- a/components/timers/alarm_timer_chromeos.cc +++ b/components/timers/alarm_timer_chromeos.cc
@@ -6,6 +6,7 @@ #include <stdint.h> #include <sys/timerfd.h> +#include <utility> #include "base/bind.h" #include "base/bind_helpers.h" @@ -425,7 +426,7 @@ // Take ownership of the pending user task, which is going to be cleared by // the Stop() or Reset() functions below. - scoped_ptr<base::PendingTask> pending_user_task(pending_task_.Pass()); + scoped_ptr<base::PendingTask> pending_user_task(std::move(pending_task_)); // Re-schedule or stop the timer as requested. if (base::Timer::is_repeating())
diff --git a/components/translate/core/browser/translate_infobar_delegate.cc b/components/translate/core/browser/translate_infobar_delegate.cc index c8fd02d3..9f428a73 100644 --- a/components/translate/core/browser/translate_infobar_delegate.cc +++ b/components/translate/core/browser/translate_infobar_delegate.cc
@@ -51,6 +51,11 @@ TranslateInfoBarDelegate::~TranslateInfoBarDelegate() { } +infobars::InfoBarDelegate::InfoBarIdentifier +TranslateInfoBarDelegate::GetIdentifier() const { + return TRANSLATE_INFOBAR_DELEGATE; +} + // static void TranslateInfoBarDelegate::Create( bool replace_existing_infobar,
diff --git a/components/translate/core/browser/translate_infobar_delegate.h b/components/translate/core/browser/translate_infobar_delegate.h index 7843183c..071f6fc 100644 --- a/components/translate/core/browser/translate_infobar_delegate.h +++ b/components/translate/core/browser/translate_infobar_delegate.h
@@ -204,6 +204,7 @@ // InfoBarDelegate: Type GetInfoBarType() const override; + infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override; int GetIconId() const override; void InfoBarDismissed() override; TranslateInfoBarDelegate* AsTranslateInfoBarDelegate() override;
diff --git a/components/user_manager/user_manager_base.cc b/components/user_manager/user_manager_base.cc index 312aca16..487ce56 100644 --- a/components/user_manager/user_manager_base.cc +++ b/components/user_manager/user_manager_base.cc
@@ -5,8 +5,8 @@ #include "components/user_manager/user_manager_base.h" #include <stddef.h> - #include <set> +#include <utility> #include "base/bind.h" #include "base/bind_helpers.h" @@ -1092,7 +1092,7 @@ base::Passed(&resolved_locale))); } else { resolved_locale.reset(new std::string(locale)); - DoUpdateAccountLocale(account_id, resolved_locale.Pass()); + DoUpdateAccountLocale(account_id, std::move(resolved_locale)); } }
diff --git a/components/wifi_sync/wifi_credential_syncable_service.cc b/components/wifi_sync/wifi_credential_syncable_service.cc index c8f65dd5..7550853b 100644 --- a/components/wifi_sync/wifi_credential_syncable_service.cc +++ b/components/wifi_sync/wifi_credential_syncable_service.cc
@@ -5,6 +5,7 @@ #include "components/wifi_sync/wifi_credential_syncable_service.h" #include <stdint.h> +#include <utility> #include <vector> #include "base/logging.h" @@ -107,7 +108,7 @@ WifiCredentialSyncableService::WifiCredentialSyncableService( scoped_ptr<WifiConfigDelegate> network_config_delegate) - : network_config_delegate_(network_config_delegate.Pass()) { + : network_config_delegate_(std::move(network_config_delegate)) { DCHECK(network_config_delegate_); } @@ -123,7 +124,7 @@ DCHECK(sync_processor.get()); DCHECK_EQ(kModelType, type); - sync_processor_ = sync_processor.Pass(); + sync_processor_ = std::move(sync_processor); // TODO(quiche): Update local WiFi configuration from |initial_sync_data|. // TODO(quiche): Notify upper layers that sync is ready.
diff --git a/components/wifi_sync/wifi_credential_syncable_service_unittest.cc b/components/wifi_sync/wifi_credential_syncable_service_unittest.cc index 81132c0b..3b15dc77 100644 --- a/components/wifi_sync/wifi_credential_syncable_service_unittest.cc +++ b/components/wifi_sync/wifi_credential_syncable_service_unittest.cc
@@ -5,8 +5,8 @@ #include "components/wifi_sync/wifi_credential_syncable_service.h" #include <stdint.h> - #include <string> +#include <utility> #include <vector> #include "base/macros.h" @@ -144,7 +144,8 @@ change_processor_ = change_processor.get(); syncable_service_->MergeDataAndStartSyncing( syncer::WIFI_CREDENTIALS, syncer::SyncDataList(), - change_processor.Pass(), make_scoped_ptr(new SyncErrorFactoryMock())); + std::move(change_processor), + make_scoped_ptr(new SyncErrorFactoryMock())); } private:
diff --git a/content/browser/android/java/gin_java_method_invocation_helper.cc b/content/browser/android/java/gin_java_method_invocation_helper.cc index 5241044..904926f 100644 --- a/content/browser/android/java/gin_java_method_invocation_helper.cc +++ b/content/browser/android/java/gin_java_method_invocation_helper.cc
@@ -209,7 +209,7 @@ return safe_annotation_clazz_; } -const GinJavaBridgeError GinJavaMethodInvocationHelper::GetInvocationError() { +GinJavaBridgeError GinJavaMethodInvocationHelper::GetInvocationError() { return invocation_error_; }
diff --git a/content/browser/android/java/gin_java_method_invocation_helper.h b/content/browser/android/java/gin_java_method_invocation_helper.h index d23eb734..b61fdfd 100644 --- a/content/browser/android/java/gin_java_method_invocation_helper.h +++ b/content/browser/android/java/gin_java_method_invocation_helper.h
@@ -66,7 +66,7 @@ const base::ListValue& GetPrimitiveResult(); const base::android::JavaRef<jobject>& GetObjectResult(); const base::android::JavaRef<jclass>& GetSafeAnnotationClass(); - const GinJavaBridgeError GetInvocationError(); + GinJavaBridgeError GetInvocationError(); private: friend class base::RefCountedThreadSafe<GinJavaMethodInvocationHelper>;
diff --git a/content/browser/download/mhtml_generation_manager.cc b/content/browser/download/mhtml_generation_manager.cc index 9937db7..accd940f 100644 --- a/content/browser/download/mhtml_generation_manager.cc +++ b/content/browser/download/mhtml_generation_manager.cc
@@ -18,12 +18,14 @@ #include "base/strings/string_number_conversions.h" #include "base/strings/stringprintf.h" #include "content/browser/frame_host/frame_tree_node.h" +#include "content/browser/frame_host/render_frame_host_impl.h" #include "content/common/frame_messages.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/render_frame_host.h" #include "content/public/browser/render_process_host.h" #include "content/public/browser/render_process_host_observer.h" #include "content/public/browser/web_contents.h" +#include "url/gurl.h" namespace content { @@ -38,14 +40,25 @@ GenerateMHTMLCallback callback() const { return callback_; } + // Handler for FrameHostMsg_SerializeAsMHTMLResponse (a notification from the + // renderer that the MHTML generation for previous frame has finished). + // Returns |true| upon success; |false| otherwise. + bool OnSerializeAsMHTMLResponse( + RenderFrameHostImpl* sender, + const std::set<std::string>& digests_of_uris_of_serialized_resources); + // Sends IPC to the renderer, asking for MHTML generation of the next frame. // // Returns true if the message was sent successfully; false otherwise. bool SendToNextRenderFrame(); // Indicates if more calls to SendToNextRenderFrame are needed. - bool HasMoreFramesToProcess() const { - return !pending_frame_tree_node_ids_.empty(); + bool IsDone() const { + bool waiting_for_response_from_renderer = + frame_tree_node_id_of_busy_frame_ != + FrameTreeNode::kFrameTreeNodeInvalidId; + bool no_more_requests_to_send = pending_frame_tree_node_ids_.empty(); + return !waiting_for_response_from_renderer && no_more_requests_to_send; } // Close the file on the file thread and respond back on the UI thread with @@ -73,19 +86,28 @@ // See also MHTMLGenerationManager::id_to_job_ map. int job_id_; + // The IDs of frames that still need to be processed. + std::queue<int> pending_frame_tree_node_ids_; + + // Identifies a frame to which we've sent FrameMsg_SerializeAsMHTML but for + // which we didn't yet process FrameHostMsg_SerializeAsMHTMLResponse via + // OnSerializeAsMHTMLResponse. + int frame_tree_node_id_of_busy_frame_; + // The handle to the file the MHTML is saved to for the browser process. base::File browser_file_; - // The IDs of frames we still need to process. - std::queue<int> pending_frame_tree_node_ids_; - - // Map from frames into content ids (see WebPageSerializer::generateMHTMLParts + // Map from frames to content ids (see WebFrameSerializer::generateMHTMLParts // for more details about what "content ids" are and how they are used). std::map<int, std::string> frame_tree_node_to_content_id_; // MIME multipart boundary to use in the MHTML doc. std::string mhtml_boundary_marker_; + // Digests of URIs of already generated MHTML parts. + std::set<std::string> digests_of_already_serialized_uris_; + std::string salt_; + // The callback to call once generation is complete. GenerateMHTMLCallback callback_; @@ -100,7 +122,9 @@ WebContents* web_contents, GenerateMHTMLCallback callback) : job_id_(job_id), + frame_tree_node_id_of_busy_frame_(FrameTreeNode::kFrameTreeNodeInvalidId), mhtml_boundary_marker_(GenerateMHTMLBoundaryMarker()), + salt_(base::GenerateGUID()), callback_(callback), observed_renderer_process_host_(this) { DCHECK_CURRENTLY_ON(BrowserThread::UI); @@ -144,9 +168,13 @@ DCHECK(browser_file_.IsValid()); DCHECK_LT(0u, pending_frame_tree_node_ids_.size()); + FrameMsg_SerializeAsMHTML_Params ipc_params; + ipc_params.job_id = job_id_; + ipc_params.mhtml_boundary_marker = mhtml_boundary_marker_; + int frame_tree_node_id = pending_frame_tree_node_ids_.front(); pending_frame_tree_node_ids_.pop(); - bool is_last_frame = pending_frame_tree_node_ids_.empty(); + ipc_params.is_last_frame = pending_frame_tree_node_ids_.empty(); FrameTreeNode* ftn = FrameTreeNode::GloballyFindByID(frame_tree_node_id); if (!ftn) // The contents went away. @@ -157,12 +185,21 @@ observed_renderer_process_host_.RemoveAll(); observed_renderer_process_host_.Add(rfh->GetProcess()); - IPC::PlatformFileForTransit renderer_file = IPC::GetFileHandleForProcess( + // Tell the renderer to skip (= deduplicate) already covered MHTML parts. + ipc_params.salt = salt_; + ipc_params.digests_of_uris_to_skip = digests_of_already_serialized_uris_; + + ipc_params.destination_file = IPC::GetFileHandleForProcess( browser_file_.GetPlatformFile(), rfh->GetProcess()->GetHandle(), false); // |close_source_handle|. - rfh->Send(new FrameMsg_SerializeAsMHTML( - rfh->GetRoutingID(), job_id_, renderer_file, mhtml_boundary_marker_, - CreateFrameRoutingIdToContentId(rfh->GetSiteInstance()), is_last_frame)); + ipc_params.frame_routing_id_to_content_id = + CreateFrameRoutingIdToContentId(rfh->GetSiteInstance()); + + // Send the IPC asking the renderer to serialize the frame. + DCHECK_EQ(FrameTreeNode::kFrameTreeNodeInvalidId, + frame_tree_node_id_of_busy_frame_); + frame_tree_node_id_of_busy_frame_ = frame_tree_node_id; + rfh->Send(new FrameMsg_SerializeAsMHTML(rfh->GetRoutingID(), ipc_params)); return true; } @@ -207,6 +244,31 @@ callback); } +bool MHTMLGenerationManager::Job::OnSerializeAsMHTMLResponse( + RenderFrameHostImpl* sender, + const std::set<std::string>& digests_of_uris_of_serialized_resources) { + // Sanitize renderer input / reject unexpected messages. + int sender_id = sender->frame_tree_node()->frame_tree_node_id(); + if (sender_id != frame_tree_node_id_of_busy_frame_) { + NOTREACHED(); + return false; // Report failure. + } + frame_tree_node_id_of_busy_frame_ = FrameTreeNode::kFrameTreeNodeInvalidId; + + // Renderer should be deduping resources with the same uris. + DCHECK_EQ(0u, base::STLSetIntersection<std::set<std::string>>( + digests_of_already_serialized_uris_, + digests_of_uris_of_serialized_resources).size()); + digests_of_already_serialized_uris_.insert( + digests_of_uris_of_serialized_resources.begin(), + digests_of_uris_of_serialized_resources.end()); + + if (pending_frame_tree_node_ids_.empty()) + return true; // Report success. + + return SendToNextRenderFrame(); +} + // static int64_t MHTMLGenerationManager::Job::CloseFileOnFileThread(base::File file) { DCHECK_CURRENTLY_ON(BrowserThread::FILE); @@ -260,9 +322,11 @@ job_id)); } -void MHTMLGenerationManager::OnSavedFrameAsMHTML( +void MHTMLGenerationManager::OnSerializeAsMHTMLResponse( + RenderFrameHostImpl* sender, int job_id, - bool mhtml_generation_in_renderer_succeeded) { + bool mhtml_generation_in_renderer_succeeded, + const std::set<std::string>& digests_of_uris_of_serialized_resources) { DCHECK_CURRENTLY_ON(BrowserThread::UI); if (!mhtml_generation_in_renderer_succeeded) { @@ -274,14 +338,14 @@ if (!job) return; - if (job->HasMoreFramesToProcess()) { - if (!job->SendToNextRenderFrame()) { - JobFinished(job_id, JobStatus::FAILURE); - } + if (!job->OnSerializeAsMHTMLResponse( + sender, digests_of_uris_of_serialized_resources)) { + JobFinished(job_id, JobStatus::FAILURE); return; } - JobFinished(job_id, JobStatus::SUCCESS); + if (job->IsDone()) + JobFinished(job_id, JobStatus::SUCCESS); } // static
diff --git a/content/browser/download/mhtml_generation_manager.h b/content/browser/download/mhtml_generation_manager.h index e697e13..b418e54 100644 --- a/content/browser/download/mhtml_generation_manager.h +++ b/content/browser/download/mhtml_generation_manager.h
@@ -8,12 +8,15 @@ #include <stdint.h> #include <map> +#include <set> +#include <string> #include "base/files/file.h" #include "base/macros.h" #include "base/memory/singleton.h" #include "base/process/process.h" #include "ipc/ipc_platform_file.h" +#include "url/gurl.h" namespace base { class FilePath; @@ -21,6 +24,7 @@ namespace content { +class RenderFrameHostImpl; class WebContents; // The class and all of its members live on the UI thread. Only static methods @@ -42,8 +46,11 @@ // Handler for FrameHostMsg_SerializeAsMHTMLResponse (a notification from the // renderer that the MHTML generation finished for a single frame). - void OnSavedFrameAsMHTML(int job_id, - bool mhtml_generation_in_renderer_succeeded); + void OnSerializeAsMHTMLResponse( + RenderFrameHostImpl* sender, + int job_id, + bool mhtml_generation_in_renderer_succeeded, + const std::set<std::string>& digests_of_uris_of_serialized_resources); private: friend struct base::DefaultSingletonTraits<MHTMLGenerationManager>;
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc index a74c5977..1834494 100644 --- a/content/browser/frame_host/render_frame_host_impl.cc +++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -1714,8 +1714,12 @@ frame_tree_node_->DidChangeLoadProgress(load_progress); } -void RenderFrameHostImpl::OnSerializeAsMHTMLResponse(int job_id, bool success) { - MHTMLGenerationManager::GetInstance()->OnSavedFrameAsMHTML(job_id, success); +void RenderFrameHostImpl::OnSerializeAsMHTMLResponse( + int job_id, + bool success, + const std::set<std::string>& digests_of_uris_of_serialized_resources) { + MHTMLGenerationManager::GetInstance()->OnSerializeAsMHTMLResponse( + this, job_id, success, digests_of_uris_of_serialized_resources); } #if defined(OS_MACOSX) || defined(OS_ANDROID)
diff --git a/content/browser/frame_host/render_frame_host_impl.h b/content/browser/frame_host/render_frame_host_impl.h index cc190ac..07f78db 100644 --- a/content/browser/frame_host/render_frame_host_impl.h +++ b/content/browser/frame_host/render_frame_host_impl.h
@@ -9,6 +9,7 @@ #include <stdint.h> #include <map> +#include <set> #include <string> #include <vector> @@ -620,7 +621,10 @@ void OnDidStartLoading(bool to_different_document); void OnDidStopLoading(); void OnDidChangeLoadProgress(double load_progress); - void OnSerializeAsMHTMLResponse(int job_id, bool success); + void OnSerializeAsMHTMLResponse( + int job_id, + bool success, + const std::set<std::string>& digests_of_uris_of_serialized_resources); #if defined(OS_MACOSX) || defined(OS_ANDROID) void OnShowPopup(const FrameHostMsg_ShowPopup_Params& params);
diff --git a/content/browser/media/capture/desktop_capture_device_aura_unittest.cc b/content/browser/media/capture/desktop_capture_device_aura_unittest.cc index 6424273c..43ed2aae 100644 --- a/content/browser/media/capture/desktop_capture_device_aura_unittest.cc +++ b/content/browser/media/capture/desktop_capture_device_aura_unittest.cc
@@ -6,6 +6,7 @@ #include <stddef.h> #include <stdint.h> +#include <utility> #include "base/location.h" #include "base/macros.h" @@ -153,7 +154,7 @@ capture_params.requested_format.frame_size.SetSize(640, 480); capture_params.requested_format.frame_rate = kFrameRate; capture_params.requested_format.pixel_format = media::PIXEL_FORMAT_I420; - capture_device->AllocateAndStart(capture_params, client.Pass()); + capture_device->AllocateAndStart(capture_params, std::move(client)); capture_device->StopAndDeAllocate(); }
diff --git a/content/browser/webui/web_ui_data_source_impl.cc b/content/browser/webui/web_ui_data_source_impl.cc index 06a4c89..9c93731 100644 --- a/content/browser/webui/web_ui_data_source_impl.cc +++ b/content/browser/webui/web_ui_data_source_impl.cc
@@ -74,6 +74,11 @@ bool ShouldDenyXFrameOptions() const override { return parent_->deny_xframe_options_; } + void WillServiceRequest(const net::URLRequest* request, + std::string* path) const override { + // We want to remove any query strings from the path. + *path = path->substr(0, path->find_first_of('?')); + } private: WebUIDataSourceImpl* parent_;
diff --git a/content/browser/webui/web_ui_data_source_unittest.cc b/content/browser/webui/web_ui_data_source_unittest.cc index 791ccb7e..e43c866 100644 --- a/content/browser/webui/web_ui_data_source_unittest.cc +++ b/content/browser/webui/web_ui_data_source_unittest.cc
@@ -146,4 +146,14 @@ EXPECT_EQ(GetMimeType(".css.foo"), html); } +TEST_F(WebUIDataSourceTest, QueryStringRemoval) { + std::string path = "path.js?query_string"; + source()->source()->WillServiceRequest(nullptr, &path); + EXPECT_EQ("path.js", path); + + path = "path.js?query_string?query_string2"; + source()->source()->WillServiceRequest(nullptr, &path); + EXPECT_EQ("path.js", path); +} + } // namespace content
diff --git a/content/common/frame_messages.h b/content/common/frame_messages.h index 561e0e9..0014c8a 100644 --- a/content/common/frame_messages.h +++ b/content/common/frame_messages.h
@@ -8,6 +8,11 @@ #include <stddef.h> #include <stdint.h> +#include <map> +#include <set> +#include <string> +#include <vector> + #include "build/build_config.h" #include "cc/surfaces/surface_id.h" #include "cc/surfaces/surface_sequence.h" @@ -453,6 +458,38 @@ IPC_STRUCT_TRAITS_MEMBER(routing_id) IPC_STRUCT_TRAITS_END() +IPC_STRUCT_BEGIN(FrameMsg_SerializeAsMHTML_Params) + // Job id - used to match responses to requests. + IPC_STRUCT_MEMBER(int, job_id) + + // Destination file handle. + IPC_STRUCT_MEMBER(IPC::PlatformFileForTransit, destination_file) + + // MHTML boundary marker / MIME multipart boundary maker. The same + // |mhtml_boundary_marker| should be used for serialization of each frame. + IPC_STRUCT_MEMBER(std::string, mhtml_boundary_marker) + + // Frame to content-id map. + // Keys are routing ids of either RenderFrames or RenderFrameProxies. + // Values are MHTML content-ids - see WebFrameSerializer::generateMHTMLParts. + IPC_STRUCT_MEMBER(FrameMsg_SerializeAsMHTML_FrameRoutingIdToContentIdMap, + frame_routing_id_to_content_id) + + // |digests_of_uris_to_skip| contains digests of uris of MHTML parts that + // should be skipped. This helps deduplicate mhtml parts across frames. + // SECURITY NOTE: Sha256 digests (rather than uris) are used to prevent + // disclosing uris to other renderer processes; the digests should be + // generated using SHA256HashString function from crypto/sha2.h and hashing + // |salt + url.spec()|. + IPC_STRUCT_MEMBER(std::set<std::string>, digests_of_uris_to_skip) + + // Salt used for |digests_of_uris_to_skip|. + IPC_STRUCT_MEMBER(std::string, salt) + + // If |is_last_frame| is true, then an MHTML footer will be generated. + IPC_STRUCT_MEMBER(bool, is_last_frame) +IPC_STRUCT_END() + #if defined(OS_MACOSX) || defined(OS_ANDROID) // This message is used for supporting popup menus on Mac OS X and Android using // native controls. See the FrameHostMsg_ShowPopup message. @@ -752,28 +789,11 @@ FrameMsg_GetSerializedHtmlWithLocalLinks_Map) // Serialize target frame and its resources into MHTML and write it into the -// provided destination file handle. -// -// When starting generation of a new MHTML document, one needs to start by -// sending FrameMsg_SerializeAsMHTML for the *main* frame (main frame needs to -// be the first part in the MHTML document + main frame will trigger generation -// of the MHTML header). -// -// The same |mhtml_boundary_marker| should be used for serialization of each -// frame (this string will be used as a mime multipart boundary within the mhtml -// document). -// -// For more details about frame to content id map please see -// WebPageSerializer::generateMHTMLParts method. -// -// |is_last_frame| controls whether the serializer in the renderer will -// emit the MHTML footer. -IPC_MESSAGE_ROUTED5(FrameMsg_SerializeAsMHTML, - int /* job_id (used to match responses to requests) */, - IPC::PlatformFileForTransit /* destination file handle */, - std::string /* mhtml boundary marker */, - FrameMsg_SerializeAsMHTML_FrameRoutingIdToContentIdMap, - bool /* is last frame */) +// provided destination file handle. Note that when serializing multiple +// frames, one needs to serialize the *main* frame first (the main frame +// needs to go first according to RFC2557 + the main frame will trigger +// generation of the MHTML header). +IPC_MESSAGE_ROUTED1(FrameMsg_SerializeAsMHTML, FrameMsg_SerializeAsMHTML_Params) IPC_MESSAGE_ROUTED1(FrameMsg_SetFrameOwnerProperties, blink::WebFrameOwnerProperties /* frame_owner_properties */) @@ -1319,9 +1339,11 @@ bool /* end of data? */) // Response to FrameMsg_SerializeAsMHTML. -IPC_MESSAGE_ROUTED2(FrameHostMsg_SerializeAsMHTMLResponse, - int /* job_id (used to match responses to requests) */, - bool /* true if success, false if error */) +IPC_MESSAGE_ROUTED3( + FrameHostMsg_SerializeAsMHTMLResponse, + int /* job_id (used to match responses to requests) */, + bool /* true if success, false if error */, + std::set<std::string> /* digests of uris of serialized resources */) // Sent when the renderer updates hint for importance of a tab. IPC_MESSAGE_ROUTED1(FrameHostMsg_UpdatePageImportanceSignals,
diff --git a/content/common/gpu/media/vaapi_jpeg_decode_accelerator.cc b/content/common/gpu/media/vaapi_jpeg_decode_accelerator.cc index a9f17fe0..8efb362 100644 --- a/content/common/gpu/media/vaapi_jpeg_decode_accelerator.cc +++ b/content/common/gpu/media/vaapi_jpeg_decode_accelerator.cc
@@ -6,6 +6,7 @@ #include <stddef.h> #include <string.h> +#include <utility> #include "base/bind.h" #include "base/logging.h" @@ -79,9 +80,8 @@ scoped_ptr<base::SharedMemory> shm, const scoped_refptr<media::VideoFrame>& video_frame) : bitstream_buffer(bitstream_buffer), - shm(shm.Pass()), - video_frame(video_frame) { -} + shm(std::move(shm)), + video_frame(video_frame) {} VaapiJpegDecodeAccelerator::DecodeRequest::~DecodeRequest() { } @@ -299,7 +299,7 @@ } scoped_ptr<DecodeRequest> request( - new DecodeRequest(bitstream_buffer, shm.Pass(), video_frame)); + new DecodeRequest(bitstream_buffer, std::move(shm), video_frame)); decoder_task_runner_->PostTask( FROM_HERE, base::Bind(&VaapiJpegDecodeAccelerator::DecodeTask,
diff --git a/content/common/gpu/media/vaapi_video_encode_accelerator.cc b/content/common/gpu/media/vaapi_video_encode_accelerator.cc index 8a1dbfd..049cd7a 100644 --- a/content/common/gpu/media/vaapi_video_encode_accelerator.cc +++ b/content/common/gpu/media/vaapi_video_encode_accelerator.cc
@@ -5,6 +5,7 @@ #include "content/common/gpu/media/vaapi_video_encode_accelerator.h" #include <string.h> +#include <utility> #include "base/bind.h" #include "base/callback.h" @@ -102,7 +103,7 @@ BitstreamBufferRef(int32_t id, scoped_ptr<base::SharedMemory> shm, size_t size) - : id(id), shm(shm.Pass()), size(size) {} + : id(id), shm(std::move(shm)), size(size) {} const int32_t id; const scoped_ptr<base::SharedMemory> shm; const size_t size; @@ -676,7 +677,7 @@ } scoped_ptr<BitstreamBufferRef> buffer_ref( - new BitstreamBufferRef(buffer.id(), shm.Pass(), buffer.size())); + new BitstreamBufferRef(buffer.id(), std::move(shm), buffer.size())); encoder_thread_task_runner_->PostTask( FROM_HERE,
diff --git a/content/common/gpu/media/video_decode_accelerator_unittest.cc b/content/common/gpu/media/video_decode_accelerator_unittest.cc index 21e852c..3646630 100644 --- a/content/common/gpu/media/video_decode_accelerator_unittest.cc +++ b/content/common/gpu/media/video_decode_accelerator_unittest.cc
@@ -22,12 +22,7 @@ #include <algorithm> #include <deque> #include <map> - -// Include gtest.h out of order because <X11/X.h> #define's Bool & None, which -// gtest uses as struct names (inside a namespace). This means that -// #include'ing gtest after anything that pulls in X.h fails to compile. -// This is http://code.google.com/p/googletest/issues/detail?id=371 -#include "testing/gtest/include/gtest/gtest.h" +#include <utility> #include "base/at_exit.h" #include "base/bind.h" @@ -56,6 +51,7 @@ #include "content/common/gpu/media/video_accelerator_unittest_helpers.h" #include "content/public/common/content_switches.h" #include "media/filters/h264_parser.h" +#include "testing/gtest/include/gtest/gtest.h" #include "ui/gfx/codec/png_codec.h" #include "ui/gl/gl_image.h" @@ -517,7 +513,7 @@ frame_size_, base::Bind(&DoNothingReturnTrue))); } - return decoder.Pass(); + return decoder; } scoped_ptr<media::VideoDecodeAccelerator> @@ -530,7 +526,7 @@ base::Bind(&DoNothingReturnTrue), rendering_helper_->GetGLContext().get())); #endif - return decoder.Pass(); + return decoder; } scoped_ptr<media::VideoDecodeAccelerator> @@ -547,7 +543,7 @@ base::ThreadTaskRunnerHandle::Get())); } #endif - return decoder.Pass(); + return decoder; } scoped_ptr<media::VideoDecodeAccelerator> @@ -564,7 +560,7 @@ base::ThreadTaskRunnerHandle::Get())); } #endif - return decoder.Pass(); + return decoder; } scoped_ptr<media::VideoDecodeAccelerator> @@ -575,7 +571,7 @@ base::Bind(&DoNothingReturnTrue), base::Bind(&GLRenderingVDAClient::BindImage, base::Unretained(this)))); #endif - return decoder.Pass(); + return decoder; } void GLRenderingVDAClient::BindImage(uint32_t client_texture_id, @@ -599,7 +595,7 @@ for (size_t i = 0; i < arraysize(decoders); ++i) { if (!decoders[i]) continue; - decoder_ = decoders[i].Pass(); + decoder_ = std::move(decoders[i]); weak_decoder_factory_.reset( new base::WeakPtrFactory<VideoDecodeAccelerator>(decoder_.get())); if (decoder_->Initialize(profile_, client)) {
diff --git a/content/common/gpu/media/video_encode_accelerator_unittest.cc b/content/common/gpu/media/video_encode_accelerator_unittest.cc index d5c882e..fe36686 100644 --- a/content/common/gpu/media/video_encode_accelerator_unittest.cc +++ b/content/common/gpu/media/video_encode_accelerator_unittest.cc
@@ -5,10 +5,10 @@ #include <inttypes.h> #include <stddef.h> #include <stdint.h> - #include <algorithm> #include <queue> #include <string> +#include <utility> #include "base/at_exit.h" #include "base/bind.h" @@ -310,7 +310,8 @@ } } } - LOG_ASSERT(test_stream->mapped_aligned_in_file.Initialize(dest_file.Pass())); + LOG_ASSERT( + test_stream->mapped_aligned_in_file.Initialize(std::move(dest_file))); // Assert that memory mapped of file starts at 64 byte boundary. So each // plane of frames also start at 64 byte boundary. @@ -398,7 +399,7 @@ bool run_at_fps, bool needs_encode_latency, bool verify_all_output) - : test_stream_data_(data.Pass()), + : test_stream_data_(std::move(data)), log_path_(log_path), run_at_fps_(run_at_fps), needs_encode_latency_(needs_encode_latency), @@ -605,7 +606,7 @@ LOG(FATAL) << "Unsupported profile: " << profile; } - return validator.Pass(); + return validator; } class VideoFrameQualityValidator { @@ -1048,7 +1049,7 @@ scoped_refptr<base::SingleThreadTaskRunner>( base::ThreadTaskRunnerHandle::Get()))); } - return encoder.Pass(); + return encoder; } scoped_ptr<media::VideoEncodeAccelerator> VEAClient::CreateV4L2VEA() { @@ -1059,7 +1060,7 @@ if (device) encoder.reset(new V4L2VideoEncodeAccelerator(device)); #endif - return encoder.Pass(); + return encoder; } scoped_ptr<media::VideoEncodeAccelerator> VEAClient::CreateVaapiVEA() { @@ -1067,7 +1068,7 @@ #if defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY) encoder.reset(new VaapiVideoEncodeAccelerator()); #endif - return encoder.Pass(); + return encoder; } void VEAClient::CreateEncoder() { @@ -1086,7 +1087,7 @@ for (size_t i = 0; i < arraysize(encoders); ++i) { if (!encoders[i]) continue; - encoder_ = encoders[i].Pass(); + encoder_ = std::move(encoders[i]); SetState(CS_ENCODER_SET); if (encoder_->Initialize(kInputFormat, test_stream_->visible_size, @@ -1779,7 +1780,7 @@ reinterpret_cast<content::VideoEncodeAcceleratorTestEnvironment*>( testing::AddGlobalTestEnvironment( new content::VideoEncodeAcceleratorTestEnvironment( - test_stream_data.Pass(), log_path, run_at_fps, + std::move(test_stream_data), log_path, run_at_fps, needs_encode_latency, verify_all_output))); return RUN_ALL_TESTS();
diff --git a/content/renderer/android/synchronous_compositor_proxy.cc b/content/renderer/android/synchronous_compositor_proxy.cc index 89c803e7..6e4a899a 100644 --- a/content/renderer/android/synchronous_compositor_proxy.cc +++ b/content/renderer/android/synchronous_compositor_proxy.cc
@@ -34,6 +34,7 @@ input_handler_(handler), inside_receive_(false), hardware_draw_reply_(nullptr), + software_draw_reply_(nullptr), bytes_limit_(0u), version_(0u), page_scale_factor_(0.f), @@ -154,7 +155,8 @@ DemandDrawHw) IPC_MESSAGE_HANDLER(SyncCompositorMsg_SetSharedMemory, SetSharedMemory) IPC_MESSAGE_HANDLER(SyncCompositorMsg_ZeroSharedMemory, ZeroSharedMemory) - IPC_MESSAGE_HANDLER(SyncCompositorMsg_DemandDrawSw, DemandDrawSw) + IPC_MESSAGE_HANDLER_DELAY_REPLY(SyncCompositorMsg_DemandDrawSw, + DemandDrawSw) IPC_MESSAGE_HANDLER(SyncCompositorMsg_UpdateState, ProcessCommonParams) IPC_END_MESSAGE_MAP() } @@ -281,16 +283,27 @@ void SynchronousCompositorProxy::DemandDrawSw( const SyncCompositorCommonBrowserParams& common_params, const SyncCompositorDemandDrawSwParams& params, - bool* result, - SyncCompositorCommonRendererParams* common_renderer_params, - cc::CompositorFrame* frame) { + IPC::Message* reply_message) { DCHECK(!inside_receive_); - base::AutoReset<bool> scoped_inside_receive(&inside_receive_, true); - - DCHECK(frame); + inside_receive_ = true; ProcessCommonParams(common_params); - *result = false; // Early out ok. + { + base::AutoReset<IPC::Message*> scoped_software_draw_reply( + &software_draw_reply_, reply_message); + DoDemandDrawSw(params); + } + if (inside_receive_) { + // Did not swap. + cc::CompositorFrame empty_frame; + SendDemandDrawSwReply(false, &empty_frame, reply_message); + inside_receive_ = false; + } else { + DeliverMessages(); + } +} +void SynchronousCompositorProxy::DoDemandDrawSw( + const SyncCompositorDemandDrawSwParams& params) { DCHECK(software_draw_shm_->zeroed); software_draw_shm_->zeroed = false; @@ -308,24 +321,38 @@ canvas.setClipRegion(SkRegion(gfx::RectToSkIRect(params.clip))); output_surface_->DemandDrawSw(&canvas); - if (software_frame_holder_) { - *result = true; - software_frame_holder_->AssignTo(frame); - software_frame_holder_.reset(); - DeliverMessages(); - } - PopulateCommonParams(common_renderer_params); +} + +void SynchronousCompositorProxy::SwapBuffersSw(cc::CompositorFrame* frame) { + DCHECK(inside_receive_); + DCHECK(software_draw_reply_); + DCHECK(frame); + SendDemandDrawSwReply(true, frame, software_draw_reply_); + inside_receive_ = false; +} + +void SynchronousCompositorProxy::SendDemandDrawSwReply( + bool success, + cc::CompositorFrame* frame, + IPC::Message* reply_message) { + SyncCompositorCommonRendererParams common_renderer_params; + PopulateCommonParams(&common_renderer_params); + // Not using WriteParams because cc::CompositorFrame is not copy-able. + IPC::ParamTraits<bool>::Write(reply_message, success); + IPC::ParamTraits<SyncCompositorCommonRendererParams>::Write( + reply_message, common_renderer_params); + IPC::ParamTraits<cc::CompositorFrame>::Write(reply_message, *frame); + Send(reply_message); } void SynchronousCompositorProxy::SwapBuffers(cc::CompositorFrame* frame) { + DCHECK(hardware_draw_reply_ || software_draw_reply_); + DCHECK(!(hardware_draw_reply_ && software_draw_reply_)); if (hardware_draw_reply_) { SwapBuffersHw(frame); - return; + } else if (software_draw_reply_) { + SwapBuffersSw(frame); } - - DCHECK(!software_frame_holder_); - software_frame_holder_.reset(new cc::CompositorFrame); - frame->AssignTo(software_frame_holder_.get()); } void SynchronousCompositorProxy::OnComputeScroll(
diff --git a/content/renderer/android/synchronous_compositor_proxy.h b/content/renderer/android/synchronous_compositor_proxy.h index a97ff01..aca6819 100644 --- a/content/renderer/android/synchronous_compositor_proxy.h +++ b/content/renderer/android/synchronous_compositor_proxy.h
@@ -104,13 +104,16 @@ void ZeroSharedMemory(); void DemandDrawSw(const SyncCompositorCommonBrowserParams& common_params, const SyncCompositorDemandDrawSwParams& params, - bool* result, - SyncCompositorCommonRendererParams* common_renderer_params, - cc::CompositorFrame* frame); + IPC::Message* reply_message); void SwapBuffersHw(cc::CompositorFrame* frame); void SendDemandDrawHwReply(cc::CompositorFrame* frame, IPC::Message* reply_message); + void DoDemandDrawSw(const SyncCompositorDemandDrawSwParams& params); + void SwapBuffersSw(cc::CompositorFrame* frame); + void SendDemandDrawSwReply(bool success, + cc::CompositorFrame* frame, + IPC::Message* reply_message); void DidActivatePendingTree(); void DeliverMessages(); void SendAsyncRendererStateIfNeeded(); @@ -123,7 +126,7 @@ InputHandlerManagerClient::Handler* const input_handler_; bool inside_receive_; IPC::Message* hardware_draw_reply_; - scoped_ptr<cc::CompositorFrame> software_frame_holder_; + IPC::Message* software_draw_reply_; // From browser. size_t bytes_limit_;
diff --git a/content/renderer/dom_serializer_browsertest.cc b/content/renderer/dom_serializer_browsertest.cc index a726d9c..0b74e4a 100644 --- a/content/renderer/dom_serializer_browsertest.cc +++ b/content/renderer/dom_serializer_browsertest.cc
@@ -34,11 +34,11 @@ #include "third_party/WebKit/public/web/WebDocument.h" #include "third_party/WebKit/public/web/WebElement.h" #include "third_party/WebKit/public/web/WebElementCollection.h" +#include "third_party/WebKit/public/web/WebFrameSerializer.h" +#include "third_party/WebKit/public/web/WebFrameSerializerClient.h" #include "third_party/WebKit/public/web/WebLocalFrame.h" #include "third_party/WebKit/public/web/WebMetaElement.h" #include "third_party/WebKit/public/web/WebNode.h" -#include "third_party/WebKit/public/web/WebPageSerializer.h" -#include "third_party/WebKit/public/web/WebPageSerializerClient.h" #include "third_party/WebKit/public/web/WebView.h" using blink::WebCString; @@ -48,10 +48,10 @@ using blink::WebMetaElement; using blink::WebElementCollection; using blink::WebFrame; +using blink::WebFrameSerializer; +using blink::WebFrameSerializerClient; using blink::WebLocalFrame; using blink::WebNode; -using blink::WebPageSerializer; -using blink::WebPageSerializerClient; using blink::WebString; using blink::WebURL; using blink::WebView; @@ -79,7 +79,7 @@ }; class DomSerializerTests : public ContentBrowserTest, - public WebPageSerializerClient { + public WebFrameSerializerClient { public: DomSerializerTests() : serialization_reported_end_of_data_(false) {} @@ -98,7 +98,7 @@ // DomSerializerDelegate. void didSerializeDataForFrame(const WebCString& data, - PageSerializationStatus status) override { + FrameSerializationStatus status) override { // Check finish status of current frame. ASSERT_FALSE(serialization_reported_end_of_data_); @@ -106,7 +106,7 @@ serialized_contents_ += data; // Current frame is completed saving, change the finish status. - if (status == WebPageSerializerClient::CurrentFrameIsFinished) + if (status == WebFrameSerializerClient::CurrentFrameIsFinished) serialization_reported_end_of_data_ = true; } @@ -168,9 +168,9 @@ std::vector<std::pair<WebURL, WebString>> url_to_local_path; url_to_local_path.push_back(std::make_pair(WebURL(frame_url), file_path)); // Start serializing DOM. - bool result = WebPageSerializer::serialize( + bool result = WebFrameSerializer::serialize( web_frame->toWebLocalFrame(), - static_cast<WebPageSerializerClient*>(this), url_to_local_path); + static_cast<WebFrameSerializerClient*>(this), url_to_local_path); ASSERT_TRUE(result); } @@ -223,7 +223,7 @@ const GURL& file_url, const std::string& original_contents) { // Make sure original contents does not have MOTW; std::string motw_declaration = - WebPageSerializer::generateMarkOfTheWebDeclaration(file_url).utf8(); + WebFrameSerializer::generateMarkOfTheWebDeclaration(file_url).utf8(); ASSERT_FALSE(motw_declaration.empty()); // The encoding of original contents is ISO-8859-1, so we convert the MOTW // declaration to ASCII and search whether original contents has it or not. @@ -369,7 +369,7 @@ // Because we add MOTW when serializing DOM, so before comparison, we also // need to add MOTW to original_contents. std::string original_str = - WebPageSerializer::generateMarkOfTheWebDeclaration(file_url).utf8(); + WebFrameSerializer::generateMarkOfTheWebDeclaration(file_url).utf8(); original_str += original_contents; // Since WebCore now inserts a new HEAD element if there is no HEAD element // when creating BODY element. (Please see @@ -383,7 +383,7 @@ pos += htmlTag.length(); std::string head_part("<head>"); head_part += - WebPageSerializer::generateMetaCharsetDeclaration(encoding).utf8(); + WebFrameSerializer::generateMetaCharsetDeclaration(encoding).utf8(); head_part += "</head>"; original_str.insert(pos, head_part); } @@ -418,7 +418,7 @@ // Compare the serialized contents with original contents to make sure // they are same. std::string original_str = - WebPageSerializer::generateMarkOfTheWebDeclaration(file_url).utf8(); + WebFrameSerializer::generateMarkOfTheWebDeclaration(file_url).utf8(); original_str += original_contents; if (!doc.isNull()) { WebString encoding = web_frame->document().encoding(); @@ -428,7 +428,7 @@ pos += htmlTag.length(); std::string head_part("<head>"); head_part += - WebPageSerializer::generateMetaCharsetDeclaration(encoding).utf8(); + WebFrameSerializer::generateMetaCharsetDeclaration(encoding).utf8(); head_part += "</head>"; original_str.insert(pos, head_part); }
diff --git a/content/renderer/history_entry.h b/content/renderer/history_entry.h index 627419b..4209d72 100644 --- a/content/renderer/history_entry.h +++ b/content/renderer/history_entry.h
@@ -51,8 +51,6 @@ class RenderFrameImpl; class RenderViewImpl; -const int kInvalidFrameRoutingID = -1; - class CONTENT_EXPORT HistoryEntry { public: class HistoryNode {
diff --git a/content/renderer/media/media_stream_video_capturer_source_unittest.cc b/content/renderer/media/media_stream_video_capturer_source_unittest.cc index 79a2298..b26d74d5 100644 --- a/content/renderer/media/media_stream_video_capturer_source_unittest.cc +++ b/content/renderer/media/media_stream_video_capturer_source_unittest.cc
@@ -57,7 +57,6 @@ formats.push_back(kFormatLarge); callback.Run(formats); } - }; class MediaStreamVideoCapturerSourceTest : public testing::Test { @@ -214,8 +213,7 @@ StartCapture( testing::Field(&media::VideoCaptureParams::resolution_change_policy, media::RESOLUTION_POLICY_FIXED_ASPECT_RATIO), - _, _)) - ; + _, _)); blink::WebMediaStreamTrack track = StartSource(); // When the track goes out of scope, the source will be stopped. EXPECT_CALL(mock_delegate(), StopCapture()); @@ -249,8 +247,7 @@ StartCapture( testing::Field(&media::VideoCaptureParams::resolution_change_policy, media::RESOLUTION_POLICY_ANY_WITHIN_LIMIT), - _, _)) - ; + _, _)); blink::WebMediaStreamTrack track = StartSource(); // When the track goes out of scope, the source will be stopped. EXPECT_CALL(mock_delegate(), StopCapture());
diff --git a/content/renderer/media/render_media_client_unittest.cc b/content/renderer/media/render_media_client_unittest.cc index f40d0c5..5147c49 100644 --- a/content/renderer/media/render_media_client_unittest.cc +++ b/content/renderer/media/render_media_client_unittest.cc
@@ -67,7 +67,7 @@ #if defined(WIDEVINE_CDM_AVAILABLE) && defined(WIDEVINE_CDM_IS_COMPONENT) bool ContainsWidevine( const std::vector<media::KeySystemInfo>& key_systems_info) { - for (const auto& key_system_info: key_systems_info) { + for (const auto& key_system_info : key_systems_info) { if (key_system_info.key_system == kWidevineKeySystem) return true; } @@ -121,7 +121,6 @@ EXPECT_TRUE(clearkey_uma_name.empty()) << "Clear Key is added by media/ and " "should not be added by the " "MediaClient."; - ; } TEST_F(RenderMediaClientTest, IsKeySystemsUpdateNeeded) {
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc index 180be85..2de28798 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc
@@ -17,10 +17,12 @@ #include "base/files/file.h" #include "base/i18n/char_iterator.h" #include "base/logging.h" +#include "base/macros.h" #include "base/memory/shared_memory.h" #include "base/memory/weak_ptr.h" #include "base/metrics/histogram.h" #include "base/process/process.h" +#include "base/stl_util.h" #include "base/strings/string16.h" #include "base/strings/utf_string_conversions.h" #include "base/thread_task_runner_handle.h" @@ -127,6 +129,7 @@ #include "content/renderer/web_frame_utils.h" #include "content/renderer/web_ui_extension.h" #include "content/renderer/websharedworker_proxy.h" +#include "crypto/sha2.h" #include "gin/modules/module_registry.h" #include "media/audio/audio_output_device.h" #include "media/base/audio_renderer_mixer_input.h" @@ -151,12 +154,12 @@ #include "third_party/WebKit/public/platform/modules/webusb/WebUSBClient.h" #include "third_party/WebKit/public/web/WebColorSuggestion.h" #include "third_party/WebKit/public/web/WebDocument.h" +#include "third_party/WebKit/public/web/WebFrameSerializer.h" #include "third_party/WebKit/public/web/WebFrameWidget.h" #include "third_party/WebKit/public/web/WebKit.h" #include "third_party/WebKit/public/web/WebLocalFrame.h" #include "third_party/WebKit/public/web/WebMediaStreamRegistry.h" #include "third_party/WebKit/public/web/WebNavigationPolicy.h" -#include "third_party/WebKit/public/web/WebPageSerializer.h" #include "third_party/WebKit/public/web/WebPlugin.h" #include "third_party/WebKit/public/web/WebPluginParams.h" #include "third_party/WebKit/public/web/WebRange.h" @@ -237,6 +240,8 @@ using blink::WebExternalPopupMenu; using blink::WebExternalPopupMenuClient; using blink::WebFrame; +using blink::WebFrameSerializer; +using blink::WebFrameSerializerClient; using blink::WebHistoryItem; using blink::WebHTTPBody; using blink::WebLocalFrame; @@ -247,8 +252,6 @@ using blink::WebNavigationPolicy; using blink::WebNavigationType; using blink::WebNode; -using blink::WebPageSerializer; -using blink::WebPageSerializerClient; using blink::WebPluginParams; using blink::WebPopupMenuInfo; using blink::WebRange; @@ -580,6 +583,55 @@ path.NormalizePathSeparatorsTo(FILE_PATH_LITERAL('/')).AsUTF8Unsafe()); } +// Implementation of WebFrameSerializer::MHTMLPartsGenerationDelegate that +// 1. Bases shouldSkipResource and getContentID responses on contents of +// FrameMsg_SerializeAsMHTML_Params. +// 2. Stores digests of urls of serialized resources (i.e. urls reported via +// shouldSkipResource) into |digests_of_uris_of_serialized_resources| passed +// to the constructor. +class MHTMLPartsGenerationDelegate + : public WebFrameSerializer::MHTMLPartsGenerationDelegate { + public: + MHTMLPartsGenerationDelegate( + const FrameMsg_SerializeAsMHTML_Params& params, + std::set<std::string>* digests_of_uris_of_serialized_resources) + : params_(params), + digests_of_uris_of_serialized_resources_( + digests_of_uris_of_serialized_resources) { + DCHECK(digests_of_uris_of_serialized_resources_); + } + + bool shouldSkipResource(const WebURL& url) override { + std::string digest = + crypto::SHA256HashString(params_.salt + GURL(url).spec()); + + // Skip if the |url| already covered by serialization of an *earlier* frame. + if (ContainsKey(params_.digests_of_uris_to_skip, digest)) + return true; + + // Let's record |url| as being serialized for the *current* frame. + auto pair = digests_of_uris_of_serialized_resources_->insert(digest); + bool insertion_took_place = pair.second; + DCHECK(insertion_took_place); // Blink should dedupe within a frame. + + return false; + } + + WebString getContentID(const WebFrame& frame) override { + int routing_id = GetRoutingIdForFrameOrProxy(const_cast<WebFrame*>(&frame)); + auto it = params_.frame_routing_id_to_content_id.find(routing_id); + DCHECK(it != params_.frame_routing_id_to_content_id.end()); + const std::string& content_id = it->second; + return WebString::fromUTF8(content_id); + } + + private: + const FrameMsg_SerializeAsMHTML_Params& params_; + std::set<std::string>* digests_of_uris_of_serialized_resources_; + + DISALLOW_COPY_AND_ASSIGN(MHTMLPartsGenerationDelegate); +}; + bool IsContentWithCertificateErrorsRelevantToUI( const blink::WebURL& url, const blink::WebCString& security_info, @@ -4163,8 +4215,8 @@ void RenderFrameImpl::didSerializeDataForFrame( const WebCString& data, - WebPageSerializerClient::PageSerializationStatus status) { - bool end_of_data = status == WebPageSerializerClient::CurrentFrameIsFinished; + WebFrameSerializerClient::FrameSerializationStatus status) { + bool end_of_data = status == WebFrameSerializerClient::CurrentFrameIsFinished; Send(new FrameHostMsg_SerializedHtmlWithLocalLinksResponse( routing_id_, data, end_of_data)); } @@ -4760,39 +4812,29 @@ } // Serialize the frame (without recursing into subframes). - WebPageSerializer::serialize(GetWebFrame(), - this, // WebPageSerializerClient. - weburl_to_local_path); + WebFrameSerializer::serialize(GetWebFrame(), + this, // WebFrameSerializerClient. + weburl_to_local_path); } void RenderFrameImpl::OnSerializeAsMHTML( - int job_id, - IPC::PlatformFileForTransit file_for_transit, - const std::string& std_mhtml_boundary, - const std::map<int, std::string>& frame_routing_id_to_content_id, - bool is_last_frame) { + const FrameMsg_SerializeAsMHTML_Params& params) { // Unpack IPC payload. - base::File file = IPC::PlatformFileForTransitToFile(file_for_transit); - const WebString mhtml_boundary = WebString::fromUTF8(std_mhtml_boundary); + base::File file = IPC::PlatformFileForTransitToFile(params.destination_file); + const WebString mhtml_boundary = + WebString::fromUTF8(params.mhtml_boundary_marker); DCHECK(!mhtml_boundary.isEmpty()); - std::vector<std::pair<WebFrame*, WebString>> web_frame_to_content_id; - for (const auto& it : frame_routing_id_to_content_id) { - const std::string& content_id = it.second; - WebFrame* web_frame = GetWebFrameFromRoutingIdForFrameOrProxy(it.first); - if (!web_frame) - continue; - - web_frame_to_content_id.push_back( - std::make_pair(web_frame, WebString::fromUTF8(content_id))); - } WebData data; bool success = true; + std::set<std::string> digests_of_uris_of_serialized_resources; + MHTMLPartsGenerationDelegate delegate( + params, &digests_of_uris_of_serialized_resources); // Generate MHTML header if needed. if (IsMainFrame()) { data = - WebPageSerializer::generateMHTMLHeader(mhtml_boundary, GetWebFrame()); + WebFrameSerializer::generateMHTMLHeader(mhtml_boundary, GetWebFrame()); if (file.WriteAtCurrentPos(data.data(), data.size()) < 0) { success = false; } @@ -4800,8 +4842,8 @@ // Generate MHTML parts. if (success) { - data = WebPageSerializer::generateMHTMLParts( - mhtml_boundary, GetWebFrame(), false, web_frame_to_content_id); + data = WebFrameSerializer::generateMHTMLParts(mhtml_boundary, GetWebFrame(), + false, &delegate); // TODO(jcivelli): write the chunks in deferred tasks to give a chance to // the message loop to process other events. if (file.WriteAtCurrentPos(data.data(), data.size()) < 0) { @@ -4810,8 +4852,8 @@ } // Generate MHTML footer if needed. - if (success && is_last_frame) { - data = WebPageSerializer::generateMHTMLFooter(mhtml_boundary); + if (success && params.is_last_frame) { + data = WebFrameSerializer::generateMHTMLFooter(mhtml_boundary); if (file.WriteAtCurrentPos(data.data(), data.size()) < 0) { success = false; } @@ -4819,7 +4861,9 @@ // Cleanup and notify the browser process about completion. file.Close(); // Need to flush file contents before sending IPC response. - Send(new FrameHostMsg_SerializeAsMHTMLResponse(routing_id_, job_id, success)); + Send(new FrameHostMsg_SerializeAsMHTMLResponse( + routing_id_, params.job_id, success, + digests_of_uris_of_serialized_resources)); } void RenderFrameImpl::OpenURL(const GURL& url,
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h index 76e29252..833cfb28 100644 --- a/content/renderer/render_frame_impl.h +++ b/content/renderer/render_frame_impl.h
@@ -43,11 +43,12 @@ #include "third_party/WebKit/public/web/WebFrameClient.h" #include "third_party/WebKit/public/web/WebFrameLoadType.h" #include "third_party/WebKit/public/web/WebFrameOwnerProperties.h" +#include "third_party/WebKit/public/web/WebFrameSerializerClient.h" #include "third_party/WebKit/public/web/WebHistoryCommitType.h" #include "third_party/WebKit/public/web/WebMeaningfulLayout.h" -#include "third_party/WebKit/public/web/WebPageSerializerClient.h" #include "third_party/WebKit/public/web/WebScriptExecutionCallback.h" #include "ui/gfx/range/range.h" +#include "url/gurl.h" #if defined(ENABLE_PLUGINS) #include "content/renderer/pepper/plugin_power_saver_helper.h" @@ -61,10 +62,10 @@ #include "media/mojo/interfaces/service_factory.mojom.h" #endif -class GURL; class TransportDIB; struct FrameMsg_NewFrame_WidgetParams; struct FrameMsg_PostMessage_Params; +struct FrameMsg_SerializeAsMHTML_Params; struct FrameMsg_TextTrackSettings_Params; namespace blink { @@ -150,7 +151,7 @@ class CONTENT_EXPORT RenderFrameImpl : public RenderFrame, NON_EXPORTED_BASE(public blink::WebFrameClient), - NON_EXPORTED_BASE(public blink::WebPageSerializerClient) { + NON_EXPORTED_BASE(public blink::WebFrameSerializerClient) { public: // Creates a new RenderFrame as the main frame of |render_view|. static RenderFrameImpl* CreateMainFrame( @@ -614,10 +615,11 @@ blink::WebVRClient* webVRClient() override; #endif - // WebPageSerializerClient implementation: + // WebFrameSerializerClient implementation: void didSerializeDataForFrame( const blink::WebCString& data, - blink::WebPageSerializerClient::PageSerializationStatus status) override; + blink::WebFrameSerializerClient::FrameSerializationStatus status) + override; // Make this frame show an empty, unscriptable page. // TODO(nasko): Remove this method once swapped out state is no longer used. @@ -790,12 +792,7 @@ void OnGetSavableResourceLinks(); void OnGetSerializedHtmlWithLocalLinks( const std::map<GURL, base::FilePath>& url_to_local_path); - void OnSerializeAsMHTML( - int job_id, - IPC::PlatformFileForTransit file_for_transit, - const std::string& mhtml_boundary_marker, - const std::map<int, std::string>& frame_routing_id_to_content_id, - bool is_last_frame); + void OnSerializeAsMHTML(const FrameMsg_SerializeAsMHTML_Params& params); // Requests that the browser process navigates to |url|. If // |is_history_navigation_in_new_child| is true, the browser process should
diff --git a/content/zygote/zygote_main_linux.cc b/content/zygote/zygote_main_linux.cc index c5b0b8f..8a3221a 100644 --- a/content/zygote/zygote_main_linux.cc +++ b/content/zygote/zygote_main_linux.cc
@@ -588,7 +588,7 @@ #if defined(SANITIZER_COVERAGE) pid_t sancov_helper_pid = ForkSanitizerCoverageHelper( - sancov_socket_fds[0], sancov_socket_fds[1], sancov_file_fd.Pass(), + sancov_socket_fds[0], sancov_socket_fds[1], std::move(sancov_file_fd), sandbox_fds_to_close_post_fork); // It's important that the zygote reaps the helper before dying. Otherwise, // the destruction of the PID namespace could kill the helper before it
diff --git a/crypto/nss_util.cc b/crypto/nss_util.cc index 8e378f4..a7cb9e8 100644 --- a/crypto/nss_util.cc +++ b/crypto/nss_util.cc
@@ -3,7 +3,6 @@ // found in the LICENSE file. #include "crypto/nss_util.h" -#include "crypto/nss_util_internal.h" #include <nss.h> #include <pk11pub.h> @@ -12,6 +11,9 @@ #include <prinit.h> #include <prtime.h> #include <secmod.h> +#include <utility> + +#include "crypto/nss_util_internal.h" #if defined(OS_OPENBSD) #include <sys/mount.h> @@ -215,7 +217,7 @@ class ChromeOSUserData { public: explicit ChromeOSUserData(ScopedPK11Slot public_slot) - : public_slot_(public_slot.Pass()), + : public_slot_(std::move(public_slot)), private_slot_initialization_started_(false) {} ~ChromeOSUserData() { if (public_slot_) { @@ -241,7 +243,7 @@ void SetPrivateSlot(ScopedPK11Slot private_slot) { DCHECK(!private_slot_); - private_slot_ = private_slot.Pass(); + private_slot_ = std::move(private_slot); SlotReadyCallbackList callback_list; callback_list.swap(tpm_ready_callback_list_); @@ -422,7 +424,7 @@ << ", got tpm slot: " << !!tpm_args->tpm_slot; chaps_module_ = tpm_args->chaps_module; - tpm_slot_ = tpm_args->tpm_slot.Pass(); + tpm_slot_ = std::move(tpm_args->tpm_slot); if (!chaps_module_ && test_system_slot_) { // chromeos_unittests try to test the TPM initialization process. If we // have a test DB open, pretend that it is the TPM slot. @@ -500,7 +502,7 @@ "%s %s", kUserNSSDatabaseName, username_hash.c_str()); ScopedPK11Slot public_slot(OpenPersistentNSSDBForPath(db_name, path)); chromeos_user_map_[username_hash] = - new ChromeOSUserData(public_slot.Pass()); + new ChromeOSUserData(std::move(public_slot)); return true; } @@ -553,7 +555,7 @@ DVLOG(2) << "Got tpm slot for " << username_hash << " " << !!tpm_args->tpm_slot; chromeos_user_map_[username_hash]->SetPrivateSlot( - tpm_args->tpm_slot.Pass()); + std::move(tpm_args->tpm_slot)); } void InitializePrivateSoftwareSlotForChromeOSUser( @@ -615,7 +617,7 @@ // Ensure that a previous value of test_system_slot_ is not overwritten. // Unsetting, i.e. setting a NULL, however is allowed. DCHECK(!slot || !test_system_slot_); - test_system_slot_ = slot.Pass(); + test_system_slot_ = std::move(slot); if (test_system_slot_) { tpm_slot_.reset(PK11_ReferenceSlot(test_system_slot_.get())); RunAndClearTPMReadyCallbackList(); @@ -944,7 +946,7 @@ } void SetSystemKeySlotForTesting(ScopedPK11Slot slot) { - g_nss_singleton.Get().SetSystemKeySlotForTesting(slot.Pass()); + g_nss_singleton.Get().SetSystemKeySlotForTesting(std::move(slot)); } void EnableTPMTokenForNSS() {
diff --git a/device/bluetooth/bluetooth_socket_bluez.cc b/device/bluetooth/bluetooth_socket_bluez.cc index 5a82ef1..5365aca1 100644 --- a/device/bluetooth/bluetooth_socket_bluez.cc +++ b/device/bluetooth/bluetooth_socket_bluez.cc
@@ -457,14 +457,12 @@ LOG(WARNING) << uuid_.canonical_value() << " :" << fd->value() << ": Invalid file descriptor received from Bluetooth Daemon."; ui_task_runner()->PostTask(FROM_HERE, base::Bind(callback, REJECTED)); - ; return; } if (tcp_socket()) { LOG(WARNING) << uuid_.canonical_value() << ": Already connected"; ui_task_runner()->PostTask(FROM_HERE, base::Bind(callback, REJECTED)); - ; return; } @@ -478,7 +476,6 @@ LOG(WARNING) << uuid_.canonical_value() << ": Error adopting socket: " << std::string(net::ErrorToString(net_result)); ui_task_runner()->PostTask(FROM_HERE, base::Bind(callback, REJECTED)); - ; return; } @@ -486,7 +483,6 @@ << ": Taking descriptor, confirming success."; fd->TakeValue(); ui_task_runner()->PostTask(FROM_HERE, base::Bind(callback, SUCCESS)); - ; } void BluetoothSocketBlueZ::OnNewConnection(
diff --git a/device/hid/hid_service_linux.cc b/device/hid/hid_service_linux.cc index f48e473..0829576f 100644 --- a/device/hid/hid_service_linux.cc +++ b/device/hid/hid_service_linux.cc
@@ -272,7 +272,7 @@ fd.CheckValidity(); if (fd.is_valid()) { params->device_file = base::File(fd.TakeValue()); - FinishOpen(params.Pass()); + FinishOpen(std::move(params)); } else { HID_LOG(EVENT) << "Permission broker denied access to '" << params->device_info->device_node() << "'.";
diff --git a/extensions/browser/api/networking_config/networking_config_service.cc b/extensions/browser/api/networking_config/networking_config_service.cc index 0ac4c89..0f14345 100644 --- a/extensions/browser/api/networking_config/networking_config_service.cc +++ b/extensions/browser/api/networking_config/networking_config_service.cc
@@ -2,10 +2,12 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "extensions/browser/api/networking_config/networking_config_service.h" + #include <stddef.h> #include <stdint.h> - #include <algorithm> +#include <utility> #include <vector> #include "base/bind.h" @@ -16,7 +18,6 @@ #include "chromeos/network/network_handler.h" #include "chromeos/network/network_state.h" #include "chromeos/network/network_state_handler.h" -#include "extensions/browser/api/networking_config/networking_config_service.h" #include "extensions/common/api/networking_config.h" namespace extensions { @@ -54,7 +55,7 @@ ExtensionRegistry* extension_registry) : browser_context_(browser_context), registry_observer_(this), - event_delegate_(event_delegate.Pass()), + event_delegate_(std::move(event_delegate)), weak_factory_(this) { registry_observer_.Add(extension_registry); } @@ -158,7 +159,7 @@ } EventRouter::Get(browser_context_) - ->DispatchEventToExtension(extension_id, event.Pass()); + ->DispatchEventToExtension(extension_id, std::move(event)); } void NetworkingConfigService::OnGetPropertiesFailed( @@ -171,7 +172,7 @@ scoped_ptr<Event> event = CreatePortalDetectedEventAndDispatch(extension_id, guid, nullptr); EventRouter::Get(browser_context_) - ->DispatchEventToExtension(extension_id, event.Pass()); + ->DispatchEventToExtension(extension_id, std::move(event)); } scoped_ptr<Event> NetworkingConfigService::CreatePortalDetectedEventAndDispatch( @@ -199,8 +200,8 @@ scoped_ptr<Event> event( new Event(events::NETWORKING_CONFIG_ON_CAPTIVE_PORTAL_DETECTED, api::networking_config::OnCaptivePortalDetected::kEventName, - results.Pass())); - return event.Pass(); + std::move(results))); + return event; } void NetworkingConfigService::DispatchPortalDetectedEvent(
diff --git a/extensions/browser/api/networking_config/networking_config_service_chromeos_unittest.cc b/extensions/browser/api/networking_config/networking_config_service_chromeos_unittest.cc index c7b62347..93bab3a 100644 --- a/extensions/browser/api/networking_config/networking_config_service_chromeos_unittest.cc +++ b/extensions/browser/api/networking_config/networking_config_service_chromeos_unittest.cc
@@ -3,6 +3,9 @@ // found in the LICENSE file. #include "extensions/browser/api/networking_config/networking_config_service.h" + +#include <utility> + #include "extensions/browser/api_unittest.h" #include "extensions/browser/extension_registry.h" #include "testing/gtest/include/gtest/gtest.h" @@ -47,7 +50,7 @@ scoped_ptr<MockEventDelegate> mock_event_delegate = scoped_ptr<MockEventDelegate>(new MockEventDelegate()); service_ = scoped_ptr<NetworkingConfigService>(new NetworkingConfigService( - browser_context(), mock_event_delegate.Pass(), + browser_context(), std::move(mock_event_delegate), extension_registry_.get())); DCHECK(service_); }
diff --git a/extensions/browser/api/socket/app_firewall_hole_manager.cc b/extensions/browser/api/socket/app_firewall_hole_manager.cc index 76e6b8b0..f597373 100644 --- a/extensions/browser/api/socket/app_firewall_hole_manager.cc +++ b/extensions/browser/api/socket/app_firewall_hole_manager.cc
@@ -100,7 +100,7 @@ scoped_ptr<FirewallHole> firewall_hole) { if (app_visible_) { DCHECK(!firewall_hole_); - firewall_hole_ = firewall_hole.Pass(); + firewall_hole_ = std::move(firewall_hole); } } @@ -127,7 +127,7 @@ if (HasVisibleAppWindows(context_, extension_id)) { hole->SetVisible(true); } - return hole.Pass(); + return hole; } void AppFirewallHoleManager::Close(AppFirewallHole* hole) {
diff --git a/extensions/browser/api/socket/socket.h b/extensions/browser/api/socket/socket.h index 8929534..99b02ec1 100644 --- a/extensions/browser/api/socket/socket.h +++ b/extensions/browser/api/socket/socket.h
@@ -66,7 +66,7 @@ void set_firewall_hole( scoped_ptr<AppFirewallHole, content::BrowserThread::DeleteOnUIThread> firewall_hole) { - firewall_hole_ = firewall_hole.Pass(); + firewall_hole_ = std::move(firewall_hole); } #endif // OS_CHROMEOS
diff --git a/extensions/browser/api/socket/socket_api.cc b/extensions/browser/api/socket/socket_api.cc index 156449f..b5499e3 100644 --- a/extensions/browser/api/socket/socket_api.cc +++ b/extensions/browser/api/socket/socket_api.cc
@@ -4,6 +4,7 @@ #include "extensions/browser/api/socket/socket_api.h" +#include <utility> #include <vector> #include "base/bind.h" @@ -164,7 +165,7 @@ return; } - socket->set_firewall_hole(hole.Pass()); + socket->set_firewall_hole(std::move(hole)); AsyncWorkCompleted(); }
diff --git a/extensions/browser/api/vpn_provider/vpn_service.cc b/extensions/browser/api/vpn_provider/vpn_service.cc index 96092a2..1214a3b 100644 --- a/extensions/browser/api/vpn_provider/vpn_service.cc +++ b/extensions/browser/api/vpn_provider/vpn_service.cc
@@ -5,6 +5,7 @@ #include "extensions/browser/api/vpn_provider/vpn_service.h" #include <stdint.h> +#include <utility> #include <vector> #include "base/bind.h" @@ -102,7 +103,7 @@ api_vpn::OnPacketReceived::Create(data); vpn_service_->SendSignalToExtension( extension_id_, extensions::events::VPN_PROVIDER_ON_PACKET_RECEIVED, - api_vpn::OnPacketReceived::kEventName, event_args.Pass()); + api_vpn::OnPacketReceived::kEventName, std::move(event_args)); } void VpnService::VpnConfiguration::OnPlatformMessage(uint32_t message) { @@ -123,7 +124,7 @@ vpn_service_->SendSignalToExtension( extension_id_, extensions::events::VPN_PROVIDER_ON_PLATFORM_MESSAGE, - api_vpn::OnPlatformMessage::kEventName, event_args.Pass()); + api_vpn::OnPlatformMessage::kEventName, std::move(event_args)); } VpnService::VpnService( @@ -224,7 +225,7 @@ SendSignalToExtension(configuration->extension_id(), extensions::events::VPN_PROVIDER_ON_CONFIG_REMOVED, api_vpn::OnConfigRemoved::kEventName, - event_args.Pass()); + std::move(event_args)); DestroyConfigurationInternal(configuration); } @@ -528,9 +529,9 @@ const std::string& event_name, scoped_ptr<base::ListValue> event_args) { scoped_ptr<extensions::Event> event(new extensions::Event( - histogram_value, event_name, event_args.Pass(), browser_context_)); + histogram_value, event_name, std::move(event_args), browser_context_)); - event_router_->DispatchEventToExtension(extension_id, event.Pass()); + event_router_->DispatchEventToExtension(extension_id, std::move(event)); } void VpnService::SetActiveConfiguration(
diff --git a/extensions/browser/api/webcam_private/visca_webcam.cc b/extensions/browser/api/webcam_private/visca_webcam.cc index 0877624..18c847b7 100644 --- a/extensions/browser/api/webcam_private/visca_webcam.cc +++ b/extensions/browser/api/webcam_private/visca_webcam.cc
@@ -6,6 +6,7 @@ #include <stddef.h> #include <stdint.h> +#include <utility> #include "base/bind.h" #include "base/macros.h" @@ -489,7 +490,7 @@ void ViscaWebcam::OpenForTesting( scoped_ptr<SerialConnection> serial_connection) { - serial_connection_ = serial_connection.Pass(); + serial_connection_ = std::move(serial_connection); } SerialConnection* ViscaWebcam::GetSerialConnectionForTesting() {
diff --git a/gpu/gles2_conform_support/gles2_conform_test.gyp b/gpu/gles2_conform_support/gles2_conform_test.gyp index 0571dd8..15650cf 100644 --- a/gpu/gles2_conform_support/gles2_conform_test.gyp +++ b/gpu/gles2_conform_support/gles2_conform_test.gyp
@@ -13,6 +13,16 @@ '<(SHARED_INTERMEDIATE_DIR)/gles2_conform_test_embedded_data', '../../third_party/gles2_conform/GTF_ES/glsl/GTF/Source', ], + 'variables': { + 'clang_warning_flags': [ + # Many struct initializers in the GTF_ES code are missing braces. + '-Wno-missing-braces', + # A few variables are unitialized if GLVersion != 2.0. + '-Wno-sometimes-uninitialized', + # GTFVecBase.h contains static no-inline functions in a header :-/ + '-Wno-unused-function', + ], + }, }, 'targets': [ {
diff --git a/ios/chrome/browser/passwords/ios_chrome_save_password_infobar_delegate.h b/ios/chrome/browser/passwords/ios_chrome_save_password_infobar_delegate.h index 4fb0b20..76cbf33 100644 --- a/ios/chrome/browser/passwords/ios_chrome_save_password_infobar_delegate.h +++ b/ios/chrome/browser/passwords/ios_chrome_save_password_infobar_delegate.h
@@ -46,6 +46,7 @@ // ConfirmInfoBarDelegate implementation. Type GetInfoBarType() const override; + infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override; base::string16 GetMessageText() const override; base::string16 GetLinkText() const override; base::string16 GetButtonLabel(InfoBarButton button) const override;
diff --git a/ios/chrome/browser/passwords/ios_chrome_save_password_infobar_delegate.mm b/ios/chrome/browser/passwords/ios_chrome_save_password_infobar_delegate.mm index b15e427..045bec9 100644 --- a/ios/chrome/browser/passwords/ios_chrome_save_password_infobar_delegate.mm +++ b/ios/chrome/browser/passwords/ios_chrome_save_password_infobar_delegate.mm
@@ -55,6 +55,11 @@ return PAGE_ACTION_TYPE; } +infobars::InfoBarDelegate::InfoBarIdentifier +IOSChromeSavePasswordInfoBarDelegate::GetIdentifier() const { + return IOS_CHROME_SAVE_PASSWORD_INFOBAR_DELEGATE; +} + base::string16 IOSChromeSavePasswordInfoBarDelegate::GetMessageText() const { if (is_smart_lock_branding_enabled_) { return l10n_util::GetStringUTF16(
diff --git a/ios/chrome/browser/sync/ios_chrome_sync_client.cc b/ios/chrome/browser/sync/ios_chrome_sync_client.cc index 3b538fe..b6f7858b 100644 --- a/ios/chrome/browser/sync/ios_chrome_sync_client.cc +++ b/ios/chrome/browser/sync/ios_chrome_sync_client.cc
@@ -323,9 +323,6 @@ : base::WeakPtr<syncer::SyncableService>(); } default: - // TODO(crbug.com/562170) The following datatypes still need to be - // transitioned to the syncer::SyncableService API: - // Bookmarks NOTREACHED(); return base::WeakPtr<syncer::SyncableService>(); }
diff --git a/ios/public/provider/chrome/browser/signin/chrome_identity_service.h b/ios/public/provider/chrome/browser/signin/chrome_identity_service.h index cb45e1b..771af5e 100644 --- a/ios/public/provider/chrome/browser/signin/chrome_identity_service.h +++ b/ios/public/provider/chrome/browser/signin/chrome_identity_service.h
@@ -38,6 +38,10 @@ // Callback passed to method |GetAvatarForIdentity()|. typedef void (^GetAvatarCallback)(UIImage* avatar); +// Callback passed to method |GetHostedDomainForIdentity()|. +typedef void (^GetHostedDomainCallback)(NSString* hosted_domain, + NSError* error); + // ChromeIdentityService abstracts the signin flow on iOS. class ChromeIdentityService { public: @@ -134,6 +138,11 @@ // GetAvatarForIdentity() should be generally used instead of this method. virtual UIImage* GetCachedAvatarForIdentity(ChromeIdentity* identity); + // Fetches the identity hosted domain, from the cache or the network. Calls + // back on the main thread. + virtual void GetHostedDomainForIdentity(ChromeIdentity* identity, + GetHostedDomainCallback callback); + // Adds and removes observers. void AddObserver(Observer* observer); void RemoveObserver(Observer* observer);
diff --git a/ios/public/provider/chrome/browser/signin/chrome_identity_service.mm b/ios/public/provider/chrome/browser/signin/chrome_identity_service.mm index 55a228c..13df546 100644 --- a/ios/public/provider/chrome/browser/signin/chrome_identity_service.mm +++ b/ios/public/provider/chrome/browser/signin/chrome_identity_service.mm
@@ -70,6 +70,10 @@ return nil; } +void ChromeIdentityService::GetHostedDomainForIdentity( + ChromeIdentity* identity, + GetHostedDomainCallback callback) {} + void ChromeIdentityService::AddObserver(Observer* observer) { observer_list_.AddObserver(observer); }
diff --git a/media/BUILD.gn b/media/BUILD.gn index 3180c7ac..b0bf9d6 100644 --- a/media/BUILD.gn +++ b/media/BUILD.gn
@@ -821,6 +821,15 @@ } } +# TODO(GYP): Delete this after we've converted everything to GN. +# The _run targets exist only for compatibility w/ GYP. +group("audio_unittests_run") { + testonly = true + deps = [ + ":audio_unittests", + ] +} + # For running the subset of media_unittests that might require audio hardware # separately on GPU bots. media_unittests includes these too. test("audio_unittests") {
diff --git a/media/base/android/media_codec_decoder_unittest.cc b/media/base/android/media_codec_decoder_unittest.cc index 80f1cb6..ea0ffb3 100644 --- a/media/base/android/media_codec_decoder_unittest.cc +++ b/media/base/android/media_codec_decoder_unittest.cc
@@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include <utility> + #include "base/bind.h" #include "base/logging.h" #include "base/macros.h" @@ -156,7 +158,7 @@ const base::TimeDelta& timeout = kDefaultTimeout); void SetDataFactory(scoped_ptr<TestDataFactory> factory) { - data_factory_ = factory.Pass(); + data_factory_ = std::move(factory); } DemuxerConfigs GetConfigs() const { @@ -320,7 +322,7 @@ ASSERT_NE(nullptr, decoder_.get()); MediaCodecVideoDecoder* video_decoder = static_cast<MediaCodecVideoDecoder*>(decoder_.get()); - video_decoder->SetVideoSurface(surface.Pass()); + video_decoder->SetVideoSurface(std::move(surface)); } TEST_F(MediaCodecDecoderTest, AudioPrefetch) { @@ -446,7 +448,7 @@ MediaCodecVideoDecoder* video_decoder = static_cast<MediaCodecVideoDecoder*>(decoder_.get()); - video_decoder->SetVideoSurface(surface.Pass()); + video_decoder->SetVideoSurface(std::move(surface)); EXPECT_EQ(MediaCodecDecoder::kConfigFailure, decoder_->Configure(nullptr)); }
diff --git a/media/base/android/media_codec_player.cc b/media/base/android/media_codec_player.cc index 6c15652..6e3e1a9 100644 --- a/media/base/android/media_codec_player.cc +++ b/media/base/android/media_codec_player.cc
@@ -4,6 +4,8 @@ #include "media/base/android/media_codec_player.h" +#include <utility> + #include "base/barrier_closure.h" #include "base/bind.h" #include "base/bind_helpers.h" @@ -45,7 +47,7 @@ on_decoder_resources_released_cb, frame_url), ui_task_runner_(base::ThreadTaskRunnerHandle::Get()), - demuxer_(demuxer.Pass()), + demuxer_(std::move(demuxer)), state_(kStatePaused), interpolator_(&default_tick_clock_), pending_start_(false), @@ -159,7 +161,7 @@ return; } - video_decoder_->SetVideoSurface(surface.Pass()); + video_decoder_->SetVideoSurface(std::move(surface)); if (surface_is_empty) { // Remove video surface. @@ -957,7 +959,7 @@ return; } - media_crypto_ = media_crypto.Pass(); + media_crypto_ = std::move(media_crypto); if (audio_decoder_) { audio_decoder_->SetNeedsReconfigure();
diff --git a/media/base/android/media_codec_player_unittest.cc b/media/base/android/media_codec_player_unittest.cc index b687989..a3791d00 100644 --- a/media/base/android/media_codec_player_unittest.cc +++ b/media/base/android/media_codec_player_unittest.cc
@@ -2,14 +2,16 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "media/base/android/media_codec_player.h" + #include <stdint.h> +#include <utility> #include "base/bind.h" #include "base/logging.h" #include "base/macros.h" #include "base/timer/timer.h" #include "media/base/android/demuxer_android.h" -#include "media/base/android/media_codec_player.h" #include "media/base/android/media_codec_util.h" #include "media/base/android/media_player_manager.h" #include "media/base/android/media_task_runner.h" @@ -345,12 +347,12 @@ // Sets the audio data factory. void SetAudioFactory(scoped_ptr<AudioFactory> factory) { - audio_factory_ = factory.Pass(); + audio_factory_ = std::move(factory); } // Sets the video data factory. void SetVideoFactory(scoped_ptr<VideoFactory> factory) { - video_factory_ = factory.Pass(); + video_factory_ = std::move(factory); } // Accessors for data factories. @@ -650,7 +652,7 @@ gfx::ScopedJavaSurface surface(surface_texture_a_.get()); ASSERT_NE(nullptr, player_); - player_->SetVideoSurface(surface.Pass()); + player_->SetVideoSurface(std::move(surface)); } void MediaCodecPlayerTest::SetVideoSurfaceB() { @@ -658,7 +660,7 @@ gfx::ScopedJavaSurface surface(surface_texture_b_.get()); ASSERT_NE(nullptr, player_); - player_->SetVideoSurface(surface.Pass()); + player_->SetVideoSurface(std::move(surface)); } void MediaCodecPlayerTest::RemoveVideoSurface() { @@ -749,8 +751,8 @@ scoped_ptr<VideoFactory> video_factory, uint32_t flags, const char* test_name) { - demuxer_->SetAudioFactory(audio_factory.Pass()); - demuxer_->SetVideoFactory(video_factory.Pass()); + demuxer_->SetAudioFactory(std::move(audio_factory)); + demuxer_->SetVideoFactory(std::move(video_factory)); CreatePlayer(); SetVideoSurface(); @@ -810,8 +812,8 @@ const char* test_name) { // Initialize A/V playback - demuxer_->SetAudioFactory(audio_factory.Pass()); - demuxer_->SetVideoFactory(video_factory.Pass()); + demuxer_->SetAudioFactory(std::move(audio_factory)); + demuxer_->SetVideoFactory(std::move(video_factory)); CreatePlayer(); SetVideoSurface(); @@ -1545,8 +1547,8 @@ demuxer_->SetVideoPrerollInterval(preroll_intvl); - ASSERT_TRUE(StartAVSeekAndPreroll(audio_factory.Pass(), video_factory.Pass(), - seek_position, 0, + ASSERT_TRUE(StartAVSeekAndPreroll(std::move(audio_factory), + std::move(video_factory), seek_position, 0, "AVPrerollAudioWaitsForVideo")); // Wait till preroll finishes and the real playback starts. @@ -1594,8 +1596,8 @@ demuxer_->SetVideoPrerollInterval(preroll_intvl); - ASSERT_TRUE(StartAVSeekAndPreroll(audio_factory.Pass(), video_factory.Pass(), - seek_position, 0, + ASSERT_TRUE(StartAVSeekAndPreroll(std::move(audio_factory), + std::move(video_factory), seek_position, 0, "AVPrerollReleaseAndRestart")); // Issue Release(). @@ -1668,8 +1670,8 @@ demuxer_->SetVideoPrerollInterval(preroll_intvl); - ASSERT_TRUE(StartAVSeekAndPreroll(audio_factory.Pass(), video_factory.Pass(), - seek_position, 0, + ASSERT_TRUE(StartAVSeekAndPreroll(std::move(audio_factory), + std::move(video_factory), seek_position, 0, "AVPrerollStopAndRestart")); // Video stream should be prerolling. Request to stop. @@ -1911,8 +1913,8 @@ video_factory->RequestConfigChange(config_change_position); - ASSERT_TRUE(StartAVPlayback(audio_factory.Pass(), video_factory.Pass(), - kAlwaysReconfigVideo, + ASSERT_TRUE(StartAVPlayback(std::move(audio_factory), + std::move(video_factory), kAlwaysReconfigVideo, "AVVideoConfigChangeWhilePlaying")); // Wait till completion @@ -1957,8 +1959,8 @@ audio_factory->RequestConfigChange(config_change_position); - ASSERT_TRUE(StartAVPlayback(audio_factory.Pass(), video_factory.Pass(), - kAlwaysReconfigAudio, + ASSERT_TRUE(StartAVPlayback(std::move(audio_factory), + std::move(video_factory), kAlwaysReconfigAudio, "AVAudioConfigChangeWhilePlaying")); // Wait till completion @@ -2003,7 +2005,8 @@ audio_factory->RequestConfigChange(config_change_audio); video_factory->RequestConfigChange(config_change_video); - ASSERT_TRUE(StartAVPlayback(audio_factory.Pass(), video_factory.Pass(), + ASSERT_TRUE(StartAVPlayback(std::move(audio_factory), + std::move(video_factory), kAlwaysReconfigAudio | kAlwaysReconfigVideo, "AVSimultaneousConfigChange_1")); @@ -2050,7 +2053,8 @@ audio_factory->RequestConfigChange(config_change_audio); video_factory->RequestConfigChange(config_change_video); - ASSERT_TRUE(StartAVPlayback(audio_factory.Pass(), video_factory.Pass(), + ASSERT_TRUE(StartAVPlayback(std::move(audio_factory), + std::move(video_factory), kAlwaysReconfigAudio | kAlwaysReconfigVideo, "AVSimultaneousConfigChange_2")); @@ -2094,8 +2098,8 @@ video_factory->RequestConfigChange(config_change_video); - ASSERT_TRUE(StartAVPlayback(audio_factory.Pass(), video_factory.Pass(), - kAlwaysReconfigVideo, + ASSERT_TRUE(StartAVPlayback(std::move(audio_factory), + std::move(video_factory), kAlwaysReconfigVideo, "AVAudioEndsAcrossVideoConfigChange")); // Wait till completion @@ -2143,8 +2147,8 @@ audio_factory->RequestConfigChange(config_change_audio); - ASSERT_TRUE(StartAVPlayback(audio_factory.Pass(), video_factory.Pass(), - kAlwaysReconfigAudio, + ASSERT_TRUE(StartAVPlayback(std::move(audio_factory), + std::move(video_factory), kAlwaysReconfigAudio, "AVVideoEndsAcrossAudioConfigChange")); // Wait till completion @@ -2186,9 +2190,9 @@ scoped_ptr<VideoFactory> video_factory(new VideoFactory(duration)); video_factory->RequestConfigChange(config_change_position); - ASSERT_TRUE(StartAVSeekAndPreroll(audio_factory.Pass(), video_factory.Pass(), - seek_position, kAlwaysReconfigVideo, - "AVPrerollAcrossVideoConfigChange")); + ASSERT_TRUE(StartAVSeekAndPreroll( + std::move(audio_factory), std::move(video_factory), seek_position, + kAlwaysReconfigVideo, "AVPrerollAcrossVideoConfigChange")); // Wait till preroll finishes and the real playback starts. EXPECT_TRUE( @@ -2235,9 +2239,9 @@ scoped_ptr<VideoFactory> video_factory(new VideoFactory(duration)); - ASSERT_TRUE(StartAVSeekAndPreroll(audio_factory.Pass(), video_factory.Pass(), - seek_position, kAlwaysReconfigAudio, - "AVPrerollAcrossAudioConfigChange")); + ASSERT_TRUE(StartAVSeekAndPreroll( + std::move(audio_factory), std::move(video_factory), seek_position, + kAlwaysReconfigAudio, "AVPrerollAcrossAudioConfigChange")); // Wait till preroll finishes and the real playback starts. EXPECT_TRUE(
diff --git a/media/base/android/media_codec_video_decoder.cc b/media/base/android/media_codec_video_decoder.cc index 928f2e7..2726d3a 100644 --- a/media/base/android/media_codec_video_decoder.cc +++ b/media/base/android/media_codec_video_decoder.cc
@@ -4,6 +4,8 @@ #include "media/base/android/media_codec_video_decoder.h" +#include <utility> + #include "base/bind.h" #include "base/logging.h" #include "media/base/android/media_statistics.h" @@ -100,7 +102,7 @@ DVLOG(1) << class_name() << "::" << __FUNCTION__ << (surface.IsEmpty() ? " empty" : " non-empty"); - surface_ = surface.Pass(); + surface_ = std::move(surface); needs_reconfigure_ = true; }
diff --git a/media/base/android/media_drm_bridge.cc b/media/base/android/media_drm_bridge.cc index f3ba95d..5a29acd2 100644 --- a/media/base/android/media_drm_bridge.cc +++ b/media/base/android/media_drm_bridge.cc
@@ -5,8 +5,8 @@ #include "media/base/android/media_drm_bridge.h" #include <stddef.h> - #include <algorithm> +#include <utility> #include "base/android/build_info.h" #include "base/android/jni_array.h" @@ -29,7 +29,6 @@ #include "media/base/android/media_drm_bridge_delegate.h" #include "media/base/android/provision_fetcher.h" #include "media/base/cdm_key_information.h" - #include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR. using base::android::AttachCurrentThread; @@ -365,7 +364,7 @@ ScopedJavaLocalRef<jstring> j_mime = ConvertUTF8ToJavaString(env, ConvertInitDataType(init_data_type)); - uint32_t promise_id = cdm_promise_adapter_.SavePromise(promise.Pass()); + uint32_t promise_id = cdm_promise_adapter_.SavePromise(std::move(promise)); Java_MediaDrmBridge_createSessionFromNative( env, j_media_drm_.obj(), j_init_data.obj(), j_mime.obj(), j_optional_parameters.obj(), promise_id); @@ -393,7 +392,7 @@ ScopedJavaLocalRef<jbyteArray> j_session_id = base::android::ToJavaByteArray( env, reinterpret_cast<const uint8_t*>(session_id.data()), session_id.size()); - uint32_t promise_id = cdm_promise_adapter_.SavePromise(promise.Pass()); + uint32_t promise_id = cdm_promise_adapter_.SavePromise(std::move(promise)); Java_MediaDrmBridge_updateSession(env, j_media_drm_.obj(), j_session_id.obj(), j_response.obj(), promise_id); } @@ -406,7 +405,7 @@ ScopedJavaLocalRef<jbyteArray> j_session_id = base::android::ToJavaByteArray( env, reinterpret_cast<const uint8_t*>(session_id.data()), session_id.size()); - uint32_t promise_id = cdm_promise_adapter_.SavePromise(promise.Pass()); + uint32_t promise_id = cdm_promise_adapter_.SavePromise(std::move(promise)); Java_MediaDrmBridge_closeSession(env, j_media_drm_.obj(), j_session_id.obj(), promise_id); }
diff --git a/media/base/android/media_player_bridge.cc b/media/base/android/media_player_bridge.cc index e0cdb66..3a2a2308 100644 --- a/media/base/android/media_player_bridge.cc +++ b/media/base/android/media_player_bridge.cc
@@ -4,6 +4,8 @@ #include "media/base/android/media_player_bridge.h" +#include <utility> + #include "base/android/context_utils.h" #include "base/android/jni_android.h" #include "base/android/jni_string.h" @@ -109,7 +111,7 @@ } void MediaPlayerBridge::SetVideoSurface(gfx::ScopedJavaSurface surface) { - surface_ = surface.Pass(); + surface_ = std::move(surface); if (j_media_player_bridge_.is_null()) return; @@ -417,7 +419,7 @@ } if (!surface_.IsEmpty()) - SetVideoSurface(surface_.Pass()); + SetVideoSurface(std::move(surface_)); if (pending_play_) { StartInternal();
diff --git a/media/base/android/media_source_player.cc b/media/base/android/media_source_player.cc index c36d458..215577b 100644 --- a/media/base/android/media_source_player.cc +++ b/media/base/android/media_source_player.cc
@@ -6,8 +6,8 @@ #include <stddef.h> #include <stdint.h> - #include <limits> +#include <utility> #include "base/android/jni_android.h" #include "base/android/jni_string.h" @@ -37,7 +37,7 @@ manager, on_decoder_resources_released_cb, frame_url), - demuxer_(demuxer.Pass()), + demuxer_(std::move(demuxer)), pending_event_(NO_EVENT_PENDING), playing_(false), interpolator_(&default_tick_clock_), @@ -82,7 +82,7 @@ void MediaSourcePlayer::SetVideoSurface(gfx::ScopedJavaSurface surface) { DVLOG(1) << __FUNCTION__; - if (!video_decoder_job_->SetVideoSurface(surface.Pass())) + if (!video_decoder_job_->SetVideoSurface(std::move(surface))) return; // Retry video decoder creation. RetryDecoderCreation(false, true);
diff --git a/media/base/android/media_source_player_unittest.cc b/media/base/android/media_source_player_unittest.cc index 0704a49..ce9c5c4 100644 --- a/media/base/android/media_source_player_unittest.cc +++ b/media/base/android/media_source_player_unittest.cc
@@ -2,9 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include <stdint.h> +#include "media/base/android/media_source_player.h" +#include <stdint.h> #include <string> +#include <utility> #include "base/logging.h" #include "base/macros.h" @@ -15,7 +17,6 @@ #include "media/base/android/media_codec_util.h" #include "media/base/android/media_drm_bridge.h" #include "media/base/android/media_player_manager.h" -#include "media/base/android/media_source_player.h" #include "media/base/android/media_url_interceptor.h" #include "media/base/android/sdk_media_codec_bridge.h" #include "media/base/android/video_decoder_job.h" @@ -710,7 +711,7 @@ surface_texture_a_is_next_ = !surface_texture_a_is_next_; gfx::ScopedJavaSurface surface = gfx::ScopedJavaSurface(surface_texture); - player_.SetVideoSurface(surface.Pass()); + player_.SetVideoSurface(std::move(surface)); } // Wait for one or both of the jobs to complete decoding. Media codec bridges @@ -917,7 +918,7 @@ // Release the surface texture. surface_texture = NULL; - player_.SetVideoSurface(surface.Pass()); + player_.SetVideoSurface(std::move(surface)); // Player should not seek the demuxer on setting initial surface. EXPECT_EQ(0, demuxer_->num_seek_requests()); @@ -980,7 +981,7 @@ // While the decoder is decoding, change multiple surfaces. Pass an empty // surface first. gfx::ScopedJavaSurface empty_surface; - player_.SetVideoSurface(empty_surface.Pass()); + player_.SetVideoSurface(std::move(empty_surface)); // Next, pass a new non-empty surface. CreateNextTextureAndSetVideoSurface(); @@ -1020,7 +1021,7 @@ // While the decoder is decoding, pass an empty surface. gfx::ScopedJavaSurface empty_surface; - player_.SetVideoSurface(empty_surface.Pass()); + player_.SetVideoSurface(std::move(empty_surface)); // Let the player starve. However, it should not issue any new data request in // this case. TriggerPlayerStarvation();
diff --git a/media/base/android/sdk_media_codec_bridge.cc b/media/base/android/sdk_media_codec_bridge.cc index 7b9c9ab..87b1176 100644 --- a/media/base/android/sdk_media_codec_bridge.cc +++ b/media/base/android/sdk_media_codec_bridge.cc
@@ -6,6 +6,7 @@ #include <algorithm> #include <limits> +#include <utility> #include "base/android/build_info.h" #include "base/android/jni_android.h" @@ -196,9 +197,9 @@ } ScopedJavaLocalRef<jintArray> clear_array = - ToJavaIntArray(env, native_clear_array.Pass(), new_subsamples_size); + ToJavaIntArray(env, std::move(native_clear_array), new_subsamples_size); ScopedJavaLocalRef<jintArray> cypher_array = - ToJavaIntArray(env, native_cypher_array.Pass(), new_subsamples_size); + ToJavaIntArray(env, std::move(native_cypher_array), new_subsamples_size); return static_cast<MediaCodecStatus>( Java_MediaCodecBridge_queueSecureInputBuffer(
diff --git a/media/base/android/video_decoder_job.cc b/media/base/android/video_decoder_job.cc index 3dfe3b83..fa49ab3 100644 --- a/media/base/android/video_decoder_job.cc +++ b/media/base/android/video_decoder_job.cc
@@ -4,6 +4,8 @@ #include "media/base/android/video_decoder_job.h" +#include <utility> + #include "base/bind.h" #include "base/lazy_instance.h" #include "base/threading/thread.h" @@ -49,7 +51,7 @@ return false; } - surface_ = surface.Pass(); + surface_ = std::move(surface); need_to_reconfig_decoder_job_ = true; return true; }
diff --git a/media/blink/multibuffer_unittest.cc b/media/blink/multibuffer_unittest.cc index 63478ff..1b5f76b 100644 --- a/media/blink/multibuffer_unittest.cc +++ b/media/blink/multibuffer_unittest.cc
@@ -286,8 +286,8 @@ unsigned char buffer[27]; buffer[17] = 17; size_t to_read = std::min<size_t>(end - pos, 17); - while (AdvanceAll()) - ; + while (AdvanceAll()) { + } int64_t bytes = reader.TryRead(buffer, to_read); EXPECT_GT(bytes, 0); EXPECT_EQ(buffer[17], 17); @@ -316,8 +316,8 @@ unsigned char buffer[27]; buffer[17] = 17; size_t to_read = std::min<size_t>(end - pos, 17); - while (AdvanceAll()) - ; + while (AdvanceAll()) { + } int64_t bytes = reader.TryRead(buffer, to_read); EXPECT_GT(bytes, 0); EXPECT_EQ(buffer[17], 17); @@ -347,8 +347,8 @@ unsigned char buffer[27]; buffer[17] = 17; size_t to_read = std::min<size_t>(end - pos, 17); - while (AdvanceAll()) - ; + while (AdvanceAll()) { + } int64_t bytes = reader.TryRead(buffer, to_read); EXPECT_GT(bytes, 0); EXPECT_EQ(buffer[17], 17); @@ -375,8 +375,8 @@ // Note, no pinning, all data should end up in LRU. EXPECT_EQ(current_size, lru_->Size()); current_size += max_size; - while (AdvanceAll()) - ; + while (AdvanceAll()) { + } EXPECT_EQ(current_size, lru_->Size()); lru_->IncrementMaxSize(-max_size); lru_->Prune(3);
diff --git a/media/capture/video/android/video_capture_device_android.cc b/media/capture/video/android/video_capture_device_android.cc index e8f99f1..38d9c6d8 100644 --- a/media/capture/video/android/video_capture_device_android.cc +++ b/media/capture/video/android/video_capture_device_android.cc
@@ -5,6 +5,7 @@ #include "media/capture/video/android/video_capture_device_android.h" #include <stdint.h> +#include <utility> #include "base/android/jni_android.h" #include "base/android/jni_string.h" @@ -59,7 +60,7 @@ base::AutoLock lock(lock_); if (state_ != kIdle) return; - client_ = client.Pass(); + client_ = std::move(client); got_first_frame_ = false; }
diff --git a/media/capture/video/android/video_capture_device_factory_android.cc b/media/capture/video/android/video_capture_device_factory_android.cc index 485a256..1b931a5 100644 --- a/media/capture/video/android/video_capture_device_factory_android.cc +++ b/media/capture/video/android/video_capture_device_factory_android.cc
@@ -4,6 +4,8 @@ #include "media/capture/video/android/video_capture_device_factory_android.h" +#include <utility> + #include "base/android/context_utils.h" #include "base/android/jni_string.h" #include "base/strings/string_number_conversions.h" @@ -43,7 +45,7 @@ new VideoCaptureDeviceAndroid(device_name)); if (video_capture_device->Init()) - return video_capture_device.Pass(); + return std::move(video_capture_device); DLOG(ERROR) << "Error creating Video Capture Device."; return scoped_ptr<VideoCaptureDevice>();
diff --git a/media/capture/video/linux/v4l2_capture_delegate.h b/media/capture/video/linux/v4l2_capture_delegate.h index 7e3dbaec..56af8e55c 100644 --- a/media/capture/video/linux/v4l2_capture_delegate.h +++ b/media/capture/video/linux/v4l2_capture_delegate.h
@@ -70,7 +70,7 @@ // specific. virtual bool Init(int fd, const v4l2_buffer& buffer) = 0; - uint8_t* const GetPlaneStart(size_t plane) const { + const uint8_t* GetPlaneStart(size_t plane) const { DCHECK_LT(plane, planes_.size()); return planes_[plane].start; }
diff --git a/media/cast/net/rtcp/rtcp_unittest.cc b/media/cast/net/rtcp/rtcp_unittest.cc index 7b9b753..5262f69 100644 --- a/media/cast/net/rtcp/rtcp_unittest.cc +++ b/media/cast/net/rtcp/rtcp_unittest.cc
@@ -37,13 +37,12 @@ static const uint32_t kSenderSsrc = 0x10203; static const uint32_t kReceiverSsrc = 0x40506; static const int kInitialReceiverClockOffsetSeconds = -5; +static const uint16_t kTargetDelayMs = 100; class FakeRtcpTransport : public PacedPacketSender { public: explicit FakeRtcpTransport(base::SimpleTestTickClock* clock) - : clock_(clock), - packet_delay_(base::TimeDelta::FromMilliseconds(42)), - paused_(false) {} + : clock_(clock), packet_delay_(base::TimeDelta::FromMilliseconds(42)) {} void set_rtcp_destination(RtcpSession* rtcp_session) { rtcp_session_ = rtcp_session; @@ -54,11 +53,7 @@ bool SendRtcpPacket(uint32_t ssrc, PacketRef packet) final { clock_->Advance(packet_delay_); - if (paused_) { - packet_queue_.push_back(packet); - } else { - rtcp_session_->IncomingRtcpPacket(&packet->data[0], packet->data.size()); - } + rtcp_session_->IncomingRtcpPacket(&packet->data[0], packet->data.size()); return true; } @@ -71,46 +66,15 @@ void CancelSendingPacket(const PacketKey& packet_key) final {} - void Pause() { - paused_ = true; - } - - void Unpause() { - paused_ = false; - for (size_t i = 0; i < packet_queue_.size(); ++i) { - rtcp_session_->IncomingRtcpPacket(&packet_queue_[i]->data[0], - packet_queue_[i]->data.size()); - } - packet_queue_.clear(); - } - - void ReversePacketQueue() { - std::reverse(packet_queue_.begin(), packet_queue_.end()); - } - private: base::SimpleTestTickClock* const clock_; base::TimeDelta packet_delay_; RtcpSession* rtcp_session_; // RTCP destination. bool paused_; - std::vector<PacketRef> packet_queue_; DISALLOW_COPY_AND_ASSIGN(FakeRtcpTransport); }; -class MockFrameSender { - public: - MockFrameSender() {} - virtual ~MockFrameSender() {} - - MOCK_METHOD1(OnReceivedCastFeedback, - void(const RtcpCastMessage& cast_message)); - MOCK_METHOD1(OnMeasuredRoundTripTime, void(base::TimeDelta rtt)); - - private: - DISALLOW_COPY_AND_ASSIGN(MockFrameSender); -}; - class RtcpTest : public ::testing::Test { protected: RtcpTest() @@ -118,15 +82,16 @@ receiver_clock_(new test::SkewedTickClock(sender_clock_.get())), sender_to_receiver_(sender_clock_.get()), receiver_to_sender_(sender_clock_.get()), - rtcp_for_sender_(base::Bind(&MockFrameSender::OnReceivedCastFeedback, - base::Unretained(&mock_frame_sender_)), - base::Bind(&MockFrameSender::OnMeasuredRoundTripTime, - base::Unretained(&mock_frame_sender_)), - RtcpLogMessageCallback(), - sender_clock_.get(), - &sender_to_receiver_, - kSenderSsrc, - kReceiverSsrc), + rtcp_for_sender_( + base::Bind(&RtcpTest::OnReceivedCastFeedback, + base::Unretained(this)), + base::Bind(&RtcpTest::OnMeasuredRoundTripTime, + base::Unretained(this)), + base::Bind(&RtcpTest::OnReceivedLogs, base::Unretained(this)), + sender_clock_.get(), + &sender_to_receiver_, + kSenderSsrc, + kReceiverSsrc), rtcp_for_receiver_(receiver_clock_.get(), &receiver_to_sender_, kReceiverSsrc, @@ -142,14 +107,44 @@ ~RtcpTest() override {} + void OnReceivedCastFeedback(const RtcpCastMessage& cast_message) { + last_cast_message_ = cast_message; + } + + void OnMeasuredRoundTripTime(base::TimeDelta rtt) { + current_round_trip_time_ = rtt; + } + + void OnReceivedLogs(const RtcpReceiverLogMessage& receiver_logs) { + RtcpReceiverLogMessage().swap(last_logs_); + + // Make a copy of the logs. + for (const RtcpReceiverFrameLogMessage& frame_log_msg : receiver_logs) { + last_logs_.push_back( + RtcpReceiverFrameLogMessage(frame_log_msg.rtp_timestamp_)); + for (const RtcpReceiverEventLogMessage& event_log_msg : + frame_log_msg.event_log_messages_) { + RtcpReceiverEventLogMessage event_log; + event_log.type = event_log_msg.type; + event_log.event_timestamp = event_log_msg.event_timestamp; + event_log.delay_delta = event_log_msg.delay_delta; + event_log.packet_id = event_log_msg.packet_id; + last_logs_.back().event_log_messages_.push_back(event_log); + } + } + } + scoped_ptr<base::SimpleTestTickClock> sender_clock_; scoped_ptr<test::SkewedTickClock> receiver_clock_; FakeRtcpTransport sender_to_receiver_; FakeRtcpTransport receiver_to_sender_; - MockFrameSender mock_frame_sender_; SenderRtcpSession rtcp_for_sender_; ReceiverRtcpSession rtcp_for_receiver_; + base::TimeDelta current_round_trip_time_; + RtcpCastMessage last_cast_message_; + RtcpReceiverLogMessage last_logs_; + private: DISALLOW_COPY_AND_ASSIGN(RtcpTest); }; @@ -183,15 +178,8 @@ EXPECT_EQ(rtp_timestamp_sent, rtp_timestamp); } -// TODO(miu): There were a few tests here that didn't actually test anything -// except that the code wouldn't crash and a callback method was invoked. We -// need to fill-in more testing of RTCP now that much of the refactoring work -// has been completed. - TEST_F(RtcpTest, RoundTripTimesDeterminedFromReportPingPong) { const int iterations = 12; - EXPECT_CALL(mock_frame_sender_, OnMeasuredRoundTripTime(_)) - .Times(iterations); // Sender does not know the RTT yet. ASSERT_EQ(base::TimeDelta(), rtcp_for_sender_.current_round_trip_time()); @@ -214,102 +202,102 @@ EXPECT_EQ(expected_rtt_according_to_sender, rtcp_for_sender_.current_round_trip_time()); + // Validate last reported callback value is same as that reported by method. + EXPECT_EQ(current_round_trip_time_, + rtcp_for_sender_.current_round_trip_time()); + // Receiver --> Sender RtpReceiverStatistics stats; rtcp_for_receiver_.SendRtcpReport( - CreateRtcpTimeData(receiver_clock_->NowTicks()), NULL, - base::TimeDelta(), NULL, &stats); + CreateRtcpTimeData(receiver_clock_->NowTicks()), nullptr, + base::TimeDelta(), nullptr, &stats); expected_rtt_according_to_sender = one_way_trip_time * 2; EXPECT_EQ(expected_rtt_according_to_sender, rtcp_for_sender_.current_round_trip_time()); } } -TEST_F(RtcpTest, RejectOldRtcpPacket) { - EXPECT_CALL(mock_frame_sender_, OnReceivedCastFeedback(_)) - .Times(1); +TEST_F(RtcpTest, ReportCastFeedback) { + RtcpCastMessage cast_message(kSenderSsrc); + cast_message.ack_frame_id = 5; + PacketIdSet missing_packets1 = {3, 4}; + cast_message.missing_frames_and_packets[1] = missing_packets1; + PacketIdSet missing_packets2 = {5, 6}; + cast_message.missing_frames_and_packets[2] = missing_packets2; - // This is rejected. + rtcp_for_receiver_.SendRtcpReport( + CreateRtcpTimeData(base::TimeTicks()), &cast_message, + base::TimeDelta::FromMilliseconds(kTargetDelayMs), nullptr, nullptr); + + EXPECT_EQ(last_cast_message_.ack_frame_id, cast_message.ack_frame_id); + EXPECT_EQ(last_cast_message_.target_delay_ms, kTargetDelayMs); + EXPECT_EQ(last_cast_message_.missing_frames_and_packets.size(), + cast_message.missing_frames_and_packets.size()); + EXPECT_TRUE( + std::equal(cast_message.missing_frames_and_packets.begin(), + cast_message.missing_frames_and_packets.end(), + last_cast_message_.missing_frames_and_packets.begin())); +} + +TEST_F(RtcpTest, DropLateRtcpPacket) { RtcpCastMessage cast_message(kSenderSsrc); cast_message.ack_frame_id = 1; - receiver_to_sender_.Pause(); + rtcp_for_receiver_.SendRtcpReport( + CreateRtcpTimeData(receiver_clock_->NowTicks()), &cast_message, + base::TimeDelta::FromMilliseconds(kTargetDelayMs), nullptr, nullptr); + + // Send a packet with old timestamp + RtcpCastMessage late_cast_message(kSenderSsrc); + late_cast_message.ack_frame_id = 2; rtcp_for_receiver_.SendRtcpReport( CreateRtcpTimeData(receiver_clock_->NowTicks() - base::TimeDelta::FromSeconds(10)), - &cast_message, base::TimeDelta(), NULL, NULL); + &late_cast_message, base::TimeDelta(), nullptr, nullptr); - cast_message.ack_frame_id = 2; + // Validate data from second packet is dropped. + EXPECT_EQ(last_cast_message_.ack_frame_id, cast_message.ack_frame_id); + EXPECT_EQ(last_cast_message_.target_delay_ms, kTargetDelayMs); + + // Re-send with fresh timestamp + late_cast_message.ack_frame_id = 2; rtcp_for_receiver_.SendRtcpReport( - CreateRtcpTimeData(receiver_clock_->NowTicks()), &cast_message, - base::TimeDelta(), NULL, NULL); - - receiver_to_sender_.ReversePacketQueue(); - receiver_to_sender_.Unpause(); + CreateRtcpTimeData(receiver_clock_->NowTicks()), &late_cast_message, + base::TimeDelta(), nullptr, nullptr); + EXPECT_EQ(last_cast_message_.ack_frame_id, late_cast_message.ack_frame_id); + EXPECT_EQ(last_cast_message_.target_delay_ms, 0); } -TEST_F(RtcpTest, NegativeTimeTicks) { - EXPECT_CALL(mock_frame_sender_, OnReceivedCastFeedback(_)) - .Times(2); +TEST_F(RtcpTest, ReportReceiverEvents) { + const RtpTimeTicks kRtpTimeStamp = + media::cast::RtpTimeTicks().Expand(UINT32_C(100)); + const base::TimeTicks kEventTimestamp = receiver_clock_->NowTicks(); + const base::TimeDelta kDelayDelta = base::TimeDelta::FromMilliseconds(100); - // Send a RRTR with NTP timestamp that translates to a very negative - // value for TimeTicks. - RtcpCastMessage cast_message(kSenderSsrc); - cast_message.ack_frame_id = 2; + RtcpEvent event; + event.type = FRAME_ACK_SENT; + event.timestamp = kEventTimestamp; + event.delay_delta = kDelayDelta; + ReceiverRtcpEventSubscriber::RtcpEvents rtcp_events; + rtcp_events.push_back(std::make_pair(kRtpTimeStamp, event)); + rtcp_for_receiver_.SendRtcpReport( - CreateRtcpTimeData(base::TimeTicks() - base::TimeDelta::FromSeconds(5)), - &cast_message, base::TimeDelta(), NULL, NULL); + CreateRtcpTimeData(receiver_clock_->NowTicks()), nullptr, + base::TimeDelta(), &rtcp_events, nullptr); - cast_message.ack_frame_id = 1; - rtcp_for_receiver_.SendRtcpReport(CreateRtcpTimeData(base::TimeTicks()), - &cast_message, base::TimeDelta(), NULL, - NULL); -} + ASSERT_EQ(1UL, last_logs_.size()); + RtcpReceiverFrameLogMessage frame_log = last_logs_.front(); + EXPECT_EQ(frame_log.rtp_timestamp_, kRtpTimeStamp); -// TODO(miu): Find a better home for this test. -TEST(MisplacedCastTest, NtpAndTime) { - const int64_t kSecondsbetweenYear1900and2010 = INT64_C(40176 * 24 * 60 * 60); - const int64_t kSecondsbetweenYear1900and2030 = INT64_C(47481 * 24 * 60 * 60); - - uint32_t ntp_seconds_1 = 0; - uint32_t ntp_fraction_1 = 0; - base::TimeTicks input_time = base::TimeTicks::Now(); - ConvertTimeTicksToNtp(input_time, &ntp_seconds_1, &ntp_fraction_1); - - // Verify absolute value. - EXPECT_GT(ntp_seconds_1, kSecondsbetweenYear1900and2010); - EXPECT_LT(ntp_seconds_1, kSecondsbetweenYear1900and2030); - - base::TimeTicks out_1 = ConvertNtpToTimeTicks(ntp_seconds_1, ntp_fraction_1); - EXPECT_EQ(input_time, out_1); // Verify inverse. - - base::TimeDelta time_delta = base::TimeDelta::FromMilliseconds(1000); - input_time += time_delta; - - uint32_t ntp_seconds_2 = 0; - uint32_t ntp_fraction_2 = 0; - - ConvertTimeTicksToNtp(input_time, &ntp_seconds_2, &ntp_fraction_2); - base::TimeTicks out_2 = ConvertNtpToTimeTicks(ntp_seconds_2, ntp_fraction_2); - EXPECT_EQ(input_time, out_2); // Verify inverse. - - // Verify delta. - EXPECT_EQ((out_2 - out_1), time_delta); - EXPECT_EQ((ntp_seconds_2 - ntp_seconds_1), UINT32_C(1)); - EXPECT_NEAR(ntp_fraction_2, ntp_fraction_1, 1); - - time_delta = base::TimeDelta::FromMilliseconds(500); - input_time += time_delta; - - uint32_t ntp_seconds_3 = 0; - uint32_t ntp_fraction_3 = 0; - - ConvertTimeTicksToNtp(input_time, &ntp_seconds_3, &ntp_fraction_3); - base::TimeTicks out_3 = ConvertNtpToTimeTicks(ntp_seconds_3, ntp_fraction_3); - EXPECT_EQ(input_time, out_3); // Verify inverse. - - // Verify delta. - EXPECT_EQ((out_3 - out_2), time_delta); - EXPECT_NEAR((ntp_fraction_3 - ntp_fraction_2), 0xffffffff / 2, 1); + ASSERT_EQ(1UL, frame_log.event_log_messages_.size()); + RtcpReceiverEventLogMessage log_msg = frame_log.event_log_messages_.back(); + EXPECT_EQ(log_msg.type, event.type); + EXPECT_EQ(log_msg.delay_delta, event.delay_delta); + // Only 24 bits of event timestamp sent on wire. + uint32_t event_ts = + (event.timestamp - base::TimeTicks()).InMilliseconds() & 0xffffff; + uint32_t log_msg_ts = + (log_msg.event_timestamp - base::TimeTicks()).InMilliseconds() & 0xffffff; + EXPECT_EQ(log_msg_ts, event_ts); } } // namespace cast
diff --git a/media/cast/net/rtcp/rtcp_utility_unittest.cc b/media/cast/net/rtcp/rtcp_utility_unittest.cc index 0f9e4c4..f3777e9 100644 --- a/media/cast/net/rtcp/rtcp_utility_unittest.cc +++ b/media/cast/net/rtcp/rtcp_utility_unittest.cc
@@ -127,6 +127,7 @@ scoped_ptr<base::SimpleTestTickClock> testing_clock_; scoped_refptr<test::FakeSingleThreadTaskRunner> task_runner_; + private: DISALLOW_COPY_AND_ASSIGN(RtcpParserTest); }; @@ -404,5 +405,51 @@ ExpectReceiverLog(parser, receiver_log); } +TEST(RtcpUtilityTest, NtpAndTime) { + const int64_t kSecondsbetweenYear1900and2010 = INT64_C(40176 * 24 * 60 * 60); + const int64_t kSecondsbetweenYear1900and2030 = INT64_C(47481 * 24 * 60 * 60); + + uint32_t ntp_seconds_1 = 0; + uint32_t ntp_fraction_1 = 0; + base::TimeTicks input_time = base::TimeTicks::Now(); + ConvertTimeTicksToNtp(input_time, &ntp_seconds_1, &ntp_fraction_1); + + // Verify absolute value. + EXPECT_GT(ntp_seconds_1, kSecondsbetweenYear1900and2010); + EXPECT_LT(ntp_seconds_1, kSecondsbetweenYear1900and2030); + + base::TimeTicks out_1 = ConvertNtpToTimeTicks(ntp_seconds_1, ntp_fraction_1); + EXPECT_EQ(input_time, out_1); // Verify inverse. + + base::TimeDelta time_delta = base::TimeDelta::FromMilliseconds(1000); + input_time += time_delta; + + uint32_t ntp_seconds_2 = 0; + uint32_t ntp_fraction_2 = 0; + + ConvertTimeTicksToNtp(input_time, &ntp_seconds_2, &ntp_fraction_2); + base::TimeTicks out_2 = ConvertNtpToTimeTicks(ntp_seconds_2, ntp_fraction_2); + EXPECT_EQ(input_time, out_2); // Verify inverse. + + // Verify delta. + EXPECT_EQ((out_2 - out_1), time_delta); + EXPECT_EQ((ntp_seconds_2 - ntp_seconds_1), UINT32_C(1)); + EXPECT_NEAR(ntp_fraction_2, ntp_fraction_1, 1); + + time_delta = base::TimeDelta::FromMilliseconds(500); + input_time += time_delta; + + uint32_t ntp_seconds_3 = 0; + uint32_t ntp_fraction_3 = 0; + + ConvertTimeTicksToNtp(input_time, &ntp_seconds_3, &ntp_fraction_3); + base::TimeTicks out_3 = ConvertNtpToTimeTicks(ntp_seconds_3, ntp_fraction_3); + EXPECT_EQ(input_time, out_3); // Verify inverse. + + // Verify delta. + EXPECT_EQ((out_3 - out_2), time_delta); + EXPECT_NEAR((ntp_fraction_3 - ntp_fraction_2), 0xffffffff / 2, 1); +} + } // namespace cast } // namespace media
diff --git a/mojo/edk/system/broker_messages.h b/mojo/edk/system/broker_messages.h index 0ce0960..13fe9801 100644 --- a/mojo/edk/system/broker_messages.h +++ b/mojo/edk/system/broker_messages.h
@@ -53,12 +53,31 @@ // They are sent over RawChannel. enum MultiplexMessages { // Messages from child to parent. + + // Tells the parent that the given pipe id has been bound to a + // MessagePipeDispatcher in the child process. The parent will then respond + // with either PEER_PIPE_CONNECTED or PEER_DIED when the other side is also + // bound. CONNECT_MESSAGE_PIPE = 0, + // Tells the parent to remove its bookkeeping for the given peer id since + // another MessagePipeDispatcher has connected to the pipe in the same + // process. CANCEL_CONNECT_MESSAGE_PIPE, + // Messages from parent to child. + + // Tells the child to open a channel to a given process. This will be followed + // by a PEER_PIPE_CONNECTED connecting a message pipe from the child process + // to the given process over the new channel. CONNECT_TO_PROCESS, + + // Connect a given message pipe to another process. PEER_PIPE_CONNECTED, + + // Informs the child that the other end of the message pipe is in a process + // that died. + PEER_DIED, }; struct ConnectMessagePipeMessage { @@ -79,6 +98,11 @@ base::ProcessId process_id; }; +struct PeerDiedMessage { + MultiplexMessages type; // PEER_DIED + uint64_t pipe_id; +}; + } // namespace edk } // namespace mojo
diff --git a/mojo/edk/system/broker_state.cc b/mojo/edk/system/broker_state.cc index 90ea00d..a81f1a1 100644 --- a/mojo/edk/system/broker_state.cc +++ b/mojo/edk/system/broker_state.cc
@@ -93,8 +93,13 @@ if (pending_child_connects_.find(pipe_id) != pending_child_connects_.end()) { // A child process has already tried to connect. ChildBrokerHost* child_host = pending_child_connects_[pipe_id]; - AttachMessagePipe(message_pipe, pipe_id, child_host->channel()); - child_host->ConnectMessagePipe(pipe_id, 0); + if (child_host && child_host->channel()) { + AttachMessagePipe(message_pipe, pipe_id, child_host->channel()); + child_host->ConnectMessagePipe(pipe_id, 0); + } else { + message_pipe->OnError(RawChannel::Delegate::ERROR_READ_SHUTDOWN); + } + pending_child_connects_.erase(pipe_id); return; } @@ -124,14 +129,12 @@ base::AutoLock auto_lock(lock_); for (auto it = pending_child_connects_.begin(); - it != pending_child_connects_.end();) { + it != pending_child_connects_.end(); ++it) { if (it->second == child_broker_host) { - // Since we can't do it = pending_child_connects_.erase(it); until - // hash_map uses unordered_map on posix. - auto cur = it++; - pending_child_connects_.erase(cur); - } else { - it++; + // Signify that the process has died. When another process tries to + // connect to the message pipe, we will tell it that the peer has died so + // that it can fire a peer closed notification. + it->second = nullptr; } } @@ -139,8 +142,8 @@ for (auto it = connected_processes_.begin(); it != connected_processes_.end();) { if ((*it).first == pid || (*it).second == pid) { - // Since we can't do it = pending_child_connects_.erase(it); until - // hash_map uses unordered_map on posix. + // Since we can't do it = connected_processes_.erase(it); until hash_map + // uses unordered_map on posix. auto cur = it++; connected_processes_.erase(cur); } else { @@ -159,12 +162,16 @@ if (pending_child_connects_.find(pipe_id) != pending_child_connects_.end()) { // Another child process is waiting to connect to the given pipe. ChildBrokerHost* pending_pipe_process = pending_child_connects_[pipe_id]; - EnsureProcessesConnected(pipe_process->GetProcessId(), - pending_pipe_process->GetProcessId()); - pending_pipe_process->ConnectMessagePipe( - pipe_id, pipe_process->GetProcessId()); - pipe_process->ConnectMessagePipe( - pipe_id, pending_pipe_process->GetProcessId()); + if (pending_pipe_process && pending_pipe_process->channel()) { + EnsureProcessesConnected(pipe_process->GetProcessId(), + pending_pipe_process->GetProcessId()); + pending_pipe_process->ConnectMessagePipe( + pipe_id, pipe_process->GetProcessId()); + pipe_process->ConnectMessagePipe( + pipe_id, pending_pipe_process->GetProcessId()); + } else { + pipe_process->PeerDied(pipe_id); + } pending_child_connects_.erase(pipe_id); return; }
diff --git a/mojo/edk/system/child_broker.cc b/mojo/edk/system/child_broker.cc index 6903c820..85d9e524 100644 --- a/mojo/edk/system/child_broker.cc +++ b/mojo/edk/system/child_broker.cc
@@ -220,6 +220,17 @@ CHECK(connected_pipes_.find(pipe) == connected_pipes_.end()); AttachMessagePipe(pipe, pipe_id, channels_[peer_pid]); } + } else if (type == PEER_DIED) { + DCHECK(!platform_handles); + const PeerDiedMessage* message = + static_cast<const PeerDiedMessage*>(message_view.bytes()); + + uint64_t pipe_id = message->pipe_id; + + CHECK(pending_connects_.find(pipe_id) != pending_connects_.end()); + MessagePipeDispatcher* pipe = pending_connects_[pipe_id]; + pending_connects_.erase(pipe_id); + pipe->OnError(ERROR_READ_SHUTDOWN); } else { NOTREACHED(); }
diff --git a/mojo/edk/system/child_broker_host.cc b/mojo/edk/system/child_broker_host.cc index 20a73d9..bf594c1 100644 --- a/mojo/edk/system/child_broker_host.cc +++ b/mojo/edk/system/child_broker_host.cc
@@ -105,6 +105,19 @@ child_channel_->channel()->WriteMessage(std::move(message)); } +void ChildBrokerHost::PeerDied(uint64_t pipe_id) { + if (!child_channel_) + return; // Can happen at process shutdown on Windows. + PeerDiedMessage data; + memset(&data, 0, sizeof(data)); + data.type = PEER_DIED; + data.pipe_id = pipe_id; + scoped_ptr<MessageInTransit> message(new MessageInTransit( + MessageInTransit::Type::MESSAGE, sizeof(data), &data)); + message->set_route_id(kBrokerRouteId); + child_channel_->channel()->WriteMessage(std::move(message)); +} + ChildBrokerHost::~ChildBrokerHost() { DCHECK(internal::g_io_thread_task_runner->RunsTasksOnCurrentThread()); BrokerState::GetInstance()->ChildBrokerHostDestructed(this);
diff --git a/mojo/edk/system/child_broker_host.h b/mojo/edk/system/child_broker_host.h index 943ff13..057b9e0f 100644 --- a/mojo/edk/system/child_broker_host.h +++ b/mojo/edk/system/child_broker_host.h
@@ -48,6 +48,10 @@ // be 0. void ConnectMessagePipe(uint64_t pipe_id, base::ProcessId process_id); + // Sends a message to the child process informing it that the peer process has + // died before it could connect. + void PeerDied(uint64_t pipe_id); + RoutedRawChannel* channel() { return child_channel_; } private:
diff --git a/mojo/edk/system/message_in_transit.h b/mojo/edk/system/message_in_transit.h index bebaaf7..b97ec34 100644 --- a/mojo/edk/system/message_in_transit.h +++ b/mojo/edk/system/message_in_transit.h
@@ -46,12 +46,16 @@ MESSAGE = 0, // Since there's a limit on how many fds can be sent in one sendmsg call, if // a message has more than that the fds are sent in this message type first. - RAW_CHANNEL_POSIX_EXTRA_PLATFORM_HANDLES = 1, + RAW_CHANNEL_POSIX_EXTRA_PLATFORM_HANDLES, // When a RawChannel is serialized, there could be pending messages to be // written to the pipe. They are serialized to shared memory. When they're // deserialized on the receiving end, we want to write them to the pipe // without any message headers, because those have already been written. - RAW_MESSAGE = 3, + RAW_MESSAGE, + // Tells the other side to close its pipe. This is needed because when a + // MessagePipeDispatcher is closed, it has to wait to flush any pending + // messages or else in-flight message pipes won't be closed. + QUIT_MESSAGE, }; // Messages (the header and data) must always be aligned to a multiple of this
diff --git a/mojo/edk/system/message_pipe_dispatcher.cc b/mojo/edk/system/message_pipe_dispatcher.cc index de81b2341e..11dc586 100644 --- a/mojo/edk/system/message_pipe_dispatcher.cc +++ b/mojo/edk/system/message_pipe_dispatcher.cc
@@ -157,31 +157,46 @@ calling_init_ = false; } -void MessagePipeDispatcher::CloseOnIO() { - base::AutoLock locker(lock()); +void MessagePipeDispatcher::CloseOnIOAndRelease() { + { + base::AutoLock locker(lock()); + CloseOnIO(); + } Release(); // To match CloseImplNoLock. - if (transferable_) { - if (channel_) { - channel_->Shutdown(); - channel_ = nullptr; - } - } else { - if (non_transferable_state_ == CONNECT_CALLED || - non_transferable_state_ == WAITING_FOR_READ_OR_WRITE) { - if (non_transferable_state_ == WAITING_FOR_READ_OR_WRITE) - RequestNontransferableChannel(); +} - // We can't cancel the pending request yet, since the other side of the - // message pipe would want to get pending outgoing messages (if any) or - // at least know that this end was closed. So keep this object alive until - // then. - non_transferable_state_ = WAITING_FOR_CONNECT_TO_CLOSE; - AddRef(); - } else if (non_transferable_state_ == CONNECTED) { - internal::g_broker->CloseMessagePipe(pipe_id_, this); - non_transferable_state_ = CLOSED; - channel_ = nullptr; - } +void MessagePipeDispatcher::CloseOnIO() { + lock().AssertAcquired(); + + if (channel_) { + // If we closed the channel now then in-flight message pipes wouldn't get + // closed, and their other side wouldn't get a connection error notification + // which could lead to hangs or leaks. So we ask the other side of this + // message pipe to close, which ensures that we have dispatched all + // in-flight message pipes. + DCHECK(!close_requested_); + close_requested_ = true; + AddRef(); + scoped_ptr<MessageInTransit> message(new MessageInTransit( + MessageInTransit::Type::QUIT_MESSAGE, 0, nullptr)); + if (!transferable_) + message->set_route_id(pipe_id_); + channel_->WriteMessage(std::move(message)); + return; + } + + if (!transferable_ && + (non_transferable_state_ == CONNECT_CALLED || + non_transferable_state_ == WAITING_FOR_READ_OR_WRITE)) { + if (non_transferable_state_ == WAITING_FOR_READ_OR_WRITE) + RequestNontransferableChannel(); + + // We can't cancel the pending request yet, since the other side of the + // message pipe would want to get pending outgoing messages (if any) or at + // least know that this end was closed. So keep this object alive until + // then. + non_transferable_state_ = WAITING_FOR_CONNECT_TO_CLOSE; + AddRef(); } } @@ -190,6 +205,7 @@ } void MessagePipeDispatcher::GotNonTransferableChannel(RawChannel* channel) { + DCHECK(internal::g_io_thread_task_runner->RunsTasksOnCurrentThread()); base::AutoLock locker(lock()); channel_ = channel; while (!non_transferable_outgoing_message_queue_.IsEmpty()) { @@ -198,14 +214,15 @@ } if (non_transferable_state_ == WAITING_FOR_CONNECT_TO_CLOSE) { - // We kept this object alive until it's connected, we can release it now. - internal::g_broker->CloseMessagePipe(pipe_id_, this); - non_transferable_state_ = CLOSED; - channel_ = nullptr; - base::MessageLoop::current()->ReleaseSoon(FROM_HERE, this); - } else { non_transferable_state_ = CONNECTED; + // We kept this object alive until it's connected, we can close it now. + CloseOnIO(); + // Balance the AddRef in CloseOnIO. + Release(); + return; } + + non_transferable_state_ = CONNECTED; } #if defined(OS_WIN) @@ -408,7 +425,8 @@ serialized_(false), calling_init_(false), write_error_(false), - transferable_(transferable) { + transferable_(transferable), + close_requested_(false) { } MessagePipeDispatcher::~MessagePipeDispatcher() { @@ -450,7 +468,7 @@ // if the task runs. AddRef(); internal::g_io_thread_task_runner->PostTask( - FROM_HERE, base::Bind(&MessagePipeDispatcher::CloseOnIO, this)); + FROM_HERE, base::Bind(&MessagePipeDispatcher::CloseOnIOAndRelease, this)); } void MessagePipeDispatcher::SerializeInternal() { @@ -867,27 +885,56 @@ std::move(platform_handles))); } + bool call_release = false; if (started_transport_.Try()) { - // we're not in the middle of being sent + // We're not in the middle of being sent. // Can get synchronously called back in Init if there was initial data. scoped_ptr<base::AutoLock> locker; - if (!calling_init_) { + if (!calling_init_) locker.reset(new base::AutoLock(lock())); - } - bool was_empty = message_queue_.IsEmpty(); - message_queue_.AddMessage(std::move(message)); - if (was_empty) + if (message_view.type() == MessageInTransit::Type::QUIT_MESSAGE) { + if (transferable_) { + channel_->Shutdown(); + } else { + internal::g_broker->CloseMessagePipe(pipe_id_, this); + non_transferable_state_ = CLOSED; + } + channel_ = nullptr; awakable_list_.AwakeForStateChange(GetHandleSignalsStateImplNoLock()); + if (close_requested_) { + // We requested the other side to close the connection while they also + // did the same. We must balance out the AddRef in CloseOnIO to ensure + // this object isn't leaked. + call_release = true; + } + } else { + bool was_empty = message_queue_.IsEmpty(); + message_queue_.AddMessage(std::move(message)); + if (was_empty) + awakable_list_.AwakeForStateChange(GetHandleSignalsStateImplNoLock()); + } started_transport_.Release(); } else { - // If RawChannel is calling OnRead, that means it has its read_lock_ - // acquired. That means StartSerialize can't be accessing message queue as - // it waits on ReleaseHandle first which acquires readlock_. - message_queue_.AddMessage(std::move(message)); + if (message_view.type() == MessageInTransit::Type::QUIT_MESSAGE) { + // We got a request to shutdown the channel but this object is already + // calling into channel to serialize it. Since all the other side cares + // about is flushing pending messages, we bounce the quit back to it. + scoped_ptr<MessageInTransit> message(new MessageInTransit( + MessageInTransit::Type::QUIT_MESSAGE, 0, nullptr)); + channel_->WriteMessage(std::move(message)); + } else { + // If RawChannel is calling OnRead, that means it has its read_lock_ + // acquired. That means StartSerialize can't be accessing message queue as + // it waits on ReleaseHandle first which acquires read_lock_. + message_queue_.AddMessage(std::move(message)); + } } + + if (call_release) + Release(); } void MessagePipeDispatcher::OnError(Error error) { @@ -923,12 +970,9 @@ break; } + bool call_release = false; if (started_transport_.Try()) { base::AutoLock locker(lock()); - // We can get two OnError callbacks before the post task below completes. - // Although RawChannel still has a pointer to this object until Shutdown is - // called, that is safe since this class always does a PostTask to the IO - // thread to self destruct. if (channel_ && error != ERROR_WRITE) { if (transferable_) { channel_->Shutdown(); @@ -938,12 +982,23 @@ non_transferable_state_ = CLOSED; } channel_ = nullptr; + if (close_requested_) { + // Balance AddRef in CloseOnIO. + call_release = true; + } + } else if (!channel_ && !transferable_ && + non_transferable_state_ == WAITING_FOR_CONNECT_TO_CLOSE) { + // Balance AddRef in CloseOnIO. + call_release = true; } awakable_list_.AwakeForStateChange(GetHandleSignalsStateImplNoLock()); started_transport_.Release(); } else { // We must be waiting to call ReleaseHandle. It will call Shutdown. } + + if (call_release) + Release(); } MojoResult MessagePipeDispatcher::AttachTransportsNoLock(
diff --git a/mojo/edk/system/message_pipe_dispatcher.h b/mojo/edk/system/message_pipe_dispatcher.h index 9acbaf9..a49a45d 100644 --- a/mojo/edk/system/message_pipe_dispatcher.h +++ b/mojo/edk/system/message_pipe_dispatcher.h
@@ -93,6 +93,7 @@ ~MessagePipeDispatcher() override; void InitOnIO(); + void CloseOnIOAndRelease(); void CloseOnIO(); // |Dispatcher| protected methods: @@ -171,11 +172,21 @@ // get a RawChannel. uint64_t pipe_id_; enum NonTransferableState { + // The pipe_id hasn't been bound to this object yet until it's read, + // written, or waited on. WAITING_FOR_READ_OR_WRITE, + // This object was interacted with, so the pipe_id has been bound and we are + // waiting for the broker to connect both sides. CONNECT_CALLED, + // We have a connection to the other end of the message pipe. CONNECTED, + // This object has been closed before it's connected. To ensure that the + // other end receives a closed message from this end, we've initiated + // connecting and will close after it succeeds. WAITING_FOR_CONNECT_TO_CLOSE, + // The message pipe is closed. CLOSED, + // The message pipe has been transferred. SERIALISED, }; @@ -198,6 +209,10 @@ bool write_error_; // Whether it can be sent after read or write. bool transferable_; + // When this object is closed, it has to wait to flush any pending messages + // from the other side to ensure that any in-queue message pipes are closed. + // If this is true, we have already sent the other side the request. + bool close_requested_; MOJO_DISALLOW_COPY_AND_ASSIGN(MessagePipeDispatcher); };
diff --git a/mojo/edk/system/raw_channel.cc b/mojo/edk/system/raw_channel.cc index 34f0c1c..5d0a04c 100644 --- a/mojo/edk/system/raw_channel.cc +++ b/mojo/edk/system/raw_channel.cc
@@ -649,7 +649,8 @@ return; // |this| may have been destroyed in |CallOnError()|. } - if (message_view.type() != MessageInTransit::Type::MESSAGE) { + if (message_view.type() != MessageInTransit::Type::MESSAGE && + message_view.type() != MessageInTransit::Type::QUIT_MESSAGE) { if (!OnReadMessageForRawChannel(message_view)) { CallOnError(Delegate::ERROR_READ_BAD_MESSAGE); *stop_dispatching = true;
diff --git a/mojo/runner/android/android_handler.cc b/mojo/runner/android/android_handler.cc index 38ffbc4..463d505 100644 --- a/mojo/runner/android/android_handler.cc +++ b/mojo/runner/android/android_handler.cc
@@ -5,6 +5,7 @@ #include "mojo/runner/android/android_handler.h" #include <stddef.h> +#include <utility> #include "base/android/context_utils.h" #include "base/android/jni_android.h" @@ -67,7 +68,7 @@ } // Run the application. - RunNativeApplication(app_library, application_request.Pass()); + RunNativeApplication(app_library, std::move(application_request)); // TODO(vtl): See note about unloading and thread-local destructors above // declaration of |LoadNativeApplication()|. base::UnloadNativeLibrary(app_library); @@ -159,7 +160,7 @@ base::FilePath archive_path( ConvertJavaStringToUTF8(env, j_archive_path.obj())); - common::BlockingCopyToFile(response->body.Pass(), archive_path); + common::BlockingCopyToFile(std::move(response->body), archive_path); Java_AndroidHandler_bootstrap( env, GetApplicationContext(), j_archive_path.obj(), application_request.PassMessagePipe().release().value(),
diff --git a/mojo/runner/android/android_handler_loader.cc b/mojo/runner/android/android_handler_loader.cc index cda33cf..fa656c9 100644 --- a/mojo/runner/android/android_handler_loader.cc +++ b/mojo/runner/android/android_handler_loader.cc
@@ -4,6 +4,8 @@ #include "mojo/runner/android/android_handler_loader.h" +#include <utility> + namespace mojo { namespace runner { @@ -18,7 +20,7 @@ InterfaceRequest<Application> application_request) { DCHECK(application_request.is_pending()); application_.reset( - new ApplicationImpl(&android_handler_, application_request.Pass())); + new ApplicationImpl(&android_handler_, std::move(application_request))); } } // namespace runner
diff --git a/mojo/runner/android/background_application_loader.cc b/mojo/runner/android/background_application_loader.cc index db69c75..d9a85332 100644 --- a/mojo/runner/android/background_application_loader.cc +++ b/mojo/runner/android/background_application_loader.cc
@@ -4,6 +4,8 @@ #include "mojo/runner/android/background_application_loader.h" +#include <utility> + #include "base/bind.h" #include "base/run_loop.h" #include "mojo/shell/application_manager.h" @@ -15,11 +17,10 @@ scoped_ptr<ApplicationLoader> real_loader, const std::string& thread_name, base::MessageLoop::Type message_loop_type) - : loader_(real_loader.Pass()), + : loader_(std::move(real_loader)), message_loop_type_(message_loop_type), thread_name_(thread_name), - message_loop_created_(true, false) { -} + message_loop_created_(true, false) {} BackgroundApplicationLoader::~BackgroundApplicationLoader() { if (thread_) @@ -66,7 +67,7 @@ const GURL& url, InterfaceRequest<Application> application_request) { DCHECK(task_runner_->RunsTasksOnCurrentThread()); - loader_->Load(url, application_request.Pass()); + loader_->Load(url, std::move(application_request)); } } // namespace runner
diff --git a/mojo/runner/android/ui_application_loader_android.cc b/mojo/runner/android/ui_application_loader_android.cc index 4579e80..01c5749 100644 --- a/mojo/runner/android/ui_application_loader_android.cc +++ b/mojo/runner/android/ui_application_loader_android.cc
@@ -4,6 +4,8 @@ #include "mojo/runner/android/ui_application_loader_android.h" +#include <utility> + #include "base/bind.h" #include "base/message_loop/message_loop.h" #include "mojo/shell/application_manager.h" @@ -14,8 +16,7 @@ UIApplicationLoader::UIApplicationLoader( scoped_ptr<ApplicationLoader> real_loader, base::MessageLoop* ui_message_loop) - : loader_(real_loader.Pass()), ui_message_loop_(ui_message_loop) { -} + : loader_(std::move(real_loader)), ui_message_loop_(ui_message_loop) {} UIApplicationLoader::~UIApplicationLoader() { ui_message_loop_->PostTask( @@ -36,7 +37,7 @@ void UIApplicationLoader::LoadOnUIThread( const GURL& url, InterfaceRequest<Application> application_request) { - loader_->Load(url, application_request.Pass()); + loader_->Load(url, std::move(application_request)); } void UIApplicationLoader::ShutdownOnUIThread() {
diff --git a/mojo/tools/data/apptests b/mojo/tools/data/apptests index 8c7c37f4..2d900bdc 100644 --- a/mojo/tools/data/apptests +++ b/mojo/tools/data/apptests
@@ -76,12 +76,13 @@ 'test': 'mojo:mandoline_browser_apptests', 'type': 'gtest_isolated', }, - { - 'test': 'mojo:mash_wm_apptests', - 'type': 'gtest_isolated', - 'args': ['--use-x11-test-config', - '--override-use-gl-with-osmesa-for-tests'] - }, + # TODO(sky): reenable when 569367 is fixed. +# { +# 'test': 'mojo:mash_wm_apptests', +# 'type': 'gtest_isolated', +# 'args': ['--use-x11-test-config', +# '--override-use-gl-with-osmesa-for-tests'] +# }, # TODO(xhwang): Fix and enable mojo:media_pipeline_integration_apptests. # http://crbug.com/501417 {
diff --git a/net/cert/nss_cert_database_chromeos.cc b/net/cert/nss_cert_database_chromeos.cc index 0cffac5..fda5307f 100644 --- a/net/cert/nss_cert_database_chromeos.cc +++ b/net/cert/nss_cert_database_chromeos.cc
@@ -6,8 +6,8 @@ #include <cert.h> #include <pk11pub.h> - #include <algorithm> +#include <utility> #include "base/bind.h" #include "base/callback.h" @@ -21,7 +21,7 @@ NSSCertDatabaseChromeOS::NSSCertDatabaseChromeOS( crypto::ScopedPK11Slot public_slot, crypto::ScopedPK11Slot private_slot) - : NSSCertDatabase(public_slot.Pass(), private_slot.Pass()) { + : NSSCertDatabase(std::move(public_slot), std::move(private_slot)) { // By default, don't use a system slot. Only if explicitly set by // SetSystemSlot, the system slot will be used. profile_filter_.Init(GetPublicSlot(), @@ -33,7 +33,7 @@ void NSSCertDatabaseChromeOS::SetSystemSlot( crypto::ScopedPK11Slot system_slot) { - system_slot_ = system_slot.Pass(); + system_slot_ = std::move(system_slot); profile_filter_.Init(GetPublicSlot(), GetPrivateSlot(), GetSystemSlot()); }
diff --git a/net/cert/nss_profile_filter_chromeos.cc b/net/cert/nss_profile_filter_chromeos.cc index 8e4167a..40502e3 100644 --- a/net/cert/nss_profile_filter_chromeos.cc +++ b/net/cert/nss_profile_filter_chromeos.cc
@@ -4,6 +4,8 @@ #include "net/cert/nss_profile_filter_chromeos.h" +#include <utility> + #include "base/strings/string_piece.h" #include "base/strings/stringprintf.h" #include "net/cert/x509_certificate.h" @@ -71,11 +73,11 @@ // not release its reference, and the receiving object won't free // its copy. if (public_slot_.get() != public_slot.get()) - public_slot_ = public_slot.Pass(); + public_slot_ = std::move(public_slot); if (private_slot_.get() != private_slot.get()) - private_slot_ = private_slot.Pass(); + private_slot_ = std::move(private_slot); if (system_slot_.get() != system_slot.get()) - system_slot_ = system_slot.Pass(); + system_slot_ = std::move(system_slot); } bool NSSProfileFilterChromeOS::IsModuleAllowed(PK11SlotInfo* slot) const {
diff --git a/net/cert/nss_profile_filter_chromeos_unittest.cc b/net/cert/nss_profile_filter_chromeos_unittest.cc index d4051af..f0243d8 100644 --- a/net/cert/nss_profile_filter_chromeos_unittest.cc +++ b/net/cert/nss_profile_filter_chromeos_unittest.cc
@@ -7,6 +7,7 @@ #include <cert.h> #include <pk11pub.h> #include <secmod.h> +#include <utility> #include "crypto/nss_util_internal.h" #include "crypto/scoped_nss_types.h" @@ -75,8 +76,7 @@ ASSERT_TRUE(private_slot_1.get()); profile_filter_1_.Init( crypto::GetPublicSlotForChromeOSUser(user_1_.username_hash()), - private_slot_1.Pass(), - get_system_slot()); + std::move(private_slot_1), get_system_slot()); profile_filter_1_copy_ = profile_filter_1_; @@ -86,7 +86,7 @@ ASSERT_TRUE(private_slot_2.get()); profile_filter_2_.Init( crypto::GetPublicSlotForChromeOSUser(user_2_.username_hash()), - private_slot_2.Pass(), + std::move(private_slot_2), crypto::ScopedPK11Slot() /* no system slot */); certs_ = CreateCertificateListFromFile(GetTestCertsDirectory(),
diff --git a/net/data/ssl/certificates/README b/net/data/ssl/certificates/README index 305528d..493283e1 100644 --- a/net/data/ssl/certificates/README +++ b/net/data/ssl/certificates/README
@@ -136,6 +136,10 @@ These certificates are the common certificates used by the Python test server for simulating HTTPS connections. +- wildcard_.pem + A certificate and private key valid for *.example.org, used in various + net unit tests. + - name_constraint_bad.pem - name_constraint_good.pem Two certificates used to test the built-in ability to restrict a root to
diff --git a/net/data/ssl/certificates/wildcard.pem b/net/data/ssl/certificates/wildcard.pem new file mode 100644 index 0000000..6c04784 --- /dev/null +++ b/net/data/ssl/certificates/wildcard.pem
@@ -0,0 +1,110 @@ +-----BEGIN PRIVATE KEY----- +MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDfhiVHagGcPZTL +4aHOnMXM4dYquwuCgl322Pn1H7KXj+zmaWna8ZzP2i9Zp4++aGoSk0ZMxdgMCSrq +ayCQS6n0Fm5ouEK2dz2EbEWjLMEX4+PRP7Vkh1tE7yS6oQpEGK1nApCSyDqfhmIU +C5G9o5GupqC3WrIOwAPvpDiEKLpAExetEf7IZd415Tj6yq2umyWzxbYUwqSI0fUv +0BY84C+2vaVhPNqv5jCSHBW8ueR+gnIto9vkq6JfOp4yuJ1ufqSdpt67gYskieJw +sBZmyZ3FQYlKj35lPhOnWbRpPTG0L5IhMCRsJ/qR1h2Hrs+dU4+hyLyZpdqic0wL +3UQnpKtPAgMBAAECggEACpATSOmog9KhKnVSKSpdao4tib1nENbKS/T68ut5jBIA +Fu9aUj9isqvT2v/BGjVi9dfB1bTvvbndLlC7rDX3JRK+SvKSLH88B/r523ks8s0R +If1JvCNtW7eVW8BqdMdZwmlrnZQauRknn1zgmT6WjtNO+vstOOc4CGYRSaWHD6oA +rpg23vKm8JbYLACnlQBgDr/fhHN0PLWrsLEFTYSfvFz8+B//2Rslj4/mJhEfu+aG +Nr0N6HqIrgzTZarI0nhst9PTJuOMBjyJIByV6T8hchOgLqWqvtTnXq3U4GLsbTh2 +vvKIndORecZV29y+VqIiJLch+OFg4uDR8yqMQndvyQKBgQD5ZRc9YLmXlXPS1PsV +5mix54ZiX70jm4ZwSmDlX3XboEyJrxJJ0EefqSDz1HxMObzWdPs+dT8JzUezU7ha +sBpCDY++rj1UUZbOqCmiU3xdpWVea02xCjAhGO43XErnu5FCmyL4xCTSm48t0w01 +3jH9WanO9I3OjngNHawYyarPQwKBgQDlcaYnubY0Vro+JxCuYHYlggYaj9OaNSJ8 +hH9PZ6FG3O7OusP8fSvHKNbzdGkXO72UrGcYJGoaYbdIPKP4k3iJ43M1+wX6VZb2 +ohylWuHmVn4pMkLC+1zKASLd1AKBgdgX2+mpmfHa5Nnv7+6KgYKNAQKE1IMcq++a +2aateUd1BQKBgQCKFjYi7u50BvVFlFWeD6CCeL5Is9fm4lMy04wJFK0OORiH157Z +rfAqcBvlxg44qnNrjwQZ1hNcWwRLP5zA4eb4Ecg4fQNKL46/yA6daXpf45dYCzPO +ReTWPpaPopN68bkBVyKq+PemgSlq5wPWgrvNGptSEsh9yRahtH84jlj8PwKBgGL8 +nwRweI0oBX2e+PFiKFaSO/PlrRLQbaput0YYnVmnI1gI91jM38AyfFnYFSay3V1w +66FcxHHRSnNdxhgN92j1udTGEZQorNKGqfkktmTbV96KEodwTl3QE6zENLiOvh29 +AJftFIytQuDjEHSs3xfaIa4QyOfrvZl+4QviUNPJAoGAe8cNgvKPVSEZjt+/tW0K +LPCOZxDsBgwIWcpxFpzTigdw/4AKedccwp0vMRaj44gzKDCVxgnU3qPBEGHqLOAs +UcV6KEVQrIupPB8ix8y1qpiRsrDqhEcNRyDcTJEaPgjOfNKw80lstromo6dmrpFe +cO+alA7DDyg+545GrCsgy/Q= +-----END PRIVATE KEY----- +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 12 (0xc) + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=Test Root CA + Validity + Not Before: Dec 30 20:30:57 2015 GMT + Not After : Dec 27 20:30:57 2025 GMT + Subject: C=US, ST=California, L=Mountain View, O=Test CA, CN=127.0.0.1 + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:df:86:25:47:6a:01:9c:3d:94:cb:e1:a1:ce:9c: + c5:cc:e1:d6:2a:bb:0b:82:82:5d:f6:d8:f9:f5:1f: + b2:97:8f:ec:e6:69:69:da:f1:9c:cf:da:2f:59:a7: + 8f:be:68:6a:12:93:46:4c:c5:d8:0c:09:2a:ea:6b: + 20:90:4b:a9:f4:16:6e:68:b8:42:b6:77:3d:84:6c: + 45:a3:2c:c1:17:e3:e3:d1:3f:b5:64:87:5b:44:ef: + 24:ba:a1:0a:44:18:ad:67:02:90:92:c8:3a:9f:86: + 62:14:0b:91:bd:a3:91:ae:a6:a0:b7:5a:b2:0e:c0: + 03:ef:a4:38:84:28:ba:40:13:17:ad:11:fe:c8:65: + de:35:e5:38:fa:ca:ad:ae:9b:25:b3:c5:b6:14:c2: + a4:88:d1:f5:2f:d0:16:3c:e0:2f:b6:bd:a5:61:3c: + da:af:e6:30:92:1c:15:bc:b9:e4:7e:82:72:2d:a3: + db:e4:ab:a2:5f:3a:9e:32:b8:9d:6e:7e:a4:9d:a6: + de:bb:81:8b:24:89:e2:70:b0:16:66:c9:9d:c5:41: + 89:4a:8f:7e:65:3e:13:a7:59:b4:69:3d:31:b4:2f: + 92:21:30:24:6c:27:fa:91:d6:1d:87:ae:cf:9d:53: + 8f:a1:c8:bc:99:a5:da:a2:73:4c:0b:dd:44:27:a4: + ab:4f + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Basic Constraints: critical + CA:FALSE + X509v3 Subject Key Identifier: + 07:AA:23:37:A2:23:9D:E6:7C:C8:28:0E:5B:F7:E0:46:A7:B9:F7:A9 + X509v3 Authority Key Identifier: + keyid:BC:F7:30:D1:3C:C0:F2:79:FA:EF:9F:C9:6C:5C:93:F3:8A:68:AB:83 + + X509v3 Extended Key Usage: + TLS Web Server Authentication, TLS Web Client Authentication + X509v3 Subject Alternative Name: + DNS:*.example.org + Signature Algorithm: sha256WithRSAEncryption + 35:09:35:43:ec:28:b2:fb:91:25:ef:70:8d:77:58:3e:4b:ec: + 59:3e:53:d7:1f:2c:bc:9c:d7:77:4d:82:93:b5:07:06:cb:9e: + dd:3d:0b:77:22:46:7f:d1:87:80:8b:04:ca:9b:97:13:0c:f1: + b7:ed:cf:07:f2:5e:cc:cb:63:57:6e:c8:10:de:1d:25:ce:dd: + 0c:64:35:43:92:9e:59:03:57:b5:04:25:74:4a:40:26:e7:df: + 99:4e:de:05:13:be:d7:91:b8:72:e0:ea:09:32:58:e3:b7:4f: + 55:b6:fb:8d:26:31:54:ac:1b:c7:97:34:7a:73:f2:95:5a:ab: + 54:48:80:19:50:a1:f2:ce:89:3f:06:1a:2c:48:c1:11:7e:62: + 00:c4:ec:41:7d:5e:6c:9b:81:c8:21:1a:8a:2b:38:dc:8d:36: + c7:e0:e2:f5:20:68:6f:f5:af:ab:62:ec:d8:10:6f:99:b7:f4: + 9a:94:ec:5a:2b:5e:00:62:96:ac:2c:19:b8:dc:ee:c0:da:f9: + 10:50:9f:1f:2a:80:46:68:9f:f5:95:5f:7e:f8:de:ce:3e:b5: + f1:0b:09:55:c0:09:9f:fb:65:07:41:85:a7:6e:7d:04:fb:25: + 85:dc:c2:d6:4d:0b:00:12:11:be:4c:c1:c2:4a:7d:b4:47:19: + 51:76:9e:f7 +-----BEGIN CERTIFICATE----- +MIIDfTCCAmWgAwIBAgIBDDANBgkqhkiG9w0BAQsFADAXMRUwEwYDVQQDDAxUZXN0 +IFJvb3QgQ0EwHhcNMTUxMjMwMjAzMDU3WhcNMjUxMjI3MjAzMDU3WjBgMQswCQYD +VQQGEwJVUzETMBEGA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwNTW91bnRhaW4g +VmlldzEQMA4GA1UECgwHVGVzdCBDQTESMBAGA1UEAwwJMTI3LjAuMC4xMIIBIjAN +BgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA34YlR2oBnD2Uy+GhzpzFzOHWKrsL +goJd9tj59R+yl4/s5mlp2vGcz9ovWaePvmhqEpNGTMXYDAkq6msgkEup9BZuaLhC +tnc9hGxFoyzBF+Pj0T+1ZIdbRO8kuqEKRBitZwKQksg6n4ZiFAuRvaORrqagt1qy +DsAD76Q4hCi6QBMXrRH+yGXeNeU4+sqtrpsls8W2FMKkiNH1L9AWPOAvtr2lYTza +r+YwkhwVvLnkfoJyLaPb5KuiXzqeMridbn6knabeu4GLJInicLAWZsmdxUGJSo9+ +ZT4Tp1m0aT0xtC+SITAkbCf6kdYdh67PnVOPoci8maXaonNMC91EJ6SrTwIDAQAB +o4GKMIGHMAwGA1UdEwEB/wQCMAAwHQYDVR0OBBYEFAeqIzeiI53mfMgoDlv34Ean +ufepMB8GA1UdIwQYMBaAFLz3MNE8wPJ5+u+fyWxck/OKaKuDMB0GA1UdJQQWMBQG +CCsGAQUFBwMBBggrBgEFBQcDAjAYBgNVHREEETAPgg0qLmV4YW1wbGUub3JnMA0G +CSqGSIb3DQEBCwUAA4IBAQA1CTVD7Ciy+5El73CNd1g+S+xZPlPXHyy8nNd3TYKT +tQcGy57dPQt3IkZ/0YeAiwTKm5cTDPG37c8H8l7My2NXbsgQ3h0lzt0MZDVDkp5Z +A1e1BCV0SkAm59+ZTt4FE77Xkbhy4OoJMljjt09VtvuNJjFUrBvHlzR6c/KVWqtU +SIAZUKHyzok/BhosSMERfmIAxOxBfV5sm4HIIRqKKzjcjTbH4OL1IGhv9a+rYuzY +EG+Zt/SalOxaK14AYpasLBm43O7A2vkQUJ8fKoBGaJ/1lV9++N7OPrXxCwlVwAmf ++2UHQYWnbn0E+yWF3MLWTQsAEhG+TMHCSn20RxlRdp73 +-----END CERTIFICATE-----
diff --git a/net/data/ssl/scripts/ee.cnf b/net/data/ssl/scripts/ee.cnf index 0151613..5bf4e46 100644 --- a/net/data/ssl/scripts/ee.cnf +++ b/net/data/ssl/scripts/ee.cnf
@@ -60,6 +60,9 @@ [req_spdy_pooling] subjectAltName = @spdy_pooling +[req_wildcard] +subjectAltName = @wildcard + [more_san_sanity] CN=127.0.0.3 @@ -72,3 +75,6 @@ DNS.1 = xn--wgv71a119e.com DNS.2 = *.xn--wgv71a119e.com DNS.3 = blahblahblahblah.com + +[wildcard] +DNS.1 = *.example.org
diff --git a/net/data/ssl/scripts/generate-test-certs.sh b/net/data/ssl/scripts/generate-test-certs.sh index adf97ba9..1358653 100755 --- a/net/data/ssl/scripts/generate-test-certs.sh +++ b/net/data/ssl/scripts/generate-test-certs.sh
@@ -50,6 +50,13 @@ -out out/ok_cert.req \ -config ee.cnf +try openssl req \ + -new \ + -keyout out/wildcard.key \ + -out out/wildcard.req \ + -reqexts req_wildcard \ + -config ee.cnf + SUBJECT_NAME=req_localhost_cn \ try openssl req \ -new \ @@ -81,6 +88,15 @@ CA_COMMON_NAME="Test Root CA" \ try openssl ca \ -batch \ + -extensions user_cert \ + -days 3650 \ + -in out/wildcard.req \ + -out out/wildcard.pem \ + -config ca.cnf + +CA_COMMON_NAME="Test Root CA" \ + try openssl ca \ + -batch \ -extensions name_constraint_bad \ -subj "/CN=Leaf certificate/" \ -days 3650 \ @@ -120,6 +136,8 @@ try /bin/sh -c "cat out/ok_cert.key out/ok_cert.pem \ > ../certificates/ok_cert.pem" +try /bin/sh -c "cat out/wildcard.key out/wildcard.pem \ + > ../certificates/wildcard.pem" try /bin/sh -c "cat out/localhost_cert.key out/localhost_cert.pem \ > ../certificates/localhost_cert.pem" try /bin/sh -c "cat out/expired_cert.key out/expired_cert.pem \
diff --git a/net/net.gyp b/net/net.gyp index c11f60f..98bb5c0 100644 --- a/net/net.gyp +++ b/net/net.gyp
@@ -289,7 +289,11 @@ 'sources!': [ 'http/bidirectional_stream_unittest.cc', ], - }, + }, { # else + 'defines': [ + 'ENABLE_BIDIRECTIONAL_STREAM', + ], + } ], [ 'enable_built_in_dns!=1', { 'sources!': [
diff --git a/net/quic/congestion_control/cubic.cc b/net/quic/congestion_control/cubic.cc index 6cd6557..9a924b5 100644 --- a/net/quic/congestion_control/cubic.cc +++ b/net/quic/congestion_control/cubic.cc
@@ -70,7 +70,6 @@ void Cubic::Reset() { epoch_ = QuicTime::Zero(); // Reset time. app_limited_start_time_ = QuicTime::Zero(); - ; last_update_time_ = QuicTime::Zero(); // Reset time. last_congestion_window_ = 0; last_max_congestion_window_ = 0;
diff --git a/net/spdy/bidirectional_stream_spdy_job.cc b/net/spdy/bidirectional_stream_spdy_job.cc index 086d1b2..553d191c 100644 --- a/net/spdy/bidirectional_stream_spdy_job.cc +++ b/net/spdy/bidirectional_stream_spdy_job.cc
@@ -22,7 +22,7 @@ // Time to wait in millisecond to notify |delegate_| of data received. // Handing small chunks of data to the caller creates measurable overhead. // So buffer data in short time-spans and send a single read notification. -const int64 kBufferTimeMs = 1; +const int kBufferTimeMs = 1; } // namespace
diff --git a/net/spdy/spdy_network_transaction_unittest.cc b/net/spdy/spdy_network_transaction_unittest.cc index 1c41254..ba42d831 100644 --- a/net/spdy/spdy_network_transaction_unittest.cc +++ b/net/spdy/spdy_network_transaction_unittest.cc
@@ -1457,7 +1457,7 @@ out.rv = trans2->Start(&httpreq2, callback2.callback(), log); ASSERT_EQ(out.rv, ERR_IO_PENDING); out.rv = trans3->Start(&httpreq3, callback3.callback(), log); - delete trans3.release(); + trans3.reset(); ASSERT_EQ(out.rv, ERR_IO_PENDING); out.rv = callback2.WaitForResult(); ASSERT_EQ(OK, out.rv);
diff --git a/net/tools/flip_server/http_interface.cc b/net/tools/flip_server/http_interface.cc index dab0a5b4..8d5e173 100644 --- a/net/tools/flip_server/http_interface.cc +++ b/net/tools/flip_server/http_interface.cc
@@ -32,7 +32,6 @@ } HttpSM::~HttpSM() { Reset(); - delete http_framer_; } void HttpSM::ProcessBodyData(const char* input, size_t size) {
diff --git a/net/tools/flip_server/http_interface.h b/net/tools/flip_server/http_interface.h index 56758f4..73618bc7 100644 --- a/net/tools/flip_server/http_interface.h +++ b/net/tools/flip_server/http_interface.h
@@ -69,7 +69,7 @@ public: void AddToOutputOrder(const MemCacheIter& mci); - BalsaFrame* spdy_framer() { return http_framer_; } + BalsaFrame* spdy_framer() { return http_framer_.get(); } void set_is_request() override {} const OutputOrdering& output_ordering() const { return output_ordering_; } @@ -125,7 +125,7 @@ void GetOutput() override; private: - BalsaFrame* http_framer_; + scoped_ptr<BalsaFrame> http_framer_; BalsaHeaders headers_; uint32_t stream_id_; int32_t server_idx_;
diff --git a/net/tools/flip_server/mem_cache.cc b/net/tools/flip_server/mem_cache.cc index 9dd71e3..15c4f79 100644 --- a/net/tools/flip_server/mem_cache.cc +++ b/net/tools/flip_server/mem_cache.cc
@@ -206,7 +206,6 @@ return NULL; } return fi->second.get(); - ; } bool MemoryCache::AssignFileData(const std::string& filename,
diff --git a/net/tools/quic/quic_simple_server_stream_test.cc b/net/tools/quic/quic_simple_server_stream_test.cc index 0a301f0..9d8b6e3 100644 --- a/net/tools/quic/quic_simple_server_stream_test.cc +++ b/net/tools/quic/quic_simple_server_stream_test.cc
@@ -65,7 +65,7 @@ return stream->body_; } - static const int content_length(QuicSimpleServerStream* stream) { + static int content_length(QuicSimpleServerStream* stream) { return stream->content_length_; }
diff --git a/net/url_request/url_request_job_factory_impl.cc b/net/url_request/url_request_job_factory_impl.cc index b7024ad..58b97f5 100644 --- a/net/url_request/url_request_job_factory_impl.cc +++ b/net/url_request/url_request_job_factory_impl.cc
@@ -20,9 +20,7 @@ URLRequestJobFactoryImpl::URLRequestJobFactoryImpl() {} -URLRequestJobFactoryImpl::~URLRequestJobFactoryImpl() { - STLDeleteValues(&protocol_handler_map_); -} +URLRequestJobFactoryImpl::~URLRequestJobFactoryImpl() {} bool URLRequestJobFactoryImpl::SetProtocolHandler( const std::string& scheme, @@ -34,14 +32,13 @@ if (it == protocol_handler_map_.end()) return false; - delete it->second; protocol_handler_map_.erase(it); return true; } if (ContainsKey(protocol_handler_map_, scheme)) return false; - protocol_handler_map_[scheme] = protocol_handler.release(); + protocol_handler_map_[scheme] = std::move(protocol_handler); return true; }
diff --git a/net/url_request/url_request_job_factory_impl.h b/net/url_request/url_request_job_factory_impl.h index 6aafa74..aee7368 100644 --- a/net/url_request/url_request_job_factory_impl.h +++ b/net/url_request/url_request_job_factory_impl.h
@@ -51,7 +51,7 @@ // For testing only. friend class URLRequestFilter; - typedef std::map<std::string, ProtocolHandler*> ProtocolHandlerMap; + typedef std::map<std::string, scoped_ptr<ProtocolHandler>> ProtocolHandlerMap; // Sets a global URLRequestInterceptor for testing purposes. The interceptor // is given the chance to intercept any request before the corresponding
diff --git a/pdf/pdfium/pdfium_engine.cc b/pdf/pdfium/pdfium_engine.cc index 90c4df56..6506d8c 100644 --- a/pdf/pdfium/pdfium_engine.cc +++ b/pdf/pdfium/pdfium_engine.cc
@@ -2599,12 +2599,13 @@ permissions_handler_revision_ = FPDF_GetSecurityHandlerRevision(doc_); if (!form_) { - // Only returns 0 when data isn't available. If form data is downloaded, or - // if this isn't a form, returns positive values. - if (!doc_loader_.IsDocumentComplete() && - !FPDFAvail_IsFormAvail(fpdf_availability_, &download_hints_)) { + int form_status = + FPDFAvail_IsFormAvail(fpdf_availability_, &download_hints_); + bool doc_complete = doc_loader_.IsDocumentComplete(); + // Try again if the data is not available and the document hasn't finished + // downloading. + if (form_status == PDF_FORM_NOTAVAIL && !doc_complete) return; - } form_ = FPDFDOC_InitFormFillEnvironment( doc_, static_cast<FPDF_FORMFILLINFO*>(this));
diff --git a/ppapi/cpp/BUILD.gn b/ppapi/cpp/BUILD.gn index 63b3f60..06ec9d1 100644 --- a/ppapi/cpp/BUILD.gn +++ b/ppapi/cpp/BUILD.gn
@@ -12,7 +12,7 @@ "ppp_entrypoints.cc", ] - deps = [ + public_deps = [ ":objects", "//ppapi/c", ]
diff --git a/ppapi/native_client/src/untrusted/irt_stub/thread_creator.c b/ppapi/native_client/src/untrusted/irt_stub/thread_creator.c index d70186d..370afa3 100644 --- a/ppapi/native_client/src/untrusted/irt_stub/thread_creator.c +++ b/ppapi/native_client/src/untrusted/irt_stub/thread_creator.c
@@ -30,7 +30,7 @@ return pthread_join((pthread_t) tid, NULL); } -const static struct PP_ThreadFunctions thread_funcs = { +static const struct PP_ThreadFunctions thread_funcs = { thread_create, thread_join };
diff --git a/remoting/host/it2me/it2me_native_messaging_host.cc b/remoting/host/it2me/it2me_native_messaging_host.cc index 294e23df..2f37cfa 100644 --- a/remoting/host/it2me/it2me_native_messaging_host.cc +++ b/remoting/host/it2me/it2me_native_messaging_host.cc
@@ -281,7 +281,7 @@ break; default: - ; + break; } SendMessageToClient(std::move(message));
diff --git a/remoting/protocol/connection_unittest.cc b/remoting/protocol/connection_unittest.cc index 12e94f8..b5be849 100644 --- a/remoting/protocol/connection_unittest.cc +++ b/remoting/protocol/connection_unittest.cc
@@ -177,7 +177,9 @@ DISALLOW_COPY_AND_ASSIGN(ConnectionTest); }; -INSTANTIATE_TEST_CASE_P(Ice, ConnectionTest, ::testing::Values(false)); +// TODO(sergeyu): Disabled due to failures on Vista bots. See +// https://crbug.com/573366. +// INSTANTIATE_TEST_CASE_P(Ice, ConnectionTest, ::testing::Values(false)); INSTANTIATE_TEST_CASE_P(Webrtc, ConnectionTest, ::testing::Values(true)); TEST_P(ConnectionTest, RejectConnection) {
diff --git a/sandbox/win/src/Wow64.cc b/sandbox/win/src/Wow64.cc index 306b9c14..d07d72f 100644 --- a/sandbox/win/src/Wow64.cc +++ b/sandbox/win/src/Wow64.cc
@@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "sandbox/win/src/wow64.h" +#include "sandbox/win/src/Wow64.h" #include <stddef.h>
diff --git a/storage/browser/fileapi/file_system_usage_cache.cc b/storage/browser/fileapi/file_system_usage_cache.cc index d9a2d00..8b6ec22 100644 --- a/storage/browser/fileapi/file_system_usage_cache.cc +++ b/storage/browser/fileapi/file_system_usage_cache.cc
@@ -133,7 +133,6 @@ bool is_valid = true; uint32_t dirty = 0; int64_t usage = 0; - ; if (!Read(usage_file_path, &is_valid, &dirty, &usage)) return false; return Write(usage_file_path, is_valid, dirty, usage + delta);
diff --git a/testing/buildbot/chromium.gpu.fyi.json b/testing/buildbot/chromium.gpu.fyi.json index 4351eb5..92d4168 100644 --- a/testing/buildbot/chromium.gpu.fyi.json +++ b/testing/buildbot/chromium.gpu.fyi.json
@@ -4,9 +4,313 @@ "GPU NextGen Mac Builder": {}, "GPU NextGen Mac Builder (dbg)": {}, "Linux NextGen Debug (NVIDIA)": { + "gtest_tests": [ + { + "args": [ + "--use-gpu-in-tests" + ], + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "10de:104a", + "os": "Linux" + } + ] + }, + "test": "angle_end2end_tests" + }, + { + "args": [ + "--use-gpu-in-tests" + ], + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "10de:104a", + "os": "Linux" + } + ] + }, + "test": "angle_unittests" + }, + { + "args": [ + "--use-gpu-in-tests" + ], + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "10de:104a", + "os": "Linux" + } + ] + }, + "test": "audio_unittests" + }, + { + "args": [ + "--use-gpu-in-tests" + ], + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "10de:104a", + "os": "Linux" + } + ] + }, + "test": "content_gl_tests" + }, + { + "args": [ + "--use-gpu-in-tests" + ], + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "10de:104a", + "os": "Linux" + } + ] + }, + "test": "gl_tests" + }, + { + "args": [ + "--use-gpu-in-tests" + ], + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "10de:104a", + "os": "Linux" + } + ] + }, + "test": "gl_unittests" + } + ], "isolated_scripts": [ { "args": [ + "context_lost", + "--show-stdout", + "--browser=debug", + "-v", + "--extra-browser-args=\"--enable-logging=stderr --js-flags=--expose-gc\"" + ], + "isolate_name": "telemetry_gpu_test", + "name": "context_lost_tests", + "override_compile_targets": [ + "telemetry_gpu_test_run" + ], + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "10de:104a", + "os": "Linux" + } + ] + } + }, + { + "args": [ + "gpu_process", + "--show-stdout", + "--browser=debug", + "-v", + "--extra-browser-args=\"--enable-logging=stderr --js-flags=--expose-gc\"" + ], + "isolate_name": "telemetry_gpu_test", + "name": "gpu_process_launch_tests", + "override_compile_targets": [ + "telemetry_gpu_test_run" + ], + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "10de:104a", + "os": "Linux" + } + ] + } + }, + { + "args": [ + "gpu_rasterization", + "--show-stdout", + "--browser=debug", + "-v", + "--extra-browser-args=\"--enable-logging=stderr --js-flags=--expose-gc\"" + ], + "isolate_name": "telemetry_gpu_test", + "name": "gpu_rasterization_tests", + "override_compile_targets": [ + "telemetry_gpu_test_run" + ], + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "10de:104a", + "os": "Linux" + } + ] + } + }, + { + "args": [ + "hardware_accelerated_feature", + "--show-stdout", + "--browser=debug", + "-v", + "--extra-browser-args=\"--enable-logging=stderr --js-flags=--expose-gc\"" + ], + "isolate_name": "telemetry_gpu_test", + "name": "hardware_accelerated_feature_tests", + "override_compile_targets": [ + "telemetry_gpu_test_run" + ], + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "10de:104a", + "os": "Linux" + } + ] + } + }, + { + "args": [ + "maps", + "--show-stdout", + "--browser=debug", + "-v", + "--extra-browser-args=\"--enable-logging=stderr --js-flags=--expose-gc\"" + ], + "isolate_name": "telemetry_gpu_test", + "name": "maps_pixel_test", + "override_compile_targets": [ + "telemetry_gpu_test_run" + ], + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "10de:104a", + "os": "Linux" + } + ] + } + }, + { + "args": [ + "memory_test", + "--show-stdout", + "--browser=debug", + "-v", + "--extra-browser-args=\"--enable-logging=stderr --js-flags=--expose-gc\"" + ], + "isolate_name": "telemetry_gpu_test", + "name": "memory_test", + "override_compile_targets": [ + "telemetry_gpu_test_run" + ], + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "10de:104a", + "os": "Linux" + } + ] + } + }, + { + "args": [ + "pixel", + "--show-stdout", + "--browser=debug", + "-v", + "--extra-browser-args=\"--enable-logging=stderr --js-flags=--expose-gc\"", + "--upload-refimg-to-cloud-storage", + "--refimg-cloud-storage-bucket", + "chromium-gpu-archive/reference-images", + "--os-type", + "linux" + ], + "isolate_name": "telemetry_gpu_test", + "name": "pixel_test", + "override_compile_targets": [ + "telemetry_gpu_test_run" + ], + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "10de:104a", + "os": "Linux" + } + ] + } + }, + { + "args": [ + "screenshot_sync", + "--show-stdout", + "--browser=debug", + "-v", + "--extra-browser-args=\"--enable-logging=stderr --js-flags=--expose-gc\"" + ], + "isolate_name": "telemetry_gpu_test", + "name": "screenshot_sync_tests", + "override_compile_targets": [ + "telemetry_gpu_test_run" + ], + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "10de:104a", + "os": "Linux" + } + ] + } + }, + { + "args": [ + "trace_test", + "--show-stdout", + "--browser=debug", + "-v", + "--extra-browser-args=\"--enable-logging=stderr --js-flags=--expose-gc\"" + ], + "isolate_name": "telemetry_gpu_test", + "name": "trace_test", + "override_compile_targets": [ + "telemetry_gpu_test_run" + ], + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "10de:104a", + "os": "Linux" + } + ] + } + }, + { + "args": [ "webgl_conformance", "--show-stdout", "--browser=debug", @@ -14,7 +318,32 @@ "--extra-browser-args=\"--enable-logging=stderr --js-flags=--expose-gc\"" ], "isolate_name": "telemetry_gpu_test", - "name": "webgl_conformance", + "name": "webgl_conformance_tests", + "override_compile_targets": [ + "telemetry_gpu_test_run" + ], + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "10de:104a", + "os": "Linux" + } + ] + } + }, + { + "args": [ + "webgl_conformance", + "--show-stdout", + "--browser=debug", + "-v", + "--extra-browser-args=\"--enable-logging=stderr --js-flags=--expose-gc\"", + "--webgl-conformance-version=2.0.0", + "--webgl2-only=true" + ], + "isolate_name": "telemetry_gpu_test", + "name": "webgl2_conformance_tests", "override_compile_targets": [ "telemetry_gpu_test_run" ], @@ -31,9 +360,313 @@ ] }, "Linux NextGen Release (NVIDIA)": { + "gtest_tests": [ + { + "args": [ + "--use-gpu-in-tests" + ], + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "10de:104a", + "os": "Linux" + } + ] + }, + "test": "angle_unittests" + }, + { + "args": [ + "--use-gpu-in-tests" + ], + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "10de:104a", + "os": "Linux" + } + ] + }, + "test": "audio_unittests" + }, + { + "args": [ + "--use-gpu-in-tests" + ], + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "10de:104a", + "os": "Linux" + } + ] + }, + "test": "content_gl_tests" + }, + { + "args": [ + "--use-gpu-in-tests" + ], + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "10de:104a", + "os": "Linux" + } + ] + }, + "test": "gl_tests" + }, + { + "args": [ + "--use-gpu-in-tests" + ], + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "10de:104a", + "os": "Linux" + } + ] + }, + "test": "gl_unittests" + }, + { + "override_compile_targets": [ + "tab_capture_end2end_tests_run" + ], + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "10de:104a", + "os": "Linux" + } + ] + }, + "test": "tab_capture_end2end_tests" + } + ], "isolated_scripts": [ { "args": [ + "context_lost", + "--show-stdout", + "--browser=release", + "-v", + "--extra-browser-args=\"--enable-logging=stderr --js-flags=--expose-gc\"" + ], + "isolate_name": "telemetry_gpu_test", + "name": "context_lost_tests", + "override_compile_targets": [ + "telemetry_gpu_test_run" + ], + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "10de:104a", + "os": "Linux" + } + ] + } + }, + { + "args": [ + "gpu_process", + "--show-stdout", + "--browser=release", + "-v", + "--extra-browser-args=\"--enable-logging=stderr --js-flags=--expose-gc\"" + ], + "isolate_name": "telemetry_gpu_test", + "name": "gpu_process_launch_tests", + "override_compile_targets": [ + "telemetry_gpu_test_run" + ], + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "10de:104a", + "os": "Linux" + } + ] + } + }, + { + "args": [ + "gpu_rasterization", + "--show-stdout", + "--browser=release", + "-v", + "--extra-browser-args=\"--enable-logging=stderr --js-flags=--expose-gc\"" + ], + "isolate_name": "telemetry_gpu_test", + "name": "gpu_rasterization_tests", + "override_compile_targets": [ + "telemetry_gpu_test_run" + ], + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "10de:104a", + "os": "Linux" + } + ] + } + }, + { + "args": [ + "hardware_accelerated_feature", + "--show-stdout", + "--browser=release", + "-v", + "--extra-browser-args=\"--enable-logging=stderr --js-flags=--expose-gc\"" + ], + "isolate_name": "telemetry_gpu_test", + "name": "hardware_accelerated_feature_tests", + "override_compile_targets": [ + "telemetry_gpu_test_run" + ], + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "10de:104a", + "os": "Linux" + } + ] + } + }, + { + "args": [ + "maps", + "--show-stdout", + "--browser=release", + "-v", + "--extra-browser-args=\"--enable-logging=stderr --js-flags=--expose-gc\"" + ], + "isolate_name": "telemetry_gpu_test", + "name": "maps_pixel_test", + "override_compile_targets": [ + "telemetry_gpu_test_run" + ], + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "10de:104a", + "os": "Linux" + } + ] + } + }, + { + "args": [ + "memory_test", + "--show-stdout", + "--browser=release", + "-v", + "--extra-browser-args=\"--enable-logging=stderr --js-flags=--expose-gc\"" + ], + "isolate_name": "telemetry_gpu_test", + "name": "memory_test", + "override_compile_targets": [ + "telemetry_gpu_test_run" + ], + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "10de:104a", + "os": "Linux" + } + ] + } + }, + { + "args": [ + "pixel", + "--show-stdout", + "--browser=release", + "-v", + "--extra-browser-args=\"--enable-logging=stderr --js-flags=--expose-gc\"", + "--upload-refimg-to-cloud-storage", + "--refimg-cloud-storage-bucket", + "chromium-gpu-archive/reference-images", + "--os-type", + "linux" + ], + "isolate_name": "telemetry_gpu_test", + "name": "pixel_test", + "override_compile_targets": [ + "telemetry_gpu_test_run" + ], + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "10de:104a", + "os": "Linux" + } + ] + } + }, + { + "args": [ + "screenshot_sync", + "--show-stdout", + "--browser=release", + "-v", + "--extra-browser-args=\"--enable-logging=stderr --js-flags=--expose-gc\"" + ], + "isolate_name": "telemetry_gpu_test", + "name": "screenshot_sync_tests", + "override_compile_targets": [ + "telemetry_gpu_test_run" + ], + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "10de:104a", + "os": "Linux" + } + ] + } + }, + { + "args": [ + "trace_test", + "--show-stdout", + "--browser=release", + "-v", + "--extra-browser-args=\"--enable-logging=stderr --js-flags=--expose-gc\"" + ], + "isolate_name": "telemetry_gpu_test", + "name": "trace_test", + "override_compile_targets": [ + "telemetry_gpu_test_run" + ], + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "10de:104a", + "os": "Linux" + } + ] + } + }, + { + "args": [ "webgl_conformance", "--show-stdout", "--browser=release", @@ -41,7 +674,32 @@ "--extra-browser-args=\"--enable-logging=stderr --js-flags=--expose-gc\"" ], "isolate_name": "telemetry_gpu_test", - "name": "webgl_conformance", + "name": "webgl_conformance_tests", + "override_compile_targets": [ + "telemetry_gpu_test_run" + ], + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "10de:104a", + "os": "Linux" + } + ] + } + }, + { + "args": [ + "webgl_conformance", + "--show-stdout", + "--browser=release", + "-v", + "--extra-browser-args=\"--enable-logging=stderr --js-flags=--expose-gc\"", + "--webgl-conformance-version=2.0.0", + "--webgl2-only=true" + ], + "isolate_name": "telemetry_gpu_test", + "name": "webgl2_conformance_tests", "override_compile_targets": [ "telemetry_gpu_test_run" ], @@ -58,9 +716,341 @@ ] }, "Mac NextGen 10.10 Retina Debug (AMD)": { + "gtest_tests": [ + { + "args": [ + "--use-gpu-in-tests" + ], + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "1002:6821", + "hidpi": "1", + "os": "Mac-10.10" + } + ] + }, + "test": "angle_end2end_tests" + }, + { + "args": [ + "--use-gpu-in-tests" + ], + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "1002:6821", + "hidpi": "1", + "os": "Mac-10.10" + } + ] + }, + "test": "angle_unittests" + }, + { + "args": [ + "--use-gpu-in-tests" + ], + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "1002:6821", + "hidpi": "1", + "os": "Mac-10.10" + } + ] + }, + "test": "audio_unittests" + }, + { + "args": [ + "--use-gpu-in-tests" + ], + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "1002:6821", + "hidpi": "1", + "os": "Mac-10.10" + } + ] + }, + "test": "content_gl_tests" + }, + { + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "1002:6821", + "hidpi": "1", + "os": "Mac-10.10" + } + ] + }, + "test": "content_unittests" + }, + { + "args": [ + "--use-gpu-in-tests" + ], + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "1002:6821", + "hidpi": "1", + "os": "Mac-10.10" + } + ] + }, + "test": "gl_tests" + }, + { + "args": [ + "--use-gpu-in-tests" + ], + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "1002:6821", + "hidpi": "1", + "os": "Mac-10.10" + } + ] + }, + "test": "gl_unittests" + } + ], "isolated_scripts": [ { "args": [ + "context_lost", + "--show-stdout", + "--browser=debug", + "-v", + "--extra-browser-args=\"--enable-logging=stderr --js-flags=--expose-gc\"" + ], + "isolate_name": "telemetry_gpu_test", + "name": "context_lost_tests", + "override_compile_targets": [ + "telemetry_gpu_test_run" + ], + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "1002:6821", + "hidpi": "1", + "os": "Mac-10.10" + } + ] + } + }, + { + "args": [ + "gpu_process", + "--show-stdout", + "--browser=debug", + "-v", + "--extra-browser-args=\"--enable-logging=stderr --js-flags=--expose-gc\"" + ], + "isolate_name": "telemetry_gpu_test", + "name": "gpu_process_launch_tests", + "override_compile_targets": [ + "telemetry_gpu_test_run" + ], + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "1002:6821", + "hidpi": "1", + "os": "Mac-10.10" + } + ] + } + }, + { + "args": [ + "gpu_rasterization", + "--show-stdout", + "--browser=debug", + "-v", + "--extra-browser-args=\"--enable-logging=stderr --js-flags=--expose-gc\"" + ], + "isolate_name": "telemetry_gpu_test", + "name": "gpu_rasterization_tests", + "override_compile_targets": [ + "telemetry_gpu_test_run" + ], + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "1002:6821", + "hidpi": "1", + "os": "Mac-10.10" + } + ] + } + }, + { + "args": [ + "hardware_accelerated_feature", + "--show-stdout", + "--browser=debug", + "-v", + "--extra-browser-args=\"--enable-logging=stderr --js-flags=--expose-gc\"" + ], + "isolate_name": "telemetry_gpu_test", + "name": "hardware_accelerated_feature_tests", + "override_compile_targets": [ + "telemetry_gpu_test_run" + ], + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "1002:6821", + "hidpi": "1", + "os": "Mac-10.10" + } + ] + } + }, + { + "args": [ + "maps", + "--show-stdout", + "--browser=debug", + "-v", + "--extra-browser-args=\"--enable-logging=stderr --js-flags=--expose-gc\"" + ], + "isolate_name": "telemetry_gpu_test", + "name": "maps_pixel_test", + "override_compile_targets": [ + "telemetry_gpu_test_run" + ], + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "1002:6821", + "hidpi": "1", + "os": "Mac-10.10" + } + ] + } + }, + { + "args": [ + "memory_test", + "--show-stdout", + "--browser=debug", + "-v", + "--extra-browser-args=\"--enable-logging=stderr --js-flags=--expose-gc\"" + ], + "isolate_name": "telemetry_gpu_test", + "name": "memory_test", + "override_compile_targets": [ + "telemetry_gpu_test_run" + ], + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "1002:6821", + "hidpi": "1", + "os": "Mac-10.10" + } + ] + } + }, + { + "args": [ + "pixel", + "--show-stdout", + "--browser=debug", + "-v", + "--extra-browser-args=\"--enable-logging=stderr --js-flags=--expose-gc\"", + "--upload-refimg-to-cloud-storage", + "--refimg-cloud-storage-bucket", + "chromium-gpu-archive/reference-images", + "--os-type", + "linux" + ], + "isolate_name": "telemetry_gpu_test", + "name": "pixel_test", + "override_compile_targets": [ + "telemetry_gpu_test_run" + ], + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "1002:6821", + "hidpi": "1", + "os": "Mac-10.10" + } + ] + } + }, + { + "args": [ + "screenshot_sync", + "--show-stdout", + "--browser=debug", + "-v", + "--extra-browser-args=\"--enable-logging=stderr --js-flags=--expose-gc\"" + ], + "isolate_name": "telemetry_gpu_test", + "name": "screenshot_sync_tests", + "override_compile_targets": [ + "telemetry_gpu_test_run" + ], + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "1002:6821", + "hidpi": "1", + "os": "Mac-10.10" + } + ] + } + }, + { + "args": [ + "trace_test", + "--show-stdout", + "--browser=debug", + "-v", + "--extra-browser-args=\"--enable-logging=stderr --js-flags=--expose-gc\"" + ], + "isolate_name": "telemetry_gpu_test", + "name": "trace_test", + "override_compile_targets": [ + "telemetry_gpu_test_run" + ], + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "1002:6821", + "hidpi": "1", + "os": "Mac-10.10" + } + ] + } + }, + { + "args": [ "webgl_conformance", "--show-stdout", "--browser=debug", @@ -68,7 +1058,33 @@ "--extra-browser-args=\"--enable-logging=stderr --js-flags=--expose-gc\"" ], "isolate_name": "telemetry_gpu_test", - "name": "webgl_conformance", + "name": "webgl_conformance_tests", + "override_compile_targets": [ + "telemetry_gpu_test_run" + ], + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "1002:6821", + "hidpi": "1", + "os": "Mac-10.10" + } + ] + } + }, + { + "args": [ + "webgl_conformance", + "--show-stdout", + "--browser=debug", + "-v", + "--extra-browser-args=\"--enable-logging=stderr --js-flags=--expose-gc\"", + "--webgl-conformance-version=2.0.0", + "--webgl2-only=true" + ], + "isolate_name": "telemetry_gpu_test", + "name": "webgl2_conformance_tests", "override_compile_targets": [ "telemetry_gpu_test_run" ], @@ -86,9 +1102,357 @@ ] }, "Mac NextGen 10.10 Retina Release (AMD)": { + "gtest_tests": [ + { + "args": [ + "--use-gpu-in-tests" + ], + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "1002:6821", + "hidpi": "1", + "os": "Mac-10.10" + } + ] + }, + "test": "angle_end2end_tests" + }, + { + "args": [ + "--use-gpu-in-tests" + ], + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "1002:6821", + "hidpi": "1", + "os": "Mac-10.10" + } + ] + }, + "test": "angle_unittests" + }, + { + "args": [ + "--use-gpu-in-tests" + ], + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "1002:6821", + "hidpi": "1", + "os": "Mac-10.10" + } + ] + }, + "test": "audio_unittests" + }, + { + "args": [ + "--use-gpu-in-tests" + ], + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "1002:6821", + "hidpi": "1", + "os": "Mac-10.10" + } + ] + }, + "test": "content_gl_tests" + }, + { + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "1002:6821", + "hidpi": "1", + "os": "Mac-10.10" + } + ] + }, + "test": "content_unittests" + }, + { + "args": [ + "--use-gpu-in-tests" + ], + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "1002:6821", + "hidpi": "1", + "os": "Mac-10.10" + } + ] + }, + "test": "gl_tests" + }, + { + "args": [ + "--use-gpu-in-tests" + ], + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "1002:6821", + "hidpi": "1", + "os": "Mac-10.10" + } + ] + }, + "test": "gl_unittests" + }, + { + "override_compile_targets": [ + "tab_capture_end2end_tests_run" + ], + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "1002:6821", + "hidpi": "1", + "os": "Mac-10.10" + } + ] + }, + "test": "tab_capture_end2end_tests" + } + ], "isolated_scripts": [ { "args": [ + "context_lost", + "--show-stdout", + "--browser=release", + "-v", + "--extra-browser-args=\"--enable-logging=stderr --js-flags=--expose-gc\"" + ], + "isolate_name": "telemetry_gpu_test", + "name": "context_lost_tests", + "override_compile_targets": [ + "telemetry_gpu_test_run" + ], + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "1002:6821", + "hidpi": "1", + "os": "Mac-10.10" + } + ] + } + }, + { + "args": [ + "gpu_process", + "--show-stdout", + "--browser=release", + "-v", + "--extra-browser-args=\"--enable-logging=stderr --js-flags=--expose-gc\"" + ], + "isolate_name": "telemetry_gpu_test", + "name": "gpu_process_launch_tests", + "override_compile_targets": [ + "telemetry_gpu_test_run" + ], + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "1002:6821", + "hidpi": "1", + "os": "Mac-10.10" + } + ] + } + }, + { + "args": [ + "gpu_rasterization", + "--show-stdout", + "--browser=release", + "-v", + "--extra-browser-args=\"--enable-logging=stderr --js-flags=--expose-gc\"" + ], + "isolate_name": "telemetry_gpu_test", + "name": "gpu_rasterization_tests", + "override_compile_targets": [ + "telemetry_gpu_test_run" + ], + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "1002:6821", + "hidpi": "1", + "os": "Mac-10.10" + } + ] + } + }, + { + "args": [ + "hardware_accelerated_feature", + "--show-stdout", + "--browser=release", + "-v", + "--extra-browser-args=\"--enable-logging=stderr --js-flags=--expose-gc\"" + ], + "isolate_name": "telemetry_gpu_test", + "name": "hardware_accelerated_feature_tests", + "override_compile_targets": [ + "telemetry_gpu_test_run" + ], + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "1002:6821", + "hidpi": "1", + "os": "Mac-10.10" + } + ] + } + }, + { + "args": [ + "maps", + "--show-stdout", + "--browser=release", + "-v", + "--extra-browser-args=\"--enable-logging=stderr --js-flags=--expose-gc\"" + ], + "isolate_name": "telemetry_gpu_test", + "name": "maps_pixel_test", + "override_compile_targets": [ + "telemetry_gpu_test_run" + ], + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "1002:6821", + "hidpi": "1", + "os": "Mac-10.10" + } + ] + } + }, + { + "args": [ + "memory_test", + "--show-stdout", + "--browser=release", + "-v", + "--extra-browser-args=\"--enable-logging=stderr --js-flags=--expose-gc\"" + ], + "isolate_name": "telemetry_gpu_test", + "name": "memory_test", + "override_compile_targets": [ + "telemetry_gpu_test_run" + ], + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "1002:6821", + "hidpi": "1", + "os": "Mac-10.10" + } + ] + } + }, + { + "args": [ + "pixel", + "--show-stdout", + "--browser=release", + "-v", + "--extra-browser-args=\"--enable-logging=stderr --js-flags=--expose-gc\"", + "--upload-refimg-to-cloud-storage", + "--refimg-cloud-storage-bucket", + "chromium-gpu-archive/reference-images", + "--os-type", + "linux" + ], + "isolate_name": "telemetry_gpu_test", + "name": "pixel_test", + "override_compile_targets": [ + "telemetry_gpu_test_run" + ], + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "1002:6821", + "hidpi": "1", + "os": "Mac-10.10" + } + ] + } + }, + { + "args": [ + "screenshot_sync", + "--show-stdout", + "--browser=release", + "-v", + "--extra-browser-args=\"--enable-logging=stderr --js-flags=--expose-gc\"" + ], + "isolate_name": "telemetry_gpu_test", + "name": "screenshot_sync_tests", + "override_compile_targets": [ + "telemetry_gpu_test_run" + ], + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "1002:6821", + "hidpi": "1", + "os": "Mac-10.10" + } + ] + } + }, + { + "args": [ + "trace_test", + "--show-stdout", + "--browser=release", + "-v", + "--extra-browser-args=\"--enable-logging=stderr --js-flags=--expose-gc\"" + ], + "isolate_name": "telemetry_gpu_test", + "name": "trace_test", + "override_compile_targets": [ + "telemetry_gpu_test_run" + ], + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "1002:6821", + "hidpi": "1", + "os": "Mac-10.10" + } + ] + } + }, + { + "args": [ "webgl_conformance", "--show-stdout", "--browser=release", @@ -96,7 +1460,33 @@ "--extra-browser-args=\"--enable-logging=stderr --js-flags=--expose-gc\"" ], "isolate_name": "telemetry_gpu_test", - "name": "webgl_conformance", + "name": "webgl_conformance_tests", + "override_compile_targets": [ + "telemetry_gpu_test_run" + ], + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "1002:6821", + "hidpi": "1", + "os": "Mac-10.10" + } + ] + } + }, + { + "args": [ + "webgl_conformance", + "--show-stdout", + "--browser=release", + "-v", + "--extra-browser-args=\"--enable-logging=stderr --js-flags=--expose-gc\"", + "--webgl-conformance-version=2.0.0", + "--webgl2-only=true" + ], + "isolate_name": "telemetry_gpu_test", + "name": "webgl2_conformance_tests", "override_compile_targets": [ "telemetry_gpu_test_run" ],
diff --git a/testing/buildbot/chromium_arm.json b/testing/buildbot/chromium_arm.json deleted file mode 100644 index c3d306d..0000000 --- a/testing/buildbot/chromium_arm.json +++ /dev/null
@@ -1,14 +0,0 @@ -{ - "compile_targets": [ - "browser_tests_run", - "nacl_helper_nonsfi_unittests_run", - "nacl_loader_unittests_run", - "sandbox_linux_unittests_run" - ], - "gtest_tests": [ - "browser_tests", - "nacl_helper_nonsfi_unittests", - "nacl_loader_unittests", - "sandbox_linux_unittests" - ] -}
diff --git a/testing/buildbot/gn_isolate_map.pyl b/testing/buildbot/gn_isolate_map.pyl index d20c9a78..069ac06 100644 --- a/testing/buildbot/gn_isolate_map.pyl +++ b/testing/buildbot/gn_isolate_map.pyl
@@ -60,6 +60,11 @@ "label": "//ash:ash_unittests", "type": "unknown", }, + "audio_unittests": { + "label": "//media:audio_unittests", + "type": "raw", + "args": [], + }, "aura_unittests": { "label": "//ui/aura:aura_unittests", "type": "windowed_test_launcher",
diff --git a/third_party/WebKit/LayoutTests/NeverFixTests b/third_party/WebKit/LayoutTests/NeverFixTests index 10c6dda..adfe607b 100644 --- a/third_party/WebKit/LayoutTests/NeverFixTests +++ b/third_party/WebKit/LayoutTests/NeverFixTests
@@ -59,9 +59,6 @@ [ Mac ] fast/forms/select/menulist-onchange-fired-with-key-up-down.html [ WontFix ] [ Mac ] fast/forms/select/popup-with-display-none-optgroup.html [ WontFix ] -# Chromium does not support PDF content in <img> tags. -[ Win Linux ] compositing/images/direct-pdf-image.html [ WontFix ] - # Pan-scroll tests are Windows-specific. [ Linux Mac ] fast/events/panScroll-click.html [ WontFix ] [ Linux Mac ] fast/events/panScroll-click-hyperlink.html [ WontFix ]
diff --git a/third_party/WebKit/LayoutTests/SlowTests b/third_party/WebKit/LayoutTests/SlowTests index 396e56d1..09cb13b5 100644 --- a/third_party/WebKit/LayoutTests/SlowTests +++ b/third_party/WebKit/LayoutTests/SlowTests
@@ -116,6 +116,9 @@ webkit.org/b/84735 [ Win ] http/tests/inspector/change-iframe-src.html [ Slow ] crbug.com/504565 [ Mac ] http/tests/inspector/search/sources-search-scope.html [ Slow ] +crbug.com/510337 cssom/cssvalue-comparison.html [ Slow ] +crbug.com/510337 inspector/elements/styles-1/edit-value-url-with-color.html [ Slow ] + # This test is intentionally SLOW as we're waiting for a connection timeout. crbug.com/73609 http/tests/media/video-play-stall.html [ Slow ]
diff --git a/third_party/WebKit/LayoutTests/TestExpectations b/third_party/WebKit/LayoutTests/TestExpectations index ed00713..212ca3d 100644 --- a/third_party/WebKit/LayoutTests/TestExpectations +++ b/third_party/WebKit/LayoutTests/TestExpectations
@@ -352,10 +352,7 @@ # But consistently passes on release builds. crbug.com/518005 crbug.com/463358 [ Mac ] svg/W3C-SVG-1.1/struct-frag-02-t.svg [ Pass Failure ] -crbug.com/510337 cssom/cssvalue-comparison.html [ Slow ] -crbug.com/510337 inspector/console/console-format.html [ Slow ] -crbug.com/510337 inspector/elements/edit/edit-dom-actions.html [ Slow Timeout ] -crbug.com/510337 inspector/elements/styles-1/edit-value-url-with-color.html [ Slow ] +crbug.com/510337 inspector/elements/edit/edit-dom-actions.html [ Timeout ] # SPv2 paint properties are still being implemented. crbug.com/537409 virtual/spv2/ [ Skip ] @@ -772,7 +769,6 @@ crbug.com/356957 [ Win Mac ] editing/spelling/spellcheck-editable-on-focus.html [ Timeout ] crbug.com/564403 http/tests/inspector/service-workers/service-worker-manager.html [ Failure Pass ] -crbug.com/365400 [ Mac ] compositing/images/direct-pdf-image.html [ Failure ] crbug.com/306222 fast/hidpi/image-srcset-relative-svg-canvas.html [ Skip ] crbug.com/306222 fast/hidpi/image-srcset-relative-svg-canvas-2x.html [ Skip ] @@ -1257,6 +1253,10 @@ crbug.com/548765 http/tests/inspector/console-fetch-logging.html [ Failure Pass Slow ] crbug.com/549314 [ XP ] inspector-protocol/layout-fonts/unicode-range-combining-chars-fallback.html [ Failure ] +crbug.com/573287 inspector/console/console-dir.html [ NeedsManualRebaseline ] +crbug.com/573287 inspector/console/console-big-array.html [ NeedsManualRebaseline ] +crbug.com/573287 inspector/console/console-format.html [ NeedsManualRebaseline ] + crbug.com/563694 [ Linux Mac Debug ] svg/hixie/perf/005.xml [ Failure ] crbug.com/564109 [ Win7 XP ] http/tests/webfont/font-display.html [ Pass Timeout Failure ]
diff --git a/third_party/WebKit/LayoutTests/accessibility/insert-adjacent-html-causes-crash-expected.txt b/third_party/WebKit/LayoutTests/accessibility/insert-adjacent-html-causes-crash-expected.txt new file mode 100644 index 0000000..52b0b50 --- /dev/null +++ b/third_party/WebKit/LayoutTests/accessibility/insert-adjacent-html-causes-crash-expected.txt
@@ -0,0 +1,3 @@ +text +x +
diff --git a/third_party/WebKit/LayoutTests/accessibility/insert-adjacent-html-causes-crash.xhtml b/third_party/WebKit/LayoutTests/accessibility/insert-adjacent-html-causes-crash.xhtml new file mode 100644 index 0000000..793ea7d --- /dev/null +++ b/third_party/WebKit/LayoutTests/accessibility/insert-adjacent-html-causes-crash.xhtml
@@ -0,0 +1,26 @@ +<!-- This document must be xhtml for the crash to occur --> +<li xmlns="http://www.w3.org/1999/xhtml"> + <h1 id="x">x<h1></h1></h1> + <script><![CDATA[ + if (testRunner) + testRunner.dumpAsText(); + + // Calling accessibleElementById on a nonexistant id has the side effect + // of creating an accessibility object for every node in the tree. + if (accessibilityController) + accessibilityController.accessibleElementById('dummy'); + + // Calling insertAdjacentHTML causes the cached parent of an + // AXLayoutObject to be invalid after the next layout. + x=document.getElementById("x"); + x.insertAdjacentHTML("beforebegin", "text"); + + // Force layout. + x.offsetTop; + + // Explore the accessibility tree again, triggering the crash if + // the cached parent isn't updated correctly. + if (accessibilityController) + accessibilityController.accessibleElementById('dummy'); + ]]></script> +</li>
diff --git a/third_party/WebKit/LayoutTests/accessibility/line-for-index-endless-loop.html b/third_party/WebKit/LayoutTests/accessibility/line-for-index-endless-loop.html new file mode 100644 index 0000000..6ba41ee7 --- /dev/null +++ b/third_party/WebKit/LayoutTests/accessibility/line-for-index-endless-loop.html
@@ -0,0 +1,32 @@ +<!DOCTYPE HTML> +<script src="../resources/testharness.js"></script> +<script src="../resources/testharnessreport.js"></script> + +<style> +.hideAllContainers .container { + display: none; +} +</style> + +<div class="container" id="contentEditable" contentEditable> + <span style="display: inline-block;"> + <span style="position: absolute;"> + <span>x</span> + </span> + <span>2</span> + <span style="display: inline-block;"></span> + </span> + <span>+</span> +</div> + +<script> +test(function(t) { + var axContentEditable = accessibilityController.accessibleElementById("contentEditable"); + assert_equals(axContentEditable.lineForIndex(0), 0); +}, "No endless loop when getting line for index in contentEditable"); +</script> + +<script> +if (window.testRunner) + document.body.className = "hideAllContainers"; +</script>
diff --git a/third_party/WebKit/LayoutTests/compositing/culling/scrolled-within-boxshadow-expected.png b/third_party/WebKit/LayoutTests/compositing/culling/scrolled-within-boxshadow-expected.png index 17c85ce..5d81bdc8 100644 --- a/third_party/WebKit/LayoutTests/compositing/culling/scrolled-within-boxshadow-expected.png +++ b/third_party/WebKit/LayoutTests/compositing/culling/scrolled-within-boxshadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/compositing/culling/translated-boxshadow-expected.png b/third_party/WebKit/LayoutTests/compositing/culling/translated-boxshadow-expected.png index da750225..e1fb5a2 100644 --- a/third_party/WebKit/LayoutTests/compositing/culling/translated-boxshadow-expected.png +++ b/third_party/WebKit/LayoutTests/compositing/culling/translated-boxshadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/compositing/culling/unscrolled-within-boxshadow-expected.png b/third_party/WebKit/LayoutTests/compositing/culling/unscrolled-within-boxshadow-expected.png index 17c85ce..5d81bdc8 100644 --- a/third_party/WebKit/LayoutTests/compositing/culling/unscrolled-within-boxshadow-expected.png +++ b/third_party/WebKit/LayoutTests/compositing/culling/unscrolled-within-boxshadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/compositing/geometry/foreground-layer-expected.png b/third_party/WebKit/LayoutTests/compositing/geometry/foreground-layer-expected.png index 9f1cee2..8df504fe 100644 --- a/third_party/WebKit/LayoutTests/compositing/geometry/foreground-layer-expected.png +++ b/third_party/WebKit/LayoutTests/compositing/geometry/foreground-layer-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/compositing/images/direct-pdf-image-expected.png b/third_party/WebKit/LayoutTests/compositing/images/direct-pdf-image-expected.png deleted file mode 100644 index d00486b..0000000 --- a/third_party/WebKit/LayoutTests/compositing/images/direct-pdf-image-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/compositing/images/direct-pdf-image-expected.txt b/third_party/WebKit/LayoutTests/compositing/images/direct-pdf-image-expected.txt deleted file mode 100644 index c72ff67..0000000 --- a/third_party/WebKit/LayoutTests/compositing/images/direct-pdf-image-expected.txt +++ /dev/null
@@ -1,11 +0,0 @@ -layer at (0,0) size 800x600 - LayoutView at (0,0) size 800x600 -layer at (0,0) size 800x600 - LayoutBlockFlow {HTML} at (0,0) size 800x600 - LayoutBlockFlow {BODY} at (0,0) size 800x600 -layer at (0,0) size 100x200 - LayoutBlockFlow (positioned) {DIV} at (0,0) size 100x200 [bgcolor=#FF0000] -layer at (0,0) size 100x100 - LayoutImage {IMG} at (0,0) size 100x100 -layer at (0,100) size 100x100 - LayoutImage {IMG} at (0,100) size 100x100
diff --git a/third_party/WebKit/LayoutTests/compositing/images/direct-pdf-image.html b/third_party/WebKit/LayoutTests/compositing/images/direct-pdf-image.html deleted file mode 100644 index 0914456..0000000 --- a/third_party/WebKit/LayoutTests/compositing/images/direct-pdf-image.html +++ /dev/null
@@ -1,40 +0,0 @@ -<!DOCTYPE> - -<html> -<head> - <style type="text/css" media="screen"> - body { - margin: 0; - } - - img { - position: relative; - display: block; - width: 100px; - height: 100px; - } - - .composited { - transform: translateZ(0); - } - - #indicator { - position: absolute; - top: 0; - background-color: red; - width: 100px; - height: 200px; - } - </style> -</head> -<body> - - <div id="indicator"></div> - - <img src="../../fast/images/resources/green_rectangle.pdf"> - <img class="composited" src="../../fast/images/resources/green_rectangle.pdf"> - - <!-- You should see no red above --> - -</body> -</html>
diff --git a/third_party/WebKit/LayoutTests/fast/block/float/add-float-after-anonymous-block-being-destroyed-expected.txt b/third_party/WebKit/LayoutTests/fast/block/float/add-float-after-anonymous-block-being-destroyed-expected.txt deleted file mode 100644 index 85e6124..0000000 --- a/third_party/WebKit/LayoutTests/fast/block/float/add-float-after-anonymous-block-being-destroyed-expected.txt +++ /dev/null
@@ -1,3 +0,0 @@ -crbug.com/322039: Don't attempt to fold a float into an anonymous block if it is being destroyed. The test should not crash. - -
diff --git a/third_party/WebKit/LayoutTests/fast/block/float/add-float-after-anonymous-block-being-destroyed.html b/third_party/WebKit/LayoutTests/fast/block/float/add-float-after-anonymous-block-being-destroyed.html deleted file mode 100644 index 8c0e7d5..0000000 --- a/third_party/WebKit/LayoutTests/fast/block/float/add-float-after-anonymous-block-being-destroyed.html +++ /dev/null
@@ -1,19 +0,0 @@ -<!DOCTYPE html> -<style> -.float { float: right; } -.span { content: ""; } -</style> -<body> - <p>crbug.com/322039: Don't attempt to fold a float into an anonymous block if it is being destroyed. The test should not crash.</p> - <span id="span" class="span"><div></div></span> - <div id="div"></div> - <div class="float"></div> -</body> -<script> - if (window.testRunner) - testRunner.dumpAsText(); - document.body.offsetTop; - span.setAttribute('class', ''); - div.setAttribute('class', 'float'); -</script> -
diff --git a/third_party/WebKit/LayoutTests/fast/block/float/add-inline-before-float-and-into-anonymous-block-container-expected.html b/third_party/WebKit/LayoutTests/fast/block/float/add-inline-before-float-and-into-anonymous-block-container-expected.html deleted file mode 100644 index 10c401d..0000000 --- a/third_party/WebKit/LayoutTests/fast/block/float/add-inline-before-float-and-into-anonymous-block-container-expected.html +++ /dev/null
@@ -1,14 +0,0 @@ -<!DOCTYPE html> -<style> -.block { - width: 50px; - height: 50px; - background-color: green; -} - -</style> -<p>crbug.com/322039: There should be a green <em>square</em> below.</p> -<div> - <br> - <div id="first" class="block"></div> -</div>
diff --git a/third_party/WebKit/LayoutTests/fast/block/float/add-inline-before-float-and-into-anonymous-block-container.html b/third_party/WebKit/LayoutTests/fast/block/float/add-inline-before-float-and-into-anonymous-block-container.html deleted file mode 100644 index 1780f6e..0000000 --- a/third_party/WebKit/LayoutTests/fast/block/float/add-inline-before-float-and-into-anonymous-block-container.html +++ /dev/null
@@ -1,27 +0,0 @@ -<!DOCTYPE html> -<style> -.block { - width: 25px; - height: 50px; - background-color: green; -} - -.float { - width: 25px; - height: 50px; - background-color: green; - float: left; -} -</style> -<p>crbug.com/322039: There should be a green <em>square</em> below.</p> -<div> - <div></div> - <br> - <div id="first" class="block"></div> - <div class="float"></div> -</div> -<script> - document.body.offsetTop; - document.getElementById("first").style.display = "inline-block"; -</script> -
diff --git a/third_party/WebKit/LayoutTests/fast/block/float/remove-div-after-float-and-before-anonymous-block-container.html b/third_party/WebKit/LayoutTests/fast/block/float/remove-div-after-float-and-before-anonymous-block-container.html deleted file mode 100644 index c0bbc3c..0000000 --- a/third_party/WebKit/LayoutTests/fast/block/float/remove-div-after-float-and-before-anonymous-block-container.html +++ /dev/null
@@ -1,28 +0,0 @@ -<!DOCTYPE html> -<style> -.block { - width: 50px; - height: 25px; - background-color: green; -} - -.float { - width: 50px; - height: 25px; - background-color: green; - float: left; -} -</style> -<p>crbug.com/322039: There should be a green <em>square</em> below. In the layout tree the float should be inside the anonymous block.</p> -<div style="width: 150px;"> - <div class="block"></div> - <div class="float"></div> - <div id="div"></div> - Text. -</div> -<script> - document.body.offsetTop; - var div = document.getElementById("div"); - div.parentNode.removeChild(div); -</script> -
diff --git a/third_party/WebKit/LayoutTests/fast/borders/border-radius-with-box-shadow-01-expected.png b/third_party/WebKit/LayoutTests/fast/borders/border-radius-with-box-shadow-01-expected.png index d6d002b..db91c09 100644 --- a/third_party/WebKit/LayoutTests/fast/borders/border-radius-with-box-shadow-01-expected.png +++ b/third_party/WebKit/LayoutTests/fast/borders/border-radius-with-box-shadow-01-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/fast/borders/border-radius-with-box-shadow-expected.png b/third_party/WebKit/LayoutTests/fast/borders/border-radius-with-box-shadow-expected.png index 26e6040..ed0d2eb 100644 --- a/third_party/WebKit/LayoutTests/fast/borders/border-radius-with-box-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/fast/borders/border-radius-with-box-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/fast/box-shadow/box-shadow-clipped-slices-expected.png b/third_party/WebKit/LayoutTests/fast/box-shadow/box-shadow-clipped-slices-expected.png index 670a8163..ef4c6b6f 100644 --- a/third_party/WebKit/LayoutTests/fast/box-shadow/box-shadow-clipped-slices-expected.png +++ b/third_party/WebKit/LayoutTests/fast/box-shadow/box-shadow-clipped-slices-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/fast/box-shadow/box-shadow-radius-expected.png b/third_party/WebKit/LayoutTests/fast/box-shadow/box-shadow-radius-expected.png index cff1630..484579df 100644 --- a/third_party/WebKit/LayoutTests/fast/box-shadow/box-shadow-radius-expected.png +++ b/third_party/WebKit/LayoutTests/fast/box-shadow/box-shadow-radius-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/fast/box-shadow/inset-box-shadow-radius-expected.png b/third_party/WebKit/LayoutTests/fast/box-shadow/inset-box-shadow-radius-expected.png index 998c549..858389fa 100644 --- a/third_party/WebKit/LayoutTests/fast/box-shadow/inset-box-shadow-radius-expected.png +++ b/third_party/WebKit/LayoutTests/fast/box-shadow/inset-box-shadow-radius-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/fast/box-shadow/inset-box-shadows-expected.png b/third_party/WebKit/LayoutTests/fast/box-shadow/inset-box-shadows-expected.png index e472cd3..c26bdb7a 100644 --- a/third_party/WebKit/LayoutTests/fast/box-shadow/inset-box-shadows-expected.png +++ b/third_party/WebKit/LayoutTests/fast/box-shadow/inset-box-shadows-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/fast/box-shadow/scaled-box-shadow-expected.png b/third_party/WebKit/LayoutTests/fast/box-shadow/scaled-box-shadow-expected.png index 001b359..ee6b69d 100644 --- a/third_party/WebKit/LayoutTests/fast/box-shadow/scaled-box-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/fast/box-shadow/scaled-box-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/fast/box-shadow/shadow-buffer-partial-expected.png b/third_party/WebKit/LayoutTests/fast/box-shadow/shadow-buffer-partial-expected.png index bb8035d..04ef881 100644 --- a/third_party/WebKit/LayoutTests/fast/box-shadow/shadow-buffer-partial-expected.png +++ b/third_party/WebKit/LayoutTests/fast/box-shadow/shadow-buffer-partial-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/fast/box-shadow/shadow-tiling-artifact-expected.png b/third_party/WebKit/LayoutTests/fast/box-shadow/shadow-tiling-artifact-expected.png index 4696e54..2618d98 100644 --- a/third_party/WebKit/LayoutTests/fast/box-shadow/shadow-tiling-artifact-expected.png +++ b/third_party/WebKit/LayoutTests/fast/box-shadow/shadow-tiling-artifact-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/fast/box-shadow/single-pixel-shadow-expected.png b/third_party/WebKit/LayoutTests/fast/box-shadow/single-pixel-shadow-expected.png index eb688a4..6511f69 100644 --- a/third_party/WebKit/LayoutTests/fast/box-shadow/single-pixel-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/fast/box-shadow/single-pixel-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/fast/css/box-shadow-and-border-radius-expected.png b/third_party/WebKit/LayoutTests/fast/css/box-shadow-and-border-radius-expected.png index 55d444d..777ef11 100644 --- a/third_party/WebKit/LayoutTests/fast/css/box-shadow-and-border-radius-expected.png +++ b/third_party/WebKit/LayoutTests/fast/css/box-shadow-and-border-radius-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/fast/scrolling/overflow-auto-ltr-expected.txt b/third_party/WebKit/LayoutTests/fast/scrolling/overflow-auto-ltr-expected.txt new file mode 100644 index 0000000..59821dd --- /dev/null +++ b/third_party/WebKit/LayoutTests/fast/scrolling/overflow-auto-ltr-expected.txt
@@ -0,0 +1,10 @@ +Check that the scroll offset in an LTR block is correctly preserved when the existence of its vertical scrollbar changes. + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + +PASS finalOffset is initialOffset +PASS successfullyParsed is true + +TEST COMPLETE +INNER INNER INNER
diff --git a/third_party/WebKit/LayoutTests/fast/scrolling/overflow-auto-ltr.html b/third_party/WebKit/LayoutTests/fast/scrolling/overflow-auto-ltr.html new file mode 100644 index 0000000..5a0008d9 --- /dev/null +++ b/third_party/WebKit/LayoutTests/fast/scrolling/overflow-auto-ltr.html
@@ -0,0 +1,29 @@ +<!DOCTYPE html> +<script src="../../resources/js-test.js"></script> +<style> +#scrollLeftRtl { + width: 100px; + height: 100px; + background-color: green; + direction: rtl; + overflow: scroll; +} + +#inner { + white-space: nowrap; +} +</style> + +<div id="scrollLeftRtl"> + <span id="inner">INNER INNER INNER</span> +</div> + +<script> + description("Check that the scroll offset in an LTR block is correctly preserved when the existence of its vertical scrollbar changes."); + + var scrollLeftDiv = document.getElementById("scrollLeftRtl"); + var initialOffset = scrollLeftDiv.scrollWidth - scrollLeftDiv.clientWidth - scrollLeftDiv.scrollLeft; + scrollLeftDiv.style.overflow = "auto"; + var finalOffset = scrollLeftDiv.scrollWidth - scrollLeftDiv.clientWidth - scrollLeftDiv.scrollLeft; + shouldBe("finalOffset", "initialOffset"); +</script>
diff --git a/third_party/WebKit/LayoutTests/fast/text/whitespace/whitespace-in-pre-expected.html b/third_party/WebKit/LayoutTests/fast/text/whitespace/whitespace-in-pre-expected.html new file mode 100644 index 0000000..f152e99e --- /dev/null +++ b/third_party/WebKit/LayoutTests/fast/text/whitespace/whitespace-in-pre-expected.html
@@ -0,0 +1,34 @@ +<!DOCTYPE html> +<style> +body { + font: 10px Ahem; +} +.title { + font: 12px Times; +} +</style> +<p class="title"> The single tab should be on the second line followed by the C. The tab and the C form a single word so do not break.</p> +<div> + <p class="test">A B<br><span style="white-space:pre"> </span>C</p> +</div> +<p class="title"> The two tabs should be at the start of the second line. The 'pre' and the C form a single word so do not break. </p> +<div> + <p class="test">A B<br><span style="white-space:pre"> </span>C</p> +</div> +<p class="title"> The two tabs should fit on the first line. The line can break at the space before the C.</p> +<div> + <p class="test">A B<span style="white-space:pre"> </span><br>C</p> +</div> + +<p class="title"> The single tab should be on the second line by itself. The div allows breaking within words so the word formed by the tab and the C can be split.</p> +<div> + <p class="test">A B<br><span style="white-space:pre"> </span><br>C</p> +</div> +<p class="title"> The two tabs should be on the second line by themselves. The div allows breaking within words but it cannot split the two tabs inside a pre.</p> +<div> + <p class="test">A B<br><span style="white-space:pre"> </span><br>C</p> +</div> +<p class="title"> The two tabs should fit on the first line. The div allows breaking within words but it cannot split the two tabs inside a pre. The line can break at the space before the C.</p> +<div> + <p class="test">A B<span style="white-space:pre"> </span><br>C</p> +</div>
diff --git a/third_party/WebKit/LayoutTests/fast/text/whitespace/whitespace-in-pre.html b/third_party/WebKit/LayoutTests/fast/text/whitespace/whitespace-in-pre.html new file mode 100644 index 0000000..04ab97edb --- /dev/null +++ b/third_party/WebKit/LayoutTests/fast/text/whitespace/whitespace-in-pre.html
@@ -0,0 +1,37 @@ +<!DOCTYPE html> +<style> +body { + font: 10px Ahem; +} +.title { + font: 12px Times; +} +.break-word { + word-wrap: break-word; +} +</style> +<p class="title"> The single tab should be on the second line followed by the C. The tab and the C form a single word so do not break.</p> +<div style="width: 80px;"> + <p class="test">A B<span style="white-space:pre"> </span>C</p> +</div> +<p class="title"> The two tabs should be at the start of the second line. The 'pre' and the C form a single word so do not break. </p> +<div style="width: 160px;"> + <p class="test">A B<span style="white-space:pre"> </span>C</p> +</div> +<p class="title"> The two tabs should fit on the first line. The line can break at the space before the C.</p> +<div style="width: 160px;"> + <p class="test">A B<span style="white-space:pre"> </span> C</p> +</div> + +<p class="title"> The single tab should be on the second line by itself. The div allows breaking within words so the word formed by the tab and the C can be split.</p> +<div style="width: 80px;" class="break-word"> + <p class="test">A B<span style="white-space:pre"> </span>C</p> +</div> +<p class="title"> The two tabs should be on the second line by themselves. The div allows breaking within words but it cannot split the two tabs inside a pre.</p> +<div style="width: 110px;" class="break-word"> + <p class="test">A B<span style="white-space:pre"> </span>C</p> +</div> +<p class="title"> The two tabs should fit on the first line. The div allows breaking within words but it cannot split the two tabs inside a pre. The line can break at the space before the C.</p> +<div style="width: 160px;" class="break-word"> + <p class="test">A B<span style="white-space:pre"> </span> C</p> +</div>
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector/elements/styles/edit-css-with-source-url.html b/third_party/WebKit/LayoutTests/http/tests/inspector/elements/styles/edit-css-with-source-url.html index 3c8fe8e..896e1bdc 100644 --- a/third_party/WebKit/LayoutTests/http/tests/inspector/elements/styles/edit-css-with-source-url.html +++ b/third_party/WebKit/LayoutTests/http/tests/inspector/elements/styles/edit-css-with-source-url.html
@@ -22,7 +22,7 @@ InspectorTest.runTestSuite([ function testEditingRulesInElementsPanelDoesNotAddSourceURLToOriginalFile(next) { - var fileSystemPath = "/var/www"; + var fileSystemPath = "file:///var/www"; function dumpUISourceCodeContents() {
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector/elements/styles/update-locations-on-filesystem-scss-load.html b/third_party/WebKit/LayoutTests/http/tests/inspector/elements/styles/update-locations-on-filesystem-scss-load.html index 2ca60bd..2bf2629 100644 --- a/third_party/WebKit/LayoutTests/http/tests/inspector/elements/styles/update-locations-on-filesystem-scss-load.html +++ b/third_party/WebKit/LayoutTests/http/tests/inspector/elements/styles/update-locations-on-filesystem-scss-load.html
@@ -16,7 +16,7 @@ function test() { InspectorTest.addResult("Creating filesystem with the SCSS file..."); - var fs = new InspectorTest.TestFileSystem("/var/www"); + var fs = new InspectorTest.TestFileSystem("file:///var/www"); fs.root.addFile("update-locations-on-filesystem-scss-load.scss", ["a {", " foo: bar;", "/* COMMENT */", " font-size: 12px;", "}"].join("\n")); fs.addFileMapping(WebInspector.ParsedURL.completeURL(InspectorTest.resourceTreeModel.inspectedPageURL(), "resources/source/"), "/"); fs.reportCreated(fileSystemCreated);
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector/search/sources-search-scope-in-files.html b/third_party/WebKit/LayoutTests/http/tests/inspector/search/sources-search-scope-in-files.html index 78b5b03a..01c072a 100644 --- a/third_party/WebKit/LayoutTests/http/tests/inspector/search/sources-search-scope-in-files.html +++ b/third_party/WebKit/LayoutTests/http/tests/inspector/search/sources-search-scope-in-files.html
@@ -11,7 +11,7 @@ { var scope = new WebInspector.SourcesSearchScope(); var names = ["search.html", "search.js", "search.css"]; - var fs = new InspectorTest.TestFileSystem("/var/www"); + var fs = new InspectorTest.TestFileSystem("file:///var/www"); var promises = []; for (var name of names)
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector/search/sources-search-scope-many-projects.html b/third_party/WebKit/LayoutTests/http/tests/inspector/search/sources-search-scope-many-projects.html index 2e9b4e7..6539139 100644 --- a/third_party/WebKit/LayoutTests/http/tests/inspector/search/sources-search-scope-many-projects.html +++ b/third_party/WebKit/LayoutTests/http/tests/inspector/search/sources-search-scope-many-projects.html
@@ -10,7 +10,7 @@ function test() { var scope = new WebInspector.SourcesSearchScope(); - var fs = new InspectorTest.TestFileSystem("/var/www"); + var fs = new InspectorTest.TestFileSystem("file:///var/www"); var names = ["search.html", "search.js", "search.css"]; var resources = {}; var jsFileSystemUISourceCode;
diff --git a/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/contiguous-floated-table-vlr-003-expected.xht b/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/contiguous-floated-table-vlr-003-expected.xht new file mode 100644 index 0000000..27a45a8 --- /dev/null +++ b/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/contiguous-floated-table-vlr-003-expected.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: 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/imported/csswg-test/css-writing-modes-3/contiguous-floated-table-vlr-003.xht b/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/contiguous-floated-table-vlr-003.xht new file mode 100644 index 0000000..b5424d2 --- /dev/null +++ b/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/contiguous-floated-table-vlr-003.xht
@@ -0,0 +1,77 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> + + <head> + + <title>CSS Writing Modes Test: floated border-collapsing tables (vertical-lr)</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="match" href="../css21/reference/ref-filled-green-100px-square.xht" /> + + <meta content="" name="flags" /> + <meta content="This test checks that contiguous floated border-collapsing tables in a 'vertical-lr' context do not overlap." name="assert" /> + + <style type="text/css"><![CDATA[ + table + { + border-left: red solid 50px; + border-collapse: collapse; + float: left; + height: 100px; + writing-mode: vertical-lr; + } + + td + { + border-left: green solid 50px; + padding: 0px; + } + + div#reference-overlapped-red + { + background-color: red; + height: 100px; + position: relative; + width: 100px; + z-index: -1; + } + ]]></style> + + </head> + + <body> + + <p>Test passes if there is a filled green square and <strong>no red</strong>.</p> + + <table id="first"> + + <tbody> + + <tr> + <td></td> <td></td> + </tr> + + </tbody> + + </table> + + + <table id="second"> + + <tbody> + + <tr> + <td></td> <td></td> + </tr> + + </tbody> + + </table> + + + <div id="reference-overlapped-red"></div> + + </body> +</html>
diff --git a/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/contiguous-floated-table-vlr-005-expected.xht b/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/contiguous-floated-table-vlr-005-expected.xht new file mode 100644 index 0000000..27a45a8 --- /dev/null +++ b/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/contiguous-floated-table-vlr-005-expected.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: 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/imported/csswg-test/css-writing-modes-3/contiguous-floated-table-vlr-005.xht b/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/contiguous-floated-table-vlr-005.xht new file mode 100644 index 0000000..054a70fd --- /dev/null +++ b/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/contiguous-floated-table-vlr-005.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 Writing Modes Test: floated non-border-collapsing tables (vertical-lr)</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="match" href="../css21/reference/ref-filled-green-100px-square.xht" /> + + <meta content="" name="flags" /> + <meta content="This test checks that contiguous floated non-border-collapsing tables in a 'vertical-lr' context do not overlap." name="assert" /> + + <style type="text/css"><![CDATA[ + table + { + border-collapse: separate; + border-left: green solid 25px; + border-spacing: 0px; + float: left; + height: 100px; + writing-mode: vertical-lr; + } + + td + { + border-left: green solid 25px; + padding: 0px; + } + + div#reference-overlapped-red + { + background-color: red; + height: 100px; + position: relative; + width: 100px; + z-index: -1; + } + ]]></style> + + </head> + + <body> + + <p>Test passes if there is a filled green square and <strong>no red</strong>.</p> + + <table id="first"> + + <tbody> + + <tr> + <td></td> <td></td> + </tr> + + </tbody> + + </table> + + + <table id="second"> + + <tbody> + + <tr> + <td></td> <td></td> + </tr> + + </tbody> + + </table> + + + <div id="reference-overlapped-red"></div> + + </body> +</html>
diff --git a/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/contiguous-floated-table-vlr-007-expected.xht b/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/contiguous-floated-table-vlr-007-expected.xht new file mode 100644 index 0000000..27a45a8 --- /dev/null +++ b/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/contiguous-floated-table-vlr-007-expected.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: 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/imported/csswg-test/css-writing-modes-3/contiguous-floated-table-vlr-007.xht b/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/contiguous-floated-table-vlr-007.xht new file mode 100644 index 0000000..923ab4cb --- /dev/null +++ b/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/contiguous-floated-table-vlr-007.xht
@@ -0,0 +1,80 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> + + <head> + + <!-- + Test inspired by + http://test.csswg.org/source/css-writing-modes-3/table-progression-vrl-004.html + --> + + <title>CSS Writing Modes Test: vertical-lr - contiguous floated tables and horizontal margins</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="match" href="../css21/reference/ref-filled-green-100px-square.xht" /> + + <meta content="image" name="flags" /> + <meta content="This test checks that horizontal margins existing between contiguous floated tables with writing-mode set to 'vertical-lr' are not substracted by the amount of their borders. In this test, there should be an horizontal gap of 50px separating both tables. Margins between 2 floated boxes do not collapse." name="assert" /> + + <style type="text/css"><![CDATA[ + table + { + border-collapse: separate; + border-spacing: 0px; + float: left; + height: 100px; + writing-mode: vertical-lr; + } + + td + { + padding: 0px; + } + + table#left-first + { + border-right: green solid 25px; + margin-right: 25px; + } + + table#right-second + { + border-left: green solid 25px; + margin-left: 25px; + } + + div#reference-overlapped + { + background-color: red; + background-image: url("support/margin-collapse-2em-space-wm-vert.png"); + background-repeat: no-repeat; + height: 100px; + position: relative; + width: 100px; + z-index: -1; + } + ]]></style> + </head> + + <body> + + <p>Test passes if there is a filled green square and <strong>no red</strong>.</p> + + <table id="left-first"> + + <tr><td></td><td></td><td></td><td></td></tr> + + </table> + + <table id="right-second"> + + <tr><td></td><td></td><td></td><td></td></tr> + + </table> + + <div id="reference-overlapped"></div> + + </body> +</html>
diff --git a/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/contiguous-floated-table-vlr-009-expected.xht b/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/contiguous-floated-table-vlr-009-expected.xht new file mode 100644 index 0000000..27a45a8 --- /dev/null +++ b/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/contiguous-floated-table-vlr-009-expected.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: 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/imported/csswg-test/css-writing-modes-3/contiguous-floated-table-vlr-009.xht b/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/contiguous-floated-table-vlr-009.xht new file mode 100644 index 0000000..b7b19cb --- /dev/null +++ b/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/contiguous-floated-table-vlr-009.xht
@@ -0,0 +1,81 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> + + <head> + + <!-- + Test inspired by + http://test.csswg.org/source/css-writing-modes-3/table-progression-vrl-004.html + --> + + <title>CSS Writing Modes Test: vertical-lr - contiguous floated tables and horizontal margins</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="match" href="../css21/reference/ref-filled-green-100px-square.xht" /> + + <meta content="image" name="flags" /> + <meta content="This test checks that horizontal margins existing between contiguous floated tables with writing-mode set to 'vertical-lr' are not substracted by the amount of their horizontal padding. In this test, there should be an horizontal gap of 50px separating both tables. Margins between 2 floated boxes do not collapse." name="assert" /> + + <style type="text/css"><![CDATA[ + table + { + background-color: green; + border-collapse: separate; + border-spacing: 0px; + float: left; + height: 100px; + writing-mode: vertical-lr; + } + + td + { + padding: 0px; + } + + table#left-first + { + padding-right: 25px; + margin-right: 25px; + } + + table#right-second + { + padding-left: 25px; + margin-left: 25px; + } + + div#reference-overlapped + { + background-color: red; + background-image: url("support/margin-collapse-2em-space-wm-vert.png"); + background-repeat: no-repeat; + height: 100px; + position: relative; + width: 100px; + z-index: -1; + } + ]]></style> + </head> + + <body> + + <p>Test passes if there is a filled green square and <strong>no red</strong>.</p> + + <table id="left-first"> + + <tr><td></td><td></td><td></td><td></td></tr> + + </table> + + <table id="right-second"> + + <tr><td></td><td></td><td></td><td></td></tr> + + </table> + + <div id="reference-overlapped"></div> + + </body> +</html>
diff --git a/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/contiguous-floated-table-vrl-002-expected.xht b/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/contiguous-floated-table-vrl-002-expected.xht new file mode 100644 index 0000000..27a45a8 --- /dev/null +++ b/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/contiguous-floated-table-vrl-002-expected.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: 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/imported/csswg-test/css-writing-modes-3/contiguous-floated-table-vrl-002.xht b/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/contiguous-floated-table-vrl-002.xht new file mode 100644 index 0000000..ac0e310 --- /dev/null +++ b/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/contiguous-floated-table-vrl-002.xht
@@ -0,0 +1,77 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> + + <head> + + <title>CSS Writing Modes Test: floated border-collapsing tables (vertical-rl)</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="match" href="../css21/reference/ref-filled-green-100px-square.xht" /> + + <meta content="" name="flags" /> + <meta content="This test checks that contiguous floated border-collapsing tables in a 'vertical-rl' context do not overlap." name="assert" /> + + <style type="text/css"><![CDATA[ + table + { + border-collapse: collapse; + border-right: red solid 50px; + float: left; + height: 100px; + writing-mode: vertical-rl; + } + + td + { + border-right: green solid 50px; + padding: 0px; + } + + div#reference-overlapped-red + { + background-color: red; + height: 100px; + position: relative; + width: 100px; + z-index: -1; + } + ]]></style> + + </head> + + <body> + + <p>Test passes if there is a filled green square and <strong>no red</strong>.</p> + + <table id="first"> + + <tbody> + + <tr> + <td></td> <td></td> + </tr> + + </tbody> + + </table> + + + <table id="second"> + + <tbody> + + <tr> + <td></td> <td></td> + </tr> + + </tbody> + + </table> + + + <div id="reference-overlapped-red"></div> + + </body> +</html>
diff --git a/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/contiguous-floated-table-vrl-004-expected.xht b/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/contiguous-floated-table-vrl-004-expected.xht new file mode 100644 index 0000000..27a45a8 --- /dev/null +++ b/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/contiguous-floated-table-vrl-004-expected.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: 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/imported/csswg-test/css-writing-modes-3/contiguous-floated-table-vrl-004.xht b/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/contiguous-floated-table-vrl-004.xht new file mode 100644 index 0000000..62ac22a --- /dev/null +++ b/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/contiguous-floated-table-vrl-004.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 Writing Modes Test: floated non-border-collapsing tables (vertical-rl)</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="match" href="../css21/reference/ref-filled-green-100px-square.xht" /> + + <meta content="" name="flags" /> + <meta content="This test checks that contiguous floated non-border-collapsing tables in a 'vertical-rl' context do not overlap." name="assert" /> + + <style type="text/css"><![CDATA[ + table + { + border-right: green solid 25px; + border-collapse: separate; + border-spacing: 0px; + float: left; + height: 100px; + writing-mode: vertical-rl; + } + + td + { + border-right: green solid 25px; + padding: 0px; + } + + div#reference-overlapped-red + { + background-color: red; + height: 100px; + position: relative; + width: 100px; + z-index: -1; + } + ]]></style> + + </head> + + <body> + + <p>Test passes if there is a filled green square and <strong>no red</strong>.</p> + + <table id="first"> + + <tbody> + + <tr> + <td></td> <td></td> + </tr> + + </tbody> + + </table> + + + <table id="second"> + + <tbody> + + <tr> + <td></td> <td></td> + </tr> + + </tbody> + + </table> + + + <div id="reference-overlapped-red"></div> + + </body> +</html>
diff --git a/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/contiguous-floated-table-vrl-006-expected.xht b/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/contiguous-floated-table-vrl-006-expected.xht new file mode 100644 index 0000000..27a45a8 --- /dev/null +++ b/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/contiguous-floated-table-vrl-006-expected.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: 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/imported/csswg-test/css-writing-modes-3/contiguous-floated-table-vrl-006.xht b/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/contiguous-floated-table-vrl-006.xht new file mode 100644 index 0000000..ae88e53 --- /dev/null +++ b/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/contiguous-floated-table-vrl-006.xht
@@ -0,0 +1,80 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> + + <head> + + <!-- + Test inspired by + http://test.csswg.org/source/css-writing-modes-3/table-progression-vrl-004.html + --> + + <title>CSS Writing Modes Test: vertical-rl - contiguous floated tables and horizontal margins</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="match" href="../css21/reference/ref-filled-green-100px-square.xht" /> + + <meta content="image" name="flags" /> + <meta content="This test checks that horizontal margins existing between contiguous floated tables with writing-mode set to 'vertical-rl' are not substracted by the amount of their borders. In this test, there should be an horizontal gap of 50px separating both tables. Margins between 2 floated boxes do not collapse." name="assert" /> + + <style type="text/css"><![CDATA[ + table + { + border-collapse: separate; + border-spacing: 0px; + float: left; + height: 100px; + writing-mode: vertical-rl; + } + + td + { + padding: 0px; + } + + table#left-first + { + border-right: green solid 25px; + margin-right: 25px; + } + + table#right-second + { + border-left: green solid 25px; + margin-left: 25px; + } + + div#reference-overlapped + { + background-color: red; + background-image: url("support/margin-collapse-2em-space-wm-vert.png"); + background-repeat: no-repeat; + height: 100px; + position: relative; + width: 100px; + z-index: -1; + } + ]]></style> + </head> + + <body> + + <p>Test passes if there is a filled green square and <strong>no red</strong>.</p> + + <table id="left-first"> + + <tr><td></td><td></td><td></td><td></td></tr> + + </table> + + <table id="right-second"> + + <tr><td></td><td></td><td></td><td></td></tr> + + </table> + + <div id="reference-overlapped"></div> + + </body> +</html>
diff --git a/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/contiguous-floated-table-vrl-008-expected.xht b/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/contiguous-floated-table-vrl-008-expected.xht new file mode 100644 index 0000000..27a45a8 --- /dev/null +++ b/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/contiguous-floated-table-vrl-008-expected.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: 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/imported/csswg-test/css-writing-modes-3/contiguous-floated-table-vrl-008.xht b/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/contiguous-floated-table-vrl-008.xht new file mode 100644 index 0000000..698709bf --- /dev/null +++ b/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/contiguous-floated-table-vrl-008.xht
@@ -0,0 +1,81 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> + + <head> + + <!-- + Test inspired by + http://test.csswg.org/source/css-writing-modes-3/table-progression-vrl-004.html + --> + + <title>CSS Writing Modes Test: vertical-rl - contiguous floated tables and horizontal margins</title> + + <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" /> + <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" /> + <link rel="match" href="../css21/reference/ref-filled-green-100px-square.xht" /> + + <meta content="image" name="flags" /> + <meta content="This test checks that horizontal margins existing between contiguous floated tables with writing-mode set to 'vertical-rl' are not substracted by the amount of their horizontal padding. In this test, there should be an horizontal gap of 50px separating both tables. Margins between 2 floated boxes do not collapse." name="assert" /> + + <style type="text/css"><![CDATA[ + table + { + background-color: green; + border-collapse: separate; + border-spacing: 0px; + float: left; + height: 100px; + writing-mode: vertical-rl; + } + + td + { + padding: 0px; + } + + table#left-first + { + padding-right: 25px; + margin-right: 25px; + } + + table#right-second + { + padding-left: 25px; + margin-left: 25px; + } + + div#reference-overlapped + { + background-color: red; + background-image: url("support/margin-collapse-2em-space-wm-vert.png"); + background-repeat: no-repeat; + height: 100px; + position: relative; + width: 100px; + z-index: -1; + } + ]]></style> + </head> + + <body> + + <p>Test passes if there is a filled green square and <strong>no red</strong>.</p> + + <table id="left-first"> + + <tr><td></td><td></td><td></td><td></td></tr> + + </table> + + <table id="right-second"> + + <tr><td></td><td></td><td></td><td></td></tr> + + </table> + + <div id="reference-overlapped"></div> + + </body> +</html>
diff --git a/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/support/adobe-fonts/CSSFWOrientationTest.otf b/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/support/adobe-fonts/CSSFWOrientationTest.otf new file mode 100644 index 0000000..48c6819 --- /dev/null +++ b/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/support/adobe-fonts/CSSFWOrientationTest.otf
@@ -0,0 +1,493 @@ + + + + +<!DOCTYPE html> +<html lang="en" class=" is-copy-enabled"> + <head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# object: http://ogp.me/ns/object# article: http://ogp.me/ns/article# profile: http://ogp.me/ns/profile#"> + <meta charset='utf-8'> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <meta http-equiv="Content-Language" content="en"> + <meta name="viewport" content="width=1020"> + + + <title>css-orientation-test/CSSFWOrientationTest.otf at ad505d124e107c2cd0c9204c92ee6a696294d4a5 · adobe-fonts/css-orientation-test · GitHub</title> + <link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="GitHub"> + <link rel="fluid-icon" href="https://github.com/fluidicon.png" title="GitHub"> + <link rel="apple-touch-icon" sizes="57x57" href="/apple-touch-icon-114.png"> + <link rel="apple-touch-icon" sizes="114x114" href="/apple-touch-icon-114.png"> + <link rel="apple-touch-icon" sizes="72x72" href="/apple-touch-icon-144.png"> + <link rel="apple-touch-icon" sizes="144x144" href="/apple-touch-icon-144.png"> + <meta property="fb:app_id" content="1401488693436528"> + + <meta content="@github" name="twitter:site" /><meta content="summary" name="twitter:card" /><meta content="adobe-fonts/css-orientation-test" name="twitter:title" /><meta content="css-orientation-test - CSS Orientation Test" name="twitter:description" /><meta content="https://avatars0.githubusercontent.com/u/4028872?v=3&s=400" name="twitter:image:src" /> + <meta content="GitHub" property="og:site_name" /><meta content="object" property="og:type" /><meta content="https://avatars0.githubusercontent.com/u/4028872?v=3&s=400" property="og:image" /><meta content="adobe-fonts/css-orientation-test" property="og:title" /><meta content="https://github.com/adobe-fonts/css-orientation-test" property="og:url" /><meta content="css-orientation-test - CSS Orientation Test" property="og:description" /> + <meta name="browser-stats-url" content="https://api.github.com/_private/browser/stats"> + <meta name="browser-errors-url" content="https://api.github.com/_private/browser/errors"> + <link rel="assets" href="https://assets-cdn.github.com/"> + + <meta name="pjax-timeout" content="1000"> + + + <meta name="msapplication-TileImage" content="/windows-tile.png"> + <meta name="msapplication-TileColor" content="#ffffff"> + <meta name="selected-link" value="repo_source" data-pjax-transient> + + <meta name="google-site-verification" content="KT5gs8h0wvaagLKAVWq8bbeNwnZZK1r1XQysX3xurLU"> + <meta name="google-analytics" content="UA-3769691-2"> + +<meta content="collector.githubapp.com" name="octolytics-host" /><meta content="github" name="octolytics-app-id" /><meta content="4A39B5CE:2F41:1A0BF30B:567BD090" name="octolytics-dimension-request_id" /> +<meta content="/<user-name>/<repo-name>/blob/show" data-pjax-transient="true" name="analytics-location" /> +<meta content="Rails, view, blob#show" data-pjax-transient="true" name="analytics-event" /> + + + <meta class="js-ga-set" name="dimension1" content="Logged Out"> + + + + <meta name="hostname" content="github.com"> + <meta name="user-login" content=""> + + <meta name="expected-hostname" content="github.com"> + + <link rel="mask-icon" href="https://assets-cdn.github.com/pinned-octocat.svg" color="#4078c0"> + <link rel="icon" type="image/x-icon" href="https://assets-cdn.github.com/favicon.ico"> + + <meta content="e40bc885f02e5e625e16c62eeeb460f0de9c1e32" name="form-nonce" /> + + <link crossorigin="anonymous" href="https://assets-cdn.github.com/assets/github-2037283749006a7ebc37dc5a63a365e8cde9e5d0099e83d4a77bba85b03a6623.css" integrity="sha256-IDcoN0kAan68N9xaY6Nl6M3p5dAJnoPUp3u6hbA6ZiM=" media="all" rel="stylesheet" /> + <link crossorigin="anonymous" href="https://assets-cdn.github.com/assets/github2-87b394aa7bb776e9e05abfb54eaa1193404e767a3720d64ff2c8f64c7cfb432b.css" integrity="sha256-h7OUqnu3dungWr+1TqoRk0BOdno3INZP8sj2THz7Qys=" media="all" rel="stylesheet" /> + + + + + <meta http-equiv="x-pjax-version" content="696c3d92b2b36833513e39f2a164890b"> + + + <meta name="description" content="css-orientation-test - CSS Orientation Test"> + <meta name="go-import" content="github.com/adobe-fonts/css-orientation-test git https://github.com/adobe-fonts/css-orientation-test.git"> + + <meta content="4028872" name="octolytics-dimension-user_id" /><meta content="adobe-fonts" name="octolytics-dimension-user_login" /><meta content="21303741" name="octolytics-dimension-repository_id" /><meta content="adobe-fonts/css-orientation-test" name="octolytics-dimension-repository_nwo" /><meta content="true" name="octolytics-dimension-repository_public" /><meta content="false" name="octolytics-dimension-repository_is_fork" /><meta content="21303741" name="octolytics-dimension-repository_network_root_id" /><meta content="adobe-fonts/css-orientation-test" name="octolytics-dimension-repository_network_root_nwo" /> + <link href="https://github.com/adobe-fonts/css-orientation-test/commits/ad505d124e107c2cd0c9204c92ee6a696294d4a5.atom" rel="alternate" title="Recent Commits to css-orientation-test:ad505d124e107c2cd0c9204c92ee6a696294d4a5" type="application/atom+xml"> + + </head> + + + <body class="logged_out env-production linux vis-public page-blob"> + <a href="#start-of-content" tabindex="1" class="accessibility-aid js-skip-to-content">Skip to content</a> + + + + + + + + + <div class="header header-logged-out" role="banner"> + <div class="container clearfix"> + + <a class="header-logo-wordmark" href="https://github.com/" data-ga-click="(Logged out) Header, go to homepage, icon:logo-wordmark"> + <span class="mega-octicon octicon-logo-github"></span> + </a> + + <div class="header-actions" role="navigation"> + <a class="btn btn-primary" href="/join" data-ga-click="(Logged out) Header, clicked Sign up, text:sign-up">Sign up</a> + <a class="btn" href="/login?return_to=%2Fadobe-fonts%2Fcss-orientation-test%2Fblob%2Fad505d124e107c2cd0c9204c92ee6a696294d4a5%2FCSSFWOrientationTest.otf" data-ga-click="(Logged out) Header, clicked Sign in, text:sign-in">Sign in</a> + </div> + + <div class="site-search repo-scope js-site-search" role="search"> + <!-- </textarea> --><!-- '"` --><form accept-charset="UTF-8" action="/adobe-fonts/css-orientation-test/search" class="js-site-search-form" data-global-search-url="/search" data-repo-search-url="/adobe-fonts/css-orientation-test/search" method="get"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="✓" /></div> + <label class="js-chromeless-input-container form-control"> + <div class="scope-badge">This repository</div> + <input type="text" + class="js-site-search-focus js-site-search-field is-clearable chromeless-input" + data-hotkey="s" + name="q" + placeholder="Search" + aria-label="Search this repository" + data-global-scope-placeholder="Search GitHub" + data-repo-scope-placeholder="Search" + tabindex="1" + autocapitalize="off"> + </label> +</form> + </div> + + <ul class="header-nav left" role="navigation"> + <li class="header-nav-item"> + <a class="header-nav-link" href="/explore" data-ga-click="(Logged out) Header, go to explore, text:explore">Explore</a> + </li> + <li class="header-nav-item"> + <a class="header-nav-link" href="/features" data-ga-click="(Logged out) Header, go to features, text:features">Features</a> + </li> + <li class="header-nav-item"> + <a class="header-nav-link" href="https://enterprise.github.com/" data-ga-click="(Logged out) Header, go to enterprise, text:enterprise">Enterprise</a> + </li> + <li class="header-nav-item"> + <a class="header-nav-link" href="/pricing" data-ga-click="(Logged out) Header, go to pricing, text:pricing">Pricing</a> + </li> + </ul> + + </div> +</div> + + + + <div id="start-of-content" class="accessibility-aid"></div> + + <div id="js-flash-container"> +</div> + + + <div role="main" class="main-content"> + <div itemscope itemtype="http://schema.org/WebPage"> + <div id="js-repo-pjax-container" class="context-loader-container js-repo-nav-next" data-pjax-container> + +<div class="pagehead repohead instapaper_ignore readability-menu experiment-repo-nav"> + <div class="container repohead-details-container"> + + + +<ul class="pagehead-actions"> + + <li> + <a href="/login?return_to=%2Fadobe-fonts%2Fcss-orientation-test" + class="btn btn-sm btn-with-count tooltipped tooltipped-n" + aria-label="You must be signed in to watch a repository" rel="nofollow"> + <span class="octicon octicon-eye"></span> + Watch + </a> + <a class="social-count" href="/adobe-fonts/css-orientation-test/watchers"> + 6 + </a> + + </li> + + <li> + <a href="/login?return_to=%2Fadobe-fonts%2Fcss-orientation-test" + class="btn btn-sm btn-with-count tooltipped tooltipped-n" + aria-label="You must be signed in to star a repository" rel="nofollow"> + <span class="octicon octicon-star "></span> + Star + </a> + + <a class="social-count js-social-count" href="/adobe-fonts/css-orientation-test/stargazers"> + 6 + </a> + + </li> + + <li> + <a href="/login?return_to=%2Fadobe-fonts%2Fcss-orientation-test" + class="btn btn-sm btn-with-count tooltipped tooltipped-n" + aria-label="You must be signed in to fork a repository" rel="nofollow"> + <span class="octicon octicon-repo-forked "></span> + Fork + </a> + + <a href="/adobe-fonts/css-orientation-test/network" class="social-count"> + 1 + </a> + </li> +</ul> + + <h1 itemscope itemtype="http://data-vocabulary.org/Breadcrumb" class="entry-title public "> + <span class="octicon octicon-repo "></span> + <span class="author"><a href="/adobe-fonts" class="url fn" itemprop="url" rel="author"><span itemprop="title">adobe-fonts</span></a></span><!-- +--><span class="path-divider">/</span><!-- +--><strong><a href="/adobe-fonts/css-orientation-test" data-pjax="#js-repo-pjax-container">css-orientation-test</a></strong> + + <span class="page-context-loader"> + <img alt="" height="16" src="https://assets-cdn.github.com/images/spinners/octocat-spinner-32.gif" width="16" /> + </span> + +</h1> + + </div> + <div class="container"> + +<nav class="reponav js-repo-nav js-sidenav-container-pjax js-octicon-loaders" + role="navigation" + data-pjax="#js-repo-pjax-container"> + + <a href="/adobe-fonts/css-orientation-test" aria-label="Code" aria-selected="true" class="js-selected-navigation-item selected reponav-item" data-hotkey="g c" data-selected-links="repo_source repo_downloads repo_commits repo_releases repo_tags repo_branches /adobe-fonts/css-orientation-test"> + <span class="octicon octicon-code "></span> + Code +</a> + <a href="/adobe-fonts/css-orientation-test/issues" class="js-selected-navigation-item reponav-item" data-hotkey="g i" data-selected-links="repo_issues repo_labels repo_milestones /adobe-fonts/css-orientation-test/issues"> + <span class="octicon octicon-issue-opened "></span> + Issues + <span class="counter">0</span> +</a> + <a href="/adobe-fonts/css-orientation-test/pulls" class="js-selected-navigation-item reponav-item" data-hotkey="g p" data-selected-links="repo_pulls /adobe-fonts/css-orientation-test/pulls"> + <span class="octicon octicon-git-pull-request "></span> + Pull requests + <span class="counter">0</span> +</a> + + <a href="/adobe-fonts/css-orientation-test/pulse" class="js-selected-navigation-item reponav-item" data-selected-links="pulse /adobe-fonts/css-orientation-test/pulse"> + <span class="octicon octicon-pulse "></span> + Pulse +</a> + <a href="/adobe-fonts/css-orientation-test/graphs" class="js-selected-navigation-item reponav-item" data-selected-links="repo_graphs repo_contributors /adobe-fonts/css-orientation-test/graphs"> + <span class="octicon octicon-graph "></span> + Graphs +</a> + +</nav> + + </div> +</div> + +<div class="container new-discussion-timeline experiment-repo-nav"> + <div class="repository-content"> + + + +<a href="/adobe-fonts/css-orientation-test/blob/ad505d124e107c2cd0c9204c92ee6a696294d4a5/CSSFWOrientationTest.otf" class="hidden js-permalink-shortcut" data-hotkey="y">Permalink</a> + +<!-- blob contrib key: blob_contributors:v21:c0d2e2ee9bf6cea063cb7997063aae39 --> + +<div class="file-navigation js-zeroclipboard-container"> + +<div class="select-menu js-menu-container js-select-menu left"> + <button class="btn btn-sm select-menu-button js-menu-target css-truncate" data-hotkey="w" + title="" + type="button" aria-label="Switch branches or tags" tabindex="0" aria-haspopup="true"> + <i>Tree:</i> + <span class="js-select-button css-truncate-target">ad505d124e</span> + </button> + + <div class="select-menu-modal-holder js-menu-content js-navigation-container" data-pjax aria-hidden="true"> + + <div class="select-menu-modal"> + <div class="select-menu-header"> + <span aria-label="Close" class="octicon octicon-x js-menu-close" role="button"></span> + <span class="select-menu-title">Switch branches/tags</span> + </div> + + <div class="select-menu-filters"> + <div class="select-menu-text-filter"> + <input type="text" aria-label="Filter branches/tags" id="context-commitish-filter-field" class="js-filterable-field js-navigation-enable" placeholder="Filter branches/tags"> + </div> + <div class="select-menu-tabs"> + <ul> + <li class="select-menu-tab"> + <a href="#" data-tab-filter="branches" data-filter-placeholder="Filter branches/tags" class="js-select-menu-tab" role="tab">Branches</a> + </li> + <li class="select-menu-tab"> + <a href="#" data-tab-filter="tags" data-filter-placeholder="Find a tag…" class="js-select-menu-tab" role="tab">Tags</a> + </li> + </ul> + </div> + </div> + + <div class="select-menu-list select-menu-tab-bucket js-select-menu-tab-bucket" data-tab-filter="branches" role="menu"> + + <div data-filterable-for="context-commitish-filter-field" data-filterable-type="substring"> + + + <a class="select-menu-item js-navigation-item js-navigation-open " + href="/adobe-fonts/css-orientation-test/blob/master/CSSFWOrientationTest.otf" + data-name="master" + data-skip-pjax="true" + rel="nofollow"> + <span class="select-menu-item-icon octicon octicon-check"></span> + <span class="select-menu-item-text css-truncate-target" title="master"> + master + </span> + </a> + </div> + + <div class="select-menu-no-results">Nothing to show</div> + </div> + + <div class="select-menu-list select-menu-tab-bucket js-select-menu-tab-bucket" data-tab-filter="tags"> + <div data-filterable-for="context-commitish-filter-field" data-filterable-type="substring"> + + + <div class="select-menu-item js-navigation-item "> + <span class="select-menu-item-icon octicon octicon-check"></span> + <a href="/adobe-fonts/css-orientation-test/tree/1.005/CSSFWOrientationTest.otf" + data-name="1.005" + data-skip-pjax="true" + rel="nofollow" + class="js-navigation-open select-menu-item-text css-truncate-target" + title="1.005">1.005</a> + </div> + <div class="select-menu-item js-navigation-item "> + <span class="select-menu-item-icon octicon octicon-check"></span> + <a href="/adobe-fonts/css-orientation-test/tree/1.002/CSSFWOrientationTest.otf" + data-name="1.002" + data-skip-pjax="true" + rel="nofollow" + class="js-navigation-open select-menu-item-text css-truncate-target" + title="1.002">1.002</a> + </div> + <div class="select-menu-item js-navigation-item "> + <span class="select-menu-item-icon octicon octicon-check"></span> + <a href="/adobe-fonts/css-orientation-test/tree/1.001/CSSFWOrientationTest.otf" + data-name="1.001" + data-skip-pjax="true" + rel="nofollow" + class="js-navigation-open select-menu-item-text css-truncate-target" + title="1.001">1.001</a> + </div> + </div> + + <div class="select-menu-no-results">Nothing to show</div> + </div> + + </div> + </div> +</div> + + <div class="btn-group right"> + <a href="/adobe-fonts/css-orientation-test/find/ad505d124e107c2cd0c9204c92ee6a696294d4a5" + class="js-show-file-finder btn btn-sm" + data-pjax + data-hotkey="t"> + Find file + </a> + <button aria-label="Copy file path to clipboard" class="js-zeroclipboard btn btn-sm zeroclipboard-button tooltipped tooltipped-s" data-copied-hint="Copied!" type="button">Copy path</button> + </div> + <div class="breadcrumb js-zeroclipboard-target"> + <span class="repo-root js-repo-root"><span itemscope="" itemtype="http://data-vocabulary.org/Breadcrumb"><a href="/adobe-fonts/css-orientation-test/tree/ad505d124e107c2cd0c9204c92ee6a696294d4a5" class="" data-branch="ad505d124e107c2cd0c9204c92ee6a696294d4a5" data-pjax="true" itemscope="url" rel="nofollow"><span itemprop="title">css-orientation-test</span></a></span></span><span class="separator">/</span><strong class="final-path">CSSFWOrientationTest.otf</strong> + </div> +</div> + + + <div class="commit-tease"> + <span class="right"> + <a class="commit-tease-sha" href="/adobe-fonts/css-orientation-test/commit/ad505d124e107c2cd0c9204c92ee6a696294d4a5" data-pjax> + ad505d1 + </a> + <time datetime="2015-04-04T12:29:33Z" is="relative-time">Apr 4, 2015</time> + </span> + <div> + <img alt="@kenlunde" class="avatar" height="20" src="https://avatars3.githubusercontent.com/u/3988788?v=3&s=40" width="20" /> + <a href="/kenlunde" class="user-mention" rel="contributor">kenlunde</a> + <a href="/adobe-fonts/css-orientation-test/commit/ad505d124e107c2cd0c9204c92ee6a696294d4a5" class="message" data-pjax="true" title="Version 1.005 Update">Version 1.005 Update</a> + </div> + + <div class="commit-tease-contributors"> + <a class="muted-link contributors-toggle" href="#blob_contributors_box" rel="facebox"> + <strong>1</strong> + contributor + </a> + + </div> + + <div id="blob_contributors_box" style="display:none"> + <h2 class="facebox-header" data-facebox-id="facebox-header">Users who have contributed to this file</h2> + <ul class="facebox-user-list" data-facebox-id="facebox-description"> + <li class="facebox-user-list-item"> + <img alt="@kenlunde" height="24" src="https://avatars1.githubusercontent.com/u/3988788?v=3&s=48" width="24" /> + <a href="/kenlunde">kenlunde</a> + </li> + </ul> + </div> + </div> + +<div class="file"> + <div class="file-header"> + <div class="file-actions"> + + <div class="btn-group"> + <a href="/adobe-fonts/css-orientation-test/raw/ad505d124e107c2cd0c9204c92ee6a696294d4a5/CSSFWOrientationTest.otf" class="btn btn-sm " id="raw-url">Raw</a> + <a href="/adobe-fonts/css-orientation-test/commits/ad505d124e107c2cd0c9204c92ee6a696294d4a5/CSSFWOrientationTest.otf" class="btn btn-sm " rel="nofollow">History</a> + </div> + + + <button type="button" class="octicon-btn octicon-btn-danger disabled tooltipped tooltipped-nw" + aria-label="You must be signed in to make or propose changes"> + <span class="octicon octicon-trashcan "></span> + </button> + </div> + + <div class="file-info"> + 33.2 KB + </div> +</div> + + + + <div class="blob-wrapper data type-text"> + <div class="image"> + <a href="/adobe-fonts/css-orientation-test/blob/ad505d124e107c2cd0c9204c92ee6a696294d4a5/CSSFWOrientationTest.otf?raw=true">View Raw</a> + </div> + </div> + +</div> + +<a href="#jump-to-line" rel="facebox[.linejump]" data-hotkey="l" style="display:none">Jump to Line</a> +<div id="jump-to-line" style="display:none"> + <!-- </textarea> --><!-- '"` --><form accept-charset="UTF-8" action="" class="js-jump-to-line-form" method="get"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="✓" /></div> + <input class="linejump-input js-jump-to-line-field" type="text" placeholder="Jump to line…" aria-label="Jump to line" autofocus> + <button type="submit" class="btn">Go</button> +</form></div> + + </div> + <div class="modal-backdrop"></div> +</div> + + </div> + </div> + + </div> + + <div class="container"> + <div class="site-footer" role="contentinfo"> + <ul class="site-footer-links right"> + <li><a href="https://status.github.com/" data-ga-click="Footer, go to status, text:status">Status</a></li> + <li><a href="https://developer.github.com" data-ga-click="Footer, go to api, text:api">API</a></li> + <li><a href="https://training.github.com" data-ga-click="Footer, go to training, text:training">Training</a></li> + <li><a href="https://shop.github.com" data-ga-click="Footer, go to shop, text:shop">Shop</a></li> + <li><a href="https://github.com/blog" data-ga-click="Footer, go to blog, text:blog">Blog</a></li> + <li><a href="https://github.com/about" data-ga-click="Footer, go to about, text:about">About</a></li> + <li><a href="https://github.com/pricing" data-ga-click="Footer, go to pricing, text:pricing">Pricing</a></li> + + </ul> + + <a href="https://github.com" aria-label="Homepage"> + <span class="mega-octicon octicon-mark-github " title="GitHub "></span> +</a> + <ul class="site-footer-links"> + <li>© 2015 <span title="0.04232s from github-fe134-cp1-prd.iad.github.net">GitHub</span>, Inc.</li> + <li><a href="https://github.com/site/terms" data-ga-click="Footer, go to terms, text:terms">Terms</a></li> + <li><a href="https://github.com/site/privacy" data-ga-click="Footer, go to privacy, text:privacy">Privacy</a></li> + <li><a href="https://github.com/security" data-ga-click="Footer, go to security, text:security">Security</a></li> + <li><a href="https://github.com/contact" data-ga-click="Footer, go to contact, text:contact">Contact</a></li> + <li><a href="https://help.github.com" data-ga-click="Footer, go to help, text:help">Help</a></li> + </ul> + </div> +</div> + + + + + + + + <div id="ajax-error-message" class="flash flash-error"> + <span class="octicon octicon-alert"></span> + <button type="button" class="flash-close js-flash-close js-ajax-error-dismiss" aria-label="Dismiss error"> + <span class="octicon octicon-x"></span> + </button> + Something went wrong with that request. Please try again. + </div> + + + <script crossorigin="anonymous" integrity="sha256-7460qJ7p88i3YTMH/liaj1cFgX987ie+xRzl6WMjSr8=" src="https://assets-cdn.github.com/assets/frameworks-ef8eb4a89ee9f3c8b7613307fe589a8f5705817f7cee27bec51ce5e963234abf.js"></script> + <script async="async" crossorigin="anonymous" integrity="sha256-S2uOfRHrt7zoUSbTtBMMgAQfKubV1u+JAajAw/fLgNI=" src="https://assets-cdn.github.com/assets/github-4b6b8e7d11ebb7bce85126d3b4130c80041f2ae6d5d6ef8901a8c0c3f7cb80d2.js"></script> + + + + <div class="js-stale-session-flash stale-session-flash flash flash-warn flash-banner hidden"> + <span class="octicon octicon-alert"></span> + <span class="signed-in-tab-flash">You signed in with another tab or window. <a href="">Reload</a> to refresh your session.</span> + <span class="signed-out-tab-flash">You signed out in another tab or window. <a href="">Reload</a> to refresh your session.</span> + </div> + </body> +</html> +
diff --git a/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/support/adobe-fonts/README.md b/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/support/adobe-fonts/README.md index 50f82b61..61f68705 100644 --- a/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/support/adobe-fonts/README.md +++ b/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/support/adobe-fonts/README.md
@@ -17,7 +17,7 @@ ---- The installable font resources (font binaries) are not part of the source files. They are available at https://github.com/adobe-fonts/css-orientation-test/ -The latest version of the font binaries is 1.005 (October 2015). +The latest version of the font binaries is 1.005 (April 4th 2015). Requirements
diff --git a/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/support/text-orientation-upright-vrl-002.png b/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/support/text-orientation-upright-vrl-002.png index 8caab6e..22eff43 100644 --- a/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/support/text-orientation-upright-vrl-002.png +++ b/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/support/text-orientation-upright-vrl-002.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/table-column-order-002.xht b/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/table-column-order-002.xht index 01f2256c..879b8db 100644 --- a/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/table-column-order-002.xht +++ b/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/table-column-order-002.xht
@@ -13,7 +13,7 @@ <link rel="match" href="block-flow-direction-001-ref.xht" /> <meta content="ahem" name="flags" /> - <meta content="This test checks that a table with 'writing-mode' set to 'vertical-rl' and with 'direction' set to 'rtl' will have its column displayed from bottom (1st column) to top (last column). This test relies on right-to-left directionality applying to characters that are strongly sensitive to directionality. In this test, we use digits [0-9] and non-breaking spaces ( ) which are all strongly sensitive to bidi directionality." name="assert" /> + <meta content="This test checks that a table with 'writing-mode' set to 'vertical-rl' and with 'direction' set to 'rtl' will have its column displayed from bottom (1st column) to top (last column). This test relies on right-to-left directionality applying to characters that are strongly sensitive to directionality. In this test, we use digits [0-9] and non-breaking spaces which are all strongly sensitive to bidi directionality." name="assert" /> <style type="text/css"><![CDATA[ body
diff --git a/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/table-column-order-003.xht b/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/table-column-order-003.xht index a3bce5aa..3fad608 100644 --- a/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/table-column-order-003.xht +++ b/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/table-column-order-003.xht
@@ -13,7 +13,7 @@ <link rel="match" href="block-flow-direction-001-ref.xht" /> <meta content="ahem" name="flags" /> - <meta content="This test checks that a table with 'writing-mode' set to 'vertical-lr' and with 'direction' set to 'rtl' will have its column displayed from bottom (1st column) to top (last column). This test relies on right-to-left directionality applying to characters that are strongly sensitive to directionality. In this test, we use digits [0-9] and non-breaking spaces ( ) which are all strongly sensitive to bidi directionality." name="assert" /> + <meta content="This test checks that a table with 'writing-mode' set to 'vertical-lr' and with 'direction' set to 'rtl' will have its column displayed from bottom (1st column) to top (last column). This test relies on right-to-left directionality applying to characters that are strongly sensitive to directionality. In this test, we use digits [0-9] and non-breaking spaces which are all strongly sensitive to bidi directionality." name="assert" /> <style type="text/css"><![CDATA[ body
diff --git a/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/table-column-order-004.xht b/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/table-column-order-004.xht index 99cd5f6e..bbb40667 100644 --- a/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/table-column-order-004.xht +++ b/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/table-column-order-004.xht
@@ -13,7 +13,7 @@ <link rel="match" href="block-flow-direction-001-ref.xht" /> <meta content="ahem" name="flags" /> - <meta content="This test checks that colspanned cells in a table with 'direction' set to 'rtl' are handled according to a bottom-to-top column direction. This test relies on right-to-left directionality applying to characters that are strongly sensitive to directionality. In this test, we use digits [0-9] and non-breaking spaces ( ) which are all strongly sensitive to bidi directionality." name="assert" /> + <meta content="This test checks that colspanned cells in a table with 'direction' set to 'rtl' are handled according to a bottom-to-top column direction. This test relies on right-to-left directionality applying to characters that are strongly sensitive to directionality. In this test, we use digits [0-9] and non-breaking spaces which are all strongly sensitive to bidi directionality." name="assert" /> <style type="text/css"><![CDATA[ body
diff --git a/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/table-column-order-005.xht b/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/table-column-order-005.xht index 3e1da55..560f7d38 100644 --- a/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/table-column-order-005.xht +++ b/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/table-column-order-005.xht
@@ -13,7 +13,7 @@ <link rel="match" href="block-flow-direction-001-ref.xht" /> <meta content="ahem" name="flags" /> - <meta content="This test checks that colspanned cells in a table with 'direction' set to 'rtl' are handled according to a bottom-to-top column direction. This test relies on right-to-left directionality applying to characters that are strongly sensitive to directionality. In this test, we use digits [0-9] and non-breaking spaces ( ) which are all strongly sensitive to bidi directionality." name="assert" /> + <meta content="This test checks that colspanned cells in a table with 'direction' set to 'rtl' are handled according to a bottom-to-top column direction. This test relies on right-to-left directionality applying to characters that are strongly sensitive to directionality. In this test, we use digits [0-9] and non-breaking spaces which are all strongly sensitive to bidi directionality." name="assert" /> <style type="text/css"><![CDATA[ body
diff --git a/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/table-progression-vlr-001.html b/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/table-progression-vlr-001.html index c499ce8..01df359 100644 --- a/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/table-progression-vlr-001.html +++ b/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/table-progression-vlr-001.html
@@ -2,8 +2,7 @@ <title>CSS Test: vertical-lr Table Row/Rowgroup/Cell Ordering</title> <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"> <link rel="match" href="table-progression-001-ref.html"> -<meta name="assert" content="This test checks that vertical-lr tables order rows/rowgroups left to right and cells top-to-bottom (LTR) or bottom-to-top (RTL) per 'direction'."> -<meta name="assert" content="This test checks that 'writing-mode' and 'direction' do not apply to table rows and row groups."> +<meta name="assert" content="This test checks that vertical-lr tables order rows/rowgroups left to right and cells top-to-bottom (LTR) or bottom-to-top (RTL) per 'direction'. This test also checks that 'writing-mode' and 'direction' do not apply to table rows and row groups."> <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#writing-mode"> <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#direction">
diff --git a/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/table-progression-vlr-002.html b/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/table-progression-vlr-002.html index 54b5f3c0..4f224fa 100644 --- a/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/table-progression-vlr-002.html +++ b/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/table-progression-vlr-002.html
@@ -2,8 +2,7 @@ <title>CSS Test: vertical-lr Table Column/Colgroup Ordering</title> <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"> <link rel="match" href="table-progression-002-ref.html"> -<meta name="assert" content="This test checks that vertical-lr tables order columns top-to-bottom (LTR) or bottom-to-top (RTL) per the table's 'direction'."> -<meta name="assert" content="This test checks that 'writing-mode' and 'direction' do not apply to table columns and column groups."> +<meta name="assert" content="This test checks that vertical-lr tables order columns top-to-bottom (LTR) or bottom-to-top (RTL) per the table's 'direction'. This test also checks that 'writing-mode' and 'direction' do not apply to table columns and column groups."> <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#writing-mode"> <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#direction">
diff --git a/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/table-progression-vlr-003.html b/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/table-progression-vlr-003.html index f96d28fc..5113773f 100644 --- a/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/table-progression-vlr-003.html +++ b/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/table-progression-vlr-003.html
@@ -96,13 +96,13 @@ <tr> <td rowspan=2> <td class="orng"> - <td colspan=3"> + <td colspan="3"> <td class="navy"> <tr> - <td rowspan=3"> + <td rowspan="3"> <td class="yllw"> <td class="pink"> - <td rowspan=2"> + <td rowspan="2"> <td class="blue"> <tr> <td class="aqua">
diff --git a/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/table-progression-vrl-001.html b/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/table-progression-vrl-001.html index 3e2650f..0ec1c75 100644 --- a/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/table-progression-vrl-001.html +++ b/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/table-progression-vrl-001.html
@@ -2,8 +2,7 @@ <title>CSS Test: vertical-rl Table Row/Rowgroup/Cell Ordering</title> <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"> <link rel="match" href="table-progression-001-ref.html"> -<meta name="assert" content="This test checks that vertical-rl tables order rows/rowgroups right to left and cells top-to-bottom (LTR) or bottom-to-top (RTL) per 'direction'."> -<meta name="assert" content="This test checks that 'writing-mode' and 'direction' do not apply to table rows and row groups."> +<meta name="assert" content="This test checks that vertical-rl tables order rows/rowgroups right to left and cells top-to-bottom (LTR) or bottom-to-top (RTL) per 'direction'. This test also checks that 'writing-mode' and 'direction' do not apply to table rows and row groups."> <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#writing-mode"> <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#direction"> @@ -113,13 +112,13 @@ <tr> <td rowspan=2> <td class="orng"> - <td colspan=3"> + <td colspan="3"> <td class="navy"> <tr> - <td rowspan=3"> + <td rowspan="3"> <td class="yllw"> <td class="pink"> - <td rowspan=2"> + <td rowspan="2"> <td class="blue"> <tr> <td class="aqua">
diff --git a/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/table-progression-vrl-002.html b/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/table-progression-vrl-002.html index 90c183a..337fb801 100644 --- a/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/table-progression-vrl-002.html +++ b/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/table-progression-vrl-002.html
@@ -2,8 +2,7 @@ <title>CSS Test: vertical-rl Table Column/Colgroup Ordering</title> <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"> <link rel="match" href="table-progression-002-ref.html"> -<meta name="assert" content="This test checks that vertical-rl tables order columns top-to-bottom (LTR) or bottom-to-top (RTL) per the table's 'direction'."> -<meta name="assert" content="This test checks that 'writing-mode' and 'direction' do not apply to table columns and column groups."> +<meta name="assert" content="This test checks that vertical-rl tables order columns top-to-bottom (LTR) or bottom-to-top (RTL) per the table's 'direction'. This test also checks that 'writing-mode' and 'direction' do not apply to table columns and column groups."> <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#writing-mode"> <link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#direction">
diff --git a/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/table-progression-vrl-003.html b/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/table-progression-vrl-003.html index a5fe0db6..8d25bb73 100644 --- a/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/table-progression-vrl-003.html +++ b/third_party/WebKit/LayoutTests/imported/csswg-test/css-writing-modes-3/table-progression-vrl-003.html
@@ -96,13 +96,13 @@ <tr> <td rowspan=2> <td class="orng"> - <td colspan=3"> + <td colspan="3"> <td class="navy"> <tr> - <td rowspan=3"> + <td rowspan="3"> <td class="yllw"> <td class="pink"> - <td rowspan=2"> + <td rowspan="2"> <td class="blue"> <tr> <td class="aqua">
diff --git a/third_party/WebKit/LayoutTests/inspector/file-system-mapping-expected.txt b/third_party/WebKit/LayoutTests/inspector/file-system-mapping-expected.txt index 6bad388..399ab43 100644 --- a/third_party/WebKit/LayoutTests/inspector/file-system-mapping-expected.txt +++ b/third_party/WebKit/LayoutTests/inspector/file-system-mapping-expected.txt
@@ -3,61 +3,61 @@ Testing file system mapping. file system paths: -Adding file system /home/username/projects/foo +Adding file system file:///home/username/projects/foo Testing file system mapping. file system paths: - - /home/username/projects/foo + - file:///home/username/projects/foo -Adding file system /home/username/projects/bar +Adding file system file:///home/username/projects/bar Testing file system mapping. file system paths: - - /home/username/projects/foo - - /home/username/projects/bar + - file:///home/username/projects/foo + - file:///home/username/projects/bar -Adding file system /www/site1 +Adding file system file:///www/site1 Testing file system mapping. file system paths: - - /home/username/projects/foo - - /home/username/projects/bar - - /www/site1 + - file:///home/username/projects/foo + - file:///home/username/projects/bar + - file:///www/site1 -Adding file mapping (/www/site1, http://localhost/, /) +Adding file mapping (file:///www/site1, http://localhost/, /) Testing file system mapping. file system paths: - - /home/username/projects/foo - - /home/username/projects/bar - - /www/site1 - - {"fileSystemPath":"/www/site1","urlPrefix":"http://localhost/","pathPrefix":"/","configurable":true} + - file:///home/username/projects/foo + - file:///home/username/projects/bar + - file:///www/site1 + - {"fileSystemPath":"file:///www/site1","urlPrefix":"http://localhost/","pathPrefix":"/","configurable":true} -Adding file mapping (/www/site1, http://www.foo.com/, /foo/) +Adding file mapping (file:///www/site1, http://www.foo.com/, /foo/) Testing file system mapping. file system paths: - - /home/username/projects/foo - - /home/username/projects/bar - - /www/site1 - - {"fileSystemPath":"/www/site1","urlPrefix":"http://localhost/","pathPrefix":"/","configurable":true} - - {"fileSystemPath":"/www/site1","urlPrefix":"http://www.foo.com/","pathPrefix":"/foo/","configurable":true} + - file:///home/username/projects/foo + - file:///home/username/projects/bar + - file:///www/site1 + - {"fileSystemPath":"file:///www/site1","urlPrefix":"http://localhost/","pathPrefix":"/","configurable":true} + - {"fileSystemPath":"file:///www/site1","urlPrefix":"http://www.foo.com/","pathPrefix":"/foo/","configurable":true} -Adding file mapping (/home/username/projects/foo, http://www.example.com/bar/, /foo/) +Adding file mapping (file:///home/username/projects/foo, http://www.example.com/bar/, /foo/) Testing file system mapping. file system paths: - - /home/username/projects/foo - - {"fileSystemPath":"/home/username/projects/foo","urlPrefix":"http://www.example.com/bar/","pathPrefix":"/foo/","configurable":true} - - /home/username/projects/bar - - /www/site1 - - {"fileSystemPath":"/www/site1","urlPrefix":"http://localhost/","pathPrefix":"/","configurable":true} - - {"fileSystemPath":"/www/site1","urlPrefix":"http://www.foo.com/","pathPrefix":"/foo/","configurable":true} + - file:///home/username/projects/foo + - {"fileSystemPath":"file:///home/username/projects/foo","urlPrefix":"http://www.example.com/bar/","pathPrefix":"/foo/","configurable":true} + - file:///home/username/projects/bar + - file:///www/site1 + - {"fileSystemPath":"file:///www/site1","urlPrefix":"http://localhost/","pathPrefix":"/","configurable":true} + - {"fileSystemPath":"file:///www/site1","urlPrefix":"http://www.foo.com/","pathPrefix":"/foo/","configurable":true} -Adding file mapping for resource (http://www.bar.com/foo/folder/42.js, /home/username/projects/foo, file:///home/username/projects/foo/baz/folder/42.js) +Adding file mapping for resource (http://www.bar.com/foo/folder/42.js, file:///home/username/projects/foo, file:///home/username/projects/foo/baz/folder/42.js) Testing file system mapping. file system paths: - - /home/username/projects/foo - - {"fileSystemPath":"/home/username/projects/foo","urlPrefix":"http://www.example.com/bar/","pathPrefix":"/foo/","configurable":true} - - {"fileSystemPath":"/home/username/projects/foo","urlPrefix":"http://www.bar.com/foo/","pathPrefix":"/baz/","configurable":true} - - /home/username/projects/bar - - /www/site1 - - {"fileSystemPath":"/www/site1","urlPrefix":"http://localhost/","pathPrefix":"/","configurable":true} - - {"fileSystemPath":"/www/site1","urlPrefix":"http://www.foo.com/","pathPrefix":"/foo/","configurable":true} + - file:///home/username/projects/foo + - {"fileSystemPath":"file:///home/username/projects/foo","urlPrefix":"http://www.example.com/bar/","pathPrefix":"/foo/","configurable":true} + - {"fileSystemPath":"file:///home/username/projects/foo","urlPrefix":"http://www.bar.com/foo/","pathPrefix":"/baz/","configurable":true} + - file:///home/username/projects/bar + - file:///www/site1 + - {"fileSystemPath":"file:///www/site1","urlPrefix":"http://localhost/","pathPrefix":"/","configurable":true} + - {"fileSystemPath":"file:///www/site1","urlPrefix":"http://www.foo.com/","pathPrefix":"/foo/","configurable":true} Testing mappings for url: Has mapping for 'http://www.bar.com/foo/folder/42.js': true @@ -87,60 +87,60 @@ Creating another file system mapping. Testing file system mapping. file system paths: - - /home/username/projects/foo - - {"fileSystemPath":"/home/username/projects/foo","urlPrefix":"http://www.example.com/bar/","pathPrefix":"/foo/","configurable":true} - - {"fileSystemPath":"/home/username/projects/foo","urlPrefix":"http://www.bar.com/foo/","pathPrefix":"/baz/","configurable":true} - - /home/username/projects/bar - - /www/site1 - - {"fileSystemPath":"/www/site1","urlPrefix":"http://localhost/","pathPrefix":"/","configurable":true} - - {"fileSystemPath":"/www/site1","urlPrefix":"http://www.foo.com/","pathPrefix":"/foo/","configurable":true} + - file:///home/username/projects/foo + - {"fileSystemPath":"file:///home/username/projects/foo","urlPrefix":"http://www.example.com/bar/","pathPrefix":"/foo/","configurable":true} + - {"fileSystemPath":"file:///home/username/projects/foo","urlPrefix":"http://www.bar.com/foo/","pathPrefix":"/baz/","configurable":true} + - file:///home/username/projects/bar + - file:///www/site1 + - {"fileSystemPath":"file:///www/site1","urlPrefix":"http://localhost/","pathPrefix":"/","configurable":true} + - {"fileSystemPath":"file:///www/site1","urlPrefix":"http://www.foo.com/","pathPrefix":"/foo/","configurable":true} Removing file mapping for url http://www.bar.com/foo/folder/42.js Testing file system mapping. file system paths: - - /home/username/projects/foo - - {"fileSystemPath":"/home/username/projects/foo","urlPrefix":"http://www.example.com/bar/","pathPrefix":"/foo/","configurable":true} - - /home/username/projects/bar - - /www/site1 - - {"fileSystemPath":"/www/site1","urlPrefix":"http://localhost/","pathPrefix":"/","configurable":true} - - {"fileSystemPath":"/www/site1","urlPrefix":"http://www.foo.com/","pathPrefix":"/foo/","configurable":true} + - file:///home/username/projects/foo + - {"fileSystemPath":"file:///home/username/projects/foo","urlPrefix":"http://www.example.com/bar/","pathPrefix":"/foo/","configurable":true} + - file:///home/username/projects/bar + - file:///www/site1 + - {"fileSystemPath":"file:///www/site1","urlPrefix":"http://localhost/","pathPrefix":"/","configurable":true} + - {"fileSystemPath":"file:///www/site1","urlPrefix":"http://www.foo.com/","pathPrefix":"/foo/","configurable":true} -Removing file mapping (/www/site1, http://localhost/, /) +Removing file mapping (file:///www/site1, http://localhost/, /) Testing file system mapping. file system paths: - - /home/username/projects/foo - - {"fileSystemPath":"/home/username/projects/foo","urlPrefix":"http://www.example.com/bar/","pathPrefix":"/foo/","configurable":true} - - /home/username/projects/bar - - /www/site1 - - {"fileSystemPath":"/www/site1","urlPrefix":"http://www.foo.com/","pathPrefix":"/foo/","configurable":true} + - file:///home/username/projects/foo + - {"fileSystemPath":"file:///home/username/projects/foo","urlPrefix":"http://www.example.com/bar/","pathPrefix":"/foo/","configurable":true} + - file:///home/username/projects/bar + - file:///www/site1 + - {"fileSystemPath":"file:///www/site1","urlPrefix":"http://www.foo.com/","pathPrefix":"/foo/","configurable":true} -Removing file mapping (/www/site1, http://www.foo.com/, /foo/) +Removing file mapping (file:///www/site1, http://www.foo.com/, /foo/) Testing file system mapping. file system paths: - - /home/username/projects/foo - - {"fileSystemPath":"/home/username/projects/foo","urlPrefix":"http://www.example.com/bar/","pathPrefix":"/foo/","configurable":true} - - /home/username/projects/bar - - /www/site1 + - file:///home/username/projects/foo + - {"fileSystemPath":"file:///home/username/projects/foo","urlPrefix":"http://www.example.com/bar/","pathPrefix":"/foo/","configurable":true} + - file:///home/username/projects/bar + - file:///www/site1 -Removing file mapping (/home/username/projects/foo, http://www.example.com/bar/, /foo/) +Removing file mapping (file:///home/username/projects/foo, http://www.example.com/bar/, /foo/) Testing file system mapping. file system paths: - - /home/username/projects/foo - - /home/username/projects/bar - - /www/site1 + - file:///home/username/projects/foo + - file:///home/username/projects/bar + - file:///www/site1 -Removing file system /www/site1 +Removing file system file:///www/site1 Testing file system mapping. file system paths: - - /home/username/projects/foo - - /home/username/projects/bar + - file:///home/username/projects/foo + - file:///home/username/projects/bar -Removing file system /home/username/projects/foo +Removing file system file:///home/username/projects/foo Testing file system mapping. file system paths: - - /home/username/projects/bar + - file:///home/username/projects/bar -Removing file system /home/username/projects/bar +Removing file system file:///home/username/projects/bar Testing file system mapping. file system paths:
diff --git a/third_party/WebKit/LayoutTests/inspector/file-system-mapping-overrides.html b/third_party/WebKit/LayoutTests/inspector/file-system-mapping-overrides.html index a274c76..d8ecf19 100644 --- a/third_party/WebKit/LayoutTests/inspector/file-system-mapping-overrides.html +++ b/third_party/WebKit/LayoutTests/inspector/file-system-mapping-overrides.html
@@ -8,34 +8,34 @@ function testFileSystemClashDirectOrder(next) { var fileSystemMapping = new WebInspector.FileSystemMapping(); - fileSystemMapping.addFileSystem("/Source/devtools"); + fileSystemMapping.addFileSystem("file:///Source/devtools"); - fileSystemMapping.addNonConfigurableFileMapping("/Source/devtools", "chrome-devtools://devtools/bundled/wrong_url", "/"); - fileSystemMapping.addFileMapping("/Source/devtools", "http://localhost:1234/right_url", "/"); + fileSystemMapping.addNonConfigurableFileMapping("file:///Source/devtools", "chrome-devtools://devtools/bundled/wrong_url", "/"); + fileSystemMapping.addFileMapping("file:///Source/devtools", "http://localhost:1234/right_url", "/"); - InspectorTest.addResult(fileSystemMapping.urlForPath("/Source/devtools", "file:///Source/devtools/file.txt")); + InspectorTest.addResult(fileSystemMapping.urlForPath("file:///Source/devtools", "file:///Source/devtools/file.txt")); next(); }, function testFileSystemClashReversedOrder(next) { var fileSystemMapping = new WebInspector.FileSystemMapping(); - fileSystemMapping.addFileSystem("/Source/devtools"); + fileSystemMapping.addFileSystem("file:///Source/devtools"); - fileSystemMapping.addFileMapping("/Source/devtools", "http://localhost:1234/right_url", "/"); - fileSystemMapping.addNonConfigurableFileMapping("/Source/devtools", "chrome-devtools://devtools/wrong_url", "/"); + fileSystemMapping.addFileMapping("file:///Source/devtools", "http://localhost:1234/right_url", "/"); + fileSystemMapping.addNonConfigurableFileMapping("file:///Source/devtools", "chrome-devtools://devtools/wrong_url", "/"); - InspectorTest.addResult(fileSystemMapping.urlForPath("/Source/devtools", "file:///Source/devtools/file.txt")); + InspectorTest.addResult(fileSystemMapping.urlForPath("file:///Source/devtools", "file:///Source/devtools/file.txt")); next(); }, function testNetworkClashDirectOrder(next) { var fileSystemMapping = new WebInspector.FileSystemMapping(); - fileSystemMapping.addFileSystem("/Source/devtools"); + fileSystemMapping.addFileSystem("file:///Source/devtools"); - fileSystemMapping.addNonConfigurableFileMapping("/Source/devtools", "http://localhost:1234/front_end", "/wrong"); - fileSystemMapping.addFileMapping("/Source/devtools", "http://localhost:1234/front_end", "/right"); + fileSystemMapping.addNonConfigurableFileMapping("file:///Source/devtools", "http://localhost:1234/front_end", "/wrong"); + fileSystemMapping.addFileMapping("file:///Source/devtools", "http://localhost:1234/front_end", "/right"); InspectorTest.addResult(fileSystemMapping.fileForURL("http://localhost:1234/front_end/file.txt").fileURL); next(); @@ -44,10 +44,10 @@ function testNetworkClashReversedOrder(next) { var fileSystemMapping = new WebInspector.FileSystemMapping(); - fileSystemMapping.addFileSystem("/Source/devtools"); + fileSystemMapping.addFileSystem("file:///Source/devtools"); - fileSystemMapping.addFileMapping("/Source/devtools", "http://localhost:1234/front_end", "/right"); - fileSystemMapping.addNonConfigurableFileMapping("/Source/devtools", "http://localhost:1234/front_end", "/wrong"); + fileSystemMapping.addFileMapping("file:///Source/devtools", "http://localhost:1234/front_end", "/right"); + fileSystemMapping.addNonConfigurableFileMapping("file:///Source/devtools", "http://localhost:1234/front_end", "/wrong"); InspectorTest.addResult(fileSystemMapping.fileForURL("http://localhost:1234/front_end/file.txt").fileURL); next();
diff --git a/third_party/WebKit/LayoutTests/inspector/file-system-mapping.html b/third_party/WebKit/LayoutTests/inspector/file-system-mapping.html index 45f4ac5..4db0472 100644 --- a/third_party/WebKit/LayoutTests/inspector/file-system-mapping.html +++ b/third_party/WebKit/LayoutTests/inspector/file-system-mapping.html
@@ -5,9 +5,9 @@ function test() { var paths = { - FOO: "/home/username/projects/foo", - BAR: "/home/username/projects/bar", - SITE1: "/www/site1" + FOO: "file:///home/username/projects/foo", + BAR: "file:///home/username/projects/bar", + SITE1: "file:///www/site1" }; function addFileSystem(fileSystemMapping, path) @@ -101,7 +101,7 @@ addFileMapping(fileSystemMapping, paths.SITE1, "http://localhost/", "/"); addFileMapping(fileSystemMapping, paths.SITE1, "http://www.foo.com/", "/foo/"); addFileMapping(fileSystemMapping, paths.FOO, "http://www.example.com/bar/", "/foo/"); - addMappingForResource(fileSystemMapping, "http://www.bar.com/foo/folder/42.js", paths.FOO, "file://" + paths.FOO + "/baz/folder/42.js"); + addMappingForResource(fileSystemMapping, "http://www.bar.com/foo/folder/42.js", paths.FOO, paths.FOO + "/baz/folder/42.js"); InspectorTest.addResult("Testing mappings for url:"); dumpFileForURL(fileSystemMapping, "http://www.bar.com/foo/folder/42.js"); @@ -113,15 +113,15 @@ InspectorTest.addResult(""); InspectorTest.addResult("Testing mappings for path:"); - dumpURLForPath(fileSystemMapping, paths.FOO, "file://" + paths.FOO + "/baz/folder/42.js"); - dumpURLForPath(fileSystemMapping, paths.FOO, "file://" + paths.FOO + "/baz/folder/43.js"); - dumpURLForPath(fileSystemMapping, paths.FOO, "file://" + paths.FOO + "/bar/folder/42.js"); - dumpURLForPath(fileSystemMapping, paths.FOO, "file://" + paths.FOO + "/foo/folder/42.js"); - dumpURLForPath(fileSystemMapping, paths.FOO, "file://" + paths.FOO + "/foo2/folder/42.js"); - dumpURLForPath(fileSystemMapping, paths.SITE1, "file://" + paths.SITE1 + "/foo/index.html"); - dumpURLForPath(fileSystemMapping, paths.SITE1, "file://" + paths.SITE1 + "/index.html"); - dumpURLForPath(fileSystemMapping, paths.SITE1, "file://" + paths.SITE1 + "/foo"); - dumpURLForPath(fileSystemMapping, paths.SITE1, "file://" + paths.SITE1 + "/foo/"); + dumpURLForPath(fileSystemMapping, paths.FOO, paths.FOO + "/baz/folder/42.js"); + dumpURLForPath(fileSystemMapping, paths.FOO, paths.FOO + "/baz/folder/43.js"); + dumpURLForPath(fileSystemMapping, paths.FOO, paths.FOO + "/bar/folder/42.js"); + dumpURLForPath(fileSystemMapping, paths.FOO, paths.FOO + "/foo/folder/42.js"); + dumpURLForPath(fileSystemMapping, paths.FOO, paths.FOO + "/foo2/folder/42.js"); + dumpURLForPath(fileSystemMapping, paths.SITE1, paths.SITE1 + "/foo/index.html"); + dumpURLForPath(fileSystemMapping, paths.SITE1, paths.SITE1 + "/index.html"); + dumpURLForPath(fileSystemMapping, paths.SITE1, paths.SITE1 + "/foo"); + dumpURLForPath(fileSystemMapping, paths.SITE1, paths.SITE1 + "/foo/"); InspectorTest.addResult(""); // Then create another file mapping to make sure it is correctly restored from the settings.
diff --git a/third_party/WebKit/LayoutTests/inspector/file-system-project-expected.txt b/third_party/WebKit/LayoutTests/inspector/file-system-project-expected.txt index 0668bbc..7db184a9 100644 --- a/third_party/WebKit/LayoutTests/inspector/file-system-project-expected.txt +++ b/third_party/WebKit/LayoutTests/inspector/file-system-project-expected.txt
@@ -64,6 +64,6 @@ -- Excluded /html2/ via .devtools -- Dumping uiSourceCodes origin URLs: - - file:///html/foo.js - - file:///bar.js + - file:///var/www3/html/foo.js + - file:///var/www3/bar.js
diff --git a/third_party/WebKit/LayoutTests/inspector/file-system-project.html b/third_party/WebKit/LayoutTests/inspector/file-system-project.html index faa07a7..d468b9e 100644 --- a/third_party/WebKit/LayoutTests/inspector/file-system-project.html +++ b/third_party/WebKit/LayoutTests/inspector/file-system-project.html
@@ -55,8 +55,8 @@ function testFileSystems(next) { InspectorTest.addResult("Adding first file system."); - var fs1 = new InspectorTest.TestFileSystem("/var/www"); - var fs2 = new InspectorTest.TestFileSystem("/foo/bar"); + var fs1 = new InspectorTest.TestFileSystem("file:///var/www"); + var fs2 = new InspectorTest.TestFileSystem("file:///foo/bar"); InspectorTest.addResult("Adding second file system."); var uiSourceCodes; @@ -67,8 +67,8 @@ function fileSystemCreated() { InspectorTest.addResult("Adding file mappings."); - WebInspector.fileSystemMapping.addFileMapping("/var/www", "http://localhost/", "/localhost/"); - WebInspector.fileSystemMapping.addFileMapping("/foo/bar", "http://www.example.com/", "/"); + WebInspector.fileSystemMapping.addFileMapping("file:///var/www", "http://localhost/", "/localhost/"); + WebInspector.fileSystemMapping.addFileMapping("file:///foo/bar", "http://www.example.com/", "/"); InspectorTest.addResult("Adding files to file systems."); @@ -124,7 +124,7 @@ function testDefaultExcludes(next) { - createFileSystem("/var/www", dumpExcludes); + createFileSystem("file:///var/www", dumpExcludes); function dumpExcludes(fs) { @@ -138,8 +138,8 @@ function testExcludesSettings(next) { - WebInspector.settings.createLocalSetting("workspaceExcludedFolders", {}).set({"/var/www2":["/html/"]}); - createFileSystem("/var/www2", dumpExcludes); + WebInspector.settings.createLocalSetting("workspaceExcludedFolders", {}).set({"file:///var/www2":["/html/"]}); + createFileSystem("file:///var/www2", dumpExcludes); function dumpExcludes(fs) { @@ -153,7 +153,7 @@ function testExcludesViaDelegate(next) { - createFileSystem("/var/www3", dumpExcludes); + createFileSystem("file:///var/www3", dumpExcludes); function dumpExcludes(fs) { @@ -168,7 +168,7 @@ function testExcludesViaProject(next) { - var fs = new InspectorTest.TestFileSystem(name); + var fs = new InspectorTest.TestFileSystem("file:///var/www3"); fs.root.addFile(".devtools", JSON.stringify({excludes:["/html2/"]})); fs.root.mkdir("html").addFile("foo.js", ""); fs.root.mkdir(".git").addFile("foogit.js", "");
diff --git a/third_party/WebKit/LayoutTests/inspector/sources/debugger/file-system-project-live-edit.html b/third_party/WebKit/LayoutTests/inspector/sources/debugger/file-system-project-live-edit.html index 50172ea..84a47f0 100644 --- a/third_party/WebKit/LayoutTests/inspector/sources/debugger/file-system-project-live-edit.html +++ b/third_party/WebKit/LayoutTests/inspector/sources/debugger/file-system-project-live-edit.html
@@ -18,7 +18,7 @@ InspectorTest.runTestSuite([ function testLiveEditReload(next) { - var fs = new InspectorTest.TestFileSystem("/var/www"); + var fs = new InspectorTest.TestFileSystem("file:///var/www"); fs.root.mkdir("html").addFile("edit-me.js", "function f()\n{\n return 0;\n}\n"); fs.root.addFile("bar.js", "<bar content>"); InspectorTest.addResult("Adding file system.");
diff --git a/third_party/WebKit/LayoutTests/inspector/sources/debugger/file-system-project-mapping.html b/third_party/WebKit/LayoutTests/inspector/sources/debugger/file-system-project-mapping.html index e73f62b..5ce6623 100644 --- a/third_party/WebKit/LayoutTests/inspector/sources/debugger/file-system-project-mapping.html +++ b/third_party/WebKit/LayoutTests/inspector/sources/debugger/file-system-project-mapping.html
@@ -11,7 +11,7 @@ var target; var resourceScriptMapping; var defaultScriptMapping; - var fileSystemProjectId = WebInspector.FileSystemWorkspaceBinding.projectId("/var/www"); + var fileSystemProjectId = WebInspector.FileSystemWorkspaceBinding.projectId("file:///var/www"); WebInspector.networkMapping.dispose(); function createWorkspaceWithTarget() @@ -43,7 +43,7 @@ createWorkspaceWithTarget(); InspectorTest.addResult("Adding file system."); - var fs = new InspectorTest.TestFileSystem("/var/www"); + var fs = new InspectorTest.TestFileSystem("file:///var/www"); fs.root.mkdir("html").addFile("foo.js", "<foo content>"); fs.root.addFile("bar.js", "<bar content>"); fs.reportCreated(fileSystemCreated1); @@ -128,7 +128,7 @@ WebInspector.targetManager = InspectorTest.testTargetManager; InspectorTest.addResult("Adding file system."); - var fs = new InspectorTest.TestFileSystem("/var/www"); + var fs = new InspectorTest.TestFileSystem("file:///var/www"); fs.root.mkdir("html").addFile("foo.js", originalFileContent); fs.root.addFile("bar.js", "<bar content>"); InspectorTest.addResult("Adding file system mapping."); @@ -245,7 +245,7 @@ createWorkspaceWithTarget(); InspectorTest.addResult("Adding file system."); - var fs = new InspectorTest.TestFileSystem("/var/www"); + var fs = new InspectorTest.TestFileSystem("file:///var/www"); fs.root.addFile("foo.js", ""); fs.reportCreated(fileSystemCreated); @@ -275,7 +275,7 @@ createWorkspaceWithTarget(); InspectorTest.addResult("Adding file system."); - var fs = new InspectorTest.TestFileSystem("/var/www"); + var fs = new InspectorTest.TestFileSystem("file:///var/www"); fs.root.mkdir("html").addFile("foo.js", "<foo content>"); fs.root.addFile("bar.js", "<bar content>"); fs.root.mkdir("foo").mkdir("bar").addFile("baz.js", "<baz content>"); @@ -319,7 +319,7 @@ InspectorTest.testTargetManager.addEventListener(WebInspector.TargetManager.Events.SuspendStateChanged, suspendStateChanged); InspectorTest.addResult("Adding file system."); - var fs = new InspectorTest.TestFileSystem("/var/www"); + var fs = new InspectorTest.TestFileSystem("file:///var/www"); fs.root.mkdir("html").addFile("foo.js", "<foo content>"); fs.root.mkdir("html2").addFile("bar.js", "<bar content>"); fs.root.addFile(".devtools", JSON.stringify({ mappings: [ { folder: "/html/", url: "http://localhost/h1/" }, { folder: "/html2/", url: "http://localhost/h2/" } ]}));
diff --git a/third_party/WebKit/LayoutTests/inspector/workspace-mapping-expected.txt b/third_party/WebKit/LayoutTests/inspector/workspace-mapping-expected.txt index bce9be8..3616fb7 100644 --- a/third_party/WebKit/LayoutTests/inspector/workspace-mapping-expected.txt +++ b/third_party/WebKit/LayoutTests/inspector/workspace-mapping-expected.txt
@@ -10,9 +10,9 @@ url http://localhost/foo/index.html is mapped to null url https://localhost/index.html is mapped to null - path /home/example.com / foo/index.html is mapped to null - path /home/example.com / index.html is mapped to null - path /var/www / localhost/index.html is mapped to http://localhost/index.html - path /var/www / localhost/foo/index.html is mapped to http://localhost/foo/index.html - path /home/foo / index.html is mapped to null + path file:///home/example.com / foo/index.html is mapped to null + path file:///home/example.com / index.html is mapped to null + path file:///var/www / localhost/index.html is mapped to http://localhost/index.html + path file:///var/www / localhost/foo/index.html is mapped to http://localhost/foo/index.html + path file:///home/foo / index.html is mapped to null
diff --git a/third_party/WebKit/LayoutTests/inspector/workspace-mapping.html b/third_party/WebKit/LayoutTests/inspector/workspace-mapping.html index 9897cbb8..751a6611 100644 --- a/third_party/WebKit/LayoutTests/inspector/workspace-mapping.html +++ b/third_party/WebKit/LayoutTests/inspector/workspace-mapping.html
@@ -24,10 +24,10 @@ } var fileSystemMapping = new WebInspector.FileSystemMapping(); - var fileSystemPath = "/var/www"; + var fileSystemPath = "file:///var/www"; var projectId = WebInspector.FileSystemWorkspaceBinding.projectId(fileSystemPath); - fileSystemMapping.addFileSystem("/var/www"); - fileSystemMapping.addFileMapping("/var/www", "http://localhost/", "/localhost/"); + fileSystemMapping.addFileSystem("file:///var/www"); + fileSystemMapping.addFileMapping("file:///var/www", "http://localhost/", "/localhost/"); var fileSystemWorkspaceBinding = new WebInspector.FileSystemWorkspaceBinding(WebInspector.isolatedFileSystemManager, workspace); var networkMapping = new WebInspector.NetworkMapping(WebInspector.targetManager, workspace, fileSystemWorkspaceBinding, fileSystemMapping); @@ -48,7 +48,7 @@ function dumpURLForPath(fileSystemPath, filePath) { - var url = networkMapping._urlForPath(fileSystemPath, "file://" + fileSystemPath + "/" + filePath) + var url = networkMapping._urlForPath(fileSystemPath, fileSystemPath + "/" + filePath) InspectorTest.addResult(" path " + fileSystemPath + " / " + filePath + " is mapped to " + (url ? url : null)); } @@ -71,11 +71,11 @@ dumpUISourceCodeForURL("https://localhost/index.html"); InspectorTest.addResult(""); - dumpURLForPath("/home/example.com", "foo/index.html"); - dumpURLForPath("/home/example.com", "index.html"); - dumpURLForPath("/var/www", "localhost/index.html"); - dumpURLForPath("/var/www", "localhost/foo/index.html"); - dumpURLForPath("/home/foo", "index.html"); + dumpURLForPath("file:///home/example.com", "foo/index.html"); + dumpURLForPath("file:///home/example.com", "index.html"); + dumpURLForPath("file:///var/www", "localhost/index.html"); + dumpURLForPath("file:///var/www", "localhost/foo/index.html"); + dumpURLForPath("file:///home/foo", "index.html"); InspectorTest.completeTest(); }
diff --git a/third_party/WebKit/LayoutTests/platform/android/compositing/geometry/clipping-foreground-expected.png b/third_party/WebKit/LayoutTests/platform/android/compositing/geometry/clipping-foreground-expected.png deleted file mode 100644 index 4a88862..0000000 --- a/third_party/WebKit/LayoutTests/platform/android/compositing/geometry/clipping-foreground-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/android/compositing/iframes/composited-iframe-alignment-expected.png b/third_party/WebKit/LayoutTests/platform/android/compositing/iframes/composited-iframe-alignment-expected.png deleted file mode 100644 index 313d91d..0000000 --- a/third_party/WebKit/LayoutTests/platform/android/compositing/iframes/composited-iframe-alignment-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/android/compositing/masks/masked-ancestor-expected.png b/third_party/WebKit/LayoutTests/platform/android/compositing/masks/masked-ancestor-expected.png deleted file mode 100644 index ce2c0e82..0000000 --- a/third_party/WebKit/LayoutTests/platform/android/compositing/masks/masked-ancestor-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/android/compositing/shadows/shadow-drawing-expected.png b/third_party/WebKit/LayoutTests/platform/android/compositing/shadows/shadow-drawing-expected.png deleted file mode 100644 index 1b746c7..0000000 --- a/third_party/WebKit/LayoutTests/platform/android/compositing/shadows/shadow-drawing-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/android/fast/borders/border-radius-mask-canvas-with-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/android/fast/borders/border-radius-mask-canvas-with-shadow-expected.png deleted file mode 100644 index 9e2ab0ac..0000000 --- a/third_party/WebKit/LayoutTests/platform/android/fast/borders/border-radius-mask-canvas-with-shadow-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/android/fast/borders/border-radius-mask-video-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/android/fast/borders/border-radius-mask-video-shadow-expected.png deleted file mode 100644 index bdd2569..0000000 --- a/third_party/WebKit/LayoutTests/platform/android/fast/borders/border-radius-mask-video-shadow-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/android/fast/borders/border-radius-split-inline-expected.png b/third_party/WebKit/LayoutTests/platform/android/fast/borders/border-radius-split-inline-expected.png deleted file mode 100644 index 4b6f67e..0000000 --- a/third_party/WebKit/LayoutTests/platform/android/fast/borders/border-radius-split-inline-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/android/fast/borders/border-radius-with-box-shadow-01-expected.png b/third_party/WebKit/LayoutTests/platform/android/fast/borders/border-radius-with-box-shadow-01-expected.png deleted file mode 100644 index db91c09..0000000 --- a/third_party/WebKit/LayoutTests/platform/android/fast/borders/border-radius-with-box-shadow-01-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/android/fast/borders/border-radius-with-box-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/android/fast/borders/border-radius-with-box-shadow-expected.png deleted file mode 100644 index ed0d2eb..0000000 --- a/third_party/WebKit/LayoutTests/platform/android/fast/borders/border-radius-with-box-shadow-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/android/fast/box-shadow/basic-shadows-expected.png b/third_party/WebKit/LayoutTests/platform/android/fast/box-shadow/basic-shadows-expected.png deleted file mode 100644 index 8e3cc85a..0000000 --- a/third_party/WebKit/LayoutTests/platform/android/fast/box-shadow/basic-shadows-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/android/fast/box-shadow/box-shadow-clipped-slices-expected.png b/third_party/WebKit/LayoutTests/platform/android/fast/box-shadow/box-shadow-clipped-slices-expected.png deleted file mode 100644 index ef4c6b6f..0000000 --- a/third_party/WebKit/LayoutTests/platform/android/fast/box-shadow/box-shadow-clipped-slices-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/android/fast/box-shadow/box-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/android/fast/box-shadow/box-shadow-expected.png deleted file mode 100644 index 443c124..0000000 --- a/third_party/WebKit/LayoutTests/platform/android/fast/box-shadow/box-shadow-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/android/fast/box-shadow/box-shadow-radius-expected.png b/third_party/WebKit/LayoutTests/platform/android/fast/box-shadow/box-shadow-radius-expected.png deleted file mode 100644 index 484579df..0000000 --- a/third_party/WebKit/LayoutTests/platform/android/fast/box-shadow/box-shadow-radius-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/android/fast/box-shadow/inset-box-shadow-radius-expected.png b/third_party/WebKit/LayoutTests/platform/android/fast/box-shadow/inset-box-shadow-radius-expected.png deleted file mode 100644 index 4beed5fa..0000000 --- a/third_party/WebKit/LayoutTests/platform/android/fast/box-shadow/inset-box-shadow-radius-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/android/fast/box-shadow/inset-box-shadows-expected.png b/third_party/WebKit/LayoutTests/platform/android/fast/box-shadow/inset-box-shadows-expected.png deleted file mode 100644 index 1f611b8..0000000 --- a/third_party/WebKit/LayoutTests/platform/android/fast/box-shadow/inset-box-shadows-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/android/fast/box-shadow/shadow-tiling-artifact-expected.png b/third_party/WebKit/LayoutTests/platform/android/fast/box-shadow/shadow-tiling-artifact-expected.png deleted file mode 100644 index 2618d98..0000000 --- a/third_party/WebKit/LayoutTests/platform/android/fast/box-shadow/shadow-tiling-artifact-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/android/fast/canvas/canvas-composite-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/android/fast/canvas/canvas-composite-shadow-expected.png deleted file mode 100644 index ee46464..0000000 --- a/third_party/WebKit/LayoutTests/platform/android/fast/canvas/canvas-composite-shadow-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/android/fast/css/box-shadow-and-border-radius-expected.png b/third_party/WebKit/LayoutTests/platform/android/fast/css/box-shadow-and-border-radius-expected.png deleted file mode 100644 index 777ef11..0000000 --- a/third_party/WebKit/LayoutTests/platform/android/fast/css/box-shadow-and-border-radius-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/android/fast/css/color-correction-on-box-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/android/fast/css/color-correction-on-box-shadow-expected.png deleted file mode 100644 index 9a833997..0000000 --- a/third_party/WebKit/LayoutTests/platform/android/fast/css/color-correction-on-box-shadow-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/android/fast/css/shadow-multiple-expected.png b/third_party/WebKit/LayoutTests/platform/android/fast/css/shadow-multiple-expected.png deleted file mode 100644 index 9d09dcb52c..0000000 --- a/third_party/WebKit/LayoutTests/platform/android/fast/css/shadow-multiple-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/android/fast/forms/checkbox/checkbox-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/android/fast/forms/checkbox/checkbox-appearance-basic-expected.png deleted file mode 100644 index 076c06a0..0000000 --- a/third_party/WebKit/LayoutTests/platform/android/fast/forms/checkbox/checkbox-appearance-basic-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/android/fast/forms/color/color-suggestion-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/android/fast/forms/color/color-suggestion-picker-appearance-expected.png deleted file mode 100644 index 27f93a02..0000000 --- a/third_party/WebKit/LayoutTests/platform/android/fast/forms/color/color-suggestion-picker-appearance-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/android/fast/forms/color/color-suggestion-picker-appearance-zoom125-expected.png b/third_party/WebKit/LayoutTests/platform/android/fast/forms/color/color-suggestion-picker-appearance-zoom125-expected.png deleted file mode 100644 index 5fc2c773..0000000 --- a/third_party/WebKit/LayoutTests/platform/android/fast/forms/color/color-suggestion-picker-appearance-zoom125-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/android/fast/forms/color/color-suggestion-picker-appearance-zoom200-expected.png b/third_party/WebKit/LayoutTests/platform/android/fast/forms/color/color-suggestion-picker-appearance-zoom200-expected.png deleted file mode 100644 index 2c38100..0000000 --- a/third_party/WebKit/LayoutTests/platform/android/fast/forms/color/color-suggestion-picker-appearance-zoom200-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/android/fast/forms/color/color-suggestion-picker-one-row-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/android/fast/forms/color/color-suggestion-picker-one-row-appearance-expected.png deleted file mode 100644 index 33b29812..0000000 --- a/third_party/WebKit/LayoutTests/platform/android/fast/forms/color/color-suggestion-picker-one-row-appearance-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/android/fast/forms/color/color-suggestion-picker-two-row-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/android/fast/forms/color/color-suggestion-picker-two-row-appearance-expected.png deleted file mode 100644 index da67ab2..0000000 --- a/third_party/WebKit/LayoutTests/platform/android/fast/forms/color/color-suggestion-picker-two-row-appearance-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/android/fast/forms/color/color-suggestion-picker-with-scrollbar-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/android/fast/forms/color/color-suggestion-picker-with-scrollbar-appearance-expected.png deleted file mode 100644 index b479a975..0000000 --- a/third_party/WebKit/LayoutTests/platform/android/fast/forms/color/color-suggestion-picker-with-scrollbar-appearance-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/android/fast/forms/radio/radio-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/android/fast/forms/radio/radio-appearance-basic-expected.png deleted file mode 100644 index 2b87326..0000000 --- a/third_party/WebKit/LayoutTests/platform/android/fast/forms/radio/radio-appearance-basic-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/android/fast/forms/range/range-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/android/fast/forms/range/range-appearance-basic-expected.png deleted file mode 100644 index 642bb7bc..0000000 --- a/third_party/WebKit/LayoutTests/platform/android/fast/forms/range/range-appearance-basic-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/android/fast/repaint/shadow-multiple-expected.png b/third_party/WebKit/LayoutTests/platform/android/fast/repaint/shadow-multiple-expected.png deleted file mode 100644 index 3cd0696e..0000000 --- a/third_party/WebKit/LayoutTests/platform/android/fast/repaint/shadow-multiple-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/android/fast/text/shadow-translucent-fill-expected.png b/third_party/WebKit/LayoutTests/platform/android/fast/text/shadow-translucent-fill-expected.png deleted file mode 100644 index c557021..0000000 --- a/third_party/WebKit/LayoutTests/platform/android/fast/text/shadow-translucent-fill-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/android/fast/text/stroking-decorations-expected.png b/third_party/WebKit/LayoutTests/platform/android/fast/text/stroking-decorations-expected.png deleted file mode 100644 index 7e4cb50b..0000000 --- a/third_party/WebKit/LayoutTests/platform/android/fast/text/stroking-decorations-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/android/fast/text/stroking-expected.png b/third_party/WebKit/LayoutTests/platform/android/fast/text/stroking-expected.png deleted file mode 100644 index dced0ffd..0000000 --- a/third_party/WebKit/LayoutTests/platform/android/fast/text/stroking-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/android/fast/transforms/shadows-expected.png b/third_party/WebKit/LayoutTests/platform/android/fast/transforms/shadows-expected.png deleted file mode 100644 index ca38354..0000000 --- a/third_party/WebKit/LayoutTests/platform/android/fast/transforms/shadows-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/android/fast/writing-mode/english-lr-text-expected.png b/third_party/WebKit/LayoutTests/platform/android/fast/writing-mode/english-lr-text-expected.png deleted file mode 100644 index db30fdc..0000000 --- a/third_party/WebKit/LayoutTests/platform/android/fast/writing-mode/english-lr-text-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/android/ietestcenter/css3/text/textshadow-001-expected.png b/third_party/WebKit/LayoutTests/platform/android/ietestcenter/css3/text/textshadow-001-expected.png deleted file mode 100644 index a8eb36e..0000000 --- a/third_party/WebKit/LayoutTests/platform/android/ietestcenter/css3/text/textshadow-001-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/android/ietestcenter/css3/text/textshadow-002-expected.png b/third_party/WebKit/LayoutTests/platform/android/ietestcenter/css3/text/textshadow-002-expected.png deleted file mode 100644 index a5aa8f6..0000000 --- a/third_party/WebKit/LayoutTests/platform/android/ietestcenter/css3/text/textshadow-002-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/android/ietestcenter/css3/text/textshadow-003-expected.png b/third_party/WebKit/LayoutTests/platform/android/ietestcenter/css3/text/textshadow-003-expected.png deleted file mode 100644 index 10a4cc6..0000000 --- a/third_party/WebKit/LayoutTests/platform/android/ietestcenter/css3/text/textshadow-003-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/android/ietestcenter/css3/text/textshadow-004-expected.png b/third_party/WebKit/LayoutTests/platform/android/ietestcenter/css3/text/textshadow-004-expected.png deleted file mode 100644 index c3b29d4..0000000 --- a/third_party/WebKit/LayoutTests/platform/android/ietestcenter/css3/text/textshadow-004-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/android/ietestcenter/css3/text/textshadow-010-expected.png b/third_party/WebKit/LayoutTests/platform/android/ietestcenter/css3/text/textshadow-010-expected.png deleted file mode 100644 index 1674291..0000000 --- a/third_party/WebKit/LayoutTests/platform/android/ietestcenter/css3/text/textshadow-010-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/android/paint/roundedrects/circle-with-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/android/paint/roundedrects/circle-with-shadow-expected.png deleted file mode 100644 index ca70c05..0000000 --- a/third_party/WebKit/LayoutTests/platform/android/paint/roundedrects/circle-with-shadow-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/android/paint/roundedrects/input-with-rounded-rect-and-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/android/paint/roundedrects/input-with-rounded-rect-and-shadow-expected.png deleted file mode 100644 index 2f58da4..0000000 --- a/third_party/WebKit/LayoutTests/platform/android/paint/roundedrects/input-with-rounded-rect-and-shadow-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/android/svg/css/text-shadow-multiple-expected.png b/third_party/WebKit/LayoutTests/platform/android/svg/css/text-shadow-multiple-expected.png deleted file mode 100644 index 9a44e1d..0000000 --- a/third_party/WebKit/LayoutTests/platform/android/svg/css/text-shadow-multiple-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/android/svg/custom/repaint-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/android/svg/custom/repaint-shadow-expected.png deleted file mode 100644 index 23c5cffe..0000000 --- a/third_party/WebKit/LayoutTests/platform/android/svg/custom/repaint-shadow-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/android/virtual/display_list_2d_canvas/fast/canvas/canvas-composite-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/android/virtual/display_list_2d_canvas/fast/canvas/canvas-composite-shadow-expected.png deleted file mode 100644 index ee46464..0000000 --- a/third_party/WebKit/LayoutTests/platform/android/virtual/display_list_2d_canvas/fast/canvas/canvas-composite-shadow-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/android/virtual/gpu/fast/canvas/canvas-scale-strokePath-shadow-expected.txt b/third_party/WebKit/LayoutTests/platform/android/virtual/gpu/fast/canvas/canvas-scale-strokePath-shadow-expected.txt deleted file mode 100644 index aeb83637..0000000 --- a/third_party/WebKit/LayoutTests/platform/android/virtual/gpu/fast/canvas/canvas-scale-strokePath-shadow-expected.txt +++ /dev/null
@@ -1,57 +0,0 @@ -Ensure correct behavior of canvas with path stroke + shadow after scaling. A blue and red checkered pattern should be displayed. - -On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". - - -PASS d[0] is 255 -PASS d[1] is 0 -PASS d[2] is 0 -PASS d[3] is 255 -PASS d[0] is 255 -PASS d[1] is 0 -PASS d[2] is 0 -PASS d[3] is 255 -PASS d[0] is 255 -PASS d[1] is 0 -PASS d[2] is 0 -PASS d[3] is 255 -PASS d[0] is 255 -PASS d[1] is 0 -PASS d[2] is 0 -PASS d[3] is around 76 -PASS d[0] is 255 -PASS d[1] is 0 -PASS d[2] is 0 -PASS d[3] is around 76 -PASS d[0] is 255 -PASS d[1] is 0 -PASS d[2] is 0 -PASS d[3] is around 76 -PASS d[0] is 255 -PASS d[1] is 0 -PASS d[2] is 0 -PASS d[3] is around 200 -PASS d[0] is 255 -PASS d[1] is 0 -PASS d[2] is 0 -PASS d[3] is around 49 -PASS d[0] is 255 -PASS d[1] is 0 -PASS d[2] is 0 -PASS d[3] is around 199 -PASS d[0] is 255 -PASS d[1] is 0 -PASS d[2] is 0 -PASS d[3] is around 70 -PASS d[0] is 255 -PASS d[1] is 0 -PASS d[2] is 0 -PASS d[3] is around 70 -PASS d[0] is 255 -PASS d[1] is 0 -PASS d[2] is 0 -PASS d[3] is around 69 -PASS successfullyParsed is true - -TEST COMPLETE -
diff --git a/third_party/WebKit/LayoutTests/platform/android/virtual/gpu/fast/canvas/canvas-shadow-source-in-expected.png b/third_party/WebKit/LayoutTests/platform/android/virtual/gpu/fast/canvas/canvas-shadow-source-in-expected.png deleted file mode 100644 index fcac6ee..0000000 --- a/third_party/WebKit/LayoutTests/platform/android/virtual/gpu/fast/canvas/canvas-shadow-source-in-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/compositing/geometry/clipping-foreground-expected.png b/third_party/WebKit/LayoutTests/platform/linux/compositing/geometry/clipping-foreground-expected.png index 7793949..4a88862 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/compositing/geometry/clipping-foreground-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/compositing/geometry/clipping-foreground-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/compositing/gestures/gesture-tapHighlight-with-box-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/linux/compositing/gestures/gesture-tapHighlight-with-box-shadow-expected.png index aba98e5..95a87ac 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/compositing/gestures/gesture-tapHighlight-with-box-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/compositing/gestures/gesture-tapHighlight-with-box-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/compositing/iframes/composited-iframe-alignment-expected.png b/third_party/WebKit/LayoutTests/platform/linux/compositing/iframes/composited-iframe-alignment-expected.png index 472e8c1..313d91d 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/compositing/iframes/composited-iframe-alignment-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/compositing/iframes/composited-iframe-alignment-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/compositing/masks/masked-ancestor-expected.png b/third_party/WebKit/LayoutTests/platform/linux/compositing/masks/masked-ancestor-expected.png index 788c843..ce2c0e82 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/compositing/masks/masked-ancestor-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/compositing/masks/masked-ancestor-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/compositing/shadows/shadow-drawing-expected.png b/third_party/WebKit/LayoutTests/platform/linux/compositing/shadows/shadow-drawing-expected.png index e1e91d4..1b746c7 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/compositing/shadows/shadow-drawing-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/compositing/shadows/shadow-drawing-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/borders/border-radius-mask-canvas-with-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/borders/border-radius-mask-canvas-with-shadow-expected.png index 4d21886..9e2ab0ac 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/borders/border-radius-mask-canvas-with-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/borders/border-radius-mask-canvas-with-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/borders/border-radius-mask-video-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/borders/border-radius-mask-video-shadow-expected.png index d2e51ae..bdd2569 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/borders/border-radius-mask-video-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/borders/border-radius-mask-video-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/borders/border-radius-split-inline-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/borders/border-radius-split-inline-expected.png index 406e0a8..4b6f67e 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/borders/border-radius-split-inline-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/borders/border-radius-split-inline-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/box-shadow/basic-shadows-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/box-shadow/basic-shadows-expected.png index 87e25a1..8e3cc85a 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/box-shadow/basic-shadows-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/box-shadow/basic-shadows-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/box-shadow/box-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/box-shadow/box-shadow-expected.png index cccdb7f..443c124 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/box-shadow/box-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/box-shadow/box-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/box-shadow/box-shadow-transformed-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/box-shadow/box-shadow-transformed-expected.png index 1801dadf..070d8fa0 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/box-shadow/box-shadow-transformed-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/box-shadow/box-shadow-transformed-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/box-shadow/inset-box-shadow-radius-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/box-shadow/inset-box-shadow-radius-expected.png index 0c69f85..4beed5fa 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/box-shadow/inset-box-shadow-radius-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/box-shadow/inset-box-shadow-radius-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/box-shadow/inset-box-shadows-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/box-shadow/inset-box-shadows-expected.png index c979a34..1f611b8 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/box-shadow/inset-box-shadows-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/box-shadow/inset-box-shadows-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/box-shadow/inset-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/box-shadow/inset-expected.png index 1a9c561..13fd9e7 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/box-shadow/inset-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/box-shadow/inset-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/box-shadow/inset-subpixel-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/box-shadow/inset-subpixel-expected.png index 39203b6..9199a49 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/box-shadow/inset-subpixel-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/box-shadow/inset-subpixel-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/canvas/canvas-composite-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/canvas/canvas-composite-shadow-expected.png index 081c8b6..ee46464 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/canvas/canvas-composite-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/canvas/canvas-composite-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/canvas/canvas-incremental-repaint-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/canvas/canvas-incremental-repaint-expected.png index 2da0067e..5532050 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/canvas/canvas-incremental-repaint-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/canvas/canvas-incremental-repaint-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/css/color-correction-on-box-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/css/color-correction-on-box-shadow-expected.png index 74e626e..9a833997 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/css/color-correction-on-box-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/css/color-correction-on-box-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/css/color-correction-on-text-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/css/color-correction-on-text-shadow-expected.png index f68b9d87..8a10ee0 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/css/color-correction-on-text-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/css/color-correction-on-text-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/css/shadow-multiple-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/css/shadow-multiple-expected.png index 9418e4a4..9d09dcb52c 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/css/shadow-multiple-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/css/shadow-multiple-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/dom/HTMLMeterElement/meter-styles-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/dom/HTMLMeterElement/meter-styles-expected.png index 802c1330..ca938ae 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/dom/HTMLMeterElement/meter-styles-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/dom/HTMLMeterElement/meter-styles-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/calendar-picker-appearance-ar-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/calendar-picker-appearance-ar-expected.png index 44a5ca6f..5cafdbb 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/calendar-picker-appearance-ar-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/calendar-picker-appearance-ar-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/calendar-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/calendar-picker-appearance-expected.png index 95d0786..2197e82 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/calendar-picker-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/calendar-picker-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/calendar-picker-appearance-minimum-date-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/calendar-picker-appearance-minimum-date-expected.png index 4479c049..1f54172 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/calendar-picker-appearance-minimum-date-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/calendar-picker-appearance-minimum-date-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/calendar-picker-appearance-required-ar-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/calendar-picker-appearance-required-ar-expected.png index 1af304a4..fcc0c2f 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/calendar-picker-appearance-required-ar-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/calendar-picker-appearance-required-ar-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/calendar-picker-appearance-required-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/calendar-picker-appearance-required-expected.png index 701fec3..f23c7b58 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/calendar-picker-appearance-required-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/calendar-picker-appearance-required-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/calendar-picker-appearance-ru-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/calendar-picker-appearance-ru-expected.png index 5e67fd3..2d441f0d 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/calendar-picker-appearance-ru-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/calendar-picker-appearance-ru-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/calendar-picker-appearance-step-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/calendar-picker-appearance-step-expected.png index 7ac8c654..fb268524 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/calendar-picker-appearance-step-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/calendar-picker-appearance-step-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/calendar-picker-appearance-zoom125-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/calendar-picker-appearance-zoom125-expected.png index 9bde6d0..8b7c13b 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/calendar-picker-appearance-zoom125-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/calendar-picker-appearance-zoom125-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/calendar-picker-appearance-zoom200-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/calendar-picker-appearance-zoom200-expected.png index 5cdebf4..0840041 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/calendar-picker-appearance-zoom200-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/calendar-picker-appearance-zoom200-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/month-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/month-picker-appearance-expected.png index 3cae0ef..354c5811 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/month-picker-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/month-picker-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/month-picker-appearance-step-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/month-picker-appearance-step-expected.png index 74d65da..9475382 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/month-picker-appearance-step-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/month-picker-appearance-step-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/week-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/week-picker-appearance-expected.png index 699e8ef..55d4fd16 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/week-picker-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/week-picker-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/week-picker-appearance-step-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/week-picker-appearance-step-expected.png index 53acbef..191148d 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/week-picker-appearance-step-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/week-picker-appearance-step-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/checkbox/checkbox-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/checkbox/checkbox-appearance-basic-expected.png index 9b620d1..076c06a0 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/checkbox/checkbox-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/checkbox/checkbox-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/color/color-suggestion-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/color/color-suggestion-picker-appearance-expected.png index 533e1c4d..27f93a02 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/color/color-suggestion-picker-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/color/color-suggestion-picker-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/color/color-suggestion-picker-appearance-zoom125-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/color/color-suggestion-picker-appearance-zoom125-expected.png index 242a21e..5fc2c773 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/color/color-suggestion-picker-appearance-zoom125-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/color/color-suggestion-picker-appearance-zoom125-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/color/color-suggestion-picker-appearance-zoom200-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/color/color-suggestion-picker-appearance-zoom200-expected.png index 95a7b3c7..2c38100 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/color/color-suggestion-picker-appearance-zoom200-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/color/color-suggestion-picker-appearance-zoom200-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/color/color-suggestion-picker-one-row-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/color/color-suggestion-picker-one-row-appearance-expected.png index 3f4d256..33b29812 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/color/color-suggestion-picker-one-row-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/color/color-suggestion-picker-one-row-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/color/color-suggestion-picker-two-row-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/color/color-suggestion-picker-two-row-appearance-expected.png index e0826830..da67ab2 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/color/color-suggestion-picker-two-row-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/color/color-suggestion-picker-two-row-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/color/color-suggestion-picker-with-scrollbar-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/color/color-suggestion-picker-with-scrollbar-appearance-expected.png index 79dd632..b479a975 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/color/color-suggestion-picker-with-scrollbar-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/color/color-suggestion-picker-with-scrollbar-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/radio/radio-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/radio/radio-appearance-basic-expected.png index 50295ea..2b87326 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/radio/radio-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/radio/radio-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/range/range-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/range/range-appearance-basic-expected.png index b61ca39..642bb7bc 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/range/range-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/range/range-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/search/search-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/search/search-appearance-basic-expected.png index 557ea92..1995589d 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/search/search-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/search/search-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/select/listbox-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/select/listbox-appearance-basic-expected.png index 8194a41c..de027a3a 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/select/listbox-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/select/listbox-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/select/menulist-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/select/menulist-appearance-basic-expected.png index ee40466..a388aa2 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/select/menulist-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/select/menulist-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/submit/submit-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/submit/submit-appearance-basic-expected.png index bbe0323dc..3dbf1ba 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/submit/submit-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/submit/submit-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/text/text-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/text/text-appearance-basic-expected.png index e09a550..016611d 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/text/text-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/text/text-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/textarea/textarea-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/textarea/textarea-appearance-basic-expected.png index 9f010af..9a3e2c56 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/forms/textarea/textarea-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/forms/textarea/textarea-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/shadow-multiple-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/shadow-multiple-expected.png index 1e910b9..3cd0696e 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/shadow-multiple-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/repaint/shadow-multiple-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/text/shadow-translucent-fill-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/text/shadow-translucent-fill-expected.png index 11c56ef7..c557021 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/text/shadow-translucent-fill-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/text/shadow-translucent-fill-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/text/stroking-decorations-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/text/stroking-decorations-expected.png index 206b9267..7e4cb50b 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/text/stroking-decorations-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/text/stroking-decorations-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/text/stroking-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/text/stroking-expected.png index 5773013c..dced0ffd 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/text/stroking-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/text/stroking-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/transforms/shadows-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/transforms/shadows-expected.png index 8791d95..ca38354 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/transforms/shadows-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/transforms/shadows-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/writing-mode/english-lr-text-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/writing-mode/english-lr-text-expected.png index debcdde41..db30fdc 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/writing-mode/english-lr-text-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/writing-mode/english-lr-text-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/ietestcenter/css3/text/textshadow-001-expected.png b/third_party/WebKit/LayoutTests/platform/linux/ietestcenter/css3/text/textshadow-001-expected.png index 3da9c97e..a8eb36e 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/ietestcenter/css3/text/textshadow-001-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/ietestcenter/css3/text/textshadow-001-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/ietestcenter/css3/text/textshadow-002-expected.png b/third_party/WebKit/LayoutTests/platform/linux/ietestcenter/css3/text/textshadow-002-expected.png index 5b5d0ed3..a5aa8f6 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/ietestcenter/css3/text/textshadow-002-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/ietestcenter/css3/text/textshadow-002-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/ietestcenter/css3/text/textshadow-003-expected.png b/third_party/WebKit/LayoutTests/platform/linux/ietestcenter/css3/text/textshadow-003-expected.png index b7004cf..10a4cc6 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/ietestcenter/css3/text/textshadow-003-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/ietestcenter/css3/text/textshadow-003-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/ietestcenter/css3/text/textshadow-004-expected.png b/third_party/WebKit/LayoutTests/platform/linux/ietestcenter/css3/text/textshadow-004-expected.png index 51abafe..c3b29d4 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/ietestcenter/css3/text/textshadow-004-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/ietestcenter/css3/text/textshadow-004-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/ietestcenter/css3/text/textshadow-010-expected.png b/third_party/WebKit/LayoutTests/platform/linux/ietestcenter/css3/text/textshadow-010-expected.png index 94d1da84..1674291 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/ietestcenter/css3/text/textshadow-010-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/ietestcenter/css3/text/textshadow-010-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/paint/roundedrects/circle-with-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/linux/paint/roundedrects/circle-with-shadow-expected.png index 12b81e9..ca70c05 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/paint/roundedrects/circle-with-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/paint/roundedrects/circle-with-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/css/text-gradient-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/css/text-gradient-shadow-expected.png index 4bbb039..e4970a4e 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/css/text-gradient-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/svg/css/text-gradient-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/css/text-shadow-multiple-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/css/text-shadow-multiple-expected.png index c661a9dd2..9a44e1d 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/css/text-shadow-multiple-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/svg/css/text-shadow-multiple-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/svg/custom/repaint-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/linux/svg/custom/repaint-shadow-expected.png index 21ba2be..23c5cffe 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/svg/custom/repaint-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/svg/custom/repaint-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/display_list_2d_canvas/fast/canvas/canvas-composite-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/linux/virtual/display_list_2d_canvas/fast/canvas/canvas-composite-shadow-expected.png index 081c8b6..ee46464 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/display_list_2d_canvas/fast/canvas/canvas-composite-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/display_list_2d_canvas/fast/canvas/canvas-composite-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/display_list_2d_canvas/fast/canvas/canvas-incremental-repaint-expected.png b/third_party/WebKit/LayoutTests/platform/linux/virtual/display_list_2d_canvas/fast/canvas/canvas-incremental-repaint-expected.png index 2da0067e..5532050 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/display_list_2d_canvas/fast/canvas/canvas-incremental-repaint-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/display_list_2d_canvas/fast/canvas/canvas-incremental-repaint-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/gpu/fast/canvas/canvas-composite-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/linux/virtual/gpu/fast/canvas/canvas-composite-shadow-expected.png index 042d80e..c7996d9 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/gpu/fast/canvas/canvas-composite-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/gpu/fast/canvas/canvas-composite-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/gpu/fast/canvas/canvas-incremental-repaint-expected.png b/third_party/WebKit/LayoutTests/platform/linux/virtual/gpu/fast/canvas/canvas-incremental-repaint-expected.png index 2252cfe..c9907e03 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/gpu/fast/canvas/canvas-incremental-repaint-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/gpu/fast/canvas/canvas-incremental-repaint-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/gpu/fast/canvas/canvas-shadow-source-in-expected.png b/third_party/WebKit/LayoutTests/platform/linux/virtual/gpu/fast/canvas/canvas-shadow-source-in-expected.png index 9959f0c..fcac6ee 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/gpu/fast/canvas/canvas-shadow-source-in-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/gpu/fast/canvas/canvas-shadow-source-in-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-lion/compositing/shadows/shadow-drawing-expected.png b/third_party/WebKit/LayoutTests/platform/mac-lion/compositing/shadows/shadow-drawing-expected.png index 2196f775..ac704ed 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-lion/compositing/shadows/shadow-drawing-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-lion/compositing/shadows/shadow-drawing-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-lion/fast/box-shadow/basic-shadows-expected.png b/third_party/WebKit/LayoutTests/platform/mac-lion/fast/box-shadow/basic-shadows-expected.png index 1382e80..fbd99b5 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-lion/fast/box-shadow/basic-shadows-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-lion/fast/box-shadow/basic-shadows-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-lion/fast/css/color-correction-on-text-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/mac-lion/fast/css/color-correction-on-text-shadow-expected.png index 7185b89..3d957e7 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-lion/fast/css/color-correction-on-text-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-lion/fast/css/color-correction-on-text-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-lion/fast/css/shadow-multiple-expected.png b/third_party/WebKit/LayoutTests/platform/mac-lion/fast/css/shadow-multiple-expected.png index f54479e..4454b4d 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-lion/fast/css/shadow-multiple-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-lion/fast/css/shadow-multiple-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/calendar-picker/calendar-picker-appearance-ar-expected.png b/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/calendar-picker/calendar-picker-appearance-ar-expected.png index 39e539fd7..45bf9bd 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/calendar-picker/calendar-picker-appearance-ar-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/calendar-picker/calendar-picker-appearance-ar-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/calendar-picker/calendar-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/calendar-picker/calendar-picker-appearance-expected.png index 5653d6b..d132c0a 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/calendar-picker/calendar-picker-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/calendar-picker/calendar-picker-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/calendar-picker/calendar-picker-appearance-minimum-date-expected.png b/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/calendar-picker/calendar-picker-appearance-minimum-date-expected.png index 4391254e..19289c7 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/calendar-picker/calendar-picker-appearance-minimum-date-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/calendar-picker/calendar-picker-appearance-minimum-date-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/calendar-picker/calendar-picker-appearance-required-ar-expected.png b/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/calendar-picker/calendar-picker-appearance-required-ar-expected.png index d8d1a84..a4d06d8 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/calendar-picker/calendar-picker-appearance-required-ar-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/calendar-picker/calendar-picker-appearance-required-ar-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/calendar-picker/calendar-picker-appearance-required-expected.png b/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/calendar-picker/calendar-picker-appearance-required-expected.png index 85533d6..832090c 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/calendar-picker/calendar-picker-appearance-required-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/calendar-picker/calendar-picker-appearance-required-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/calendar-picker/calendar-picker-appearance-ru-expected.png b/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/calendar-picker/calendar-picker-appearance-ru-expected.png index d68b5b8..06c7c4ac 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/calendar-picker/calendar-picker-appearance-ru-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/calendar-picker/calendar-picker-appearance-ru-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/calendar-picker/calendar-picker-appearance-step-expected.png b/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/calendar-picker/calendar-picker-appearance-step-expected.png index e36ae13..837e744 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/calendar-picker/calendar-picker-appearance-step-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/calendar-picker/calendar-picker-appearance-step-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/calendar-picker/calendar-picker-appearance-zoom125-expected.png b/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/calendar-picker/calendar-picker-appearance-zoom125-expected.png index 46fd9be..ac25c53 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/calendar-picker/calendar-picker-appearance-zoom125-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/calendar-picker/calendar-picker-appearance-zoom125-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/calendar-picker/calendar-picker-appearance-zoom200-expected.png b/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/calendar-picker/calendar-picker-appearance-zoom200-expected.png index 4796e2d..51ce71ea 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/calendar-picker/calendar-picker-appearance-zoom200-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/calendar-picker/calendar-picker-appearance-zoom200-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/calendar-picker/month-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/calendar-picker/month-picker-appearance-expected.png index d70826c..2379bba3 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/calendar-picker/month-picker-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/calendar-picker/month-picker-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/calendar-picker/month-picker-appearance-step-expected.png b/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/calendar-picker/month-picker-appearance-step-expected.png index dfe11fa..5b84523b 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/calendar-picker/month-picker-appearance-step-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/calendar-picker/month-picker-appearance-step-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/calendar-picker/week-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/calendar-picker/week-picker-appearance-expected.png index c3959e1..566fa88 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/calendar-picker/week-picker-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/calendar-picker/week-picker-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/calendar-picker/week-picker-appearance-step-expected.png b/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/calendar-picker/week-picker-appearance-step-expected.png index d3ac266..da9aa3b 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/calendar-picker/week-picker-appearance-step-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/calendar-picker/week-picker-appearance-step-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/checkbox/checkbox-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/checkbox/checkbox-appearance-basic-expected.png index 525d3eb..c9aa133 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/checkbox/checkbox-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/checkbox/checkbox-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/color/color-suggestion-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/color/color-suggestion-picker-appearance-expected.png index 9606a4c..5addab9 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/color/color-suggestion-picker-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/color/color-suggestion-picker-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/color/color-suggestion-picker-one-row-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/color/color-suggestion-picker-one-row-appearance-expected.png index 953e70ea..1848abf0 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/color/color-suggestion-picker-one-row-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/color/color-suggestion-picker-one-row-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/color/color-suggestion-picker-two-row-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/color/color-suggestion-picker-two-row-appearance-expected.png index e2f5a2ab..bb9df56 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/color/color-suggestion-picker-two-row-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/color/color-suggestion-picker-two-row-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/color/color-suggestion-picker-with-scrollbar-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/color/color-suggestion-picker-with-scrollbar-appearance-expected.png index 3cee443..0250b965 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/color/color-suggestion-picker-with-scrollbar-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/color/color-suggestion-picker-with-scrollbar-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/input-appearance-height-expected.png b/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/input-appearance-height-expected.png index ccf4d09..988f4276 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/input-appearance-height-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/input-appearance-height-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/radio/radio-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/radio/radio-appearance-basic-expected.png index 1900a6f5..71b5cc50 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/radio/radio-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/radio/radio-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/search/search-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/search/search-appearance-basic-expected.png index 9e1e1fd..dddd965 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/search/search-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/search/search-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/select/listbox-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/select/listbox-appearance-basic-expected.png index 89cac62..886a3689 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/select/listbox-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/select/listbox-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/select/menulist-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/select/menulist-appearance-basic-expected.png index 17b30ae..af6fed9 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/select/menulist-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/select/menulist-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/submit/submit-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/submit/submit-appearance-basic-expected.png index b999377..838a5d2 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/submit/submit-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/submit/submit-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/text/text-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/text/text-appearance-basic-expected.png index 6e521f8a..75d88d8 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/text/text-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-lion/fast/forms/text/text-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-lion/fast/repaint/shadow-multiple-expected.png b/third_party/WebKit/LayoutTests/platform/mac-lion/fast/repaint/shadow-multiple-expected.png index ac04001..fd893aa 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-lion/fast/repaint/shadow-multiple-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-lion/fast/repaint/shadow-multiple-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-lion/fast/text/shadow-translucent-fill-expected.png b/third_party/WebKit/LayoutTests/platform/mac-lion/fast/text/shadow-translucent-fill-expected.png index 9e450b5..f3f28ec 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-lion/fast/text/shadow-translucent-fill-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-lion/fast/text/shadow-translucent-fill-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-lion/fast/text/stroking-decorations-expected.png b/third_party/WebKit/LayoutTests/platform/mac-lion/fast/text/stroking-decorations-expected.png index e4c94fe..e6c4b9a1 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-lion/fast/text/stroking-decorations-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-lion/fast/text/stroking-decorations-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-lion/fast/text/stroking-expected.png b/third_party/WebKit/LayoutTests/platform/mac-lion/fast/text/stroking-expected.png index 5de917c..ba0be40 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-lion/fast/text/stroking-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-lion/fast/text/stroking-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-lion/fast/text/whitespace/tab-character-basics-expected.png b/third_party/WebKit/LayoutTests/platform/mac-lion/fast/text/whitespace/tab-character-basics-expected.png index ea96119..797bd63 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-lion/fast/text/whitespace/tab-character-basics-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-lion/fast/text/whitespace/tab-character-basics-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-lion/fast/transforms/shadows-expected.png b/third_party/WebKit/LayoutTests/platform/mac-lion/fast/transforms/shadows-expected.png index a2345f1..832de4f 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-lion/fast/transforms/shadows-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-lion/fast/transforms/shadows-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-lion/fast/writing-mode/english-lr-text-expected.png b/third_party/WebKit/LayoutTests/platform/mac-lion/fast/writing-mode/english-lr-text-expected.png index 48ab939..47cc4a4 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-lion/fast/writing-mode/english-lr-text-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-lion/fast/writing-mode/english-lr-text-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-lion/ietestcenter/css3/text/textshadow-001-expected.png b/third_party/WebKit/LayoutTests/platform/mac-lion/ietestcenter/css3/text/textshadow-001-expected.png index d4f5d42b..6d0a170a 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-lion/ietestcenter/css3/text/textshadow-001-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-lion/ietestcenter/css3/text/textshadow-001-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-lion/ietestcenter/css3/text/textshadow-002-expected.png b/third_party/WebKit/LayoutTests/platform/mac-lion/ietestcenter/css3/text/textshadow-002-expected.png index 0b0b8a4..8a9d012 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-lion/ietestcenter/css3/text/textshadow-002-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-lion/ietestcenter/css3/text/textshadow-002-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-lion/ietestcenter/css3/text/textshadow-003-expected.png b/third_party/WebKit/LayoutTests/platform/mac-lion/ietestcenter/css3/text/textshadow-003-expected.png index 9e9c1ad9..b08c3448 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-lion/ietestcenter/css3/text/textshadow-003-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-lion/ietestcenter/css3/text/textshadow-003-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-lion/ietestcenter/css3/text/textshadow-004-expected.png b/third_party/WebKit/LayoutTests/platform/mac-lion/ietestcenter/css3/text/textshadow-004-expected.png index ac43bfd..cd49f4e 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-lion/ietestcenter/css3/text/textshadow-004-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-lion/ietestcenter/css3/text/textshadow-004-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-lion/ietestcenter/css3/text/textshadow-010-expected.png b/third_party/WebKit/LayoutTests/platform/mac-lion/ietestcenter/css3/text/textshadow-010-expected.png index 01d9a7c..0ca89de 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-lion/ietestcenter/css3/text/textshadow-010-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-lion/ietestcenter/css3/text/textshadow-010-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-lion/svg/css/text-gradient-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/mac-lion/svg/css/text-gradient-shadow-expected.png index 9721365..cca7ea9d 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-lion/svg/css/text-gradient-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-lion/svg/css/text-gradient-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-lion/svg/css/text-shadow-multiple-expected.png b/third_party/WebKit/LayoutTests/platform/mac-lion/svg/css/text-shadow-multiple-expected.png index fb9ae3e8..6638ca9 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-lion/svg/css/text-shadow-multiple-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-lion/svg/css/text-shadow-multiple-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-lion/svg/custom/repaint-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/mac-lion/svg/custom/repaint-shadow-expected.png index 21ba2be..23c5cffe 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-lion/svg/custom/repaint-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-lion/svg/custom/repaint-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/box-shadow/basic-shadows-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/box-shadow/basic-shadows-expected.png index 24a5ee5..fe7fa27 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/box-shadow/basic-shadows-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/box-shadow/basic-shadows-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/css/shadow-multiple-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/css/shadow-multiple-expected.png index b87cbad..ffacec9 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/css/shadow-multiple-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/css/shadow-multiple-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/calendar-picker/calendar-picker-appearance-ar-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/calendar-picker/calendar-picker-appearance-ar-expected.png index a7ec163c..48c013b 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/calendar-picker/calendar-picker-appearance-ar-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/calendar-picker/calendar-picker-appearance-ar-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/calendar-picker/calendar-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/calendar-picker/calendar-picker-appearance-expected.png index 2ae680c..5a83912 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/calendar-picker/calendar-picker-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/calendar-picker/calendar-picker-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/calendar-picker/calendar-picker-appearance-minimum-date-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/calendar-picker/calendar-picker-appearance-minimum-date-expected.png index 51632d6..96643b6 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/calendar-picker/calendar-picker-appearance-minimum-date-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/calendar-picker/calendar-picker-appearance-minimum-date-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/calendar-picker/calendar-picker-appearance-required-ar-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/calendar-picker/calendar-picker-appearance-required-ar-expected.png index 23947d4..aa673444 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/calendar-picker/calendar-picker-appearance-required-ar-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/calendar-picker/calendar-picker-appearance-required-ar-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/calendar-picker/calendar-picker-appearance-required-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/calendar-picker/calendar-picker-appearance-required-expected.png index 56791568..90d8ae9 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/calendar-picker/calendar-picker-appearance-required-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/calendar-picker/calendar-picker-appearance-required-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/calendar-picker/calendar-picker-appearance-ru-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/calendar-picker/calendar-picker-appearance-ru-expected.png index 28d1c27..780556c 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/calendar-picker/calendar-picker-appearance-ru-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/calendar-picker/calendar-picker-appearance-ru-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/calendar-picker/calendar-picker-appearance-step-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/calendar-picker/calendar-picker-appearance-step-expected.png index 6e4954e..c8f262f 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/calendar-picker/calendar-picker-appearance-step-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/calendar-picker/calendar-picker-appearance-step-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/calendar-picker/calendar-picker-appearance-zoom125-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/calendar-picker/calendar-picker-appearance-zoom125-expected.png index cfb8649..40896ab3 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/calendar-picker/calendar-picker-appearance-zoom125-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/calendar-picker/calendar-picker-appearance-zoom125-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/calendar-picker/calendar-picker-appearance-zoom200-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/calendar-picker/calendar-picker-appearance-zoom200-expected.png index ebc968d..c7c4717 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/calendar-picker/calendar-picker-appearance-zoom200-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/calendar-picker/calendar-picker-appearance-zoom200-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/calendar-picker/month-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/calendar-picker/month-picker-appearance-expected.png index fc8f585..de2f1de 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/calendar-picker/month-picker-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/calendar-picker/month-picker-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/calendar-picker/month-picker-appearance-step-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/calendar-picker/month-picker-appearance-step-expected.png index 22f5847..82adc5b 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/calendar-picker/month-picker-appearance-step-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/calendar-picker/month-picker-appearance-step-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/calendar-picker/week-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/calendar-picker/week-picker-appearance-expected.png index f01ffee..f3dd6ff 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/calendar-picker/week-picker-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/calendar-picker/week-picker-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/calendar-picker/week-picker-appearance-step-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/calendar-picker/week-picker-appearance-step-expected.png index e2f1d849..94e2197 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/calendar-picker/week-picker-appearance-step-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/calendar-picker/week-picker-appearance-step-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/checkbox/checkbox-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/checkbox/checkbox-appearance-basic-expected.png index c250bab..a567f5e 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/checkbox/checkbox-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/checkbox/checkbox-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/color/color-suggestion-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/color/color-suggestion-picker-appearance-expected.png index 6cfeda1..26b9a3f 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/color/color-suggestion-picker-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/color/color-suggestion-picker-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/color/color-suggestion-picker-appearance-zoom125-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/color/color-suggestion-picker-appearance-zoom125-expected.png index 5ad1a7e..4a5499b 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/color/color-suggestion-picker-appearance-zoom125-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/color/color-suggestion-picker-appearance-zoom125-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/color/color-suggestion-picker-appearance-zoom200-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/color/color-suggestion-picker-appearance-zoom200-expected.png index 331c2d0..741b0b44 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/color/color-suggestion-picker-appearance-zoom200-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/color/color-suggestion-picker-appearance-zoom200-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/color/color-suggestion-picker-one-row-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/color/color-suggestion-picker-one-row-appearance-expected.png index 0ce022ea..e323c0b 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/color/color-suggestion-picker-one-row-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/color/color-suggestion-picker-one-row-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/color/color-suggestion-picker-two-row-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/color/color-suggestion-picker-two-row-appearance-expected.png index 26c29e1..5c07d61f 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/color/color-suggestion-picker-two-row-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/color/color-suggestion-picker-two-row-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/color/color-suggestion-picker-with-scrollbar-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/color/color-suggestion-picker-with-scrollbar-appearance-expected.png index 4460499..c9a769ca 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/color/color-suggestion-picker-with-scrollbar-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/color/color-suggestion-picker-with-scrollbar-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/input-appearance-height-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/input-appearance-height-expected.png index c5cb912..cf51d73 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/input-appearance-height-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/input-appearance-height-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/radio/radio-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/radio/radio-appearance-basic-expected.png index c445536c..9054dde 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/radio/radio-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/radio/radio-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/search/search-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/search/search-appearance-basic-expected.png index 0f8773f..89dcbbb 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/search/search-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/search/search-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/select/listbox-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/select/listbox-appearance-basic-expected.png index 8a11411..0afab72 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/select/listbox-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/select/listbox-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/select/menulist-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/select/menulist-appearance-basic-expected.png index dfeca3a..8d19a7c 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/select/menulist-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/select/menulist-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/submit/submit-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/submit/submit-appearance-basic-expected.png index f801e37f..d06fef0 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/submit/submit-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/submit/submit-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/text/text-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/text/text-appearance-basic-expected.png index 69dd2fe..644f1c7 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/text/text-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/text/text-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/textarea/textarea-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/textarea/textarea-appearance-basic-expected.png index eafaef1..b1d85e5 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/textarea/textarea-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mavericks/fast/forms/textarea/textarea-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mountainlion/fast/forms/calendar-picker/calendar-picker-appearance-ar-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mountainlion/fast/forms/calendar-picker/calendar-picker-appearance-ar-expected.png index 1bd5f24a..8e15217 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mountainlion/fast/forms/calendar-picker/calendar-picker-appearance-ar-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mountainlion/fast/forms/calendar-picker/calendar-picker-appearance-ar-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mountainlion/fast/forms/calendar-picker/calendar-picker-appearance-required-ar-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mountainlion/fast/forms/calendar-picker/calendar-picker-appearance-required-ar-expected.png index 4b4e3b3..61a396d1 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mountainlion/fast/forms/calendar-picker/calendar-picker-appearance-required-ar-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mountainlion/fast/forms/calendar-picker/calendar-picker-appearance-required-ar-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mountainlion/fast/forms/color/color-suggestion-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mountainlion/fast/forms/color/color-suggestion-picker-appearance-expected.png index 7d6f70a..be415af 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mountainlion/fast/forms/color/color-suggestion-picker-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mountainlion/fast/forms/color/color-suggestion-picker-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mountainlion/fast/forms/color/color-suggestion-picker-one-row-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mountainlion/fast/forms/color/color-suggestion-picker-one-row-appearance-expected.png index 09f8022..868a66d 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mountainlion/fast/forms/color/color-suggestion-picker-one-row-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mountainlion/fast/forms/color/color-suggestion-picker-one-row-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mountainlion/fast/forms/color/color-suggestion-picker-two-row-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mountainlion/fast/forms/color/color-suggestion-picker-two-row-appearance-expected.png index 4039c79..96f05aa2 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mountainlion/fast/forms/color/color-suggestion-picker-two-row-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mountainlion/fast/forms/color/color-suggestion-picker-two-row-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mountainlion/fast/forms/color/color-suggestion-picker-with-scrollbar-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mountainlion/fast/forms/color/color-suggestion-picker-with-scrollbar-appearance-expected.png index e0fa627..e4ddf3e 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mountainlion/fast/forms/color/color-suggestion-picker-with-scrollbar-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mountainlion/fast/forms/color/color-suggestion-picker-with-scrollbar-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/box-shadow/basic-shadows-expected.png b/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/box-shadow/basic-shadows-expected.png index 28e7842..3e10dce 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/box-shadow/basic-shadows-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/box-shadow/basic-shadows-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/css/shadow-multiple-expected.png b/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/css/shadow-multiple-expected.png index 49b7864..a2d1e294 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/css/shadow-multiple-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/css/shadow-multiple-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/calendar-picker/calendar-picker-appearance-ar-expected.png b/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/calendar-picker/calendar-picker-appearance-ar-expected.png index 73835d0..67774466 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/calendar-picker/calendar-picker-appearance-ar-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/calendar-picker/calendar-picker-appearance-ar-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/calendar-picker/calendar-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/calendar-picker/calendar-picker-appearance-expected.png index 9f479b3..b3b30e25 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/calendar-picker/calendar-picker-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/calendar-picker/calendar-picker-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/calendar-picker/calendar-picker-appearance-minimum-date-expected.png b/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/calendar-picker/calendar-picker-appearance-minimum-date-expected.png index 825b96b..65f3d536 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/calendar-picker/calendar-picker-appearance-minimum-date-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/calendar-picker/calendar-picker-appearance-minimum-date-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/calendar-picker/calendar-picker-appearance-required-ar-expected.png b/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/calendar-picker/calendar-picker-appearance-required-ar-expected.png index 9d25818..438c3499 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/calendar-picker/calendar-picker-appearance-required-ar-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/calendar-picker/calendar-picker-appearance-required-ar-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/calendar-picker/calendar-picker-appearance-required-expected.png b/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/calendar-picker/calendar-picker-appearance-required-expected.png index 522ddaf..3c7a15b7 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/calendar-picker/calendar-picker-appearance-required-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/calendar-picker/calendar-picker-appearance-required-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/calendar-picker/calendar-picker-appearance-ru-expected.png b/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/calendar-picker/calendar-picker-appearance-ru-expected.png index f86904c..e9a206b 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/calendar-picker/calendar-picker-appearance-ru-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/calendar-picker/calendar-picker-appearance-ru-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/calendar-picker/calendar-picker-appearance-step-expected.png b/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/calendar-picker/calendar-picker-appearance-step-expected.png index 5ed861a..af4e93c2 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/calendar-picker/calendar-picker-appearance-step-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/calendar-picker/calendar-picker-appearance-step-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/calendar-picker/calendar-picker-appearance-zoom125-expected.png b/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/calendar-picker/calendar-picker-appearance-zoom125-expected.png index 2114d685..a7821db 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/calendar-picker/calendar-picker-appearance-zoom125-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/calendar-picker/calendar-picker-appearance-zoom125-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/calendar-picker/calendar-picker-appearance-zoom200-expected.png b/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/calendar-picker/calendar-picker-appearance-zoom200-expected.png index 253c331..db1965e 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/calendar-picker/calendar-picker-appearance-zoom200-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/calendar-picker/calendar-picker-appearance-zoom200-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/calendar-picker/month-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/calendar-picker/month-picker-appearance-expected.png index a917d24..36513bcb 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/calendar-picker/month-picker-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/calendar-picker/month-picker-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/calendar-picker/month-picker-appearance-step-expected.png b/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/calendar-picker/month-picker-appearance-step-expected.png index abae747..606521a 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/calendar-picker/month-picker-appearance-step-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/calendar-picker/month-picker-appearance-step-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/calendar-picker/week-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/calendar-picker/week-picker-appearance-expected.png index 7d571e4a..0bb50668 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/calendar-picker/week-picker-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/calendar-picker/week-picker-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/calendar-picker/week-picker-appearance-step-expected.png b/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/calendar-picker/week-picker-appearance-step-expected.png index 62055e99..db4c9f5 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/calendar-picker/week-picker-appearance-step-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/calendar-picker/week-picker-appearance-step-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/checkbox/checkbox-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/checkbox/checkbox-appearance-basic-expected.png index 25657b7..e4e1be1 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/checkbox/checkbox-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/checkbox/checkbox-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/color/color-suggestion-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/color/color-suggestion-picker-appearance-expected.png index 8899fba..45dde81 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/color/color-suggestion-picker-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/color/color-suggestion-picker-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/color/color-suggestion-picker-one-row-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/color/color-suggestion-picker-one-row-appearance-expected.png index bda1d27..8c644b7 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/color/color-suggestion-picker-one-row-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/color/color-suggestion-picker-one-row-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/color/color-suggestion-picker-two-row-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/color/color-suggestion-picker-two-row-appearance-expected.png index 82a6fd5..d08db91 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/color/color-suggestion-picker-two-row-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/color/color-suggestion-picker-two-row-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/color/color-suggestion-picker-with-scrollbar-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/color/color-suggestion-picker-with-scrollbar-appearance-expected.png index 2d8caf9..f79806a5 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/color/color-suggestion-picker-with-scrollbar-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/color/color-suggestion-picker-with-scrollbar-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/input-appearance-height-expected.png b/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/input-appearance-height-expected.png index 5133d59..d085f6b 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/input-appearance-height-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/input-appearance-height-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/radio/radio-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/radio/radio-appearance-basic-expected.png index 8f85857..f8755f3 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/radio/radio-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/radio/radio-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/search/search-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/search/search-appearance-basic-expected.png index cdbf0d85..d2cb102 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/search/search-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/search/search-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/select/listbox-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/select/listbox-appearance-basic-expected.png index b730ab7..2010f5b3 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/select/listbox-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/select/listbox-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/select/menulist-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/select/menulist-appearance-basic-expected.png index 76232d0c..e62f90cf 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/select/menulist-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/select/menulist-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/submit/submit-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/submit/submit-appearance-basic-expected.png index e76f820..defc686 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/submit/submit-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/submit/submit-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/text/text-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/text/text-appearance-basic-expected.png index caefb0ec..1b3312aa 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/text/text-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/forms/text/text-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/text/shadow-translucent-fill-expected.png b/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/text/shadow-translucent-fill-expected.png index 7f1d458f..c750e984 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/text/shadow-translucent-fill-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/text/shadow-translucent-fill-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/text/whitespace/tab-character-basics-expected.png b/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/text/whitespace/tab-character-basics-expected.png index 7b5f714c..a90796a 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/text/whitespace/tab-character-basics-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-snowleopard/fast/text/whitespace/tab-character-basics-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-snowleopard/ietestcenter/css3/text/textshadow-003-expected.png b/third_party/WebKit/LayoutTests/platform/mac-snowleopard/ietestcenter/css3/text/textshadow-003-expected.png index c30fbfa..90b9c30 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-snowleopard/ietestcenter/css3/text/textshadow-003-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-snowleopard/ietestcenter/css3/text/textshadow-003-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-snowleopard/ietestcenter/css3/text/textshadow-004-expected.png b/third_party/WebKit/LayoutTests/platform/mac-snowleopard/ietestcenter/css3/text/textshadow-004-expected.png index 35b02e3..e351377b 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-snowleopard/ietestcenter/css3/text/textshadow-004-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-snowleopard/ietestcenter/css3/text/textshadow-004-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/compositing/geometry/clipping-foreground-expected.png b/third_party/WebKit/LayoutTests/platform/mac/compositing/geometry/clipping-foreground-expected.png index b4ecca1..a4275c3b 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/compositing/geometry/clipping-foreground-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/compositing/geometry/clipping-foreground-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/compositing/iframes/composited-iframe-alignment-expected.png b/third_party/WebKit/LayoutTests/platform/mac/compositing/iframes/composited-iframe-alignment-expected.png index beebe39..933601ac 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/compositing/iframes/composited-iframe-alignment-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/compositing/iframes/composited-iframe-alignment-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/compositing/images/direct-pdf-image-expected.png b/third_party/WebKit/LayoutTests/platform/mac/compositing/images/direct-pdf-image-expected.png deleted file mode 100644 index e05cc79..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/compositing/images/direct-pdf-image-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/compositing/masks/masked-ancestor-expected.png b/third_party/WebKit/LayoutTests/platform/mac/compositing/masks/masked-ancestor-expected.png index bca8861e..916eeb8d 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/compositing/masks/masked-ancestor-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/compositing/masks/masked-ancestor-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/compositing/shadows/shadow-drawing-expected.png b/third_party/WebKit/LayoutTests/platform/mac/compositing/shadows/shadow-drawing-expected.png index b19c51bb..a400b374 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/compositing/shadows/shadow-drawing-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/compositing/shadows/shadow-drawing-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-mask-canvas-with-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-mask-canvas-with-shadow-expected.png index e13d1c3c..7ede3a8b 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-mask-canvas-with-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-mask-canvas-with-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-mask-video-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-mask-video-shadow-expected.png index fca45167..55f23d37 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-mask-video-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-mask-video-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-split-inline-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-split-inline-expected.png index 9914a2c..4f04469 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-split-inline-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-split-inline-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/basic-shadows-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/basic-shadows-expected.png index 31df05f8..cf1728b 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/basic-shadows-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/basic-shadows-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/box-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/box-shadow-expected.png index cf3038e..1d1d049 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/box-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/box-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/box-shadow-transformed-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/box-shadow-transformed-expected.png index c06e0219..9e41c63 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/box-shadow-transformed-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/box-shadow-transformed-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/inset-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/inset-expected.png index 06a7610..3387f96 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/inset-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/inset-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/inset-subpixel-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/inset-subpixel-expected.png index 3d9bf12..6faa863 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/inset-subpixel-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/box-shadow/inset-subpixel-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/canvas/canvas-composite-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/canvas/canvas-composite-shadow-expected.png index 0720e0c..21ce7a8 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/canvas/canvas-composite-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/canvas/canvas-composite-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/canvas/canvas-incremental-repaint-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/canvas/canvas-incremental-repaint-expected.png index aed138d..3661c657 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/canvas/canvas-incremental-repaint-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/canvas/canvas-incremental-repaint-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/css/color-correction-on-box-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/css/color-correction-on-box-shadow-expected.png index b86666f..ab81d471d0 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/css/color-correction-on-box-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/css/color-correction-on-box-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/css/color-correction-on-text-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/css/color-correction-on-text-shadow-expected.png index 37835e3..4714683 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/css/color-correction-on-text-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/css/color-correction-on-text-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/css/shadow-multiple-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/css/shadow-multiple-expected.png index 7c21bb7..4045dc3 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/css/shadow-multiple-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/css/shadow-multiple-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/dom/HTMLInputElement/input-slider-update-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/dom/HTMLInputElement/input-slider-update-expected.png index 6f87bcb..7e7e9cd4 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/dom/HTMLInputElement/input-slider-update-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/dom/HTMLInputElement/input-slider-update-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/dom/HTMLMeterElement/meter-styles-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/dom/HTMLMeterElement/meter-styles-expected.png index 29d1f4f..79c3b1e 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/dom/HTMLMeterElement/meter-styles-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/dom/HTMLMeterElement/meter-styles-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-ar-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-ar-expected.png index fa8bf66..66456c5 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-ar-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-ar-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-expected.png index 6813dbf..b9c3a55 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-minimum-date-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-minimum-date-expected.png index 5ba412ae..b31243a 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-minimum-date-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-minimum-date-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-required-ar-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-required-ar-expected.png index 02d4dd1..f678ff0 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-required-ar-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-required-ar-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-required-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-required-expected.png index 9d5883e..171028d4 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-required-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-required-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-ru-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-ru-expected.png index e15ab94..a5f09481 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-ru-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-ru-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-step-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-step-expected.png index 57b0b32..65cad2e 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-step-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-step-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-zoom125-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-zoom125-expected.png index 9ad8cd0..70856bc 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-zoom125-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-zoom125-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-zoom200-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-zoom200-expected.png index 1c54dced..8407367 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-zoom200-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-zoom200-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/month-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/month-picker-appearance-expected.png index 2854537..98a38286 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/month-picker-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/month-picker-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/month-picker-appearance-step-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/month-picker-appearance-step-expected.png index 8a7192b..35e92a3 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/month-picker-appearance-step-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/month-picker-appearance-step-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/week-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/week-picker-appearance-expected.png index 64fb12d2..f8f27f21 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/week-picker-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/week-picker-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/week-picker-appearance-step-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/week-picker-appearance-step-expected.png index 70b6ee08..99703fdd 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/week-picker-appearance-step-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/week-picker-appearance-step-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/checkbox/checkbox-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/checkbox/checkbox-appearance-basic-expected.png index b57b9c2..23d3469 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/checkbox/checkbox-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/checkbox/checkbox-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/color/color-suggestion-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/color/color-suggestion-picker-appearance-expected.png index 62370cf..2525a13 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/color/color-suggestion-picker-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/color/color-suggestion-picker-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/color/color-suggestion-picker-appearance-zoom125-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/color/color-suggestion-picker-appearance-zoom125-expected.png index 592c3bae..6e8a329 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/color/color-suggestion-picker-appearance-zoom125-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/color/color-suggestion-picker-appearance-zoom125-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/color/color-suggestion-picker-appearance-zoom200-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/color/color-suggestion-picker-appearance-zoom200-expected.png index 24efd68..851e4582 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/color/color-suggestion-picker-appearance-zoom200-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/color/color-suggestion-picker-appearance-zoom200-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/color/color-suggestion-picker-one-row-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/color/color-suggestion-picker-one-row-appearance-expected.png index 861b9dc..b26cff9d 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/color/color-suggestion-picker-one-row-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/color/color-suggestion-picker-one-row-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/color/color-suggestion-picker-two-row-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/color/color-suggestion-picker-two-row-appearance-expected.png index a83f4be..6a3784c 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/color/color-suggestion-picker-two-row-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/color/color-suggestion-picker-two-row-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/color/color-suggestion-picker-with-scrollbar-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/color/color-suggestion-picker-with-scrollbar-appearance-expected.png index ef196383..523d414 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/color/color-suggestion-picker-with-scrollbar-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/color/color-suggestion-picker-with-scrollbar-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/datalist/input-appearance-range-with-datalist-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/datalist/input-appearance-range-with-datalist-expected.png index 70acb54d..a04d2b9 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/datalist/input-appearance-range-with-datalist-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/datalist/input-appearance-range-with-datalist-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/datalist/input-appearance-range-with-datalist-zoomed-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/datalist/input-appearance-range-with-datalist-zoomed-expected.png index 66ceb3b9..d161adb 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/datalist/input-appearance-range-with-datalist-zoomed-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/datalist/input-appearance-range-with-datalist-zoomed-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/datalist/input-appearance-range-with-padding-with-datalist-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/datalist/input-appearance-range-with-padding-with-datalist-expected.png index fc3d074..0291ae5 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/datalist/input-appearance-range-with-padding-with-datalist-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/datalist/input-appearance-range-with-padding-with-datalist-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/datalist/input-appearance-range-with-transform-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/datalist/input-appearance-range-with-transform-expected.png index d05166b..a473192 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/datalist/input-appearance-range-with-transform-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/datalist/input-appearance-range-with-transform-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/input-appearance-height-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/input-appearance-height-expected.png index 2c54fd6..18bad50 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/input-appearance-height-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/input-appearance-height-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/radio/radio-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/radio/radio-appearance-basic-expected.png index f99ffa2..db0eb09 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/radio/radio-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/radio/radio-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/range/input-appearance-range-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/range/input-appearance-range-expected.png index bb1f6c07..b91ddbe 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/range/input-appearance-range-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/range/input-appearance-range-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/range/range-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/range/range-appearance-basic-expected.png index 8fcb7cec..d3153fd 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/range/range-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/range/range-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/range/range-focus-by-mouse-then-keydown-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/range/range-focus-by-mouse-then-keydown-expected.png index 1e2cd9a..f850aea 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/range/range-focus-by-mouse-then-keydown-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/range/range-focus-by-mouse-then-keydown-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/range/slider-padding-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/range/slider-padding-expected.png index b27759b..c6ae8fd 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/range/slider-padding-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/range/slider-padding-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/range/slider-thumb-shared-style-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/range/slider-thumb-shared-style-expected.png index 410ce729..cf19a56 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/range/slider-thumb-shared-style-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/range/slider-thumb-shared-style-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/range/thumbslider-no-parent-slider-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/range/thumbslider-no-parent-slider-expected.png index 18142b7..04fe7791 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/range/thumbslider-no-parent-slider-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/range/thumbslider-no-parent-slider-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/search/search-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/search/search-appearance-basic-expected.png index 72ad1db..2f92a0c0 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/search/search-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/search/search-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/select/listbox-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/select/listbox-appearance-basic-expected.png index 3a582bf..7957e0a5 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/select/listbox-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/select/listbox-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/select/menulist-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/select/menulist-appearance-basic-expected.png index 1ad8543..558816f 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/select/menulist-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/select/menulist-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/submit/submit-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/submit/submit-appearance-basic-expected.png index 9c3850bd..cceceaa 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/submit/submit-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/submit/submit-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/text/text-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/text/text-appearance-basic-expected.png index b4eac386..1d05919 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/text/text-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/text/text-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/textarea/textarea-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/textarea/textarea-appearance-basic-expected.png index 8dfd803..b8d467c 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/forms/textarea/textarea-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/forms/textarea/textarea-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/shadow-multiple-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/shadow-multiple-expected.png index 11d37bfd..278b33ad 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/shadow-multiple-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/shadow-multiple-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/slider-thumb-drag-release-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/slider-thumb-drag-release-expected.png index 6f87bcb..7e7e9cd4 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/slider-thumb-drag-release-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/repaint/slider-thumb-drag-release-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/text/shadow-translucent-fill-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/text/shadow-translucent-fill-expected.png index b062cc5..e765c7ec 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/text/shadow-translucent-fill-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/text/shadow-translucent-fill-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/text/stroking-decorations-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/text/stroking-decorations-expected.png index f2f71a48..382c5db 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/text/stroking-decorations-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/text/stroking-decorations-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/text/stroking-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/text/stroking-expected.png index 01e5e8bf..8761075 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/text/stroking-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/text/stroking-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/text/whitespace/tab-character-basics-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/text/whitespace/tab-character-basics-expected.png index 8f30297..1252c16 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/text/whitespace/tab-character-basics-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/text/whitespace/tab-character-basics-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/text/whitespace/tab-character-basics-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/text/whitespace/tab-character-basics-expected.txt index dd8e7f9..7aff2f3 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/text/whitespace/tab-character-basics-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/text/whitespace/tab-character-basics-expected.txt
@@ -53,8 +53,8 @@ LayoutBlockFlow {P} at (3,404) size 640x42 LayoutText {#text} at (0,0) size 471x20 text run at (0,0) width 471: "AAAA BBBB CCCC DDDD EEEE FFFF GGGG HHHH IIII JJJJ" - LayoutInline {SPAN} at (0,0) size 299x20 - LayoutText {#text} at (470,0) size 299x20 - text run at (470,0) width 299: "\x{9}\x{9}\x{9}\x{9}" - LayoutText {#text} at (0,21) size 39x20 - text run at (0,21) width 39: "KKKK" + LayoutInline {SPAN} at (0,0) size 308x20 + LayoutText {#text} at (0,21) size 308x20 + text run at (0,21) width 308: "\x{9}\x{9}\x{9}\x{9}" + LayoutText {#text} at (307,21) size 39x20 + text run at (307,21) width 39: "KKKK"
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/transforms/shadows-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/transforms/shadows-expected.png index 9c43dc22..da937a2 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/transforms/shadows-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/transforms/shadows-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/writing-mode/english-lr-text-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/writing-mode/english-lr-text-expected.png index 84eba8f4..75d22960 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/writing-mode/english-lr-text-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/writing-mode/english-lr-text-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/text/textshadow-001-expected.png b/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/text/textshadow-001-expected.png index 3aca52f..7dc0de0 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/text/textshadow-001-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/text/textshadow-001-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/text/textshadow-002-expected.png b/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/text/textshadow-002-expected.png index be5f2d9..e98a33d8 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/text/textshadow-002-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/text/textshadow-002-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/text/textshadow-003-expected.png b/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/text/textshadow-003-expected.png index c2f32db..3f84f2b 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/text/textshadow-003-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/text/textshadow-003-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/text/textshadow-004-expected.png b/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/text/textshadow-004-expected.png index f3f0e6e..8cb2c51e 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/text/textshadow-004-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/text/textshadow-004-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/text/textshadow-010-expected.png b/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/text/textshadow-010-expected.png index 8bb969e..96c0f21 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/text/textshadow-010-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/ietestcenter/css3/text/textshadow-010-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/roundedrects/circle-with-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/mac/paint/roundedrects/circle-with-shadow-expected.png index efefbf6d..e1f67c0 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/roundedrects/circle-with-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/paint/roundedrects/circle-with-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/roundedrects/input-with-rounded-rect-and-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/mac/paint/roundedrects/input-with-rounded-rect-and-shadow-expected.png index 40080e17..6d46f6e 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/roundedrects/input-with-rounded-rect-and-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/paint/roundedrects/input-with-rounded-rect-and-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/css/text-gradient-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/css/text-gradient-shadow-expected.png index fa6ad36..bef2a409 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/css/text-gradient-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/svg/css/text-gradient-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/css/text-shadow-multiple-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/css/text-shadow-multiple-expected.png index 905bae01..bea282d 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/css/text-shadow-multiple-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/svg/css/text-shadow-multiple-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/repaint-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/repaint-shadow-expected.png index 5df5ed1..49bf3d3 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/svg/custom/repaint-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/svg/custom/repaint-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/display_list_2d_canvas/fast/canvas/canvas-composite-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/display_list_2d_canvas/fast/canvas/canvas-composite-shadow-expected.png index 0720e0c..21ce7a8 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/display_list_2d_canvas/fast/canvas/canvas-composite-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/display_list_2d_canvas/fast/canvas/canvas-composite-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/display_list_2d_canvas/fast/canvas/canvas-incremental-repaint-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/display_list_2d_canvas/fast/canvas/canvas-incremental-repaint-expected.png index aed138d..3661c657 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/display_list_2d_canvas/fast/canvas/canvas-incremental-repaint-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/display_list_2d_canvas/fast/canvas/canvas-incremental-repaint-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/gpu/fast/canvas/canvas-composite-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/gpu/fast/canvas/canvas-composite-shadow-expected.png index d7016fd..8ec79349 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/gpu/fast/canvas/canvas-composite-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/gpu/fast/canvas/canvas-composite-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/gpu/fast/canvas/canvas-incremental-repaint-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/gpu/fast/canvas/canvas-incremental-repaint-expected.png index 91aec5b38..6b6ca27 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/gpu/fast/canvas/canvas-incremental-repaint-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/gpu/fast/canvas/canvas-incremental-repaint-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/gpu/fast/canvas/canvas-shadow-source-in-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/gpu/fast/canvas/canvas-shadow-source-in-expected.png index 595327e..32e0d70 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/gpu/fast/canvas/canvas-shadow-source-in-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/gpu/fast/canvas/canvas-shadow-source-in-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win-xp/compositing/geometry/clipping-foreground-expected.png b/third_party/WebKit/LayoutTests/platform/win-xp/compositing/geometry/clipping-foreground-expected.png index 864ea47..943aa5d 100644 --- a/third_party/WebKit/LayoutTests/platform/win-xp/compositing/geometry/clipping-foreground-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win-xp/compositing/geometry/clipping-foreground-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win-xp/compositing/gestures/gesture-tapHighlight-with-box-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/win-xp/compositing/gestures/gesture-tapHighlight-with-box-shadow-expected.png index 18acd4c..0bbd60b9 100644 --- a/third_party/WebKit/LayoutTests/platform/win-xp/compositing/gestures/gesture-tapHighlight-with-box-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win-xp/compositing/gestures/gesture-tapHighlight-with-box-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win-xp/compositing/iframes/composited-iframe-alignment-expected.png b/third_party/WebKit/LayoutTests/platform/win-xp/compositing/iframes/composited-iframe-alignment-expected.png index 37fc17b..ab506a1 100644 --- a/third_party/WebKit/LayoutTests/platform/win-xp/compositing/iframes/composited-iframe-alignment-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win-xp/compositing/iframes/composited-iframe-alignment-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win-xp/compositing/masks/masked-ancestor-expected.png b/third_party/WebKit/LayoutTests/platform/win-xp/compositing/masks/masked-ancestor-expected.png index 62d59fe..2f4364b5 100644 --- a/third_party/WebKit/LayoutTests/platform/win-xp/compositing/masks/masked-ancestor-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win-xp/compositing/masks/masked-ancestor-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win-xp/compositing/shadows/shadow-drawing-expected.png b/third_party/WebKit/LayoutTests/platform/win-xp/compositing/shadows/shadow-drawing-expected.png index c9270d9..bcf2ca52 100644 --- a/third_party/WebKit/LayoutTests/platform/win-xp/compositing/shadows/shadow-drawing-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win-xp/compositing/shadows/shadow-drawing-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win-xp/fast/borders/border-radius-mask-canvas-with-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/win-xp/fast/borders/border-radius-mask-canvas-with-shadow-expected.png index 3f8539b..f6e4953 100644 --- a/third_party/WebKit/LayoutTests/platform/win-xp/fast/borders/border-radius-mask-canvas-with-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win-xp/fast/borders/border-radius-mask-canvas-with-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win-xp/fast/borders/border-radius-mask-video-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/win-xp/fast/borders/border-radius-mask-video-shadow-expected.png index e8dcf33..13d9428 100644 --- a/third_party/WebKit/LayoutTests/platform/win-xp/fast/borders/border-radius-mask-video-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win-xp/fast/borders/border-radius-mask-video-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win-xp/fast/borders/border-radius-split-inline-expected.png b/third_party/WebKit/LayoutTests/platform/win-xp/fast/borders/border-radius-split-inline-expected.png index affcc26..8f301dd 100644 --- a/third_party/WebKit/LayoutTests/platform/win-xp/fast/borders/border-radius-split-inline-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win-xp/fast/borders/border-radius-split-inline-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win-xp/fast/box-shadow/basic-shadows-expected.png b/third_party/WebKit/LayoutTests/platform/win-xp/fast/box-shadow/basic-shadows-expected.png index 4d97e58..e3ecb8a 100644 --- a/third_party/WebKit/LayoutTests/platform/win-xp/fast/box-shadow/basic-shadows-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win-xp/fast/box-shadow/basic-shadows-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win-xp/fast/box-shadow/box-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/win-xp/fast/box-shadow/box-shadow-expected.png index 1d177cf..0533bc3 100644 --- a/third_party/WebKit/LayoutTests/platform/win-xp/fast/box-shadow/box-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win-xp/fast/box-shadow/box-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win-xp/fast/box-shadow/box-shadow-transformed-expected.png b/third_party/WebKit/LayoutTests/platform/win-xp/fast/box-shadow/box-shadow-transformed-expected.png index 210347c1..f5de603 100644 --- a/third_party/WebKit/LayoutTests/platform/win-xp/fast/box-shadow/box-shadow-transformed-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win-xp/fast/box-shadow/box-shadow-transformed-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win-xp/fast/box-shadow/inset-box-shadow-radius-expected.png b/third_party/WebKit/LayoutTests/platform/win-xp/fast/box-shadow/inset-box-shadow-radius-expected.png index 0c69f85..4beed5fa 100644 --- a/third_party/WebKit/LayoutTests/platform/win-xp/fast/box-shadow/inset-box-shadow-radius-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win-xp/fast/box-shadow/inset-box-shadow-radius-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win-xp/fast/box-shadow/inset-box-shadows-expected.png b/third_party/WebKit/LayoutTests/platform/win-xp/fast/box-shadow/inset-box-shadows-expected.png index c979a34..1f611b8 100644 --- a/third_party/WebKit/LayoutTests/platform/win-xp/fast/box-shadow/inset-box-shadows-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win-xp/fast/box-shadow/inset-box-shadows-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win-xp/fast/box-shadow/inset-expected.png b/third_party/WebKit/LayoutTests/platform/win-xp/fast/box-shadow/inset-expected.png index ce0e1a8..4ed0cde 100644 --- a/third_party/WebKit/LayoutTests/platform/win-xp/fast/box-shadow/inset-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win-xp/fast/box-shadow/inset-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win-xp/fast/box-shadow/inset-subpixel-expected.png b/third_party/WebKit/LayoutTests/platform/win-xp/fast/box-shadow/inset-subpixel-expected.png index 4e5b6ca2..ff7699c1 100644 --- a/third_party/WebKit/LayoutTests/platform/win-xp/fast/box-shadow/inset-subpixel-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win-xp/fast/box-shadow/inset-subpixel-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win-xp/fast/canvas/canvas-composite-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/win-xp/fast/canvas/canvas-composite-shadow-expected.png index 6162a23..801b131 100644 --- a/third_party/WebKit/LayoutTests/platform/win-xp/fast/canvas/canvas-composite-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win-xp/fast/canvas/canvas-composite-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win-xp/fast/canvas/canvas-incremental-repaint-expected.png b/third_party/WebKit/LayoutTests/platform/win-xp/fast/canvas/canvas-incremental-repaint-expected.png index 50d10e5..b2a6b0ee 100644 --- a/third_party/WebKit/LayoutTests/platform/win-xp/fast/canvas/canvas-incremental-repaint-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win-xp/fast/canvas/canvas-incremental-repaint-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win-xp/fast/css/color-correction-on-box-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/win-xp/fast/css/color-correction-on-box-shadow-expected.png index e48d5f0..f3b119a 100644 --- a/third_party/WebKit/LayoutTests/platform/win-xp/fast/css/color-correction-on-box-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win-xp/fast/css/color-correction-on-box-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win-xp/fast/css/color-correction-on-text-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/win-xp/fast/css/color-correction-on-text-shadow-expected.png index 4910b41e..db304f6 100644 --- a/third_party/WebKit/LayoutTests/platform/win-xp/fast/css/color-correction-on-text-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win-xp/fast/css/color-correction-on-text-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win-xp/fast/css/shadow-multiple-expected.png b/third_party/WebKit/LayoutTests/platform/win-xp/fast/css/shadow-multiple-expected.png index f96be81..d26b7ba 100644 --- a/third_party/WebKit/LayoutTests/platform/win-xp/fast/css/shadow-multiple-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win-xp/fast/css/shadow-multiple-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win-xp/fast/dom/HTMLMeterElement/meter-styles-expected.png b/third_party/WebKit/LayoutTests/platform/win-xp/fast/dom/HTMLMeterElement/meter-styles-expected.png index b83333f..894350e 100644 --- a/third_party/WebKit/LayoutTests/platform/win-xp/fast/dom/HTMLMeterElement/meter-styles-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win-xp/fast/dom/HTMLMeterElement/meter-styles-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win-xp/fast/forms/calendar-picker/calendar-picker-appearance-ar-expected.png b/third_party/WebKit/LayoutTests/platform/win-xp/fast/forms/calendar-picker/calendar-picker-appearance-ar-expected.png index 0e20ecc..85eba515 100644 --- a/third_party/WebKit/LayoutTests/platform/win-xp/fast/forms/calendar-picker/calendar-picker-appearance-ar-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win-xp/fast/forms/calendar-picker/calendar-picker-appearance-ar-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win-xp/fast/forms/calendar-picker/calendar-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/win-xp/fast/forms/calendar-picker/calendar-picker-appearance-expected.png index d7c1e988..80d551b 100644 --- a/third_party/WebKit/LayoutTests/platform/win-xp/fast/forms/calendar-picker/calendar-picker-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win-xp/fast/forms/calendar-picker/calendar-picker-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win-xp/fast/forms/calendar-picker/calendar-picker-appearance-minimum-date-expected.png b/third_party/WebKit/LayoutTests/platform/win-xp/fast/forms/calendar-picker/calendar-picker-appearance-minimum-date-expected.png index 7c9113f4..74c4259 100644 --- a/third_party/WebKit/LayoutTests/platform/win-xp/fast/forms/calendar-picker/calendar-picker-appearance-minimum-date-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win-xp/fast/forms/calendar-picker/calendar-picker-appearance-minimum-date-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win-xp/fast/forms/calendar-picker/calendar-picker-appearance-required-ar-expected.png b/third_party/WebKit/LayoutTests/platform/win-xp/fast/forms/calendar-picker/calendar-picker-appearance-required-ar-expected.png index 97b09bd19..16e58ab4 100644 --- a/third_party/WebKit/LayoutTests/platform/win-xp/fast/forms/calendar-picker/calendar-picker-appearance-required-ar-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win-xp/fast/forms/calendar-picker/calendar-picker-appearance-required-ar-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win-xp/fast/forms/calendar-picker/calendar-picker-appearance-required-expected.png b/third_party/WebKit/LayoutTests/platform/win-xp/fast/forms/calendar-picker/calendar-picker-appearance-required-expected.png index db1b375f..58b2937 100644 --- a/third_party/WebKit/LayoutTests/platform/win-xp/fast/forms/calendar-picker/calendar-picker-appearance-required-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win-xp/fast/forms/calendar-picker/calendar-picker-appearance-required-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win-xp/fast/forms/calendar-picker/calendar-picker-appearance-ru-expected.png b/third_party/WebKit/LayoutTests/platform/win-xp/fast/forms/calendar-picker/calendar-picker-appearance-ru-expected.png index e20e27b..a93dc0a 100644 --- a/third_party/WebKit/LayoutTests/platform/win-xp/fast/forms/calendar-picker/calendar-picker-appearance-ru-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win-xp/fast/forms/calendar-picker/calendar-picker-appearance-ru-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win-xp/fast/forms/calendar-picker/calendar-picker-appearance-step-expected.png b/third_party/WebKit/LayoutTests/platform/win-xp/fast/forms/calendar-picker/calendar-picker-appearance-step-expected.png index e9e295e9..13f1ae7 100644 --- a/third_party/WebKit/LayoutTests/platform/win-xp/fast/forms/calendar-picker/calendar-picker-appearance-step-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win-xp/fast/forms/calendar-picker/calendar-picker-appearance-step-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win-xp/fast/forms/calendar-picker/calendar-picker-appearance-zoom125-expected.png b/third_party/WebKit/LayoutTests/platform/win-xp/fast/forms/calendar-picker/calendar-picker-appearance-zoom125-expected.png index 8cf3ff1..332c12d 100644 --- a/third_party/WebKit/LayoutTests/platform/win-xp/fast/forms/calendar-picker/calendar-picker-appearance-zoom125-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win-xp/fast/forms/calendar-picker/calendar-picker-appearance-zoom125-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win-xp/fast/forms/calendar-picker/calendar-picker-appearance-zoom200-expected.png b/third_party/WebKit/LayoutTests/platform/win-xp/fast/forms/calendar-picker/calendar-picker-appearance-zoom200-expected.png index 19f4e9f..23b46f6 100644 --- a/third_party/WebKit/LayoutTests/platform/win-xp/fast/forms/calendar-picker/calendar-picker-appearance-zoom200-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win-xp/fast/forms/calendar-picker/calendar-picker-appearance-zoom200-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win-xp/fast/forms/calendar-picker/month-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/win-xp/fast/forms/calendar-picker/month-picker-appearance-expected.png index 69e4a3f..18c52c8 100644 --- a/third_party/WebKit/LayoutTests/platform/win-xp/fast/forms/calendar-picker/month-picker-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win-xp/fast/forms/calendar-picker/month-picker-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win-xp/fast/forms/calendar-picker/month-picker-appearance-step-expected.png b/third_party/WebKit/LayoutTests/platform/win-xp/fast/forms/calendar-picker/month-picker-appearance-step-expected.png index 5180f1d5..f32d47b 100644 --- a/third_party/WebKit/LayoutTests/platform/win-xp/fast/forms/calendar-picker/month-picker-appearance-step-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win-xp/fast/forms/calendar-picker/month-picker-appearance-step-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win-xp/fast/forms/calendar-picker/week-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/win-xp/fast/forms/calendar-picker/week-picker-appearance-expected.png index 116d2b4..b42a5927 100644 --- a/third_party/WebKit/LayoutTests/platform/win-xp/fast/forms/calendar-picker/week-picker-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win-xp/fast/forms/calendar-picker/week-picker-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win-xp/fast/forms/calendar-picker/week-picker-appearance-step-expected.png b/third_party/WebKit/LayoutTests/platform/win-xp/fast/forms/calendar-picker/week-picker-appearance-step-expected.png index 5b650a2..0f64ebdf 100644 --- a/third_party/WebKit/LayoutTests/platform/win-xp/fast/forms/calendar-picker/week-picker-appearance-step-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win-xp/fast/forms/calendar-picker/week-picker-appearance-step-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win-xp/fast/forms/checkbox/checkbox-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/win-xp/fast/forms/checkbox/checkbox-appearance-basic-expected.png index 9b620d1..076c06a0 100644 --- a/third_party/WebKit/LayoutTests/platform/win-xp/fast/forms/checkbox/checkbox-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win-xp/fast/forms/checkbox/checkbox-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win-xp/fast/forms/color/color-suggestion-picker-appearance-zoom125-expected.png b/third_party/WebKit/LayoutTests/platform/win-xp/fast/forms/color/color-suggestion-picker-appearance-zoom125-expected.png index cb436e3..9a16851c 100644 --- a/third_party/WebKit/LayoutTests/platform/win-xp/fast/forms/color/color-suggestion-picker-appearance-zoom125-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win-xp/fast/forms/color/color-suggestion-picker-appearance-zoom125-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win-xp/fast/forms/color/color-suggestion-picker-appearance-zoom200-expected.png b/third_party/WebKit/LayoutTests/platform/win-xp/fast/forms/color/color-suggestion-picker-appearance-zoom200-expected.png index f800f94..6a7e64e 100644 --- a/third_party/WebKit/LayoutTests/platform/win-xp/fast/forms/color/color-suggestion-picker-appearance-zoom200-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win-xp/fast/forms/color/color-suggestion-picker-appearance-zoom200-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win-xp/fast/forms/color/color-suggestion-picker-with-scrollbar-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/win-xp/fast/forms/color/color-suggestion-picker-with-scrollbar-appearance-expected.png index 36dcd69..792bad1 100644 --- a/third_party/WebKit/LayoutTests/platform/win-xp/fast/forms/color/color-suggestion-picker-with-scrollbar-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win-xp/fast/forms/color/color-suggestion-picker-with-scrollbar-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win-xp/fast/forms/search/search-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/win-xp/fast/forms/search/search-appearance-basic-expected.png index afb196a..a34a252 100644 --- a/third_party/WebKit/LayoutTests/platform/win-xp/fast/forms/search/search-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win-xp/fast/forms/search/search-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win-xp/paint/roundedrects/input-with-rounded-rect-and-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/win-xp/paint/roundedrects/input-with-rounded-rect-and-shadow-expected.png new file mode 100644 index 0000000..d8d8dacd --- /dev/null +++ b/third_party/WebKit/LayoutTests/platform/win-xp/paint/roundedrects/input-with-rounded-rect-and-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/virtual/gpu/fast/canvas/canvas-scale-strokePath-shadow-expected.txt b/third_party/WebKit/LayoutTests/platform/win-xp/virtual/gpu/fast/canvas/canvas-scale-strokePath-shadow-expected.txt similarity index 100% rename from third_party/WebKit/LayoutTests/virtual/gpu/fast/canvas/canvas-scale-strokePath-shadow-expected.txt rename to third_party/WebKit/LayoutTests/platform/win-xp/virtual/gpu/fast/canvas/canvas-scale-strokePath-shadow-expected.txt
diff --git a/third_party/WebKit/LayoutTests/platform/win/compositing/geometry/clipping-foreground-expected.png b/third_party/WebKit/LayoutTests/platform/win/compositing/geometry/clipping-foreground-expected.png index 3ebd36c0..0b53c87 100644 --- a/third_party/WebKit/LayoutTests/platform/win/compositing/geometry/clipping-foreground-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/compositing/geometry/clipping-foreground-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/compositing/gestures/gesture-tapHighlight-with-box-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/win/compositing/gestures/gesture-tapHighlight-with-box-shadow-expected.png index 4f23fa7..507d21c 100644 --- a/third_party/WebKit/LayoutTests/platform/win/compositing/gestures/gesture-tapHighlight-with-box-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/compositing/gestures/gesture-tapHighlight-with-box-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/compositing/iframes/composited-iframe-alignment-expected.png b/third_party/WebKit/LayoutTests/platform/win/compositing/iframes/composited-iframe-alignment-expected.png index 76d4e30d..fa28eda 100644 --- a/third_party/WebKit/LayoutTests/platform/win/compositing/iframes/composited-iframe-alignment-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/compositing/iframes/composited-iframe-alignment-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/compositing/masks/masked-ancestor-expected.png b/third_party/WebKit/LayoutTests/platform/win/compositing/masks/masked-ancestor-expected.png index 368a716..3c1b7dd6 100644 --- a/third_party/WebKit/LayoutTests/platform/win/compositing/masks/masked-ancestor-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/compositing/masks/masked-ancestor-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/compositing/shadows/shadow-drawing-expected.png b/third_party/WebKit/LayoutTests/platform/win/compositing/shadows/shadow-drawing-expected.png index 2e334558..1a42947 100644 --- a/third_party/WebKit/LayoutTests/platform/win/compositing/shadows/shadow-drawing-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/compositing/shadows/shadow-drawing-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/borders/border-radius-mask-canvas-with-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/borders/border-radius-mask-canvas-with-shadow-expected.png index 7a56562..a6f196830 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/borders/border-radius-mask-canvas-with-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/borders/border-radius-mask-canvas-with-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/borders/border-radius-mask-video-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/borders/border-radius-mask-video-shadow-expected.png index 822b482..7026e31 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/borders/border-radius-mask-video-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/borders/border-radius-mask-video-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/borders/border-radius-split-inline-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/borders/border-radius-split-inline-expected.png index ce30f5a..ba159d1 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/borders/border-radius-split-inline-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/borders/border-radius-split-inline-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/box-shadow/basic-shadows-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/box-shadow/basic-shadows-expected.png index 2244c24..7cef696 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/box-shadow/basic-shadows-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/box-shadow/basic-shadows-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/box-shadow/box-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/box-shadow/box-shadow-expected.png index 4766beb..8825b4e 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/box-shadow/box-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/box-shadow/box-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/box-shadow/box-shadow-transformed-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/box-shadow/box-shadow-transformed-expected.png index 388229c..d9039d34 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/box-shadow/box-shadow-transformed-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/box-shadow/box-shadow-transformed-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/box-shadow/inset-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/box-shadow/inset-expected.png index a0f2a7a..a11abb0 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/box-shadow/inset-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/box-shadow/inset-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/box-shadow/inset-subpixel-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/box-shadow/inset-subpixel-expected.png index 50bd45a..4a1b9736 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/box-shadow/inset-subpixel-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/box-shadow/inset-subpixel-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/canvas/canvas-composite-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/canvas/canvas-composite-shadow-expected.png index 8bdf0d4..0913de7 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/canvas/canvas-composite-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/canvas/canvas-composite-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/canvas/canvas-incremental-repaint-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/canvas/canvas-incremental-repaint-expected.png index 2b64d6d..d23b465 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/canvas/canvas-incremental-repaint-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/canvas/canvas-incremental-repaint-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/css/color-correction-on-box-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/css/color-correction-on-box-shadow-expected.png index a7942cc..c507d02 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/css/color-correction-on-box-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/css/color-correction-on-box-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/css/color-correction-on-text-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/css/color-correction-on-text-shadow-expected.png index 5fb2b918..6656fb69 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/css/color-correction-on-text-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/css/color-correction-on-text-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/css/shadow-multiple-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/css/shadow-multiple-expected.png index ab5eaf1..24244f3 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/css/shadow-multiple-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/css/shadow-multiple-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/dom/HTMLMeterElement/meter-styles-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/dom/HTMLMeterElement/meter-styles-expected.png index 04c2947..eed5249 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/dom/HTMLMeterElement/meter-styles-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/dom/HTMLMeterElement/meter-styles-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/calendar-picker-appearance-ar-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/calendar-picker-appearance-ar-expected.png index ef36a15..8bde39bf 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/calendar-picker-appearance-ar-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/calendar-picker-appearance-ar-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/calendar-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/calendar-picker-appearance-expected.png index ea68cfba..941ceeb3 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/calendar-picker-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/calendar-picker-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/calendar-picker-appearance-minimum-date-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/calendar-picker-appearance-minimum-date-expected.png index d1c24c5..a957671 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/calendar-picker-appearance-minimum-date-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/calendar-picker-appearance-minimum-date-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/calendar-picker-appearance-required-ar-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/calendar-picker-appearance-required-ar-expected.png index 2d1db31..0de07c0 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/calendar-picker-appearance-required-ar-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/calendar-picker-appearance-required-ar-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/calendar-picker-appearance-required-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/calendar-picker-appearance-required-expected.png index a8f8df35..378f838 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/calendar-picker-appearance-required-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/calendar-picker-appearance-required-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/calendar-picker-appearance-ru-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/calendar-picker-appearance-ru-expected.png index dcf0e8c..2e93b15 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/calendar-picker-appearance-ru-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/calendar-picker-appearance-ru-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/calendar-picker-appearance-step-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/calendar-picker-appearance-step-expected.png index 16d11d5..339513d 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/calendar-picker-appearance-step-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/calendar-picker-appearance-step-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/calendar-picker-appearance-zoom125-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/calendar-picker-appearance-zoom125-expected.png index 9e0f9fe..c52fdd30 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/calendar-picker-appearance-zoom125-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/calendar-picker-appearance-zoom125-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/calendar-picker-appearance-zoom200-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/calendar-picker-appearance-zoom200-expected.png index ab9fe91..b25c127 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/calendar-picker-appearance-zoom200-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/calendar-picker-appearance-zoom200-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/month-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/month-picker-appearance-expected.png index 12bddc063..a50d27ff 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/month-picker-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/month-picker-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/month-picker-appearance-step-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/month-picker-appearance-step-expected.png index eb189b1..ff6b66a 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/month-picker-appearance-step-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/month-picker-appearance-step-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/week-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/week-picker-appearance-expected.png index d7270fe..aca0df4 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/week-picker-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/week-picker-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/week-picker-appearance-step-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/week-picker-appearance-step-expected.png index 01ecb5c7..504f3d2 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/week-picker-appearance-step-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/week-picker-appearance-step-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/forms/checkbox/checkbox-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/forms/checkbox/checkbox-appearance-basic-expected.png index d182363..a3f10ad 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/forms/checkbox/checkbox-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/forms/checkbox/checkbox-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/forms/color/color-suggestion-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/forms/color/color-suggestion-picker-appearance-expected.png index 84819383..abe84fce 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/forms/color/color-suggestion-picker-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/forms/color/color-suggestion-picker-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/forms/color/color-suggestion-picker-appearance-zoom125-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/forms/color/color-suggestion-picker-appearance-zoom125-expected.png index 900b262..9eec0c29 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/forms/color/color-suggestion-picker-appearance-zoom125-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/forms/color/color-suggestion-picker-appearance-zoom125-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/forms/color/color-suggestion-picker-appearance-zoom200-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/forms/color/color-suggestion-picker-appearance-zoom200-expected.png index a02ac14..218af4d 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/forms/color/color-suggestion-picker-appearance-zoom200-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/forms/color/color-suggestion-picker-appearance-zoom200-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/forms/color/color-suggestion-picker-one-row-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/forms/color/color-suggestion-picker-one-row-appearance-expected.png index d04c1348..8d1e130 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/forms/color/color-suggestion-picker-one-row-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/forms/color/color-suggestion-picker-one-row-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/forms/color/color-suggestion-picker-two-row-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/forms/color/color-suggestion-picker-two-row-appearance-expected.png index e1de9a9..6dd5a2f 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/forms/color/color-suggestion-picker-two-row-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/forms/color/color-suggestion-picker-two-row-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/forms/color/color-suggestion-picker-with-scrollbar-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/forms/color/color-suggestion-picker-with-scrollbar-appearance-expected.png index 1739a1c..208e621 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/forms/color/color-suggestion-picker-with-scrollbar-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/forms/color/color-suggestion-picker-with-scrollbar-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/forms/radio/radio-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/forms/radio/radio-appearance-basic-expected.png index a07a7de..e40097db 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/forms/radio/radio-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/forms/radio/radio-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/forms/range/range-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/forms/range/range-appearance-basic-expected.png index 18d756e1..0ae54cd 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/forms/range/range-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/forms/range/range-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/forms/search/search-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/forms/search/search-appearance-basic-expected.png index cbb410a..af1addc9 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/forms/search/search-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/forms/search/search-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/forms/select/listbox-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/forms/select/listbox-appearance-basic-expected.png index a7a708c..fe4db5d 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/forms/select/listbox-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/forms/select/listbox-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/forms/select/menulist-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/forms/select/menulist-appearance-basic-expected.png index 44c5b4090b..9fc3944 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/forms/select/menulist-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/forms/select/menulist-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/forms/submit/submit-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/forms/submit/submit-appearance-basic-expected.png index be1e296..7646999 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/forms/submit/submit-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/forms/submit/submit-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/forms/text/text-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/forms/text/text-appearance-basic-expected.png index 7119766..ecb800f 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/forms/text/text-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/forms/text/text-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/forms/textarea/textarea-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/forms/textarea/textarea-appearance-basic-expected.png index 62fc9e8..0054875 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/forms/textarea/textarea-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/forms/textarea/textarea-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/shadow-multiple-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/shadow-multiple-expected.png index 698aafa..d644b724 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/repaint/shadow-multiple-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/repaint/shadow-multiple-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/text/shadow-translucent-fill-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/text/shadow-translucent-fill-expected.png index deb18d0..8962e82 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/text/shadow-translucent-fill-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/text/shadow-translucent-fill-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/transforms/shadows-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/transforms/shadows-expected.png index 6421c3c..ba52932 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/transforms/shadows-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/transforms/shadows-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/writing-mode/english-lr-text-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/writing-mode/english-lr-text-expected.png index a8d145a..f9e1d625 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/writing-mode/english-lr-text-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/writing-mode/english-lr-text-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/ietestcenter/css3/text/textshadow-001-expected.png b/third_party/WebKit/LayoutTests/platform/win/ietestcenter/css3/text/textshadow-001-expected.png index 4364f4b..da64ca7 100644 --- a/third_party/WebKit/LayoutTests/platform/win/ietestcenter/css3/text/textshadow-001-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/ietestcenter/css3/text/textshadow-001-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/ietestcenter/css3/text/textshadow-003-expected.png b/third_party/WebKit/LayoutTests/platform/win/ietestcenter/css3/text/textshadow-003-expected.png index c35f31a..cedc8644 100644 --- a/third_party/WebKit/LayoutTests/platform/win/ietestcenter/css3/text/textshadow-003-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/ietestcenter/css3/text/textshadow-003-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/ietestcenter/css3/text/textshadow-004-expected.png b/third_party/WebKit/LayoutTests/platform/win/ietestcenter/css3/text/textshadow-004-expected.png index 1a8094f4..67f3ed29 100644 --- a/third_party/WebKit/LayoutTests/platform/win/ietestcenter/css3/text/textshadow-004-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/ietestcenter/css3/text/textshadow-004-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/paint/roundedrects/circle-with-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/win/paint/roundedrects/circle-with-shadow-expected.png index 70a7377..dc3035c 100644 --- a/third_party/WebKit/LayoutTests/platform/win/paint/roundedrects/circle-with-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/paint/roundedrects/circle-with-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/paint/roundedrects/input-with-rounded-rect-and-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/win/paint/roundedrects/input-with-rounded-rect-and-shadow-expected.png index d8d8dacd..2f58da4 100644 --- a/third_party/WebKit/LayoutTests/platform/win/paint/roundedrects/input-with-rounded-rect-and-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/paint/roundedrects/input-with-rounded-rect-and-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/svg/custom/repaint-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/win/svg/custom/repaint-shadow-expected.png index 0e614e1..4d593408 100644 --- a/third_party/WebKit/LayoutTests/platform/win/svg/custom/repaint-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/svg/custom/repaint-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/display_list_2d_canvas/fast/canvas/canvas-composite-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/display_list_2d_canvas/fast/canvas/canvas-composite-shadow-expected.png index 8bdf0d4..0913de7 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/display_list_2d_canvas/fast/canvas/canvas-composite-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/display_list_2d_canvas/fast/canvas/canvas-composite-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/display_list_2d_canvas/fast/canvas/canvas-incremental-repaint-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/display_list_2d_canvas/fast/canvas/canvas-incremental-repaint-expected.png index 2b64d6d..d23b465 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/display_list_2d_canvas/fast/canvas/canvas-incremental-repaint-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/display_list_2d_canvas/fast/canvas/canvas-incremental-repaint-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/gpu/fast/canvas/canvas-composite-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/gpu/fast/canvas/canvas-composite-shadow-expected.png index d1402425..e900edd 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/gpu/fast/canvas/canvas-composite-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/gpu/fast/canvas/canvas-composite-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/gpu/fast/canvas/canvas-incremental-repaint-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/gpu/fast/canvas/canvas-incremental-repaint-expected.png index 6f0e991..0560c07 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/gpu/fast/canvas/canvas-incremental-repaint-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/gpu/fast/canvas/canvas-incremental-repaint-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/gpu/fast/canvas/canvas-shadow-source-in-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/gpu/fast/canvas/canvas-shadow-source-in-expected.png index 4660eb3..3b3e55d 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/gpu/fast/canvas/canvas-shadow-source-in-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/gpu/fast/canvas/canvas-shadow-source-in-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/calendar-picker-appearance-ar-expected.png b/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/calendar-picker-appearance-ar-expected.png index 817e16ac..6b7bfa2 100644 --- a/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/calendar-picker-appearance-ar-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/calendar-picker-appearance-ar-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/calendar-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/calendar-picker-appearance-expected.png index e63b5b5..297067d1 100644 --- a/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/calendar-picker-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/calendar-picker-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/calendar-picker-appearance-minimum-date-expected.png b/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/calendar-picker-appearance-minimum-date-expected.png index 806cdcc3..dc4f072 100644 --- a/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/calendar-picker-appearance-minimum-date-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/calendar-picker-appearance-minimum-date-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/calendar-picker-appearance-required-ar-expected.png b/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/calendar-picker-appearance-required-ar-expected.png index 206187c..76845e8 100644 --- a/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/calendar-picker-appearance-required-ar-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/calendar-picker-appearance-required-ar-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/calendar-picker-appearance-required-expected.png b/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/calendar-picker-appearance-required-expected.png index 97b7cde..9a7f8fe 100644 --- a/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/calendar-picker-appearance-required-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/calendar-picker-appearance-required-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/calendar-picker-appearance-step-expected.png b/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/calendar-picker-appearance-step-expected.png index 6617f6d..18e7786 100644 --- a/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/calendar-picker-appearance-step-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/calendar-picker-appearance-step-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/calendar-picker-appearance-zoom125-expected.png b/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/calendar-picker-appearance-zoom125-expected.png index 424d30c..034b96f 100644 --- a/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/calendar-picker-appearance-zoom125-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/calendar-picker-appearance-zoom125-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/calendar-picker-appearance-zoom200-expected.png b/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/calendar-picker-appearance-zoom200-expected.png index bd99f41..cd8ed6c7 100644 --- a/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/calendar-picker-appearance-zoom200-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/calendar-picker-appearance-zoom200-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/month-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/month-picker-appearance-expected.png index 3403f94..0e8d3e0 100644 --- a/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/month-picker-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/month-picker-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/month-picker-appearance-step-expected.png b/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/month-picker-appearance-step-expected.png index 9f366f2..1e93b01 100644 --- a/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/month-picker-appearance-step-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/month-picker-appearance-step-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/week-picker-appearance-expected.png b/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/week-picker-appearance-expected.png index 602610e8..826b990 100644 --- a/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/week-picker-appearance-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/week-picker-appearance-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/week-picker-appearance-step-expected.png b/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/week-picker-appearance-step-expected.png index 4b324df..27ba0720 100644 --- a/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/week-picker-appearance-step-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/week-picker-appearance-step-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win7/fast/forms/search/search-appearance-basic-expected.png b/third_party/WebKit/LayoutTests/platform/win7/fast/forms/search/search-appearance-basic-expected.png index 62a68f07..1ccd9045 100644 --- a/third_party/WebKit/LayoutTests/platform/win7/fast/forms/search/search-appearance-basic-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win7/fast/forms/search/search-appearance-basic-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win7/fast/text/stroking-decorations-expected.png b/third_party/WebKit/LayoutTests/platform/win7/fast/text/stroking-decorations-expected.png index 0710d6e9..a235ae0 100644 --- a/third_party/WebKit/LayoutTests/platform/win7/fast/text/stroking-decorations-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win7/fast/text/stroking-decorations-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win7/fast/text/stroking-expected.png b/third_party/WebKit/LayoutTests/platform/win7/fast/text/stroking-expected.png index 3b13b14ea..6979c0a 100644 --- a/third_party/WebKit/LayoutTests/platform/win7/fast/text/stroking-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win7/fast/text/stroking-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win7/fast/writing-mode/english-lr-text-expected.png b/third_party/WebKit/LayoutTests/platform/win7/fast/writing-mode/english-lr-text-expected.png index 4fbc4bec..67a6d2db 100644 --- a/third_party/WebKit/LayoutTests/platform/win7/fast/writing-mode/english-lr-text-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win7/fast/writing-mode/english-lr-text-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win7/ietestcenter/css3/text/textshadow-002-expected.png b/third_party/WebKit/LayoutTests/platform/win7/ietestcenter/css3/text/textshadow-002-expected.png index e9c4f39..eb737ae6 100644 --- a/third_party/WebKit/LayoutTests/platform/win7/ietestcenter/css3/text/textshadow-002-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win7/ietestcenter/css3/text/textshadow-002-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win7/ietestcenter/css3/text/textshadow-010-expected.png b/third_party/WebKit/LayoutTests/platform/win7/ietestcenter/css3/text/textshadow-010-expected.png index a91aa3d1..659b24b 100644 --- a/third_party/WebKit/LayoutTests/platform/win7/ietestcenter/css3/text/textshadow-010-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win7/ietestcenter/css3/text/textshadow-010-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win7/svg/css/text-gradient-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/win7/svg/css/text-gradient-shadow-expected.png index 52d8916..b714e48 100644 --- a/third_party/WebKit/LayoutTests/platform/win7/svg/css/text-gradient-shadow-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win7/svg/css/text-gradient-shadow-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win7/svg/css/text-shadow-multiple-expected.png b/third_party/WebKit/LayoutTests/platform/win7/svg/css/text-shadow-multiple-expected.png index 78ba0764..6a85865 100644 --- a/third_party/WebKit/LayoutTests/platform/win7/svg/css/text-shadow-multiple-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win7/svg/css/text-shadow-multiple-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/printing/page-height-zero-expected.txt b/third_party/WebKit/LayoutTests/printing/page-height-zero-expected.txt new file mode 100644 index 0000000..eb4b6860 --- /dev/null +++ b/third_party/WebKit/LayoutTests/printing/page-height-zero-expected.txt
@@ -0,0 +1,11 @@ +Test that an exception is thrown when attempting to set zero page height + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + +PASS internals.numberOfPages(100, 0) threw exception TypeError: Failed to execute 'numberOfPages' on 'Internals': Page width and height must be larger than 0.. +PASS internals.pageNumber(document.body, 100, 0) threw exception TypeError: Failed to execute 'pageNumber' on 'Internals': Page width and height must be larger than 0.. +PASS successfullyParsed is true + +TEST COMPLETE +
diff --git a/third_party/WebKit/LayoutTests/printing/page-height-zero.html b/third_party/WebKit/LayoutTests/printing/page-height-zero.html new file mode 100644 index 0000000..8ac0f39 --- /dev/null +++ b/third_party/WebKit/LayoutTests/printing/page-height-zero.html
@@ -0,0 +1,19 @@ +<!DOCTYPE html> +<script src="../resources/js-test.js"></script> +<style> + @media print { + /* Need something to trigger multicol layout when entering print mode, + to trigger the original crash bug (division by zero). */ + #multicol { width: 50%; } + } +</style> +<div id="multicol" style="-webkit-columns:2;"> </div> +<script> + description("Test that an exception is thrown when attempting to set zero page height"); + if (window.internals) { + shouldThrow("internals.numberOfPages(100, 0)"); + shouldThrow("internals.pageNumber(document.body, 100, 0)"); + } else { + testFailed("This test requires window.internals"); + } +</script>
diff --git a/third_party/WebKit/LayoutTests/svg/repaint/color-fill-currentColor-and-css-expected.txt b/third_party/WebKit/LayoutTests/svg/repaint/color-fill-currentColor-and-css-expected.txt new file mode 100644 index 0000000..7d6fa1d --- /dev/null +++ b/third_party/WebKit/LayoutTests/svg/repaint/color-fill-currentColor-and-css-expected.txt
@@ -0,0 +1,19 @@ +{ + "bounds": [800, 600], + "children": [ + { + "bounds": [800, 600], + "contentsOpaque": true, + "drawsContent": true, + "repaintRects": [ + [8, 8, 80, 80], + [8, 8, 80, 80] + ], + "paintInvalidationClients": [ + "LayoutSVGEllipse circle", + "LayoutSVGEllipse circle" + ] + } + ] +} +
diff --git a/third_party/WebKit/LayoutTests/svg/repaint/color-fill-currentColor-and-css.html b/third_party/WebKit/LayoutTests/svg/repaint/color-fill-currentColor-and-css.html new file mode 100644 index 0000000..7d82c2c8 --- /dev/null +++ b/third_party/WebKit/LayoutTests/svg/repaint/color-fill-currentColor-and-css.html
@@ -0,0 +1,28 @@ +<!DOCTYPE html> +<script src="../../fast/repaint/resources/text-based-repaint.js"></script> +<script src="../../resources/run-after-layout-and-paint.js"></script> +<script> +window.testIsAsync = true; +window.onload = runRepaintTest; + +function repaintTest() { + var circle = document.getElementsByTagName("circle")[0]; + ani = circle.animate([{ color: "blue" }, { color: "cyan"}], { duration: 2000, iterations: 1}); + setTimeout(function() { + ani.currentTime = 1000; + ani.pause(); + runAfterLayoutAndPaint(finishRepaintTest); + }, 0); +} +</script> +<style> +circle { + fill: currentColor; + color: blue; +} +</style> +<body> +<svg xmlns="http://www.w3.org/2000/svg" width=90 height=90> + <circle r="40" cx="40" cy="40" /> +</svg> +</body>
diff --git a/third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/compositor-proxy-supports.html b/third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/compositor-proxy-supports.html index 025c9ffb..2a0437a 100644 --- a/third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/compositor-proxy-supports.html +++ b/third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/compositor-proxy-supports.html
@@ -38,5 +38,10 @@ assert_false(proxy.supports('scrollTopa')); assert_false(proxy.supports('あ')); + + // This is a hack to get a 16-bit string for a supported property. + var transform16 = new TextDecoder('utf-16').decode(new TextEncoder('utf-16').encode('transform')); + assert_true(transform16 === 'transform'); + assert_true(proxy.supports(transform16)); }, "This test ensures that supports correctly handles queries with strings that a prefix of a property or vice versa."); </script>
diff --git a/third_party/WebKit/Source/core/animation/TimingCalculations.h b/third_party/WebKit/Source/core/animation/TimingCalculations.h index f0dd31c..792b213 100644 --- a/third_party/WebKit/Source/core/animation/TimingCalculations.h +++ b/third_party/WebKit/Source/core/animation/TimingCalculations.h
@@ -108,6 +108,13 @@ return nullValue(); ASSERT(activeTime >= 0 && activeTime <= activeDuration); + + if (specified.playbackRate == 0) + return startOffset; + + if (!std::isfinite(activeTime)) + return std::numeric_limits<double>::infinity(); + return multiplyZeroAlwaysGivesZero(specified.playbackRate < 0 ? activeTime - activeDuration : activeTime, specified.playbackRate) + startOffset; }
diff --git a/third_party/WebKit/Source/core/animation/TimingCalculationsTest.cpp b/third_party/WebKit/Source/core/animation/TimingCalculationsTest.cpp index 06ca2a9..eb455410 100644 --- a/third_party/WebKit/Source/core/animation/TimingCalculationsTest.cpp +++ b/third_party/WebKit/Source/core/animation/TimingCalculationsTest.cpp
@@ -93,6 +93,8 @@ EXPECT_EQ(0, calculateScaledActiveTime(std::numeric_limits<double>::infinity(), std::numeric_limits<double>::infinity(), 0, timing)); timing.playbackRate = 1; EXPECT_EQ(std::numeric_limits<double>::infinity(), calculateScaledActiveTime(std::numeric_limits<double>::infinity(), std::numeric_limits<double>::infinity(), 0, timing)); + timing.playbackRate = -1; + EXPECT_EQ(std::numeric_limits<double>::infinity(), calculateScaledActiveTime(std::numeric_limits<double>::infinity(), std::numeric_limits<double>::infinity(), 0, timing)); } TEST(AnimationTimingCalculationsTest, IterationTime)
diff --git a/third_party/WebKit/Source/core/core.gypi b/third_party/WebKit/Source/core/core.gypi index 77168f1..0159e6e 100644 --- a/third_party/WebKit/Source/core/core.gypi +++ b/third_party/WebKit/Source/core/core.gypi
@@ -1596,6 +1596,8 @@ 'frame/FrameHost.cpp', 'frame/FrameHost.h', 'frame/FrameOwner.h', + 'frame/FrameSerializer.cpp', + 'frame/FrameSerializer.h', 'frame/FrameView.cpp', 'frame/FrameView.h', 'frame/FrameViewAutoSizeInfo.cpp', @@ -1919,7 +1921,6 @@ 'page/PagePopupClient.h', 'page/PagePopupController.cpp', 'page/PagePopupController.h', - 'page/PageSerializer.cpp', 'page/PageVisibilityState.cpp', 'page/PointerLockController.cpp', 'page/PointerLockController.h',
diff --git a/third_party/WebKit/Source/core/css/CSSComputedStyleDeclaration.cpp b/third_party/WebKit/Source/core/css/CSSComputedStyleDeclaration.cpp index 4d73333..0c3dda6c 100644 --- a/third_party/WebKit/Source/core/css/CSSComputedStyleDeclaration.cpp +++ b/third_party/WebKit/Source/core/css/CSSComputedStyleDeclaration.cpp
@@ -531,12 +531,18 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(AtomicString customPropertyName) const { - return ComputedStyleCSSValueMapping::get(customPropertyName, *computeComputedStyle()); + const ComputedStyle* style = computeComputedStyle(); + if (!style) + return nullptr; + return ComputedStyleCSSValueMapping::get(customPropertyName, *style); } const HashMap<AtomicString, RefPtr<CSSVariableData>>* CSSComputedStyleDeclaration::getVariables() const { - return ComputedStyleCSSValueMapping::getVariables(*computeComputedStyle()); + const ComputedStyle* style = computeComputedStyle(); + if (!style) + return nullptr; + return ComputedStyleCSSValueMapping::getVariables(*style); } PassRefPtrWillBeRawPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(CSSPropertyID propertyID) const
diff --git a/third_party/WebKit/Source/core/css/CSSPrimitiveValue.h b/third_party/WebKit/Source/core/css/CSSPrimitiveValue.h index a5cba2f..c261e61 100644 --- a/third_party/WebKit/Source/core/css/CSSPrimitiveValue.h +++ b/third_party/WebKit/Source/core/css/CSSPrimitiveValue.h
@@ -198,7 +198,7 @@ } template<typename T> static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> create(T value) { - static_assert(!WTF::IsSameType<T, CSSValueID>::value, "Do not call create() with a CSSValueID; call createIdentifier() instead"); + static_assert(!std::is_same<T, CSSValueID>::value, "Do not call create() with a CSSValueID; call createIdentifier() instead"); return adoptRefWillBeNoop(new CSSPrimitiveValue(value)); }
diff --git a/third_party/WebKit/Source/core/dom/CompositorProxy.cpp b/third_party/WebKit/Source/core/dom/CompositorProxy.cpp index c50fe8c6..f45d7ccd 100644 --- a/third_party/WebKit/Source/core/dom/CompositorProxy.cpp +++ b/third_party/WebKit/Source/core/dom/CompositorProxy.cpp
@@ -17,39 +17,23 @@ namespace blink { -struct MutablePropertyMapping { +static const struct { const char* name; - unsigned length; WebCompositorMutableProperty property; +} allowedProperties[] = { + { "opacity", WebCompositorMutablePropertyOpacity }, + { "scrollleft", WebCompositorMutablePropertyScrollLeft }, + { "scrolltop", WebCompositorMutablePropertyScrollTop }, + { "transform", WebCompositorMutablePropertyTransform }, }; -// Warning: In order for std::lower_bound to work, the following must be in -// alphabetical order. -static MutablePropertyMapping allowedProperties[] = { - { "opacity", 7, WebCompositorMutablePropertyOpacity }, - { "scrollleft", 10, WebCompositorMutablePropertyScrollLeft }, - { "scrolltop", 9, WebCompositorMutablePropertyScrollTop }, - { "transform", 9, WebCompositorMutablePropertyTransform }, -}; - -static bool comparePropertyName(const MutablePropertyMapping& mapping, StringImpl* propertyLower) -{ - ASSERT(propertyLower->is8Bit()); - return memcmp(mapping.name, propertyLower->characters8(), std::min(mapping.length, propertyLower->length())) < 0; -} - static WebCompositorMutableProperty compositorMutablePropertyForName(const String& attributeName) { - WebCompositorMutableProperty property = WebCompositorMutablePropertyNone; - const String attributeLower = attributeName.lower(); - const MutablePropertyMapping* start = allowedProperties; - const MutablePropertyMapping* end = allowedProperties + WTF_ARRAY_LENGTH(allowedProperties); - if (attributeLower.impl()->is8Bit()) { - const MutablePropertyMapping* match = std::lower_bound(start, end, attributeLower.impl(), comparePropertyName); - if (match != end && equal(match->name, attributeLower.impl())) - property = match->property; + for (const auto& mapping : allowedProperties) { + if (equalIgnoringCase(mapping.name, attributeName)) + return mapping.property; } - return property; + return WebCompositorMutablePropertyNone; } static bool isControlThread()
diff --git a/third_party/WebKit/Source/core/events/EventSender.h b/third_party/WebKit/Source/core/events/EventSender.h index ab7f59a..03f75c70 100644 --- a/third_party/WebKit/Source/core/events/EventSender.h +++ b/third_party/WebKit/Source/core/events/EventSender.h
@@ -27,15 +27,21 @@ #define EventSender_h #include "platform/Timer.h" +#include "platform/heap/Handle.h" #include "wtf/Vector.h" #include "wtf/text/AtomicString.h" namespace blink { -template<typename T> class EventSender { - WTF_MAKE_NONCOPYABLE(EventSender); USING_FAST_MALLOC(EventSender); +template<typename T> +class EventSender final : public NoBaseWillBeGarbageCollectedFinalized<EventSender<T>> { + WTF_MAKE_NONCOPYABLE(EventSender); + USING_FAST_MALLOC_WILL_BE_REMOVED(EventSender); public: - explicit EventSender(const AtomicString& eventType); + static PassOwnPtrWillBeRawPtr<EventSender> create(const AtomicString& eventType) + { + return adoptPtrWillBeNoop(new EventSender(eventType)); + } const AtomicString& eventType() const { return m_eventType; } void dispatchEventSoon(T*); @@ -49,13 +55,21 @@ } #endif + DEFINE_INLINE_TRACE() + { + visitor->trace(m_dispatchSoonList); + visitor->trace(m_dispatchingList); + } + private: + explicit EventSender(const AtomicString& eventType); + void timerFired(Timer<EventSender<T>>*) { dispatchPendingEvents(); } AtomicString m_eventType; Timer<EventSender<T>> m_timer; - WillBePersistentHeapVector<RawPtrWillBeMember<T>> m_dispatchSoonList; - WillBePersistentHeapVector<RawPtrWillBeMember<T>> m_dispatchingList; + WillBeHeapVector<RawPtrWillBeMember<T>> m_dispatchSoonList; + WillBeHeapVector<RawPtrWillBeMember<T>> m_dispatchingList; }; template<typename T> EventSender<T>::EventSender(const AtomicString& eventType)
diff --git a/third_party/WebKit/Source/core/page/PageSerializer.cpp b/third_party/WebKit/Source/core/frame/FrameSerializer.cpp similarity index 89% rename from third_party/WebKit/Source/core/page/PageSerializer.cpp rename to third_party/WebKit/Source/core/frame/FrameSerializer.cpp index d2bfd218..5c484d0 100644 --- a/third_party/WebKit/Source/core/page/PageSerializer.cpp +++ b/third_party/WebKit/Source/core/frame/FrameSerializer.cpp
@@ -28,7 +28,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "core/page/PageSerializer.h" +#include "core/frame/FrameSerializer.h" #include "core/HTMLNames.h" #include "core/InputTypeNames.h" @@ -57,7 +57,6 @@ #include "core/html/HTMLMetaElement.h" #include "core/html/HTMLStyleElement.h" #include "core/html/ImageDocument.h" -#include "core/page/Page.h" #include "core/style/StyleFetchedImage.h" #include "core/style/StyleImage.h" #include "platform/SerializedResource.h" @@ -84,7 +83,7 @@ class SerializerMarkupAccumulator : public MarkupAccumulator { STACK_ALLOCATED(); public: - SerializerMarkupAccumulator(PageSerializer*, const Document&, WillBeHeapVector<RawPtrWillBeMember<Node>>&); + SerializerMarkupAccumulator(FrameSerializer::Delegate&, const Document&, WillBeHeapVector<RawPtrWillBeMember<Node>>&); ~SerializerMarkupAccumulator() override; protected: @@ -103,10 +102,10 @@ const String& attributeName, const String& attributeValue); - PageSerializer* m_serializer; + FrameSerializer::Delegate& m_delegate; RawPtrWillBeMember<const Document> m_document; - // FIXME: |PageSerializer| uses |m_nodes| for collecting nodes in document + // FIXME: |FrameSerializer| uses |m_nodes| for collecting nodes in document // included into serialized text then extracts image, object, etc. The size // of this vector isn't small for large document. It is better to use // callback like functionality. @@ -116,9 +115,9 @@ WillBeHeapHashSet<RawPtrWillBeMember<const Element>> m_elementsWithRewrittenLinks; }; -SerializerMarkupAccumulator::SerializerMarkupAccumulator(PageSerializer* serializer, const Document& document, WillBeHeapVector<RawPtrWillBeMember<Node>>& nodes) +SerializerMarkupAccumulator::SerializerMarkupAccumulator(FrameSerializer::Delegate& delegate, const Document& document, WillBeHeapVector<RawPtrWillBeMember<Node>>& nodes) : MarkupAccumulator(ResolveAllURLs) - , m_serializer(serializer) + , m_delegate(delegate) , m_document(&document) , m_nodes(nodes) { @@ -137,11 +136,7 @@ bool SerializerMarkupAccumulator::shouldIgnoreAttribute(const Attribute& attribute) { - PageSerializer::Delegate* delegate = m_serializer->delegate(); - if (delegate) - return delegate->shouldIgnoreAttribute(attribute); - - return MarkupAccumulator::shouldIgnoreAttribute(attribute); + return m_delegate.shouldIgnoreAttribute(attribute); } void SerializerMarkupAccumulator::appendElement(StringBuilder& result, Element& element, Namespaces* namespaces) @@ -176,9 +171,8 @@ && attribute.name() == HTMLNames::srcdocAttr; if (isLinkAttribute || isSrcDocAttribute) { // Check if the delegate wants to do link rewriting for the element. - PageSerializer::Delegate* delegate = m_serializer->delegate(); String newLinkForTheElement; - if (delegate && delegate->rewriteLink(element, newLinkForTheElement)) { + if (m_delegate.rewriteLink(element, newLinkForTheElement)) { if (isLinkAttribute) { // Rewrite element links. appendRewrittenAttribute( @@ -245,15 +239,15 @@ // "Webpage, Complete" method of saving a page. It will take some work but it // needs to be done if we want to continue to support non-MHTML saved pages. -PageSerializer::PageSerializer( +FrameSerializer::FrameSerializer( Vector<SerializedResource>& resources, - Delegate* delegate) + Delegate& delegate) : m_resources(&resources) , m_delegate(delegate) { } -void PageSerializer::serializeFrame(const LocalFrame& frame) +void FrameSerializer::serializeFrame(const LocalFrame& frame) { ASSERT(frame.document()); Document& document = *frame.document(); @@ -267,7 +261,7 @@ } WillBeHeapVector<RawPtrWillBeMember<Node>> serializedNodes; - SerializerMarkupAccumulator accumulator(this, document, serializedNodes); + SerializerMarkupAccumulator accumulator(m_delegate, document, serializedNodes); String text = serializeNodes<EditingStrategy>(accumulator, document, IncludeNode); CString frameHTML = document.encoding().encode(text, WTF::EntitiesForUnencodables); @@ -302,7 +296,6 @@ if (CSSStyleSheet* sheet = linkElement.sheet()) { KURL url = document.completeURL(linkElement.getAttribute(HTMLNames::hrefAttr)); serializeCSSStyleSheet(*sheet, url); - ASSERT(m_resourceURLs.contains(url)); } } else if (isHTMLStyleElement(element)) { HTMLStyleElement& styleElement = toHTMLStyleElement(element); @@ -312,7 +305,7 @@ } } -void PageSerializer::serializeCSSStyleSheet(CSSStyleSheet& styleSheet, const KURL& url) +void FrameSerializer::serializeCSSStyleSheet(CSSStyleSheet& styleSheet, const KURL& url) { StringBuilder cssText; cssText.appendLiteral("@charset \""); @@ -332,7 +325,7 @@ serializeCSSRule(rule); } - if (url.isValid() && !m_resourceURLs.contains(url)) { + if (shouldAddURL(url)) { WTF::TextEncoding textEncoding(styleSheet.contents()->charset()); ASSERT(textEncoding.isValid()); String textString = cssText.toString(); @@ -342,7 +335,7 @@ } } -void PageSerializer::serializeCSSRule(CSSRule* rule) +void FrameSerializer::serializeCSSRule(CSSRule* rule) { ASSERT(rule->parentStyleSheet()->ownerDocument()); Document& document = *rule->parentStyleSheet()->ownerDocument(); @@ -390,12 +383,13 @@ } } -bool PageSerializer::shouldAddURL(const KURL& url) +bool FrameSerializer::shouldAddURL(const KURL& url) { - return url.isValid() && !m_resourceURLs.contains(url) && !url.protocolIsData(); + return url.isValid() && !m_resourceURLs.contains(url) && !url.protocolIsData() + && !m_delegate.shouldSkipResource(url); } -void PageSerializer::addToResources(Resource* resource, PassRefPtr<SharedBuffer> data, const KURL& url) +void FrameSerializer::addToResources(Resource* resource, PassRefPtr<SharedBuffer> data, const KURL& url) { if (!data) { WTF_LOG_ERROR("No data for resource %s", url.string().utf8().data()); @@ -407,7 +401,7 @@ m_resourceURLs.add(url); } -void PageSerializer::addImageToResources(ImageResource* image, const KURL& url) +void FrameSerializer::addImageToResources(ImageResource* image, const KURL& url) { if (!shouldAddURL(url)) return; @@ -419,7 +413,7 @@ addToResources(image, data, url); } -void PageSerializer::addFontToResources(FontResource* font) +void FrameSerializer::addFontToResources(FontResource* font) { if (!font || !shouldAddURL(font->url()) || !font->isLoaded() || !font->resourceBuffer()) return; @@ -429,7 +423,7 @@ addToResources(font, data, font->url()); } -void PageSerializer::retrieveResourcesForProperties(const StylePropertySet* styleDeclaration, Document& document) +void FrameSerializer::retrieveResourcesForProperties(const StylePropertySet* styleDeclaration, Document& document) { if (!styleDeclaration) return; @@ -444,7 +438,7 @@ } } -void PageSerializer::retrieveResourcesForCSSValue(CSSValue* cssValue, Document& document) +void FrameSerializer::retrieveResourcesForCSSValue(CSSValue* cssValue, Document& document) { if (cssValue->isImageValue()) { CSSImageValue* imageValue = toCSSImageValue(cssValue); @@ -469,15 +463,10 @@ } } -PageSerializer::Delegate* PageSerializer::delegate() -{ - return m_delegate; -} - // Returns MOTW (Mark of the Web) declaration before html tag which is in // HTML comment, e.g. "<!-- saved from url=(%04d)%s -->" // See http://msdn2.microsoft.com/en-us/library/ms537628(VS.85).aspx. -String PageSerializer::markOfTheWebDeclaration(const KURL& url) +String FrameSerializer::markOfTheWebDeclaration(const KURL& url) { StringBuilder builder; bool emitsMinus = false;
diff --git a/third_party/WebKit/Source/core/page/PageSerializer.h b/third_party/WebKit/Source/core/frame/FrameSerializer.h similarity index 82% rename from third_party/WebKit/Source/core/page/PageSerializer.h rename to third_party/WebKit/Source/core/frame/FrameSerializer.h index bd99ede..0c63b687 100644 --- a/third_party/WebKit/Source/core/page/PageSerializer.h +++ b/third_party/WebKit/Source/core/frame/FrameSerializer.h
@@ -28,8 +28,8 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef PageSerializer_h -#define PageSerializer_h +#ifndef FrameSerializer_h +#define FrameSerializer_h #include "core/CoreExport.h" #include "platform/heap/Handle.h" @@ -52,7 +52,6 @@ class ImageResource; class LocalFrame; class Node; -class Page; class LayoutObject; class Resource; class SharedBuffer; @@ -62,13 +61,16 @@ // This class is used to serialize frame's contents back to text (typically HTML). // It serializes frame's document and resources such as images and CSS stylesheets. -// TODO(lukasza): Rename this class to FrameSerializer. -class CORE_EXPORT PageSerializer final { +class CORE_EXPORT FrameSerializer final { STACK_ALLOCATED(); public: class Delegate { public: - virtual bool shouldIgnoreAttribute(const Attribute&) = 0; + // Controls whether HTML serialization should skip the given attribute. + virtual bool shouldIgnoreAttribute(const Attribute&) + { + return false; + } // Method allowing the Delegate control which URLs are written into the // generated html document. @@ -79,14 +81,24 @@ // (i.e. in place of img.src or iframe.src or object.data). // // If no link rewriting is desired, this method should return false. - virtual bool rewriteLink(const Element&, String& rewrittenLink) = 0; + virtual bool rewriteLink(const Element&, String& rewrittenLink) + { + return false; + } + + // Tells whether to skip serialization of a subresource with a given URI. + // Used to deduplicate resources across multiple frames. + virtual bool shouldSkipResource(const KURL&) + { + return false; + } }; // Constructs a serializer that will write output to the given vector of - // SerializedResources and use the optional Delegate for controlling some - // serialization aspects. Callers need to ensure that the Delegate stays - // alive until the PageSerializer gets destroyed. - PageSerializer(Vector<SerializedResource>&, Delegate*); + // SerializedResources and uses the Delegate for controlling some + // serialization aspects. Callers need to ensure that both arguments stay + // alive until the FrameSerializer gets destroyed. + FrameSerializer(Vector<SerializedResource>&, Delegate&); // Initiates the serialization of the frame. All serialized content and // retrieved resources are added to the Vector passed to the constructor. @@ -94,8 +106,6 @@ // Subsequent resources are images, css, etc. void serializeFrame(const LocalFrame&); - Delegate* delegate(); - static String markOfTheWebDeclaration(const KURL&); private: @@ -118,9 +128,9 @@ Vector<SerializedResource>* m_resources; ListHashSet<KURL> m_resourceURLs; - Delegate* m_delegate; + Delegate& m_delegate; }; } // namespace blink -#endif // PageSerializer_h +#endif // FrameSerializer_h
diff --git a/third_party/WebKit/Source/core/html/HTMLDetailsElement.cpp b/third_party/WebKit/Source/core/html/HTMLDetailsElement.cpp index 92005264..3ef2353 100644 --- a/third_party/WebKit/Source/core/html/HTMLDetailsElement.cpp +++ b/third_party/WebKit/Source/core/html/HTMLDetailsElement.cpp
@@ -73,8 +73,8 @@ static DetailsEventSender& detailsToggleEventSender() { - DEFINE_STATIC_LOCAL(DetailsEventSender, sharedToggleEventSender, (EventTypeNames::toggle)); - return sharedToggleEventSender; + DEFINE_STATIC_LOCAL(OwnPtrWillBePersistent<DetailsEventSender>, sharedToggleEventSender, (DetailsEventSender::create(EventTypeNames::toggle))); + return *sharedToggleEventSender; } PassRefPtrWillBeRawPtr<HTMLDetailsElement> HTMLDetailsElement::create(Document& document) @@ -93,7 +93,9 @@ HTMLDetailsElement::~HTMLDetailsElement() { +#if !ENABLE(OILPAN) detailsToggleEventSender().cancelEvent(this); +#endif } void HTMLDetailsElement::dispatchPendingEvent(DetailsEventSender* eventSender)
diff --git a/third_party/WebKit/Source/core/html/HTMLDetailsElement.h b/third_party/WebKit/Source/core/html/HTMLDetailsElement.h index 3f65bab..c606c2c 100644 --- a/third_party/WebKit/Source/core/html/HTMLDetailsElement.h +++ b/third_party/WebKit/Source/core/html/HTMLDetailsElement.h
@@ -26,7 +26,7 @@ namespace blink { template<typename T> class EventSender; -typedef EventSender<HTMLDetailsElement> DetailsEventSender; +using DetailsEventSender = EventSender<HTMLDetailsElement>; class HTMLDetailsElement final : public HTMLElement { DEFINE_WRAPPERTYPEINFO();
diff --git a/third_party/WebKit/Source/core/html/HTMLLinkElement.cpp b/third_party/WebKit/Source/core/html/HTMLLinkElement.cpp index abc19ce..148eba2 100644 --- a/third_party/WebKit/Source/core/html/HTMLLinkElement.cpp +++ b/third_party/WebKit/Source/core/html/HTMLLinkElement.cpp
@@ -122,8 +122,8 @@ static LinkEventSender& linkLoadEventSender() { - DEFINE_STATIC_LOCAL(LinkEventSender, sharedLoadEventSender, (EventTypeNames::load)); - return sharedLoadEventSender; + DEFINE_STATIC_LOCAL(OwnPtrWillBePersistent<LinkEventSender>, sharedLoadEventSender, (LinkEventSender::create(EventTypeNames::load))); + return *sharedLoadEventSender; } void HTMLLinkElement::parseSizesAttribute(const AtomicString& value, Vector<IntSize>& iconSizes) @@ -159,8 +159,8 @@ m_link.clear(); if (inDocument()) document().styleEngine().removeStyleSheetCandidateNode(this); -#endif linkLoadEventSender().cancelEvent(this); +#endif } void HTMLLinkElement::parseAttribute(const QualifiedName& name, const AtomicString& oldValue, const AtomicString& value)
diff --git a/third_party/WebKit/Source/core/html/HTMLLinkElement.h b/third_party/WebKit/Source/core/html/HTMLLinkElement.h index e77b170..17ca442 100644 --- a/third_party/WebKit/Source/core/html/HTMLLinkElement.h +++ b/third_party/WebKit/Source/core/html/HTMLLinkElement.h
@@ -45,7 +45,7 @@ class LinkImport; template<typename T> class EventSender; -typedef EventSender<HTMLLinkElement> LinkEventSender; +using LinkEventSender = EventSender<HTMLLinkElement>; // // LinkStyle handles dynaically change-able link resources, which is
diff --git a/third_party/WebKit/Source/core/html/HTMLSourceElement.cpp b/third_party/WebKit/Source/core/html/HTMLSourceElement.cpp index edb3afb..eb583d7 100644 --- a/third_party/WebKit/Source/core/html/HTMLSourceElement.cpp +++ b/third_party/WebKit/Source/core/html/HTMLSourceElement.cpp
@@ -42,8 +42,8 @@ static SourceEventSender& sourceErrorEventSender() { - DEFINE_STATIC_LOCAL(SourceEventSender, sharedErrorEventSender, (EventTypeNames::error)); - return sharedErrorEventSender; + DEFINE_STATIC_LOCAL(OwnPtrWillBePersistent<SourceEventSender>, sharedErrorEventSender, (SourceEventSender::create(EventTypeNames::error))); + return *sharedErrorEventSender; } class HTMLSourceElement::Listener final : public MediaQueryListListener { @@ -76,8 +76,8 @@ HTMLSourceElement::~HTMLSourceElement() { - sourceErrorEventSender().cancelEvent(this); #if !ENABLE(OILPAN) + sourceErrorEventSender().cancelEvent(this); m_listener->clearElement(); #endif }
diff --git a/third_party/WebKit/Source/core/html/HTMLSourceElement.h b/third_party/WebKit/Source/core/html/HTMLSourceElement.h index 35b4229..a80defe 100644 --- a/third_party/WebKit/Source/core/html/HTMLSourceElement.h +++ b/third_party/WebKit/Source/core/html/HTMLSourceElement.h
@@ -33,7 +33,7 @@ namespace blink { template<typename T> class EventSender; -typedef EventSender<HTMLSourceElement> SourceEventSender; +using SourceEventSender = EventSender<HTMLSourceElement>; class HTMLSourceElement final : public HTMLElement { DEFINE_WRAPPERTYPEINFO();
diff --git a/third_party/WebKit/Source/core/html/HTMLStyleElement.cpp b/third_party/WebKit/Source/core/html/HTMLStyleElement.cpp index f4625703..28e9b3b1 100644 --- a/third_party/WebKit/Source/core/html/HTMLStyleElement.cpp +++ b/third_party/WebKit/Source/core/html/HTMLStyleElement.cpp
@@ -36,8 +36,8 @@ static StyleEventSender& styleLoadEventSender() { - DEFINE_STATIC_LOCAL(StyleEventSender, sharedLoadEventSender, (EventTypeNames::load)); - return sharedLoadEventSender; + DEFINE_STATIC_LOCAL(OwnPtrWillBePersistent<StyleEventSender>, sharedLoadEventSender, (StyleEventSender::create(EventTypeNames::load))); + return *sharedLoadEventSender; } inline HTMLStyleElement::HTMLStyleElement(Document& document, bool createdByParser) @@ -52,9 +52,9 @@ { #if !ENABLE(OILPAN) StyleElement::clearDocumentData(document(), this); -#endif styleLoadEventSender().cancelEvent(this); +#endif } PassRefPtrWillBeRawPtr<HTMLStyleElement> HTMLStyleElement::create(Document& document, bool createdByParser)
diff --git a/third_party/WebKit/Source/core/html/HTMLStyleElement.h b/third_party/WebKit/Source/core/html/HTMLStyleElement.h index 476052b..6ceae7a 100644 --- a/third_party/WebKit/Source/core/html/HTMLStyleElement.h +++ b/third_party/WebKit/Source/core/html/HTMLStyleElement.h
@@ -31,7 +31,7 @@ class HTMLStyleElement; template<typename T> class EventSender; -typedef EventSender<HTMLStyleElement> StyleEventSender; +using StyleEventSender = EventSender<HTMLStyleElement>; class HTMLStyleElement final : public HTMLElement, private StyleElement { DEFINE_WRAPPERTYPEINFO();
diff --git a/third_party/WebKit/Source/core/inspector/v8/V8DebuggerImpl.cpp b/third_party/WebKit/Source/core/inspector/v8/V8DebuggerImpl.cpp index 2e1e1d1..d5ea6313 100644 --- a/third_party/WebKit/Source/core/inspector/v8/V8DebuggerImpl.cpp +++ b/third_party/WebKit/Source/core/inspector/v8/V8DebuggerImpl.cpp
@@ -38,6 +38,7 @@ #include "core/inspector/v8/V8DebuggerClient.h" #include "core/inspector/v8/V8JavaScriptCallFrame.h" #include "platform/JSONValues.h" +#include "wtf/Atomics.h" #include "wtf/Vector.h" #include "wtf/text/CString.h" @@ -46,6 +47,7 @@ namespace { const char stepIntoV8MethodName[] = "stepIntoStatement"; const char stepOutV8MethodName[] = "stepOutOfFunction"; +volatile int s_lastContextId = 0; } static bool inLiveEditScope = false; @@ -102,8 +104,7 @@ void V8Debugger::setContextDebugData(v8::Local<v8::Context> context, const String& type, int contextGroupId) { - static int contextIdCounter = 0; - int contextId = ++contextIdCounter; + int contextId = atomicIncrement(&s_lastContextId); String debugData = String::number(contextGroupId) + "," + String::number(contextId) + "," + type; v8::HandleScope scope(context->GetIsolate()); v8::Context::Scope contextScope(context);
diff --git a/third_party/WebKit/Source/core/layout/LayoutBlock.cpp b/third_party/WebKit/Source/core/layout/LayoutBlock.cpp index 8880743c6..7daa88b77 100644 --- a/third_party/WebKit/Source/core/layout/LayoutBlock.cpp +++ b/third_party/WebKit/Source/core/layout/LayoutBlock.cpp
@@ -374,32 +374,6 @@ invalidateDisplayItemClientForStartOfContinuationsIfNeeded(*this); } -static void addNextFloatingOrOutOfFlowSiblingsToBlock(LayoutBlock* block, LayoutBlock* container) -{ - if (block->beingDestroyed()) - return; - - LayoutObject* child = block->nextSibling(); - while (child && child->isFloatingOrOutOfFlowPositioned()) { - LayoutObject* sibling = child->nextSibling(); - container->moveChildTo(block, child, nullptr, false); - child = sibling; - } -} - -static void addPreviousFloatingOrOutOfFlowSiblingsToBlock(LayoutBlock* block, LayoutBlock* container) -{ - if (block->beingDestroyed()) - return; - - LayoutObject* child = block->previousSibling(); - while (child && child->isFloatingOrOutOfFlowPositioned()) { - LayoutObject* sibling = child->previousSibling(); - container->moveChildTo(block, child, block->firstChild(), false); - child = sibling; - } -} - void LayoutBlock::addChildIgnoringContinuation(LayoutObject* newChild, LayoutObject* beforeChild) { if (beforeChild && beforeChild->parent() != this) { @@ -474,9 +448,19 @@ LayoutBlock* newBox = createAnonymousBlock(); LayoutBox::addChild(newBox, beforeChild); // Reparent adjacent floating or out-of-flow siblings to the new box. - addPreviousFloatingOrOutOfFlowSiblingsToBlock(newBox, this); + LayoutObject* child = newBox->previousSibling(); + while (child && child->isFloatingOrOutOfFlowPositioned()) { + LayoutObject* sibling = child->previousSibling(); + moveChildTo(newBox, child, newBox->firstChild(), false); + child = sibling; + } newBox->addChild(newChild); - addNextFloatingOrOutOfFlowSiblingsToBlock(newBox, this); + child = newBox->nextSibling(); + while (child && child->isFloatingOrOutOfFlowPositioned()) { + LayoutObject* sibling = child->nextSibling(); + moveChildTo(newBox, child, nullptr, false); + child = sibling; + } return; } } @@ -754,13 +738,6 @@ && (!anonymousBlock->previousSibling() || (anonymousBlock->previousSibling()->style()->styleType() != NOPSEUDO && anonymousBlock->previousSibling()->isFloating() && !anonymousBlock->previousSibling()->previousSibling())) && (!anonymousBlock->nextSibling() || (anonymousBlock->nextSibling()->style()->styleType() != NOPSEUDO && anonymousBlock->nextSibling()->isFloating() && !anonymousBlock->nextSibling()->nextSibling()))) { collapseAnonymousBlockChild(this, anonymousBlock); - } else { - // If we have floating or out-of-flow siblings now adjacent to an anonymous block, fold them - // into it. - if (prev && prev->isAnonymousBlock()) - addNextFloatingOrOutOfFlowSiblingsToBlock(toLayoutBlock(prev), this); - else if (next && next->isAnonymousBlock()) - addPreviousFloatingOrOutOfFlowSiblingsToBlock(toLayoutBlock(next), this); } }
diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.cpp b/third_party/WebKit/Source/core/layout/LayoutObject.cpp index 9b54b8c..2f3fd7d 100644 --- a/third_party/WebKit/Source/core/layout/LayoutObject.cpp +++ b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
@@ -1796,7 +1796,9 @@ // skipped or we will miss invalidating decorations (e.g., underlines). || (isText() && !isBR() && toLayoutText(this)->hasTextBoxes()) // Caret is painted in text color. - || (isLayoutBlock() && toLayoutBlock(this)->hasCaret())) + || (isLayoutBlock() && toLayoutBlock(this)->hasCaret()) + || (isSVG() && style()->svgStyle().isFillColorCurrentColor()) + || (isSVG() && style()->svgStyle().isStrokeColorCurrentColor())) diff.setNeedsPaintInvalidationObject(); }
diff --git a/third_party/WebKit/Source/core/layout/LayoutTableSection.cpp b/third_party/WebKit/Source/core/layout/LayoutTableSection.cpp index baae67a..a8f3d77 100644 --- a/third_party/WebKit/Source/core/layout/LayoutTableSection.cpp +++ b/third_party/WebKit/Source/core/layout/LayoutTableSection.cpp
@@ -80,8 +80,8 @@ void CellSpan::ensureConsistency(const unsigned maximumSpanSize) { - static_assert(WTF::IsSameType<decltype(m_start), unsigned>::value, "Asserts below assume m_start is unsigned"); - static_assert(WTF::IsSameType<decltype(m_end), unsigned>::value, "Asserts below assume m_end is unsigned"); + static_assert(std::is_same<decltype(m_start), unsigned>::value, "Asserts below assume m_start is unsigned"); + static_assert(std::is_same<decltype(m_end), unsigned>::value, "Asserts below assume m_end is unsigned"); RELEASE_ASSERT(m_start <= maximumSpanSize); RELEASE_ASSERT(m_end <= maximumSpanSize); RELEASE_ASSERT(m_start <= m_end);
diff --git a/third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h b/third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h index 965ee4b..9495aad 100644 --- a/third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h +++ b/third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h
@@ -72,7 +72,6 @@ , m_atStart(true) , m_ignoringSpaces(false) , m_currentCharacterIsSpace(false) - , m_currentCharacterShouldCollapseIfPreWap(false) , m_appliedStartWidth(appliedStartWidth) , m_includeEndWidth(true) , m_autoWrap(false) @@ -101,7 +100,7 @@ void handleEmptyInline(); void handleReplaced(); bool handleText(WordMeasurements&, bool& hyphenated); - void prepareForNextCharacter(const LineLayoutText&, bool& prohibitBreakInside, bool previousCharacterIsSpace, bool previousCharacterShouldCollapseIfPreWap); + void prepareForNextCharacter(const LineLayoutText&, bool& prohibitBreakInside, bool previousCharacterIsSpace); bool canBreakAtWhitespace(bool breakWords, WordMeasurement&, bool stoppedIgnoringSpaces, bool& hyphenated, float charWidth, float& hyphenWidth, bool betweenWords, bool midWordBreak, bool breakAll, bool previousCharacterIsSpace, float lastWidthMeasurement, const LineLayoutText&, const Font&, bool applyWordSpacing, float wordSpacing); bool trailingSpaceExceedsAvailableWidth(bool midWordBreak, const LineLayoutText&, WordMeasurement&, bool applyWordSpacing, bool wordSpacing, const Font&); WordMeasurement& calculateWordWidth(WordMeasurements&, LineLayoutText&, unsigned lastSpace, float& lastWidthMeasurement, float wordSpacingForWordMeasurement, const Font&, float wordTrailingSpaceWidth, UChar); @@ -146,7 +145,6 @@ bool m_atStart; bool m_ignoringSpaces; bool m_currentCharacterIsSpace; - bool m_currentCharacterShouldCollapseIfPreWap; bool m_appliedStartWidth; bool m_includeEndWidth; bool m_autoWrap; @@ -273,15 +271,15 @@ m_preservesNewline = !isSVGText && ComputedStyle::preserveNewline(m_currWS); m_collapseWhiteSpace = ComputedStyle::collapseWhiteSpace(m_currWS); + + // Ensure the whitespace in constructions like '<span style="white-space: pre-wrap">text <span><span> text</span>' + // does not collapse. + if (m_collapseWhiteSpace && !ComputedStyle::collapseWhiteSpace(m_lastWS)) + m_currentCharacterIsSpace = false; } inline void BreakingContext::increment() { - // Clear out our character space bool, since inline <pre>s don't collapse whitespace - // with adjacent inline normal/nowrap spans. - if (!m_collapseWhiteSpace) - m_currentCharacterIsSpace = false; - m_current.moveToStartOf(m_nextObject); // When the line box tree is created, this position in the line will be snapped to @@ -454,7 +452,7 @@ && shouldSkipWhitespaceAfterStartObject(m_block, m_current.object(), m_lineMidpointState)) { // If this object is at the start of the line, we need to behave like list markers and // start ignoring spaces. - m_currentCharacterShouldCollapseIfPreWap = m_currentCharacterIsSpace = true; + m_currentCharacterIsSpace = true; m_ignoringSpaces = true; } else { // If we are after a trailing space but aren't ignoring spaces yet then ensure we get a linebox @@ -486,7 +484,7 @@ m_lineInfo.setEmpty(false, m_block, &m_width); m_ignoringSpaces = false; - m_currentCharacterShouldCollapseIfPreWap = m_currentCharacterIsSpace = false; + m_currentCharacterIsSpace = false; m_trailingObjects.clear(); // Optimize for a common case. If we can't find whitespace after the list @@ -496,7 +494,7 @@ if (m_blockStyle->collapseWhiteSpace() && shouldSkipWhitespaceAfterStartObject(m_block, m_current.object(), m_lineMidpointState)) { // Like with inline flows, we start ignoring spaces to make sure that any // additional spaces we see will be discarded. - m_currentCharacterShouldCollapseIfPreWap = m_currentCharacterIsSpace = true; + m_currentCharacterIsSpace = true; m_ignoringSpaces = true; } if (LineLayoutListMarker(m_current.object()).isInside()) @@ -613,9 +611,8 @@ UChar secondToLastCharacter = m_layoutTextInfo.m_lineBreakIterator.secondToLastCharacter(); for (; m_current.offset() < layoutText.textLength(); m_current.fastIncrementInTextNode()) { bool previousCharacterIsSpace = m_currentCharacterIsSpace; - bool previousCharacterShouldCollapseIfPreWap = m_currentCharacterShouldCollapseIfPreWap; UChar c = m_current.current(); - m_currentCharacterShouldCollapseIfPreWap = m_currentCharacterIsSpace = c == spaceCharacter || c == tabulationCharacter || (!m_preservesNewline && (c == newlineCharacter)); + m_currentCharacterIsSpace = c == spaceCharacter || c == tabulationCharacter || (!m_preservesNewline && (c == newlineCharacter)); if (!m_collapseWhiteSpace || !m_currentCharacterIsSpace) m_lineInfo.setEmpty(false, m_block, &m_width); @@ -650,7 +647,7 @@ stopIgnoringSpaces(lastSpace); } - prepareForNextCharacter(layoutText, prohibitBreakInside, previousCharacterIsSpace, previousCharacterShouldCollapseIfPreWap); + prepareForNextCharacter(layoutText, prohibitBreakInside, previousCharacterIsSpace); m_atStart = false; nextCharacter(c, lastCharacter, secondToLastCharacter); continue; @@ -750,7 +747,7 @@ } } - prepareForNextCharacter(layoutText, prohibitBreakInside, previousCharacterIsSpace, previousCharacterShouldCollapseIfPreWap); + prepareForNextCharacter(layoutText, prohibitBreakInside, previousCharacterIsSpace); m_atStart = false; nextCharacter(c, lastCharacter, secondToLastCharacter); } @@ -794,7 +791,7 @@ return false; } -inline void BreakingContext::prepareForNextCharacter(const LineLayoutText& layoutText, bool& prohibitBreakInside, bool previousCharacterIsSpace, bool previousCharacterShouldCollapseIfPreWap) +inline void BreakingContext::prepareForNextCharacter(const LineLayoutText& layoutText, bool& prohibitBreakInside, bool previousCharacterIsSpace) { if (layoutText.isSVGInlineText() && m_current.offset()) { // Force creation of new InlineBoxes for each absolute positioned character (those that start new text chunks). @@ -809,7 +806,7 @@ m_startOfIgnoredSpaces.setObject(m_current.object()); m_startOfIgnoredSpaces.setOffset(m_current.offset()); } - if (!m_currentCharacterIsSpace && previousCharacterShouldCollapseIfPreWap) { + if (!m_currentCharacterIsSpace && previousCharacterIsSpace) { if (m_autoWrap && m_currentStyle->breakOnlyAfterWhiteSpace()) m_lineBreak.moveTo(m_current.object(), m_current.offset(), m_current.nextBreakablePosition()); }
diff --git a/third_party/WebKit/Source/core/loader/ImageLoader.cpp b/third_party/WebKit/Source/core/loader/ImageLoader.cpp index 7c9b956f..29410d0 100644 --- a/third_party/WebKit/Source/core/loader/ImageLoader.cpp +++ b/third_party/WebKit/Source/core/loader/ImageLoader.cpp
@@ -54,14 +54,14 @@ static ImageEventSender& loadEventSender() { - DEFINE_STATIC_LOCAL(ImageEventSender, sender, (EventTypeNames::load)); - return sender; + DEFINE_STATIC_LOCAL(OwnPtrWillBePersistent<ImageEventSender>, sender, (ImageEventSender::create(EventTypeNames::load))); + return *sender; } static ImageEventSender& errorEventSender() { - DEFINE_STATIC_LOCAL(ImageEventSender, sender, (EventTypeNames::error)); - return sender; + DEFINE_STATIC_LOCAL(OwnPtrWillBePersistent<ImageEventSender>, sender, (ImageEventSender::create(EventTypeNames::error))); + return *sender; } static inline bool pageIsBeingDismissed(Document* document) @@ -181,6 +181,7 @@ if (m_image) m_image->removeClient(this); +#if !ENABLE(OILPAN) ASSERT(m_hasPendingLoadEvent || !loadEventSender().hasPendingEvents(this)); if (m_hasPendingLoadEvent) loadEventSender().cancelEvent(this); @@ -188,6 +189,7 @@ ASSERT(m_hasPendingErrorEvent || !errorEventSender().hasPendingEvents(this)); if (m_hasPendingErrorEvent) errorEventSender().cancelEvent(this); +#endif } #if ENABLE(OILPAN)
diff --git a/third_party/WebKit/Source/core/loader/ImageLoader.h b/third_party/WebKit/Source/core/loader/ImageLoader.h index 0625d325..284a19ad 100644 --- a/third_party/WebKit/Source/core/loader/ImageLoader.h +++ b/third_party/WebKit/Source/core/loader/ImageLoader.h
@@ -56,7 +56,7 @@ class LayoutImageResource; template<typename T> class EventSender; -typedef EventSender<ImageLoader> ImageEventSender; +using ImageEventSender = EventSender<ImageLoader>; class CORE_EXPORT ImageLoader : public NoBaseWillBeGarbageCollectedFinalized<ImageLoader>, public ImageResourceClient { WILL_BE_USING_PRE_FINALIZER(ImageLoader, dispose);
diff --git a/third_party/WebKit/Source/core/page/FrameTree.cpp b/third_party/WebKit/Source/core/page/FrameTree.cpp index 7d7db09c..a4816ad 100644 --- a/third_party/WebKit/Source/core/page/FrameTree.cpp +++ b/third_party/WebKit/Source/core/page/FrameTree.cpp
@@ -262,13 +262,12 @@ // Search the entire tree of each of the other pages in this namespace. // FIXME: Is random order OK? - const WillBePersistentHeapHashSet<RawPtrWillBeWeakMember<Page>>& pages = Page::ordinaryPages(); - for (const Page* otherPage : pages) { - if (otherPage != page) { - for (Frame* frame = otherPage->mainFrame(); frame; frame = frame->tree().traverseNext()) { - if (frame->tree().name() == name) - return frame; - } + for (const Page* otherPage : Page::ordinaryPages()) { + if (otherPage == page) + continue; + for (Frame* frame = otherPage->mainFrame(); frame; frame = frame->tree().traverseNext()) { + if (frame->tree().name() == name) + return frame; } }
diff --git a/third_party/WebKit/Source/core/page/Page.cpp b/third_party/WebKit/Source/core/page/Page.cpp index 42c9eb6..6ed312c2 100644 --- a/third_party/WebKit/Source/core/page/Page.cpp +++ b/third_party/WebKit/Source/core/page/Page.cpp
@@ -54,17 +54,17 @@ namespace blink { -// static -WillBePersistentHeapHashSet<RawPtrWillBeWeakMember<Page>>& Page::allPages() +// Set of all live pages; includes internal Page objects that are +// not observable from scripts. +static Page::PageSet& allPages() { - DEFINE_STATIC_LOCAL(WillBePersistentHeapHashSet<RawPtrWillBeWeakMember<Page>>, allPages, ()); + DEFINE_STATIC_LOCAL(Page::PageSet, allPages, ()); return allPages; } -// static -WillBePersistentHeapHashSet<RawPtrWillBeWeakMember<Page>>& Page::ordinaryPages() +Page::PageSet& Page::ordinaryPages() { - DEFINE_STATIC_LOCAL(WillBePersistentHeapHashSet<RawPtrWillBeWeakMember<Page>>, ordinaryPages, ()); + DEFINE_STATIC_LOCAL(Page::PageSet, ordinaryPages, ()); return ordinaryPages; } @@ -82,15 +82,15 @@ } AtomicString eventName = online ? EventTypeNames::online : EventTypeNames::offline; - for (unsigned i = 0; i < frames.size(); i++) { - frames[i]->domWindow()->dispatchEvent(Event::create(eventName)); - InspectorInstrumentation::networkStateChanged(frames[i].get(), online); + for (const auto& frame : frames) { + frame->domWindow()->dispatchEvent(Event::create(eventName)); + InspectorInstrumentation::networkStateChanged(frame.get(), online); } } void Page::onMemoryPressure() { - for (auto& page : ordinaryPages()) + for (Page* page : ordinaryPages()) page->memoryPurgeController().purgeMemory(); } @@ -104,6 +104,14 @@ return page->deviceScaleFactor(); } +PassOwnPtrWillBeRawPtr<Page> Page::createOrdinary(PageClients& pageClients) +{ + OwnPtrWillBeRawPtr<Page> page = create(pageClients); + ordinaryPages().add(page.get()); + page->memoryPurgeController().registerClient(page.get()); + return page.release(); +} + Page::Page(PageClients& pageClients) : SettingsDelegate(Settings::create()) , m_animator(PageAnimator::create(*this)) @@ -144,13 +152,6 @@ ASSERT(!m_mainFrame); } -void Page::makeOrdinary() -{ - ASSERT(!ordinaryPages().contains(this)); - ordinaryPages().add(this); - memoryPurgeController().registerClient(this); -} - ViewportDescription Page::viewportDescription() const { return mainFrame() && mainFrame()->isLocalFrame() && deprecatedLocalMainFrame()->document() ? deprecatedLocalMainFrame()->document()->viewportDescription() : ViewportDescription(); @@ -553,6 +554,11 @@ m_scrollingCoordinator->willCloseLayerTreeView(layerTreeView); } +void Page::willBeClosed() +{ + ordinaryPages().remove(this); +} + void Page::willBeDestroyed() { RefPtrWillBeRawPtr<Frame> mainFrame = m_mainFrame; @@ -575,7 +581,7 @@ m_validationMessageClient->willBeDestroyed(); m_mainFrame = nullptr; - Page::notifyContextDestroyed(); + PageLifecycleNotifier::notifyContextDestroyed(); } Page::PageClients::PageClients()
diff --git a/third_party/WebKit/Source/core/page/Page.h b/third_party/WebKit/Source/core/page/Page.h index 27b3abc..3293c47 100644 --- a/third_party/WebKit/Source/core/page/Page.h +++ b/third_party/WebKit/Source/core/page/Page.h
@@ -76,9 +76,6 @@ WTF_MAKE_NONCOPYABLE(Page); friend class Settings; public: - static void platformColorsChanged(); - static void onMemoryPressure(); - // It is up to the platform to ensure that non-null clients are provided where required. struct CORE_EXPORT PageClients final { STACK_ALLOCATED(); @@ -94,16 +91,29 @@ SpellCheckerClient* spellCheckerClient; }; - explicit Page(PageClients&); + static PassOwnPtrWillBeRawPtr<Page> create(PageClients& pageClients) + { + return adoptPtrWillBeNoop(new Page(pageClients)); + } + + // An "ordinary" page is a fully-featured page owned by a web view. + static PassOwnPtrWillBeRawPtr<Page> createOrdinary(PageClients&); + ~Page() override; - void makeOrdinary(); + void willBeClosed(); - // This method returns all pages, incl. private ones associated with - // inspector overlay, popups, SVGImage, etc. - static WillBePersistentHeapHashSet<RawPtrWillBeWeakMember<Page>>& allPages(); - // This method returns all ordinary pages. - static WillBePersistentHeapHashSet<RawPtrWillBeWeakMember<Page>>& ordinaryPages(); + using PageSet = WillBePersistentHeapHashSet<RawPtrWillBeWeakMember<Page>>; + + // Return the current set of full-fledged, ordinary pages. + // Each created and owned by a WebView. + // + // This set does not include Pages created for other, internal purposes + // (SVGImages, inspector overlays, page popups etc.) + static PageSet& ordinaryPages(); + + static void platformColorsChanged(); + static void onMemoryPressure(); FrameHost& frameHost() const { return *m_frameHost; } @@ -215,6 +225,8 @@ void willBeDestroyed(); private: + explicit Page(PageClients&); + void initGroup(); void setNeedsLayoutInAllFrames();
diff --git a/third_party/WebKit/Source/core/page/PrintContext.cpp b/third_party/WebKit/Source/core/page/PrintContext.cpp index 3bcbfa79..1dc1f19 100644 --- a/third_party/WebKit/Source/core/page/PrintContext.cpp +++ b/third_party/WebKit/Source/core/page/PrintContext.cpp
@@ -150,6 +150,9 @@ void PrintContext::begin(float width, float height) { + ASSERT(width > 0); + ASSERT(height > 0); + // This function can be called multiple times to adjust printing parameters without going back to screen mode. m_isPrinting = true;
diff --git a/third_party/WebKit/Source/core/page/ScopedPageLoadDeferrer.cpp b/third_party/WebKit/Source/core/page/ScopedPageLoadDeferrer.cpp index 1aec6fb..9ef36dc 100644 --- a/third_party/WebKit/Source/core/page/ScopedPageLoadDeferrer.cpp +++ b/third_party/WebKit/Source/core/page/ScopedPageLoadDeferrer.cpp
@@ -32,41 +32,36 @@ ScopedPageLoadDeferrer::ScopedPageLoadDeferrer(Page* exclusion) { - const WillBePersistentHeapHashSet<RawPtrWillBeWeakMember<Page>>& pages = Page::ordinaryPages(); - for (const Page* page : pages) { + for (const Page* page : Page::ordinaryPages()) { if (page == exclusion || page->defersLoading()) continue; - if (page->mainFrame()->isLocalFrame()) { - m_deferredFrames.append(page->deprecatedLocalMainFrame()); + if (!page->mainFrame()->isLocalFrame()) + continue; - // Ensure that we notify the client if the initial empty document is accessed before - // showing anything modal, to prevent spoofs while the modal window or sheet is visible. - page->deprecatedLocalMainFrame()->loader().notifyIfInitialDocumentAccessed(); - } + m_deferredFrames.append(page->deprecatedLocalMainFrame()); + + // Ensure that we notify the client if the initial empty document is accessed before + // showing anything modal, to prevent spoofs while the modal window or sheet is visible. + page->deprecatedLocalMainFrame()->loader().notifyIfInitialDocumentAccessed(); } - size_t count = m_deferredFrames.size(); - for (size_t i = 0; i < count; ++i) { - if (Page* page = m_deferredFrames[i]->page()) - page->setDefersLoading(true); - } + setDefersLoading(true); Platform::current()->currentThread()->scheduler()->suspendTimerQueue(); } -void ScopedPageLoadDeferrer::detach() -{ - for (size_t i = 0; i < m_deferredFrames.size(); ++i) { - if (Page* page = m_deferredFrames[i]->page()) - page->setDefersLoading(false); - } - - Platform::current()->currentThread()->scheduler()->resumeTimerQueue(); -} - ScopedPageLoadDeferrer::~ScopedPageLoadDeferrer() { - detach(); + setDefersLoading(false); + Platform::current()->currentThread()->scheduler()->resumeTimerQueue(); +} + +void ScopedPageLoadDeferrer::setDefersLoading(bool isDeferred) +{ + for (const auto& frame : m_deferredFrames) { + if (Page* page = frame->page()) + page->setDefersLoading(isDeferred); + } } } // namespace blink
diff --git a/third_party/WebKit/Source/core/page/ScopedPageLoadDeferrer.h b/third_party/WebKit/Source/core/page/ScopedPageLoadDeferrer.h index 3fcab45..93e31fee9 100644 --- a/third_party/WebKit/Source/core/page/ScopedPageLoadDeferrer.h +++ b/third_party/WebKit/Source/core/page/ScopedPageLoadDeferrer.h
@@ -38,7 +38,7 @@ ~ScopedPageLoadDeferrer(); private: - void detach(); + void setDefersLoading(bool); Vector<RefPtrWillBePersistent<LocalFrame>, 16> m_deferredFrames; };
diff --git a/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp b/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp index 214810c..06fa39a4 100644 --- a/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp +++ b/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
@@ -629,6 +629,9 @@ setHasVerticalScrollbar(hasVerticalOverflow); else if (box().style()->overflowY() == OSCROLL) setHasVerticalScrollbar(true); + // If vertical scrollbar existence has changed, LTR blocks need to update scroll origin to account + // for left-hand vertical scrollbar width. + computeScrollDimensions(); } }
diff --git a/third_party/WebKit/Source/core/style/SVGComputedStyle.h b/third_party/WebKit/Source/core/style/SVGComputedStyle.h index 443f1783..9db42be 100644 --- a/third_party/WebKit/Source/core/style/SVGComputedStyle.h +++ b/third_party/WebKit/Source/core/style/SVGComputedStyle.h
@@ -363,6 +363,22 @@ const Color& visitedLinkStrokePaintColor() const { return stroke->visitedLinkPaintColor; } const String& visitedLinkStrokePaintUri() const { return stroke->visitedLinkPaintUri; } + bool isFillColorCurrentColor() const + { + return fillPaintType() == SVG_PAINTTYPE_CURRENTCOLOR + || visitedLinkFillPaintType() == SVG_PAINTTYPE_CURRENTCOLOR + || fillPaintType() == SVG_PAINTTYPE_URI_CURRENTCOLOR + || visitedLinkFillPaintType() == SVG_PAINTTYPE_URI_CURRENTCOLOR; + } + + bool isStrokeColorCurrentColor() const + { + return strokePaintType() == SVG_PAINTTYPE_CURRENTCOLOR + || visitedLinkStrokePaintType() == SVG_PAINTTYPE_CURRENTCOLOR + || strokePaintType() == SVG_PAINTTYPE_URI_CURRENTCOLOR + || visitedLinkStrokePaintType() == SVG_PAINTTYPE_URI_CURRENTCOLOR; + } + // convenience bool hasClipper() const { return !clipperResource().isEmpty(); } bool hasMasker() const { return !maskerResource().isEmpty(); }
diff --git a/third_party/WebKit/Source/core/svg/SVGStyleElement.cpp b/third_party/WebKit/Source/core/svg/SVGStyleElement.cpp index d53822eb..b27ec3f 100644 --- a/third_party/WebKit/Source/core/svg/SVGStyleElement.cpp +++ b/third_party/WebKit/Source/core/svg/SVGStyleElement.cpp
@@ -31,8 +31,8 @@ static SVGStyleEventSender& styleErrorEventSender() { - DEFINE_STATIC_LOCAL(SVGStyleEventSender, sharedErrorEventSender, (EventTypeNames::error)); - return sharedErrorEventSender; + DEFINE_STATIC_LOCAL(OwnPtrWillBePersistent<SVGStyleEventSender>, sharedErrorEventSender, (SVGStyleEventSender::create(EventTypeNames::error))); + return *sharedErrorEventSender; } inline SVGStyleElement::SVGStyleElement(Document& document, bool createdByParser) @@ -45,9 +45,9 @@ { #if !ENABLE(OILPAN) StyleElement::clearDocumentData(document(), this); -#endif styleErrorEventSender().cancelEvent(this); +#endif } PassRefPtrWillBeRawPtr<SVGStyleElement> SVGStyleElement::create(Document& document, bool createdByParser)
diff --git a/third_party/WebKit/Source/core/svg/SVGStyleElement.h b/third_party/WebKit/Source/core/svg/SVGStyleElement.h index 1c36a2f..f316e82 100644 --- a/third_party/WebKit/Source/core/svg/SVGStyleElement.h +++ b/third_party/WebKit/Source/core/svg/SVGStyleElement.h
@@ -29,7 +29,7 @@ namespace blink { -typedef EventSender<SVGStyleElement> SVGStyleEventSender; +using SVGStyleEventSender = EventSender<SVGStyleElement>; class SVGStyleElement final : public SVGElement , public StyleElement {
diff --git a/third_party/WebKit/Source/core/svg/SVGUseElement.cpp b/third_party/WebKit/Source/core/svg/SVGUseElement.cpp index 41ad6c1..cb20a0a 100644 --- a/third_party/WebKit/Source/core/svg/SVGUseElement.cpp +++ b/third_party/WebKit/Source/core/svg/SVGUseElement.cpp
@@ -46,8 +46,8 @@ static SVGUseEventSender& svgUseLoadEventSender() { - DEFINE_STATIC_LOCAL(SVGUseEventSender, sharedLoadEventSender, (EventTypeNames::load)); - return sharedLoadEventSender; + DEFINE_STATIC_LOCAL(OwnPtrWillBePersistent<SVGUseEventSender>, sharedLoadEventSender, (SVGUseEventSender::create(EventTypeNames::load))); + return *sharedLoadEventSender; } inline SVGUseElement::SVGUseElement(Document& document) @@ -82,8 +82,8 @@ #if !ENABLE(OILPAN) clearShadowTree(); cancelShadowTreeRecreation(); -#endif svgUseLoadEventSender().cancelEvent(this); +#endif } DEFINE_TRACE(SVGUseElement)
diff --git a/third_party/WebKit/Source/core/svg/SVGUseElement.h b/third_party/WebKit/Source/core/svg/SVGUseElement.h index ff14e9f..cb7702f 100644 --- a/third_party/WebKit/Source/core/svg/SVGUseElement.h +++ b/third_party/WebKit/Source/core/svg/SVGUseElement.h
@@ -31,7 +31,7 @@ namespace blink { -typedef EventSender<SVGUseElement> SVGUseEventSender; +using SVGUseEventSender = EventSender<SVGUseElement>; class SVGUseElement final : public SVGGraphicsElement, public SVGURIReference,
diff --git a/third_party/WebKit/Source/core/svg/animation/SVGSMILElement.cpp b/third_party/WebKit/Source/core/svg/animation/SVGSMILElement.cpp index f66c9cc3..2f4c6b3 100644 --- a/third_party/WebKit/Source/core/svg/animation/SVGSMILElement.cpp +++ b/third_party/WebKit/Source/core/svg/animation/SVGSMILElement.cpp
@@ -81,26 +81,26 @@ static SMILEventSender& smilEndEventSender() { - DEFINE_STATIC_LOCAL(SMILEventSender, sender, (EventTypeNames::endEvent)); - return sender; + DEFINE_STATIC_LOCAL(OwnPtrWillBePersistent<SMILEventSender>, sender, (SMILEventSender::create(EventTypeNames::endEvent))); + return *sender; } static SMILEventSender& smilBeginEventSender() { - DEFINE_STATIC_LOCAL(SMILEventSender, sender, (EventTypeNames::beginEvent)); - return sender; + DEFINE_STATIC_LOCAL(OwnPtrWillBePersistent<SMILEventSender>, sender, (SMILEventSender::create(EventTypeNames::beginEvent))); + return *sender; } static SMILEventSender& smilRepeatEventSender() { - DEFINE_STATIC_LOCAL(SMILEventSender, sender, (EventTypeNames::repeatEvent)); - return sender; + DEFINE_STATIC_LOCAL(OwnPtrWillBePersistent<SMILEventSender>, sender, (SMILEventSender::create(EventTypeNames::repeatEvent))); + return *sender; } static SMILEventSender& smilRepeatNEventSender() { - DEFINE_STATIC_LOCAL(SMILEventSender, sender, (AtomicString("repeatn", AtomicString::ConstructFromLiteral))); - return sender; + DEFINE_STATIC_LOCAL(OwnPtrWillBePersistent<SMILEventSender>, sender, (SMILEventSender::create(AtomicString("repeatn", AtomicString::ConstructFromLiteral)))); + return *sender; } // This is used for duration type time values that can't be negative. @@ -206,12 +206,10 @@ { #if !ENABLE(OILPAN) clearResourceAndEventBaseReferences(); -#endif smilEndEventSender().cancelEvent(this); smilBeginEventSender().cancelEvent(this); smilRepeatEventSender().cancelEvent(this); smilRepeatNEventSender().cancelEvent(this); -#if !ENABLE(OILPAN) clearConditions(); unscheduleIfScheduled();
diff --git a/third_party/WebKit/Source/core/svg/animation/SVGSMILElement.h b/third_party/WebKit/Source/core/svg/animation/SVGSMILElement.h index 0386af82..5fdd910 100644 --- a/third_party/WebKit/Source/core/svg/animation/SVGSMILElement.h +++ b/third_party/WebKit/Source/core/svg/animation/SVGSMILElement.h
@@ -31,7 +31,7 @@ #include "core/svg/SVGElement.h" #include "core/svg/SVGTests.h" #include "core/svg/animation/SMILTime.h" -#include "platform/heap/Heap.h" +#include "platform/heap/Handle.h" #include "wtf/HashMap.h" namespace blink { @@ -41,7 +41,7 @@ class SVGSMILElement; template<typename T> class EventSender; -typedef EventSender<SVGSMILElement> SMILEventSender; +using SMILEventSender = EventSender<SVGSMILElement>; // This class implements SMIL interval timing model as needed for SVG animation. class CORE_EXPORT SVGSMILElement : public SVGElement, public SVGTests {
diff --git a/third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp b/third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp index d174f151..0c03f83c 100644 --- a/third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp +++ b/third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp
@@ -468,7 +468,7 @@ OwnPtrWillBeRawPtr<Page> page; { TRACE_EVENT0("blink", "SVGImage::dataChanged::createPage"); - page = adoptPtrWillBeNoop(new Page(pageClients)); + page = Page::create(pageClients); page->settings().setScriptEnabled(false); page->settings().setPluginsEnabled(false); page->settings().setAcceleratedCompositingEnabled(false);
diff --git a/third_party/WebKit/Source/core/testing/DummyPageHolder.cpp b/third_party/WebKit/Source/core/testing/DummyPageHolder.cpp index aa1e1d56..9a6696d 100644 --- a/third_party/WebKit/Source/core/testing/DummyPageHolder.cpp +++ b/third_party/WebKit/Source/core/testing/DummyPageHolder.cpp
@@ -68,7 +68,7 @@ pageClients.dragClient = pageClientsArgument->dragClient; pageClients.spellCheckerClient = pageClientsArgument->spellCheckerClient; } - m_page = adoptPtrWillBeNoop(new Page(pageClients)); + m_page = Page::create(pageClients); Settings& settings = m_page->settings(); // FIXME: http://crbug.com/363843. This needs to find a better way to // not create graphics layers.
diff --git a/third_party/WebKit/Source/core/testing/Internals.cpp b/third_party/WebKit/Source/core/testing/Internals.cpp index fa9e1069..e790d9a 100644 --- a/third_party/WebKit/Source/core/testing/Internals.cpp +++ b/third_party/WebKit/Source/core/testing/Internals.cpp
@@ -1736,11 +1736,16 @@ return counterValueForElement(element); } -int Internals::pageNumber(Element* element, float pageWidth, float pageHeight) +int Internals::pageNumber(Element* element, float pageWidth, float pageHeight, ExceptionState& exceptionState) { if (!element) return 0; + if (pageWidth <= 0 || pageHeight <= 0) { + exceptionState.throwDOMException(V8TypeError, "Page width and height must be larger than 0."); + return 0; + } + return PrintContext::pageNumberForElement(element, FloatSize(pageWidth, pageHeight)); } @@ -1765,11 +1770,16 @@ return iconURLs(document, Favicon | TouchIcon | TouchPrecomposedIcon); } -int Internals::numberOfPages(float pageWidth, float pageHeight) +int Internals::numberOfPages(float pageWidth, float pageHeight, ExceptionState& exceptionState) { if (!frame()) return -1; + if (pageWidth <= 0 || pageHeight <= 0) { + exceptionState.throwDOMException(V8TypeError, "Page width and height must be larger than 0."); + return -1; + } + return PrintContext::numberOfPages(frame(), FloatSize(pageWidth, pageHeight)); }
diff --git a/third_party/WebKit/Source/core/testing/Internals.h b/third_party/WebKit/Source/core/testing/Internals.h index f1ad183d..c535dab 100644 --- a/third_party/WebKit/Source/core/testing/Internals.h +++ b/third_party/WebKit/Source/core/testing/Internals.h
@@ -249,11 +249,11 @@ String counterValue(Element*); - int pageNumber(Element*, float pageWidth = 800, float pageHeight = 600); + int pageNumber(Element*, float pageWidth, float pageHeight, ExceptionState&); Vector<String> shortcutIconURLs(Document*) const; Vector<String> allIconURLs(Document*) const; - int numberOfPages(float pageWidthInPixels = 800, float pageHeightInPixels = 600); + int numberOfPages(float pageWidthInPixels, float pageHeightInPixels, ExceptionState&); String pageProperty(String, int, ExceptionState& = ASSERT_NO_EXCEPTION) const; String pageSizeAndMarginsInPixels(int, int, int, int, int, int, int, ExceptionState& = ASSERT_NO_EXCEPTION) const;
diff --git a/third_party/WebKit/Source/core/testing/Internals.idl b/third_party/WebKit/Source/core/testing/Internals.idl index 5350003d..fa9389c 100644 --- a/third_party/WebKit/Source/core/testing/Internals.idl +++ b/third_party/WebKit/Source/core/testing/Internals.idl
@@ -200,10 +200,10 @@ unsigned long[] setMemoryCacheCapacities(unsigned long minDeadBytes, unsigned long maxDeadBytes, unsigned long totalBytes); DOMString counterValue(Element element); - long pageNumber(Element element, optional float pageWidth, optional float pageHeight); + [RaisesException] long pageNumber(Element element, optional float pageWidth = 800, optional float pageHeight = 600); DOMString[] shortcutIconURLs(Document document); DOMString[] allIconURLs(Document document); - long numberOfPages(optional double pageWidthInPixels, optional double pageHeightInPixels); + [RaisesException] long numberOfPages(optional double pageWidthInPixels = 800, optional double pageHeightInPixels = 600); [RaisesException] DOMString pageProperty(DOMString propertyName, long pageNumber); [RaisesException] DOMString pageSizeAndMarginsInPixels(long pageIndex, long width, long height, long marginTop, long marginRight, long marginBottom, long marginLeft);
diff --git a/third_party/WebKit/Source/core/workers/DedicatedWorkerGlobalScope.cpp b/third_party/WebKit/Source/core/workers/DedicatedWorkerGlobalScope.cpp index c053e23..7e662aba 100644 --- a/third_party/WebKit/Source/core/workers/DedicatedWorkerGlobalScope.cpp +++ b/third_party/WebKit/Source/core/workers/DedicatedWorkerGlobalScope.cpp
@@ -72,12 +72,6 @@ thread()->workerObjectProxy().postMessageToWorkerObject(message, channels.release()); } -void DedicatedWorkerGlobalScope::importScripts(const Vector<String>& urls, ExceptionState& exceptionState) -{ - Base::importScripts(urls, exceptionState); - thread()->workerObjectProxy().reportPendingActivity(hasPendingActivity()); -} - DedicatedWorkerThread* DedicatedWorkerGlobalScope::thread() const { return static_cast<DedicatedWorkerThread*>(Base::thread());
diff --git a/third_party/WebKit/Source/core/workers/DedicatedWorkerGlobalScope.h b/third_party/WebKit/Source/core/workers/DedicatedWorkerGlobalScope.h index 04a347a0..7aa1da8 100644 --- a/third_party/WebKit/Source/core/workers/DedicatedWorkerGlobalScope.h +++ b/third_party/WebKit/Source/core/workers/DedicatedWorkerGlobalScope.h
@@ -53,9 +53,6 @@ void countFeature(UseCounter::Feature) const override; void countDeprecation(UseCounter::Feature) const override; - // Overridden to allow us to check our pending activity after executing imported script. - void importScripts(const Vector<String>& urls, ExceptionState&) override; - // EventTarget const AtomicString& interfaceName() const override;
diff --git a/third_party/WebKit/Source/devtools/front_end/bindings/FileSystemWorkspaceBinding.js b/third_party/WebKit/Source/devtools/front_end/bindings/FileSystemWorkspaceBinding.js index ff7fb06..62b1150c 100644 --- a/third_party/WebKit/Source/devtools/front_end/bindings/FileSystemWorkspaceBinding.js +++ b/third_party/WebKit/Source/devtools/front_end/bindings/FileSystemWorkspaceBinding.js
@@ -68,7 +68,7 @@ */ WebInspector.FileSystemWorkspaceBinding.projectId = function(fileSystemPath) { - return "file://" + fileSystemPath; + return fileSystemPath; } /** @@ -125,7 +125,7 @@ { var fileSystem = /** @type {!WebInspector.IsolatedFileSystem} */ (event.data); var boundFileSystem = new WebInspector.FileSystemWorkspaceBinding.FileSystem(this, fileSystem, this._workspace); - this._boundFileSystems.set(fileSystem.normalizedPath(), boundFileSystem); + this._boundFileSystems.set(fileSystem.path(), boundFileSystem); }, /** @@ -134,9 +134,9 @@ _fileSystemRemoved: function(event) { var fileSystem = /** @type {!WebInspector.IsolatedFileSystem} */ (event.data); - var boundFileSystem = this._boundFileSystems.get(fileSystem.normalizedPath()); + var boundFileSystem = this._boundFileSystems.get(fileSystem.path()); boundFileSystem.dispose(); - this._boundFileSystems.remove(fileSystem.normalizedPath()); + this._boundFileSystems.remove(fileSystem.path()); }, /** @@ -161,7 +161,7 @@ */ fileSystemPath: function(projectId) { - return projectId.substr("file://".length); + return projectId; }, /** @@ -265,7 +265,7 @@ InspectorFrontendHost.events.removeEventListener(InspectorFrontendHostAPI.Events.SearchCompleted, this._onSearchCompleted, this); for (var fileSystem of this._boundFileSystems.values()) { fileSystem.dispose(); - this._boundFileSystems.remove(fileSystem._fileSystem.normalizedPath()); + this._boundFileSystems.remove(fileSystem._fileSystem.path()); } } } @@ -282,15 +282,13 @@ { this._fileSystemWorkspaceBinding = fileSystemWorkspaceBinding; this._fileSystem = isolatedFileSystem; - this._fileSystemBaseURL = "file://" + this._fileSystem.normalizedPath() + "/"; + this._fileSystemBaseURL = this._fileSystem.path() + "/"; this._fileSystemPath = this._fileSystem.path(); var id = WebInspector.FileSystemWorkspaceBinding.projectId(this._fileSystemPath); console.assert(!workspace.project(id)); - var normalizedPath = isolatedFileSystem.normalizedPath(); - var displayName = normalizedPath.substr(normalizedPath.lastIndexOf("/") + 1); - + var displayName = this._fileSystemPath.substr(this._fileSystemPath.lastIndexOf("/") + 1); WebInspector.ProjectStore.call(this, workspace, id, WebInspector.projectTypes.FileSystem, displayName); workspace.addProject(this); @@ -312,7 +310,7 @@ */ _filePathForUISourceCode: function(uiSourceCode) { - return uiSourceCode.path().substring(("file:// " + this._fileSystemPath).length); + return uiSourceCode.path().substring(this._fileSystemPath.length); }, /**
diff --git a/third_party/WebKit/Source/devtools/front_end/common/Settings.js b/third_party/WebKit/Source/devtools/front_end/common/Settings.js index cfa0b15..6944a29 100644 --- a/third_party/WebKit/Source/devtools/front_end/common/Settings.js +++ b/third_party/WebKit/Source/devtools/front_end/common/Settings.js
@@ -399,7 +399,7 @@ } WebInspector.VersionController._currentVersionName = "inspectorVersion"; -WebInspector.VersionController.currentVersion = 17; +WebInspector.VersionController.currentVersion = 18; WebInspector.VersionController.prototype = { updateVersion: function() @@ -682,6 +682,24 @@ setting.set(newValue); }, + _updateVersionFrom17To18: function() + { + var setting = WebInspector.settings.createLocalSetting("workspaceExcludedFolders", {}); + var oldValue = setting.get(); + var newValue = {}; + for (var oldKey in oldValue) { + var newKey = oldKey.replace(/\\/g, "/"); + if (!newKey.startsWith("file://")) { + if (newKey.startsWith("/")) + newKey = "file://" + newKey; + else + newKey = "file:///" + newKey; + } + newValue[newKey] = oldValue[oldKey]; + } + setting.set(newValue); + }, + _migrateSettingsFromLocalStorage: function() { // This step migrates all the settings except for the ones below into the browser profile.
diff --git a/third_party/WebKit/Source/devtools/front_end/settings/EditFileSystemView.js b/third_party/WebKit/Source/devtools/front_end/settings/EditFileSystemView.js index 627629a0..d1be627 100644 --- a/third_party/WebKit/Source/devtools/front_end/settings/EditFileSystemView.js +++ b/third_party/WebKit/Source/devtools/front_end/settings/EditFileSystemView.js
@@ -230,7 +230,7 @@ titles.createChild("div", "file-system-value").textContent = WebInspector.UIString("Folder path"); var fields = content.createChild("div", "file-system-edit-row"); - fields.createChild("div", "file-system-value").appendChild(editor.createInput("urlPrefix", "text", "localhost:8000/url", urlPrefixValidator.bind(this))); + fields.createChild("div", "file-system-value").appendChild(editor.createInput("urlPrefix", "text", "http://localhost:8000/url", urlPrefixValidator.bind(this))); fields.createChild("div", "file-system-separator file-system-separator-invisible"); fields.createChild("div", "file-system-value").appendChild(editor.createInput("pathPrefix", "text", "/path/to/folder/", pathPrefixValidator.bind(this)));
diff --git a/third_party/WebKit/Source/devtools/front_end/workspace/FileSystemMapping.js b/third_party/WebKit/Source/devtools/front_end/workspace/FileSystemMapping.js index 20935a2..83c8b03 100644 --- a/third_party/WebKit/Source/devtools/front_end/workspace/FileSystemMapping.js +++ b/third_party/WebKit/Source/devtools/front_end/workspace/FileSystemMapping.js
@@ -53,12 +53,13 @@ this._fileSystemMappings = {}; for (var fileSystemPath in savedMapping) { var savedFileSystemMappings = savedMapping[fileSystemPath]; + fileSystemPath = WebInspector.IsolatedFileSystem.normalizePath(fileSystemPath); this._fileSystemMappings[fileSystemPath] = []; var fileSystemMappings = this._fileSystemMappings[fileSystemPath]; for (var i = 0; i < savedFileSystemMappings.length; ++i) { var savedEntry = savedFileSystemMappings[i]; - var entry = new WebInspector.FileSystemMapping.Entry(savedEntry.fileSystemPath, savedEntry.urlPrefix, savedEntry.pathPrefix, true); + var entry = new WebInspector.FileSystemMapping.Entry(fileSystemPath, savedEntry.urlPrefix, savedEntry.pathPrefix, true); fileSystemMappings.push(entry); } } @@ -264,7 +265,7 @@ return null; var file = {}; file.fileSystemPath = entry.fileSystemPath; - file.fileURL = "file://" + entry.fileSystemPath + entry.pathPrefix + url.substr(entry.urlPrefix.length); + file.fileURL = entry.fileSystemPath + entry.pathPrefix + url.substr(entry.urlPrefix.length); return file; }, @@ -275,7 +276,7 @@ */ urlForPath: function(fileSystemPath, filePath) { - var relativePath = filePath.substring("file://".length + fileSystemPath.length); + var relativePath = filePath.substring(fileSystemPath.length); var entry = this._mappingEntryForPath(fileSystemPath, relativePath); if (!entry) return ""; @@ -310,7 +311,7 @@ if (filePathCharacter === "/") commonPathSuffixLength = i; } - var pathPrefix = filePath.substring("file://".length + fileSystemPath.length, filePath.length - commonPathSuffixLength); + var pathPrefix = filePath.substring(fileSystemPath.length, filePath.length - commonPathSuffixLength); var urlPrefix = url.substr(0, url.length - commonPathSuffixLength); this.addFileMapping(fileSystemPath, urlPrefix, pathPrefix); },
diff --git a/third_party/WebKit/Source/devtools/front_end/workspace/IsolatedFileSystem.js b/third_party/WebKit/Source/devtools/front_end/workspace/IsolatedFileSystem.js index 3e458d0..78665c1 100644 --- a/third_party/WebKit/Source/devtools/front_end/workspace/IsolatedFileSystem.js +++ b/third_party/WebKit/Source/devtools/front_end/workspace/IsolatedFileSystem.js
@@ -107,8 +107,27 @@ */ WebInspector.IsolatedFileSystem.normalizePath = function(fileSystemPath) { - if (WebInspector.isWin()) - return fileSystemPath.replace(/\\/g, "/"); + fileSystemPath = fileSystemPath.replace(/\\/g, "/"); + if (!fileSystemPath.startsWith("file://")) { + if (fileSystemPath.startsWith("/")) + fileSystemPath = "file://" + fileSystemPath; + else + fileSystemPath = "file:///" + fileSystemPath; + } + return fileSystemPath; +} + +/** + * @param {string} fileSystemPath + * @return {string} + */ +WebInspector.IsolatedFileSystem.denormalizePath = function(fileSystemPath) +{ + fileSystemPath = fileSystemPath.substring("file://".length); + if (WebInspector.isWin()) { + fileSystemPath = fileSystemPath.replace(/\//g, "\\"); + fileSystemPath = fileSystemPath.substring(1); + } return fileSystemPath; } @@ -122,17 +141,6 @@ }, /** - * @return {string} - */ - normalizedPath: function() - { - if (this._normalizedPath) - return this._normalizedPath; - this._normalizedPath = WebInspector.IsolatedFileSystem.normalizePath(this._path); - return this._normalizedPath; - }, - - /** * @param {?Object} projectObject */ _initializeProject: function(projectObject)
diff --git a/third_party/WebKit/Source/devtools/front_end/workspace/IsolatedFileSystemManager.js b/third_party/WebKit/Source/devtools/front_end/workspace/IsolatedFileSystemManager.js index 5869e611..88b8dc25 100644 --- a/third_party/WebKit/Source/devtools/front_end/workspace/IsolatedFileSystemManager.js +++ b/third_party/WebKit/Source/devtools/front_end/workspace/IsolatedFileSystemManager.js
@@ -72,7 +72,7 @@ */ addFileSystem: function(fileSystemPath) { - InspectorFrontendHost.addFileSystem(fileSystemPath); + InspectorFrontendHost.addFileSystem(WebInspector.IsolatedFileSystem.denormalizePath(fileSystemPath)); }, /** @@ -80,7 +80,8 @@ */ removeFileSystem: function(fileSystemPath) { - InspectorFrontendHost.removeFileSystem(fileSystemPath); + + InspectorFrontendHost.removeFileSystem(WebInspector.IsolatedFileSystem.denormalizePath(fileSystemPath)); }, /** @@ -119,7 +120,7 @@ */ _innerAddFileSystem: function(fileSystem) { - var fileSystemPath = fileSystem.fileSystemPath; + var fileSystemPath = WebInspector.IsolatedFileSystem.normalizePath(fileSystem.fileSystemPath); var promise = WebInspector.IsolatedFileSystem.create(this, fileSystemPath, fileSystem.fileSystemName, fileSystem.rootURL); return promise.then(storeFileSystem.bind(this)); @@ -170,6 +171,7 @@ */ _fileSystemRemoved: function(fileSystemPath) { + fileSystemPath = WebInspector.IsolatedFileSystem.normalizePath(fileSystemPath); var isolatedFileSystem = this._fileSystems[fileSystemPath]; delete this._fileSystems[fileSystemPath]; if (isolatedFileSystem) {
diff --git a/third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp b/third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp index d88be11..3dab7c4 100644 --- a/third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp +++ b/third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp
@@ -1639,8 +1639,10 @@ computeAriaOwnsChildren(ownedChildren); for (AXObject* obj = rawFirstChild(); obj; obj = obj->rawNextSibling()) { - if (!axObjectCache().isAriaOwned(obj)) + if (!axObjectCache().isAriaOwned(obj)) { + obj->setParent(this); addChild(obj); + } } addHiddenChildren(); @@ -2165,6 +2167,10 @@ lineBreaks.append(indexForVisiblePosition(visiblePos)); prevVisiblePos = visiblePos; visiblePos = nextLinePosition(visiblePos, 0, HasEditableAXRole); + + // Make sure we always make forward progress. + if (visiblePos.deepEquivalent().compareTo(prevVisiblePos.deepEquivalent()) < 0) + break; } }
diff --git a/third_party/WebKit/Source/modules/storage/StorageArea.cpp b/third_party/WebKit/Source/modules/storage/StorageArea.cpp index e8b98b80..35e82b6 100644 --- a/third_party/WebKit/Source/modules/storage/StorageArea.cpp +++ b/third_party/WebKit/Source/modules/storage/StorageArea.cpp
@@ -161,9 +161,8 @@ void StorageArea::dispatchLocalStorageEvent(const String& key, const String& oldValue, const String& newValue, SecurityOrigin* securityOrigin, const KURL& pageURL, WebStorageArea* sourceAreaInstance, bool originatedInProcess) { - // FIXME: This looks suspicious. Why doesn't this use allPages instead? - const WillBePersistentHeapHashSet<RawPtrWillBeWeakMember<Page>>& pages = Page::ordinaryPages(); - for (Page* page : pages) { + // Iterate over all pages that have a StorageNamespaceController supplement. + for (Page* page : Page::ordinaryPages()) { for (Frame* frame = page->mainFrame(); frame; frame = frame->tree().traverseNext()) { // FIXME: We do not yet have a way to dispatch events to out-of-process frames. if (!frame->isLocalFrame()) @@ -181,9 +180,8 @@ static Page* findPageWithSessionStorageNamespace(const WebStorageNamespace& sessionNamespace) { - // FIXME: This looks suspicious. Why doesn't this use allPages instead? - const WillBePersistentHeapHashSet<RawPtrWillBeWeakMember<Page>>& pages = Page::ordinaryPages(); - for (Page* page : pages) { + // Iterate over all pages that have a StorageNamespaceController supplement. + for (Page* page : Page::ordinaryPages()) { const bool dontCreateIfMissing = false; StorageNamespace* storageNamespace = StorageNamespaceController::from(page)->sessionStorage(dontCreateIfMissing); if (storageNamespace && storageNamespace->isSameNamespace(sessionNamespace))
diff --git a/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp b/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp index 62c65c1e..95cb0ca 100644 --- a/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp +++ b/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp
@@ -858,7 +858,7 @@ void WebGL2RenderingContextBase::texImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, DOMArrayBufferView* pixels) { if (isContextLost() || !validateTexFunc3DTarget("texImage3D", target) - || !validateTexFunc("texImage3D", NotTexSubImage2D, SourceArrayBufferView, target, level, internalformat, width, height, depth, border, format, type, 0, 0, 0) + || !validateTexFunc("texImage3D", NotTexSubImage, SourceArrayBufferView, target, level, internalformat, width, height, depth, border, format, type, 0, 0, 0) || !validateTexFuncData("texImage3D", level, width, height, depth, format, type, pixels, NullAllowed)) return; @@ -876,49 +876,8 @@ tex->setLevelInfo(target, level, internalformat, width, height, depth, type); } -bool WebGL2RenderingContextBase::validateTexSubImage3D(const char* functionName, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, - GLenum format, GLenum type, GLsizei width, GLsizei height, GLsizei depth) -{ - if (!validateTexFunc3DTarget(functionName, target)) - return false; - - WebGLTexture* tex = validateTextureBinding(functionName, target, false); - if (!tex) - return false; - - if (!validateTexFuncLevel(functionName, target, level)) - return false; - - if (!tex->isValid(target, level)) { - synthesizeGLError(GL_INVALID_OPERATION, "texSubImage3D", "no previously defined texture image"); - return false; - } - - // Before checking if it is in the range, check if overflow happens first. - CheckedInt<GLint> maxX = xoffset, maxY = yoffset, maxZ = zoffset; - maxX += width; - maxY += height; - maxZ += depth; - if (!maxX.isValid() || !maxY.isValid() || !maxZ.isValid() - || maxX.value() > tex->getWidth(target, level) - || maxY.value() > tex->getHeight(target, level) - || maxZ.value() > tex->getDepth(target, level)) { - synthesizeGLError(GL_INVALID_VALUE, functionName, "dimensions out of range"); - return false; - } - - GLenum internalformat = tex->getInternalFormat(target, level); - if (!validateTexFuncFormatAndType(functionName, internalformat, format, type, level)) - return false; - - return true; -} - void WebGL2RenderingContextBase::texSubImage3DImpl(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLenum format, GLenum type, Image* image, WebGLImageConversion::ImageHtmlDomSource domSource, bool flipY, bool premultiplyAlpha) { - if (!validateTexSubImage3D("texSubImage3D", target, level, xoffset, yoffset, zoffset, format, type, image->width(), image->height(), 1)) - return; - // All calling functions check isContextLost, so a duplicate check is not needed here. if (type == GL_UNSIGNED_INT_10F_11F_11F_REV) { // The UNSIGNED_INT_10F_11F_11F_REV type pack/unpack isn't implemented. @@ -951,12 +910,11 @@ void WebGL2RenderingContextBase::texSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, DOMArrayBufferView* pixels) { - if (isContextLost() || !pixels || !validateTexSubImage3D("texSubImage3D", target, level, xoffset, yoffset, zoffset, format, type, width, height, depth) - || !validateTexFuncData("texSubImage3D", level, width, height, depth, format, type, pixels, NullAllowed)) + if (isContextLost() || !validateTexFunc3DTarget("texSubImage3D", target) + || !validateTexFunc("texSubImage3D", TexSubImage, SourceArrayBufferView, target, level, 0, width, height, depth, 0, format, type, xoffset, yoffset, zoffset) + || !validateTexFuncData("texSubImage3D", level, width, height, depth, format, type, pixels, NullNotAllowed)) return; - // FIXME: Ensure pixels is large enough to contain the desired texture dimensions. - void* data = pixels->baseAddress(); Vector<uint8_t> tempData; bool changeUnpackParameters = false; @@ -974,7 +932,16 @@ void WebGL2RenderingContextBase::texSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLenum format, GLenum type, ImageData* pixels) { - if (isContextLost() || !pixels || !validateTexSubImage3D("texSubImage3D", target, level, xoffset, yoffset, zoffset, format, type, pixels->width(), pixels->height(), 1)) + if (!pixels) { + synthesizeGLError(GL_INVALID_VALUE, "texSubImage3D", "no image data"); + return; + } + if (pixels->data()->bufferBase()->isNeutered()) { + synthesizeGLError(GL_INVALID_VALUE, "texSubImage3D", "The source data has been neutered."); + return; + } + if (isContextLost() || !validateTexFunc3DTarget("texSubImage3D", target) + || !validateTexFunc("texSubImage3D", TexSubImage, SourceImageData, target, level, 0, pixels->width(), pixels->height(), 1, 0, format, type, xoffset, yoffset, zoffset)) return; if (type == GL_UNSIGNED_INT_10F_11F_11F_REV) { @@ -1000,19 +967,25 @@ void WebGL2RenderingContextBase::texSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLenum format, GLenum type, HTMLImageElement* image, ExceptionState& exceptionState) { - if (isContextLost() || !image || !validateHTMLImageElement("texSubImage3D", image, exceptionState)) + if (isContextLost() || !validateHTMLImageElement("texSubImage3D", image, exceptionState) + || !validateTexFunc3DTarget("texSubImage3D", target)) return; RefPtr<Image> imageForRender = image->cachedImage()->image(); if (imageForRender->isSVGImage()) imageForRender = drawImageIntoBuffer(imageForRender.get(), image->width(), image->height(), "texSubImage3D"); + if (!imageForRender || !validateTexFunc("texSubImage3D", TexSubImage, SourceHTMLImageElement, target, level, 0, imageForRender->width(), imageForRender->height(), 1, 0, format, type, xoffset, yoffset, zoffset)) + return; + texSubImage3DImpl(target, level, xoffset, yoffset, zoffset, format, type, imageForRender.get(), WebGLImageConversion::HtmlDomImage, m_unpackFlipY, m_unpackPremultiplyAlpha); } void WebGL2RenderingContextBase::texSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLenum format, GLenum type, HTMLCanvasElement* canvas, ExceptionState& exceptionState) { - if (isContextLost() || !validateHTMLCanvasElement("texSubImage3D", canvas, exceptionState)) + if (isContextLost() || !validateHTMLCanvasElement("texSubImage3D", canvas, exceptionState) + || !validateTexFunc3DTarget("texSubImage3D", target) + || !validateTexFunc("texSubImage3D", TexSubImage, SourceHTMLCanvasElement, target, level, 0, canvas->width(), canvas->height(), 1, 0, format, type, xoffset, yoffset, zoffset)) return; WebGLTexture* texture = validateTextureBinding("texSubImage3D", target, false); @@ -1032,7 +1005,9 @@ void WebGL2RenderingContextBase::texSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLenum format, GLenum type, HTMLVideoElement* video, ExceptionState& exceptionState) { - if (isContextLost() || !validateHTMLVideoElement("texSubImage3D", video, exceptionState)) + if (isContextLost() || !validateHTMLVideoElement("texSubImage3D", video, exceptionState) + || !validateTexFunc3DTarget("texSubImage3D", target) + || !validateTexFunc("texSubImage3D", TexSubImage, SourceHTMLVideoElement, target, level, 0, video->videoWidth(), video->videoHeight(), 1, 0, format, type, xoffset, yoffset, zoffset)) return; RefPtr<Image> image = videoFrameToImage(video); @@ -1069,7 +1044,7 @@ synthesizeGLError(GL_INVALID_VALUE, "compressedTexImage3D", "border not 0"); return; } - if (!validateCompressedTexDimensions("compressedTexImage3D", NotTexSubImage2D, target, level, width, height, depth, internalformat)) + if (!validateCompressedTexDimensions("compressedTexImage3D", NotTexSubImage, target, level, width, height, depth, internalformat)) return; if (!validateCompressedTexFuncData("compressedTexImage3D", width, height, depth, internalformat, data)) return;
diff --git a/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.h b/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.h index a099d0b..e0b2e339 100644 --- a/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.h +++ b/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.h
@@ -196,7 +196,6 @@ TexStorageType3D, }; bool validateTexStorage(const char*, GLenum, GLsizei, GLenum, GLsizei, GLsizei, GLsizei, TexStorageType); - bool validateTexSubImage3D(const char*, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLenum format, GLenum type, GLsizei width, GLsizei height, GLsizei depth); bool validateUniformBlockIndex(const char*, WebGLProgram*, GLuint);
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp index 7c049d3..ad83707 100644 --- a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp +++ b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
@@ -1888,7 +1888,7 @@ synthesizeGLError(GL_INVALID_VALUE, "compressedTexImage2D", "border not 0"); return; } - if (!validateCompressedTexDimensions("compressedTexImage2D", NotTexSubImage2D, target, level, width, height, 1, internalformat)) + if (!validateCompressedTexDimensions("compressedTexImage2D", NotTexSubImage, target, level, width, height, 1, internalformat)) return; if (!validateCompressedTexFuncData("compressedTexImage2D", width, height, 1, internalformat, data)) return; @@ -1947,7 +1947,7 @@ return; if (!validateTexFuncLevel("copyTexImage2D", target, level)) return; - if (!validateTexFuncParameters("copyTexImage2D", NotTexSubImage2D, target, level, internalformat, width, height, 1, border, internalformat, GL_UNSIGNED_BYTE)) + if (!validateTexFuncParameters("copyTexImage2D", NotTexSubImage, target, level, internalformat, width, height, 1, border, internalformat, GL_UNSIGNED_BYTE)) return; if (!validateSettableTexFormat("copyTexImage2D", internalformat)) return; @@ -4219,9 +4219,9 @@ if (!texture) return false; - if (functionType == TexSubImage2D) { + if (functionType == TexSubImage) { if (!texture->isValid(target, level)) { - synthesizeGLError(GL_INVALID_OPERATION, "texSubImage2D", "no previously defined texture image"); + synthesizeGLError(GL_INVALID_OPERATION, functionName, "no previously defined texture image"); return false; } } @@ -4231,7 +4231,7 @@ if (!validateTexFuncParameters(functionName, functionType, target, level, internalformat, width, height, depth, border, format, type)) return false; - if (functionType == NotTexSubImage2D) { + if (functionType == NotTexSubImage) { if (texture->isImmutable()) { synthesizeGLError(GL_INVALID_OPERATION, functionName, "attempted to modify immutable texture"); return false; @@ -4318,7 +4318,7 @@ GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, DOMArrayBufferView* pixels) { - if (isContextLost() || !validateTexFunc("texImage2D", NotTexSubImage2D, SourceArrayBufferView, target, level, internalformat, width, height, 1, border, format, type, 0, 0, 0) + if (isContextLost() || !validateTexFunc("texImage2D", NotTexSubImage, SourceArrayBufferView, target, level, internalformat, width, height, 1, border, format, type, 0, 0, 0) || !validateTexFuncData("texImage2D", level, width, height, 1, format, type, pixels, NullAllowed)) return; void* data = pixels ? pixels->baseAddress() : 0; @@ -4348,7 +4348,7 @@ synthesizeGLError(GL_INVALID_VALUE, "texImage2D", "The source data has been neutered."); return; } - if (isContextLost() || !validateTexFunc("texImage2D", NotTexSubImage2D, SourceImageData, target, level, internalformat, pixels->width(), pixels->height(), 1, 0, format, type, 0, 0, 0)) + if (isContextLost() || !validateTexFunc("texImage2D", NotTexSubImage, SourceImageData, target, level, internalformat, pixels->width(), pixels->height(), 1, 0, format, type, 0, 0, 0)) return; if (type == GL_UNSIGNED_INT_10F_11F_11F_REV) { // The UNSIGNED_INT_10F_11F_11F_REV type pack/unpack isn't implemented. @@ -4385,7 +4385,7 @@ if (imageForRender && imageForRender->isSVGImage()) imageForRender = drawImageIntoBuffer(imageForRender.release(), image->width(), image->height(), "texImage2D"); - if (!imageForRender || !validateTexFunc("texImage2D", NotTexSubImage2D, SourceHTMLImageElement, target, level, internalformat, imageForRender->width(), imageForRender->height(), 1, 0, format, type, 0, 0, 0)) + if (!imageForRender || !validateTexFunc("texImage2D", NotTexSubImage, SourceHTMLImageElement, target, level, internalformat, imageForRender->width(), imageForRender->height(), 1, 0, format, type, 0, 0, 0)) return; texImage2DImpl(target, level, internalformat, format, type, imageForRender.get(), WebGLImageConversion::HtmlDomImage, m_unpackFlipY, m_unpackPremultiplyAlpha); @@ -4464,7 +4464,7 @@ void WebGLRenderingContextBase::texImage2D(GLenum target, GLint level, GLenum internalformat, GLenum format, GLenum type, HTMLCanvasElement* canvas, ExceptionState& exceptionState) { - if (isContextLost() || !validateHTMLCanvasElement("texImage2D", canvas, exceptionState) || !validateTexFunc("texImage2D", NotTexSubImage2D, SourceHTMLCanvasElement, target, level, internalformat, canvas->width(), canvas->height(), 1, 0, format, type, 0, 0, 0)) + if (isContextLost() || !validateHTMLCanvasElement("texImage2D", canvas, exceptionState) || !validateTexFunc("texImage2D", NotTexSubImage, SourceHTMLCanvasElement, target, level, internalformat, canvas->width(), canvas->height(), 1, 0, format, type, 0, 0, 0)) return; WebGLTexture* texture = validateTextureBinding("texImage2D", target, true); @@ -4500,7 +4500,7 @@ GLenum format, GLenum type, HTMLVideoElement* video, ExceptionState& exceptionState) { if (isContextLost() || !validateHTMLVideoElement("texImage2D", video, exceptionState) - || !validateTexFunc("texImage2D", NotTexSubImage2D, SourceHTMLVideoElement, target, level, internalformat, video->videoWidth(), video->videoHeight(), 1, 0, format, type, 0, 0, 0)) + || !validateTexFunc("texImage2D", NotTexSubImage, SourceHTMLVideoElement, target, level, internalformat, video->videoWidth(), video->videoHeight(), 1, 0, format, type, 0, 0, 0)) return; // Go through the fast path doing a GPU-GPU textures copy without a readback to system memory if possible. @@ -4549,7 +4549,7 @@ synthesizeGLError(GL_INVALID_VALUE, "texImage2D", "The source data has been neutered."); return; } - if (isContextLost() || !validateTexFunc("texImage2D", NotTexSubImage2D, SourceImageBitmap, target, level, 0, bitmap->width(), bitmap->height(), 1, 0, format, type, 0, 0, 0)) + if (isContextLost() || !validateTexFunc("texImage2D", NotTexSubImage, SourceImageBitmap, target, level, 0, bitmap->width(), bitmap->height(), 1, 0, format, type, 0, 0, 0)) return; StaticBitmapImage* imageForRender = bitmap->bitmapImage(); texImage2DImpl(target, level, internalformat, format, type, imageForRender, WebGLImageConversion::HtmlDomImage, m_unpackFlipY, m_unpackPremultiplyAlpha); @@ -4656,7 +4656,7 @@ GLsizei width, GLsizei height, GLenum format, GLenum type, DOMArrayBufferView* pixels) { - if (isContextLost() || !validateTexFunc("texSubImage2D", TexSubImage2D, SourceArrayBufferView, target, level, 0, width, height, 1, 0, format, type, xoffset, yoffset, 0) + if (isContextLost() || !validateTexFunc("texSubImage2D", TexSubImage, SourceArrayBufferView, target, level, 0, width, height, 1, 0, format, type, xoffset, yoffset, 0) || !validateTexFuncData("texSubImage2D", level, width, height, 1, format, type, pixels, NullNotAllowed)) return; void* data = pixels->baseAddress(); @@ -4687,7 +4687,7 @@ synthesizeGLError(GL_INVALID_VALUE, "texSubImage2D", "The source data has been neutered."); return; } - if (isContextLost() || !validateTexFunc("texSubImage2D", TexSubImage2D, SourceImageData, target, level, 0, pixels->width(), pixels->height(), 1, 0, format, type, xoffset, yoffset, 0)) + if (isContextLost() || !validateTexFunc("texSubImage2D", TexSubImage, SourceImageData, target, level, 0, pixels->width(), pixels->height(), 1, 0, format, type, xoffset, yoffset, 0)) return; if (type == GL_UNSIGNED_INT_10F_11F_11F_REV) { // The UNSIGNED_INT_10F_11F_11F_REV type pack/unpack isn't implemented. @@ -4725,7 +4725,7 @@ if (imageForRender && imageForRender->isSVGImage()) imageForRender = drawImageIntoBuffer(imageForRender.release(), image->width(), image->height(), "texSubImage2D"); - if (!imageForRender || !validateTexFunc("texSubImage2D", TexSubImage2D, SourceHTMLImageElement, target, level, 0, imageForRender->width(), imageForRender->height(), 1, 0, format, type, xoffset, yoffset, 0)) + if (!imageForRender || !validateTexFunc("texSubImage2D", TexSubImage, SourceHTMLImageElement, target, level, 0, imageForRender->width(), imageForRender->height(), 1, 0, format, type, xoffset, yoffset, 0)) return; texSubImage2DImpl(target, level, xoffset, yoffset, format, type, imageForRender.get(), WebGLImageConversion::HtmlDomImage, m_unpackFlipY, m_unpackPremultiplyAlpha); @@ -4735,7 +4735,7 @@ GLenum format, GLenum type, HTMLCanvasElement* canvas, ExceptionState& exceptionState) { if (isContextLost() || !validateHTMLCanvasElement("texSubImage2D", canvas, exceptionState) - || !validateTexFunc("texSubImage2D", TexSubImage2D, SourceHTMLCanvasElement, target, level, 0, canvas->width(), canvas->height(), 1, 0, format, type, xoffset, yoffset, 0)) + || !validateTexFunc("texSubImage2D", TexSubImage, SourceHTMLCanvasElement, target, level, 0, canvas->width(), canvas->height(), 1, 0, format, type, xoffset, yoffset, 0)) return; WebGLTexture* texture = validateTextureBinding("texSubImage2D", target, true); @@ -4758,7 +4758,7 @@ GLenum format, GLenum type, HTMLVideoElement* video, ExceptionState& exceptionState) { if (isContextLost() || !validateHTMLVideoElement("texSubImage2D", video, exceptionState) - || !validateTexFunc("texSubImage2D", TexSubImage2D, SourceHTMLVideoElement, target, level, 0, video->videoWidth(), video->videoHeight(), 1, 0, format, type, xoffset, yoffset, 0)) + || !validateTexFunc("texSubImage2D", TexSubImage, SourceHTMLVideoElement, target, level, 0, video->videoWidth(), video->videoHeight(), 1, 0, format, type, xoffset, yoffset, 0)) return; RefPtr<Image> image = videoFrameToImage(video); @@ -4775,7 +4775,7 @@ synthesizeGLError(GL_INVALID_VALUE, "texSubImage2D", "The source data has been neutered."); return; } - if (isContextLost() || !validateTexFunc("texSubImage2D", TexSubImage2D, SourceImageBitmap, target, level, 0, bitmap->width(), bitmap->height(), 1, 0, format, type, 0, 0, 0)) + if (isContextLost() || !validateTexFunc("texSubImage2D", TexSubImage, SourceImageBitmap, target, level, 0, bitmap->width(), bitmap->height(), 1, 0, format, type, 0, 0, 0)) return; StaticBitmapImage* imageForRender = bitmap->bitmapImage(); texSubImage2DImpl(target, level, xoffset, yoffset, format, type, imageForRender, WebGLImageConversion::HtmlDomImage, m_unpackFlipY, m_unpackPremultiplyAlpha); @@ -5736,7 +5736,7 @@ case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y: case GL_TEXTURE_CUBE_MAP_POSITIVE_Z: case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z: - if (functionType != TexSubImage2D && width != height) { + if (functionType != TexSubImage && width != height) { synthesizeGLError(GL_INVALID_VALUE, functionName, "width != height for cube map"); return false; } @@ -6182,7 +6182,7 @@ synthesizeGLError(GL_INVALID_OPERATION, functionName, "height not multiple of 4 and height + yoffset not equal to height of the texture level for ETC2/EAC format texture"); return false; } - return validateCompressedTexDimensions(functionName, TexSubImage2D, target, level, width, height, depth, format); + return validateCompressedTexDimensions(functionName, TexSubImage, target, level, width, height, depth, format); } case GL_COMPRESSED_RGB_S3TC_DXT1_EXT: case GL_COMPRESSED_RGBA_S3TC_DXT1_EXT: @@ -6203,7 +6203,7 @@ synthesizeGLError(GL_INVALID_VALUE, functionName, "dimensions out of range"); return false; } - return validateCompressedTexDimensions(functionName, TexSubImage2D, target, level, width, height, depth, format); + return validateCompressedTexDimensions(functionName, TexSubImage, target, level, width, height, depth, format); } case GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG: case GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG: @@ -6218,7 +6218,7 @@ synthesizeGLError(GL_INVALID_OPERATION, functionName, "dimensions must match existing level"); return false; } - return validateCompressedTexDimensions(functionName, TexSubImage2D, target, level, width, height, depth, format); + return validateCompressedTexDimensions(functionName, TexSubImage, target, level, width, height, depth, format); } case GC3D_COMPRESSED_ATC_RGB_AMD: case GC3D_COMPRESSED_ATC_RGBA_EXPLICIT_ALPHA_AMD:
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h index e547a18..53bc5d0 100644 --- a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h +++ b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h
@@ -841,8 +841,8 @@ void texSubImage2DImpl(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLenum format, GLenum type, Image*, WebGLImageConversion::ImageHtmlDomSource, bool flipY, bool premultiplyAlpha); enum TexImageFunctionType { - NotTexSubImage2D, - TexSubImage2D + NotTexSubImage, + TexSubImage }; enum TexImageByGPUType { TexImage2DByGPU,
diff --git a/third_party/WebKit/Source/platform/CrossThreadCopier.cpp b/third_party/WebKit/Source/platform/CrossThreadCopier.cpp index 367c124..a1d1190 100644 --- a/third_party/WebKit/Source/platform/CrossThreadCopier.cpp +++ b/third_party/WebKit/Source/platform/CrossThreadCopier.cpp
@@ -69,17 +69,17 @@ class CopierThreadSafeRefCountedTest : public ThreadSafeRefCounted<CopierThreadSafeRefCountedTest> { }; -static_assert((WTF::IsSameType< +static_assert((std::is_same< PassRefPtr<CopierThreadSafeRefCountedTest>, CrossThreadCopier<PassRefPtr<CopierThreadSafeRefCountedTest>>::Type >::value), "PassRefPtr test"); -static_assert((WTF::IsSameType< +static_assert((std::is_same< PassRefPtr<CopierThreadSafeRefCountedTest>, CrossThreadCopier<RefPtr<CopierThreadSafeRefCountedTest>>::Type >::value), "RefPtr test"); -static_assert((WTF::IsSameType< +static_assert((std::is_same< PassRefPtr<CopierThreadSafeRefCountedTest>, CrossThreadCopier<CopierThreadSafeRefCountedTest*>::Type >::value), @@ -95,33 +95,33 @@ class CopierRefCountedTest : public RefCounted<CopierRefCountedTest> { }; -static_assert((WTF::IsSameType< +static_assert((std::is_same< int, CrossThreadCopier<PassRefPtr<CopierRefCountedTest>>::Type >::value), "PassRefPtr<RefCountedTest> test"); -static_assert((WTF::IsSameType< +static_assert((std::is_same< int, CrossThreadCopier<RefPtr<CopierRefCountedTest>>::Type >::value), "RefPtr<RefCounted> test"); -static_assert((WTF::IsSameType< +static_assert((std::is_same< int, CrossThreadCopier<CopierRefCountedTest*>::Type >::value), "Raw pointer RefCounted test"); // Verify that PassOwnPtr gets passed through. -static_assert((WTF::IsSameType< +static_assert((std::is_same< PassOwnPtr<float>, CrossThreadCopier<PassOwnPtr<float>>::Type >::value), "PassOwnPtr test"); // Verify that PassOwnPtr does not get passed through. -static_assert((WTF::IsSameType< +static_assert((std::is_same< int, CrossThreadCopier<OwnPtr<float>>::Type >::value),
diff --git a/third_party/WebKit/Source/platform/CrossThreadCopier.h b/third_party/WebKit/Source/platform/CrossThreadCopier.h index 92e155e..af49e35 100644 --- a/third_party/WebKit/Source/platform/CrossThreadCopier.h +++ b/third_party/WebKit/Source/platform/CrossThreadCopier.h
@@ -87,9 +87,9 @@ typedef typename std::remove_pointer<TypeWithoutPassRefPtr>::type RefCountedType; // Verify that only one of the above did a change. - static_assert((WTF::IsSameType<RefPtr<RefCountedType>, T>::value - || WTF::IsSameType<PassRefPtr<RefCountedType>, T>::value - || WTF::IsSameType<RefCountedType*, T>::value), + static_assert((std::is_same<RefPtr<RefCountedType>, T>::value + || std::is_same<PassRefPtr<RefCountedType>, T>::value + || std::is_same<RefCountedType*, T>::value), "only one type modification should be allowed"); typedef PassRefPtr<RefCountedType> Type; @@ -184,7 +184,7 @@ } }; - template<typename T> struct CrossThreadCopier : public CrossThreadCopierBase<WTF::IsConvertibleToInteger<T>::value, + template<typename T> struct CrossThreadCopier : public CrossThreadCopierBase<std::is_convertible<T, int>::value, WTF::IsSubclassOfTemplate<typename WTF::RemoveTemplate<T, RefPtr>::Type, ThreadSafeRefCounted>::value || WTF::IsSubclassOfTemplate<typename std::remove_pointer<T>::type, ThreadSafeRefCounted>::value || WTF::IsSubclassOfTemplate<typename WTF::RemoveTemplate<T, PassRefPtr>::Type, ThreadSafeRefCounted>::value,
diff --git a/third_party/WebKit/Source/platform/TraceEvent.h b/third_party/WebKit/Source/platform/TraceEvent.h index 266ae7d..9a2b426 100644 --- a/third_party/WebKit/Source/platform/TraceEvent.h +++ b/third_party/WebKit/Source/platform/TraceEvent.h
@@ -390,7 +390,7 @@ }; template<typename T> struct ConvertableToTraceFormatTraits<PassRefPtr<T>> { - static const bool isConvertable = WTF::IsSubclass<T, TraceEvent::ConvertableToTraceFormat>::value; + static const bool isConvertable = std::is_convertible<T*, TraceEvent::ConvertableToTraceFormat*>::value; static PassRefPtr<ConvertableToTraceFormat> moveFromIfConvertable(const PassRefPtr<T>& convertableToTraceFormat) { return convertableToTraceFormat;
diff --git a/third_party/WebKit/Source/platform/graphics/ContiguousContainerTest.cpp b/third_party/WebKit/Source/platform/graphics/ContiguousContainerTest.cpp index 5afe17d7..656218b 100644 --- a/third_party/WebKit/Source/platform/graphics/ContiguousContainerTest.cpp +++ b/third_party/WebKit/Source/platform/graphics/ContiguousContainerTest.cpp
@@ -233,7 +233,7 @@ } EXPECT_EQ(kNumElements, count); - static_assert(WTF::IsSameType<decltype(*list.begin()), Point2D&>::value, + static_assert(std::is_same<decltype(*list.begin()), Point2D&>::value, "Non-const iteration should produce non-const references."); } @@ -251,7 +251,7 @@ } EXPECT_EQ(kNumElements, count); - static_assert(WTF::IsSameType<decltype(*constList.begin()), const Point2D&>::value, + static_assert(std::is_same<decltype(*constList.begin()), const Point2D&>::value, "Const iteration should produce const references."); } @@ -268,7 +268,7 @@ } EXPECT_EQ(kNumElements, count); - static_assert(WTF::IsSameType<decltype(*list.rbegin()), Point2D&>::value, + static_assert(std::is_same<decltype(*list.rbegin()), Point2D&>::value, "Non-const iteration should produce non-const references."); }
diff --git a/third_party/WebKit/Source/platform/graphics/skia/SkiaUtils.h b/third_party/WebKit/Source/platform/graphics/skia/SkiaUtils.h index bb4fc436..3c3781bc 100644 --- a/third_party/WebKit/Source/platform/graphics/skia/SkiaUtils.h +++ b/third_party/WebKit/Source/platform/graphics/skia/SkiaUtils.h
@@ -110,7 +110,9 @@ inline SkScalar skBlurRadiusToSigma(SkScalar radius) { SkASSERT(radius >= 0); - return 0.288675f * radius; + if (radius == 0) + return 0.0f; + return 0.288675f * radius + 0.5f; } template<typename PrimitiveType>
diff --git a/third_party/WebKit/Source/platform/heap/GCInfo.h b/third_party/WebKit/Source/platform/heap/GCInfo.h index e054cd2..534370d2 100644 --- a/third_party/WebKit/Source/platform/heap/GCInfo.h +++ b/third_party/WebKit/Source/platform/heap/GCInfo.h
@@ -164,7 +164,7 @@ TraceTrait<T>::trace, FinalizerTrait<T>::finalize, FinalizerTrait<T>::nonTrivialFinalizer, - WTF::IsPolymorphic<T>::value, + std::is_polymorphic<T>::value, #if ENABLE(DETAILED_MEMORY_INFRA) TypenameStringTrait<T>::get #endif
diff --git a/third_party/WebKit/Source/platform/heap/HeapAllocator.h b/third_party/WebKit/Source/platform/heap/HeapAllocator.h index 259c46b..ea42c89 100644 --- a/third_party/WebKit/Source/platform/heap/HeapAllocator.h +++ b/third_party/WebKit/Source/platform/heap/HeapAllocator.h
@@ -250,7 +250,7 @@ { static_assert(Traits::needsDestruction, "Only vector buffers with items requiring destruction should be finalized"); // See the comment in HeapVectorBacking::trace. - static_assert(Traits::canClearUnusedSlotsWithMemset || WTF::IsPolymorphic<T>::value, "HeapVectorBacking doesn't support objects that cannot be cleared as unused with memset or don't have a vtable"); + static_assert(Traits::canClearUnusedSlotsWithMemset || std::is_polymorphic<T>::value, "HeapVectorBacking doesn't support objects that cannot be cleared as unused with memset or don't have a vtable"); ASSERT(!WTF::IsTriviallyDestructible<T>::value); HeapObjectHeader* header = HeapObjectHeader::fromPayload(pointer); @@ -264,7 +264,7 @@ // (which are already zeroed out). ANNOTATE_CHANGE_SIZE(buffer, length, 0, length); #endif - if (WTF::IsPolymorphic<T>::value) { + if (std::is_polymorphic<T>::value) { for (unsigned i = 0; i < length; ++i) { if (blink::vTableInitialized(&buffer[i])) buffer[i].~T();
diff --git a/third_party/WebKit/Source/platform/heap/TraceTraits.h b/third_party/WebKit/Source/platform/heap/TraceTraits.h index e03a14a..7d35c32 100644 --- a/third_party/WebKit/Source/platform/heap/TraceTraits.h +++ b/third_party/WebKit/Source/platform/heap/TraceTraits.h
@@ -385,7 +385,7 @@ // This is fine because the fact that the object can be initialized // with memset indicates that it is safe to treat the zerod slot // as a valid object. - static_assert(!NeedsTracingTrait<Traits>::value || Traits::canClearUnusedSlotsWithMemset || WTF::IsPolymorphic<T>::value, "HeapVectorBacking doesn't support objects that cannot be cleared as unused with memset."); + static_assert(!NeedsTracingTrait<Traits>::value || Traits::canClearUnusedSlotsWithMemset || std::is_polymorphic<T>::value, "HeapVectorBacking doesn't support objects that cannot be cleared as unused with memset."); // This trace method is instantiated for vectors where // NeedsTracingTrait<Traits>::value is false, but the trace method @@ -399,7 +399,7 @@ // Use the payload size as recorded by the heap to determine how many // elements to trace. size_t length = header->payloadSize() / sizeof(T); - if (WTF::IsPolymorphic<T>::value) { + if (std::is_polymorphic<T>::value) { for (size_t i = 0; i < length; ++i) { if (blink::vTableInitialized(&array[i])) blink::TraceIfEnabled<T, NeedsTracingTrait<Traits>::value>::trace(visitor, array[i]);
diff --git a/third_party/WebKit/Source/platform/heap/Visitor.h b/third_party/WebKit/Source/platform/heap/Visitor.h index a32b7c9..f7d877e 100644 --- a/third_party/WebKit/Source/platform/heap/Visitor.h +++ b/third_party/WebKit/Source/platform/heap/Visitor.h
@@ -187,7 +187,7 @@ void trace(const T& t) { static_assert(sizeof(T), "T must be fully defined"); - if (WTF::IsPolymorphic<T>::value) { + if (std::is_polymorphic<T>::value) { intptr_t vtable = *reinterpret_cast<const intptr_t*>(&t); if (!vtable) return;
diff --git a/third_party/WebKit/Source/platform/scroll/ScrollAnimator.cpp b/third_party/WebKit/Source/platform/scroll/ScrollAnimator.cpp index f5a3153..634381a 100644 --- a/third_party/WebKit/Source/platform/scroll/ScrollAnimator.cpp +++ b/third_party/WebKit/Source/platform/scroll/ScrollAnimator.cpp
@@ -50,7 +50,6 @@ ScrollAnimator::ScrollAnimator(ScrollableArea* scrollableArea, WTF::TimeFunction timeFunction) : ScrollAnimatorBase(scrollableArea) - , m_lastTickTime(0.0) , m_timeFunction(timeFunction) { } @@ -114,7 +113,8 @@ if (m_runState == RunState::RunningOnCompositor || m_runState == RunState::RunningOnCompositorButNeedsUpdate) { - m_runState = RunState::RunningOnCompositorButNeedsUpdate; + if (registerAndScheduleAnimation()) + m_runState = RunState::RunningOnCompositorButNeedsUpdate; return ScrollResultOneDimensional(/* didScroll */ true, /* unusedScrollDelta */ 0); } @@ -134,14 +134,9 @@ m_targetOffset = targetPos; m_startTime = m_timeFunction(); - scrollableArea()->registerForAnimation(); - if (!m_scrollableArea->scheduleAnimation()) { - scrollToOffsetWithoutAnimation(targetPos); - resetAnimationState(); - return ScrollResultOneDimensional(/* didScroll */ true, /* unusedScrollDelta */ 0); - } + if (registerAndScheduleAnimation()) + m_runState = RunState::WaitingToSendToCompositor; - m_runState = RunState::WaitingToSendToCompositor; return ScrollResultOneDimensional(/* didScroll */ true, /* unusedScrollDelta */ 0); } @@ -156,8 +151,6 @@ void ScrollAnimator::tickAnimation(double monotonicTime) { - m_lastTickTime = monotonicTime; - if (m_runState != RunState::RunningOnMainThread) return; @@ -213,7 +206,7 @@ m_compositorAnimationId = 0; m_compositorAnimationGroupId = 0; - m_animationCurve->updateTarget(m_lastTickTime - m_startTime, + m_animationCurve->updateTarget(m_timeFunction() - m_startTime, m_targetOffset); m_runState = RunState::WaitingToSendToCompositor; } @@ -256,11 +249,8 @@ } if (!sentToCompositor) { - m_runState = RunState::RunningOnMainThread; - if (!m_scrollableArea->scheduleAnimation()) { - scrollToOffsetWithoutAnimation(m_targetOffset); - resetAnimationState(); - } + if (registerAndScheduleAnimation()) + m_runState = RunState::RunningOnMainThread; } } } @@ -281,6 +271,17 @@ reattachCompositorPlayerIfNeeded(timeline); } +bool ScrollAnimator::registerAndScheduleAnimation() +{ + scrollableArea()->registerForAnimation(); + if (!m_scrollableArea->scheduleAnimation()) { + scrollToOffsetWithoutAnimation(m_targetOffset); + resetAnimationState(); + return false; + } + return true; +} + DEFINE_TRACE(ScrollAnimator) { ScrollAnimatorBase::trace(visitor);
diff --git a/third_party/WebKit/Source/platform/scroll/ScrollAnimator.h b/third_party/WebKit/Source/platform/scroll/ScrollAnimator.h index 5d8f20a..8bc8caa 100644 --- a/third_party/WebKit/Source/platform/scroll/ScrollAnimator.h +++ b/third_party/WebKit/Source/platform/scroll/ScrollAnimator.h
@@ -65,13 +65,17 @@ protected: OwnPtr<WebScrollOffsetAnimationCurve> m_animationCurve; - double m_lastTickTime; double m_startTime; WTF::TimeFunction m_timeFunction; private: FloatPoint desiredTargetPosition() const; + // Returns true if the animation was scheduled successfully. If animation + // could not be scheduled (e.g. because the frame is detached), scrolls + // immediately to the target and returns false. + bool registerAndScheduleAnimation(); + FloatPoint m_targetOffset; };
diff --git a/third_party/WebKit/Source/platform/scroll/ScrollAnimatorTest.cpp b/third_party/WebKit/Source/platform/scroll/ScrollAnimatorTest.cpp index cbb5be1..2fbe366 100644 --- a/third_party/WebKit/Source/platform/scroll/ScrollAnimatorTest.cpp +++ b/third_party/WebKit/Source/platform/scroll/ScrollAnimatorTest.cpp
@@ -101,6 +101,8 @@ scrollAnimator.scrollToOffsetWithoutAnimation(FloatPoint()); } +// TODO(skobes): Add unit tests for composited scrolling paths. + TEST(ScrollAnimatorTest, MainThreadEnabled) { OwnPtrWillBeRawPtr<MockScrollableArea> scrollableArea = MockScrollableArea::create(true); @@ -109,7 +111,7 @@ EXPECT_CALL(*scrollableArea, minimumScrollPosition()).Times(AtLeast(1)).WillRepeatedly(Return(IntPoint())); EXPECT_CALL(*scrollableArea, maximumScrollPosition()).Times(AtLeast(1)).WillRepeatedly(Return(IntPoint(1000, 1000))); EXPECT_CALL(*scrollableArea, setScrollOffset(_, _)).Times(9); - EXPECT_CALL(*scrollableArea, registerForAnimation()).Times(3); + EXPECT_CALL(*scrollableArea, registerForAnimation()).Times(6); EXPECT_CALL(*scrollableArea, scheduleAnimation()).Times(AtLeast(1)).WillRepeatedly(Return(true)); EXPECT_FALSE(scrollAnimator->hasAnimationThatRequiresService());
diff --git a/third_party/WebKit/Source/web/ChromeClientImpl.cpp b/third_party/WebKit/Source/web/ChromeClientImpl.cpp index 5f458736..8a40549b 100644 --- a/third_party/WebKit/Source/web/ChromeClientImpl.cpp +++ b/third_party/WebKit/Source/web/ChromeClientImpl.cpp
@@ -408,7 +408,7 @@ void ChromeClientImpl::closeWindowSoon() { // Make sure this Page can no longer be found by JS. - Page::ordinaryPages().remove(m_webView->page()); + m_webView->page()->willBeClosed(); // Make sure that all loading is stopped. Ensures that JS stops executing! m_webView->mainFrame()->stopLoading();
diff --git a/third_party/WebKit/Source/web/InspectorOverlay.cpp b/third_party/WebKit/Source/web/InspectorOverlay.cpp index 66eab75..867198da 100644 --- a/third_party/WebKit/Source/web/InspectorOverlay.cpp +++ b/third_party/WebKit/Source/web/InspectorOverlay.cpp
@@ -464,7 +464,7 @@ ASSERT(!m_overlayChromeClient); m_overlayChromeClient = InspectorOverlayChromeClient::create(m_webViewImpl->page()->chromeClient(), *this); pageClients.chromeClient = m_overlayChromeClient.get(); - m_overlayPage = adoptPtrWillBeNoop(new Page(pageClients)); + m_overlayPage = Page::create(pageClients); Settings& settings = m_webViewImpl->page()->settings(); Settings& overlaySettings = m_overlayPage->settings();
diff --git a/third_party/WebKit/Source/web/WebPageSerializer.cpp b/third_party/WebKit/Source/web/WebFrameSerializer.cpp similarity index 68% rename from third_party/WebKit/Source/web/WebPageSerializer.cpp rename to third_party/WebKit/Source/web/WebFrameSerializer.cpp index afb89bc..ae8222d 100644 --- a/third_party/WebKit/Source/web/WebPageSerializer.cpp +++ b/third_party/WebKit/Source/web/WebFrameSerializer.cpp
@@ -28,12 +28,13 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "public/web/WebPageSerializer.h" +#include "public/web/WebFrameSerializer.h" #include "core/HTMLNames.h" #include "core/dom/Document.h" #include "core/dom/Element.h" #include "core/frame/Frame.h" +#include "core/frame/FrameSerializer.h" #include "core/frame/LocalFrame.h" #include "core/frame/RemoteFrame.h" #include "core/html/HTMLAllCollection.h" @@ -42,7 +43,6 @@ #include "core/html/HTMLInputElement.h" #include "core/html/HTMLTableElement.h" #include "core/loader/DocumentLoader.h" -#include "core/page/PageSerializer.h" #include "platform/SerializedResource.h" #include "platform/SharedBuffer.h" #include "platform/mhtml/MHTMLArchive.h" @@ -54,9 +54,9 @@ #include "public/platform/WebVector.h" #include "public/web/WebDocument.h" #include "public/web/WebFrame.h" -#include "public/web/WebPageSerializerClient.h" +#include "public/web/WebFrameSerializerClient.h" +#include "web/WebFrameSerializerImpl.h" #include "web/WebLocalFrameImpl.h" -#include "web/WebPageSerializerImpl.h" #include "web/WebRemoteFrameImpl.h" #include "wtf/Assertions.h" #include "wtf/HashMap.h" @@ -69,32 +69,25 @@ namespace { -using ContentIDMap = WillBeHeapHashMap<RawPtrWillBeMember<Frame>, String>; - -class MHTMLPageSerializerDelegate final : - public NoBaseWillBeGarbageCollected<MHTMLPageSerializerDelegate>, - public PageSerializer::Delegate { - WTF_MAKE_NONCOPYABLE(MHTMLPageSerializerDelegate); +class MHTMLFrameSerializerDelegate final : public FrameSerializer::Delegate { + WTF_MAKE_NONCOPYABLE(MHTMLFrameSerializerDelegate); public: - MHTMLPageSerializerDelegate(const ContentIDMap& frameToContentID); + explicit MHTMLFrameSerializerDelegate(WebFrameSerializer::MHTMLPartsGenerationDelegate&); bool shouldIgnoreAttribute(const Attribute&) override; bool rewriteLink(const Element&, String& rewrittenLink) override; - -#if ENABLE(OILPAN) - void trace(Visitor* visitor) { visitor->trace(m_frameToContentID); } -#endif + bool shouldSkipResource(const KURL&) override; private: - const ContentIDMap& m_frameToContentID; + WebFrameSerializer::MHTMLPartsGenerationDelegate& m_webDelegate; }; -MHTMLPageSerializerDelegate::MHTMLPageSerializerDelegate( - const ContentIDMap& frameToContentID) - : m_frameToContentID(frameToContentID) +MHTMLFrameSerializerDelegate::MHTMLFrameSerializerDelegate( + WebFrameSerializer::MHTMLPartsGenerationDelegate& webDelegate) + : m_webDelegate(webDelegate) { } -bool MHTMLPageSerializerDelegate::shouldIgnoreAttribute(const Attribute& attribute) +bool MHTMLFrameSerializerDelegate::shouldIgnoreAttribute(const Attribute& attribute) { // TODO(fgorski): Presence of srcset attribute causes MHTML to not display images, as only the value of src // is pulled into the archive. Discarding srcset prevents the problem. Long term we should make sure to MHTML @@ -102,7 +95,7 @@ return attribute.localName() == HTMLNames::srcsetAttr; } -bool MHTMLPageSerializerDelegate::rewriteLink( +bool MHTMLFrameSerializerDelegate::rewriteLink( const Element& element, String& rewrittenLink) { @@ -114,7 +107,8 @@ if (!frame) return false; - KURL cidURI = MHTMLParser::convertContentIDToURI(m_frameToContentID.get(frame)); + WebString contentID = m_webDelegate.getContentID(*WebFrame::fromFrame(frame)); + KURL cidURI = MHTMLParser::convertContentIDToURI(contentID); ASSERT(cidURI.isValid()); if (isHTMLFrameElementBase(&element)) { @@ -135,25 +129,14 @@ return false; } -ContentIDMap createFrameToContentIDMap( - const WebVector<std::pair<WebFrame*, WebString>>& webFrameToContentID) +bool MHTMLFrameSerializerDelegate::shouldSkipResource(const KURL& url) { - ContentIDMap result; - for (const auto& it : webFrameToContentID) { - WebFrame* webFrame = it.first; - const WebString& webContentID = it.second; - - Frame* frame = webFrame->toImplBase()->frame(); - String contentID(webContentID); - - result.add(frame, contentID); - } - return result; + return m_webDelegate.shouldSkipResource(url); } } // namespace -WebData WebPageSerializer::generateMHTMLHeader( +WebData WebFrameSerializer::generateMHTMLHeader( const WebString& boundary, WebLocalFrame* frame) { Document* document = toWebLocalFrameImpl(frame)->frame()->document(); @@ -165,30 +148,36 @@ return buffer.release(); } -WebData WebPageSerializer::generateMHTMLParts( +WebData WebFrameSerializer::generateMHTMLParts( const WebString& boundary, WebLocalFrame* webFrame, bool useBinaryEncoding, - const WebVector<std::pair<WebFrame*, WebString>>& webFrameToContentID) + MHTMLPartsGenerationDelegate* webDelegate) { + ASSERT(webFrame); + ASSERT(webDelegate); + // Translate arguments from public to internal blink APIs. LocalFrame* frame = toWebLocalFrameImpl(webFrame)->frame(); MHTMLArchive::EncodingPolicy encodingPolicy = useBinaryEncoding ? MHTMLArchive::EncodingPolicy::UseBinaryEncoding : MHTMLArchive::EncodingPolicy::UseDefaultEncoding; - ContentIDMap frameToContentID = createFrameToContentIDMap(webFrameToContentID); // Serialize. Vector<SerializedResource> resources; - MHTMLPageSerializerDelegate delegate(frameToContentID); - PageSerializer serializer(resources, &delegate); + MHTMLFrameSerializerDelegate coreDelegate(*webDelegate); + FrameSerializer serializer(resources, coreDelegate); serializer.serializeFrame(*frame); + // Get Content-ID for the frame being serialized. + String frameContentID = webDelegate->getContentID(*webFrame); + ASSERT(!frameContentID.isEmpty()); + // Encode serializer's output as MHTML. RefPtr<SharedBuffer> output = SharedBuffer::create(); bool isFirstResource = true; for (const SerializedResource& resource : resources) { - // Frame is the 1st resource (see PageSerializer::serializeFrame doc - // comment). Frames need a Content-ID header. - String contentID = isFirstResource ? frameToContentID.get(frame) : String(); + // Frame is the 1st resource (see FrameSerializer::serializeFrame doc + // comment). Frames get a Content-ID header. + String contentID = isFirstResource ? frameContentID : String(); MHTMLArchive::generateMHTMLPart( boundary, contentID, encodingPolicy, resource, *output); @@ -198,41 +187,41 @@ return output.release(); } -WebData WebPageSerializer::generateMHTMLFooter(const WebString& boundary) +WebData WebFrameSerializer::generateMHTMLFooter(const WebString& boundary) { RefPtr<SharedBuffer> buffer = SharedBuffer::create(); MHTMLArchive::generateMHTMLFooter(boundary, *buffer); return buffer.release(); } -bool WebPageSerializer::serialize( +bool WebFrameSerializer::serialize( WebLocalFrame* frame, - WebPageSerializerClient* client, + WebFrameSerializerClient* client, const WebVector<std::pair<WebURL, WebString>>& urlsToLocalPaths) { - WebPageSerializerImpl serializerImpl(frame, client, urlsToLocalPaths); + WebFrameSerializerImpl serializerImpl(frame, client, urlsToLocalPaths); return serializerImpl.serialize(); } -WebString WebPageSerializer::generateMetaCharsetDeclaration(const WebString& charset) +WebString WebFrameSerializer::generateMetaCharsetDeclaration(const WebString& charset) { - // TODO(yosin) We should call |PageSerializer::metaCharsetDeclarationOf()|. + // TODO(yosin) We should call |FrameSerializer::metaCharsetDeclarationOf()|. String charsetString = "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=" + static_cast<const String&>(charset) + "\">"; return charsetString; } -WebString WebPageSerializer::generateMarkOfTheWebDeclaration(const WebURL& url) +WebString WebFrameSerializer::generateMarkOfTheWebDeclaration(const WebURL& url) { StringBuilder builder; builder.append("\n<!-- "); - builder.append(PageSerializer::markOfTheWebDeclaration(url)); + builder.append(FrameSerializer::markOfTheWebDeclaration(url)); builder.append(" -->\n"); return builder.toString(); } -WebString WebPageSerializer::generateBaseTagDeclaration(const WebString& baseTarget) +WebString WebFrameSerializer::generateBaseTagDeclaration(const WebString& baseTarget) { - // TODO(yosin) We should call |PageSerializer::baseTagDeclarationOf()|. + // TODO(yosin) We should call |FrameSerializer::baseTagDeclarationOf()|. if (baseTarget.isEmpty()) return String("<base href=\".\">"); String baseString = "<base href=\".\" target=\"" + static_cast<const String&>(baseTarget) + "\">";
diff --git a/third_party/WebKit/Source/web/WebPageSerializerImpl.cpp b/third_party/WebKit/Source/web/WebFrameSerializerImpl.cpp similarity index 88% rename from third_party/WebKit/Source/web/WebPageSerializerImpl.cpp rename to third_party/WebKit/Source/web/WebFrameSerializerImpl.cpp index 545f3a0..ce5e7a3 100644 --- a/third_party/WebKit/Source/web/WebPageSerializerImpl.cpp +++ b/third_party/WebKit/Source/web/WebFrameSerializerImpl.cpp
@@ -75,13 +75,14 @@ // override the incorrect base URL and make sure we alway load correct local // saved resource files. -#include "web/WebPageSerializerImpl.h" +#include "web/WebFrameSerializerImpl.h" #include "core/HTMLNames.h" #include "core/dom/Document.h" #include "core/dom/DocumentType.h" #include "core/dom/Element.h" #include "core/editing/serializers/Serialization.h" +#include "core/frame/FrameSerializer.h" #include "core/html/HTMLAllCollection.h" #include "core/html/HTMLElement.h" #include "core/html/HTMLFormElement.h" @@ -89,7 +90,6 @@ #include "core/html/HTMLMetaElement.h" #include "core/loader/DocumentLoader.h" #include "core/loader/FrameLoader.h" -#include "core/page/PageSerializer.h" #include "public/platform/WebVector.h" #include "web/WebLocalFrameImpl.h" #include "wtf/text/TextEncoding.h" @@ -98,12 +98,13 @@ // Maximum length of data buffer which is used to temporary save generated // html content data. This is a soft limit which might be passed if a very large -// contegious string is found in the page. +// contegious string is found in the html document. static const unsigned dataBufferCapacity = 65536; -WebPageSerializerImpl::SerializeDomParam::SerializeDomParam(const KURL& url, - const WTF::TextEncoding& textEncoding, - Document* document) +WebFrameSerializerImpl::SerializeDomParam::SerializeDomParam( + const KURL& url, + const WTF::TextEncoding& textEncoding, + Document* document) : url(url) , textEncoding(textEncoding) , document(document) @@ -117,7 +118,7 @@ { } -String WebPageSerializerImpl::preActionBeforeSerializeOpenTag( +String WebFrameSerializerImpl::preActionBeforeSerializeOpenTag( const Element* element, SerializeDomParam* param, bool* needSkip) { StringBuilder result; @@ -143,7 +144,7 @@ // Add MOTW declaration before html tag. // See http://msdn2.microsoft.com/en-us/library/ms537628(VS.85).aspx. - result.append(WebPageSerializer::generateMarkOfTheWebDeclaration(param->url)); + result.append(WebFrameSerializer::generateMarkOfTheWebDeclaration(param->url)); } else if (isHTMLBaseElement(*element)) { // Comment the BASE tag when serializing dom. result.appendLiteral("<!--"); @@ -175,7 +176,7 @@ return result.toString(); } -String WebPageSerializerImpl::postActionAfterSerializeOpenTag( +String WebFrameSerializerImpl::postActionAfterSerializeOpenTag( const Element* element, SerializeDomParam* param) { StringBuilder result; @@ -187,14 +188,14 @@ if (!param->haveAddedCharsetDeclaration && isHTMLHeadElement(*element)) { param->haveAddedCharsetDeclaration = true; - // Check meta element. WebKit only pre-parse the first 512 bytes - // of the document. If the whole <HEAD> is larger and meta is the - // end of head part, then this kind of pages aren't decoded correctly - // because of this issue. So when we serialize the DOM, we need to - // make sure the meta will in first child of head tag. + // Check meta element. WebKit only pre-parse the first 512 bytes of the + // document. If the whole <HEAD> is larger and meta is the end of head + // part, then this kind of html documents aren't decoded correctly + // because of this issue. So when we serialize the DOM, we need to make + // sure the meta will in first child of head tag. // See http://bugs.webkit.org/show_bug.cgi?id=16621. // First we generate new content for writing correct META element. - result.append(WebPageSerializer::generateMetaCharsetDeclaration( + result.append(WebFrameSerializer::generateMetaCharsetDeclaration( String(param->textEncoding.name()))); param->haveAddedContentsBeforeEnd = true; @@ -207,7 +208,7 @@ return result.toString(); } -String WebPageSerializerImpl::preActionBeforeSerializeEndTag( +String WebFrameSerializerImpl::preActionBeforeSerializeEndTag( const Element* element, SerializeDomParam* param, bool* needSkip) { String result; @@ -230,7 +231,7 @@ // After we finish serializing end tag of a element, we give the target // element a chance to do some post work to add some additional data. -String WebPageSerializerImpl::postActionAfterSerializeEndTag( +String WebFrameSerializerImpl::postActionAfterSerializeEndTag( const Element* element, SerializeDomParam* param) { StringBuilder result; @@ -241,24 +242,25 @@ if (isHTMLBaseElement(*element)) { result.appendLiteral("-->"); // Append a new base tag declaration. - result.append(WebPageSerializer::generateBaseTagDeclaration( + result.append(WebFrameSerializer::generateBaseTagDeclaration( param->document->baseTarget())); } return result.toString(); } -void WebPageSerializerImpl::saveHTMLContentToBuffer( +void WebFrameSerializerImpl::saveHTMLContentToBuffer( const String& result, SerializeDomParam* param) { m_dataBuffer.append(result); - encodeAndFlushBuffer(WebPageSerializerClient::CurrentFrameIsNotFinished, - param, - DoNotForceFlush); + encodeAndFlushBuffer( + WebFrameSerializerClient::CurrentFrameIsNotFinished, + param, + DoNotForceFlush); } -void WebPageSerializerImpl::encodeAndFlushBuffer( - WebPageSerializerClient::PageSerializationStatus status, +void WebFrameSerializerImpl::encodeAndFlushBuffer( + WebFrameSerializerClient::FrameSerializationStatus status, SerializeDomParam* param, FlushOption flushOption) { @@ -278,8 +280,9 @@ // TODO(yosin): We should utilize |MarkupFormatter| here to share code, // especially escaping attribute values, done by |WebEntities| |m_htmlEntities| // and |m_xmlEntities|. -void WebPageSerializerImpl::openTagToString(Element* element, - SerializeDomParam* param) +void WebFrameSerializerImpl::openTagToString( + Element* element, + SerializeDomParam* param) { bool needSkip; StringBuilder result; @@ -340,8 +343,9 @@ } // Serialize end tag of an specified element. -void WebPageSerializerImpl::endTagToString(Element* element, - SerializeDomParam* param) +void WebFrameSerializerImpl::endTagToString( + Element* element, + SerializeDomParam* param) { bool needSkip; StringBuilder result; @@ -358,7 +362,7 @@ // Check whether we have to write end tag for empty element. if (param->isHTMLDocument) { result.append('>'); - // FIXME: This code is horribly wrong. WebPageSerializerImpl must die. + // FIXME: This code is horribly wrong. WebFrameSerializerImpl must die. if (!element->isHTMLElement() || !toHTMLElement(element)->ieForbidsInsertHTML()) { // We need to write end tag when it is required. result.appendLiteral("</"); @@ -376,8 +380,9 @@ saveHTMLContentToBuffer(result.toString(), param); } -void WebPageSerializerImpl::buildContentForNode(Node* node, - SerializeDomParam* param) +void WebFrameSerializerImpl::buildContentForNode( + Node* node, + SerializeDomParam* param) { switch (node->nodeType()) { case Node::ELEMENT_NODE: @@ -408,9 +413,9 @@ } } -WebPageSerializerImpl::WebPageSerializerImpl( +WebFrameSerializerImpl::WebFrameSerializerImpl( WebLocalFrame* frame, - WebPageSerializerClient* client, + WebFrameSerializerClient* client, const WebVector<std::pair<WebURL, WebString>>& urlsToLocalPaths) : m_client(client) , m_htmlEntities(false) @@ -431,7 +436,7 @@ ASSERT(m_dataBuffer.isEmpty()); } -bool WebPageSerializerImpl::serialize() +bool WebFrameSerializerImpl::serialize() { bool didSerialization = false; @@ -453,15 +458,15 @@ if (documentElement) buildContentForNode(documentElement, ¶m); - encodeAndFlushBuffer(WebPageSerializerClient::CurrentFrameIsFinished, ¶m, ForceFlush); + encodeAndFlushBuffer(WebFrameSerializerClient::CurrentFrameIsFinished, ¶m, ForceFlush); } else { // Report empty contents for invalid URLs. m_client->didSerializeDataForFrame( - WebCString(), WebPageSerializerClient::CurrentFrameIsFinished); + WebCString(), WebFrameSerializerClient::CurrentFrameIsFinished); } ASSERT(m_dataBuffer.isEmpty()); return didSerialization; } -} // namespace blink +} // namespace blink
diff --git a/third_party/WebKit/Source/web/WebPageSerializerImpl.h b/third_party/WebKit/Source/web/WebFrameSerializerImpl.h similarity index 75% rename from third_party/WebKit/Source/web/WebPageSerializerImpl.h rename to third_party/WebKit/Source/web/WebFrameSerializerImpl.h index 212135c..0a403dd 100644 --- a/third_party/WebKit/Source/web/WebPageSerializerImpl.h +++ b/third_party/WebKit/Source/web/WebFrameSerializerImpl.h
@@ -28,9 +28,14 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef WebPageSerializerImpl_h -#define WebPageSerializerImpl_h +#ifndef WebFrameSerializerImpl_h +#define WebFrameSerializerImpl_h +#include "public/platform/WebString.h" +#include "public/platform/WebURL.h" +#include "public/web/WebFrameSerializer.h" +#include "public/web/WebFrameSerializerClient.h" +#include "web/WebEntities.h" #include "wtf/Forward.h" #include "wtf/HashMap.h" #include "wtf/Vector.h" @@ -38,12 +43,6 @@ #include "wtf/text/StringHash.h" #include "wtf/text/WTFString.h" -#include "public/platform/WebString.h" -#include "public/platform/WebURL.h" -#include "public/web/WebPageSerializer.h" -#include "public/web/WebPageSerializerClient.h" -#include "web/WebEntities.h" - namespace WTF { class TextEncoding; } @@ -58,7 +57,7 @@ // Responsible for serializing the specified frame into html // (replacing links with paths to local files). -class WebPageSerializerImpl { +class WebFrameSerializerImpl { STACK_ALLOCATED(); public: // Do serialization action. @@ -66,8 +65,8 @@ // Returns false to indicate that no data has been serialized (i.e. because // the target frame didn't have a valid url). // - // Synchronously calls WebPageSerializerClient methods to report - // serialization results. See WebPageSerializerClient comments for more + // Synchronously calls WebFrameSerializerClient methods to report + // serialization results. See WebFrameSerializerClient comments for more // details. bool serialize(); @@ -77,16 +76,16 @@ // individual chunks of data to be saved. // The parameter urlsToLocalPaths contains a mapping between original URLs // of saved resources and corresponding local file paths. - WebPageSerializerImpl( + WebFrameSerializerImpl( WebLocalFrame*, - WebPageSerializerClient*, + WebFrameSerializerClient*, const WebVector<std::pair<WebURL, WebString>>& urlsToLocalPaths); private: // Specified frame which need to be serialized; RawPtrWillBeMember<WebLocalFrameImpl> m_specifiedWebLocalFrameImpl; - // Pointer of WebPageSerializerClient - WebPageSerializerClient* m_client; + // Pointer of WebFrameSerializerClient + WebFrameSerializerClient* m_client; // This hash map is used to map resource URL of original link to its local // file path. typedef HashMap<WTF::String, WTF::String> LinkLocalPathMap; @@ -126,25 +125,34 @@ // Before we begin serializing open tag of a element, we give the target // element a chance to do some work prior to add some additional data. - WTF::String preActionBeforeSerializeOpenTag(const Element*, - SerializeDomParam* param, - bool* needSkip); + WTF::String preActionBeforeSerializeOpenTag( + const Element*, + SerializeDomParam*, + bool* needSkip); + // After we finish serializing open tag of a element, we give the target // element a chance to do some post work to add some additional data. - WTF::String postActionAfterSerializeOpenTag(const Element*, - SerializeDomParam* param); + WTF::String postActionAfterSerializeOpenTag( + const Element*, + SerializeDomParam*); + // Before we begin serializing end tag of a element, we give the target // element a chance to do some work prior to add some additional data. - WTF::String preActionBeforeSerializeEndTag(const Element*, - SerializeDomParam* param, - bool* needSkip); + WTF::String preActionBeforeSerializeEndTag( + const Element*, + SerializeDomParam*, + bool* needSkip); + // After we finish serializing end tag of a element, we give the target // element a chance to do some post work to add some additional data. - WTF::String postActionAfterSerializeEndTag(const Element*, - SerializeDomParam* param); + WTF::String postActionAfterSerializeEndTag( + const Element*, + SerializeDomParam*); + // Save generated html content to data buffer. - void saveHTMLContentToBuffer(const WTF::String& content, - SerializeDomParam* param); + void saveHTMLContentToBuffer( + const WTF::String& content, + SerializeDomParam*); enum FlushOption { ForceFlush, @@ -152,20 +160,27 @@ }; // Flushes the content buffer by encoding and sending the content to the - // WebPageSerializerClient. Content is not flushed if the buffer is not full + // WebFrameSerializerClient. Content is not flushed if the buffer is not full // unless force is 1. - void encodeAndFlushBuffer(WebPageSerializerClient::PageSerializationStatus status, - SerializeDomParam* param, - FlushOption); + void encodeAndFlushBuffer( + WebFrameSerializerClient::FrameSerializationStatus, + SerializeDomParam*, + FlushOption); + // Serialize open tag of an specified element. - void openTagToString(Element*, - SerializeDomParam* param); + void openTagToString( + Element*, + SerializeDomParam*); + // Serialize end tag of an specified element. - void endTagToString(Element*, - SerializeDomParam* param); + void endTagToString( + Element*, + SerializeDomParam*); + // Build content for a specified node - void buildContentForNode(Node*, - SerializeDomParam* param); + void buildContentForNode( + Node*, + SerializeDomParam*); }; } // namespace blink
diff --git a/third_party/WebKit/Source/web/WebPagePopupImpl.cpp b/third_party/WebKit/Source/web/WebPagePopupImpl.cpp index 719315774..055c78e 100644 --- a/third_party/WebKit/Source/web/WebPagePopupImpl.cpp +++ b/third_party/WebKit/Source/web/WebPagePopupImpl.cpp
@@ -245,7 +245,7 @@ m_chromeClient = PagePopupChromeClient::create(this); pageClients.chromeClient = m_chromeClient.get(); - m_page = adoptPtrWillBeNoop(new Page(pageClients)); + m_page = Page::create(pageClients); m_page->settings().setScriptEnabled(true); m_page->settings().setAllowScriptsToCloseWindows(true); m_page->settings().setDeviceSupportsTouch(m_webView->page()->settings().deviceSupportsTouch());
diff --git a/third_party/WebKit/Source/web/WebViewImpl.cpp b/third_party/WebKit/Source/web/WebViewImpl.cpp index 2ded59ed..a065625 100644 --- a/third_party/WebKit/Source/web/WebViewImpl.cpp +++ b/third_party/WebKit/Source/web/WebViewImpl.cpp
@@ -514,7 +514,7 @@ pageClients.dragClient = &m_dragClientImpl; pageClients.spellCheckerClient = &m_spellCheckerClientImpl; - m_page = adoptPtrWillBeNoop(new Page(pageClients)); + m_page = Page::createOrdinary(pageClients); MediaKeysController::provideMediaKeysTo(*m_page, &m_mediaKeysClientImpl); provideSpeechRecognitionTo(*m_page, SpeechRecognitionClientProxy::create(client ? client->speechRecognizer() : nullptr)); provideContextFeaturesTo(*m_page, ContextFeaturesClientImpl::create()); @@ -525,8 +525,6 @@ provideWorkerGlobalScopeProxyProviderTo(*m_page, WorkerGlobalScopeProxyProviderImpl::create()); StorageNamespaceController::provideStorageNamespaceTo(*m_page, &m_storageClientImpl); - m_page->makeOrdinary(); - if (m_client) { setVisibilityState(m_client->visibilityState(), true); }
diff --git a/third_party/WebKit/Source/web/tests/PageSerializerTest.cpp b/third_party/WebKit/Source/web/tests/FrameSerializerTest.cpp similarity index 86% rename from third_party/WebKit/Source/web/tests/PageSerializerTest.cpp rename to third_party/WebKit/Source/web/tests/FrameSerializerTest.cpp index a52501c..002cc9d4 100644 --- a/third_party/WebKit/Source/web/tests/PageSerializerTest.cpp +++ b/third_party/WebKit/Source/web/tests/FrameSerializerTest.cpp
@@ -28,11 +28,10 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "core/page/PageSerializer.h" +#include "core/frame/FrameSerializer.h" #include "bindings/core/v8/V8Binding.h" #include "bindings/core/v8/V8BindingForTesting.h" -#include "core/page/Page.h" #include "platform/SerializedResource.h" #include "platform/testing/URLTestHelpers.h" #include "public/platform/Platform.h" @@ -55,12 +54,12 @@ namespace blink { -class PageSerializerTest +class FrameSerializerTest : public testing::Test - , public PageSerializer::Delegate { + , public FrameSerializer::Delegate { public: - PageSerializerTest() - : m_folder(WebString::fromUTF8("pageserializer/")) + FrameSerializerTest() + : m_folder(WebString::fromUTF8("frameserializer/")) , m_baseUrl(toKURL("http://www.test.com")) { } @@ -101,7 +100,7 @@ { WebURLError error; error.reason = 0xdead + statusCode; - error.domain = "PageSerializerTest"; + error.domain = "FrameSerializerTest"; WebURLResponse response; response.initialize(); @@ -119,7 +118,7 @@ void serialize(const char* url) { FrameTestHelpers::loadFrame(m_helper.webView()->mainFrame(), KURL(m_baseUrl, url).string().utf8().data()); - PageSerializer serializer(m_resources, this); + FrameSerializer serializer(m_resources, *this); Frame* frame = m_helper.webViewImpl()->mainFrameImpl()->frame(); for (; frame; frame = frame->tree().traverseNext()) { // This is safe, because tests do not do cross-site navigation @@ -167,13 +166,7 @@ settings->setJavaScriptEnabled(true); } - // PageSerializer::Delegate implementation. - bool shouldIgnoreAttribute(const Attribute&) override - { - return false; - } - - // PageSerializer::Delegate implementation. + // FrameSerializer::Delegate implementation. bool rewriteLink(const Element& element, String& rewrittenLink) { String completeURL; @@ -203,9 +196,9 @@ String m_rewriteFolder; }; -TEST_F(PageSerializerTest, HTMLElements) +TEST_F(FrameSerializerTest, HTMLElements) { - setBaseFolder("pageserializer/elements/"); + setBaseFolder("frameserializer/elements/"); registerURL("elements.html", "text/html"); registerURL("style.css", "style.css", "text/css"); @@ -244,9 +237,9 @@ EXPECT_FALSE(isSerialized("nonExisting.png", "image/png")); } -TEST_F(PageSerializerTest, Frames) +TEST_F(FrameSerializerTest, Frames) { - setBaseFolder("pageserializer/frames/"); + setBaseFolder("frameserializer/frames/"); registerURL("simple_frames.html", "text/html"); registerURL("simple_frames_top.html", "text/html"); @@ -273,9 +266,9 @@ EXPECT_TRUE(isSerialized("frame_4.png", "image/png")); } -TEST_F(PageSerializerTest, IFrames) +TEST_F(FrameSerializerTest, IFrames) { - setBaseFolder("pageserializer/frames/"); + setBaseFolder("frameserializer/frames/"); registerURL("top_frame.html", "text/html"); registerURL("simple_iframe.html", "text/html"); @@ -303,7 +296,7 @@ EXPECT_TRUE(isSerialized("object.png", "image/png")); EXPECT_TRUE(isSerialized("embed.png", "image/png")); - // Ensure that page contents are not NFC-normalized before encoding. + // Ensure that frame contents are not NFC-normalized before encoding. String expectedMetaCharset = "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=EUC-KR\">"; EXPECT_TRUE(getSerializedData("encoded_iframe.html", "text/html").contains(expectedMetaCharset)); EXPECT_TRUE(getSerializedData("encoded_iframe.html", "text/html").contains("\xE4\xC5\xD1\xE2")); @@ -311,9 +304,9 @@ } // Tests that when serializing a page with blank frames these are reported with their resources. -TEST_F(PageSerializerTest, BlankFrames) +TEST_F(FrameSerializerTest, BlankFrames) { - setBaseFolder("pageserializer/frames/"); + setBaseFolder("frameserializer/frames/"); registerURL("blank_frames.html", "text/html"); registerURL("red_background.png", "image.png", "image/png"); @@ -335,9 +328,9 @@ // (i.e. SavePageMultiFrameBrowserTest.AboutBlank). } -TEST_F(PageSerializerTest, CSS) +TEST_F(FrameSerializerTest, CSS) { - setBaseFolder("pageserializer/css/"); + setBaseFolder("frameserializer/css/"); registerURL("css_test_page.html", "text/html"); registerURL("link_styles.css", "text/css"); @@ -389,9 +382,9 @@ EXPECT_FALSE(getSerializedData("encoding.css", "text/css").contains("\xE4\xC5\xE4\xC5")); } -TEST_F(PageSerializerTest, CSSImport) +TEST_F(FrameSerializerTest, CSSImport) { - setBaseFolder("pageserializer/css/"); + setBaseFolder("frameserializer/css/"); registerURL("import.html", "text/html"); registerURL("import/base.css", "text/css"); @@ -406,10 +399,10 @@ EXPECT_TRUE(isSerialized("import/absolute/green-header.css", "text/css")); } -TEST_F(PageSerializerTest, XMLDeclaration) +TEST_F(FrameSerializerTest, XMLDeclaration) { V8TestingScope scope(v8::Isolate::GetCurrent()); - setBaseFolder("pageserializer/xml/"); + setBaseFolder("frameserializer/xml/"); registerURL("xmldecl.xml", "text/xml"); serialize("xmldecl.xml"); @@ -418,9 +411,9 @@ EXPECT_TRUE(getSerializedData("xmldecl.xml").startsWith(expectedStart)); } -TEST_F(PageSerializerTest, DTD) +TEST_F(FrameSerializerTest, DTD) { - setBaseFolder("pageserializer/dtd/"); + setBaseFolder("frameserializer/dtd/"); registerURL("html5.html", "text/html"); serialize("html5.html"); @@ -429,9 +422,9 @@ EXPECT_TRUE(getSerializedData("html5.html").startsWith(expectedStart)); } -TEST_F(PageSerializerTest, Font) +TEST_F(FrameSerializerTest, Font) { - setBaseFolder("pageserializer/font/"); + setBaseFolder("frameserializer/font/"); registerURL("font.html", "text/html"); registerURL("font.ttf", "application/octet-stream"); @@ -441,9 +434,9 @@ EXPECT_TRUE(isSerialized("font.ttf", "application/octet-stream")); } -TEST_F(PageSerializerTest, DataURI) +TEST_F(FrameSerializerTest, DataURI) { - setBaseFolder("pageserializer/datauri/"); + setBaseFolder("frameserializer/datauri/"); registerURL("page_with_data.html", "text/html"); @@ -453,9 +446,9 @@ EXPECT_TRUE(isSerialized("page_with_data.html", "text/html")); } -TEST_F(PageSerializerTest, DataURIMorphing) +TEST_F(FrameSerializerTest, DataURIMorphing) { - setBaseFolder("pageserializer/datauri/"); + setBaseFolder("frameserializer/datauri/"); registerURL("page_with_morphing_data.html", "text/html"); @@ -465,9 +458,9 @@ EXPECT_TRUE(isSerialized("page_with_morphing_data.html", "text/html")); } -TEST_F(PageSerializerTest, RewriteLinksSimple) +TEST_F(FrameSerializerTest, RewriteLinksSimple) { - setBaseFolder("pageserializer/rewritelinks/"); + setBaseFolder("frameserializer/rewritelinks/"); setRewriteURLFolder("folder"); registerURL("rewritelinks_simple.html", "text/html"); @@ -484,9 +477,9 @@ } // Test that we don't regress https://bugs.webkit.org/show_bug.cgi?id=99105 -TEST_F(PageSerializerTest, SVGImageDontCrash) +TEST_F(FrameSerializerTest, SVGImageDontCrash) { - setBaseFolder("pageserializer/svg/"); + setBaseFolder("frameserializer/svg/"); registerURL("page_with_svg_image.html", "text/html"); registerURL("green_rectangle.svg", "image/svg+xml"); @@ -499,9 +492,9 @@ EXPECT_GT(getSerializedData("green_rectangle.svg", "image/svg+xml").length(), 250U); } -TEST_F(PageSerializerTest, DontIncludeErrorImage) +TEST_F(FrameSerializerTest, DontIncludeErrorImage) { - setBaseFolder("pageserializer/image/"); + setBaseFolder("frameserializer/image/"); registerURL("page_with_img_error.html", "text/html"); registerURL("error_image.png", "image/png"); @@ -513,9 +506,9 @@ EXPECT_FALSE(isSerialized("error_image.png", "image/png")); } -TEST_F(PageSerializerTest, NamespaceElementsDontCrash) +TEST_F(FrameSerializerTest, NamespaceElementsDontCrash) { - setBaseFolder("pageserializer/namespace/"); + setBaseFolder("frameserializer/namespace/"); registerURL("namespace_element.html", "text/html"); @@ -526,15 +519,15 @@ EXPECT_GT(getSerializedData("namespace_element.html", "text/html").length(), 0U); } -TEST_F(PageSerializerTest, markOfTheWebDeclaration) +TEST_F(FrameSerializerTest, markOfTheWebDeclaration) { - EXPECT_EQ("saved from url=(0015)http://foo.com/", PageSerializer::markOfTheWebDeclaration(KURL(ParsedURLString, "http://foo.com"))); - EXPECT_EQ("saved from url=(0015)http://f-o.com/", PageSerializer::markOfTheWebDeclaration(KURL(ParsedURLString, "http://f-o.com"))); - EXPECT_EQ("saved from url=(0019)http://foo.com-%2D/", PageSerializer::markOfTheWebDeclaration(KURL(ParsedURLString, "http://foo.com--"))); - EXPECT_EQ("saved from url=(0024)http://f-%2D.com-%2D%3E/", PageSerializer::markOfTheWebDeclaration(KURL(ParsedURLString, "http://f--.com-->"))); - EXPECT_EQ("saved from url=(0020)http://foo.com/?-%2D", PageSerializer::markOfTheWebDeclaration(KURL(ParsedURLString, "http://foo.com?--"))); - EXPECT_EQ("saved from url=(0020)http://foo.com/#-%2D", PageSerializer::markOfTheWebDeclaration(KURL(ParsedURLString, "http://foo.com#--"))); - EXPECT_EQ("saved from url=(0026)http://foo.com/#bar-%2Dbaz", PageSerializer::markOfTheWebDeclaration(KURL(ParsedURLString, "http://foo.com#bar--baz"))); + EXPECT_EQ("saved from url=(0015)http://foo.com/", FrameSerializer::markOfTheWebDeclaration(KURL(ParsedURLString, "http://foo.com"))); + EXPECT_EQ("saved from url=(0015)http://f-o.com/", FrameSerializer::markOfTheWebDeclaration(KURL(ParsedURLString, "http://f-o.com"))); + EXPECT_EQ("saved from url=(0019)http://foo.com-%2D/", FrameSerializer::markOfTheWebDeclaration(KURL(ParsedURLString, "http://foo.com--"))); + EXPECT_EQ("saved from url=(0024)http://f-%2D.com-%2D%3E/", FrameSerializer::markOfTheWebDeclaration(KURL(ParsedURLString, "http://f--.com-->"))); + EXPECT_EQ("saved from url=(0020)http://foo.com/?-%2D", FrameSerializer::markOfTheWebDeclaration(KURL(ParsedURLString, "http://foo.com?--"))); + EXPECT_EQ("saved from url=(0020)http://foo.com/#-%2D", FrameSerializer::markOfTheWebDeclaration(KURL(ParsedURLString, "http://foo.com#--"))); + EXPECT_EQ("saved from url=(0026)http://foo.com/#bar-%2Dbaz", FrameSerializer::markOfTheWebDeclaration(KURL(ParsedURLString, "http://foo.com#bar--baz"))); } } // namespace blink
diff --git a/third_party/WebKit/Source/web/tests/WebPageSerializerTest.cpp b/third_party/WebKit/Source/web/tests/WebFrameSerializerTest.cpp similarity index 83% rename from third_party/WebKit/Source/web/tests/WebPageSerializerTest.cpp rename to third_party/WebKit/Source/web/tests/WebFrameSerializerTest.cpp index 1c851d6..26838a2 100644 --- a/third_party/WebKit/Source/web/tests/WebPageSerializerTest.cpp +++ b/third_party/WebKit/Source/web/tests/WebFrameSerializerTest.cpp
@@ -28,7 +28,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "public/web/WebPageSerializer.h" +#include "public/web/WebFrameSerializer.h" #include "platform/testing/URLTestHelpers.h" #include "platform/weborigin/KURL.h" @@ -36,7 +36,7 @@ #include "public/platform/WebString.h" #include "public/platform/WebURL.h" #include "public/platform/WebUnitTestSupport.h" -#include "public/web/WebPageSerializerClient.h" +#include "public/web/WebFrameSerializerClient.h" #include "testing/gtest/include/gtest/gtest.h" #include "web/WebLocalFrameImpl.h" #include "web/WebViewImpl.h" @@ -46,12 +46,12 @@ namespace blink { namespace { -class SimpleWebPageSerializerClient final : public WebPageSerializerClient { +class SimpleWebFrameSerializerClient final : public WebFrameSerializerClient { public: String toString() { return m_builder.toString(); } private: - void didSerializeDataForFrame(const WebCString& data, PageSerializationStatus) final + void didSerializeDataForFrame(const WebCString& data, FrameSerializationStatus) final { m_builder.append(data.data(), data.length()); } @@ -61,14 +61,14 @@ } // namespace -class WebPageSerializerTest : public testing::Test { +class WebFrameSerializerTest : public testing::Test { protected: - WebPageSerializerTest() + WebFrameSerializerTest() { m_helper.initialize(); } - ~WebPageSerializerTest() override + ~WebFrameSerializerTest() override { Platform::current()->unitTestSupport()->unregisterAllMockedURLs(); } @@ -76,18 +76,18 @@ void registerMockedImageURL(const String& url) { // Image resources need to be mocked, but irrelevant here what image they map to. - URLTestHelpers::registerMockedURLLoad(KURL(ParsedURLString, url), "pageserialization/awesome.png"); + URLTestHelpers::registerMockedURLLoad(KURL(ParsedURLString, url), "frameserialization/awesome.png"); } String serializeFile(const String& url, const String& fileName) { KURL parsedURL(ParsedURLString, url); - URLTestHelpers::registerMockedURLLoad(parsedURL, fileName, "pageserialization/", "text/html"); + URLTestHelpers::registerMockedURLLoad(parsedURL, fileName, "frameserialization/", "text/html"); FrameTestHelpers::loadFrame(mainFrameImpl(), url.utf8().data()); std::vector<std::pair<WebURL, WebString>> urlsToLocalPaths; urlsToLocalPaths.push_back(std::make_pair(parsedURL, WebString("local"))); - SimpleWebPageSerializerClient serializerClient; - WebPageSerializer::serialize(mainFrameImpl(), &serializerClient, urlsToLocalPaths); + SimpleWebFrameSerializerClient serializerClient; + WebFrameSerializer::serialize(mainFrameImpl(), &serializerClient, urlsToLocalPaths); return serializerClient.toString(); } @@ -100,7 +100,7 @@ FrameTestHelpers::WebViewHelper m_helper; }; -TEST_F(WebPageSerializerTest, URLAttributeValues) +TEST_F(WebFrameSerializerTest, URLAttributeValues) { registerMockedImageURL("javascript:\""); @@ -115,13 +115,13 @@ EXPECT_EQ(expectedHTML, actualHTML); } -TEST_F(WebPageSerializerTest, EncodingAndNormalization) +TEST_F(WebFrameSerializerTest, EncodingAndNormalization) { const char* expectedHTML = "<!DOCTYPE html>\n" "<!-- saved from url=(0020)http://www.test.com/ -->\n" "<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=EUC-KR\">\n" - "<title>Ensure NFC normalization is not performed by page serializer</title>\n" + "<title>Ensure NFC normalization is not performed by frame serializer</title>\n" "</head><body>\n" "\xe4\xc5\xd1\xe2\n" "\n</body></html>"; @@ -129,7 +129,7 @@ EXPECT_EQ(expectedHTML, actualHTML); } -TEST_F(WebPageSerializerTest, FromUrlWithMinusMinus) +TEST_F(WebFrameSerializerTest, FromUrlWithMinusMinus) { String actualHTML = serializeFile("http://www.test.com?--x--", "text_only_page.html"); EXPECT_EQ("<!-- saved from url=(0030)http://www.test.com/?-%2Dx-%2D -->", actualHTML.substring(1, 60));
diff --git a/third_party/WebKit/Source/web/tests/WebFrameTest.cpp b/third_party/WebKit/Source/web/tests/WebFrameTest.cpp index e184269b..7469a0b 100644 --- a/third_party/WebKit/Source/web/tests/WebFrameTest.cpp +++ b/third_party/WebKit/Source/web/tests/WebFrameTest.cpp
@@ -5128,7 +5128,7 @@ TEST_P(ParameterizedWebFrameTest, EmptyDocument) { - registerMockedHttpURLLoad("pageserializer/svg/green_rectangle.svg"); + registerMockedHttpURLLoad("frameserializer/svg/green_rectangle.svg"); TestWillInsertBodyWebFrameClient webFrameClient; FrameTestHelpers::WebViewHelper webViewHelper(this);
diff --git a/third_party/WebKit/Source/web/tests/data/pageserialization/awesome.png b/third_party/WebKit/Source/web/tests/data/frameserialization/awesome.png similarity index 100% rename from third_party/WebKit/Source/web/tests/data/pageserialization/awesome.png rename to third_party/WebKit/Source/web/tests/data/frameserialization/awesome.png
diff --git a/third_party/WebKit/Source/web/tests/data/pageserialization/beautifull.css b/third_party/WebKit/Source/web/tests/data/frameserialization/beautifull.css similarity index 100% rename from third_party/WebKit/Source/web/tests/data/pageserialization/beautifull.css rename to third_party/WebKit/Source/web/tests/data/frameserialization/beautifull.css
diff --git a/third_party/WebKit/Source/web/tests/data/pageserialization/embed_iframe.html b/third_party/WebKit/Source/web/tests/data/frameserialization/embed_iframe.html similarity index 100% rename from third_party/WebKit/Source/web/tests/data/pageserialization/embed_iframe.html rename to third_party/WebKit/Source/web/tests/data/frameserialization/embed_iframe.html
diff --git a/third_party/WebKit/Source/web/tests/data/frameserialization/encoding_normalization.html b/third_party/WebKit/Source/web/tests/data/frameserialization/encoding_normalization.html new file mode 100644 index 0000000..679d950 --- /dev/null +++ b/third_party/WebKit/Source/web/tests/data/frameserialization/encoding_normalization.html
@@ -0,0 +1,6 @@ +<!DOCTYPE html> +<meta charset="euc-kr"> +<title>Ensure NFC normalization is not performed by frame serializer</title> +<body> +樂樂 +</body>
diff --git a/third_party/WebKit/Source/web/tests/data/pageserialization/object_iframe.html b/third_party/WebKit/Source/web/tests/data/frameserialization/object_iframe.html similarity index 100% rename from third_party/WebKit/Source/web/tests/data/pageserialization/object_iframe.html rename to third_party/WebKit/Source/web/tests/data/frameserialization/object_iframe.html
diff --git a/third_party/WebKit/Source/web/tests/data/pageserialization/simple_iframe.html b/third_party/WebKit/Source/web/tests/data/frameserialization/simple_iframe.html similarity index 66% rename from third_party/WebKit/Source/web/tests/data/pageserialization/simple_iframe.html rename to third_party/WebKit/Source/web/tests/data/frameserialization/simple_iframe.html index 65dca17..dd12ee6 100644 --- a/third_party/WebKit/Source/web/tests/data/pageserialization/simple_iframe.html +++ b/third_party/WebKit/Source/web/tests/data/frameserialization/simple_iframe.html
@@ -1,6 +1,6 @@ <html> <!-- - This page is used to test that WebPageSerializer::retrieveAllResources retrieves + This page is used to test that WebFrameSerializer::retrieveAllResources retrieves correctly the expected resources when dealing with multiple frames. -->
diff --git a/third_party/WebKit/Source/web/tests/data/pageserialization/simple_page.html b/third_party/WebKit/Source/web/tests/data/frameserialization/simple_page.html similarity index 94% rename from third_party/WebKit/Source/web/tests/data/pageserialization/simple_page.html rename to third_party/WebKit/Source/web/tests/data/frameserialization/simple_page.html index 66d09e1..c293c18 100644 --- a/third_party/WebKit/Source/web/tests/data/pageserialization/simple_page.html +++ b/third_party/WebKit/Source/web/tests/data/frameserialization/simple_page.html
@@ -1,6 +1,6 @@ <html> <!-- - This page is used to test that WebPageSerializer::retrieveAllResources retrieves + This page is used to test that WebFrameSerializer::retrieveAllResources retrieves correctly the expected resources from various HTML nodes. -->
diff --git a/third_party/WebKit/Source/web/tests/data/pageserialization/text_only_page.html b/third_party/WebKit/Source/web/tests/data/frameserialization/text_only_page.html similarity index 100% rename from third_party/WebKit/Source/web/tests/data/pageserialization/text_only_page.html rename to third_party/WebKit/Source/web/tests/data/frameserialization/text_only_page.html
diff --git a/third_party/WebKit/Source/web/tests/data/pageserialization/top_frame.html b/third_party/WebKit/Source/web/tests/data/frameserialization/top_frame.html similarity index 87% rename from third_party/WebKit/Source/web/tests/data/pageserialization/top_frame.html rename to third_party/WebKit/Source/web/tests/data/frameserialization/top_frame.html index edc8ab2..cdf5d45c 100644 --- a/third_party/WebKit/Source/web/tests/data/pageserialization/top_frame.html +++ b/third_party/WebKit/Source/web/tests/data/frameserialization/top_frame.html
@@ -1,6 +1,6 @@ <html> <!-- - This page is used to test that WebPageSerializer::retrieveAllResources retrieves + This page is used to test that WebFrameSerializer::retrieveAllResources retrieves correctly the expected resources when dealing with multiple frames. -->
diff --git a/third_party/WebKit/Source/web/tests/data/pageserialization/url_attribute_values.html b/third_party/WebKit/Source/web/tests/data/frameserialization/url_attribute_values.html similarity index 100% rename from third_party/WebKit/Source/web/tests/data/pageserialization/url_attribute_values.html rename to third_party/WebKit/Source/web/tests/data/frameserialization/url_attribute_values.html
diff --git a/third_party/WebKit/Source/web/tests/data/pageserializer/css/css_test_page.html b/third_party/WebKit/Source/web/tests/data/frameserializer/css/css_test_page.html similarity index 98% rename from third_party/WebKit/Source/web/tests/data/pageserializer/css/css_test_page.html rename to third_party/WebKit/Source/web/tests/data/frameserializer/css/css_test_page.html index c1f96f0a..bf2b3d1 100644 --- a/third_party/WebKit/Source/web/tests/data/pageserializer/css/css_test_page.html +++ b/third_party/WebKit/Source/web/tests/data/frameserializer/css/css_test_page.html
@@ -1,5 +1,5 @@ <!-- This page is used to test that CSS resources are retrieved correctly by - the PageSerializer. + the FrameSerializer. --> <html> <head>
diff --git a/third_party/WebKit/Source/web/tests/data/pageserializer/css/encoding.css b/third_party/WebKit/Source/web/tests/data/frameserializer/css/encoding.css similarity index 100% rename from third_party/WebKit/Source/web/tests/data/pageserializer/css/encoding.css rename to third_party/WebKit/Source/web/tests/data/frameserializer/css/encoding.css
diff --git a/third_party/WebKit/Source/web/tests/data/pageserializer/css/image.png b/third_party/WebKit/Source/web/tests/data/frameserializer/css/image.png similarity index 100% rename from third_party/WebKit/Source/web/tests/data/pageserializer/css/image.png rename to third_party/WebKit/Source/web/tests/data/frameserializer/css/image.png Binary files differ
diff --git a/third_party/WebKit/Source/web/tests/data/pageserializer/css/import.html b/third_party/WebKit/Source/web/tests/data/frameserializer/css/import.html similarity index 100% rename from third_party/WebKit/Source/web/tests/data/pageserializer/css/import.html rename to third_party/WebKit/Source/web/tests/data/frameserializer/css/import.html
diff --git a/third_party/WebKit/Source/web/tests/data/pageserializer/css/import/absolute/green-header.css b/third_party/WebKit/Source/web/tests/data/frameserializer/css/import/absolute/green-header.css similarity index 100% rename from third_party/WebKit/Source/web/tests/data/pageserializer/css/import/absolute/green-header.css rename to third_party/WebKit/Source/web/tests/data/frameserializer/css/import/absolute/green-header.css
diff --git a/third_party/WebKit/Source/web/tests/data/pageserializer/css/import/base.css b/third_party/WebKit/Source/web/tests/data/frameserializer/css/import/base.css similarity index 100% rename from third_party/WebKit/Source/web/tests/data/pageserializer/css/import/base.css rename to third_party/WebKit/Source/web/tests/data/frameserializer/css/import/base.css
diff --git a/third_party/WebKit/Source/web/tests/data/pageserializer/css/import/relative/red-background.css b/third_party/WebKit/Source/web/tests/data/frameserializer/css/import/relative/red-background.css similarity index 100% rename from third_party/WebKit/Source/web/tests/data/pageserializer/css/import/relative/red-background.css rename to third_party/WebKit/Source/web/tests/data/frameserializer/css/import/relative/red-background.css
diff --git a/third_party/WebKit/Source/web/tests/data/pageserializer/css/import_style_from_link.css b/third_party/WebKit/Source/web/tests/data/frameserializer/css/import_style_from_link.css similarity index 100% rename from third_party/WebKit/Source/web/tests/data/pageserializer/css/import_style_from_link.css rename to third_party/WebKit/Source/web/tests/data/frameserializer/css/import_style_from_link.css
diff --git a/third_party/WebKit/Source/web/tests/data/pageserializer/css/import_styles.css b/third_party/WebKit/Source/web/tests/data/frameserializer/css/import_styles.css similarity index 100% rename from third_party/WebKit/Source/web/tests/data/pageserializer/css/import_styles.css rename to third_party/WebKit/Source/web/tests/data/frameserializer/css/import_styles.css
diff --git a/third_party/WebKit/Source/web/tests/data/pageserializer/css/link_styles.css b/third_party/WebKit/Source/web/tests/data/frameserializer/css/link_styles.css similarity index 100% rename from third_party/WebKit/Source/web/tests/data/pageserializer/css/link_styles.css rename to third_party/WebKit/Source/web/tests/data/frameserializer/css/link_styles.css
diff --git a/third_party/WebKit/Source/web/tests/data/pageserializer/datauri/page_with_data.html b/third_party/WebKit/Source/web/tests/data/frameserializer/datauri/page_with_data.html similarity index 81% rename from third_party/WebKit/Source/web/tests/data/pageserializer/datauri/page_with_data.html rename to third_party/WebKit/Source/web/tests/data/frameserializer/datauri/page_with_data.html index 1cd6442..c8dcd725 100644 --- a/third_party/WebKit/Source/web/tests/data/pageserializer/datauri/page_with_data.html +++ b/third_party/WebKit/Source/web/tests/data/frameserializer/datauri/page_with_data.html
@@ -1,5 +1,5 @@ <!-- - This page is used to test that PageSerializer does not unnecessarily create + This page is used to test that FrameSerializer does not unnecessarily create resources for data URLs. --> <html>
diff --git a/third_party/WebKit/Source/web/tests/data/pageserializer/datauri/page_with_morphing_data.html b/third_party/WebKit/Source/web/tests/data/frameserializer/datauri/page_with_morphing_data.html similarity index 73% rename from third_party/WebKit/Source/web/tests/data/pageserializer/datauri/page_with_morphing_data.html rename to third_party/WebKit/Source/web/tests/data/frameserializer/datauri/page_with_morphing_data.html index 08123ca..a40d37d2 100644 --- a/third_party/WebKit/Source/web/tests/data/pageserializer/datauri/page_with_morphing_data.html +++ b/third_party/WebKit/Source/web/tests/data/frameserializer/datauri/page_with_morphing_data.html
@@ -1,5 +1,5 @@ <!-- - This page is used to test that PageSerializer does create resources for data + This page is used to test that FrameSerializer does create resources for data URLs for which the content morphed. --> <html>
diff --git a/third_party/WebKit/Source/web/tests/data/pageserializer/dtd/html5.html b/third_party/WebKit/Source/web/tests/data/frameserializer/dtd/html5.html similarity index 100% rename from third_party/WebKit/Source/web/tests/data/pageserializer/dtd/html5.html rename to third_party/WebKit/Source/web/tests/data/frameserializer/dtd/html5.html
diff --git a/third_party/WebKit/Source/web/tests/data/pageserializer/elements/elements.html b/third_party/WebKit/Source/web/tests/data/frameserializer/elements/elements.html similarity index 93% rename from third_party/WebKit/Source/web/tests/data/pageserializer/elements/elements.html rename to third_party/WebKit/Source/web/tests/data/frameserializer/elements/elements.html index 8c2473f..b624179 100644 --- a/third_party/WebKit/Source/web/tests/data/pageserializer/elements/elements.html +++ b/third_party/WebKit/Source/web/tests/data/frameserializer/elements/elements.html
@@ -1,4 +1,4 @@ -<!-- This page is used to test that PageSerializer correctly serializes the +<!-- This page is used to test that FrameSerializer correctly serializes the expected resources from various HTML nodes. --> <html>
diff --git a/third_party/WebKit/Source/web/tests/data/pageserializer/elements/empty.txt b/third_party/WebKit/Source/web/tests/data/frameserializer/elements/empty.txt similarity index 100% rename from third_party/WebKit/Source/web/tests/data/pageserializer/elements/empty.txt rename to third_party/WebKit/Source/web/tests/data/frameserializer/elements/empty.txt
diff --git a/third_party/WebKit/Source/web/tests/data/pageserializer/elements/image.png b/third_party/WebKit/Source/web/tests/data/frameserializer/elements/image.png similarity index 100% rename from third_party/WebKit/Source/web/tests/data/pageserializer/elements/image.png rename to third_party/WebKit/Source/web/tests/data/frameserializer/elements/image.png Binary files differ
diff --git a/third_party/WebKit/Source/web/tests/data/pageserializer/elements/style.css b/third_party/WebKit/Source/web/tests/data/frameserializer/elements/style.css similarity index 100% rename from third_party/WebKit/Source/web/tests/data/pageserializer/elements/style.css rename to third_party/WebKit/Source/web/tests/data/frameserializer/elements/style.css
diff --git a/third_party/WebKit/Source/web/tests/data/pageserializer/font/font.html b/third_party/WebKit/Source/web/tests/data/frameserializer/font/font.html similarity index 74% rename from third_party/WebKit/Source/web/tests/data/pageserializer/font/font.html rename to third_party/WebKit/Source/web/tests/data/frameserializer/font/font.html index f242deb8..9cab190 100644 --- a/third_party/WebKit/Source/web/tests/data/pageserializer/font/font.html +++ b/third_party/WebKit/Source/web/tests/data/frameserializer/font/font.html
@@ -1,7 +1,7 @@ <!doctype html> <html> <head> - <title>PageSerializer Font Test</title> + <title>FrameSerializer Font Test</title> <style> @font-face { font-family: "URL Font"; @@ -14,7 +14,7 @@ </head> <body> <div> - <p>PageSerializer Font Test</p> + <p>FrameSerializer Font Test</p> </div> </body> </html>
diff --git a/third_party/WebKit/Source/web/tests/data/pageserializer/font/font.ttf b/third_party/WebKit/Source/web/tests/data/frameserializer/font/font.ttf similarity index 100% rename from third_party/WebKit/Source/web/tests/data/pageserializer/font/font.ttf rename to third_party/WebKit/Source/web/tests/data/frameserializer/font/font.ttf Binary files differ
diff --git a/third_party/WebKit/Source/web/tests/data/pageserializer/frames/blank_frames.html b/third_party/WebKit/Source/web/tests/data/frameserializer/frames/blank_frames.html similarity index 95% rename from third_party/WebKit/Source/web/tests/data/pageserializer/frames/blank_frames.html rename to third_party/WebKit/Source/web/tests/data/frameserializer/frames/blank_frames.html index a4b45b6..98d82ec7 100644 --- a/third_party/WebKit/Source/web/tests/data/pageserializer/frames/blank_frames.html +++ b/third_party/WebKit/Source/web/tests/data/frameserializer/frames/blank_frames.html
@@ -1,5 +1,5 @@ <!-- This page is used to test that blank frames with dynamic contents are - correctly serialized by the PageSerializer. + correctly serialized by the FrameSerializer. --> <html> <script>
diff --git a/third_party/WebKit/Source/web/tests/data/pageserializer/frames/embed_iframe.html b/third_party/WebKit/Source/web/tests/data/frameserializer/frames/embed_iframe.html similarity index 100% rename from third_party/WebKit/Source/web/tests/data/pageserializer/frames/embed_iframe.html rename to third_party/WebKit/Source/web/tests/data/frameserializer/frames/embed_iframe.html
diff --git a/third_party/WebKit/Source/web/tests/data/pageserializer/frames/encoded_iframe.html b/third_party/WebKit/Source/web/tests/data/frameserializer/frames/encoded_iframe.html similarity index 100% rename from third_party/WebKit/Source/web/tests/data/pageserializer/frames/encoded_iframe.html rename to third_party/WebKit/Source/web/tests/data/frameserializer/frames/encoded_iframe.html
diff --git a/third_party/WebKit/Source/web/tests/data/pageserializer/frames/image.png b/third_party/WebKit/Source/web/tests/data/frameserializer/frames/image.png similarity index 100% rename from third_party/WebKit/Source/web/tests/data/pageserializer/frames/image.png rename to third_party/WebKit/Source/web/tests/data/frameserializer/frames/image.png Binary files differ
diff --git a/third_party/WebKit/Source/web/tests/data/pageserializer/frames/object_iframe.html b/third_party/WebKit/Source/web/tests/data/frameserializer/frames/object_iframe.html similarity index 100% rename from third_party/WebKit/Source/web/tests/data/pageserializer/frames/object_iframe.html rename to third_party/WebKit/Source/web/tests/data/frameserializer/frames/object_iframe.html
diff --git a/third_party/WebKit/Source/web/tests/data/pageserializer/frames/simple_frames.html b/third_party/WebKit/Source/web/tests/data/frameserializer/frames/simple_frames.html similarity index 76% rename from third_party/WebKit/Source/web/tests/data/pageserializer/frames/simple_frames.html rename to third_party/WebKit/Source/web/tests/data/frameserializer/frames/simple_frames.html index 1bc9951..ae7b88b7 100644 --- a/third_party/WebKit/Source/web/tests/data/pageserializer/frames/simple_frames.html +++ b/third_party/WebKit/Source/web/tests/data/frameserializer/frames/simple_frames.html
@@ -1,4 +1,4 @@ -<!-- This page is used to test that the PageSerializer correctly retrieves +<!-- This page is used to test that the FrameSerializer correctly retrieves resources in frames and framesets. --> <html>
diff --git a/third_party/WebKit/Source/web/tests/data/pageserializer/frames/simple_frames_1.html b/third_party/WebKit/Source/web/tests/data/frameserializer/frames/simple_frames_1.html similarity index 100% rename from third_party/WebKit/Source/web/tests/data/pageserializer/frames/simple_frames_1.html rename to third_party/WebKit/Source/web/tests/data/frameserializer/frames/simple_frames_1.html
diff --git a/third_party/WebKit/Source/web/tests/data/pageserializer/frames/simple_frames_3.html b/third_party/WebKit/Source/web/tests/data/frameserializer/frames/simple_frames_3.html similarity index 100% rename from third_party/WebKit/Source/web/tests/data/pageserializer/frames/simple_frames_3.html rename to third_party/WebKit/Source/web/tests/data/frameserializer/frames/simple_frames_3.html
diff --git a/third_party/WebKit/Source/web/tests/data/pageserializer/frames/simple_frames_top.html b/third_party/WebKit/Source/web/tests/data/frameserializer/frames/simple_frames_top.html similarity index 100% rename from third_party/WebKit/Source/web/tests/data/pageserializer/frames/simple_frames_top.html rename to third_party/WebKit/Source/web/tests/data/frameserializer/frames/simple_frames_top.html
diff --git a/third_party/WebKit/Source/web/tests/data/pageserializer/frames/simple_iframe.html b/third_party/WebKit/Source/web/tests/data/frameserializer/frames/simple_iframe.html similarity index 100% rename from third_party/WebKit/Source/web/tests/data/pageserializer/frames/simple_iframe.html rename to third_party/WebKit/Source/web/tests/data/frameserializer/frames/simple_iframe.html
diff --git a/third_party/WebKit/Source/web/tests/data/pageserializer/frames/top_frame.html b/third_party/WebKit/Source/web/tests/data/frameserializer/frames/top_frame.html similarity index 88% rename from third_party/WebKit/Source/web/tests/data/pageserializer/frames/top_frame.html rename to third_party/WebKit/Source/web/tests/data/frameserializer/frames/top_frame.html index 2e6adff5..2a5b8e8 100644 --- a/third_party/WebKit/Source/web/tests/data/pageserializer/frames/top_frame.html +++ b/third_party/WebKit/Source/web/tests/data/frameserializer/frames/top_frame.html
@@ -1,4 +1,4 @@ -<!-- This page is used to test that the PageSerializer correctly retrieves +<!-- This page is used to test that the FrameSerializer correctly retrieves the expected resources when dealing with iframes. --> <html>
diff --git a/third_party/WebKit/Source/web/tests/data/pageserializer/image/error_image.png b/third_party/WebKit/Source/web/tests/data/frameserializer/image/error_image.png similarity index 100% rename from third_party/WebKit/Source/web/tests/data/pageserializer/image/error_image.png rename to third_party/WebKit/Source/web/tests/data/frameserializer/image/error_image.png Binary files differ
diff --git a/third_party/WebKit/Source/web/tests/data/pageserializer/image/page_with_img_error.html b/third_party/WebKit/Source/web/tests/data/frameserializer/image/page_with_img_error.html similarity index 100% rename from third_party/WebKit/Source/web/tests/data/pageserializer/image/page_with_img_error.html rename to third_party/WebKit/Source/web/tests/data/frameserializer/image/page_with_img_error.html
diff --git a/third_party/WebKit/Source/web/tests/data/pageserializer/namespace/namespace_element.html b/third_party/WebKit/Source/web/tests/data/frameserializer/namespace/namespace_element.html similarity index 86% rename from third_party/WebKit/Source/web/tests/data/pageserializer/namespace/namespace_element.html rename to third_party/WebKit/Source/web/tests/data/frameserializer/namespace/namespace_element.html index 1d5bc2a7..adf1d23 100644 --- a/third_party/WebKit/Source/web/tests/data/pageserializer/namespace/namespace_element.html +++ b/third_party/WebKit/Source/web/tests/data/frameserializer/namespace/namespace_element.html
@@ -1,5 +1,5 @@ <!-- This page is used to test that namespace elements are retrieved - correctly by the PageSerializer. + correctly by the FrameSerializer. --> <html> <body>
diff --git a/third_party/WebKit/Source/web/tests/data/pageserializer/rewritelinks/image.png b/third_party/WebKit/Source/web/tests/data/frameserializer/rewritelinks/image.png similarity index 100% rename from third_party/WebKit/Source/web/tests/data/pageserializer/rewritelinks/image.png rename to third_party/WebKit/Source/web/tests/data/frameserializer/rewritelinks/image.png Binary files differ
diff --git a/third_party/WebKit/Source/web/tests/data/pageserializer/rewritelinks/rewritelinks_simple.html b/third_party/WebKit/Source/web/tests/data/frameserializer/rewritelinks/rewritelinks_simple.html similarity index 88% rename from third_party/WebKit/Source/web/tests/data/pageserializer/rewritelinks/rewritelinks_simple.html rename to third_party/WebKit/Source/web/tests/data/frameserializer/rewritelinks/rewritelinks_simple.html index c725650..e7da9e3 100644 --- a/third_party/WebKit/Source/web/tests/data/pageserializer/rewritelinks/rewritelinks_simple.html +++ b/third_party/WebKit/Source/web/tests/data/frameserializer/rewritelinks/rewritelinks_simple.html
@@ -1,5 +1,5 @@ <!-- This page is used to test that links are rewritten correctly by the - PageSerializer. + FrameSerializer. --> <html> <body>
diff --git a/third_party/WebKit/Source/web/tests/data/pageserializer/svg/green_rectangle.svg b/third_party/WebKit/Source/web/tests/data/frameserializer/svg/green_rectangle.svg similarity index 100% rename from third_party/WebKit/Source/web/tests/data/pageserializer/svg/green_rectangle.svg rename to third_party/WebKit/Source/web/tests/data/frameserializer/svg/green_rectangle.svg
diff --git a/third_party/WebKit/Source/web/tests/data/pageserializer/svg/page_with_svg_image.html b/third_party/WebKit/Source/web/tests/data/frameserializer/svg/page_with_svg_image.html similarity index 85% rename from third_party/WebKit/Source/web/tests/data/pageserializer/svg/page_with_svg_image.html rename to third_party/WebKit/Source/web/tests/data/frameserializer/svg/page_with_svg_image.html index 2710099..0ea7d69 100644 --- a/third_party/WebKit/Source/web/tests/data/pageserializer/svg/page_with_svg_image.html +++ b/third_party/WebKit/Source/web/tests/data/frameserializer/svg/page_with_svg_image.html
@@ -1,5 +1,5 @@ <!-- This page is used to test that SVG images are retrieved correctly by - the PageSerializer. + the FrameSerializer. --> <html> <body>
diff --git a/third_party/WebKit/Source/web/tests/data/pageserializer/xml/xmldecl.xml b/third_party/WebKit/Source/web/tests/data/frameserializer/xml/xmldecl.xml similarity index 100% rename from third_party/WebKit/Source/web/tests/data/pageserializer/xml/xmldecl.xml rename to third_party/WebKit/Source/web/tests/data/frameserializer/xml/xmldecl.xml
diff --git a/third_party/WebKit/Source/web/tests/data/pageserialization/encoding_normalization.html b/third_party/WebKit/Source/web/tests/data/pageserialization/encoding_normalization.html deleted file mode 100644 index bf2a57c1..0000000 --- a/third_party/WebKit/Source/web/tests/data/pageserialization/encoding_normalization.html +++ /dev/null
@@ -1,6 +0,0 @@ -<!DOCTYPE html> -<meta charset="euc-kr"> -<title>Ensure NFC normalization is not performed by page serializer</title> -<body> -樂樂 -</body>
diff --git a/third_party/WebKit/Source/web/web.gypi b/third_party/WebKit/Source/web/web.gypi index bbfa3a6a..81cac440 100644 --- a/third_party/WebKit/Source/web/web.gypi +++ b/third_party/WebKit/Source/web/web.gypi
@@ -145,9 +145,12 @@ 'WebFontImpl.h', 'WebFormControlElement.cpp', 'WebFormElement.cpp', + 'WebFrame.cpp', 'WebFrameImplBase.cpp', 'WebFrameImplBase.h', - 'WebFrame.cpp', + 'WebFrameSerializer.cpp', + 'WebFrameSerializerImpl.cpp', + 'WebFrameSerializerImpl.h', 'WebFrameWidgetImpl.cpp', 'WebFrameWidgetImpl.h', 'WebGeolocationController.cpp', @@ -184,9 +187,6 @@ 'WebPageImportanceSignals.cpp', 'WebPagePopupImpl.cpp', 'WebPagePopupImpl.h', - 'WebPageSerializer.cpp', - 'WebPageSerializerImpl.cpp', - 'WebPageSerializerImpl.h', 'WebPerformance.cpp', 'WebPluginContainerImpl.cpp', 'WebPluginContainerImpl.h', @@ -263,6 +263,7 @@ 'tests/FakeWebPlugin.cpp', 'tests/FakeWebPlugin.h', 'tests/FrameLoaderClientImplTest.cpp', + 'tests/FrameSerializerTest.cpp', 'tests/FrameTestHelpers.cpp', 'tests/FrameTestHelpers.h', 'tests/FrameThrottlingTest.cpp', @@ -270,8 +271,6 @@ 'tests/KeyboardTest.cpp', 'tests/ListenerLeakTest.cpp', 'tests/MHTMLTest.cpp', - 'tests/WebMeaningfulLayoutsTest.cpp', - 'tests/PageSerializerTest.cpp', 'tests/PrerenderingTest.cpp', 'tests/ProgrammaticScrollTest.cpp', 'tests/LayoutGeometryMapTest.cpp', @@ -284,11 +283,12 @@ 'tests/ViewportTest.cpp', 'tests/VisualViewportTest.cpp', 'tests/WebDocumentTest.cpp', + 'tests/WebFrameSerializerTest.cpp', 'tests/WebFrameTest.cpp', 'tests/WebHelperPluginTest.cpp', 'tests/WebImageTest.cpp', 'tests/WebInputEventConversionTest.cpp', - 'tests/WebPageSerializerTest.cpp', + 'tests/WebMeaningfulLayoutsTest.cpp', 'tests/WebPluginContainerTest.cpp', 'tests/WebScopedWindowFocusAllowedIndicatorTest.cpp', 'tests/WebSearchableFormDataTest.cpp',
diff --git a/third_party/WebKit/Source/wtf/BlinkMemory.md b/third_party/WebKit/Source/wtf/BlinkMemory.md new file mode 100644 index 0000000..c034a8f --- /dev/null +++ b/third_party/WebKit/Source/wtf/BlinkMemory.md
@@ -0,0 +1,185 @@ +# Memory management in Blink + +This document gives a high-level overview of the memory management in Blink. + +[TOC] + +## Memory allocators + +Blink objects are allocated by one of the following four memory allocators. + +### Oilpan + +Oilpan is a garbage collection system in Blink. +The lifetime of objects allocated by Oilpan is automatically managed. +The following objects are allocated by Oilpan: + +* Objects that inherit from GarbageCollected<T> or GarbageCollectedFinalized<T>. + +* HeapVector<T>, HeapHashSet<T>, HeapHashMap<T, U> etc + +The implementation is in platform/heap/. +See [BlinkGCDesign.md](platform/heap/BlinkGCDesign.md) to learn the design. + +### PartitionAlloc + +PartitionAlloc is Blink's default memory allocator. +PartitionAlloc is highly optimized for performance and security requirements +in Blink. All Blink objects that don't need a GC or discardable memory should be +allocated by PartitionAlloc (instead of malloc). +The following objects are allocated by PartitionAlloc: + +* Objects that have a USING_FAST_MALLOC macro. + +* Nodes (which will be moved to Oilpan in the near future) + +* LayoutObjects + +* Strings, Vectors, HashTables, ArrayBuffers and other primitive containers. + +The implementation is in wtf/Partition*. +See [PartitionAlloc.md](wtf/PartitionAlloc.md) to learn the design. + +### Discardable memory + +Discardable memory is a memory allocator that automatically discards +(not-locked) objects under memory pressure. Currently SharedBuffers +(which are mainly used as backing storage of Resource objects) are the only +user of the discardable memory. + +The implementation is in src/base/memory/discardable_memory.*. +See [this document](https://docs.google.com/document/d/1aNdOF_72_eG2KUM_z9kHdbT_fEupWhaDALaZs5D8IAg/edit) +to learn the design. + +### malloc + +When you simply call 'new' or 'malloc', the object is allocated by malloc. +As mentioned above, malloc is discouraged and should be replaced with +PartitionAlloc. PartitionAlloc is faster, securer and more instrumentable +than malloc. + +The actual implementation of malloc is platform-dependent. +As of 2015 Dec, Linux uses tcmalloc. Mac and Windows use their system allocator. +Android uses device-dependent allocators such as dlmalloc. + +## Basic allocation rules + +In summary, Blink objects (except several special objects) should be allocated +using Oilpan or PartitionAlloc. malloc is discouraged. + +The following is a basic rule to determine which of Oilpan or PartitionAlloc +you should use when allocating a new object: + +* Use Oilpan if you want a GC to manage the lifetime of the object. +You need to make the object inherit from GarbageCollected<T> or +GarbageCollectedFinalized<T>. See +[BlinkGCAPIReference.md](platform/heap/BlinkGCAPIReference.md) to learn +programming with Oilpan. + +```c++ +class X : public GarbageCollected<X> { + ...; +}; + +void func() { + X* x = new X; // This is allocated by Oilpan. +} +``` + +* Use PartitionAlloc if you don't need a GC to manage the lifetime of +the object (i.e., if RefPtr or OwnPtr is enough to manage the lifetime +of the object). You need to add a USING_FAST_MALLOC macro to the object. + +```c++ +class X { + USING_FAST_MALLOC(X); + ...; +}; + +void func() { + RefPtr<X> x = adoptRefPtr(new X); // This is allocated by PartitionAlloc. +} +``` + +It is not a good idea to unnecessarily increase the number of objects +managed by Oilpan. Although Oilpan implements an efficient GC, the more objects +you allocate on Oilpan, the more pressure you put on Oilpan, leading to +a longer pause time. + +Here is a guideline for when you ought to allocate an object using Oilpan, +and when you probably shouldn't: + +* Use Oilpan for all script exposed objects (i.e., derives from +ScriptWrappable). + +* Use Oilpan if managing its lifetime is usually simpler with Oilpan. +But see the next bullet. + +* If the allocation rate of the object is very high, that may put unnecessary +strain on the Oilpan's GC infrastructure as a whole. If so and the object can be +allocated not using Oilpan without creating cyclic references or complex +lifetime handling, then use PartitionAlloc. For example, we allocate Strings +and LayoutObjects on PartitionAlloc. + +For objects that don't need an operator new, you need to use either of the +following macros: + +* If the object is only stack allocated, use STACK_ALLOCATED(). + +```c++ +class X { + STACK_ALLOCATED(); + ...; +}; + +void func() { + X x; // This is allowed. + X* x2 = new X; // This is forbidden. +} +``` + +* If the object can be allocated only as a part of object, use DISALLOW_NEW(). + +```c++ +class X { + DISALLOW_NEW(); + ...; +}; + +class Y { + USING_FAST_MALLOC(Y); + X m_x; // This is allowed. +}; + +void func() { + X x; // This is allowed. + X* x = new X; // This is forbidden. +} +``` + +* If the object can be allocated only as a part of object or by a placement new +(e.g., the object is used as a value object in a container), +use DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(). + +```c++ +class X { + DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); + ...; +}; + +class Y { + USING_FAST_MALLOC(Y); + X m_x; // This is allowed. + Vector<X> m_vector; // This is allowed. +}; + +void func() { + X x; // This is allowed. + X* x = new X; // This is forbidden. +} +``` + +Note that these macros are inherited. See a comment in wtf/Allocator.h +for more details about the relationship between the macros and Oilpan. + +If you have any question, ask oilpan-reviews@chromium.org.
diff --git a/third_party/WebKit/Source/wtf/CheckedArithmetic.h b/third_party/WebKit/Source/wtf/CheckedArithmetic.h index 4ae1bbe..5b1c551 100644 --- a/third_party/WebKit/Source/wtf/CheckedArithmetic.h +++ b/third_party/WebKit/Source/wtf/CheckedArithmetic.h
@@ -159,7 +159,7 @@ } }; -template <typename Target, typename Source, bool CanElide = IsSameType<Target, Source>::value || (sizeof(Target) > sizeof(Source)) > struct BoundsCheckElider; +template <typename Target, typename Source, bool CanElide = std::is_same<Target, Source>::value || (sizeof(Target) > sizeof(Source)) > struct BoundsCheckElider; template <typename Target, typename Source> struct BoundsCheckElider<Target, Source, true> { static bool inBounds(Source) { return true; } };
diff --git a/third_party/WebKit/Source/wtf/Deque.h b/third_party/WebKit/Source/wtf/Deque.h index 062e610..eeae8e3 100644 --- a/third_party/WebKit/Source/wtf/Deque.h +++ b/third_party/WebKit/Source/wtf/Deque.h
@@ -226,7 +226,7 @@ : m_start(0) , m_end(0) { - static_assert(!IsPolymorphic<T>::value || !VectorTraits<T>::canInitializeWithMemset, "Cannot initialize with memset if there is a vtable"); + static_assert(!std::is_polymorphic<T>::value || !VectorTraits<T>::canInitializeWithMemset, "Cannot initialize with memset if there is a vtable"); #if ENABLE(OILPAN) static_assert(Allocator::isGarbageCollected || !AllowsOnlyPlacementNew<T>::value || !NeedsTracing<T>::value, "Cannot put DISALLOW_NEW_EXCEPT_PLACEMENT_NEW objects that have trace methods into an off-heap Deque"); #endif
diff --git a/third_party/WebKit/Source/wtf/HashTable.h b/third_party/WebKit/Source/wtf/HashTable.h index 450f957..960ce296 100644 --- a/third_party/WebKit/Source/wtf/HashTable.h +++ b/third_party/WebKit/Source/wtf/HashTable.h
@@ -995,10 +995,10 @@ ValueType* result; // Assert that we will not use memset on things with a vtable entry. The // compiler will also check this on some platforms. We would like to check - // this on the whole value (key-value pair), but IsPolymorphic will return + // this on the whole value (key-value pair), but std::is_polymorphic will return // false for a pair of two types, even if one of the components is // polymorphic. - static_assert(!Traits::emptyValueIsZero || !IsPolymorphic<KeyType>::value, "empty value cannot be zero for things with a vtable"); + static_assert(!Traits::emptyValueIsZero || !std::is_polymorphic<KeyType>::value, "empty value cannot be zero for things with a vtable"); #if ENABLE(OILPAN) static_assert(Allocator::isGarbageCollected
diff --git a/third_party/WebKit/Source/wtf/LeakAnnotations.h b/third_party/WebKit/Source/wtf/LeakAnnotations.h index 8dba581..c19e56d 100644 --- a/third_party/WebKit/Source/wtf/LeakAnnotations.h +++ b/third_party/WebKit/Source/wtf/LeakAnnotations.h
@@ -103,7 +103,7 @@ } NoType; // Check if class T has public method "T* registerAsStaticReference()". - template<typename V> static YesType checkHasRegisterAsStaticReferenceMethod(V* p, typename EnableIf<IsSubclass<V, typename std::remove_pointer<decltype(p->registerAsStaticReference())>::type>::value>::Type* = 0); + template<typename V> static YesType checkHasRegisterAsStaticReferenceMethod(V* p, typename std::enable_if<IsSubclass<V, typename std::remove_pointer<decltype(p->registerAsStaticReference())>::type>::value>::Type* = 0); template<typename V> static NoType checkHasRegisterAsStaticReferenceMethod(...); public:
diff --git a/third_party/WebKit/Source/wtf/TypeTraits.cpp b/third_party/WebKit/Source/wtf/TypeTraits.cpp index ace2413..9b8c103 100644 --- a/third_party/WebKit/Source/wtf/TypeTraits.cpp +++ b/third_party/WebKit/Source/wtf/TypeTraits.cpp
@@ -21,9 +21,7 @@ #include "wtf/TypeTraits.h" -#include "wtf/Assertions.h" #include "wtf/Noncopyable.h" -#include <type_traits> namespace WTF { @@ -87,37 +85,6 @@ static_assert(IsTriviallyDefaultConstructible<NonCopyableClass>::value, "NonCopyableClass should have a trivial default constructor"); #endif // 0 -enum IsConvertibleToIntegerCheck { }; -static_assert(IsConvertibleToInteger<IsConvertibleToIntegerCheck>::value, "enum should be convertible to integer"); -static_assert(IsConvertibleToInteger<bool>::value, "bool should be convertible to integer"); -static_assert(IsConvertibleToInteger<char>::value, "char should be convertible to integer"); -static_assert(IsConvertibleToInteger<signed char>::value, "signed char should be convertible to integer"); -static_assert(IsConvertibleToInteger<unsigned char>::value, "unsigned char should be convertible to integer"); -static_assert(IsConvertibleToInteger<short>::value, "short should be convertible to integer"); -static_assert(IsConvertibleToInteger<unsigned short>::value, "unsigned short should be convertible to integer"); -static_assert(IsConvertibleToInteger<int>::value, "int should be convertible to integer"); -static_assert(IsConvertibleToInteger<unsigned>::value, "unsigned int should be convertible to integer"); -static_assert(IsConvertibleToInteger<long>::value, "long should be convertible to integer"); -static_assert(IsConvertibleToInteger<unsigned long>::value, "unsigned long should be convertible to integer"); -static_assert(IsConvertibleToInteger<long long>::value, "long long should be convertible to integer"); -static_assert(IsConvertibleToInteger<unsigned long long>::value, "unsigned long long should be convertible to integer"); -#if !COMPILER(MSVC) || defined(_NATIVE_WCHAR_T_DEFINED) -static_assert(IsConvertibleToInteger<wchar_t>::value, "whcar_t should be convertible to integer"); -#endif -static_assert(IsConvertibleToInteger<double>::value, "double should be convertible to integer"); -static_assert(IsConvertibleToInteger<long double>::value, "long double should be convertible to integer"); -static_assert(IsConvertibleToInteger<float>::value, "float should be convertible to integer"); -static_assert(!IsConvertibleToInteger<char*>::value, "char* should not be convertible to integer"); -static_assert(!IsConvertibleToInteger<const char*>::value, "const char* should not be convertible to integer"); -static_assert(!IsConvertibleToInteger<volatile char*>::value, "volatile char* should not be convertible to integer"); -static_assert(!IsConvertibleToInteger<IsConvertibleToInteger<bool>>::value, "struct should not be convertible to integer"); - -static_assert((IsSameType<bool, bool>::value), "bool should be the same type as itself"); -static_assert((IsSameType<int*, int*>::value), "int* should be the same type as itself"); -static_assert((!IsSameType<int, int*>::value), "int should not be the same type as int*"); -static_assert((!IsSameType<bool, const bool>::value), "T should not be the same type as const T"); -static_assert((!IsSameType<bool, volatile bool>::value), "T should not be the same type as volatile T"); - template <typename T> class TestBaseClass { }; @@ -128,8 +95,6 @@ static_assert((IsSubclass<TestDerivedClass, TestBaseClass<int>>::value), "Derived class should be a subclass of its base"); static_assert((!IsSubclass<TestBaseClass<int>, TestDerivedClass>::value), "Base class should not be a sublass of a derived class"); static_assert((IsSubclassOfTemplate<TestDerivedClass, TestBaseClass>::value), "Derived class should be a subclass of template from its base"); -static_assert((IsSameType<RemoveTemplate<TestBaseClass<int>, TestBaseClass>::Type, int>::value), "RemoveTemplate should remove the template typename from the type"); -static_assert((IsSameType<RemoveTemplate<int, TestBaseClass>::Type, int>::value), "RemoveTemplate should not alter non-template types"); typedef int IntArray[]; typedef int IntArraySized[4];
diff --git a/third_party/WebKit/Source/wtf/TypeTraits.h b/third_party/WebKit/Source/wtf/TypeTraits.h index 5a3cc98b..1d938b5 100644 --- a/third_party/WebKit/Source/wtf/TypeTraits.h +++ b/third_party/WebKit/Source/wtf/TypeTraits.h
@@ -39,17 +39,6 @@ template<typename T> class RawPtr; -// The following are provided in this file: -// -// IsConvertibleToInteger<T>::value -// -// IsSameType<T, U>::value -// -// static_assert's in TypeTraits.cpp illustrate their usage and what they do. - -template <bool Predicate, class T = void> struct EnableIf; -template <class T> struct EnableIf<true, T> { typedef T Type; }; - template <typename T> struct IsWeak { static const bool value = false; }; @@ -75,40 +64,6 @@ static const bool value = __has_trivial_destructor(T); }; -template <typename T> class IsConvertibleToInteger { - // Avoid "possible loss of data" warning when using Microsoft's C++ compiler - // by not converting int's to doubles. - template <bool performCheck, typename U> class IsConvertibleToDouble; - template <typename U> class IsConvertibleToDouble<false, U> { - public: - static const bool value = false; - }; - - template <typename U> class IsConvertibleToDouble<true, U> { - typedef char YesType; - struct NoType { - char padding[8]; - }; - - static YesType floatCheck(long double); - static NoType floatCheck(...); - static T& t; - public: - static const bool value = sizeof(floatCheck(t)) == sizeof(YesType); - }; - -public: - static const bool value = std::is_integral<T>::value || IsConvertibleToDouble<!std::is_integral<T>::value, T>::value; -}; - -template <typename T, typename U> struct IsSameType { - static const bool value = false; -}; - -template <typename T> struct IsSameType<T, T> { - static const bool value = true; -}; - template <typename T, typename U> class IsSubclass { typedef char YesType; struct NoType { @@ -173,11 +128,6 @@ typedef T Type; }; -// Determines whether this type has a vtable. -template <typename T> struct IsPolymorphic { - static const bool value = __is_polymorphic(T); -}; - #if (COMPILER(MSVC) || !GCC_VERSION_AT_LEAST(4, 9, 0)) && !COMPILER(CLANG) // FIXME: MSVC bug workaround. Remove once MSVC STL is fixed. // FIXME: GCC before 4.9.0 seems to have the same issue. @@ -226,7 +176,7 @@ } NoType; // Note that this also checks if a superclass of V has a trace method. - template <typename V> static YesType checkHasTraceMethod(V* v, blink::Visitor* p = nullptr, typename EnableIf<IsSameType<decltype(v->trace(p)), void>::value>::Type* g = nullptr); + template <typename V> static YesType checkHasTraceMethod(V* v, blink::Visitor* p = nullptr, typename std::enable_if<std::is_same<decltype(v->trace(p)), void>::value>::type* g = nullptr); template <typename V> static NoType checkHasTraceMethod(...); public: // We add sizeof(T) to both sides here, because we want it to fail for
diff --git a/third_party/WebKit/Source/wtf/Vector.h b/third_party/WebKit/Source/wtf/Vector.h index 46ada79..c9a2e659 100644 --- a/third_party/WebKit/Source/wtf/Vector.h +++ b/third_party/WebKit/Source/wtf/Vector.h
@@ -631,7 +631,7 @@ Vector() { - static_assert(!IsPolymorphic<T>::value || !VectorTraits<T>::canInitializeWithMemset, "Cannot initialize with memset if there is a vtable"); + static_assert(!std::is_polymorphic<T>::value || !VectorTraits<T>::canInitializeWithMemset, "Cannot initialize with memset if there is a vtable"); #if ENABLE(OILPAN) static_assert(Allocator::isGarbageCollected || !AllowsOnlyPlacementNew<T>::value || !NeedsTracing<T>::value, "Cannot put DISALLOW_NEW_EXCEPT_PLACEMENT_NEW objects that have trace methods into an off-heap Vector"); #endif @@ -644,7 +644,7 @@ explicit Vector(size_t size) : Base(size) { - static_assert(!IsPolymorphic<T>::value || !VectorTraits<T>::canInitializeWithMemset, "Cannot initialize with memset if there is a vtable"); + static_assert(!std::is_polymorphic<T>::value || !VectorTraits<T>::canInitializeWithMemset, "Cannot initialize with memset if there is a vtable"); #if ENABLE(OILPAN) static_assert(Allocator::isGarbageCollected || !AllowsOnlyPlacementNew<T>::value || !NeedsTracing<T>::value, "Cannot put DISALLOW_NEW_EXCEPT_PLACEMENT_NEW objects that have trace methods into an off-heap Vector"); #endif
diff --git a/third_party/WebKit/Source/wtf/text/StringHash.h b/third_party/WebKit/Source/wtf/text/StringHash.h index 1a4d927..d10554f 100644 --- a/third_party/WebKit/Source/wtf/text/StringHash.h +++ b/third_party/WebKit/Source/wtf/text/StringHash.h
@@ -127,7 +127,7 @@ // correctly-folded code point in all cases (see comment below). template<typename T> static inline UChar foldCase(T ch) { - if (IsSameType<T, LChar>::value) + if (std::is_same<T, LChar>::value) return StringImpl::latin1CaseFoldTable[ch]; // It's possible for WTF::Unicode::foldCase() to return a 32-bit value // that's not representable as a UChar. However, since this is rare and
diff --git a/third_party/WebKit/public/blink_headers.gypi b/third_party/WebKit/public/blink_headers.gypi index 96c70b38..3e05ce6 100644 --- a/third_party/WebKit/public/blink_headers.gypi +++ b/third_party/WebKit/public/blink_headers.gypi
@@ -403,6 +403,8 @@ "web/WebFrameClient.h", "web/WebFrameLoadType.h", "web/WebFrameOwnerProperties.h", + "web/WebFrameSerializer.h", + "web/WebFrameSerializerClient.h", "web/WebFrameWidget.h", "web/WebGeolocationClient.h", "web/WebGeolocationController.h", @@ -440,8 +442,6 @@ "web/WebNode.h", "web/WebOptionElement.h", "web/WebPagePopup.h", - "web/WebPageSerializer.h", - "web/WebPageSerializerClient.h", "web/WebPerformance.h", "web/WebPlugin.h", "web/WebPluginAction.h",
diff --git a/third_party/WebKit/public/web/WebPageSerializer.h b/third_party/WebKit/public/web/WebFrameSerializer.h similarity index 80% rename from third_party/WebKit/public/web/WebPageSerializer.h rename to third_party/WebKit/public/web/WebFrameSerializer.h index 7a59b6a..051ed08 100644 --- a/third_party/WebKit/public/web/WebPageSerializer.h +++ b/third_party/WebKit/public/web/WebFrameSerializer.h
@@ -28,8 +28,8 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef WebPageSerializer_h -#define WebPageSerializer_h +#ifndef WebFrameSerializer_h +#define WebFrameSerializer_h #include "../platform/WebCString.h" #include "../platform/WebCommon.h" @@ -42,14 +42,13 @@ namespace blink { -class WebPageSerializerClient; +class WebFrameSerializerClient; class WebFrame; class WebLocalFrame; template <typename T> class WebVector; // Serialization of frame contents into html or mhtml. -// TODO(lukasza): Rename this class to WebFrameSerializer? -class WebPageSerializer { +class WebFrameSerializer { public: // Generates and returns an MHTML header. // @@ -63,21 +62,29 @@ BLINK_EXPORT static WebData generateMHTMLHeader( const WebString& boundary, WebLocalFrame*); - // Generates and returns MHTML parts for the given frame and all the + // Delegate for controling the behavior of generateMHTMLParts method. + class MHTMLPartsGenerationDelegate { + public: + // Tells whether to skip serialization of a subresource with a given URI. + // Used to deduplicate resources across multiple frames. + virtual bool shouldSkipResource(const WebURL&) = 0; + + // Returns a Content-ID to be used for the given frame. + // See rfc2557 - section 8.3 - "Use of the Content-ID header and CID URLs". + // Format note - the returned string should be of the form "<foo@bar.com>" + // (i.e. the strings should include the angle brackets). + virtual WebString getContentID(const WebFrame&) = 0; + }; + + // Generates and returns MHTML parts for the given frame and the // savable resources underneath. // // Same |boundary| needs to used for all generateMHTMLHeader and // generateMHTMLParts and generateMHTMLFooter calls that belong to the same // MHTML document (see also rfc1341, section 7.2.1, "boundary" description). - // - // |frameToContentID| is used for 1) emitting cid: scheme uri links for - // subframes and 2) emitting MIME Content-ID headers. - // See rfc2557 - section 8.3 - "Use of the Content-ID header and CID URLs". - // Format note - |frameToContentID| should contain strings of the form - // "<foo@bar.com>" (i.e. the strings should include the angle brackets). BLINK_EXPORT static WebData generateMHTMLParts( const WebString& boundary, WebLocalFrame*, bool useBinaryEncoding, - const WebVector<std::pair<WebFrame*, WebString>>& frameToContentID); + MHTMLPartsGenerationDelegate*); // Generates and returns an MHTML footer. // @@ -87,25 +94,25 @@ BLINK_EXPORT static WebData generateMHTMLFooter(const WebString& boundary); // IMPORTANT: - // The API below is an older implementation of a pageserialization that + // The API below is an older implementation of frame serialization that // will be removed soon. // This function will serialize the specified frame to HTML data. // We have a data buffer to temporary saving generated html data. We will - // sequentially call WebPageSeriazlierClient once the data buffer is full. + // sequentially call WebFrameSerializerClient once the data buffer is full. // // Return false means if no data has been serialized (i.e. because // the target frame didn't have a valid url). // // The parameter frame specifies which frame need to be serialized. // The parameter client specifies the pointer of interface - // WebPageSerializerClient providing a sink interface to receive the + // WebFrameSerializerClient providing a sink interface to receive the // individual chunks of data to be saved. // The parameter urlsToLocalPaths contains a mapping between original URLs // of saved resources and corresponding local file paths. BLINK_EXPORT static bool serialize( WebLocalFrame*, - WebPageSerializerClient*, + WebFrameSerializerClient*, const WebVector<std::pair<WebURL, WebString>>& urlsToLocalPaths); // FIXME: The following are here for unit testing purposes. Consider
diff --git a/third_party/WebKit/public/web/WebPageSerializerClient.h b/third_party/WebKit/public/web/WebFrameSerializerClient.h similarity index 87% rename from third_party/WebKit/public/web/WebPageSerializerClient.h rename to third_party/WebKit/public/web/WebFrameSerializerClient.h index 97e5a0b..9a316f9 100644 --- a/third_party/WebKit/public/web/WebPageSerializerClient.h +++ b/third_party/WebKit/public/web/WebFrameSerializerClient.h
@@ -28,8 +28,8 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef WebPageSerializerClient_h -#define WebPageSerializerClient_h +#ifndef WebFrameSerializerClient_h +#define WebFrameSerializerClient_h namespace blink { @@ -38,7 +38,7 @@ // This class is used for providing sink interface that can be used to receive // the individual chunks of data to be saved. -class WebPageSerializerClient { +class WebFrameSerializerClient { public: // This sink interface can receive the individual chunks of serialized data // to be saved, so we use values of following enum definition to indicate @@ -49,7 +49,7 @@ // If frame is completely serialized, we will call didSerializeDataForFrame // with URL of current frame, data, data length and flag // CurrentFrameIsFinished. - enum PageSerializationStatus { + enum FrameSerializationStatus { CurrentFrameIsNotFinished, CurrentFrameIsFinished, }; @@ -57,14 +57,16 @@ // Receive the individual chunks of serialized and encoded data to be saved. // The parameter data contains the available data for saving. // The parameter status indicates the status of data serialization. - virtual void didSerializeDataForFrame(const WebCString& data, - PageSerializationStatus status) = 0; - WebPageSerializerClient() { } + virtual void didSerializeDataForFrame( + const WebCString& data, + FrameSerializationStatus) = 0; + + WebFrameSerializerClient() { } protected: - virtual ~WebPageSerializerClient() { } + virtual ~WebFrameSerializerClient() { } }; -} // namespace blink +} // namespace blink #endif
diff --git a/third_party/android_crazy_linker/src/src/crazy_linker_leb128.h b/third_party/android_crazy_linker/src/src/crazy_linker_leb128.h index 787566e..08bea66 100644 --- a/third_party/android_crazy_linker/src/src/crazy_linker_leb128.h +++ b/third_party/android_crazy_linker/src/src/crazy_linker_leb128.h
@@ -15,8 +15,11 @@ class Sleb128Decoder { public: - Sleb128Decoder(const uint8_t* buffer, size_t count) - : current_(buffer), end_(buffer + count) { } + Sleb128Decoder(const uint8_t* buffer, size_t count) : current_(buffer) +#ifndef NDEBUG + , end_(buffer + count) +#endif + {} size_t pop_front() { size_t value = 0; @@ -42,7 +45,9 @@ private: const uint8_t* current_; +#ifndef NDEBUG const uint8_t* const end_; +#endif }; } // namespace crazy
diff --git a/third_party/android_protobuf/BUILD.gn b/third_party/android_protobuf/BUILD.gn index 266ca83a..79d5c4a 100644 --- a/third_party/android_protobuf/BUILD.gn +++ b/third_party/android_protobuf/BUILD.gn
@@ -3,10 +3,24 @@ # found in the LICENSE file. if (current_toolchain == host_toolchain) { + config("android_protoc_warnings") { + cflags = [ + "-Wno-null-conversion", + "-Wno-tautological-undefined-compare", + "-Wno-unused-function", + "-Wno-unused-local-typedef", + ] + } + # GYP: //third_party/android_protobuf/android_protobuf.gyp:android_protoc executable("android_protoc") { configs -= [ "//build/config/compiler:chromium_code" ] - configs += [ "//build/config/compiler:no_chromium_code" ] + configs += [ + "//build/config/compiler:no_chromium_code", + + # Must be after no_chromium_code so warning flags are ordered correctly. + ":android_protoc_warnings", + ] deps = [ "//build/config/sanitizers:deps", @@ -114,12 +128,6 @@ "src/src", ] - if (is_clang) { - cflags = [ - "-Wno-null-conversion", - "-Wno-tautological-undefined-compare", - ] - } defines = [ # This macro must be defined to suppress the use # of dynamic_cast<>, which requires RTTI.
diff --git a/third_party/android_protobuf/android_protobuf.gyp b/third_party/android_protobuf/android_protobuf.gyp index 9d7061bc..ead49f8e 100644 --- a/third_party/android_protobuf/android_protobuf.gyp +++ b/third_party/android_protobuf/android_protobuf.gyp
@@ -128,6 +128,8 @@ 'cflags': [ '-Wno-null-conversion', '-Wno-tautological-undefined-compare', + '-Wno-unused-function', + '-Wno-unused-local-typedef', ], 'defines': [ # This macro must be defined to suppress the use
diff --git a/third_party/class-dump/class-dump.gyp b/third_party/class-dump/class-dump.gyp index 876f3a5..be24b30 100644 --- a/third_party/class-dump/class-dump.gyp +++ b/third_party/class-dump/class-dump.gyp
@@ -168,6 +168,12 @@ 'src/Source/ULEB128.m', 'src/Source/cd_objc2.h', ], + 'variables': { + 'clang_warning_flags': [ + # e.g. CDRebaseTypeDescription in CDLCDyldInfo.m + '-Wno-unused-function', + ], + }, 'link_settings': { 'libraries': [ '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
diff --git a/third_party/harfbuzz-ng/README.chromium b/third_party/harfbuzz-ng/README.chromium index 1484e11..107d359 100644 --- a/third_party/harfbuzz-ng/README.chromium +++ b/third_party/harfbuzz-ng/README.chromium
@@ -18,3 +18,7 @@ and update our build recipes in BUILD.gn and harfbuzz.gyp accordingly, update the NEWS file from HarfBuzz' release notes, and bump the version numbers in README.chromium. + +Local changes: +* merge https://github.com/behdad/harfbuzz/pull/203 +* merge https://github.com/behdad/harfbuzz/pull/206
diff --git a/third_party/harfbuzz-ng/src/hb-coretext.cc b/third_party/harfbuzz-ng/src/hb-coretext.cc index 13ba5d9..316d281e 100644 --- a/third_party/harfbuzz-ng/src/hb-coretext.cc +++ b/third_party/harfbuzz-ng/src/hb-coretext.cc
@@ -693,7 +693,6 @@ scratch += old_scratch_used; scratch_size -= old_scratch_used; } -retry: { string_ref = CFStringCreateWithCharactersNoCopy (NULL, pchars, chars_len, @@ -1129,10 +1128,6 @@ * AAT shaper */ -HB_SHAPER_DATA_ENSURE_DECLARE(coretext_aat, face) -HB_SHAPER_DATA_ENSURE_DECLARE(coretext_aat, font) - - /* * shaper face data */
diff --git a/third_party/mach_override/BUILD.gn b/third_party/mach_override/BUILD.gn index 4672c46..ed1c331 100644 --- a/third_party/mach_override/BUILD.gn +++ b/third_party/mach_override/BUILD.gn
@@ -2,6 +2,19 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +config("libudis86_warnings") { + if (is_clang) { + cflags = [ + # syn.c contains a switch with an assert(false) in a default: + # block. In release builds, the function is missing a return. + "-Wno-return-type", + + # Fires once in decode.c. + "-Wno-sometimes-uninitialized", + ] + } +} + static_library("libudis86") { sources = [ "libudis86/decode.c", @@ -29,7 +42,12 @@ cflags = [ "-Wno-return-type" ] configs -= [ "//build/config/compiler:chromium_code" ] - configs += [ "//build/config/compiler:no_chromium_code" ] + configs += [ + "//build/config/compiler:no_chromium_code", + + # Must be after no_chromium_code for warning flags to be ordered correctly. + ":libudis86_warnings", + ] if (is_clang) { # For UD_ASSERT(!"message");
diff --git a/third_party/mach_override/mach_override.gyp b/third_party/mach_override/mach_override.gyp index b16df0b..7206a0a 100644 --- a/third_party/mach_override/mach_override.gyp +++ b/third_party/mach_override/mach_override.gyp
@@ -47,6 +47,13 @@ # For UD_ASSERT(!"message"); '-Wstring-conversion', ], + 'clang_warning_flags': [ + # syn.c contains a switch with an assert(false) in a default: + # block. In release builds, the function is missing a return. + '-Wno-return-type', + # Fires once in decode.c. + '-Wno-sometimes-uninitialized', + ], }, }, {
diff --git a/third_party/ocmock/BUILD.gn b/third_party/ocmock/BUILD.gn index de51636..7d9f702 100644 --- a/third_party/ocmock/BUILD.gn +++ b/third_party/ocmock/BUILD.gn
@@ -8,6 +8,11 @@ include_dirs = [ "//third_party/ocmock" ] } +config("ocmock_warnings") { + # NSInvocation+OCMAdditions.m has some `- (void) foo; {...` + cflags = [ "-Wno-semicolon-before-method-body" ] +} + source_set("ocmock") { testonly = true @@ -70,4 +75,5 @@ "//testing/gtest", ] public_configs = [ ":ocmock_config" ] + configs += [ ":ocmock_warnings" ] }
diff --git a/third_party/ocmock/ocmock.gyp b/third_party/ocmock/ocmock.gyp index 04a4a885..942992b 100644 --- a/third_party/ocmock/ocmock.gyp +++ b/third_party/ocmock/ocmock.gyp
@@ -72,6 +72,12 @@ 'OCMock/OCObserverMockObject.h', 'OCMock/OCObserverMockObject.m', ], + 'variables': { + 'clang_warning_flags': [ + # NSInvocation+OCMAdditions.m has some `- (void) foo; {...` + '-Wno-semicolon-before-method-body', + ], + }, }, ], }],
diff --git a/third_party/opus/BUILD.gn b/third_party/opus/BUILD.gn index 339ad967b..0eee392 100644 --- a/third_party/opus/BUILD.gn +++ b/third_party/opus/BUILD.gn
@@ -226,6 +226,19 @@ ] } +# GN orders flags on a target before flags from configs. The default config +# adds -Wall, and this flag have to be after -Wall -- so they need to +# come from a config and can't be on the target directly. +config("test_opus_decode_config") { + # test_opus_decode passes a null pointer to opus_decode() for an argument + # marked as requiring a non-null value by the nonnull function attribute, + # and expects opus_decode() to fail. Disable the -Wnonnull option to avoid + # a compilation error if -Werror is specified. + if (is_posix) { + cflags = [ "-Wno-nonnull" ] + } +} + test("test_opus_decode") { sources = [ "src/tests/test_opus_decode.c", @@ -235,16 +248,9 @@ configs += [ "//build/config/compiler:no_chromium_code", ":opus_test_config", + ":test_opus_decode_config", ] - # test_opus_decode passes a null pointer to opus_decode() for an argument - # marked as requiring a non-null value by the nonnull function attribute, - # and expects opus_decode() to fail. Disable the -Wnonnull option to avoid - # a compilation error if -Werror is specified. - if (is_posix) { - cflags = [ "-Wno-nonnull" ] - } - deps = [ ":opus", ]
diff --git a/tools/android/forwarder2/forwarder.cc b/tools/android/forwarder2/forwarder.cc index d717c9e8..9945674a 100644 --- a/tools/android/forwarder2/forwarder.cc +++ b/tools/android/forwarder2/forwarder.cc
@@ -98,7 +98,7 @@ case STATE_CLOSING: break; // T10 case STATE_CLOSED: - ; + break; } } @@ -196,7 +196,7 @@ break; case STATE_CLOSED: - ; + break; } }
diff --git a/tools/checklicenses/checklicenses.py b/tools/checklicenses/checklicenses.py index cda9b46..28ae32ad 100755 --- a/tools/checklicenses/checklicenses.py +++ b/tools/checklicenses/checklicenses.py
@@ -121,6 +121,14 @@ # http://llvm.org/bugs/show_bug.cgi?id=18291 'UNKNOWN', ], + # http://llvm.org/bugs/show_bug.cgi?id=25976 + 'buildtools/third_party/libc++/trunk/src/include/atomic_support.h': [ + 'UNKNOWN' + ], + 'buildtools/third_party/libc++/trunk/utils/gen_link_script': [ 'UNKNOWN' ], + 'buildtools/third_party/libc++/trunk/utils/not': [ 'UNKNOWN' ], + 'buildtools/third_party/libc++/trunk/utils/sym_check': [ 'UNKNOWN' ], + 'buildtools/third_party/libc++abi/trunk/test': [ 'UNKNOWN' ], 'chrome/common/extensions/docs/examples': [ # http://crbug.com/98092 'UNKNOWN',
diff --git a/tools/clang/scripts/apply_fixits.py b/tools/clang/scripts/apply_fixits.py index e846dad..3059fca3 100755 --- a/tools/clang/scripts/apply_fixits.py +++ b/tools/clang/scripts/apply_fixits.py
@@ -48,7 +48,7 @@ args = parser.parse_args() fixits = collections.defaultdict(list) - for line in fileinput.input(): + for line in fileinput.input(['-']): if not line.startswith('fix-it:'): continue m = _FIXIT_RE.match(line)
diff --git a/tools/cygprofile/cygprofile_unittest.cc b/tools/cygprofile/cygprofile_unittest.cc index ee7a2f59..52195004 100644 --- a/tools/cygprofile/cygprofile_unittest.cc +++ b/tools/cygprofile/cygprofile_unittest.cc
@@ -6,7 +6,7 @@ #include <stdint.h> #include <sys/time.h> - +#include <utility> #include <vector> #include "base/bind.h" @@ -78,7 +78,7 @@ // This should make the manager spawn its internal flush thread which will // wait for a notification before it starts doing some work. - manager.AddLog(thread_log.Pass()); + manager.AddLog(std::move(thread_log)); EXPECT_EQ(0U, entries.size()); // This will wake up the internal thread.
diff --git a/tools/ipc_fuzzer/fuzzer/fuzzer.cc b/tools/ipc_fuzzer/fuzzer/fuzzer.cc index a96da1c..b7abec8 100644 --- a/tools/ipc_fuzzer/fuzzer/fuzzer.cc +++ b/tools/ipc_fuzzer/fuzzer/fuzzer.cc
@@ -775,7 +775,7 @@ scoped_ptr<cc::RenderPass> render_pass = cc::RenderPass::Create(); if (!FuzzParam(render_pass.get(), fuzzer)) return false; - p->push_back(render_pass.Pass()); + p->push_back(std::move(render_pass)); } return true; } @@ -985,7 +985,7 @@ break; } } - p->set_gesture_params(gesture_params.Pass()); + p->set_gesture_params(std::move(gesture_params)); return true; } };
diff --git a/tools/mb/mb_config.pyl b/tools/mb/mb_config.pyl index a30ba8e..e7833c3 100644 --- a/tools/mb/mb_config.pyl +++ b/tools/mb/mb_config.pyl
@@ -78,6 +78,8 @@ 'swarming_asan_lsan_gyp_release_trybot': ['swarming', 'asan', 'lsan', 'release_trybot'], 'swarming_msan_gyp_release_trybot': ['swarming', 'chromeos', 'msan', 'gyp', 'release_trybot'], 'swarming_deterministic_gyp_release_bot': ['swarming', 'deterministic', 'gyp', 'release_bot'], + 'swarming_gpu_fyi_tests_gn_debug_bot': ['swarming', 'gpu_tests', 'internal_gles2_conform_tests', 'gn', 'debug_bot'], + 'swarming_gpu_fyi_tests_gn_release_bot': ['swarming', 'gpu_tests', 'internal_gles2_conform_tests', 'gn', 'release_bot'], 'swarming_gpu_tests_gn_release_trybot': ['swarming', 'gpu_tests', 'gn', 'release_trybot'], 'swarming_gpu_tests_gyp_debug_trybot': ['swarming', 'gpu_tests', 'gyp', 'debug_trybot'], 'swarming_gpu_tests_gyp_release_trybot': ['swarming', 'gpu_tests', 'gyp', 'release_trybot'], @@ -285,6 +287,11 @@ 'gyp': {'type': 'gyp'}, + 'internal_gles2_conform_tests': { + 'gn_args': 'internal_gles2_conform_tests=true', + 'gyp_defines': 'internal_gles2_conform_tests=1', + }, + 'libfuzzer': { 'gn_args': 'use_libfuzzer=true' }, 'lsan': { @@ -524,8 +531,8 @@ 'Linux ARM': 'swarming_gyp_release_bot_arm', }, 'chromium.gpu.fyi': { - 'GPU NextGen Linux Builder': 'swarming_gn_release_bot', - 'GPU NextGen Linux Builder (dbg)': 'swarming_gn_debug_bot', + 'GPU NextGen Linux Builder': 'swarming_gpu_fyi_tests_gn_release_bot', + 'GPU NextGen Linux Builder (dbg)': 'swarming_gpu_fyi_tests_gn_debug_bot', 'Linux NextGen Release (NVIDIA)': 'none', 'Linux NextGen Debug (NVIDIA)': 'none', },
diff --git a/tools/metrics/actions/actions.xml b/tools/metrics/actions/actions.xml index d0122c5..991ceb2 100644 --- a/tools/metrics/actions/actions.xml +++ b/tools/metrics/actions/actions.xml
@@ -7770,6 +7770,38 @@ </description> </action> +<action name="MediaRouter_Ui_Navigate_Help"> + <owner>apacible@chromium.org</owner> + <description> + User clicked the Media Router help menu item, located on the Media Router + contextual menu, to open the Cast help page. + </description> +</action> + +<action name="MediaRouter_Ui_Navigate_RouteDetailsToSinkList"> + <owner>apacible@chromium.org</owner> + <description> + User explicitly clicked the back button from the route details view to + navigate to the sink list view. + </description> +</action> + +<action name="MediaRouter_Ui_Navigate_SinkListToRouteDetails"> + <owner>apacible@chromium.org</owner> + <description> + User explicitly clicked a sink to navigate to the route details view from + the sink list view. + </description> +</action> + +<action name="MediaRouter_Ui_Navigate_SinkListToSource"> + <owner>apacible@chromium.org</owner> + <description> + User explicitly clicked to navigate from the sink view to the cast mode + view. + </description> +</action> + <action name="Menu_Take_Screenshot"> <owner>Please list the metric's owners. Add more owner tags as needed.</owner> <description>Please enter the description of this user action.</description>
diff --git a/tools/metrics/histograms/histograms.xml b/tools/metrics/histograms/histograms.xml index cff3299..71a5918e 100644 --- a/tools/metrics/histograms/histograms.xml +++ b/tools/metrics/histograms/histograms.xml
@@ -14781,6 +14781,9 @@ <histogram name="GoogleUpdate.InfoBar.ActionTaken" enum="GoogleUpdateInfoBarActions"> + <obsolete> + Deprecated 12/2015 in Issue 566085. + </obsolete> <owner>yfriedman@chromium.org</owner> <owner>dfalcantara@chromium.org</owner> <summary> @@ -14800,6 +14803,9 @@ </histogram> <histogram name="GoogleUpdate.InfoBar.TimeShown" units="milliseconds"> + <obsolete> + Deprecated 12/2015 in Issue 566085. + </obsolete> <owner>yfriedman@chromium.org</owner> <owner>dfalcantara@chromium.org</owner> <summary> @@ -16161,6 +16167,15 @@ </summary> </histogram> +<histogram name="InfoBar.Shown" enum="InfoBarIdentifier"> + <owner>dfalcantara@chromium.org</owner> + <owner>rkaplow@chromium.org</owner> + <summary> + Records how many times a particular infobar was shown to the user. On + Android, the infobar may be partially hidden due to stacking. + </summary> +</histogram> + <histogram name="InputMethod.ActiveCount"> <owner>shuchen@chromium.org</owner> <summary> @@ -19639,6 +19654,12 @@ </summary> </histogram> +<histogram name="MediaRouter.Ui.Action.StartLocalPosition" + enum="MediaRouterSinkPositionLabel"> + <owner>apacible@chromium.org</owner> + <summary>The index of the sink that was selected in the sink list.</summary> +</histogram> + <histogram name="MediaRouter.Ui.Action.StartLocalSessionSuccessful" enum="BooleanSuccess"> <owner>apacible@chromium.org</owner> @@ -19647,6 +19668,11 @@ </summary> </histogram> +<histogram name="MediaRouter.Ui.Action.StopRoute" enum="MediaRouteType"> + <owner>apacible@chromium.org</owner> + <summary>The number of times a user stops different types of routes.</summary> +</histogram> + <histogram name="MediaRouter.Ui.Device.Count"> <owner>apacible@chromium.org</owner> <summary> @@ -19671,6 +19697,14 @@ </summary> </histogram> +<histogram name="MediaRouter.Ui.Navigate.SourceSelection" + enum="MediaRouterSourceTypes"> + <owner>apacible@chromium.org</owner> + <summary> + The number of times the user selects a specific cast source type. + </summary> +</histogram> + <histogram name="Memory.BackingStore"> <owner>hajimehoshi@chromium.org</owner> <owner>kenjibaheux@google.com</owner> @@ -67151,6 +67185,62 @@ <int value="4" label="Open()"/> </enum> +<enum name="InfoBarIdentifier" type="int"> + <int value="-1" label="INVALID"/> + <int value="0" label="TEST_INFOBAR"/> + <int value="1" label="APP_BANNER_INFOBAR_DELEGATE_ANDROID"/> + <int value="2" label="APP_BANNER_INFOBAR_DELEGATE_DESKTOP"/> + <int value="3" label="ANDROID_DOWNLOAD_MANAGER_OVERWRITE_INFOBAR_DELEGATE"/> + <int value="4" label="CHROME_DOWNLOAD_MANAGER_OVERWRITE_INFOBAR_DELEGATE"/> + <int value="5" label="DOWNLOAD_REQUEST_INFOBAR_DELEGATE_ANDROID"/> + <int value="6" label="FULLSCREEN_INFOBAR_DELEGATE"/> + <int value="7" label="HUNG_PLUGIN_INFOBAR_DELEGATE"/> + <int value="8" label="HUNG_RENDERER_INFOBAR_DELEGATE"/> + <int value="9" label="MEDIA_STREAM_INFOBAR_DELEGATE_ANDROID"/> + <int value="10" label="MEDIA_THROTTLE_INFOBAR_DELEGATE"/> + <int value="11" label="REQUEST_QUOTA_INFOBAR_DELEGATE"/> + <int value="12" label="DEV_TOOLS_CONFIRM_INFOBAR_DELEGATE"/> + <int value="13" label="EXTENSION_DEV_TOOLS_INFOBAR_DELEGATE"/> + <int value="14" label="INCOGNITO_CONNECTABILITY_INFOBAR_DELEGATE"/> + <int value="15" label="THEME_INSTALLED_INFOBAR_DELEGATE"/> + <int value="16" label="GEOLOCATION_INFOBAR_DELEGATE_ANDROID"/> + <int value="17" label="THREE_D_API_INFOBAR_DELEGATE"/> + <int value="18" label="INSECURE_CONTENT_INFOBAR_DELEGATE"/> + <int value="19" label="MIDI_PERMISSION_INFOBAR_DELEGATE_ANDROID"/> + <int value="20" label="PROTECTED_MEDIA_IDENTIFIER_INFOBAR_DELEGATE_ANDROID"/> + <int value="21" label="NACL_INFOBAR_DELEGATE"/> + <int value="22" label="DATA_REDUCTION_PROXY_INFOBAR_DELEGATE_ANDROID"/> + <int value="23" label="NOTIFICATION_PERMISSION_INFOBAR_DELEGATE"/> + <int value="24" label="AUTO_SIGNIN_FIRST_RUN_INFOBAR_DELEGATE"/> + <int value="25" label="GENERATED_PASSWORD_SAVED_INFOBAR_DELEGATE_ANDROID"/> + <int value="26" label="SAVE_PASSWORD_INFOBAR_DELEGATE"/> + <int value="27" label="PEPPER_BROKER_INFOBAR_DELEGATE"/> + <int value="28" label="PERMISSION_UPDATE_INFOBAR_DELEGATE"/> + <int value="29" label="DURABLE_STORAGE_PERMISSION_INFOBAR_DELEGATE_ANDROID"/> + <int value="30" label="NPAPI_REMOVAL_INFOBAR_DELEGATE"/> + <int value="31" label="OUTDATED_PLUGIN_INFOBAR_DELEGATE"/> + <int value="32" label="PLUGIN_METRO_MODE_INFOBAR_DELEGATE"/> + <int value="33" label="RELOAD_PLUGIN_INFOBAR_DELEGATE"/> + <int value="34" label="PLUGIN_OBSERVER"/> + <int value="35" label="SSL_ADD_CERTIFICATE"/> + <int value="36" label="SSL_ADD_CERTIFICATE_INFOBAR_DELEGATE"/> + <int value="37" label="POPUP_BLOCKED_INFOBAR_DELEGATE"/> + <int value="38" label="CHROME_SELECT_FILE_POLICY"/> + <int value="39" label="KEYSTONE_PROMOTION_INFOBAR_DELEGATE"/> + <int value="40" label="COLLECTED_COOKIES_INFOBAR_DELEGATE"/> + <int value="41" label="INSTALLATION_ERROR_INFOBAR_DELEGATE"/> + <int value="42" label="ALTERNATE_NAV_INFOBAR_DELEGATE"/> + <int value="43" label="BAD_FLAGS_PROMPT"/> + <int value="44" label="DEFAULT_BROWSER_INFOBAR_DELEGATE"/> + <int value="45" label="GOOGLE_API_KEYS_INFOBAR_DELEGATE"/> + <int value="46" label="OBSOLETE_SYSTEM_INFOBAR_DELEGATE"/> + <int value="47" label="SESSION_CRASHED_INFOBAR_DELEGATE"/> + <int value="48" label="WEBSITE_SETTINGS_INFOBAR_DELEGATE"/> + <int value="49" label="AUTOFILL_CC_INFOBAR_DELEGATE"/> + <int value="50" label="TRANSLATE_INFOBAR_DELEGATE"/> + <int value="51" label="IOS_CHROME_SAVE_PASSWORD_INFOBAR_DELEGATE"/> +</enum> + <enum name="InfoBarResponse" type="int"> <int value="0" label="No Response selected"/> <int value="1" label="Save Password"/> @@ -70370,6 +70460,21 @@ <int value="3" label="Page"/> </enum> +<enum name="MediaRouterSinkPositionLabel" type="int"> + <int value="100" label="100+"/> +</enum> + +<enum name="MediaRouterSourceTypes" type="int"> + <int value="1" label="App"/> + <int value="2" label="Tab"/> + <int value="4" label="Desktop"/> +</enum> + +<enum name="MediaRouteType" type="int"> + <int value="0" label="Local"/> + <int value="1" label="Remote"/> +</enum> + <enum name="MediaSessionActionSource" type="int"> <int value="0" label="Media Notification"/> <int value="1" label="MediaSession (Android)"/>
diff --git a/tools/telemetry/telemetry/core/platform_unittest.py b/tools/telemetry/telemetry/core/platform_unittest.py index ad46250..26e5a8a 100644 --- a/tools/telemetry/telemetry/core/platform_unittest.py +++ b/tools/telemetry/telemetry/core/platform_unittest.py
@@ -19,6 +19,7 @@ # Run this test in serial to avoid multiple browsers pop up on the screen. @decorators.Isolated @decorators.Disabled('linux') # crbug.com/563656 + @decorators.Disabled('win') # crbug.com/570955 def testScreenshot(self): if not self._platform.CanTakeScreenshot(): self.skipTest('Platform does not support screenshots, skipping test.')
diff --git a/tools/telemetry/telemetry/core/tracing_controller_unittest.py b/tools/telemetry/telemetry/core/tracing_controller_unittest.py index f150468..d524061 100644 --- a/tools/telemetry/telemetry/core/tracing_controller_unittest.py +++ b/tools/telemetry/telemetry/core/tracing_controller_unittest.py
@@ -127,7 +127,8 @@ def testStartupTracingOnAndroid(self): self._StartupTracing(self._browser.platform) - @decorators.Enabled('linux', 'mac', 'win') + # Not enabled on win because of crbug.com/570955 + @decorators.Enabled('linux', 'mac') @decorators.Isolated def testStartupTracingOnDesktop(self): self._StartupTracing(platform_module.GetHostPlatform())
diff --git a/tools/telemetry/telemetry/internal/actions/action_runner_unittest.py b/tools/telemetry/telemetry/internal/actions/action_runner_unittest.py index 49ca8829..43f5194 100644 --- a/tools/telemetry/telemetry/internal/actions/action_runner_unittest.py +++ b/tools/telemetry/telemetry/internal/actions/action_runner_unittest.py
@@ -52,6 +52,7 @@ # Test disabled for android: crbug.com/437057 # Test disabled for linux: crbug.com/513874 @decorators.Disabled('android', 'chromeos', 'linux') + @decorators.Disabled('win') # crbug.com/570955 def testIssuingMultipleMeasurementInteractionRecords(self): self.VerifyIssuingInteractionRecords(repeatable=True)
diff --git a/tools/telemetry/telemetry/internal/backends/chrome_inspector/tracing_backend_unittest.py b/tools/telemetry/telemetry/internal/backends/chrome_inspector/tracing_backend_unittest.py index 9423aee2..b0352f8 100644 --- a/tools/telemetry/telemetry/internal/backends/chrome_inspector/tracing_backend_unittest.py +++ b/tools/telemetry/telemetry/internal/backends/chrome_inspector/tracing_backend_unittest.py
@@ -5,6 +5,7 @@ import time import unittest +from telemetry import decorators from telemetry.internal.backends.chrome_inspector import tracing_backend from telemetry.internal.backends.chrome_inspector.tracing_backend import _DevToolsStreamReader from telemetry.testing import fakes @@ -39,6 +40,7 @@ if not self._browser.supports_memory_dumping: self.skipTest('Browser does not support memory dumping, skipping test.') + @decorators.Disabled('win') # crbug.com/570955 def testDumpMemorySuccess(self): # Check that dumping memory before tracing starts raises an exception. self.assertRaises(Exception, self._browser.DumpMemory) @@ -73,6 +75,7 @@ actual_dump_ids = [d.dump_id for d in model.IterGlobalMemoryDumps()] self.assertEqual(actual_dump_ids, expected_dump_ids) + @decorators.Disabled('win') # crbug.com/570955 def testDumpMemoryFailure(self): # Check that dumping memory before tracing starts raises an exception. self.assertRaises(Exception, self._browser.DumpMemory)
diff --git a/tools/telemetry/telemetry/internal/browser/browser_unittest.py b/tools/telemetry/telemetry/internal/browser/browser_unittest.py index be848d3..f56b257 100644 --- a/tools/telemetry/telemetry/internal/browser/browser_unittest.py +++ b/tools/telemetry/telemetry/internal/browser/browser_unittest.py
@@ -115,6 +115,7 @@ self.assertTrue(self._browser.memory_stats['SystemTotalPhysicalMemory'] > 0) @decorators.Disabled('mac', 'linux', 'chromeos') # crbug.com/499208. + @decorators.Disabled('win') # crbug.com/570955. def testIsTracingRunning(self): tracing_controller = self._browser.platform.tracing_controller if not tracing_controller.IsChromeTracingSupported():
diff --git a/tools/telemetry/telemetry/internal/browser/extension_unittest.py b/tools/telemetry/telemetry/internal/browser/extension_unittest.py index 02442b1..44fea28 100644 --- a/tools/telemetry/telemetry/internal/browser/extension_unittest.py +++ b/tools/telemetry/telemetry/internal/browser/extension_unittest.py
@@ -67,6 +67,7 @@ ext[0].EvaluateJavaScript('chrome.runtime != null')) @decorators.Disabled('mac') + @decorators.Disabled('win') # crbug.com/570955 def testWebApp(self): """Tests GetByExtensionId for a web app with multiple pages.""" if not self.CreateBrowserWithExtension('simple_app'):
diff --git a/tools/telemetry/telemetry/internal/browser/tab_unittest.py b/tools/telemetry/telemetry/internal/browser/tab_unittest.py index 540189c6..a82917f 100644 --- a/tools/telemetry/telemetry/internal/browser/tab_unittest.py +++ b/tools/telemetry/telemetry/internal/browser/tab_unittest.py
@@ -99,6 +99,7 @@ # Test failing on android: http://crbug.com/437057 # and mac: http://crbug.com/468675 @decorators.Disabled('android', 'chromeos', 'mac') + @decorators.Disabled('win') # crbug.com/570955 def testHighlight(self): self.assertEquals(self._tab.url, 'about:blank') options = tracing_options.TracingOptions() @@ -120,6 +121,7 @@ @decorators.Enabled('has tabs') @decorators.Disabled('mac', 'linux') # crbug.com/499207. + @decorators.Disabled('win') # crbug.com/570955. def testGetRendererThreadFromTabId(self): self.assertEquals(self._tab.url, 'about:blank') # Create 3 tabs. The third tab is closed before we call
diff --git a/tools/telemetry/telemetry/web_perf/timeline_based_page_test_unittest.py b/tools/telemetry/telemetry/web_perf/timeline_based_page_test_unittest.py index 7ea5241d..6ee0e2dc 100644 --- a/tools/telemetry/telemetry/web_perf/timeline_based_page_test_unittest.py +++ b/tools/telemetry/telemetry/web_perf/timeline_based_page_test_unittest.py
@@ -48,6 +48,7 @@ # This test is flaky when run in parallel on the mac: crbug.com/426676 # Also, fails on android: crbug.com/437057, and chromeos: crbug.com/483212 @decorators.Disabled('android', 'mac', 'chromeos') + @decorators.Disabled('win') # crbug.com/570955 def testSmoothnessTimelineBasedMeasurementForSmoke(self): ps = self.CreateEmptyPageSet() ps.AddStory(TestTimelinebasedMeasurementPage(
diff --git a/tools/valgrind/drmemory/suppressions.txt b/tools/valgrind/drmemory/suppressions.txt index 8ec6ca35..7bbfc96 100644 --- a/tools/valgrind/drmemory/suppressions.txt +++ b/tools/valgrind/drmemory/suppressions.txt
@@ -236,7 +236,6 @@ name=AllocationRegister guard page access deliberate crash base.dll!base::trace_event::AllocationRegister::Insert *!base::trace_event::AllocationRegisterTest_OverflowDeathTest_Test::TestBody -*!testing::internal::HandleExceptionsInMethodIfSupported<> ############################ # Benign issues in Chromium @@ -397,13 +396,11 @@ *!operator new *!operator new[] *!`anonymous namespace'::SecurityTest_NewOverflow_Test::TestBody -*!testing::internal::HandleExceptionsInMethodIfSupported<> WARNING name=Security test (calloc overflow) *!`anonymous namespace'::CallocReturnsNull *!`anonymous namespace'::SecurityTest_CallocOverflow_Test::TestBody -*!testing::internal::HandleExceptionsInMethodIfSupported<> GDI USAGE ERROR name=http://crbug.com/234484 @@ -737,7 +734,6 @@ name=bug_536803 *!blink::SecurityOrigin::addSuborigin *!blink::SecurityOriginTest_Suborigins_Test::TestBody -*!testing::internal::HandleExceptionsInMethodIfSupported<> HANDLE LEAK name=bug_555058_a @@ -812,3 +808,10 @@ *!content::ChildProcessLauncher::Notify *!content::ChildProcessLauncher::DidLaunch *!base::internal::InvokeHelper<>::MakeItSo + +GDI USAGE ERROR +name=bug_573352 +system call NtGdiDeleteObjectApp +GDI32.dll!... +SHELL32.dll!... +ui_base.dll!drag_utils::SetDragImageOnDataObject
diff --git a/tools/valgrind/gtest_exclude/cc_unittests.gtest-drmemory_win32.txt b/tools/valgrind/gtest_exclude/cc_unittests.gtest-drmemory_win32.txt index 78eae6f3..7a5a949 100644 --- a/tools/valgrind/gtest_exclude/cc_unittests.gtest-drmemory_win32.txt +++ b/tools/valgrind/gtest_exclude/cc_unittests.gtest-drmemory_win32.txt
@@ -44,4 +44,4 @@ LayerTreeHostCopyRequestTestLostOutputSurface.RunMultiThread_DirectRenderer # https://crbug.com/571268 -LayerTreeHostTestGpuRasterDeviceSizeChanged.RunSingleThread_DirectRenderer +LayerTreeHostTestGpuRasterDeviceSizeChanged.*
diff --git a/tools/valgrind/gtest_exclude/remoting_unittests.gtest_mac.txt b/tools/valgrind/gtest_exclude/remoting_unittests.gtest_mac.txt index 195cfd58..0e5d2ba64 100644 --- a/tools/valgrind/gtest_exclude/remoting_unittests.gtest_mac.txt +++ b/tools/valgrind/gtest_exclude/remoting_unittests.gtest_mac.txt
@@ -1,4 +1,4 @@ # http://crbug.com/558341 WebrtcTransportTest.Connects WebrtcTransportTest.DataStream -Webrtc/ConnectionTest.Disconnect/0 +Webrtc/ConnectionTest.*
diff --git a/tools/valgrind/memcheck/suppressions.txt b/tools/valgrind/memcheck/suppressions.txt index a70eb1fa..440e270 100644 --- a/tools/valgrind/memcheck/suppressions.txt +++ b/tools/valgrind/memcheck/suppressions.txt
@@ -3366,3 +3366,14 @@ fun:_ZN4base6Thread22StartAndWaitForTestingEv fun:_ZN12browser_sync12_GLOBAL__N_124SyncBackendRegistrarTest5SetUpEv } +{ + bug_573604 + Memcheck:Overlap + fun:memcpy@@GLIBC_2.14 + fun:ProcessCommands + fun:BrotliDecompressStream + fun:_ZN3net12BrotliFilter16ReadFilteredDataEPcPi + fun:_ZN3net6Filter8ReadDataEPcPi + fun:_ZN3net14BrotliUnitTest19DecodeAllWithFilterEPNS_6FilterEPKciPcPi + fun:_ZN3net37BrotliUnitTest_DecodeMissingData_Test8TestBodyEv +}
diff --git a/tools/valgrind/valgrind_test.py b/tools/valgrind/valgrind_test.py index 9f132c84..0ca3c605 100644 --- a/tools/valgrind/valgrind_test.py +++ b/tools/valgrind/valgrind_test.py
@@ -719,6 +719,12 @@ if common.IsWindows() and "Release" in self._options.build_dir: proc += ["-no_check_delete_mismatch"] + # We are seeing false positive invalid heap args on 64-bit, so we are + # disabling the feature for now (xref + # https://github.com/DynamoRIO/drmemory/issues/1839). + if common.IsWindows() and "Release_x64" in self._options.build_dir: + proc += ["-no_check_heap_mismatch"] + # make callstacks easier to read proc += ["-callstack_srcfile_prefix", "build\\src,chromium\\src,crt_build\\self_x86"]
diff --git a/ui/base/ime/chromeos/component_extension_ime_manager.cc b/ui/base/ime/chromeos/component_extension_ime_manager.cc index d630494..60ae074 100644 --- a/ui/base/ime/chromeos/component_extension_ime_manager.cc +++ b/ui/base/ime/chromeos/component_extension_ime_manager.cc
@@ -5,6 +5,7 @@ #include "ui/base/ime/chromeos/component_extension_ime_manager.h" #include <stddef.h> +#include <utility> #include "base/command_line.h" #include "base/logging.h" @@ -118,7 +119,7 @@ void ComponentExtensionIMEManager::Initialize( scoped_ptr<ComponentExtensionIMEManagerDelegate> delegate) { - delegate_ = delegate.Pass(); + delegate_ = std::move(delegate); std::vector<ComponentExtensionIME> ext_list = delegate_->ListIME(); for (size_t i = 0; i < ext_list.size(); ++i) { ComponentExtensionIME& ext = ext_list[i];
diff --git a/ui/base/ime/chromeos/input_method_whitelist.cc b/ui/base/ime/chromeos/input_method_whitelist.cc index ff7bb86c..ab641a5 100644 --- a/ui/base/ime/chromeos/input_method_whitelist.cc +++ b/ui/base/ime/chromeos/input_method_whitelist.cc
@@ -59,7 +59,7 @@ GURL() // input view page url. )); } - return input_methods.Pass(); + return input_methods; } } // namespace input_method
diff --git a/ui/chromeos/touch_exploration_controller.cc b/ui/chromeos/touch_exploration_controller.cc index 9350ce62..5294629f 100644 --- a/ui/chromeos/touch_exploration_controller.cc +++ b/ui/chromeos/touch_exploration_controller.cc
@@ -4,6 +4,8 @@ #include "ui/chromeos/touch_exploration_controller.h" +#include <utility> + #include "base/logging.h" #include "base/strings/string_number_conversions.h" #include "base/time/default_tick_clock.h" @@ -378,7 +380,7 @@ new_event->set_location_f(last_touch_exploration_->location_f()); new_event->set_root_location_f(last_touch_exploration_->location_f()); new_event->set_flags(event.flags()); - *rewritten_event = new_event.Pass(); + *rewritten_event = std::move(new_event); SET_STATE(NO_FINGERS_DOWN); return ui::EVENT_REWRITE_REWRITTEN; } @@ -402,7 +404,7 @@ new_event->set_location_f(last_touch_exploration_->location_f()); new_event->set_root_location_f(last_touch_exploration_->location_f()); new_event->set_flags(event.flags()); - *rewritten_event = new_event.Pass(); + *rewritten_event = std::move(new_event); SET_STATE(NO_FINGERS_DOWN); return ui::EVENT_REWRITE_REWRITTEN; } @@ -424,7 +426,7 @@ new_event->set_location_f(last_touch_exploration_->location_f()); new_event->set_root_location_f(last_touch_exploration_->location_f()); new_event->set_flags(event.flags()); - *rewritten_event = new_event.Pass(); + *rewritten_event = std::move(new_event); SET_STATE(TOUCH_EXPLORE_SECOND_PRESS); return ui::EVENT_REWRITE_REWRITTEN; } else if (type == ui::ET_TOUCH_RELEASED || type == ui::ET_TOUCH_CANCELLED) { @@ -481,7 +483,7 @@ new_event->set_location_f(event.location_f()); new_event->set_root_location_f(event.location_f()); new_event->set_flags(event.flags()); - *rewritten_event = new_event.Pass(); + *rewritten_event = std::move(new_event); if (current_touch_ids_.size() == 0) SET_STATE(NO_FINGERS_DOWN); @@ -503,7 +505,7 @@ new_event->set_location_f(event.location_f() - passthrough_offset_); new_event->set_root_location_f(event.location_f() - passthrough_offset_); new_event->set_flags(event.flags()); - *rewritten_event = new_event.Pass(); + *rewritten_event = std::move(new_event); if (current_touch_ids_.size() == 0) { SET_STATE(NO_FINGERS_DOWN); } @@ -526,7 +528,7 @@ new_event->set_location_f(last_touch_exploration_->location_f()); new_event->set_root_location_f(last_touch_exploration_->location_f()); new_event->set_flags(event.flags()); - *rewritten_event = new_event.Pass(); + *rewritten_event = std::move(new_event); SET_STATE(WAIT_FOR_NO_FINGERS); return ui::EVENT_REWRITE_REWRITTEN; } else if (type == ui::ET_TOUCH_MOVED) { @@ -555,7 +557,7 @@ new_event->set_location_f(last_touch_exploration_->location_f()); new_event->set_root_location_f(last_touch_exploration_->location_f()); new_event->set_flags(event.flags()); - *rewritten_event = new_event.Pass(); + *rewritten_event = std::move(new_event); SET_STATE(WAIT_FOR_NO_FINGERS); return ui::EVENT_REWRITE_REWRITTEN; } @@ -581,7 +583,7 @@ new_event->set_location_f(last_touch_exploration_->location_f()); new_event->set_root_location_f(last_touch_exploration_->location_f()); new_event->set_flags(event.flags()); - *rewritten_event = new_event.Pass(); + *rewritten_event = std::move(new_event); SET_STATE(TOUCH_EXPLORATION); EnterTouchToMouseMode(); return ui::EVENT_REWRITE_REWRITTEN;
diff --git a/ui/display/chromeos/apply_content_protection_task_unittest.cc b/ui/display/chromeos/apply_content_protection_task_unittest.cc index 33695d7..61acee3 100644 --- a/ui/display/chromeos/apply_content_protection_task_unittest.cc +++ b/ui/display/chromeos/apply_content_protection_task_unittest.cc
@@ -2,12 +2,14 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "ui/display/chromeos/apply_content_protection_task.h" + #include <stdint.h> +#include <utility> #include "base/bind.h" #include "base/macros.h" #include "testing/gtest/include/gtest/gtest.h" -#include "ui/display/chromeos/apply_content_protection_task.h" #include "ui/display/chromeos/display_layout_manager.h" #include "ui/display/chromeos/test/action_logger_util.h" #include "ui/display/chromeos/test/test_display_layout_manager.h" @@ -25,7 +27,7 @@ display->set_display_id(id); display->set_type(type); - return display.Pass(); + return std::move(display); } } // namespace @@ -57,7 +59,7 @@ ScopedVector<DisplaySnapshot> displays; displays.push_back( CreateDisplaySnapshot(1, DISPLAY_CONNECTION_TYPE_INTERNAL)); - TestDisplayLayoutManager layout_manager(displays.Pass(), + TestDisplayLayoutManager layout_manager(std::move(displays), MULTIPLE_DISPLAY_STATE_SINGLE); DisplayConfigurator::ContentProtections request; @@ -75,7 +77,7 @@ TEST_F(ApplyContentProtectionTaskTest, ApplyWithHDMIDisplay) { ScopedVector<DisplaySnapshot> displays; displays.push_back(CreateDisplaySnapshot(1, DISPLAY_CONNECTION_TYPE_HDMI)); - TestDisplayLayoutManager layout_manager(displays.Pass(), + TestDisplayLayoutManager layout_manager(std::move(displays), MULTIPLE_DISPLAY_STATE_SINGLE); DisplayConfigurator::ContentProtections request; @@ -97,7 +99,7 @@ TEST_F(ApplyContentProtectionTaskTest, ApplyWithUnknownDisplay) { ScopedVector<DisplaySnapshot> displays; displays.push_back(CreateDisplaySnapshot(1, DISPLAY_CONNECTION_TYPE_UNKNOWN)); - TestDisplayLayoutManager layout_manager(displays.Pass(), + TestDisplayLayoutManager layout_manager(std::move(displays), MULTIPLE_DISPLAY_STATE_SINGLE); DisplayConfigurator::ContentProtections request; @@ -115,7 +117,7 @@ TEST_F(ApplyContentProtectionTaskTest, FailGettingHDCPState) { ScopedVector<DisplaySnapshot> displays; displays.push_back(CreateDisplaySnapshot(1, DISPLAY_CONNECTION_TYPE_HDMI)); - TestDisplayLayoutManager layout_manager(displays.Pass(), + TestDisplayLayoutManager layout_manager(std::move(displays), MULTIPLE_DISPLAY_STATE_SINGLE); display_delegate_.set_get_hdcp_state_expectation(false); @@ -134,7 +136,7 @@ TEST_F(ApplyContentProtectionTaskTest, FailSettingHDCPState) { ScopedVector<DisplaySnapshot> displays; displays.push_back(CreateDisplaySnapshot(1, DISPLAY_CONNECTION_TYPE_HDMI)); - TestDisplayLayoutManager layout_manager(displays.Pass(), + TestDisplayLayoutManager layout_manager(std::move(displays), MULTIPLE_DISPLAY_STATE_SINGLE); display_delegate_.set_set_hdcp_state_expectation(false); @@ -157,7 +159,7 @@ TEST_F(ApplyContentProtectionTaskTest, ApplyNoopProtection) { ScopedVector<DisplaySnapshot> displays; displays.push_back(CreateDisplaySnapshot(1, DISPLAY_CONNECTION_TYPE_HDMI)); - TestDisplayLayoutManager layout_manager(displays.Pass(), + TestDisplayLayoutManager layout_manager(std::move(displays), MULTIPLE_DISPLAY_STATE_SINGLE); display_delegate_.set_hdcp_state(HDCP_STATE_UNDESIRED);
diff --git a/ui/display/chromeos/display_configurator.cc b/ui/display/chromeos/display_configurator.cc index 9dca32e6..49a5f658 100644 --- a/ui/display/chromeos/display_configurator.cc +++ b/ui/display/chromeos/display_configurator.cc
@@ -5,6 +5,7 @@ #include "ui/display/chromeos/display_configurator.h" #include <stddef.h> +#include <utility> #include "base/bind.h" #include "base/command_line.h" @@ -510,7 +511,7 @@ scoped_ptr<NativeDisplayDelegate> display_delegate) { DCHECK(!native_display_delegate_); - native_display_delegate_ = display_delegate.Pass(); + native_display_delegate_ = std::move(display_delegate); configure_display_ = true; }
diff --git a/ui/display/chromeos/query_content_protection_task_unittest.cc b/ui/display/chromeos/query_content_protection_task_unittest.cc index 890e04e..35f5f6b 100644 --- a/ui/display/chromeos/query_content_protection_task_unittest.cc +++ b/ui/display/chromeos/query_content_protection_task_unittest.cc
@@ -2,13 +2,15 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "ui/display/chromeos/query_content_protection_task.h" + #include <stdint.h> +#include <utility> #include "base/bind.h" #include "base/macros.h" #include "testing/gtest/include/gtest/gtest.h" #include "ui/display/chromeos/display_layout_manager.h" -#include "ui/display/chromeos/query_content_protection_task.h" #include "ui/display/chromeos/test/action_logger_util.h" #include "ui/display/chromeos/test/test_display_layout_manager.h" #include "ui/display/chromeos/test/test_display_snapshot.h" @@ -25,7 +27,7 @@ display->set_display_id(id); display->set_type(type); - return display.Pass(); + return std::move(display); } } // namespace @@ -56,7 +58,7 @@ ScopedVector<DisplaySnapshot> displays; displays.push_back( CreateDisplaySnapshot(1, DISPLAY_CONNECTION_TYPE_INTERNAL)); - TestDisplayLayoutManager layout_manager(displays.Pass(), + TestDisplayLayoutManager layout_manager(std::move(displays), MULTIPLE_DISPLAY_STATE_SINGLE); QueryContentProtectionTask task( @@ -75,7 +77,7 @@ TEST_F(QueryContentProtectionTaskTest, QueryWithUnknownDisplay) { ScopedVector<DisplaySnapshot> displays; displays.push_back(CreateDisplaySnapshot(1, DISPLAY_CONNECTION_TYPE_UNKNOWN)); - TestDisplayLayoutManager layout_manager(displays.Pass(), + TestDisplayLayoutManager layout_manager(std::move(displays), MULTIPLE_DISPLAY_STATE_SINGLE); QueryContentProtectionTask task( @@ -94,7 +96,7 @@ TEST_F(QueryContentProtectionTaskTest, FailQueryWithHDMIDisplay) { ScopedVector<DisplaySnapshot> displays; displays.push_back(CreateDisplaySnapshot(1, DISPLAY_CONNECTION_TYPE_HDMI)); - TestDisplayLayoutManager layout_manager(displays.Pass(), + TestDisplayLayoutManager layout_manager(std::move(displays), MULTIPLE_DISPLAY_STATE_SINGLE); display_delegate_.set_get_hdcp_state_expectation(false); @@ -112,7 +114,7 @@ TEST_F(QueryContentProtectionTaskTest, QueryWithHDMIDisplayAndUnfulfilled) { ScopedVector<DisplaySnapshot> displays; displays.push_back(CreateDisplaySnapshot(1, DISPLAY_CONNECTION_TYPE_HDMI)); - TestDisplayLayoutManager layout_manager(displays.Pass(), + TestDisplayLayoutManager layout_manager(std::move(displays), MULTIPLE_DISPLAY_STATE_SINGLE); QueryContentProtectionTask task( @@ -131,7 +133,7 @@ TEST_F(QueryContentProtectionTaskTest, QueryWithHDMIDisplayAndFulfilled) { ScopedVector<DisplaySnapshot> displays; displays.push_back(CreateDisplaySnapshot(1, DISPLAY_CONNECTION_TYPE_HDMI)); - TestDisplayLayoutManager layout_manager(displays.Pass(), + TestDisplayLayoutManager layout_manager(std::move(displays), MULTIPLE_DISPLAY_STATE_SINGLE); display_delegate_.set_hdcp_state(HDCP_STATE_ENABLED); @@ -152,7 +154,7 @@ ScopedVector<DisplaySnapshot> displays; displays.push_back(CreateDisplaySnapshot(1, DISPLAY_CONNECTION_TYPE_HDMI)); displays.push_back(CreateDisplaySnapshot(2, DISPLAY_CONNECTION_TYPE_DVI)); - TestDisplayLayoutManager layout_manager(displays.Pass(), + TestDisplayLayoutManager layout_manager(std::move(displays), MULTIPLE_DISPLAY_STATE_DUAL_EXTENDED); QueryContentProtectionTask task( @@ -172,7 +174,7 @@ ScopedVector<DisplaySnapshot> displays; displays.push_back(CreateDisplaySnapshot(1, DISPLAY_CONNECTION_TYPE_HDMI)); displays.push_back(CreateDisplaySnapshot(2, DISPLAY_CONNECTION_TYPE_DVI)); - TestDisplayLayoutManager layout_manager(displays.Pass(), + TestDisplayLayoutManager layout_manager(std::move(displays), MULTIPLE_DISPLAY_STATE_DUAL_MIRROR); QueryContentProtectionTask task(
diff --git a/ui/display/chromeos/test/test_display_layout_manager.cc b/ui/display/chromeos/test/test_display_layout_manager.cc index 2494c9b..6c7e5127 100644 --- a/ui/display/chromeos/test/test_display_layout_manager.cc +++ b/ui/display/chromeos/test/test_display_layout_manager.cc
@@ -4,6 +4,8 @@ #include "ui/display/chromeos/test/test_display_layout_manager.h" +#include <utility> + #include "ui/display/types/display_snapshot.h" namespace ui { @@ -12,7 +14,7 @@ TestDisplayLayoutManager::TestDisplayLayoutManager( ScopedVector<DisplaySnapshot> displays, MultipleDisplayState display_state) - : displays_(displays.Pass()), display_state_(display_state) { + : displays_(std::move(displays)), display_state_(display_state) { } TestDisplayLayoutManager::~TestDisplayLayoutManager() {
diff --git a/ui/display/chromeos/update_display_configuration_task_unittest.cc b/ui/display/chromeos/update_display_configuration_task_unittest.cc index 59534fa..c1348422 100644 --- a/ui/display/chromeos/update_display_configuration_task_unittest.cc +++ b/ui/display/chromeos/update_display_configuration_task_unittest.cc
@@ -2,7 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "ui/display/chromeos/update_display_configuration_task.h" + #include <stddef.h> +#include <utility> #include "base/bind.h" #include "base/macros.h" @@ -13,7 +16,6 @@ #include "ui/display/chromeos/test/action_logger_util.h" #include "ui/display/chromeos/test/test_display_snapshot.h" #include "ui/display/chromeos/test/test_native_display_delegate.h" -#include "ui/display/chromeos/update_display_configuration_task.h" namespace ui { namespace test { @@ -55,7 +57,7 @@ void set_software_mirroring_controller( scoped_ptr<DisplayConfigurator::SoftwareMirroringController> software_mirroring_controller) { - software_mirroring_controller_ = software_mirroring_controller.Pass(); + software_mirroring_controller_ = std::move(software_mirroring_controller); } // DisplayConfigurator::DisplayLayoutManager:
diff --git a/ui/display/chromeos/x11/native_display_event_dispatcher_x11.cc b/ui/display/chromeos/x11/native_display_event_dispatcher_x11.cc index 9e206ac..543e27e 100644 --- a/ui/display/chromeos/x11/native_display_event_dispatcher_x11.cc +++ b/ui/display/chromeos/x11/native_display_event_dispatcher_x11.cc
@@ -2,14 +2,16 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "base/time/default_tick_clock.h" #include "ui/display/chromeos/x11/native_display_event_dispatcher_x11.h" + +#include <X11/extensions/Xrandr.h> +#include <utility> + +#include "base/time/default_tick_clock.h" #include "ui/display/chromeos/x11/display_mode_x11.h" #include "ui/display/chromeos/x11/display_snapshot_x11.h" #include "ui/events/platform/platform_event_source.h" -#include <X11/extensions/Xrandr.h> - namespace ui { // static @@ -108,7 +110,7 @@ void NativeDisplayEventDispatcherX11::SetTickClockForTest( scoped_ptr<base::TickClock> tick_clock) { - tick_clock_ = tick_clock.Pass(); + tick_clock_ = std::move(tick_clock); startup_time_ = tick_clock_->NowTicks(); }
diff --git a/ui/message_center/message_center_tray_unittest.cc b/ui/message_center/message_center_tray_unittest.cc index ec5130d..5d443108 100644 --- a/ui/message_center/message_center_tray_unittest.cc +++ b/ui/message_center/message_center_tray_unittest.cc
@@ -300,7 +300,7 @@ ASCIIToUTF16("Notification message body."), gfx::Image(), base::string16() /* empty display source */, GURL(), notifier_id2, message_center::RichNotificationData(), NULL /* delegate */)); - message_center_->AddNotification(notification.Pass()); + message_center_->AddNotification(std::move(notification)); AddNotification(id3);
diff --git a/ui/native_theme/common_theme.cc b/ui/native_theme/common_theme.cc index f3bf871..9283eba 100644 --- a/ui/native_theme/common_theme.cc +++ b/ui/native_theme/common_theme.cc
@@ -29,13 +29,18 @@ if (ui::MaterialDesignController::IsModeMaterial()) { // Dialogs: static const SkColor kDialogBackgroundColorMd = SK_ColorWHITE; + // Button: + static const SkColor kTextButtonEnabledColorMd = + SkColorSetRGB(0x64, 0x64, 0x64); + static const SkColor kTextButtonDisabledColorMd = + SkColorSetA(kTextButtonEnabledColorMd, 0x80); // MenuItem: - const SkColor kMenuHighlightBackgroundColorMd = + static const SkColor kMenuHighlightBackgroundColorMd = SkColorSetARGB(0x14, 0x00, 0x00, 0x00); - const SkColor kSelectedMenuItemForegroundColorMd = SK_ColorBLACK; + static const SkColor kSelectedMenuItemForegroundColorMd = SK_ColorBLACK; // Link: - const SkColor kLinkDisabledColorMd = SK_ColorBLACK; - const SkColor kLinkEnabledColorMd = gfx::kGoogleBlue700; + static const SkColor kLinkDisabledColorMd = SK_ColorBLACK; + static const SkColor kLinkEnabledColorMd = gfx::kGoogleBlue700; // Results tables: static const SkColor kResultsTableTextMd = SK_ColorBLACK; static const SkColor kResultsTableDimmedTextMd = @@ -49,6 +54,12 @@ case NativeTheme::kColorId_BubbleBackground: return kDialogBackgroundColorMd; + // Button + case NativeTheme::kColorId_MdTextButtonEnabledColor: + return kTextButtonEnabledColorMd; + case NativeTheme::kColorId_MdTextButtonDisabledColor: + return kTextButtonDisabledColorMd; + // MenuItem case NativeTheme::kColorId_FocusedMenuItemBackgroundColor: return kMenuHighlightBackgroundColorMd; @@ -394,6 +405,8 @@ case NativeTheme::kColorId_ThrobberLightColor: return kThrobberLightColor; + case NativeTheme::kColorId_MdTextButtonEnabledColor: + case NativeTheme::kColorId_MdTextButtonDisabledColor: case NativeTheme::kColorId_NumColors: break; }
diff --git a/ui/native_theme/native_theme.h b/ui/native_theme/native_theme.h index 931a76f..b09dd15 100644 --- a/ui/native_theme/native_theme.h +++ b/ui/native_theme/native_theme.h
@@ -262,6 +262,8 @@ kColorId_BlueButtonHoverColor, kColorId_BlueButtonShadowColor, kColorId_CallToActionColor, + kColorId_MdTextButtonEnabledColor, + kColorId_MdTextButtonDisabledColor, // MenuItem kColorId_EnabledMenuItemForegroundColor, kColorId_DisabledMenuItemForegroundColor,
diff --git a/ui/views/controls/button/md_text_button.cc b/ui/views/controls/button/md_text_button.cc new file mode 100644 index 0000000..4cae74f7 --- /dev/null +++ b/ui/views/controls/button/md_text_button.cc
@@ -0,0 +1,65 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "ui/views/controls/button/md_text_button.h" + +#include "base/i18n/case_conversion.h" +#include "ui/gfx/render_text.h" +#include "ui/native_theme/native_theme.h" + +namespace views { + +namespace { + +// Inset between clickable region border and button contents (text). +const int kHorizontalPadding = 12; +const int kVerticalPadding = 6; + +// Minimum size to reserve for the button contents. +const int kMinWidth = 48; + +const gfx::FontList& GetFontList() { + static base::LazyInstance<gfx::FontList>::Leaky font_list = + LAZY_INSTANCE_INITIALIZER; + return font_list.Get(); +} + +} // namespace + +MdTextButton::MdTextButton(ButtonListener* listener, const base::string16& text) + : CustomButton(listener), + render_text_(gfx::RenderText::CreateInstance()) { + render_text_->SetFontList(GetFontList()); + render_text_->SetCursorEnabled(false); + render_text_->SetText(base::i18n::ToUpper(text)); + + SetFocusable(true); +} + +MdTextButton::~MdTextButton() {} + +void MdTextButton::OnPaint(gfx::Canvas* canvas) { + UpdateColor(); + gfx::Rect rect = GetLocalBounds(); + rect.Inset(kHorizontalPadding, kVerticalPadding); + render_text_->SetDisplayRect(rect); + render_text_->Draw(canvas); +} + +gfx::Size MdTextButton::GetPreferredSize() const { + gfx::Size size = render_text_->GetStringSize(); + size.SetToMax(gfx::Size(kMinWidth, 0)); + size.Enlarge(kHorizontalPadding * 2, kVerticalPadding * 2); + return size; +} + +void MdTextButton::UpdateColor() { + // TODO(estade): handle call to action theming and other things that can + // affect the text color. + render_text_->SetColor(GetNativeTheme()->GetSystemColor( + enabled() ? ui::NativeTheme::kColorId_MdTextButtonEnabledColor + : ui::NativeTheme::kColorId_MdTextButtonDisabledColor)); +} + +} // namespace views
diff --git a/ui/views/controls/button/md_text_button.h b/ui/views/controls/button/md_text_button.h new file mode 100644 index 0000000..ba982a3 --- /dev/null +++ b/ui/views/controls/button/md_text_button.h
@@ -0,0 +1,37 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef UI_VIEWS_CONTROLS_BUTTON_MD_TEXT_BUTTON_H_ +#define UI_VIEWS_CONTROLS_BUTTON_MD_TEXT_BUTTON_H_ + +#include "base/memory/scoped_ptr.h" +#include "ui/views/controls/button/custom_button.h" + +namespace gfx { +class RenderText; +} + +namespace views { + +// A button class that implements the Material Design text button spec. +class VIEWS_EXPORT MdTextButton : public CustomButton { + public: + MdTextButton(ButtonListener* listener, const base::string16& text); + ~MdTextButton() override; + + // View: + void OnPaint(gfx::Canvas* canvas) override; + gfx::Size GetPreferredSize() const override; + + private: + void UpdateColor(); + + scoped_ptr<gfx::RenderText> render_text_; + + DISALLOW_COPY_AND_ASSIGN(MdTextButton); +}; + +} // namespace views + +#endif // UI_VIEWS_CONTROLS_BUTTON_MD_TEXT_BUTTON_H_
diff --git a/ui/views/views.gyp b/ui/views/views.gyp index e68255b..44dff7e 100644 --- a/ui/views/views.gyp +++ b/ui/views/views.gyp
@@ -79,6 +79,8 @@ 'controls/button/label_button.h', 'controls/button/label_button_border.cc', 'controls/button/label_button_border.h', + 'controls/button/md_text_button.cc', + 'controls/button/md_text_button.h', 'controls/button/menu_button.cc', 'controls/button/menu_button.h', 'controls/button/menu_button_listener.h',
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc index 2400b18b..d3aafd9d 100644 --- a/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc +++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
@@ -2017,7 +2017,7 @@ return gfx::ToEnclosingRect(rect_in_pixels); } -const XID DesktopWindowTreeHostX11::GetModalDialog() { +XID DesktopWindowTreeHostX11::GetModalDialog() { return modal_dialog_xid_; }
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h b/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h index 2d4d2949..1036152 100644 --- a/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h +++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h
@@ -96,7 +96,7 @@ // Returns XID of dialog currently displayed. When it returns 0, // there is no dialog on the host window. - const XID GetModalDialog(); + XID GetModalDialog(); protected: // Overridden from DesktopWindowTreeHost: