diff --git a/DEPS b/DEPS index 4df335d..af73972 100644 --- a/DEPS +++ b/DEPS
@@ -96,11 +96,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': '2f62de01d3a703696dc1a51d2473a88be68a7574', + 'skia_revision': 'd8a189fca3cdfa064de75a280d5af34cc5026bbe', # 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': 'a2f0a25ca3622a8a4303307a6f7ec4b16afe6fe2', + 'v8_revision': 'cfcbf96b54f42d12c987f1c547f991c212ee510b', # 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. @@ -108,7 +108,7 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling ANGLE # and whatever else without interference from each other. - 'angle_revision': '03bb2231a821b2815a1ca472db47164af1350c6e', + 'angle_revision': '7a8fe15682f39a0e26c860c2973ec02f53120a24', # 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. @@ -120,7 +120,7 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling PDFium # and whatever else without interference from each other. - 'pdfium_revision': '525147a1f6d6cd736a407d1e189ac25d2f4726e8', + 'pdfium_revision': 'ad178855775da18d7abfadce4b64825f3e32adbd', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling openmax_dl # and whatever else without interference from each other. @@ -156,7 +156,7 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling catapult # and whatever else without interference from each other. - 'catapult_revision': '19282cf9d32d6e656bc35dfea9e97c5b42d9e238', + 'catapult_revision': '4f42243e85c8ff1829a76127c039f67623f50e5b', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling libFuzzer # and whatever else without interference from each other. @@ -269,7 +269,7 @@ }, 'src/ios/third_party/material_components_ios/src': { - 'url': Var('chromium_git') + '/external/github.com/material-components/material-components-ios.git' + '@' + '942163f2be5c76ca5c67f6449941a777f839c15a', + 'url': Var('chromium_git') + '/external/github.com/material-components/material-components-ios.git' + '@' + '3bf34975f12b71ddefc170b0e207e79b604034e1', 'condition': 'checkout_ios', }, @@ -346,7 +346,7 @@ }, 'src/third_party/android_ndk': { - 'url': Var('chromium_git') + '/android_ndk.git' + '@' + '635bc380968a76f6948fee65f80a0b28db53ae81', + 'url': Var('chromium_git') + '/android_ndk.git' + '@' + '5cd86312e794bdf542a3685c6f10cbb96072990b', 'condition': 'checkout_android_native_support', }, @@ -498,7 +498,7 @@ # Build tools for Chrome OS. Note: This depends on third_party/pyelftools. 'src/third_party/chromite': { - 'url': Var('chromium_git') + '/chromiumos/chromite.git' + '@' + '8642bcc3248fa1a791d9c287420487c817782ae6', + 'url': Var('chromium_git') + '/chromiumos/chromite.git' + '@' + '8672346ad7cea4606a723db794bb09ce50d578d2', 'condition': 'checkout_linux', }, @@ -523,7 +523,7 @@ }, 'src/third_party/depot_tools': - Var('chromium_git') + '/chromium/tools/depot_tools.git' + '@' + '6c692edf010ce9e43737406c53f399b13631ac4f', + Var('chromium_git') + '/chromium/tools/depot_tools.git' + '@' + '848c86e3e858154175944198db821e80ec7ebfc5', 'src/third_party/devtools-node-modules': Var('chromium_git') + '/external/github.com/ChromeDevTools/devtools-node-modules' + '@' + Var('devtools_node_modules_revision'), @@ -1002,7 +1002,7 @@ Var('chromium_git') + '/v8/v8.git' + '@' + Var('v8_revision'), 'src-internal': { - 'url': 'https://chrome-internal.googlesource.com/chrome/src-internal.git@25309ca66e03592e029a2281e97036e109ebb113', + 'url': 'https://chrome-internal.googlesource.com/chrome/src-internal.git@7c592e6301d6d66c213e90bfa584a4eb60994739', 'condition': 'checkout_src_internal', },
diff --git a/ash/BUILD.gn b/ash/BUILD.gn index a32f69a..e49b4cc9 100644 --- a/ash/BUILD.gn +++ b/ash/BUILD.gn
@@ -71,10 +71,6 @@ "accessibility/focus_ring_controller.h", "accessibility/focus_ring_layer.cc", "accessibility/focus_ring_layer.h", - "accessibility/key_accessibility_enabler.cc", - "accessibility/key_accessibility_enabler.h", - "accessibility/spoken_feedback_enabler.cc", - "accessibility/spoken_feedback_enabler.h", "accessibility/touch_accessibility_enabler.cc", "accessibility/touch_accessibility_enabler.h", "accessibility/touch_exploration_controller.cc", @@ -118,6 +114,8 @@ "cast_config_controller.h", "dbus/ash_dbus_services.cc", "dbus/ash_dbus_services.h", + "dbus/display_service_provider.cc", + "dbus/display_service_provider.h", "dbus/url_handler_service_provider.cc", "dbus/url_handler_service_provider.h", "debug.cc", @@ -1528,7 +1526,6 @@ "accessibility/accessibility_focus_ring_controller_unittest.cc", "accessibility/accessibility_highlight_controller_unittest.cc", "accessibility/accessibility_panel_layout_manager_unittest.cc", - "accessibility/key_accessibility_enabler_unittest.cc", "accessibility/touch_accessibility_enabler_unittest.cc", "accessibility/touch_exploration_controller_unittest.cc", "accessibility/touch_exploration_manager_unittest.cc",
diff --git a/ash/accessibility/accessibility_controller.cc b/ash/accessibility/accessibility_controller.cc index f03e7f58..af9e054 100644 --- a/ash/accessibility/accessibility_controller.cc +++ b/ash/accessibility/accessibility_controller.cc
@@ -25,7 +25,6 @@ #include "ash/strings/grit/ash_strings.h" #include "ash/system/power/backlights_forced_off_setter.h" #include "ash/system/power/scoped_backlights_forced_off.h" -#include "ash/wm/tablet_mode/tablet_mode_controller.h" #include "base/strings/string16.h" #include "chromeos/audio/cras_audio_handler.h" #include "components/pref_registry/pref_registry_syncable.h" @@ -174,21 +173,19 @@ base::string16 text; base::string16 title; - if (type == A11yNotificationType::kBrailleDisplayConnected) { + if (type == A11yNotificationType::kSpokenFeedbackBrailleEnabled) { + text = + l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_SPOKEN_FEEDBACK_ENABLED); + title = l10n_util::GetStringUTF16( + IDS_ASH_STATUS_TRAY_SPOKEN_FEEDBACK_BRAILLE_ENABLED_TITLE); + } else if (type == A11yNotificationType::kBrailleDisplayConnected) { text = l10n_util::GetStringUTF16( IDS_ASH_STATUS_TRAY_BRAILLE_DISPLAY_CONNECTED); } else { - bool is_tablet = Shell::Get() - ->tablet_mode_controller() - ->IsTabletModeWindowManagerEnabled(); - title = l10n_util::GetStringUTF16( - type == A11yNotificationType::kSpokenFeedbackBrailleEnabled - ? IDS_ASH_STATUS_TRAY_SPOKEN_FEEDBACK_BRAILLE_ENABLED_TITLE - : IDS_ASH_STATUS_TRAY_SPOKEN_FEEDBACK_ENABLED_TITLE); - text = l10n_util::GetStringUTF16( - is_tablet ? IDS_ASH_STATUS_TRAY_SPOKEN_FEEDBACK_ENABLED_TABLET - : IDS_ASH_STATUS_TRAY_SPOKEN_FEEDBACK_ENABLED); + IDS_ASH_STATUS_TRAY_SPOKEN_FEEDBACK_ENABLED_TITLE); + text = + l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_SPOKEN_FEEDBACK_ENABLED); } message_center::RichNotificationData options; options.should_make_spoken_feedback_for_popup_updates = false;
diff --git a/ash/accessibility/key_accessibility_enabler.cc b/ash/accessibility/key_accessibility_enabler.cc deleted file mode 100644 index bd9d3371..0000000 --- a/ash/accessibility/key_accessibility_enabler.cc +++ /dev/null
@@ -1,44 +0,0 @@ -// Copyright 2018 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "ash/accessibility/key_accessibility_enabler.h" - -#include "ash/accessibility/spoken_feedback_enabler.h" -#include "ash/shell.h" -#include "ash/wm/tablet_mode/tablet_mode_controller.h" -#include "ui/events/event.h" - -namespace ash { - -KeyAccessibilityEnabler::KeyAccessibilityEnabler() { - Shell::Get()->AddPreTargetHandler(this, ui::EventTarget::Priority::kSystem); -} - -KeyAccessibilityEnabler::~KeyAccessibilityEnabler() { - Shell::Get()->RemovePreTargetHandler(this); -} - -void KeyAccessibilityEnabler::OnKeyEvent(ui::KeyEvent* event) { - if ((event->type() != ui::ET_KEY_PRESSED && - event->type() != ui::ET_KEY_RELEASED) || - !Shell::Get() - ->tablet_mode_controller() - ->IsTabletModeWindowManagerEnabled()) - return; - - if (event->key_code() == ui::VKEY_VOLUME_DOWN) - vol_down_pressed_ = event->type() == ui::ET_KEY_PRESSED; - else if (event->key_code() == ui::VKEY_VOLUME_UP) - vol_up_pressed_ = event->type() == ui::ET_KEY_PRESSED; - - if (vol_down_pressed_ && vol_up_pressed_) { - event->StopPropagation(); - if (!spoken_feedback_enabler_.get()) - spoken_feedback_enabler_ = std::make_unique<SpokenFeedbackEnabler>(); - } else if (spoken_feedback_enabler_.get()) { - spoken_feedback_enabler_.reset(); - } -} - -} // namespace ash
diff --git a/ash/accessibility/key_accessibility_enabler.h b/ash/accessibility/key_accessibility_enabler.h deleted file mode 100644 index 5d4fb09..0000000 --- a/ash/accessibility/key_accessibility_enabler.h +++ /dev/null
@@ -1,41 +0,0 @@ -// Copyright 2018 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef ASH_ACCESSIBILITY_KEY_ACCESSIBILITY_ENABLER_H_ -#define ASH_ACCESSIBILITY_KEY_ACCESSIBILITY_ENABLER_H_ - -#include "ash/ash_export.h" -#include "base/macros.h" -#include "ui/events/event_handler.h" - -namespace ui { -class KeyEvent; -} // namespace ui - -namespace ash { -class SpokenFeedbackEnabler; - -// Toggles spoken feedback when the volume up and volume down keys are held for -// at least 5 seconds. -class ASH_EXPORT KeyAccessibilityEnabler : public ui::EventHandler { - public: - KeyAccessibilityEnabler(); - ~KeyAccessibilityEnabler() override; - - private: - friend class KeyAccessibilityEnablerTest; - - // Overridden from ui::EventHandler - void OnKeyEvent(ui::KeyEvent* event) override; - - std::unique_ptr<SpokenFeedbackEnabler> spoken_feedback_enabler_; - bool vol_down_pressed_ = false; - bool vol_up_pressed_ = false; - - DISALLOW_COPY_AND_ASSIGN(KeyAccessibilityEnabler); -}; - -} // namespace ash - -#endif // ASH_ACCESSIBILITY_KEY_ACCESSIBILITY_ENABLER_H_
diff --git a/ash/accessibility/key_accessibility_enabler_unittest.cc b/ash/accessibility/key_accessibility_enabler_unittest.cc deleted file mode 100644 index 4fe677f1..0000000 --- a/ash/accessibility/key_accessibility_enabler_unittest.cc +++ /dev/null
@@ -1,81 +0,0 @@ -// Copyright 2018 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "ash/accessibility/key_accessibility_enabler.h" - -#include "ash/accessibility/accessibility_controller.h" -#include "ash/accessibility/accessibility_observer.h" -#include "ash/shell.h" -#include "ash/test/ash_test_base.h" -#include "ash/wm/tablet_mode/tablet_mode_controller.h" -#include "base/run_loop.h" -#include "base/test/simple_test_tick_clock.h" -#include "ui/events/base_event_utils.h" -#include "ui/events/event.h" - -namespace ash { - -class KeyAccessibilityEnablerTest : public AshTestBase, - public AccessibilityObserver { - public: - KeyAccessibilityEnablerTest() {} - - void SetUp() override { - ui::SetEventTickClockForTesting(&clock_); - AshTestBase::SetUp(); - Shell::Get()->accessibility_controller()->AddObserver(this); - key_accessibility_enabler_ = Shell::Get()->key_accessibility_enabler(); - } - - void SendKeyEvent(ui::KeyEvent* event) { - // Tablet mode gets exited elsewhere, so we must force it enabled before - // each key event. - ash::Shell::Get()->tablet_mode_controller()->EnableTabletModeWindowManager( - true); - key_accessibility_enabler_->OnKeyEvent(event); - } - - void WaitForAccessibilityStatusChanged() { - run_loop_ = std::make_unique<base::RunLoop>(); - clock_.Advance(base::TimeDelta::FromMilliseconds(5000)); - run_loop_->Run(); - } - - private: - // AccessibilityObserver: - void OnAccessibilityStatusChanged() override { run_loop_->Quit(); } - - std::unique_ptr<base::RunLoop> run_loop_; - KeyAccessibilityEnabler* key_accessibility_enabler_; - base::SimpleTestTickClock clock_; -}; - -TEST_F(KeyAccessibilityEnablerTest, TwoVolumeKeyDown) { - ui::KeyEvent vol_down_press(ui::ET_KEY_PRESSED, ui::VKEY_VOLUME_DOWN, - ui::EF_NONE); - ui::KeyEvent vol_up_press(ui::ET_KEY_PRESSED, ui::VKEY_VOLUME_UP, - ui::EF_NONE); - ui::KeyEvent vol_down_release(ui::ET_KEY_RELEASED, ui::VKEY_VOLUME_DOWN, - ui::EF_NONE); - ui::KeyEvent vol_up_release(ui::ET_KEY_RELEASED, ui::VKEY_VOLUME_UP, - ui::EF_NONE); - - AccessibilityController* controller = - Shell::Get()->accessibility_controller(); - - ASSERT_FALSE(controller->IsSpokenFeedbackEnabled()); - SendKeyEvent(&vol_down_press); - SendKeyEvent(&vol_up_press); - WaitForAccessibilityStatusChanged(); - ASSERT_TRUE(controller->IsSpokenFeedbackEnabled()); - SendKeyEvent(&vol_down_release); - SendKeyEvent(&vol_up_release); - - SendKeyEvent(&vol_down_press); - SendKeyEvent(&vol_up_press); - WaitForAccessibilityStatusChanged(); - ASSERT_FALSE(controller->IsSpokenFeedbackEnabled()); -} - -} // namespace ash
diff --git a/ash/accessibility/spoken_feedback_enabler.cc b/ash/accessibility/spoken_feedback_enabler.cc deleted file mode 100644 index c0e08d0..0000000 --- a/ash/accessibility/spoken_feedback_enabler.cc +++ /dev/null
@@ -1,50 +0,0 @@ -// Copyright 2018 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "ash/accessibility/spoken_feedback_enabler.h" - -#include "ash/accessibility/accessibility_controller.h" -#include "ash/shell.h" -#include "ui/events/base_event_utils.h" - -namespace ash { - -namespace { - -// Delay between timer callbacks. Each one plays a tick sound. -constexpr base::TimeDelta kTimerDelay = base::TimeDelta::FromMilliseconds(500); - -// The number of ticks of the timer before the first sound is generated. -constexpr int kTimerTicksOfFirstSoundFeedback = 6; - -// The number of ticks of the timer before toggling spoken feedback. -constexpr int kTimerTicksToToggleSpokenFeedback = 10; - -} // namespace - -SpokenFeedbackEnabler::SpokenFeedbackEnabler() { - start_time_ = ui::EventTimeForNow(); - timer_.Start(FROM_HERE, kTimerDelay, this, &SpokenFeedbackEnabler::OnTimer); -} - -SpokenFeedbackEnabler::~SpokenFeedbackEnabler() {} - -void SpokenFeedbackEnabler::OnTimer() { - base::TimeTicks now = ui::EventTimeForNow(); - double tick_count_f = (now - start_time_) / kTimerDelay; - int tick_count = roundf(tick_count_f); - - AccessibilityController* delegate = Shell::Get()->accessibility_controller(); - CHECK(delegate); - if (tick_count >= kTimerTicksOfFirstSoundFeedback && - tick_count < kTimerTicksToToggleSpokenFeedback) { - delegate->PlaySpokenFeedbackToggleCountdown(tick_count); - } else if (tick_count == kTimerTicksToToggleSpokenFeedback) { - delegate->SetSpokenFeedbackEnabled(!delegate->IsSpokenFeedbackEnabled(), - A11Y_NOTIFICATION_SHOW); - timer_.Stop(); - } -} - -} // namespace ash
diff --git a/ash/accessibility/spoken_feedback_enabler.h b/ash/accessibility/spoken_feedback_enabler.h deleted file mode 100644 index 3d78f363..0000000 --- a/ash/accessibility/spoken_feedback_enabler.h +++ /dev/null
@@ -1,37 +0,0 @@ -// Copyright 2018 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef ASH_ACCESSIBILITY_SPOKEN_FEEDBACK_ENABLER_H_ -#define ASH_ACCESSIBILITY_SPOKEN_FEEDBACK_ENABLER_H_ - -#include "ash/ash_export.h" -#include "base/time/time.h" -#include "base/timer/timer.h" - -namespace ash { - -// A class that enables ChromeVox based on a timer, providing progress -// sound feedback. -class ASH_EXPORT SpokenFeedbackEnabler { - public: - SpokenFeedbackEnabler(); - ~SpokenFeedbackEnabler(); - - private: - // Handles ticks of the timer. - void OnTimer(); - - // The start time. - base::TimeTicks start_time_; - - // A timer that triggers repeatedly until either cancel or the desired time - // elapsed. - base::RepeatingTimer timer_; - - DISALLOW_COPY_AND_ASSIGN(SpokenFeedbackEnabler); -}; - -} // namespace ash - -#endif // ASH_ACCESSIBILITY_SPOKEN_FEEDBACK_ENABLER_H_
diff --git a/ash/ash_strings.grd b/ash/ash_strings.grd index 7fb4960..7879334 100644 --- a/ash/ash_strings.grd +++ b/ash/ash_strings.grd
@@ -208,9 +208,6 @@ <message name="IDS_ASH_STATUS_TRAY_SPOKEN_FEEDBACK_ENABLED" desc="The message shown on a notification when spoken feedback is enabled"> Press Ctrl + Alt + Z to disable spoken feedback. </message> - <message name="IDS_ASH_STATUS_TRAY_SPOKEN_FEEDBACK_ENABLED_TABLET" desc="The message shown on a notification when spoken feedback is enabled on a tablet"> - Press and hold both volume keys for five seconds to disable spoken feedback. - </message> <message name="IDS_ASH_STATUS_TRAY_SPOKEN_FEEDBACK_ENABLED_TITLE" desc="The title message shown on a notification when spoken feedback is enabled"> ChromeVox enabled </message>
diff --git a/ash/assistant/ash_assistant_controller.cc b/ash/assistant/ash_assistant_controller.cc index c8d8a56..53304117 100644 --- a/ash/assistant/ash_assistant_controller.cc +++ b/ash/assistant/ash_assistant_controller.cc
@@ -145,6 +145,24 @@ assistant_interaction_model_.SetInteractionState(InteractionState::kInactive); } +void AshAssistantController::OnDialogPlateContentsChanged( + const std::string& text) { + // TODO(dmblack): Close the mic if necessary. + assistant_bubble_timer_.Stop(); +} + +void AshAssistantController::OnDialogPlateContentsCommitted( + const std::string& text) { + Query query; + query.high_confidence_text = text; + + assistant_interaction_model_.ClearInteraction(); + assistant_interaction_model_.SetQuery(query); + + DCHECK(assistant_); + assistant_->SendTextQuery(text); +} + void AshAssistantController::OnHtmlResponse(const std::string& response) { assistant_interaction_model_.AddUiElement( std::make_unique<AssistantCardElement>(response));
diff --git a/ash/assistant/ash_assistant_controller.h b/ash/assistant/ash_assistant_controller.h index eca5d35..4d1d4e4 100644 --- a/ash/assistant/ash_assistant_controller.h +++ b/ash/assistant/ash_assistant_controller.h
@@ -69,6 +69,12 @@ void StopInteraction(); void ToggleInteraction(); + // Invoked on dialog plate contents changed event. + void OnDialogPlateContentsChanged(const std::string& text); + + // Invoked on dialog plate contents committed event. + void OnDialogPlateContentsCommitted(const std::string& text); + // Invoked on suggestion chip pressed event. void OnSuggestionChipPressed(const std::string& text);
diff --git a/ash/assistant/model/assistant_interaction_model.h b/ash/assistant/model/assistant_interaction_model.h index 57606cb..a8c3c88d 100644 --- a/ash/assistant/model/assistant_interaction_model.h +++ b/ash/assistant/model/assistant_interaction_model.h
@@ -33,6 +33,9 @@ kInactive, }; +// TODO(dmblack): It is awkward to use this struct for both text and voice +// queries. Break this out into a class and subclass TextQuery and VoiceQuery +// respectively. // Models the state of the query. For a text query, only the high confidence // text portion will be populated. At start of a voice query, both the high and // low confidence text portions will be empty. As speech recognition continues,
diff --git a/ash/assistant/ui/assistant_bubble.cc b/ash/assistant/ui/assistant_bubble.cc index a95133c..5ca6f36 100644 --- a/ash/assistant/ui/assistant_bubble.cc +++ b/ash/assistant/ui/assistant_bubble.cc
@@ -35,7 +35,7 @@ set_accept_events(true); SetAnchor(); set_arrow(views::BubbleBorder::Arrow::BOTTOM_LEFT); - set_can_activate(false); + set_close_on_deactivate(false); set_color(kBackgroundColor); set_margins(gfx::Insets()); set_shadow(views::BubbleBorder::Shadow::NO_ASSETS);
diff --git a/ash/assistant/ui/assistant_bubble_view.cc b/ash/assistant/ui/assistant_bubble_view.cc index 06c01ae..1f94f94f 100644 --- a/ash/assistant/ui/assistant_bubble_view.cc +++ b/ash/assistant/ui/assistant_bubble_view.cc
@@ -407,8 +407,7 @@ AddChildView(suggestions_container_); // Dialog plate. - DialogPlate* dialog_plate = new DialogPlate(); - AddChildView(dialog_plate); + AddChildView(new DialogPlate(assistant_controller_)); } void AssistantBubbleView::SetProcessingUiElement(bool is_processing) {
diff --git a/ash/assistant/ui/dialog_plate.cc b/ash/assistant/ui/dialog_plate.cc index a4dace7..ff5015e 100644 --- a/ash/assistant/ui/dialog_plate.cc +++ b/ash/assistant/ui/dialog_plate.cc
@@ -6,6 +6,7 @@ #include <memory> +#include "ash/assistant/ash_assistant_controller.h" #include "base/strings/utf_string_conversions.h" #include "ui/gfx/canvas.h" #include "ui/views/background.h" @@ -19,7 +20,7 @@ // Appearance. constexpr SkColor kBackgroundColor = SkColorSetA(SK_ColorBLACK, 0x1F); -constexpr int kIconSize = 24; +constexpr int kIconSizeDip = 24; constexpr int kPaddingHorizontalDip = 12; constexpr int kPaddingVerticalDip = 8; constexpr int kSpacingDip = 8; @@ -64,7 +65,8 @@ // DialogPlate ----------------------------------------------------------------- -DialogPlate::DialogPlate() { +DialogPlate::DialogPlate(AshAssistantController* assistant_controller) + : assistant_controller_(assistant_controller) { InitLayout(); } @@ -86,6 +88,7 @@ views::Textfield* textfield = new views::Textfield(); textfield->SetBackgroundColor(SK_ColorTRANSPARENT); textfield->SetBorder(views::NullBorder()); + textfield->set_controller(this); textfield->SetFontList(font_list); textfield->set_placeholder_font_list(font_list); textfield->set_placeholder_text(base::UTF8ToUTF16(kHint)); @@ -98,10 +101,38 @@ // TODO(dmblack): Replace w/ stateful icon. // Icon placeholder. views::View* icon_placeholder = new views::View(); - icon_placeholder->SetBackground( - std::make_unique<RoundRectBackground>(kPlaceholderColor, kIconSize / 2)); - icon_placeholder->SetPreferredSize(gfx::Size(kIconSize, kIconSize)); + icon_placeholder->SetBackground(std::make_unique<RoundRectBackground>( + kPlaceholderColor, kIconSizeDip / 2)); + icon_placeholder->SetPreferredSize(gfx::Size(kIconSizeDip, kIconSizeDip)); AddChildView(icon_placeholder); } +void DialogPlate::ContentsChanged(views::Textfield* textfield, + const base::string16& new_contents) { + assistant_controller_->OnDialogPlateContentsChanged( + base::UTF16ToUTF8(new_contents)); +} + +bool DialogPlate::HandleKeyEvent(views::Textfield* textfield, + const ui::KeyEvent& key_event) { + if (key_event.key_code() != ui::KeyboardCode::VKEY_RETURN) + return false; + + if (key_event.type() != ui::EventType::ET_KEY_PRESSED) + return false; + + const base::StringPiece16& text = + base::TrimWhitespace(textfield->text(), base::TrimPositions::TRIM_ALL); + + if (text.empty()) + return false; + + assistant_controller_->OnDialogPlateContentsCommitted( + base::UTF16ToUTF8(text)); + + textfield->SetText(base::string16()); + + return true; +} + } // namespace ash
diff --git a/ash/assistant/ui/dialog_plate.h b/ash/assistant/ui/dialog_plate.h index 38e3eb7..9850a6b2 100644 --- a/ash/assistant/ui/dialog_plate.h +++ b/ash/assistant/ui/dialog_plate.h
@@ -6,18 +6,29 @@ #define ASH_ASSISTANT_UI_DIALOG_PLATE_H_ #include "base/macros.h" +#include "ui/views/controls/textfield/textfield_controller.h" #include "ui/views/view.h" namespace ash { -class DialogPlate : public views::View { +class AshAssistantController; + +class DialogPlate : public views::View, public views::TextfieldController { public: - DialogPlate(); + explicit DialogPlate(AshAssistantController* assistant_controller); ~DialogPlate() override; + // views::TextfieldController: + void ContentsChanged(views::Textfield* sender, + const base::string16& new_contents) override; + bool HandleKeyEvent(views::Textfield* sender, + const ui::KeyEvent& key_event) override; + private: void InitLayout(); + AshAssistantController* const assistant_controller_; // Owned by Shell. + DISALLOW_COPY_AND_ASSIGN(DialogPlate); };
diff --git a/ash/dbus/ash_dbus_services.cc b/ash/dbus/ash_dbus_services.cc index c20732e5..b65fa11f 100644 --- a/ash/dbus/ash_dbus_services.cc +++ b/ash/dbus/ash_dbus_services.cc
@@ -4,6 +4,7 @@ #include "ash/dbus/ash_dbus_services.h" +#include "ash/dbus/display_service_provider.h" #include "ash/dbus/url_handler_service_provider.h" #include "ash/public/cpp/config.h" #include "ash/shell.h" @@ -30,6 +31,12 @@ dbus::ObjectPath(chromeos::kUrlHandlerServicePath), chromeos::CrosDBusService::CreateServiceProviderList( std::make_unique<UrlHandlerServiceProvider>())); + + display_service_ = chromeos::CrosDBusService::Create( + chromeos::kDisplayServiceName, + dbus::ObjectPath(chromeos::kDisplayServicePath), + chromeos::CrosDBusService::CreateServiceProviderList( + std::make_unique<DisplayServiceProvider>())); } void AshDBusServices::EmitAshInitialized() { @@ -39,6 +46,7 @@ } AshDBusServices::~AshDBusServices() { + display_service_.reset(); url_handler_service_.reset(); if (initialized_dbus_thread_) { chromeos::DBusThreadManager::Shutdown();
diff --git a/ash/dbus/ash_dbus_services.h b/ash/dbus/ash_dbus_services.h index 5b7e143b..10668b1 100644 --- a/ash/dbus/ash_dbus_services.h +++ b/ash/dbus/ash_dbus_services.h
@@ -29,6 +29,7 @@ private: bool initialized_dbus_thread_{false}; std::unique_ptr<chromeos::CrosDBusService> url_handler_service_; + std::unique_ptr<chromeos::CrosDBusService> display_service_; DISALLOW_COPY_AND_ASSIGN(AshDBusServices); };
diff --git a/ash/dbus/display_service_provider.cc b/ash/dbus/display_service_provider.cc new file mode 100644 index 0000000..6f63026 --- /dev/null +++ b/ash/dbus/display_service_provider.cc
@@ -0,0 +1,199 @@ +// Copyright 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "ash/dbus/display_service_provider.h" + +#include <utility> + +#include "ash/public/interfaces/ash_display_controller.mojom.h" +#include "ash/public/interfaces/constants.mojom.h" +#include "ash/shell.h" +#include "ash/shell_delegate.h" +#include "ash/wm/screen_dimmer.h" +#include "base/bind.h" +#include "base/callback.h" +#include "dbus/message.h" +#include "services/service_manager/public/cpp/connector.h" +#include "third_party/cros_system_api/dbus/service_constants.h" +#include "ui/base/user_activity/user_activity_detector.h" +#include "ui/display/manager/display_configurator.h" + +namespace ash { +namespace { + +void OnDisplayOwnershipChanged( + const dbus::ExportedObject::ResponseSender& response_sender, + std::unique_ptr<dbus::Response> response, + bool status) { + dbus::MessageWriter writer(response.get()); + writer.AppendBool(status); + response_sender.Run(std::move(response)); +} + +} // namespace + +class DisplayServiceProvider::Impl { + public: + Impl() = default; + ~Impl() = default; + + void SetDimming(bool dimmed); + void TakeDisplayOwnership(base::OnceCallback<void(bool)> callback); + void ReleaseDisplayOwnership(base::OnceCallback<void(bool)> callback); + + private: + // Tests may not have a service_manager::Connector. Connect() is called + // whenever ash_display_controller_ is used to lazily connect as needed. + bool Connect(); + + mojom::AshDisplayControllerPtr ash_display_controller_; + std::unique_ptr<ScreenDimmer> screen_dimmer_; + + DISALLOW_COPY_AND_ASSIGN(Impl); +}; + +bool DisplayServiceProvider::Impl::Connect() { + if (ash_display_controller_) + return true; + Shell::Get()->shell_delegate()->GetShellConnector()->BindInterface( + mojom::kServiceName, &ash_display_controller_); + return !!ash_display_controller_; +} + +void DisplayServiceProvider::Impl::SetDimming(bool dimmed) { + if (!screen_dimmer_) { + screen_dimmer_ = + std::make_unique<ScreenDimmer>(ScreenDimmer::Container::ROOT); + } + screen_dimmer_->SetDimming(dimmed); +} + +void DisplayServiceProvider::Impl::TakeDisplayOwnership( + base::OnceCallback<void(bool)> callback) { + if (!Connect()) { + LOG(ERROR) << "Display Controller not connected"; + std::move(callback).Run(false); + return; + } + ash_display_controller_->TakeDisplayControl(std::move(callback)); +} + +void DisplayServiceProvider::Impl::ReleaseDisplayOwnership( + base::OnceCallback<void(bool)> callback) { + if (!Connect()) { + LOG(ERROR) << "Display Controller not connected"; + std::move(callback).Run(false); + return; + } + ash_display_controller_->RelinquishDisplayControl(std::move(callback)); +} + +DisplayServiceProvider::DisplayServiceProvider() + : impl_(std::make_unique<Impl>()), weak_ptr_factory_(this) {} + +DisplayServiceProvider::~DisplayServiceProvider() = default; + +void DisplayServiceProvider::Start( + scoped_refptr<dbus::ExportedObject> exported_object) { + exported_object->ExportMethod( + chromeos::kDisplayServiceInterface, + chromeos::kDisplayServiceSetPowerMethod, + base::BindRepeating(&DisplayServiceProvider::SetDisplayPower, + weak_ptr_factory_.GetWeakPtr()), + base::BindRepeating(&DisplayServiceProvider::OnExported, + weak_ptr_factory_.GetWeakPtr())); + + exported_object->ExportMethod( + chromeos::kDisplayServiceInterface, + chromeos::kDisplayServiceSetSoftwareDimmingMethod, + base::BindRepeating(&DisplayServiceProvider::SetDisplaySoftwareDimming, + weak_ptr_factory_.GetWeakPtr()), + base::BindRepeating(&DisplayServiceProvider::OnExported, + weak_ptr_factory_.GetWeakPtr())); + + exported_object->ExportMethod( + chromeos::kDisplayServiceInterface, + chromeos::kDisplayServiceTakeOwnershipMethod, + base::BindRepeating(&DisplayServiceProvider::TakeDisplayOwnership, + weak_ptr_factory_.GetWeakPtr()), + base::BindRepeating(&DisplayServiceProvider::OnExported, + weak_ptr_factory_.GetWeakPtr())); + + exported_object->ExportMethod( + chromeos::kDisplayServiceInterface, + chromeos::kDisplayServiceReleaseOwnershipMethod, + base::BindRepeating(&DisplayServiceProvider::ReleaseDisplayOwnership, + weak_ptr_factory_.GetWeakPtr()), + base::BindRepeating(&DisplayServiceProvider::OnExported, + weak_ptr_factory_.GetWeakPtr())); +} + +void DisplayServiceProvider::SetDisplayPower( + dbus::MethodCall* method_call, + dbus::ExportedObject::ResponseSender response_sender) { + dbus::MessageReader reader(method_call); + int int_state = 0; + if (!reader.PopInt32(&int_state)) { + LOG(ERROR) << "Unable to parse request: " + << chromeos::kDisplayServiceSetPowerMethod; + response_sender.Run(dbus::Response::FromMethodCall(method_call)); + return; + } + + // Turning displays off when the device becomes idle or on just before + // we suspend may trigger a mouse move, which would then be incorrectly + // reported as user activity. Let the UserActivityDetector + // know so that it can ignore such events. + ui::UserActivityDetector::Get()->OnDisplayPowerChanging(); + + Shell::Get()->display_configurator()->SetDisplayPower( + static_cast<chromeos::DisplayPowerState>(int_state), + display::DisplayConfigurator::kSetDisplayPowerNoFlags, + base::BindRepeating( + [](dbus::MethodCall* method_call, + dbus::ExportedObject::ResponseSender response_sender, + bool /*status*/) { + response_sender.Run(dbus::Response::FromMethodCall(method_call)); + }, + method_call, response_sender)); +} + +void DisplayServiceProvider::SetDisplaySoftwareDimming( + dbus::MethodCall* method_call, + dbus::ExportedObject::ResponseSender response_sender) { + dbus::MessageReader reader(method_call); + bool dimmed = false; + if (reader.PopBool(&dimmed)) { + impl_->SetDimming(dimmed); + } else { + LOG(ERROR) << "Unable to parse request: " + << chromeos::kDisplayServiceSetSoftwareDimmingMethod; + } + response_sender.Run(dbus::Response::FromMethodCall(method_call)); +} + +void DisplayServiceProvider::TakeDisplayOwnership( + dbus::MethodCall* method_call, + dbus::ExportedObject::ResponseSender response_sender) { + impl_->TakeDisplayOwnership(base::BindOnce( + &OnDisplayOwnershipChanged, response_sender, + base::Passed(dbus::Response::FromMethodCall(method_call)))); +} + +void DisplayServiceProvider::ReleaseDisplayOwnership( + dbus::MethodCall* method_call, + dbus::ExportedObject::ResponseSender response_sender) { + impl_->ReleaseDisplayOwnership(base::BindOnce( + &OnDisplayOwnershipChanged, response_sender, + base::Passed(dbus::Response::FromMethodCall(method_call)))); +} + +void DisplayServiceProvider::OnExported(const std::string& interface_name, + const std::string& method_name, + bool success) { + if (!success) + LOG(ERROR) << "Failed to export " << interface_name << "." << method_name; +} + +} // namespace ash
diff --git a/ash/dbus/display_service_provider.h b/ash/dbus/display_service_provider.h new file mode 100644 index 0000000..01ced53 --- /dev/null +++ b/ash/dbus/display_service_provider.h
@@ -0,0 +1,65 @@ +// Copyright 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef ASH_DBUS_DISPLAY_SERVICE_PROVIDER_H_ +#define ASH_DBUS_DISPLAY_SERVICE_PROVIDER_H_ + +#include <memory> +#include <string> + +#include "base/macros.h" +#include "base/memory/weak_ptr.h" +#include "chromeos/dbus/services/cros_dbus_service.h" +#include "dbus/exported_object.h" + +namespace ash { + +// This class implements org.chromium.DisplayService for chrome. +class DisplayServiceProvider + : public chromeos::CrosDBusService::ServiceProviderInterface { + public: + // The caller must ensure that |delegate| outlives this object. + DisplayServiceProvider(); + ~DisplayServiceProvider() override; + + // CrosDBusService::ServiceProviderInterface overrides: + void Start(scoped_refptr<dbus::ExportedObject> exported_object) override; + + private: + class Impl; + + // Forwards DBus calls to DisplayConfigurator::SetDisplayPower. + void SetDisplayPower(dbus::MethodCall* method_call, + dbus::ExportedObject::ResponseSender response_sender); + + // Forwards DBus calls to ScreenDimmer::SetDimming. + void SetDisplaySoftwareDimming( + dbus::MethodCall* method_call, + dbus::ExportedObject::ResponseSender response_sender); + + // Called when a external process no longer needs control of the display and + // Chrome can take ownership. Forwarded to mojom::AshDisplayController. + void TakeDisplayOwnership( + dbus::MethodCall* method_call, + dbus::ExportedObject::ResponseSender response_sender); + + // Called when a external process needs control of the display and needs + // Chrome to release ownership. Forwarded to mojom::AshDisplayController. + void ReleaseDisplayOwnership( + dbus::MethodCall* method_call, + dbus::ExportedObject::ResponseSender response_sender); + + void OnExported(const std::string& interface_name, + const std::string& method_name, + bool success); + + std::unique_ptr<Impl> impl_; + base::WeakPtrFactory<DisplayServiceProvider> weak_ptr_factory_; + + DISALLOW_COPY_AND_ASSIGN(DisplayServiceProvider); +}; + +} // namespace ash + +#endif // ASH_DBUS_DISPLAY_SERVICE_PROVIDER_H_
diff --git a/ash/shell.cc b/ash/shell.cc index d5fd01b73..b9fe93e3 100644 --- a/ash/shell.cc +++ b/ash/shell.cc
@@ -17,7 +17,6 @@ #include "ash/accessibility/accessibility_controller.h" #include "ash/accessibility/accessibility_delegate.h" #include "ash/accessibility/accessibility_focus_ring_controller.h" -#include "ash/accessibility/key_accessibility_enabler.h" #include "ash/app_list/app_list_controller_impl.h" #include "ash/ash_constants.h" #include "ash/assistant/ash_assistant_controller.h" @@ -861,7 +860,6 @@ partial_magnification_controller_.reset(); highlighter_controller_.reset(); voice_interaction_controller_.reset(); - key_accessibility_enabler_.reset(); // This also deletes all RootWindows. Note that we invoke Shutdown() on // WindowTreeHostManager before resetting |window_tree_host_manager_|, since @@ -1263,8 +1261,6 @@ split_view_controller_.reset(new SplitViewController()); - key_accessibility_enabler_ = std::make_unique<KeyAccessibilityEnabler>(); - // The compositor thread and main message loop have to be running in // order to create mirror window. Run it after the main message loop // is started.
diff --git a/ash/shell.h b/ash/shell.h index 93c1ffc60c..20f8210 100644 --- a/ash/shell.h +++ b/ash/shell.h
@@ -116,7 +116,6 @@ class ImeController; class ImmersiveContextAsh; class ImmersiveHandlerFactoryAsh; -class KeyAccessibilityEnabler; class KeyboardBrightnessControlDelegate; class KeyboardUI; class LaserPointerController; @@ -410,9 +409,6 @@ return high_contrast_controller_.get(); } ImeController* ime_controller() { return ime_controller_.get(); } - KeyAccessibilityEnabler* key_accessibility_enabler() { - return key_accessibility_enabler_.get(); - } KeyboardBrightnessControlDelegate* keyboard_brightness_control_delegate() { return keyboard_brightness_control_delegate_.get(); } @@ -863,10 +859,6 @@ // hide the cursor on Windows. std::unique_ptr<::wm::CursorManager> cursor_manager_; - // Enables spoken feedback accessibility based on a press and hold of both - // volume keys. - std::unique_ptr<KeyAccessibilityEnabler> key_accessibility_enabler_; - // For testing only: simulate that a modal window is open bool simulate_modal_window_open_for_test_ = false;
diff --git a/ash/system/ime_menu/ime_menu_tray_unittest.cc b/ash/system/ime_menu/ime_menu_tray_unittest.cc index 5d67485c..f87010a 100644 --- a/ash/system/ime_menu/ime_menu_tray_unittest.cc +++ b/ash/system/ime_menu/ime_menu_tray_unittest.cc
@@ -105,7 +105,8 @@ // Focuses in the given type of input context. void FocusInInputContext(ui::TextInputType input_type) { ui::IMEEngineHandlerInterface::InputContext input_context( - input_type, ui::TEXT_INPUT_MODE_DEFAULT, ui::TEXT_INPUT_FLAG_NONE); + input_type, ui::TEXT_INPUT_MODE_DEFAULT, ui::TEXT_INPUT_FLAG_NONE, + ui::TextInputClient::FOCUS_REASON_OTHER); ui::IMEBridge::Get()->SetCurrentInputContext(input_context); }
diff --git a/ash/wm/overview/overview_utils.cc b/ash/wm/overview/overview_utils.cc index cfdd7d78..0d3446a 100644 --- a/ash/wm/overview/overview_utils.cc +++ b/ash/wm/overview/overview_utils.cc
@@ -8,6 +8,9 @@ #include "ash/public/cpp/ash_switches.h" #include "ash/public/cpp/shell_window_ids.h" #include "ash/shell.h" +#include "ash/wm/overview/cleanup_animation_observer.h" +#include "ash/wm/overview/scoped_overview_animation_settings.h" +#include "ash/wm/overview/window_selector_controller.h" #include "ash/wm/splitview/split_view_controller.h" #include "ash/wm/window_state.h" #include "base/optional.h" @@ -111,6 +114,35 @@ base::FeatureList::IsEnabled(features::kOverviewSwipeToClose); } +void FadeOutWidgetOnExit(std::unique_ptr<views::Widget> widget, + OverviewAnimationType animation_type) { + // The window selector controller may be nullptr on shutdown. + WindowSelectorController* controller = + Shell::Get()->window_selector_controller(); + if (!controller) { + widget->SetOpacity(0.f); + return; + } + + widget->SetOpacity(1.f); + // Fade out the widget. This animation continues past the lifetime of overview + // mode items. + ScopedOverviewAnimationSettings animation_settings(animation_type, + widget->GetNativeWindow()); + // CleanupAnimationObserver will delete itself (and the widget) when the + // opacity animation is complete. + // Ownership over the observer is passed to the window selector controller + // which has longer lifetime so that animations can continue even after the + // overview mode is shut down. + views::Widget* widget_ptr = widget.get(); + std::unique_ptr<CleanupAnimationObserver> observer( + new CleanupAnimationObserver(std::move(widget))); + animation_settings.AddObserver(observer.get()); + + controller->AddDelayedAnimationObserver(std::move(observer)); + widget_ptr->SetOpacity(0.f); +} + std::unique_ptr<views::Widget> CreateBackgroundWidget(aura::Window* root_window, ui::LayerType layer_type, SkColor background_color,
diff --git a/ash/wm/overview/overview_utils.h b/ash/wm/overview/overview_utils.h index beca477..d2590c8 100644 --- a/ash/wm/overview/overview_utils.h +++ b/ash/wm/overview/overview_utils.h
@@ -6,6 +6,7 @@ #define ASH_WM_OVERVIEW_OVERVIEW_UTILS_H_ #include "ash/ash_export.h" +#include "ash/wm/overview/overview_animation_type.h" #include "third_party/skia/include/core/SkColor.h" #include "ui/compositor/layer_type.h" @@ -38,6 +39,13 @@ bool IsOverviewSwipeToCloseEnabled(); +// Fades |widget| to opacity zero with animation settings depending on +// |animation_type|. Used by several classes which need to be destroyed on +// exiting overview, but have some widgets which need to continue animating. +// |widget| is destroyed after finishing animation. +void FadeOutWidgetOnExit(std::unique_ptr<views::Widget> widget, + OverviewAnimationType animation_type); + // Creates and returns a background translucent widget parented in // |root_window|'s default container and having |background_color|. // When |border_thickness| is non-zero, a border is created having
diff --git a/ash/wm/overview/scoped_transform_overview_window.cc b/ash/wm/overview/scoped_transform_overview_window.cc index b4a213e..ccc3181e 100644 --- a/ash/wm/overview/scoped_transform_overview_window.cc +++ b/ash/wm/overview/scoped_transform_overview_window.cc
@@ -8,10 +8,12 @@ #include "ash/public/cpp/ash_features.h" #include "ash/shell.h" +#include "ash/wm/overview/cleanup_animation_observer.h" #include "ash/wm/overview/overview_utils.h" #include "ash/wm/overview/overview_window_animation_observer.h" #include "ash/wm/overview/scoped_overview_animation_settings.h" #include "ash/wm/overview/window_grid.h" +#include "ash/wm/overview/window_selector.h" #include "ash/wm/overview/window_selector_item.h" #include "ash/wm/window_mirror_view.h" #include "ash/wm/window_state.h" @@ -25,12 +27,15 @@ #include "ui/compositor/layer.h" #include "ui/compositor/layer_observer.h" #include "ui/compositor/paint_recorder.h" +#include "ui/compositor/scoped_layer_animation_settings.h" #include "ui/gfx/geometry/rect.h" #include "ui/gfx/geometry/safe_integer_conversions.h" #include "ui/gfx/transform_util.h" #include "ui/views/widget/widget.h" #include "ui/wm/core/coordinate_conversion.h" #include "ui/wm/core/shadow_controller.h" +#include "ui/wm/core/shadow_types.h" +#include "ui/wm/core/window_animations.h" #include "ui/wm/core/window_util.h" namespace ash { @@ -191,9 +196,10 @@ wm::GetWindowState(window_)->set_ignored_by_shelf(ignored_by_shelf_); if (minimized_widget_) { mask_.reset(); - // TODO(oshima): Use unminimize animation instead of hiding animation. - minimized_widget_->CloseNow(); - minimized_widget_.reset(); + // Fade out the minimized widget. This animation continues past the + // lifetime of |this|. + FadeOutWidgetOnExit(std::move(minimized_widget_), + OVERVIEW_ANIMATION_EXIT_OVERVIEW_MODE_FADE_OUT); return; } @@ -609,6 +615,12 @@ } minimized_widget_->SetBounds(bounds); minimized_widget_->Show(); + + minimized_widget_->SetOpacity(0.f); + ScopedOverviewAnimationSettings animation_settings( + OVERVIEW_ANIMATION_ENTER_OVERVIEW_MODE_TABLET_FADE_IN, + minimized_widget_->GetNativeWindow()); + minimized_widget_->SetOpacity(1.f); } void ScopedTransformOverviewWindow::CreateAndApplyMaskAndShadow() {
diff --git a/ash/wm/overview/window_grid.cc b/ash/wm/overview/window_grid.cc index 22792308..ab31036 100644 --- a/ash/wm/overview/window_grid.cc +++ b/ash/wm/overview/window_grid.cc
@@ -249,26 +249,8 @@ if (shield_widget_) { // Fade out the shield widget. This animation continues past the lifetime // of |this|. - aura::Window* widget_window = shield_widget_->GetNativeWindow(); - ui::ScopedLayerAnimationSettings animation_settings( - widget_window->layer()->GetAnimator()); - animation_settings.SetTransitionDuration(base::TimeDelta::FromMilliseconds( - kOverviewSelectorTransitionMilliseconds)); - animation_settings.SetTweenType(gfx::Tween::EASE_OUT); - animation_settings.SetPreemptionStrategy( - ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET); - // CleanupAnimationObserver will delete itself (and the shield widget) when - // the opacity animation is complete. - // Ownership over the observer is passed to the window_selector_->delegate() - // which has longer lifetime so that animations can continue even after the - // overview mode is shut down. - views::Widget* shield_widget = shield_widget_.get(); - std::unique_ptr<CleanupAnimationObserver> observer( - new CleanupAnimationObserver(std::move(shield_widget_))); - animation_settings.AddObserver(observer.get()); - window_selector_->delegate()->AddDelayedAnimationObserver( - std::move(observer)); - shield_widget->SetOpacity(0.f); + FadeOutWidgetOnExit(std::move(shield_widget_), + OVERVIEW_ANIMATION_RESTORE_WINDOW); } }
diff --git a/ash/wm/overview/window_selector_item.cc b/ash/wm/overview/window_selector_item.cc index 149b269..3476fcd 100644 --- a/ash/wm/overview/window_selector_item.cc +++ b/ash/wm/overview/window_selector_item.cc
@@ -12,7 +12,6 @@ #include "ash/resources/vector_icons/vector_icons.h" #include "ash/shell.h" #include "ash/strings/grit/ash_strings.h" -#include "ash/wm/overview/cleanup_animation_observer.h" #include "ash/wm/overview/overview_animation_type.h" #include "ash/wm/overview/overview_utils.h" #include "ash/wm/overview/overview_window_animation_observer.h" @@ -759,7 +758,10 @@ background_view_->OnItemRestored(); background_view_ = nullptr; } - FadeOut(std::move(item_widget_)); + // Fade out the item widget. This animation continues past the lifetime + // of |this|. + FadeOutWidgetOnExit(std::move(item_widget_), + OVERVIEW_ANIMATION_EXIT_OVERVIEW_MODE_FADE_OUT); } void WindowSelectorItem::PrepareForOverview() { @@ -804,6 +806,9 @@ gfx::Rect inset_bounds(target_bounds); inset_bounds.Inset(kWindowMargin, kWindowMargin); + if (wm::GetWindowState(GetWindow())->IsMinimized()) + new_animation_type = OVERVIEW_ANIMATION_NONE; + SetItemBounds(inset_bounds, new_animation_type); // SetItemBounds is called before UpdateHeaderLayout so the header can @@ -1294,9 +1299,13 @@ void WindowSelectorItem::UpdateHeaderLayout( HeaderFadeInMode mode, OverviewAnimationType animation_type) { - // On exit while in tablet mode, do not move the header. - if (mode == HeaderFadeInMode::kExit && UseTabletModeAnimations(GetWindow())) + // Do not move the header on exit if the window is originally minimized + // or in tablet mode. + if (mode == HeaderFadeInMode::kExit && + (UseTabletModeAnimations(GetWindow()) || + wm::GetWindowState(GetWindow())->IsMinimized())) { return; + } gfx::Rect transformed_window_bounds = transform_window_.window_selector_bounds().value_or( @@ -1382,28 +1391,6 @@ GetWindow()->GetTitle()); } -void WindowSelectorItem::FadeOut(std::unique_ptr<views::Widget> widget) { - widget->SetOpacity(1.f); - - // Fade out the widget. This animation continues past the lifetime of |this|. - aura::Window* widget_window = widget->GetNativeWindow(); - ScopedOverviewAnimationSettings animation_settings( - OverviewAnimationType::OVERVIEW_ANIMATION_EXIT_OVERVIEW_MODE_FADE_OUT, - widget_window); - // CleanupAnimationObserver will delete itself (and the widget) when the - // opacity animation is complete. - // Ownership over the observer is passed to the window_selector_->delegate() - // which has longer lifetime so that animations can continue even after the - // overview mode is shut down. - views::Widget* widget_ptr = widget.get(); - std::unique_ptr<CleanupAnimationObserver> observer( - new CleanupAnimationObserver(std::move(widget))); - animation_settings.AddObserver(observer.get()); - window_selector_->delegate()->AddDelayedAnimationObserver( - std::move(observer)); - widget_ptr->SetOpacity(0.f); -} - gfx::SlideAnimation* WindowSelectorItem::GetBackgroundViewAnimation() { return background_view_ ? background_view_->animation() : nullptr; }
diff --git a/ash/wm/overview/window_selector_item.h b/ash/wm/overview/window_selector_item.h index b391c6c..1989b61 100644 --- a/ash/wm/overview/window_selector_item.h +++ b/ash/wm/overview/window_selector_item.h
@@ -283,9 +283,6 @@ // Updates the accessibility name to match the window title. void UpdateAccessibilityName(); - // Fades out a window caption when exiting overview mode. - void FadeOut(std::unique_ptr<views::Widget> widget); - // Select this window if |event_location| is less than the drag threshold for // clicks. This should only be called if the original event was on the title // bar (|tap_down_event_on_title_| has a value).
diff --git a/base/containers/span.h b/base/containers/span.h index 31dcf73..f1e0000 100644 --- a/base/containers/span.h +++ b/base/containers/span.h
@@ -19,7 +19,7 @@ namespace base { // [views.constants] -constexpr size_t dynamic_extent = -1; +constexpr size_t dynamic_extent = static_cast<size_t>(-1); template <typename T, size_t Extent = dynamic_extent> class span; @@ -266,10 +266,10 @@ template <size_t Offset, size_t Count = dynamic_extent> constexpr span<T, - Count != dynamic_extent + (Count != dynamic_extent ? Count : (Extent != dynamic_extent ? Extent - Offset - : dynamic_extent)> + : dynamic_extent))> subspan() const noexcept { static_assert(Extent == dynamic_extent || Offset <= Extent, "Offset must not exceed Extent"); @@ -389,7 +389,7 @@ // [span.objectrep], views of object representation template <typename T, size_t X> -span<const uint8_t, X == dynamic_extent ? dynamic_extent : sizeof(T) * X> +span<const uint8_t, (X == dynamic_extent ? dynamic_extent : sizeof(T) * X)> as_bytes(span<T, X> s) noexcept { return {reinterpret_cast<const uint8_t*>(s.data()), s.size_bytes()}; } @@ -397,7 +397,7 @@ template <typename T, size_t X, typename = std::enable_if_t<!std::is_const<T>::value>> -span<uint8_t, X == dynamic_extent ? dynamic_extent : sizeof(T) * X> +span<uint8_t, (X == dynamic_extent ? dynamic_extent : sizeof(T) * X)> as_writable_bytes(span<T, X> s) noexcept { return {reinterpret_cast<uint8_t*>(s.data()), s.size_bytes()}; }
diff --git a/base/task_scheduler/scheduler_single_thread_task_runner_manager.cc b/base/task_scheduler/scheduler_single_thread_task_runner_manager.cc index 85cba15..ec3f997 100644 --- a/base/task_scheduler/scheduler_single_thread_task_runner_manager.cc +++ b/base/task_scheduler/scheduler_single_thread_task_runner_manager.cc
@@ -91,7 +91,7 @@ worker_->WakeUp(); } - void OnMainEntry(SchedulerWorker* worker) override { + void OnMainEntry(const SchedulerWorker* /* worker */) override { thread_ref_checker_.Set(); PlatformThread::SetName(thread_name_); } @@ -178,7 +178,7 @@ ~SchedulerWorkerCOMDelegate() override { DCHECK(!scoped_com_initializer_); } // SchedulerWorker::Delegate: - void OnMainEntry(SchedulerWorker* worker) override { + void OnMainEntry(const SchedulerWorker* worker) override { SchedulerWorkerDelegate::OnMainEntry(worker); scoped_com_initializer_ = std::make_unique<win::ScopedCOMInitializer>();
diff --git a/base/task_scheduler/scheduler_worker.h b/base/task_scheduler/scheduler_worker.h index b9a9426..62257cd 100644 --- a/base/task_scheduler/scheduler_worker.h +++ b/base/task_scheduler/scheduler_worker.h
@@ -52,7 +52,7 @@ ~Delegate() override = default; // Called by |worker|'s thread when it enters its main function. - virtual void OnMainEntry(SchedulerWorker* worker) = 0; + virtual void OnMainEntry(const SchedulerWorker* worker) = 0; // Called by |worker|'s thread to get a Sequence from which to run a Task. virtual scoped_refptr<Sequence> GetWork(SchedulerWorker* worker) = 0;
diff --git a/base/task_scheduler/scheduler_worker_pool_impl.cc b/base/task_scheduler/scheduler_worker_pool_impl.cc index c9ae989..434f4d08 100644 --- a/base/task_scheduler/scheduler_worker_pool_impl.cc +++ b/base/task_scheduler/scheduler_worker_pool_impl.cc
@@ -73,7 +73,7 @@ // SchedulerWorker::Delegate: void OnCanScheduleSequence(scoped_refptr<Sequence> sequence) override; - void OnMainEntry(SchedulerWorker* worker) override; + void OnMainEntry(const SchedulerWorker* worker) override; scoped_refptr<Sequence> GetWork(SchedulerWorker* worker) override; void DidRunTask() override; void ReEnqueueSequence(scoped_refptr<Sequence> sequence) override; @@ -112,7 +112,7 @@ private: // Returns true if |worker| is allowed to cleanup and remove itself from the // pool. Called from GetWork() when no work is available. - bool CanCleanupLockRequired(SchedulerWorker* worker); + bool CanCleanupLockRequired(const SchedulerWorker* worker) const; // Calls cleanup on |worker| and removes it from the pool. Called from // GetWork() when no work is available and CanCleanupLockRequired() returns @@ -385,7 +385,7 @@ } void SchedulerWorkerPoolImpl::SchedulerWorkerDelegateImpl::OnMainEntry( - SchedulerWorker* worker) { + const SchedulerWorker* worker) { DCHECK_CALLED_ON_VALID_THREAD(worker_thread_checker_); { @@ -516,7 +516,7 @@ } bool SchedulerWorkerPoolImpl::SchedulerWorkerDelegateImpl:: - CanCleanupLockRequired(SchedulerWorker* worker) { + CanCleanupLockRequired(const SchedulerWorker* worker) const { DCHECK_CALLED_ON_VALID_THREAD(worker_thread_checker_); return worker != outer_->PeekAtIdleWorkersStackLockRequired() &&
diff --git a/base/task_scheduler/scheduler_worker_stack_unittest.cc b/base/task_scheduler/scheduler_worker_stack_unittest.cc index 093233f..2908a558 100644 --- a/base/task_scheduler/scheduler_worker_stack_unittest.cc +++ b/base/task_scheduler/scheduler_worker_stack_unittest.cc
@@ -25,7 +25,7 @@ void OnCanScheduleSequence(scoped_refptr<Sequence> sequence) override { ADD_FAILURE() << "Unexpected call to OnCanScheduleSequence()."; } - void OnMainEntry(SchedulerWorker* worker) override {} + void OnMainEntry(const SchedulerWorker* worker) override {} scoped_refptr<Sequence> GetWork(SchedulerWorker* worker) override { return nullptr; }
diff --git a/base/task_scheduler/scheduler_worker_unittest.cc b/base/task_scheduler/scheduler_worker_unittest.cc index 0d8326f..0127ad0d 100644 --- a/base/task_scheduler/scheduler_worker_unittest.cc +++ b/base/task_scheduler/scheduler_worker_unittest.cc
@@ -53,7 +53,7 @@ void OnCanScheduleSequence(scoped_refptr<Sequence> sequence) override { ADD_FAILURE() << "Unexpected call to OnCanScheduleSequence()."; } - void OnMainEntry(SchedulerWorker* worker) override {} + void OnMainEntry(const SchedulerWorker* worker) override {} scoped_refptr<Sequence> GetWork(SchedulerWorker* worker) override { return nullptr; } @@ -145,7 +145,7 @@ } // SchedulerWorker::Delegate: - void OnMainEntry(SchedulerWorker* worker) override { + void OnMainEntry(const SchedulerWorker* worker) override { outer_->worker_set_.Wait(); EXPECT_EQ(outer_->worker_.get(), worker); EXPECT_FALSE(IsCallToDidRunTaskExpected()); @@ -505,7 +505,7 @@ ~MockedControllableCleanupDelegate() override = default; // SchedulerWorker::Delegate: - MOCK_METHOD1(OnMainEntry, void(SchedulerWorker* worker)); + MOCK_METHOD1(OnMainEntry, void(const SchedulerWorker* worker)); private: DISALLOW_COPY_AND_ASSIGN(MockedControllableCleanupDelegate); @@ -710,7 +710,9 @@ } // SchedulerWorker::Delegate: - void OnMainEntry(SchedulerWorker* worker) override { VerifyThreadPriority(); } + void OnMainEntry(const SchedulerWorker* worker) override { + VerifyThreadPriority(); + } scoped_refptr<Sequence> GetWork(SchedulerWorker* worker) override { VerifyThreadPriority(); priority_verified_in_get_work_event_.Signal();
diff --git a/build/check_gn_headers_whitelist.txt b/build/check_gn_headers_whitelist.txt index 79c2f67..5755df1 100644 --- a/build/check_gn_headers_whitelist.txt +++ b/build/check_gn_headers_whitelist.txt
@@ -19,7 +19,6 @@ ash/system/devicetype_utils.h ash/wm/system_modal_container_event_filter_delegate.h cc/base/ring_buffer.h -cc/blink/web_blend_mode.h cc/cc_export.h cc/input/browser_controls_state.h cc/input/event_listener_properties.h
diff --git a/build/fuchsia/common_args.py b/build/fuchsia/common_args.py index e7a7305f..033c3cf3 100644 --- a/build/fuchsia/common_args.py +++ b/build/fuchsia/common_args.py
@@ -40,21 +40,17 @@ common_args.add_argument('--ssh-config', '-F', help='The path to the SSH configuration used for ' 'connecting to the target device.') + common_args.add_argument('--no-system-logs', default=False, + action='store_true', + help='Do not show system log data.') common_args.add_argument('--verbose', '-v', default=False, action='store_true', - help='Show more logging information.') - common_args.add_argument('--really-verbose', '-vv', default=False, - action='store_true', - help='Show even more logging information, ' + - 'including SCP logs.') + help='Enable debug-level logging.') def ConfigureLogging(args): """Configures the logging level based on command line |args|.""" - if args.really_verbose: - args.verbose = True - logging.basicConfig(level=(logging.DEBUG if args.verbose else logging.INFO), format='%(asctime)s:%(levelname)s:%(name)s:%(message)s') @@ -66,7 +62,7 @@ # Verbose SCP output can be useful at times but oftentimes is just too noisy. # Only enable it if -vv is passed. logging.getLogger('ssh').setLevel( - logging.DEBUG if args.really_verbose else logging.WARN) + logging.DEBUG if args.verbose else logging.WARN) def GetDeploymentTargetForArgs(args): @@ -74,7 +70,8 @@ command line arguments.""" if not args.device: - return QemuTarget(args.output_directory, args.target_cpu) + return QemuTarget(args.output_directory, args.target_cpu, + not args.no_system_logs) else: return DeviceTarget(args.output_directory, args.target_cpu, args.host, args.port, args.ssh_config)
diff --git a/build/fuchsia/qemu_target.py b/build/fuchsia/qemu_target.py index 9e7a75b..45bc2d5c 100644 --- a/build/fuchsia/qemu_target.py +++ b/build/fuchsia/qemu_target.py
@@ -33,14 +33,17 @@ class QemuTarget(target.Target): - def __init__(self, output_dir, target_cpu, ram_size_mb=2048): + def __init__(self, output_dir, target_cpu, system_logs, + ram_size_mb=2048): """output_dir: The directory which will contain the files that are generated to support the QEMU deployment. target_cpu: The emulated target CPU architecture. - Can be 'x64' or 'arm64'.""" + Can be 'x64' or 'arm64'. + system_logs: If true, emit system log data.""" super(QemuTarget, self).__init__(output_dir, target_cpu) self._qemu_process = None self._ram_size_mb = ram_size_mb + self._system_logs = system_logs def __enter__(self): return self @@ -137,7 +140,7 @@ logging.debug(' '.join(qemu_command)) stdio_flags = {'stdin': open(os.devnull)} - if logging.getLogger().getEffectiveLevel() != logging.DEBUG: + if not self._system_logs: # Output the Fuchsia debug log. stdio_flags['stdout'] = open(os.devnull) stdio_flags['stderr'] = open(os.devnull)
diff --git a/cc/animation/keyframe_effect.cc b/cc/animation/keyframe_effect.cc index 95ab3aca..c7a5c338 100644 --- a/cc/animation/keyframe_effect.cc +++ b/cc/animation/keyframe_effect.cc
@@ -699,7 +699,7 @@ KeyframeModel::RunState initial_run_state = KeyframeModel::WAITING_FOR_TARGET_AVAILABILITY; std::unique_ptr<KeyframeModel> to_add( - keyframe_model->CloneAndInitialize(initial_run_state)); + keyframe_model->CreateImplInstance(initial_run_state)); DCHECK(!to_add->needs_synchronized_start_time()); to_add->set_affects_active_elements(false); keyframe_effect_impl->AddKeyframeModel(std::move(to_add));
diff --git a/cc/animation/keyframe_model.cc b/cc/animation/keyframe_model.cc index 967e9b7..0044254 100644 --- a/cc/animation/keyframe_model.cc +++ b/cc/animation/keyframe_model.cc
@@ -54,6 +54,28 @@ group_id, target_property_id)); } +std::unique_ptr<KeyframeModel> KeyframeModel::CreateImplInstance( + RunState initial_run_state) const { + // Should never clone a model that is the controlling instance as it ends up + // creating multiple controlling instances. + DCHECK(!is_controlling_instance_); + std::unique_ptr<KeyframeModel> to_return( + new KeyframeModel(curve_->Clone(), id_, group_, target_property_id_)); + to_return->run_state_ = initial_run_state; + to_return->iterations_ = iterations_; + to_return->iteration_start_ = iteration_start_; + to_return->start_time_ = start_time_; + to_return->pause_time_ = pause_time_; + to_return->total_paused_time_ = total_paused_time_; + to_return->time_offset_ = time_offset_; + to_return->direction_ = direction_; + to_return->playback_rate_ = playback_rate_; + to_return->fill_mode_ = fill_mode_; + DCHECK(!to_return->is_controlling_instance_); + to_return->is_controlling_instance_ = true; + return to_return; +} + KeyframeModel::KeyframeModel(std::unique_ptr<AnimationCurve> curve, int keyframe_model_id, int group_id, @@ -240,28 +262,6 @@ return iteration_time; } -std::unique_ptr<KeyframeModel> KeyframeModel::CloneAndInitialize( - RunState initial_run_state) const { - // Should never clone a model that is the controlling instance as it ends up - // creating multiple controlling instances. - DCHECK(!is_controlling_instance_); - std::unique_ptr<KeyframeModel> to_return( - new KeyframeModel(curve_->Clone(), id_, group_, target_property_id_)); - to_return->run_state_ = initial_run_state; - to_return->iterations_ = iterations_; - to_return->iteration_start_ = iteration_start_; - to_return->start_time_ = start_time_; - to_return->pause_time_ = pause_time_; - to_return->total_paused_time_ = total_paused_time_; - to_return->time_offset_ = time_offset_; - to_return->direction_ = direction_; - to_return->playback_rate_ = playback_rate_; - to_return->fill_mode_ = fill_mode_; - DCHECK(!to_return->is_controlling_instance_); - to_return->is_controlling_instance_ = true; - return to_return; -} - void KeyframeModel::PushPropertiesTo(KeyframeModel* other) const { // Currently, we only push changes due to pausing and resuming KeyframeModels // on the main thread.
diff --git a/cc/animation/keyframe_model.h b/cc/animation/keyframe_model.h index 2f15f4a8..c3731dac 100644 --- a/cc/animation/keyframe_model.h +++ b/cc/animation/keyframe_model.h
@@ -60,6 +60,9 @@ int group_id, int target_property_id); + std::unique_ptr<KeyframeModel> CreateImplInstance( + RunState initial_run_state) const; + virtual ~KeyframeModel(); int id() const { return id_; } @@ -140,9 +143,6 @@ base::TimeTicks ConvertLocalTimeToMonotonicTime( base::TimeDelta local_time) const; - std::unique_ptr<KeyframeModel> CloneAndInitialize( - RunState initial_run_state) const; - void set_is_controlling_instance_for_test(bool is_controlling_instance) { is_controlling_instance_ = is_controlling_instance; }
diff --git a/cc/blink/web_blend_mode.h b/cc/blink/web_blend_mode.h deleted file mode 100644 index 998868c..0000000 --- a/cc/blink/web_blend_mode.h +++ /dev/null
@@ -1,107 +0,0 @@ -// Copyright 2014 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef CC_BLINK_WEB_BLEND_MODE_H_ -#define CC_BLINK_WEB_BLEND_MODE_H_ - -#include "third_party/blink/public/platform/web_blend_mode.h" -#include "third_party/skia/include/core/SkBlendMode.h" - -namespace cc_blink { - -inline SkBlendMode BlendModeToSkia(blink::WebBlendMode blend_mode) { - switch (blend_mode) { - case blink::WebBlendMode::kNormal: - return SkBlendMode::kSrcOver; - case blink::WebBlendMode::kMultiply: - return SkBlendMode::kMultiply; - case blink::WebBlendMode::kScreen: - return SkBlendMode::kScreen; - case blink::WebBlendMode::kOverlay: - return SkBlendMode::kOverlay; - case blink::WebBlendMode::kDarken: - return SkBlendMode::kDarken; - case blink::WebBlendMode::kLighten: - return SkBlendMode::kLighten; - case blink::WebBlendMode::kColorDodge: - return SkBlendMode::kColorDodge; - case blink::WebBlendMode::kColorBurn: - return SkBlendMode::kColorBurn; - case blink::WebBlendMode::kHardLight: - return SkBlendMode::kHardLight; - case blink::WebBlendMode::kSoftLight: - return SkBlendMode::kSoftLight; - case blink::WebBlendMode::kDifference: - return SkBlendMode::kDifference; - case blink::WebBlendMode::kExclusion: - return SkBlendMode::kExclusion; - case blink::WebBlendMode::kHue: - return SkBlendMode::kHue; - case blink::WebBlendMode::kSaturation: - return SkBlendMode::kSaturation; - case blink::WebBlendMode::kColor: - return SkBlendMode::kColor; - case blink::WebBlendMode::kLuminosity: - return SkBlendMode::kLuminosity; - } - return SkBlendMode::kSrcOver; -} - -inline blink::WebBlendMode BlendModeFromSkia(SkBlendMode blend_mode) { - switch (blend_mode) { - case SkBlendMode::kSrcOver: - return blink::WebBlendMode::kNormal; - case SkBlendMode::kMultiply: - return blink::WebBlendMode::kMultiply; - case SkBlendMode::kScreen: - return blink::WebBlendMode::kScreen; - case SkBlendMode::kOverlay: - return blink::WebBlendMode::kOverlay; - case SkBlendMode::kDarken: - return blink::WebBlendMode::kDarken; - case SkBlendMode::kLighten: - return blink::WebBlendMode::kLighten; - case SkBlendMode::kColorDodge: - return blink::WebBlendMode::kColorDodge; - case SkBlendMode::kColorBurn: - return blink::WebBlendMode::kColorBurn; - case SkBlendMode::kHardLight: - return blink::WebBlendMode::kHardLight; - case SkBlendMode::kSoftLight: - return blink::WebBlendMode::kSoftLight; - case SkBlendMode::kDifference: - return blink::WebBlendMode::kDifference; - case SkBlendMode::kExclusion: - return blink::WebBlendMode::kExclusion; - case SkBlendMode::kHue: - return blink::WebBlendMode::kHue; - case SkBlendMode::kSaturation: - return blink::WebBlendMode::kSaturation; - case SkBlendMode::kColor: - return blink::WebBlendMode::kColor; - case SkBlendMode::kLuminosity: - return blink::WebBlendMode::kLuminosity; - - // these value are SkBlendModes, but no blend modes. - case SkBlendMode::kClear: - case SkBlendMode::kSrc: - case SkBlendMode::kDst: - case SkBlendMode::kDstOver: - case SkBlendMode::kSrcIn: - case SkBlendMode::kDstIn: - case SkBlendMode::kSrcOut: - case SkBlendMode::kDstOut: - case SkBlendMode::kSrcATop: - case SkBlendMode::kDstATop: - case SkBlendMode::kXor: - case SkBlendMode::kPlus: - case SkBlendMode::kModulate: - NOTREACHED(); - } - return blink::WebBlendMode::kNormal; -} - -} // namespace cc_blink - -#endif // CC_BLINK_WEB_BLEND_MODE_H_
diff --git a/cc/blink/web_layer_impl.cc b/cc/blink/web_layer_impl.cc index e7bab94..15ef69f 100644 --- a/cc/blink/web_layer_impl.cc +++ b/cc/blink/web_layer_impl.cc
@@ -18,7 +18,6 @@ #include "base/trace_event/trace_event_impl.h" #include "cc/base/region.h" #include "cc/base/switches.h" -#include "cc/blink/web_blend_mode.h" #include "cc/layers/layer.h" #include "cc/layers/layer_position_constraint.h" #include "cc/layers/touch_action_region.h" @@ -112,12 +111,12 @@ return layer_->opacity(); } -void WebLayerImpl::SetBlendMode(blink::WebBlendMode blend_mode) { - layer_->SetBlendMode(BlendModeToSkia(blend_mode)); +void WebLayerImpl::SetBlendMode(SkBlendMode blend_mode) { + layer_->SetBlendMode(blend_mode); } -blink::WebBlendMode WebLayerImpl::BlendMode() const { - return BlendModeFromSkia(layer_->blend_mode()); +SkBlendMode WebLayerImpl::BlendMode() const { + return layer_->blend_mode(); } void WebLayerImpl::SetIsRootForIsolatedGroup(bool isolate) {
diff --git a/cc/blink/web_layer_impl.h b/cc/blink/web_layer_impl.h index 719f828..a5ed276 100644 --- a/cc/blink/web_layer_impl.h +++ b/cc/blink/web_layer_impl.h
@@ -54,8 +54,8 @@ float Opacity() const override; void SetContentsOpaqueIsFixed(bool fixed) override; - void SetBlendMode(blink::WebBlendMode blend_mode) override; - blink::WebBlendMode BlendMode() const override; + void SetBlendMode(SkBlendMode blend_mode) override; + SkBlendMode BlendMode() const override; void SetIsRootForIsolatedGroup(bool root) override; bool IsRootForIsolatedGroup() override; void SetHitTestableWithoutDrawsContent(bool should_hit_test) override;
diff --git a/cc/raster/gpu_raster_buffer_provider.cc b/cc/raster/gpu_raster_buffer_provider.cc index f2dd3f9..47bb1b5 100644 --- a/cc/raster/gpu_raster_buffer_provider.cc +++ b/cc/raster/gpu_raster_buffer_provider.cc
@@ -292,7 +292,6 @@ GpuRasterBufferProvider* client, const ResourcePool::InUsePoolResource& in_use_resource, GpuRasterBacking* backing, - const gpu::SyncToken& before_raster_sync_token, bool resource_has_previous_content) : client_(client), backing_(backing), @@ -300,7 +299,7 @@ resource_format_(in_use_resource.format()), color_space_(in_use_resource.color_space()), resource_has_previous_content_(resource_has_previous_content), - before_raster_sync_token_(before_raster_sync_token), + before_raster_sync_token_(backing->returned_sync_token), mailbox_(backing->mailbox), texture_target_(backing->texture_target), texture_is_overlay_candidate_(backing->overlay_candidate), @@ -368,8 +367,6 @@ const ResourcePool::InUsePoolResource& resource, uint64_t resource_content_id, uint64_t previous_content_id) { - gpu::SyncToken before_raster_sync_token; - bool new_resource = false; if (!resource.gpu_backing()) { auto backing = std::make_unique<GpuRasterBacking>(); backing->compositor_context_provider = compositor_context_provider_; @@ -386,21 +383,18 @@ backing->mailbox = gpu::Mailbox::Generate(); gl->ProduceTextureDirectCHROMIUM(backing->texture_id, backing->mailbox.name); - before_raster_sync_token = + // Save a sync token in the backing so that we always wait on it even if + // this task is cancelled between being scheduled and running. + backing->returned_sync_token = LayerTreeResourceProvider::GenerateSyncTokenHelper(gl); resource.set_gpu_backing(std::move(backing)); - new_resource = true; } GpuRasterBacking* backing = static_cast<GpuRasterBacking*>(resource.gpu_backing()); - if (!new_resource) - before_raster_sync_token = backing->returned_sync_token; - bool resource_has_previous_content = resource_content_id && resource_content_id == previous_content_id; return std::make_unique<RasterBufferImpl>(this, resource, backing, - before_raster_sync_token, resource_has_previous_content); }
diff --git a/cc/raster/gpu_raster_buffer_provider.h b/cc/raster/gpu_raster_buffer_provider.h index b9c0072..67881ac 100644 --- a/cc/raster/gpu_raster_buffer_provider.h +++ b/cc/raster/gpu_raster_buffer_provider.h
@@ -73,7 +73,6 @@ RasterBufferImpl(GpuRasterBufferProvider* client, const ResourcePool::InUsePoolResource& in_use_resource, GpuRasterBacking* backing, - const gpu::SyncToken& before_raster_sync_token, bool resource_has_previous_content); ~RasterBufferImpl() override;
diff --git a/cc/raster/one_copy_raster_buffer_provider.cc b/cc/raster/one_copy_raster_buffer_provider.cc index ab3e93d..90f94f6 100644 --- a/cc/raster/one_copy_raster_buffer_provider.cc +++ b/cc/raster/one_copy_raster_buffer_provider.cc
@@ -77,7 +77,6 @@ gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, const ResourcePool::InUsePoolResource& in_use_resource, OneCopyGpuBacking* backing, - const gpu::SyncToken& before_raster_sync_token, uint64_t previous_content_id) : client_(client), backing_(backing), @@ -85,7 +84,7 @@ resource_format_(in_use_resource.format()), color_space_(in_use_resource.color_space()), previous_content_id_(previous_content_id), - before_raster_sync_token_(before_raster_sync_token), + before_raster_sync_token_(backing->returned_sync_token), mailbox_(backing->mailbox), mailbox_texture_target_(backing->texture_target), mailbox_texture_is_overlay_candidate_(backing->overlay_candidate), @@ -154,16 +153,13 @@ DCHECK(worker_context_provider); } -OneCopyRasterBufferProvider::~OneCopyRasterBufferProvider() { -} +OneCopyRasterBufferProvider::~OneCopyRasterBufferProvider() {} std::unique_ptr<RasterBuffer> OneCopyRasterBufferProvider::AcquireBufferForRaster( const ResourcePool::InUsePoolResource& resource, uint64_t resource_content_id, uint64_t previous_content_id) { - gpu::SyncToken before_raster_sync_token; - bool new_resource = false; if (!resource.gpu_backing()) { auto backing = std::make_unique<OneCopyGpuBacking>(); backing->compositor_context_provider = compositor_context_provider_; @@ -180,22 +176,19 @@ backing->mailbox = gpu::Mailbox::Generate(); gl->ProduceTextureDirectCHROMIUM(backing->texture_id, backing->mailbox.name); - before_raster_sync_token = + // Save a sync token in the backing so that we always wait on it even if + // this task is cancelled between being scheduled and running. + backing->returned_sync_token = LayerTreeResourceProvider::GenerateSyncTokenHelper(gl); resource.set_gpu_backing(std::move(backing)); - new_resource = true; } OneCopyGpuBacking* backing = static_cast<OneCopyGpuBacking*>(resource.gpu_backing()); - if (!new_resource) - before_raster_sync_token = backing->returned_sync_token; - // TODO(danakj): If resource_content_id != 0, we only need to copy/upload // the dirty rect. return std::make_unique<RasterBufferImpl>( - this, gpu_memory_buffer_manager_, resource, backing, - before_raster_sync_token, previous_content_id); + this, gpu_memory_buffer_manager_, resource, backing, previous_content_id); } void OneCopyRasterBufferProvider::Flush() {
diff --git a/cc/raster/one_copy_raster_buffer_provider.h b/cc/raster/one_copy_raster_buffer_provider.h index 356a9078..3c823596 100644 --- a/cc/raster/one_copy_raster_buffer_provider.h +++ b/cc/raster/one_copy_raster_buffer_provider.h
@@ -86,7 +86,6 @@ gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, const ResourcePool::InUsePoolResource& in_use_resource, OneCopyGpuBacking* backing, - const gpu::SyncToken& before_raster_sync_token, uint64_t previous_content_id); ~RasterBufferImpl() override;
diff --git a/cc/raster/raster_buffer_provider_unittest.cc b/cc/raster/raster_buffer_provider_unittest.cc index f563825b..adf6e41 100644 --- a/cc/raster/raster_buffer_provider_unittest.cc +++ b/cc/raster/raster_buffer_provider_unittest.cc
@@ -262,6 +262,15 @@ resources_.push_back(std::move(resource)); } + void AppendTaskWithResource(unsigned id, + const ResourcePool::InUsePoolResource* resource) { + std::unique_ptr<RasterBuffer> raster_buffer = + raster_buffer_provider_->AcquireBufferForRaster(*resource, 0, 0); + TileTask::Vector empty; + tasks_.push_back( + new TestRasterTaskImpl(this, id, std::move(raster_buffer), &empty)); + } + const std::vector<RasterTaskResult>& completed_tasks() const { return completed_tasks_; } @@ -450,6 +459,47 @@ EXPECT_TRUE(callback_id); } +TEST_P(RasterBufferProviderTest, WaitOnSyncTokenAfterReschedulingTask) { + if (GetParam() != RASTER_BUFFER_PROVIDER_TYPE_GPU && + GetParam() != RASTER_BUFFER_PROVIDER_TYPE_ONE_COPY) + return; + + base::Lock lock; + + // Schedule a task that is prevented from completing with a lock. + lock.Acquire(); + AppendBlockingTask(0u, &lock); + ScheduleTasks(); + + EXPECT_EQ(resources_.size(), 1u); + const ResourcePool::InUsePoolResource* resource = &resources_[0]; + + // Schedule another task to replace the still-pending task using the same + // resource. + RasterTaskVector tasks; + tasks.swap(tasks_); + AppendTaskWithResource(1u, resource); + ScheduleTasks(); + + // The first task is canceled, but the second task uses the same resource, and + // waits on the compositor sync token that was left by the first task. + RunMessageLoopUntilAllTasksHaveCompleted(); + + { + viz::ContextProvider::ScopedContextLock context_lock( + worker_context_provider_.get()); + viz::TestWebGraphicsContext3D* context3d = + worker_context_provider_->TestContext3d(); + EXPECT_TRUE(context3d->last_waited_sync_token().HasData()); + } + + lock.Release(); + + ASSERT_EQ(completed_tasks().size(), 2u); + EXPECT_TRUE(completed_tasks()[0].canceled); + EXPECT_FALSE(completed_tasks()[1].canceled); +} + INSTANTIATE_TEST_CASE_P( RasterBufferProviderTests, RasterBufferProviderTest,
diff --git a/cc/resources/resource_pool.h b/cc/resources/resource_pool.h index 7c6dcf14..b55cf829 100644 --- a/cc/resources/resource_pool.h +++ b/cc/resources/resource_pool.h
@@ -69,8 +69,10 @@ bool wait_on_fence_required = false; // Set by the ResourcePool when a resource is returned from the display - // compositor. The client of ResourcePool needs to wait on this token, if it - // exists, before using a resource handed out by the ResourcePool. + // compositor, or when the resource texture and mailbox are created for the + // first time, if the resource is shared with another context. The client of + // ResourcePool needs to wait on this token if it exists, before using a + // resource handed out by the ResourcePool. gpu::SyncToken returned_sync_token; };
diff --git a/chrome/VERSION b/chrome/VERSION index 706b763..507ad6c8 100644 --- a/chrome/VERSION +++ b/chrome/VERSION
@@ -1,4 +1,4 @@ MAJOR=68 MINOR=0 -BUILD=3419 +BUILD=3420 PATCH=0
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextual_suggestions/ContextualSuggestionsMediator.java b/chrome/android/java/src/org/chromium/chrome/browser/contextual_suggestions/ContextualSuggestionsMediator.java index 8ce7f1d..bcb0435 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/contextual_suggestions/ContextualSuggestionsMediator.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/contextual_suggestions/ContextualSuggestionsMediator.java
@@ -262,8 +262,11 @@ mModel.setCloseButtonOnClickListener(view -> { TrackerFactory.getTrackerForProfile(mProfile).notifyEvent( EventConstants.CONTEXTUAL_SUGGESTIONS_DISMISSED); - reportEvent(ContextualSuggestionsEvent.UI_CLOSED); - + @ContextualSuggestionsEvent + int openedEvent = + mHasSheetBeenOpened ? ContextualSuggestionsEvent.UI_DISMISSED_AFTER_OPEN + : ContextualSuggestionsEvent.UI_DISMISSED_WITHOUT_OPEN; + reportEvent(openedEvent); clearSuggestions(); }); mModel.setMenuButtonVisibility(false);
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/fullscreen/ChromeFullscreenManager.java b/chrome/android/java/src/org/chromium/chrome/browser/fullscreen/ChromeFullscreenManager.java index 5d15dd3..5383f22 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/fullscreen/ChromeFullscreenManager.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/fullscreen/ChromeFullscreenManager.java
@@ -26,7 +26,6 @@ import org.chromium.chrome.browser.tabmodel.TabModel.TabSelectionType; import org.chromium.chrome.browser.tabmodel.TabModelSelector; import org.chromium.chrome.browser.tabmodel.TabModelSelectorTabModelObserver; -import org.chromium.chrome.browser.vr_shell.VrShellDelegate; import org.chromium.chrome.browser.widget.ControlContainer; import org.chromium.content.browser.ContentVideoView; import org.chromium.content_public.common.BrowserControlsState; @@ -355,9 +354,7 @@ return mTopControlContainerHeight; } - /** - * @return The height of the bottom controls in pixels. - */ + @Override public int getBottomControlsHeight() { return mBottomControlContainerHeight; } @@ -620,18 +617,6 @@ @Override public void setPositionsForTab(float topControlsOffset, float bottomControlsOffset, float topContentOffset) { - if (VrShellDelegate.isInVr()) { - VrShellDelegate.rawTopContentOffsetChanged(topContentOffset); - // The dip scale of java UI and WebContents are different while in VR, leading to a - // mismatch in size in pixels when converting from dips. Since we hide the controls in - // VR anyways, just set the offsets to what they're supposed to be with the controls - // hidden. - // TODO(mthiesse): Should we instead just set the top controls height to be 0 while in - // VR? - topControlsOffset = -getTopControlsHeight(); - bottomControlsOffset = getBottomControlsHeight(); - topContentOffset = 0; - } float rendererTopControlOffset = Math.round(Math.max(topControlsOffset, -getTopControlsHeight())); float rendererBottomControlOffset =
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/fullscreen/FullscreenManager.java b/chrome/android/java/src/org/chromium/chrome/browser/fullscreen/FullscreenManager.java index 1e76b2c9..c3679cd3 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/fullscreen/FullscreenManager.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/fullscreen/FullscreenManager.java
@@ -51,6 +51,11 @@ public abstract int getTopControlsHeight(); /** + * @return The height of the bottom controls in pixels. + */ + public abstract int getBottomControlsHeight(); + + /** * @return The ratio that the browser controls are off screen; this will be a number [0,1] * where 1 is completely hidden and 0 is completely shown. */
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java b/chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java index 85d6bd4f..2e2c9052 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java
@@ -2093,7 +2093,7 @@ mInfoBarContainer = null; } - mControlsOffsetHelper.clearPreviousPositions(); + mControlsOffsetHelper.destroy(); } /**
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabBrowserControlsOffsetHelper.java b/chrome/android/java/src/org/chromium/chrome/browser/tab/TabBrowserControlsOffsetHelper.java index 10faf245..5667df9a 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabBrowserControlsOffsetHelper.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/tab/TabBrowserControlsOffsetHelper.java
@@ -12,11 +12,13 @@ import org.chromium.chrome.browser.fullscreen.FullscreenManager; import org.chromium.chrome.browser.tabmodel.TabModelImpl; import org.chromium.chrome.browser.util.FeatureUtilities; +import org.chromium.chrome.browser.vr_shell.VrShellDelegate; +import org.chromium.chrome.browser.vr_shell.VrShellDelegate.VrModeObserver; /** * Handles browser controls offset for a Tab. */ -public class TabBrowserControlsOffsetHelper { +public class TabBrowserControlsOffsetHelper implements VrModeObserver { /** * Maximum duration for the control container slide-in animation. Note that this value matches * the one in browser_controls_offset_manager.cc. @@ -51,10 +53,16 @@ private ValueAnimator mControlsAnimator; /** + * Whether the browser is currently in VR mode. + */ + private boolean mIsInVr; + + /** * @param tab The {@link Tab} that this class is associated with. */ TabBrowserControlsOffsetHelper(Tab tab) { mTab = tab; + VrShellDelegate.registerVrModeObserver(this); } /** @@ -171,7 +179,18 @@ final FullscreenManager manager = mTab.getFullscreenManager(); if (manager == null) return; - if (toNonFullscreen) { + if (mIsInVr) { + VrShellDelegate.rawTopContentOffsetChanged(topContentOffset); + // The dip scale of java UI and WebContents are different while in VR, leading to a + // mismatch in size in pixels when converting from dips. Since we hide the controls in + // VR anyways, just set the offsets to what they're supposed to be with the controls + // hidden. + // TODO(mthiesse): Should we instead just set the top controls height to be 0 while in + // VR? + topControlsOffset = -manager.getTopControlsHeight(); + bottomControlsOffset = manager.getBottomControlsHeight(); + topContentOffset = 0; + } else if (toNonFullscreen) { manager.setPositionsForTabToNonFullscreen(); } else { manager.setPositionsForTab(topControlsOffset, bottomControlsOffset, topContentOffset); @@ -228,4 +247,24 @@ }); mControlsAnimator.start(); } + + @Override + public void onEnterVr() { + mIsInVr = true; + resetPositions(); + } + + @Override + public void onExitVr() { + mIsInVr = false; + resetPositions(); + } + + /** + * Cleans up internal state, unregistering any observers. + */ + public void destroy() { + clearPreviousPositions(); + VrShellDelegate.unregisterVrModeObserver(this); + } }
diff --git a/chrome/android/profiles/newest.txt b/chrome/android/profiles/newest.txt index 7875daf2..0dcb4242 100644 --- a/chrome/android/profiles/newest.txt +++ b/chrome/android/profiles/newest.txt
@@ -1 +1 @@ -chromeos-chrome-amd64-68.0.3418.0_rc-r1.afdo.bz2 \ No newline at end of file +chromeos-chrome-amd64-68.0.3419.0_rc-r1.afdo.bz2 \ No newline at end of file
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc index f583e30..c1ed29d 100644 --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc
@@ -2447,6 +2447,11 @@ flag_descriptions::kEnableInputImeApiDescription, kOsWin | kOsLinux, ENABLE_DISABLE_VALUE_TYPE(switches::kEnableInputImeAPI, switches::kDisableInputImeAPI)}, +#if !defined(OS_CHROMEOS) + {"warn-before-quitting", flag_descriptions::kWarnBeforeQuittingFlagName, + flag_descriptions::kWarnBeforeQuittingFlagDescription, kOsWin | kOsLinux, + FEATURE_VALUE_TYPE(features::kWarnBeforeQuitting)}, +#endif // OS_CHROMEOS #endif // OS_WIN || OS_LINUX {"enable-origin-trials", flag_descriptions::kOriginTrialsName, flag_descriptions::kOriginTrialsDescription, kOsAll, @@ -3892,6 +3897,10 @@ {"enable-sync-uss-sessions", flag_descriptions::kEnableSyncUSSSessionsName, flag_descriptions::kEnableSyncUSSSessionsDescription, kOsAll, FEATURE_VALUE_TYPE(switches::kSyncUSSSessions)}, + {"enable-experimental-productivity-features", + flag_descriptions::kExperimentalProductivityFeaturesName, + flag_descriptions::kExperimentalProductivityFeaturesDescription, kOsAll, + FEATURE_VALUE_TYPE(features::kExperimentalProductivityFeatures)}, #if defined(OS_CHROMEOS) {"enable-overview-swipe-to-close",
diff --git a/chrome/browser/about_flags_unittest.cc b/chrome/browser/about_flags_unittest.cc index 5dac6e0f..e9fbe31 100644 --- a/chrome/browser/about_flags_unittest.cc +++ b/chrome/browser/about_flags_unittest.cc
@@ -242,7 +242,7 @@ TEST_F(AboutFlagsHistogramTest, CheckHistograms) { base::FilePath histograms_xml_file_path; ASSERT_TRUE( - PathService::Get(base::DIR_SOURCE_ROOT, &histograms_xml_file_path)); + base::PathService::Get(base::DIR_SOURCE_ROOT, &histograms_xml_file_path)); histograms_xml_file_path = histograms_xml_file_path.AppendASCII("tools") .AppendASCII("metrics") .AppendASCII("histograms")
diff --git a/chrome/browser/apps/app_shim/app_shim_host_manager_browsertest_mac.mm b/chrome/browser/apps/app_shim/app_shim_host_manager_browsertest_mac.mm index 338a2dce..065b019 100644 --- a/chrome/browser/apps/app_shim/app_shim_host_manager_browsertest_mac.mm +++ b/chrome/browser/apps/app_shim/app_shim_host_manager_browsertest_mac.mm
@@ -64,7 +64,7 @@ io_thread_.StartWithOptions(io_thread_options); base::FilePath user_data_dir; - CHECK(PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)); + CHECK(base::PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)); base::FilePath symlink_path = user_data_dir.Append(app_mode::kAppShimSocketSymlinkName); @@ -256,10 +256,10 @@ bool AppShimHostManagerBrowserTestSocketFiles::SetUpUserDataDirectory() { // Create an existing symlink. It should be replaced by AppShimHostManager. base::FilePath user_data_dir; - EXPECT_TRUE(PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)); + EXPECT_TRUE(base::PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)); symlink_path_ = user_data_dir.Append(app_mode::kAppShimSocketSymlinkName); base::FilePath temp_dir; - PathService::Get(base::DIR_TEMP, &temp_dir); + base::PathService::Get(base::DIR_TEMP, &temp_dir); EXPECT_TRUE(base::CreateSymbolicLink(temp_dir.Append("chrome-XXXXXX"), symlink_path_));
diff --git a/chrome/browser/apps/app_shim/app_shim_interactive_uitest_mac.mm b/chrome/browser/apps/app_shim/app_shim_interactive_uitest_mac.mm index eb69ee5..9d7ffbb 100644 --- a/chrome/browser/apps/app_shim/app_shim_interactive_uitest_mac.mm +++ b/chrome/browser/apps/app_shim/app_shim_interactive_uitest_mac.mm
@@ -565,7 +565,7 @@ IN_PROC_BROWSER_TEST_F(AppShimInteractiveTest, MAYBE_RebuildShim) { // Get the 32 bit shim. base::FilePath test_data_dir; - PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir); + base::PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir); base::FilePath shim_path_32 = test_data_dir.Append("app_shim").Append("app_shim_32_bit.app"); EXPECT_TRUE(base::PathExists(shim_path_32));
diff --git a/chrome/browser/autocomplete/keyword_extensions_delegate_impl_unittest.cc b/chrome/browser/autocomplete/keyword_extensions_delegate_impl_unittest.cc index e421c900..140847d 100644 --- a/chrome/browser/autocomplete/keyword_extensions_delegate_impl_unittest.cc +++ b/chrome/browser/autocomplete/keyword_extensions_delegate_impl_unittest.cc
@@ -58,7 +58,7 @@ // Load an extension. { base::FilePath path; - ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &path)); + ASSERT_TRUE(base::PathService::Get(chrome::DIR_TEST_DATA, &path)); path = path.AppendASCII("extensions").AppendASCII("simple_with_popup"); TestExtensionRegistryObserver load_observer(registry());
diff --git a/chrome/browser/autofill/form_structure_browsertest.cc b/chrome/browser/autofill/form_structure_browsertest.cc index 89431da..61d6c5b5 100644 --- a/chrome/browser/autofill/form_structure_browsertest.cc +++ b/chrome/browser/autofill/form_structure_browsertest.cc
@@ -56,7 +56,7 @@ const base::FilePath& GetTestDataDir() { CR_DEFINE_STATIC_LOCAL(base::FilePath, dir, ()); if (dir.empty()) { - PathService::Get(base::DIR_SOURCE_ROOT, &dir); + base::PathService::Get(base::DIR_SOURCE_ROOT, &dir); dir = dir.AppendASCII("components"); dir = dir.AppendASCII("test"); dir = dir.AppendASCII("data");
diff --git a/chrome/browser/autofill/validation_rules_storage_factory.cc b/chrome/browser/autofill/validation_rules_storage_factory.cc index 241eefd2..3cba175 100644 --- a/chrome/browser/autofill/validation_rules_storage_factory.cc +++ b/chrome/browser/autofill/validation_rules_storage_factory.cc
@@ -27,7 +27,7 @@ ValidationRulesStorageFactory::ValidationRulesStorageFactory() { base::FilePath user_data_dir; - bool success = PathService::Get(chrome::DIR_USER_DATA, &user_data_dir); + bool success = base::PathService::Get(chrome::DIR_USER_DATA, &user_data_dir); DCHECK(success); json_pref_store_ = new JsonPrefStore(
diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc index 41dd9ff..6ed1aec6 100644 --- a/chrome/browser/browser_process_impl.cc +++ b/chrome/browser/browser_process_impl.cc
@@ -1052,7 +1052,7 @@ created_profile_manager_ = true; base::FilePath user_data_dir; - PathService::Get(chrome::DIR_USER_DATA, &user_data_dir); + base::PathService::Get(chrome::DIR_USER_DATA, &user_data_dir); profile_manager_ = std::make_unique<ProfileManager>(user_data_dir); } @@ -1060,7 +1060,7 @@ DCHECK(!local_state_); base::FilePath local_state_path; - CHECK(PathService::Get(chrome::FILE_LOCAL_STATE, &local_state_path)); + CHECK(base::PathService::Get(chrome::FILE_LOCAL_STATE, &local_state_path)); auto pref_registry = base::MakeRefCounted<PrefRegistrySimple>(); // Register local state preferences. @@ -1258,7 +1258,7 @@ base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN})); base::FilePath user_data_dir; - PathService::Get(chrome::DIR_USER_DATA, &user_data_dir); + base::PathService::Get(chrome::DIR_USER_DATA, &user_data_dir); base::FilePath indexed_ruleset_base_dir = user_data_dir.Append(subresource_filter::kTopLevelDirectoryName) .Append(subresource_filter::kIndexedRulesetBaseDirectoryName); @@ -1296,7 +1296,7 @@ NOTREACHED(); #else base::FilePath store_path; - CHECK(PathService::Get(chrome::DIR_GLOBAL_GCM_STORE, &store_path)); + CHECK(base::PathService::Get(chrome::DIR_GLOBAL_GCM_STORE, &store_path)); scoped_refptr<base::SequencedTaskRunner> blocking_task_runner( base::CreateSequencedTaskRunnerWithTraits( {base::MayBlock(), base::TaskPriority::BACKGROUND,
diff --git a/chrome/browser/browser_shutdown.cc b/chrome/browser/browser_shutdown.cc index 77651685..c058cae 100644 --- a/chrome/browser/browser_shutdown.cc +++ b/chrome/browser/browser_shutdown.cc
@@ -84,7 +84,7 @@ base::FilePath GetShutdownMsPath() { base::FilePath shutdown_ms_file; - PathService::Get(chrome::DIR_USER_DATA, &shutdown_ms_file); + base::PathService::Get(chrome::DIR_USER_DATA, &shutdown_ms_file); return shutdown_ms_file.AppendASCII(kShutdownMsFile); }
diff --git a/chrome/browser/browsing_data/browsing_data_remover_browsertest.cc b/chrome/browser/browsing_data/browsing_data_remover_browsertest.cc index 87aca6df5..2ffc405 100644 --- a/chrome/browser/browsing_data/browsing_data_remover_browsertest.cc +++ b/chrome/browser/browsing_data/browsing_data_remover_browsertest.cc
@@ -67,7 +67,7 @@ feature_list_.InitWithFeatures( {browsing_data::features::kRemoveNavigationHistory}, {}); base::FilePath path; - PathService::Get(content::DIR_TEST_DATA, &path); + base::PathService::Get(content::DIR_TEST_DATA, &path); host_resolver()->AddRule(kExampleHost, "127.0.0.1"); embedded_test_server()->ServeFilesFromDirectory(path); ASSERT_TRUE(embedded_test_server()->Start());
diff --git a/chrome/browser/captive_portal/captive_portal_browsertest.cc b/chrome/browser/captive_portal/captive_portal_browsertest.cc index 8ee6617..c88621f 100644 --- a/chrome/browser/captive_portal/captive_portal_browsertest.cc +++ b/chrome/browser/captive_portal/captive_portal_browsertest.cc
@@ -837,7 +837,7 @@ // Returns the contents of the given filename under chrome/test/data. static std::string GetContents(const std::string& path) { base::FilePath root_http; - PathService::Get(chrome::DIR_TEST_DATA, &root_http); + base::PathService::Get(chrome::DIR_TEST_DATA, &root_http); base::ScopedAllowBlockingForTesting allow_io; base::FilePath file_path = root_http.AppendASCII(path); std::string contents;
diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc index 8441908..b4ccbf7c 100644 --- a/chrome/browser/chrome_browser_main.cc +++ b/chrome/browser/chrome_browser_main.cc
@@ -382,7 +382,7 @@ base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); if (command_line->HasSwitch(switches::kParentProfile)) { base::FilePath local_state_path; - PathService::Get(chrome::FILE_LOCAL_STATE, &local_state_path); + base::PathService::Get(chrome::FILE_LOCAL_STATE, &local_state_path); bool local_state_file_exists = base::PathExists(local_state_path); if (!local_state_file_exists) { base::FilePath parent_profile = @@ -554,7 +554,7 @@ RegisterOptimizationHintsComponent(cus, profile_prefs); base::FilePath path; - if (PathService::Get(chrome::DIR_USER_DATA, &path)) { + if (base::PathService::Get(chrome::DIR_USER_DATA, &path)) { // The CRLSet component previously resided in a different location: delete // the old file. component_updater::DeleteLegacyCRLSet(path); @@ -1157,7 +1157,7 @@ base::SequencedTaskRunner* local_state_task_runner, bool* failed_to_load_resource_bundle) { *failed_to_load_resource_bundle = false; - if (!PathService::Get(chrome::DIR_USER_DATA, &user_data_dir_)) + if (!base::PathService::Get(chrome::DIR_USER_DATA, &user_data_dir_)) return chrome::RESULT_CODE_MISSING_DATA; InitializeLocalState(local_state_task_runner); @@ -1346,8 +1346,8 @@ // makes it less likely that the directory will be created by third-party // software with incorrect owner or permission. See crbug.com/725513 . base::FilePath user_native_messaging_dir; - CHECK(PathService::Get(chrome::DIR_USER_NATIVE_MESSAGING, - &user_native_messaging_dir)); + CHECK(base::PathService::Get(chrome::DIR_USER_NATIVE_MESSAGING, + &user_native_messaging_dir)); if (!base::PathExists(user_native_messaging_dir)) base::CreateDirectory(user_native_messaging_dir); #endif // defined(OS_MACOSX) || defined(OS_LINUX)
diff --git a/chrome/browser/chrome_browser_main_android.cc b/chrome/browser/chrome_browser_main_android.cc index db13c4df..5e4db96 100644 --- a/chrome/browser/chrome_browser_main_android.cc +++ b/chrome/browser/chrome_browser_main_android.cc
@@ -69,7 +69,7 @@ if (breakpad_enabled) { base::FilePath crash_dump_dir; - PathService::Get(chrome::DIR_CRASH_DUMPS, &crash_dump_dir); + base::PathService::Get(chrome::DIR_CRASH_DUMPS, &crash_dump_dir); breakpad::CrashDumpObserver::GetInstance()->RegisterClient( std::make_unique<breakpad::ChildProcessCrashObserver>( crash_dump_dir, kAndroidMinidumpDescriptor));
diff --git a/chrome/browser/chrome_browser_main_win.cc b/chrome/browser/chrome_browser_main_win.cc index 940e72e..bcb1a7a590 100644 --- a/chrome/browser/chrome_browser_main_win.cc +++ b/chrome/browser/chrome_browser_main_win.cc
@@ -664,7 +664,7 @@ InstallUtil::GetChromeVersion(dist, true, &version); if (version.IsValid()) { base::FilePath exe_path; - PathService::Get(base::DIR_EXE, &exe_path); + base::PathService::Get(base::DIR_EXE, &exe_path); std::wstring exe = exe_path.value(); base::FilePath user_exe_path(installer::GetChromeInstallPath(false)); if (base::FilePath::CompareEqualIgnoreCase(exe, user_exe_path.value())) {
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc index 39685ae..37a54bd 100644 --- a/chrome/browser/chrome_content_browser_client.cc +++ b/chrome/browser/chrome_content_browser_client.cc
@@ -650,7 +650,7 @@ breakpad::CrashHandlerHostLinux* CreateCrashHandlerHost( const std::string& process_type) { base::FilePath dumps_path; - PathService::Get(chrome::DIR_CRASH_DUMPS, &dumps_path); + base::PathService::Get(chrome::DIR_CRASH_DUMPS, &dumps_path); { ANNOTATE_SCOPED_MEMORY_LEAK; bool upload = (getenv(env_vars::kHeadless) == NULL); @@ -1640,6 +1640,12 @@ #endif } +bool ChromeContentBrowserClient::ShouldIsolateErrorPage(bool in_main_frame) { + // TODO(nasko): Consider supporting error page isolation in subframes if + // Site Isolation is enabled. + return in_main_frame; +} + bool ChromeContentBrowserClient::ShouldAssignSiteForURL(const GURL& url) { return !url.SchemeIs(chrome::kChromeNativeScheme); } @@ -1841,7 +1847,7 @@ #if defined(OS_CHROMEOS) // On Chrome OS need to pass primary user homedir (in multi-profiles session). base::FilePath homedir; - PathService::Get(base::DIR_HOME, &homedir); + base::PathService::Get(base::DIR_HOME, &homedir); command_line->AppendSwitchASCII(chromeos::switches::kHomedir, homedir.value().c_str()); #endif @@ -2969,7 +2975,7 @@ base::FilePath ChromeContentBrowserClient::GetShaderDiskCacheDirectory() { base::FilePath user_data_dir; - PathService::Get(chrome::DIR_USER_DATA, &user_data_dir); + base::PathService::Get(chrome::DIR_USER_DATA, &user_data_dir); DCHECK(!user_data_dir.empty()); return user_data_dir.Append(FILE_PATH_LITERAL("ShaderCache")); } @@ -3122,7 +3128,7 @@ child_process_id, mappings); base::FilePath app_data_path; - PathService::Get(base::DIR_ANDROID_APP_DATA, &app_data_path); + base::PathService::Get(base::DIR_ANDROID_APP_DATA, &app_data_path); DCHECK(!app_data_path.empty()); #else int crash_signal_fd = GetCrashSignalFD(command_line);
diff --git a/chrome/browser/chrome_content_browser_client.h b/chrome/browser/chrome_content_browser_client.h index 4de5fcd..d64ca2e 100644 --- a/chrome/browser/chrome_content_browser_client.h +++ b/chrome/browser/chrome_content_browser_client.h
@@ -149,6 +149,7 @@ content::SiteInstance* site_instance, const GURL& current_url, const GURL& new_url) override; + bool ShouldIsolateErrorPage(bool in_main_frame) override; bool ShouldAssignSiteForURL(const GURL& url) override; std::vector<url::Origin> GetOriginsRequiringDedicatedProcess() override; bool ShouldEnableStrictSiteIsolation() override;
diff --git a/chrome/browser/chrome_plugin_browsertest.cc b/chrome/browser/chrome_plugin_browsertest.cc index fdf2b7d..fab61fa4 100644 --- a/chrome/browser/chrome_plugin_browsertest.cc +++ b/chrome/browser/chrome_plugin_browsertest.cc
@@ -88,7 +88,7 @@ static GURL GetURL(const char* filename) { base::FilePath path; - PathService::Get(content::DIR_TEST_DATA, &path); + base::PathService::Get(content::DIR_TEST_DATA, &path); path = path.AppendASCII("plugin").AppendASCII(filename); CHECK(base::PathExists(path)); return net::FilePathToFileURL(path);
diff --git a/chrome/browser/chrome_security_exploit_browsertest.cc b/chrome/browser/chrome_security_exploit_browsertest.cc index 431ff0a..02a3a9ee 100644 --- a/chrome/browser/chrome_security_exploit_browsertest.cc +++ b/chrome/browser/chrome_security_exploit_browsertest.cc
@@ -21,6 +21,7 @@ #include "content/public/browser/render_process_host.h" #include "content/public/browser/web_contents_observer.h" #include "content/public/common/content_switches.h" +#include "content/public/common/url_constants.h" #include "content/public/test/browser_test_utils.h" #include "mojo/public/cpp/bindings/strong_associated_binding.h" #include "net/dns/mock_host_resolver.h" @@ -200,7 +201,11 @@ AddTabAtIndex(0, target_url, ui::PAGE_TRANSITION_TYPED); content::WaitForLoadStop(browser()->tab_strip_model()->GetWebContentsAt(0)); rfh = browser()->tab_strip_model()->GetActiveWebContents()->GetMainFrame(); - EXPECT_EQ(GURL(target_origin), rfh->GetSiteInstance()->GetSiteURL()); + + // If the attack is unsuccessful, the navigation ends up in an error + // page. + EXPECT_EQ(GURL(content::kUnreachableWebDataURL), + rfh->GetSiteInstance()->GetSiteURL()); std::string body; std::string script = R"( var textContent = document.body.innerText.replace(/\n+/g, '\n');
diff --git a/chrome/browser/chromeos/BUILD.gn b/chrome/browser/chromeos/BUILD.gn index a67dd809..62a28a6c 100644 --- a/chrome/browser/chromeos/BUILD.gn +++ b/chrome/browser/chromeos/BUILD.gn
@@ -523,10 +523,6 @@ "customization/customization_wallpaper_downloader.h", "customization/customization_wallpaper_util.cc", "customization/customization_wallpaper_util.h", - "dbus/chrome_console_service_provider_delegate.cc", - "dbus/chrome_console_service_provider_delegate.h", - "dbus/chrome_display_power_service_provider_delegate.cc", - "dbus/chrome_display_power_service_provider_delegate.h", "dbus/chrome_proxy_resolution_service_provider_delegate.cc", "dbus/chrome_proxy_resolution_service_provider_delegate.h", "dbus/chrome_virtual_file_request_service_provider_delegate.cc",
diff --git a/chrome/browser/chromeos/accessibility/accessibility_manager.cc b/chrome/browser/chromeos/accessibility/accessibility_manager.cc index ce8510a7..0be50ef 100644 --- a/chrome/browser/chromeos/accessibility/accessibility_manager.cc +++ b/chrome/browser/chromeos/accessibility/accessibility_manager.cc
@@ -242,7 +242,7 @@ bundle.GetRawDataResource(IDR_SOUND_DICTATION_CANCEL_WAV)); base::FilePath resources_path; - if (!PathService::Get(chrome::DIR_RESOURCES, &resources_path)) + if (!base::PathService::Get(chrome::DIR_RESOURCES, &resources_path)) NOTREACHED(); chromevox_loader_ = base::WrapUnique(new AccessibilityExtensionLoader( extension_misc::kChromeVoxExtensionId,
diff --git a/chrome/browser/chromeos/app_mode/arc/arc_kiosk_app_data.cc b/chrome/browser/chromeos/app_mode/arc/arc_kiosk_app_data.cc index 5c3856f..f59bd7c 100644 --- a/chrome/browser/chromeos/app_mode/arc/arc_kiosk_app_data.cc +++ b/chrome/browser/chromeos/app_mode/arc/arc_kiosk_app_data.cc
@@ -61,7 +61,7 @@ icon_ = icon; base::FilePath user_data_dir; - if (!PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)) { + if (!base::PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)) { LOG(ERROR) << "Failed to get user directory."; return; }
diff --git a/chrome/browser/chromeos/app_mode/fake_cws.cc b/chrome/browser/chromeos/app_mode/fake_cws.cc index 268686e..c8fd127 100644 --- a/chrome/browser/chromeos/app_mode/fake_cws.cc +++ b/chrome/browser/chromeos/app_mode/fake_cws.cc
@@ -109,7 +109,7 @@ GURL crx_download_url = web_store_url_.Resolve(kCrxDownloadPath + crx_file); base::FilePath test_data_dir; - PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir); + base::PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir); base::FilePath crx_file_path = test_data_dir.AppendASCII("chromeos/app_mode/webstore/downloads") .AppendASCII(crx_file);
diff --git a/chrome/browser/chromeos/app_mode/kiosk_app_manager.cc b/chrome/browser/chromeos/app_mode/kiosk_app_manager.cc index f976dca0..b96102e 100644 --- a/chrome/browser/chromeos/app_mode/kiosk_app_manager.cc +++ b/chrome/browser/chromeos/app_mode/kiosk_app_manager.cc
@@ -144,7 +144,7 @@ base::FilePath GetCrxCacheDir() { base::FilePath user_data_dir; - CHECK(PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)); + CHECK(base::PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)); return user_data_dir.AppendASCII(kCrxCacheDir); } @@ -940,7 +940,7 @@ void KioskAppManager::GetKioskAppIconCacheDir(base::FilePath* cache_dir) { base::FilePath user_data_dir; - CHECK(PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)); + CHECK(base::PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)); *cache_dir = user_data_dir.AppendASCII(kIconCacheDir); }
diff --git a/chrome/browser/chromeos/app_mode/kiosk_app_manager_browsertest.cc b/chrome/browser/chromeos/app_mode/kiosk_app_manager_browsertest.cc index 6426ebc4..dc655de5 100644 --- a/chrome/browser/chromeos/app_mode/kiosk_app_manager_browsertest.cc +++ b/chrome/browser/chromeos/app_mode/kiosk_app_manager_browsertest.cc
@@ -229,7 +229,7 @@ // InProcessBrowserTest overrides: void SetUp() override { base::FilePath test_data_dir; - PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir); + base::PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir); embedded_test_server()->ServeFilesFromDirectory(test_data_dir); // Don't spin up the IO thread yet since no threads are allowed while @@ -299,7 +299,7 @@ const std::string& icon_file_name, const std::string& required_platform_version) { base::FilePath test_dir; - ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_dir)); + ASSERT_TRUE(base::PathService::Get(chrome::DIR_TEST_DATA, &test_dir)); base::FilePath data_dir = test_dir.AppendASCII("chromeos/app_mode/"); // Copy the icon file to temp dir for using because ClearAppData test @@ -385,7 +385,8 @@ EXPECT_EQ(expected_required_platform_version, required_platform_version); base::FilePath expected_icon_path; - ASSERT_TRUE(PathService::Get(chrome::DIR_USER_DATA, &expected_icon_path)); + ASSERT_TRUE( + base::PathService::Get(chrome::DIR_USER_DATA, &expected_icon_path)); expected_icon_path = expected_icon_path.AppendASCII(KioskAppManager::kIconCacheDir) .AppendASCII(app_id) @@ -413,7 +414,7 @@ EXPECT_EQ(expected_version, crx_version); // Verify the original crx file is identical to the cached file. base::FilePath test_data_dir; - PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir); + base::PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir); std::string src_file_path_str = std::string("chromeos/app_mode/webstore/downloads/") + crx_file_name; base::FilePath src_file_path = test_data_dir.Append(src_file_path_str); @@ -580,7 +581,7 @@ // Copy test crx file to temp dir because the cache moves the file. base::FilePath test_dir; - ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_dir)); + ASSERT_TRUE(base::PathService::Get(chrome::DIR_TEST_DATA, &test_dir)); base::FilePath data_dir = test_dir.AppendASCII("chromeos/app_mode/webstore/downloads/"); base::FilePath crx_file = data_dir.AppendASCII( @@ -718,7 +719,7 @@ EXPECT_TRUE(base::PathExists(new_crx_path)); // Get original version 2 source download crx file path. base::FilePath test_data_dir; - PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir); + base::PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir); base::FilePath v2_file_path = test_data_dir.Append(FILE_PATH_LITERAL( "chromeos/app_mode/webstore/downloads/" "bmbpicmpniaclbbpdkfglgipkkebnbjf_v2_read_and_verify_data.crx"));
diff --git a/chrome/browser/chromeos/app_mode/kiosk_crash_restore_browsertest.cc b/chrome/browser/chromeos/app_mode/kiosk_crash_restore_browsertest.cc index 74fc98b..d25c306 100644 --- a/chrome/browser/chromeos/app_mode/kiosk_crash_restore_browsertest.cc +++ b/chrome/browser/chromeos/app_mode/kiosk_crash_restore_browsertest.cc
@@ -119,7 +119,7 @@ .ToJSON(); base::FilePath local_state_file; - CHECK(PathService::Get(chrome::DIR_USER_DATA, &local_state_file)); + CHECK(base::PathService::Get(chrome::DIR_USER_DATA, &local_state_file)); local_state_file = local_state_file.Append(chrome::kLocalStateFilename); base::WriteFile(local_state_file, local_state_json.data(), local_state_json.size());
diff --git a/chrome/browser/chromeos/arc/arc_support_host_unittest.cc b/chrome/browser/chromeos/arc/arc_support_host_unittest.cc index a2c35d7..6215101 100644 --- a/chrome/browser/chromeos/arc/arc_support_host_unittest.cc +++ b/chrome/browser/chromeos/arc/arc_support_host_unittest.cc
@@ -10,14 +10,14 @@ #include "chrome/browser/chromeos/login/users/fake_chrome_user_manager.h" #include "chrome/browser/consent_auditor/consent_auditor_factory.h" #include "chrome/browser/consent_auditor/consent_auditor_test_utils.h" -#include "chrome/browser/signin/fake_signin_manager_builder.h" +#include "chrome/browser/signin/identity_manager_factory.h" #include "chrome/browser/signin/signin_manager_factory.h" #include "chrome/test/base/browser_with_test_window_test.h" #include "chrome/test/base/testing_profile.h" #include "components/consent_auditor/fake_consent_auditor.h" -#include "components/signin/core/browser/fake_signin_manager.h" #include "components/user_manager/scoped_user_manager.h" #include "content/public/test/test_browser_thread_bundle.h" +#include "services/identity/public/cpp/identity_manager.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" @@ -63,6 +63,8 @@ using MockErrorDelegate = StrictMock<MockErrorDelegateNonStrict>; +} // namespace + class ArcSupportHostTest : public BrowserWithTestWindowTest { public: ArcSupportHostTest() = default; @@ -72,7 +74,9 @@ BrowserWithTestWindowTest::SetUp(); user_manager_enabler_ = std::make_unique<user_manager::ScopedUserManager>( std::make_unique<chromeos::FakeChromeUserManager>()); - signin_manager()->SignIn("testing_account_id"); + IdentityManagerFactory::GetForProfile(profile()) + ->SetPrimaryAccountSynchronously("gaia_id", "testing@account.com", + /*refresh_token=*/std::string()); support_host_ = std::make_unique<ArcSupportHost>(profile()); fake_arc_support_ = std::make_unique<FakeArcSupport>(support_host_.get()); @@ -123,15 +127,9 @@ ConsentAuditorFactory::GetForProfile(profile())); } - FakeSigninManagerBase* signin_manager() { - return static_cast<FakeSigninManagerBase*>( - SigninManagerFactory::GetForProfile(profile())); - } - // BrowserWithTestWindowTest: TestingProfile::TestingFactories GetTestingFactories() override { - return {{SigninManagerFactory::GetInstance(), BuildFakeSigninManagerBase}, - {ConsentAuditorFactory::GetInstance(), BuildFakeConsentAuditor}}; + return {{ConsentAuditorFactory::GetInstance(), BuildFakeConsentAuditor}}; } private: @@ -146,6 +144,8 @@ DISALLOW_COPY_AND_ASSIGN(ArcSupportHostTest); }; +namespace { + TEST_F(ArcSupportHostTest, AuthSucceeded) { MockAuthDelegate* auth_delegate = CreateMockAuthDelegate(); support_host()->SetAuthDelegate(auth_delegate);
diff --git a/chrome/browser/chromeos/arc/optin/arc_terms_of_service_default_negotiator_unittest.cc b/chrome/browser/chromeos/arc/optin/arc_terms_of_service_default_negotiator_unittest.cc index 891925a..f8177edd 100644 --- a/chrome/browser/chromeos/arc/optin/arc_terms_of_service_default_negotiator_unittest.cc +++ b/chrome/browser/chromeos/arc/optin/arc_terms_of_service_default_negotiator_unittest.cc
@@ -16,7 +16,7 @@ #include "chrome/browser/chromeos/login/users/fake_chrome_user_manager.h" #include "chrome/browser/consent_auditor/consent_auditor_factory.h" #include "chrome/browser/consent_auditor/consent_auditor_test_utils.h" -#include "chrome/browser/signin/fake_signin_manager_builder.h" +#include "chrome/browser/signin/identity_manager_factory.h" #include "chrome/browser/signin/signin_manager_factory.h" #include "chrome/grit/generated_resources.h" #include "chrome/test/base/browser_with_test_window_test.h" @@ -25,10 +25,10 @@ #include "components/arc/arc_prefs.h" #include "components/consent_auditor/fake_consent_auditor.h" #include "components/prefs/pref_service.h" -#include "components/signin/core/browser/fake_signin_manager.h" #include "components/sync_preferences/testing_pref_service_syncable.h" #include "components/user_manager/scoped_user_manager.h" #include "content/public/test/test_browser_thread_bundle.h" +#include "services/identity/public/cpp/identity_manager.h" #include "testing/gtest/include/gtest/gtest.h" namespace arc { @@ -43,7 +43,9 @@ BrowserWithTestWindowTest::SetUp(); user_manager_enabler_ = std::make_unique<user_manager::ScopedUserManager>( std::make_unique<chromeos::FakeChromeUserManager>()); - signin_manager()->SignIn("testing_account_id"); + IdentityManagerFactory::GetForProfile(profile()) + ->SetPrimaryAccountSynchronously("gaia_id", "testing@account.com", + /*refresh_token=*/std::string()); support_host_ = std::make_unique<ArcSupportHost>(profile()); fake_arc_support_ = std::make_unique<FakeArcSupport>(support_host_.get()); @@ -69,15 +71,15 @@ ConsentAuditorFactory::GetForProfile(profile())); } - FakeSigninManagerBase* signin_manager() { - return static_cast<FakeSigninManagerBase*>( - SigninManagerFactory::GetForProfile(profile())); + std::string GetAuthenticatedAccountId() { + return IdentityManagerFactory::GetForProfile(profile()) + ->GetPrimaryAccountInfo() + .account_id; } // BrowserWithTestWindowTest: TestingProfile::TestingFactories GetTestingFactories() override { - return {{SigninManagerFactory::GetInstance(), BuildFakeSigninManagerBase}, - {ConsentAuditorFactory::GetInstance(), BuildFakeConsentAuditor}}; + return {{ConsentAuditorFactory::GetInstance(), BuildFakeConsentAuditor}}; } private: @@ -199,8 +201,7 @@ consent_auditor::ConsentStatus::GIVEN, consent_auditor::ConsentStatus::GIVEN, consent_auditor::ConsentStatus::GIVEN}; - EXPECT_EQ(consent_auditor()->account_id(), - signin_manager()->GetAuthenticatedAccountId()); + EXPECT_EQ(consent_auditor()->account_id(), GetAuthenticatedAccountId()); EXPECT_EQ(consent_auditor()->recorded_id_vectors(), consent_ids); EXPECT_EQ(consent_auditor()->recorded_features(), features); EXPECT_EQ(consent_auditor()->recorded_statuses(), statuses); @@ -254,8 +255,7 @@ consent_auditor::Feature::PLAY_STORE}; const std::vector<consent_auditor::ConsentStatus> statuses = { consent_auditor::ConsentStatus::GIVEN}; - EXPECT_EQ(consent_auditor()->account_id(), - signin_manager()->GetAuthenticatedAccountId()); + EXPECT_EQ(consent_auditor()->account_id(), GetAuthenticatedAccountId()); EXPECT_EQ(consent_auditor()->recorded_id_vectors(), consent_ids); EXPECT_EQ(consent_auditor()->recorded_features(), features); EXPECT_EQ(consent_auditor()->recorded_statuses(), statuses); @@ -302,8 +302,7 @@ consent_auditor::Feature::GOOGLE_LOCATION_SERVICE}; const std::vector<consent_auditor::ConsentStatus> statuses = { consent_auditor::ConsentStatus::GIVEN}; - EXPECT_EQ(consent_auditor()->account_id(), - signin_manager()->GetAuthenticatedAccountId()); + EXPECT_EQ(consent_auditor()->account_id(), GetAuthenticatedAccountId()); EXPECT_EQ(consent_auditor()->recorded_id_vectors(), consent_ids); EXPECT_EQ(consent_auditor()->recorded_features(), features); EXPECT_EQ(consent_auditor()->recorded_statuses(), statuses);
diff --git a/chrome/browser/chromeos/assistant/platform_audio_input_host.cc b/chrome/browser/chromeos/assistant/platform_audio_input_host.cc index 3f7a4be..09ae313d 100644 --- a/chrome/browser/chromeos/assistant/platform_audio_input_host.cc +++ b/chrome/browser/chromeos/assistant/platform_audio_input_host.cc
@@ -101,7 +101,6 @@ media::AudioParameters(media::AudioParameters::AUDIO_PCM_LINEAR, media::CHANNEL_LAYOUT_STEREO, 16000 /* 16000 frames per second */, - 32 /* 32 bits per frame */, 1600 /* 1600 (16000 / 10) frames per buffer */), "default" /* device_id */, false /* agc_is_enabled */); }
diff --git a/chrome/browser/chromeos/authpolicy/auth_policy_credentials_manager.cc b/chrome/browser/chromeos/authpolicy/auth_policy_credentials_manager.cc index d81117f..0fe96bec 100644 --- a/chrome/browser/chromeos/authpolicy/auth_policy_credentials_manager.cc +++ b/chrome/browser/chromeos/authpolicy/auth_policy_credentials_manager.cc
@@ -58,7 +58,7 @@ // temporary file and then replaces existing one. void WriteFile(const std::string& file_name, const std::string& blob) { base::FilePath dir; - PathService::Get(base::DIR_HOME, &dir); + base::PathService::Get(base::DIR_HOME, &dir); dir = dir.Append(kKrb5Directory); base::File::Error error; if (!base::CreateDirectoryAndGetError(dir, &error)) { @@ -104,7 +104,7 @@ // Setting environment variables for GSSAPI library. std::unique_ptr<base::Environment> env(base::Environment::Create()); base::FilePath path; - PathService::Get(base::DIR_HOME, &path); + base::PathService::Get(base::DIR_HOME, &path); path = path.Append(kKrb5Directory); env->SetVar(kKrb5CCEnvName, kKrb5CCFilePrefix + path.Append(kKrb5CCFile).value());
diff --git a/chrome/browser/chromeos/chrome_browser_main_chromeos.cc b/chrome/browser/chromeos/chrome_browser_main_chromeos.cc index a7bfd27..3bacb389 100644 --- a/chrome/browser/chromeos/chrome_browser_main_chromeos.cc +++ b/chrome/browser/chromeos/chrome_browser_main_chromeos.cc
@@ -46,8 +46,6 @@ #include "chrome/browser/chromeos/arc/voice_interaction/voice_interaction_controller_client.h" #include "chrome/browser/chromeos/ash_config.h" #include "chrome/browser/chromeos/boot_times_recorder.h" -#include "chrome/browser/chromeos/dbus/chrome_console_service_provider_delegate.h" -#include "chrome/browser/chromeos/dbus/chrome_display_power_service_provider_delegate.h" #include "chrome/browser/chromeos/dbus/chrome_proxy_resolution_service_provider_delegate.h" #include "chrome/browser/chromeos/dbus/chrome_virtual_file_request_service_provider_delegate.h" #include "chrome/browser/chromeos/dbus/component_updater_service_provider.h" @@ -125,9 +123,7 @@ #include "chromeos/dbus/dbus_thread_manager.h" #include "chromeos/dbus/power_policy_controller.h" #include "chromeos/dbus/services/chrome_features_service_provider.h" -#include "chromeos/dbus/services/console_service_provider.h" #include "chromeos/dbus/services/cros_dbus_service.h" -#include "chromeos/dbus/services/display_power_service_provider.h" #include "chromeos/dbus/services/liveness_service_provider.h" #include "chromeos/dbus/services/proxy_resolution_service_provider.h" #include "chromeos/dbus/services/virtual_file_request_service_provider.h" @@ -332,14 +328,7 @@ } CrosDBusService::ServiceProviderList service_providers; - CrosDBusService::ServiceProviderList display_service_providers; - if (GetAshConfig() != ash::Config::MASH) { - // TODO(lannm): This will eventually be served by mus-ws. - display_service_providers.push_back( - std::make_unique<DisplayPowerServiceProvider>( - std::make_unique<ChromeDisplayPowerServiceProviderDelegate>())); - } // TODO(derat): Remove this provider once all callers are using // |liveness_service_| instead: https://crbug.com/644322 service_providers.push_back( @@ -349,10 +338,6 @@ service_providers.push_back(std::make_unique<ScreenLockServiceProvider>( kLibCrosServiceInterface, kLockScreen)); - display_service_providers.push_back( - std::make_unique<ConsoleServiceProvider>( - &console_service_provider_delegate_)); - // TODO(derat): Remove this provider once all callers are using // |kiosk_info_service_| instead: https://crbug.com/703229 service_providers.push_back(std::make_unique<KioskInfoService>( @@ -361,10 +346,6 @@ kLibCrosServiceName, dbus::ObjectPath(kLibCrosServicePath), std::move(service_providers)); - display_service_ = CrosDBusService::Create( - kDisplayServiceName, dbus::ObjectPath(kDisplayServicePath), - std::move(display_service_providers)); - proxy_resolution_service_ = CrosDBusService::Create( kNetworkProxyServiceName, dbus::ObjectPath(kNetworkProxyServicePath), CrosDBusService::CreateServiceProviderList( @@ -458,7 +439,6 @@ CertLoader::Shutdown(); TPMTokenLoader::Shutdown(); cros_dbus_service_.reset(); - display_service_.reset(); proxy_resolution_service_.reset(); kiosk_info_service_.reset(); liveness_service_.reset(); @@ -473,11 +453,6 @@ bluez::BluezDBusManager::Shutdown(); } - void ServiceManagerConnectionStarted( - content::ServiceManagerConnection* connection) { - console_service_provider_delegate_.Connect(connection->GetConnector()); - } - private: // Hosts providers for the "org.chromium.LibCrosService" D-Bus service owned // by Chrome. The name of this service was chosen for historical reasons that @@ -486,7 +461,6 @@ // split between different processes: http://crbug.com/692246 std::unique_ptr<CrosDBusService> cros_dbus_service_; - std::unique_ptr<CrosDBusService> display_service_; std::unique_ptr<CrosDBusService> proxy_resolution_service_; std::unique_ptr<CrosDBusService> kiosk_info_service_; std::unique_ptr<CrosDBusService> liveness_service_; @@ -496,8 +470,6 @@ std::unique_ptr<CrosDBusService> finch_features_service_; std::unique_ptr<CrosDBusService> vm_applications_service_; - ChromeConsoleServiceProviderDelegate console_service_provider_delegate_; - DISALLOW_COPY_AND_ASSIGN(DBusServices); }; @@ -682,12 +654,6 @@ ChromeBrowserMainPartsLinux::PostMainMessageLoopStart(); } -void ChromeBrowserMainPartsChromeos::ServiceManagerConnectionStarted( - content::ServiceManagerConnection* connection) { - ChromeBrowserMainPartsLinux::ServiceManagerConnectionStarted(connection); - dbus_services_->ServiceManagerConnectionStarted(connection); -} - // Threads are initialized between MainMessageLoopStart and MainMessageLoopRun. // about_flags settings are applied in ChromeBrowserMainParts::PreCreateThreads. void ChromeBrowserMainPartsChromeos::PreMainMessageLoopRun() { @@ -720,7 +686,8 @@ load_oem_statistics); base::FilePath downloads_directory; - CHECK(PathService::Get(chrome::DIR_DEFAULT_DOWNLOADS, &downloads_directory)); + CHECK(base::PathService::Get(chrome::DIR_DEFAULT_DOWNLOADS, + &downloads_directory)); DeviceOAuth2TokenServiceFactory::Initialize();
diff --git a/chrome/browser/chromeos/chrome_browser_main_chromeos.h b/chrome/browser/chromeos/chrome_browser_main_chromeos.h index 9138a1b..6860dec 100644 --- a/chrome/browser/chromeos/chrome_browser_main_chromeos.h +++ b/chrome/browser/chromeos/chrome_browser_main_chromeos.h
@@ -78,8 +78,6 @@ int PreEarlyInitialization() override; void PreMainMessageLoopStart() override; void PostMainMessageLoopStart() override; - void ServiceManagerConnectionStarted( - content::ServiceManagerConnection* connection) override; void PreMainMessageLoopRun() override; // Stages called from PreMainMessageLoopRun.
diff --git a/chrome/browser/chromeos/customization/customization_document.cc b/chrome/browser/chromeos/customization/customization_document.cc index d7b21d5..f8fd293 100644 --- a/chrome/browser/chromeos/customization/customization_document.cc +++ b/chrome/browser/chromeos/customization/customization_document.cc
@@ -485,8 +485,8 @@ // static base::FilePath ServicesCustomizationDocument::GetCustomizedWallpaperCacheDir() { base::FilePath custom_wallpaper_dir; - if (!PathService::Get(chrome::DIR_CHROMEOS_CUSTOM_WALLPAPERS, - &custom_wallpaper_dir)) { + if (!base::PathService::Get(chrome::DIR_CHROMEOS_CUSTOM_WALLPAPERS, + &custom_wallpaper_dir)) { LOG(DFATAL) << "Unable to get custom wallpaper dir."; return base::FilePath(); }
diff --git a/chrome/browser/chromeos/dbus/chrome_console_service_provider_delegate.cc b/chrome/browser/chromeos/dbus/chrome_console_service_provider_delegate.cc deleted file mode 100644 index 410c33c..0000000 --- a/chrome/browser/chromeos/dbus/chrome_console_service_provider_delegate.cc +++ /dev/null
@@ -1,40 +0,0 @@ -// Copyright 2014 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "chrome/browser/chromeos/dbus/chrome_console_service_provider_delegate.h" - -#include "ash/public/interfaces/constants.mojom.h" -#include "services/service_manager/public/cpp/connector.h" -#include "ui/display/manager/display_configurator.h" - -namespace chromeos { - -ChromeConsoleServiceProviderDelegate::ChromeConsoleServiceProviderDelegate() {} - -ChromeConsoleServiceProviderDelegate::~ChromeConsoleServiceProviderDelegate() {} - -void ChromeConsoleServiceProviderDelegate::Connect( - service_manager::Connector* connector) { - connector->BindInterface(ash::mojom::kServiceName, &ash_display_controller_); -} - -void ChromeConsoleServiceProviderDelegate::TakeDisplayOwnership( - const UpdateOwnershipCallback& callback) { - if (!ash_display_controller_) { - callback.Run(false); - return; - } - ash_display_controller_->TakeDisplayControl(callback); -} - -void ChromeConsoleServiceProviderDelegate::ReleaseDisplayOwnership( - const UpdateOwnershipCallback& callback) { - if (!ash_display_controller_) { - callback.Run(false); - return; - } - ash_display_controller_->RelinquishDisplayControl(callback); -} - -} // namespace chromeos
diff --git a/chrome/browser/chromeos/dbus/chrome_console_service_provider_delegate.h b/chrome/browser/chromeos/dbus/chrome_console_service_provider_delegate.h deleted file mode 100644 index 464b7725..0000000 --- a/chrome/browser/chromeos/dbus/chrome_console_service_provider_delegate.h +++ /dev/null
@@ -1,40 +0,0 @@ -// Copyright 2014 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef CHROME_BROWSER_CHROMEOS_DBUS_CHROME_CONSOLE_SERVICE_PROVIDER_DELEGATE_H_ -#define CHROME_BROWSER_CHROMEOS_DBUS_CHROME_CONSOLE_SERVICE_PROVIDER_DELEGATE_H_ - -#include "ash/public/interfaces/ash_display_controller.mojom.h" -#include "base/macros.h" -#include "chromeos/dbus/services/console_service_provider.h" - -namespace service_manager { -class Connector; -} - -namespace chromeos { - -// Chrome's implementation of ConsoleServiceProvider::Delegate -class ChromeConsoleServiceProviderDelegate - : public ConsoleServiceProvider::Delegate { - public: - ChromeConsoleServiceProviderDelegate(); - ~ChromeConsoleServiceProviderDelegate() override; - - void Connect(service_manager::Connector* connector); - - // ConsoleServiceProvider::Delegate overrides: - void TakeDisplayOwnership(const UpdateOwnershipCallback& callback) override; - void ReleaseDisplayOwnership( - const UpdateOwnershipCallback& callback) override; - - private: - ash::mojom::AshDisplayControllerPtr ash_display_controller_; - - DISALLOW_COPY_AND_ASSIGN(ChromeConsoleServiceProviderDelegate); -}; - -} // namespace chromeos - -#endif // CHROME_BROWSER_CHROMEOS_DBUS_CHROME_CONSOLE_SERVICE_PROVIDER_DELEGATE_H_
diff --git a/chrome/browser/chromeos/dbus/chrome_display_power_service_provider_delegate.cc b/chrome/browser/chromeos/dbus/chrome_display_power_service_provider_delegate.cc deleted file mode 100644 index 32f31e2d8..0000000 --- a/chrome/browser/chromeos/dbus/chrome_display_power_service_provider_delegate.cc +++ /dev/null
@@ -1,44 +0,0 @@ -// Copyright 2014 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "chrome/browser/chromeos/dbus/chrome_display_power_service_provider_delegate.h" - -#include "ash/shell.h" -#include "ash/wm/screen_dimmer.h" -#include "ui/base/user_activity/user_activity_detector.h" -#include "ui/display/manager/display_configurator.h" - -namespace chromeos { - -ChromeDisplayPowerServiceProviderDelegate:: -ChromeDisplayPowerServiceProviderDelegate() { -} - -ChromeDisplayPowerServiceProviderDelegate:: -~ChromeDisplayPowerServiceProviderDelegate() { -} - -void ChromeDisplayPowerServiceProviderDelegate::SetDisplayPower( - DisplayPowerState power_state, - const ResponseCallback& callback) { - // Turning displays off when the device becomes idle or on just before - // we suspend may trigger a mouse move, which would then be incorrectly - // reported as user activity. Let the UserActivityDetector - // know so that it can ignore such events. - ui::UserActivityDetector::Get()->OnDisplayPowerChanging(); - - ash::Shell::Get()->display_configurator()->SetDisplayPower( - power_state, display::DisplayConfigurator::kSetDisplayPowerNoFlags, - callback); -} - -void ChromeDisplayPowerServiceProviderDelegate::SetDimming(bool dimmed) { - if (!screen_dimmer_) { - screen_dimmer_ = - std::make_unique<ash::ScreenDimmer>(ash::ScreenDimmer::Container::ROOT); - } - screen_dimmer_->SetDimming(dimmed); -} - -} // namespace chromeos
diff --git a/chrome/browser/chromeos/dbus/chrome_display_power_service_provider_delegate.h b/chrome/browser/chromeos/dbus/chrome_display_power_service_provider_delegate.h deleted file mode 100644 index 5b85f214..0000000 --- a/chrome/browser/chromeos/dbus/chrome_display_power_service_provider_delegate.h +++ /dev/null
@@ -1,39 +0,0 @@ -// Copyright 2014 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef CHROME_BROWSER_CHROMEOS_DBUS_CHROME_DISPLAY_POWER_SERVICE_PROVIDER_DELEGATE_H_ -#define CHROME_BROWSER_CHROMEOS_DBUS_CHROME_DISPLAY_POWER_SERVICE_PROVIDER_DELEGATE_H_ - -#include <memory> - -#include "base/macros.h" -#include "chromeos/dbus/services/display_power_service_provider.h" - -namespace ash { -class ScreenDimmer; -} - -namespace chromeos { - -// Chrome's implementation of DisplayPowerServiceProvider::Delegate -class ChromeDisplayPowerServiceProviderDelegate - : public DisplayPowerServiceProvider::Delegate { - public: - ChromeDisplayPowerServiceProviderDelegate(); - ~ChromeDisplayPowerServiceProviderDelegate() override; - - // DisplayPowerServiceProvider::Delegate overrides: - void SetDisplayPower(DisplayPowerState power_state, - const ResponseCallback& callback) override; - void SetDimming(bool dimmed) override; - - private: - std::unique_ptr<ash::ScreenDimmer> screen_dimmer_; - - DISALLOW_COPY_AND_ASSIGN(ChromeDisplayPowerServiceProviderDelegate); -}; - -} // namespace chromeos - -#endif // CHROME_BROWSER_CHROMEOS_DBUS_CHROME_DISPLAY_POWER_SERVICE_PROVIDER_DELEGATE_H_
diff --git a/chrome/browser/chromeos/display/quirks_manager_delegate_impl.cc b/chrome/browser/chromeos/display/quirks_manager_delegate_impl.cc index 6cf53b41..d5b6c0b 100644 --- a/chrome/browser/chromeos/display/quirks_manager_delegate_impl.cc +++ b/chrome/browser/chromeos/display/quirks_manager_delegate_impl.cc
@@ -28,9 +28,9 @@ base::FilePath QuirksManagerDelegateImpl::GetDisplayProfileDirectory() const { base::FilePath directory; if (base::SysInfo::IsRunningOnChromeOS()) { - PathService::Get(chromeos::DIR_DEVICE_DISPLAY_PROFILES, &directory); + base::PathService::Get(chromeos::DIR_DEVICE_DISPLAY_PROFILES, &directory); } else { - PathService::Get(chrome::DIR_USER_DATA, &directory); + base::PathService::Get(chrome::DIR_USER_DATA, &directory); directory = directory.Append(kUserDataDisplayProfilesDirectory); } return directory;
diff --git a/chrome/browser/chromeos/extensions/default_app_order.cc b/chrome/browser/chromeos/extensions/default_app_order.cc index dc0698e..d0c13c9 100644 --- a/chrome/browser/chromeos/extensions/default_app_order.cc +++ b/chrome/browser/chromeos/extensions/default_app_order.cc
@@ -163,7 +163,8 @@ void ExternalLoader::Load() { base::FilePath ordinals_file; - CHECK(PathService::Get(chromeos::FILE_DEFAULT_APP_ORDER, &ordinals_file)); + CHECK( + base::PathService::Get(chromeos::FILE_DEFAULT_APP_ORDER, &ordinals_file)); std::unique_ptr<base::ListValue> ordinals_value = ReadExternalOrdinalFile(ordinals_file);
diff --git a/chrome/browser/chromeos/extensions/device_local_account_external_policy_loader_unittest.cc b/chrome/browser/chromeos/extensions/device_local_account_external_policy_loader_unittest.cc index d175c96..6d5a2933 100644 --- a/chrome/browser/chromeos/extensions/device_local_account_external_policy_loader_unittest.cc +++ b/chrome/browser/chromeos/extensions/device_local_account_external_policy_loader_unittest.cc
@@ -147,7 +147,7 @@ new net::TestURLRequestContextGetter(base::ThreadTaskRunnerHandle::Get()); TestingBrowserProcess::GetGlobal()->SetSystemRequestContext( request_context_getter_.get()); - ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_dir_)); + ASSERT_TRUE(base::PathService::Get(chrome::DIR_TEST_DATA, &test_dir_)); loader_ = new DeviceLocalAccountExternalPolicyLoader(&store_, cache_dir_); provider_.reset(new extensions::ExternalProviderImpl(
diff --git a/chrome/browser/chromeos/extensions/wallpaper_private_api.cc b/chrome/browser/chromeos/extensions/wallpaper_private_api.cc index 9a92275..f07a4ed 100644 --- a/chrome/browser/chromeos/extensions/wallpaper_private_api.cc +++ b/chrome/browser/chromeos/extensions/wallpaper_private_api.cc
@@ -114,7 +114,7 @@ const std::string& file_name, const std::vector<char>& data) { base::FilePath data_dir; - CHECK(PathService::Get(key, &data_dir)); + CHECK(base::PathService::Get(key, &data_dir)); if (!base::DirectoryExists(data_dir) && !base::CreateDirectory(data_dir)) { return false; @@ -515,8 +515,8 @@ base::FilePath thumbnail_path; if (params->source == wallpaper_private::WALLPAPER_SOURCE_ONLINE) { std::string file_name = GURL(params->url_or_file).ExtractFileName(); - CHECK(PathService::Get(chrome::DIR_CHROMEOS_WALLPAPER_THUMBNAILS, - &thumbnail_path)); + CHECK(base::PathService::Get(chrome::DIR_CHROMEOS_WALLPAPER_THUMBNAILS, + &thumbnail_path)); thumbnail_path = thumbnail_path.Append(file_name); } else { if (!IsOEMDefaultWallpaper())
diff --git a/chrome/browser/chromeos/file_manager/external_filesystem_apitest.cc b/chrome/browser/chromeos/file_manager/external_filesystem_apitest.cc index d323af4..d6bcee5 100644 --- a/chrome/browser/chromeos/file_manager/external_filesystem_apitest.cc +++ b/chrome/browser/chromeos/file_manager/external_filesystem_apitest.cc
@@ -516,7 +516,7 @@ void SetUpOnMainThread() override { base::FilePath user_data_directory; - PathService::Get(chrome::DIR_USER_DATA, &user_data_directory); + base::PathService::Get(chrome::DIR_USER_DATA, &user_data_directory); session_manager::SessionManager::Get()->CreateSession( AccountId::FromUserEmailGaiaId(kSecondProfileAccount, kSecondProfileGiaId),
diff --git a/chrome/browser/chromeos/file_manager/file_manager_browsertest_base.cc b/chrome/browser/chromeos/file_manager/file_manager_browsertest_base.cc index d4443b8..311a1cf5 100644 --- a/chrome/browser/chromeos/file_manager/file_manager_browsertest_base.cc +++ b/chrome/browser/chromeos/file_manager/file_manager_browsertest_base.cc
@@ -138,7 +138,14 @@ // Target volume to add |entries| to. TargetVolume volume; - // Registers the member information to the given converter. + // Converts |value| to an AddEntriesMessage: true on success. + static bool ConvertJSONValue(const base::DictionaryValue& value, + AddEntriesMessage* message) { + base::JSONValueConverter<AddEntriesMessage> converter; + return converter.Convert(value, message); + } + + // Registers AddEntriesMessage member info to the |converter|. static void RegisterJSONConverter( base::JSONValueConverter<AddEntriesMessage>* converter) { converter->RegisterCustomField("volume", &AddEntriesMessage::volume, @@ -247,7 +254,7 @@ static base::FilePath GetTestDataFilePath(const std::string& file_name) { // Get the path to file manager's test data directory. base::FilePath source_dir; - CHECK(PathService::Get(base::DIR_SOURCE_ROOT, &source_dir)); + CHECK(base::PathService::Get(base::DIR_SOURCE_ROOT, &source_dir)); auto test_data_dir = source_dir.AppendASCII("chrome") .AppendASCII("test") .AppendASCII("data") @@ -614,7 +621,7 @@ void FileManagerBrowserTestBase::LaunchExtension(const base::FilePath& path, const char* manifest_name) { base::FilePath source_dir; - CHECK(PathService::Get(base::DIR_SOURCE_ROOT, &source_dir)); + CHECK(base::PathService::Get(base::DIR_SOURCE_ROOT, &source_dir)); const base::FilePath source_path = source_dir.Append(path); const extensions::Extension* const extension_launched = @@ -707,10 +714,9 @@ } if (name == "addEntries") { - // Add entries to the specified volume. - base::JSONValueConverter<AddEntriesMessage> add_entries_message_converter; + // Add the message.entries to the message.volume. AddEntriesMessage message; - ASSERT_TRUE(add_entries_message_converter.Convert(value, &message)); + ASSERT_TRUE(AddEntriesMessage::ConvertJSONValue(value, &message)); for (size_t i = 0; i < message.entries.size(); ++i) { switch (message.volume) { @@ -725,9 +731,6 @@ if (usb_volume_) usb_volume_->CreateEntry(*message.entries[i]); break; - default: - NOTREACHED(); - break; } } @@ -765,7 +768,7 @@ ASSERT_TRUE(value.GetString("extensionId", &extension_id)); ASSERT_TRUE(value.GetString("notificationId", ¬ification_id)); - const auto delegate_id = extension_id + "-" + notification_id; + const std::string delegate_id = extension_id + "-" + notification_id; base::Optional<message_center::Notification> notification = display_service_->GetNotification(delegate_id); EXPECT_TRUE(notification);
diff --git a/chrome/browser/chromeos/file_manager/file_manager_jstest_base.cc b/chrome/browser/chromeos/file_manager/file_manager_jstest_base.cc index 79d1cbc..6702e88 100644 --- a/chrome/browser/chromeos/file_manager/file_manager_jstest_base.cc +++ b/chrome/browser/chromeos/file_manager/file_manager_jstest_base.cc
@@ -18,7 +18,7 @@ void FileManagerJsTestBase::RunTest(const base::FilePath& file) { base::FilePath root_path; - ASSERT_TRUE(PathService::Get(base::DIR_SOURCE_ROOT, &root_path)); + ASSERT_TRUE(base::PathService::Get(base::DIR_SOURCE_ROOT, &root_path)); const GURL url = net::FilePathToFileURL( root_path.Append(base_path_)
diff --git a/chrome/browser/chromeos/file_manager/file_manager_uitest.cc b/chrome/browser/chromeos/file_manager/file_manager_uitest.cc index ab4d2af..7aaa1d0 100644 --- a/chrome/browser/chromeos/file_manager/file_manager_uitest.cc +++ b/chrome/browser/chromeos/file_manager/file_manager_uitest.cc
@@ -25,7 +25,7 @@ void RunTest() { base::FilePath root_path; - ASSERT_TRUE(PathService::Get(base::DIR_SOURCE_ROOT, &root_path)); + ASSERT_TRUE(base::PathService::Get(base::DIR_SOURCE_ROOT, &root_path)); // Load test.html. const GURL url = net::FilePathToFileURL(root_path.Append(
diff --git a/chrome/browser/chromeos/file_manager/open_with_browser.cc b/chrome/browser/chromeos/file_manager/open_with_browser.cc index 9a7199d..895fd55f 100644 --- a/chrome/browser/chromeos/file_manager/open_with_browser.cc +++ b/chrome/browser/chromeos/file_manager/open_with_browser.cc
@@ -94,7 +94,7 @@ base::CommandLine::ForCurrentProcess()->GetSwitchValueNative( switches::kPpapiFlashPath)); if (plugin_path.empty()) - PathService::Get(chrome::FILE_PEPPER_FLASH_PLUGIN, &plugin_path); + base::PathService::Get(chrome::FILE_PEPPER_FLASH_PLUGIN, &plugin_path); return IsPepperPluginEnabled(profile, plugin_path); }
diff --git a/chrome/browser/chromeos/first_run/drive_first_run_browsertest.cc b/chrome/browser/chromeos/first_run/drive_first_run_browsertest.cc index e55e01da..efe4580 100644 --- a/chrome/browser/chromeos/first_run/drive_first_run_browsertest.cc +++ b/chrome/browser/chromeos/first_run/drive_first_run_browsertest.cc
@@ -87,7 +87,7 @@ success_(false) {} void DriveFirstRunTest::SetUpOnMainThread() { - PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir_); + base::PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir_); test_data_dir_ = test_data_dir_.AppendASCII(kTestDirectory); host_resolver()->AddRule("example.com", "127.0.0.1");
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 1fd028f59..63dc47f1 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
@@ -341,7 +341,7 @@ if (!component_ime.path.IsAbsolute()) { base::FilePath resources_path; - if (!PathService::Get(chrome::DIR_RESOURCES, &resources_path)) + if (!base::PathService::Get(chrome::DIR_RESOURCES, &resources_path)) NOTREACHED(); component_ime.path = resources_path.Append(component_ime.path); }
diff --git a/chrome/browser/chromeos/input_method/input_method_engine_browsertests.cc b/chrome/browser/chromeos/input_method/input_method_engine_browsertests.cc index 49cc595..025e08c1 100644 --- a/chrome/browser/chromeos/input_method/input_method_engine_browsertests.cc +++ b/chrome/browser/chromeos/input_method/input_method_engine_browsertests.cc
@@ -184,7 +184,7 @@ false); ui::IMEEngineHandlerInterface::InputContext context( ui::TEXT_INPUT_TYPE_TEXT, ui::TEXT_INPUT_MODE_DEFAULT, - ui::TEXT_INPUT_FLAG_NONE); + ui::TEXT_INPUT_FLAG_NONE, ui::TextInputClient::FOCUS_REASON_OTHER); engine_handler->FocusIn(context); ASSERT_TRUE(focus_listener.WaitUntilSatisfied()); ASSERT_TRUE(focus_listener.was_satisfied()); @@ -265,7 +265,7 @@ engine_handler->Enable("APIArgumentIME"); ui::IMEEngineHandlerInterface::InputContext context( ui::TEXT_INPUT_TYPE_TEXT, ui::TEXT_INPUT_MODE_DEFAULT, - ui::TEXT_INPUT_FLAG_NONE); + ui::TEXT_INPUT_FLAG_NONE, ui::TextInputClient::FOCUS_REASON_OTHER); engine_handler->FocusIn(context); { @@ -942,7 +942,7 @@ false); ui::IMEEngineHandlerInterface::InputContext context( ui::TEXT_INPUT_TYPE_TEXT, ui::TEXT_INPUT_MODE_DEFAULT, - ui::TEXT_INPUT_FLAG_NONE); + ui::TEXT_INPUT_FLAG_NONE, ui::TextInputClient::FOCUS_REASON_OTHER); engine_handler->FocusIn(context); ASSERT_TRUE(focus_listener.WaitUntilSatisfied()); ASSERT_TRUE(focus_listener.was_satisfied()); @@ -952,7 +952,7 @@ "onFocus:search:true:true:true", false); ui::IMEEngineHandlerInterface::InputContext context( ui::TEXT_INPUT_TYPE_SEARCH, ui::TEXT_INPUT_MODE_DEFAULT, - ui::TEXT_INPUT_FLAG_NONE); + ui::TEXT_INPUT_FLAG_NONE, ui::TextInputClient::FOCUS_REASON_OTHER); engine_handler->FocusIn(context); ASSERT_TRUE(focus_listener.WaitUntilSatisfied()); ASSERT_TRUE(focus_listener.was_satisfied()); @@ -962,7 +962,7 @@ false); ui::IMEEngineHandlerInterface::InputContext context( ui::TEXT_INPUT_TYPE_TELEPHONE, ui::TEXT_INPUT_MODE_DEFAULT, - ui::TEXT_INPUT_FLAG_NONE); + ui::TEXT_INPUT_FLAG_NONE, ui::TextInputClient::FOCUS_REASON_OTHER); engine_handler->FocusIn(context); ASSERT_TRUE(focus_listener.WaitUntilSatisfied()); ASSERT_TRUE(focus_listener.was_satisfied()); @@ -972,7 +972,7 @@ false); ui::IMEEngineHandlerInterface::InputContext context( ui::TEXT_INPUT_TYPE_URL, ui::TEXT_INPUT_MODE_DEFAULT, - ui::TEXT_INPUT_FLAG_NONE); + ui::TEXT_INPUT_FLAG_NONE, ui::TextInputClient::FOCUS_REASON_OTHER); engine_handler->FocusIn(context); ASSERT_TRUE(focus_listener.WaitUntilSatisfied()); ASSERT_TRUE(focus_listener.was_satisfied()); @@ -982,7 +982,7 @@ "onFocus:email:true:true:true", false); ui::IMEEngineHandlerInterface::InputContext context( ui::TEXT_INPUT_TYPE_EMAIL, ui::TEXT_INPUT_MODE_DEFAULT, - ui::TEXT_INPUT_FLAG_NONE); + ui::TEXT_INPUT_FLAG_NONE, ui::TextInputClient::FOCUS_REASON_OTHER); engine_handler->FocusIn(context); ASSERT_TRUE(focus_listener.WaitUntilSatisfied()); ASSERT_TRUE(focus_listener.was_satisfied()); @@ -992,7 +992,7 @@ "onFocus:number:true:true:true", false); ui::IMEEngineHandlerInterface::InputContext context( ui::TEXT_INPUT_TYPE_NUMBER, ui::TEXT_INPUT_MODE_DEFAULT, - ui::TEXT_INPUT_FLAG_NONE); + ui::TEXT_INPUT_FLAG_NONE, ui::TextInputClient::FOCUS_REASON_OTHER); engine_handler->FocusIn(context); ASSERT_TRUE(focus_listener.WaitUntilSatisfied()); ASSERT_TRUE(focus_listener.was_satisfied()); @@ -1094,7 +1094,7 @@ "onFocus:text:false:false:false", false); ui::IMEEngineHandlerInterface::InputContext context( ui::TEXT_INPUT_TYPE_TEXT, ui::TEXT_INPUT_MODE_DEFAULT, - ui::TEXT_INPUT_FLAG_NONE); + ui::TEXT_INPUT_FLAG_NONE, ui::TextInputClient::FOCUS_REASON_OTHER); engine_handler->FocusIn(context); ASSERT_TRUE(focus_listener.WaitUntilSatisfied()); ASSERT_TRUE(focus_listener.was_satisfied()); @@ -1106,7 +1106,7 @@ "onFocus:password:false:false:false", false); ui::IMEEngineHandlerInterface::InputContext context( ui::TEXT_INPUT_TYPE_PASSWORD, ui::TEXT_INPUT_MODE_DEFAULT, - ui::TEXT_INPUT_FLAG_NONE); + ui::TEXT_INPUT_FLAG_NONE, ui::TextInputClient::FOCUS_REASON_OTHER); engine_handler->FocusIn(context); ASSERT_TRUE(focus_listener.WaitUntilSatisfied()); ASSERT_TRUE(focus_listener.was_satisfied()); @@ -1118,7 +1118,7 @@ false); ui::IMEEngineHandlerInterface::InputContext context( ui::TEXT_INPUT_TYPE_URL, ui::TEXT_INPUT_MODE_DEFAULT, - ui::TEXT_INPUT_FLAG_NONE); + ui::TEXT_INPUT_FLAG_NONE, ui::TextInputClient::FOCUS_REASON_OTHER); engine_handler->FocusIn(context); ASSERT_TRUE(focus_listener.WaitUntilSatisfied()); ASSERT_TRUE(focus_listener.was_satisfied()); @@ -1130,7 +1130,7 @@ "onFocus:search:false:false:false", false); ui::IMEEngineHandlerInterface::InputContext context( ui::TEXT_INPUT_TYPE_SEARCH, ui::TEXT_INPUT_MODE_DEFAULT, - ui::TEXT_INPUT_FLAG_NONE); + ui::TEXT_INPUT_FLAG_NONE, ui::TextInputClient::FOCUS_REASON_OTHER); engine_handler->FocusIn(context); ASSERT_TRUE(focus_listener.WaitUntilSatisfied()); ASSERT_TRUE(focus_listener.was_satisfied()); @@ -1142,7 +1142,7 @@ "onFocus:email:false:false:false", false); ui::IMEEngineHandlerInterface::InputContext context( ui::TEXT_INPUT_TYPE_EMAIL, ui::TEXT_INPUT_MODE_DEFAULT, - ui::TEXT_INPUT_FLAG_NONE); + ui::TEXT_INPUT_FLAG_NONE, ui::TextInputClient::FOCUS_REASON_OTHER); engine_handler->FocusIn(context); ASSERT_TRUE(focus_listener.WaitUntilSatisfied()); ASSERT_TRUE(focus_listener.was_satisfied()); @@ -1154,7 +1154,7 @@ "onFocus:number:false:false:false", false); ui::IMEEngineHandlerInterface::InputContext context( ui::TEXT_INPUT_TYPE_NUMBER, ui::TEXT_INPUT_MODE_DEFAULT, - ui::TEXT_INPUT_FLAG_NONE); + ui::TEXT_INPUT_FLAG_NONE, ui::TextInputClient::FOCUS_REASON_OTHER); engine_handler->FocusIn(context); ASSERT_TRUE(focus_listener.WaitUntilSatisfied()); ASSERT_TRUE(focus_listener.was_satisfied()); @@ -1166,7 +1166,7 @@ false); ui::IMEEngineHandlerInterface::InputContext context( ui::TEXT_INPUT_TYPE_TELEPHONE, ui::TEXT_INPUT_MODE_DEFAULT, - ui::TEXT_INPUT_FLAG_NONE); + ui::TEXT_INPUT_FLAG_NONE, ui::TextInputClient::FOCUS_REASON_OTHER); engine_handler->FocusIn(context); ASSERT_TRUE(focus_listener.WaitUntilSatisfied()); ASSERT_TRUE(focus_listener.was_satisfied());
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 dc40ce66..bfed21db 100644 --- a/chrome/browser/chromeos/input_method/input_method_engine_unittest.cc +++ b/chrome/browser/chromeos/input_method/input_method_engine_unittest.cc
@@ -166,7 +166,8 @@ void FocusIn(ui::TextInputType input_type) { ui::IMEEngineHandlerInterface::InputContext input_context( - input_type, ui::TEXT_INPUT_MODE_DEFAULT, ui::TEXT_INPUT_FLAG_NONE); + input_type, ui::TEXT_INPUT_MODE_DEFAULT, ui::TEXT_INPUT_FLAG_NONE, + ui::TextInputClient::FOCUS_REASON_OTHER); engine_->FocusIn(input_context); ui::IMEBridge::Get()->SetCurrentInputContext(input_context); }
diff --git a/chrome/browser/chromeos/login/active_directory_login_browsertest.cc b/chrome/browser/chromeos/login/active_directory_login_browsertest.cc index 2bf07d9..2bb986e6 100644 --- a/chrome/browser/chromeos/login/active_directory_login_browsertest.cc +++ b/chrome/browser/chromeos/login/active_directory_login_browsertest.cc
@@ -111,7 +111,7 @@ void SetUpInProcessBrowserTestFixture() override { LoginManagerTest::SetUpInProcessBrowserTestFixture(); base::FilePath user_data_dir; - ASSERT_TRUE(PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)); + ASSERT_TRUE(base::PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)); chromeos::RegisterStubPathOverrides(user_data_dir); DBusThreadManager::GetSetterForTesting()->SetCryptohomeClient( std::make_unique<FakeCryptohomeClient>());
diff --git a/chrome/browser/chromeos/login/auto_launched_kiosk_browsertest.cc b/chrome/browser/chromeos/login/auto_launched_kiosk_browsertest.cc index 7305e1a..f004f47 100644 --- a/chrome/browser/chromeos/login/auto_launched_kiosk_browsertest.cc +++ b/chrome/browser/chromeos/login/auto_launched_kiosk_browsertest.cc
@@ -321,7 +321,7 @@ InitDevicePolicy(); base::FilePath user_data_path; - if (!PathService::Get(chrome::DIR_USER_DATA, &user_data_path)) { + if (!base::PathService::Get(chrome::DIR_USER_DATA, &user_data_path)) { ADD_FAILURE() << "Unable to get used data dir"; return false; }
diff --git a/chrome/browser/chromeos/login/demo_mode/demo_app_launcher_browsertest.cc b/chrome/browser/chromeos/login/demo_mode/demo_app_launcher_browsertest.cc index 8ae0467..0db0930 100644 --- a/chrome/browser/chromeos/login/demo_mode/demo_app_launcher_browsertest.cc +++ b/chrome/browser/chromeos/login/demo_mode/demo_app_launcher_browsertest.cc
@@ -30,7 +30,7 @@ base::FilePath GetTestDemoAppPath() { base::FilePath test_data_dir; - EXPECT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir)); + EXPECT_TRUE(base::PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir)); return test_data_dir.Append(FILE_PATH_LITERAL("chromeos/demo_app")); }
diff --git a/chrome/browser/chromeos/login/enable_debugging_browsertest.cc b/chrome/browser/chromeos/login/enable_debugging_browsertest.cc index 1b90b85..1bc64bb 100644 --- a/chrome/browser/chromeos/login/enable_debugging_browsertest.cc +++ b/chrome/browser/chromeos/login/enable_debugging_browsertest.cc
@@ -376,7 +376,7 @@ local_state_dict.SetBoolean(prefs::kDebuggingFeaturesRequested, true); base::FilePath user_data_dir; - CHECK(PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)); + CHECK(base::PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)); base::FilePath local_state_path = user_data_dir.Append(chrome::kLocalStateFilename); CHECK(
diff --git a/chrome/browser/chromeos/login/kiosk_browsertest.cc b/chrome/browser/chromeos/login/kiosk_browsertest.cc index d14dfa2..f7cc1a3 100644 --- a/chrome/browser/chromeos/login/kiosk_browsertest.cc +++ b/chrome/browser/chromeos/login/kiosk_browsertest.cc
@@ -1413,7 +1413,7 @@ void SetupFakeDiskMountManagerMountPath(const std::string& mount_path) { base::FilePath test_data_dir; - PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir); + base::PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir); test_data_dir = test_data_dir.AppendASCII(mount_path); fake_disk_mount_manager_->set_usb_mount_path(test_data_dir.value()); } @@ -2269,7 +2269,7 @@ // |private_server| serves crx from test data dir. base::FilePath test_data_dir; - PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir); + base::PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir); private_server.ServeFilesFromDirectory(test_data_dir); ASSERT_TRUE(private_server.InitializeAndListen());
diff --git a/chrome/browser/chromeos/login/login_manager_test.cc b/chrome/browser/chromeos/login/login_manager_test.cc index 5bf865f..5a1d61d9 100644 --- a/chrome/browser/chromeos/login/login_manager_test.cc +++ b/chrome/browser/chromeos/login/login_manager_test.cc
@@ -78,7 +78,7 @@ void LoginManagerTest::SetUp() { base::FilePath test_data_dir; - PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir); + base::PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir); embedded_test_server()->ServeFilesFromDirectory(test_data_dir); embedded_test_server()->RegisterRequestHandler(
diff --git a/chrome/browser/chromeos/login/resource_loader_browsertest.cc b/chrome/browser/chromeos/login/resource_loader_browsertest.cc index 6b52fa7..e0b7467 100644 --- a/chrome/browser/chromeos/login/resource_loader_browsertest.cc +++ b/chrome/browser/chromeos/login/resource_loader_browsertest.cc
@@ -46,7 +46,7 @@ void SetUpOnMainThread() override { // Load the data pack containing resource_loader.js. base::FilePath resources_pack_path; - ASSERT_TRUE(PathService::Get(base::DIR_MODULE, &resources_pack_path)); + ASSERT_TRUE(base::PathService::Get(base::DIR_MODULE, &resources_pack_path)); resources_pack_path = resources_pack_path.AppendASCII("gen/ui/login/login_resources.pak"); ui::ResourceBundle::GetSharedInstance().AddDataPackFromPath(
diff --git a/chrome/browser/chromeos/login/saml/saml_browsertest.cc b/chrome/browser/chromeos/login/saml/saml_browsertest.cc index 0401f58..6ed03fef 100644 --- a/chrome/browser/chromeos/login/saml/saml_browsertest.cc +++ b/chrome/browser/chromeos/login/saml/saml_browsertest.cc
@@ -192,7 +192,7 @@ void FakeSamlIdp::SetUp(const std::string& base_path, const GURL& gaia_url) { base::FilePath test_data_dir; - ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir)); + ASSERT_TRUE(base::PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir)); html_template_dir_ = test_data_dir.Append("login"); login_path_ = base_path;
diff --git a/chrome/browser/chromeos/login/session/user_session_manager.cc b/chrome/browser/chromeos/login/session/user_session_manager.cc index 2008547c..3c6043c 100644 --- a/chrome/browser/chromeos/login/session/user_session_manager.cc +++ b/chrome/browser/chromeos/login/session/user_session_manager.cc
@@ -261,7 +261,7 @@ base::FilePath GetRlzDisabledFlagPath() { base::FilePath homedir; - PathService::Get(base::DIR_HOME, &homedir); + base::PathService::Get(base::DIR_HOME, &homedir); return homedir.Append(kRLZDisabledFlagName); } #endif @@ -393,9 +393,9 @@ user_manager->GetPrimaryUser()->username_hash()); // This path has been either created by cryptohome (on real Chrome OS // device) or by ProfileManager (on chromeos=1 desktop builds). - PathService::OverrideAndCreateIfNeeded(base::DIR_HOME, homedir, - true /* path is absolute */, - false /* don't create */); + base::PathService::OverrideAndCreateIfNeeded(base::DIR_HOME, homedir, + true /* path is absolute */, + false /* don't create */); } } }
diff --git a/chrome/browser/chromeos/login/startup_utils.cc b/chrome/browser/chromeos/login/startup_utils.cc index 46bbf1c8..a2bfacbe 100644 --- a/chrome/browser/chromeos/login/startup_utils.cc +++ b/chrome/browser/chromeos/login/startup_utils.cc
@@ -61,7 +61,7 @@ return base::FilePath(kOobeCompleteFlagFilePath); } else { base::FilePath user_data_dir; - PathService::Get(chrome::DIR_USER_DATA, &user_data_dir); + base::PathService::Get(chrome::DIR_USER_DATA, &user_data_dir); return user_data_dir.AppendASCII(".oobe_completed"); } }
diff --git a/chrome/browser/chromeos/login/test/https_forwarder.cc b/chrome/browser/chromeos/login/test/https_forwarder.cc index ea3a3be..be3d5d0 100644 --- a/chrome/browser/chromeos/login/test/https_forwarder.cc +++ b/chrome/browser/chromeos/login/test/https_forwarder.cc
@@ -67,7 +67,7 @@ bool ForwardingServer::GetTestServerPath( base::FilePath* testserver_path) const { base::FilePath source_root_dir; - if (!PathService::Get(base::DIR_SOURCE_ROOT, &source_root_dir)) + if (!base::PathService::Get(base::DIR_SOURCE_ROOT, &source_root_dir)) return false; *testserver_path = source_root_dir.Append("chrome")
diff --git a/chrome/browser/chromeos/login/test/oobe_base_test.cc b/chrome/browser/chromeos/login/test/oobe_base_test.cc index 4efdb2cf..0f114b8 100644 --- a/chrome/browser/chromeos/login/test/oobe_base_test.cc +++ b/chrome/browser/chromeos/login/test/oobe_base_test.cc
@@ -68,7 +68,7 @@ void OobeBaseTest::SetUp() { base::FilePath test_data_dir; - PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir); + base::PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir); embedded_test_server()->ServeFilesFromDirectory(test_data_dir); RegisterAdditionalRequestHandlers();
diff --git a/chrome/browser/chromeos/login/ui/login_display_host_mojo.cc b/chrome/browser/chromeos/login/ui/login_display_host_mojo.cc index 1eaeee774..650b2a8b 100644 --- a/chrome/browser/chromeos/login/ui/login_display_host_mojo.cc +++ b/chrome/browser/chromeos/login/ui/login_display_host_mojo.cc
@@ -16,6 +16,7 @@ #include "chrome/browser/chromeos/login/ui/login_display_mojo.h" #include "chrome/browser/chromeos/login/user_board_view_mojo.h" #include "chrome/browser/chromeos/login/wizard_controller.h" +#include "chrome/browser/ui/ash/wallpaper_controller_client.h" #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h" #include "chromeos/login/auth/user_context.h" #include "components/user_manager/user_names.h" @@ -52,6 +53,8 @@ void LoginDisplayHostMojo::SetUsers(const user_manager::UserList& users) { users_ = users; + if (GetOobeUI()) + GetOobeUI()->SetLoginUserCount(users_.size()); } LoginDisplay* LoginDisplayHostMojo::CreateLoginDisplay( @@ -167,13 +170,19 @@ DCHECK(dialog_); if (visible) { - // Make sure gaia displays |account| if requested. - if (account) + if (account) { + // Make sure gaia displays |account| if requested. GetOobeUI()->GetGaiaScreenView()->ShowGaiaAsync(account); + LoginDisplayHost::default_host()->LoadWallpaper(account.value()); + } else { + LoginDisplayHost::default_host()->LoadSigninWallpaper(); + } dialog_->Show(true /*closable_by_esc*/); return; } + // Show the wallpaper of the focused user pod when the dialog is hidden. + LoginDisplayHost::default_host()->LoadWallpaper(focused_pod_account_id_); if (users_.empty() && GetOobeUI()) { // The dialog can not be closed if there is no user on the login screen. @@ -233,6 +242,8 @@ // TODO(jdufault): Share common code between this and // ViewsScreenLocker::HandleOnFocusPod See https://crbug.com/831787. user_selection_screen_->CheckUserStatus(account_id); + WallpaperControllerClient::Get()->ShowUserWallpaper(account_id); + focused_pod_account_id_ = account_id; } void LoginDisplayHostMojo::HandleOnNoPodFocused() {
diff --git a/chrome/browser/chromeos/login/ui/login_display_host_mojo.h b/chrome/browser/chromeos/login/ui/login_display_host_mojo.h index aea2d7be..1de3a5b0 100644 --- a/chrome/browser/chromeos/login/ui/login_display_host_mojo.h +++ b/chrome/browser/chromeos/login/ui/login_display_host_mojo.h
@@ -108,6 +108,9 @@ // TODO(crbug.com/808277): consider remove user case. user_manager::UserList users_; + // The account id of the user pod that's being focused. + AccountId focused_pod_account_id_; + base::WeakPtrFactory<LoginDisplayHostMojo> weak_factory_; DISALLOW_COPY_AND_ASSIGN(LoginDisplayHostMojo);
diff --git a/chrome/browser/chromeos/login/users/avatar/user_image_manager_browsertest.cc b/chrome/browser/chromeos/login/users/avatar/user_image_manager_browsertest.cc index dbb92e8..8737255 100644 --- a/chrome/browser/chromeos/login/users/avatar/user_image_manager_browsertest.cc +++ b/chrome/browser/chromeos/login/users/avatar/user_image_manager_browsertest.cc
@@ -155,7 +155,7 @@ std::string profile_image_data; base::FilePath test_data_dir; - EXPECT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir)); + EXPECT_TRUE(base::PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir)); EXPECT_TRUE( ReadFileToString(test_data_dir.Append("chromeos").Append("avatar1.jpg"), &profile_image_data)); @@ -174,8 +174,8 @@ void SetUpInProcessBrowserTestFixture() override { LoginManagerTest::SetUpInProcessBrowserTestFixture(); - ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir_)); - ASSERT_TRUE(PathService::Get(chrome::DIR_USER_DATA, &user_data_dir_)); + ASSERT_TRUE(base::PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir_)); + ASSERT_TRUE(base::PathService::Get(chrome::DIR_USER_DATA, &user_data_dir_)); } void SetUpCommandLine(base::CommandLine* command_line) override { @@ -641,7 +641,7 @@ base::FilePath user_keys_dir; ASSERT_TRUE( - PathService::Get(chromeos::DIR_USER_POLICY_KEYS, &user_keys_dir)); + base::PathService::Get(chromeos::DIR_USER_POLICY_KEYS, &user_keys_dir)); const std::string sanitized_username = chromeos::CryptohomeClient::GetStubSanitizedUsername(cryptohome_id_); const base::FilePath user_key_file =
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 352608b..c8470cf 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
@@ -491,7 +491,7 @@ } base::FilePath user_data_dir; - PathService::Get(chrome::DIR_USER_DATA, &user_data_dir); + base::PathService::Get(chrome::DIR_USER_DATA, &user_data_dir); // TODO(crbug.com/670557): Use GetAccountIdKey() instead of user_id(). image_path_ = user_data_dir.AppendASCII( user_id() + ChooseExtensionFromImageFormat(image_format));
diff --git a/chrome/browser/chromeos/login/users/wallpaper_policy_browsertest.cc b/chrome/browser/chromeos/login/users/wallpaper_policy_browsertest.cc index d1194685..77bb3bf 100644 --- a/chrome/browser/chromeos/login/users/wallpaper_policy_browsertest.cc +++ b/chrome/browser/chromeos/login/users/wallpaper_policy_browsertest.cc
@@ -149,7 +149,7 @@ std::unique_ptr<policy::UserPolicyBuilder> user_policy_builder( new policy::UserPolicyBuilder()); base::FilePath user_keys_dir; - EXPECT_TRUE(PathService::Get(DIR_USER_POLICY_KEYS, &user_keys_dir)); + EXPECT_TRUE(base::PathService::Get(DIR_USER_POLICY_KEYS, &user_keys_dir)); const std::string sanitized_user_id = CryptohomeClient::GetStubSanitizedUsername( cryptohome::Identification(account_id)); @@ -186,7 +186,7 @@ attributes.release()); LoginManagerTest::SetUpInProcessBrowserTestFixture(); - ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir_)); + ASSERT_TRUE(base::PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir_)); } void SetUpCommandLine(base::CommandLine* command_line) override {
diff --git a/chrome/browser/chromeos/ownership/owner_settings_service_chromeos_factory.cc b/chrome/browser/chromeos/ownership/owner_settings_service_chromeos_factory.cc index f8823ec..1f4cb23e 100644 --- a/chrome/browser/chromeos/ownership/owner_settings_service_chromeos_factory.cc +++ b/chrome/browser/chromeos/ownership/owner_settings_service_chromeos_factory.cc
@@ -63,7 +63,7 @@ if (owner_key_util_.get()) return owner_key_util_; base::FilePath public_key_path; - if (!PathService::Get(chromeos::FILE_OWNER_KEY, &public_key_path)) + if (!base::PathService::Get(chromeos::FILE_OWNER_KEY, &public_key_path)) return NULL; owner_key_util_ = new ownership::OwnerKeyUtilImpl(public_key_path); return owner_key_util_;
diff --git a/chrome/browser/chromeos/policy/affiliation_test_helper.cc b/chrome/browser/chromeos/policy/affiliation_test_helper.cc index bc727c0..33b8883 100644 --- a/chrome/browser/chromeos/policy/affiliation_test_helper.cc +++ b/chrome/browser/chromeos/policy/affiliation_test_helper.cc
@@ -52,7 +52,8 @@ const AccountId account_id = AccountId::FromUserEmail(user_policy->policy_data().username()); base::FilePath user_keys_dir; - ASSERT_TRUE(PathService::Get(chromeos::DIR_USER_POLICY_KEYS, &user_keys_dir)); + ASSERT_TRUE( + base::PathService::Get(chromeos::DIR_USER_POLICY_KEYS, &user_keys_dir)); const std::string sanitized_username = chromeos::CryptohomeClient::GetStubSanitizedUsername( cryptohome::Identification(account_id));
diff --git a/chrome/browser/chromeos/policy/browser_policy_connector_chromeos.cc b/chrome/browser/chromeos/policy/browser_policy_connector_chromeos.cc index 2ed36289d..6b26d83 100644 --- a/chrome/browser/chromeos/policy/browser_policy_connector_chromeos.cc +++ b/chrome/browser/chromeos/policy/browser_policy_connector_chromeos.cc
@@ -104,8 +104,8 @@ install_attributes_ = std::make_unique<chromeos::InstallAttributes>( chromeos::DBusThreadManager::Get()->GetCryptohomeClient()); base::FilePath install_attrs_file; - CHECK(PathService::Get(chromeos::FILE_INSTALL_ATTRIBUTES, - &install_attrs_file)); + CHECK(base::PathService::Get(chromeos::FILE_INSTALL_ATTRIBUTES, + &install_attrs_file)); install_attributes_->Init(install_attrs_file); }
diff --git a/chrome/browser/chromeos/policy/cloud_external_data_policy_observer_unittest.cc b/chrome/browser/chromeos/policy/cloud_external_data_policy_observer_unittest.cc index 40465dc20..d857b0a 100644 --- a/chrome/browser/chromeos/policy/cloud_external_data_policy_observer_unittest.cc +++ b/chrome/browser/chromeos/policy/cloud_external_data_policy_observer_unittest.cc
@@ -80,7 +80,7 @@ std::string* policy_data, std::string* policy) { base::FilePath test_data_dir; - ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir)); + ASSERT_TRUE(base::PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir)); ASSERT_TRUE(base::ReadFileToString( test_data_dir.Append("chromeos").Append(file_name), policy_data));
diff --git a/chrome/browser/chromeos/policy/device_cloud_policy_browsertest.cc b/chrome/browser/chromeos/policy/device_cloud_policy_browsertest.cc index c4c7fee..865fe34 100644 --- a/chrome/browser/chromeos/policy/device_cloud_policy_browsertest.cc +++ b/chrome/browser/chromeos/policy/device_cloud_policy_browsertest.cc
@@ -313,7 +313,7 @@ static base::FilePath GetTestExtensionSourcePath() { base::FilePath test_data_dir; - EXPECT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir)); + EXPECT_TRUE(base::PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir)); return test_data_dir.AppendASCII(kTestExtensionSourceDir); } @@ -406,8 +406,9 @@ SetUpInProcessBrowserTestFixture(); signin_policy_provided_disabler_ = chromeos::GetScopedSigninScreenPolicyProviderDisablerForTesting(); - EXPECT_TRUE(PathService::Get(chromeos::DIR_SIGNIN_PROFILE_COMPONENT_POLICY, - &component_policy_cache_dir_)); + EXPECT_TRUE( + base::PathService::Get(chromeos::DIR_SIGNIN_PROFILE_COMPONENT_POLICY, + &component_policy_cache_dir_)); PrepareFakeComponentPolicyResponse(); } @@ -493,12 +494,14 @@ private: static void PrefillSigninProfile() { base::FilePath profile_source_path; - EXPECT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &profile_source_path)); + EXPECT_TRUE( + base::PathService::Get(chrome::DIR_TEST_DATA, &profile_source_path)); profile_source_path = profile_source_path.AppendASCII(kFakeProfileSourceDir) .AppendASCII(chrome::kInitialProfile); base::FilePath profile_target_path; - EXPECT_TRUE(PathService::Get(chrome::DIR_USER_DATA, &profile_target_path)); + EXPECT_TRUE( + base::PathService::Get(chrome::DIR_USER_DATA, &profile_target_path)); EXPECT_TRUE( base::CopyDirectory(profile_source_path, profile_target_path, true)); @@ -514,12 +517,12 @@ void PrefillComponentPolicyCache() { base::FilePath user_data_dir; - EXPECT_TRUE(PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)); + EXPECT_TRUE(base::PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)); chromeos::RegisterStubPathOverrides(user_data_dir); base::FilePath cache_dir; - EXPECT_TRUE(PathService::Get(chromeos::DIR_SIGNIN_PROFILE_COMPONENT_POLICY, - &cache_dir)); + EXPECT_TRUE(base::PathService::Get( + chromeos::DIR_SIGNIN_PROFILE_COMPONENT_POLICY, &cache_dir)); ResourceCache cache(cache_dir, new base::NullTaskRunner); EXPECT_TRUE(cache.Store(kPolicyProtoCacheKey, kTestExtensionId,
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 19bfa38..d6d48e0 100644 --- a/chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.cc +++ b/chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.cc
@@ -251,8 +251,8 @@ // exposing policy for extensions. if (!component_policy_disabled_for_testing_) { base::FilePath component_policy_cache_dir; - CHECK(PathService::Get(chromeos::DIR_SIGNIN_PROFILE_COMPONENT_POLICY, - &component_policy_cache_dir)); + CHECK(base::PathService::Get(chromeos::DIR_SIGNIN_PROFILE_COMPONENT_POLICY, + &component_policy_cache_dir)); CHECK(signin_profile_forwarding_schema_registry_); CreateComponentCloudPolicyService( dm_protocol::kChromeSigninExtensionPolicyType,
diff --git a/chrome/browser/chromeos/policy/device_local_account_browsertest.cc b/chrome/browser/chromeos/policy/device_local_account_browsertest.cc index 17fc39c..2e54360 100644 --- a/chrome/browser/chromeos/policy/device_local_account_browsertest.cc +++ b/chrome/browser/chromeos/policy/device_local_account_browsertest.cc
@@ -632,8 +632,8 @@ base::FilePath GetExtensionCacheDirectoryForAccountID( const std::string& account_id) { base::FilePath extension_cache_root_dir; - if (!PathService::Get(chromeos::DIR_DEVICE_LOCAL_ACCOUNT_EXTENSIONS, - &extension_cache_root_dir)) { + if (!base::PathService::Get(chromeos::DIR_DEVICE_LOCAL_ACCOUNT_EXTENSIONS, + &extension_cache_root_dir)) { ADD_FAILURE(); } return extension_cache_root_dir.Append( @@ -1127,7 +1127,7 @@ // Verify that the app was downloaded to the account's extension cache. base::FilePath test_dir; - ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_dir)); + ASSERT_TRUE(base::PathService::Get(chrome::DIR_TEST_DATA, &test_dir)); EXPECT_TRUE(ContentsEqual( GetCacheCRXFile(kAccountId1, kHostedAppID, kHostedAppVersion), test_dir.Append(kHostedAppCRXPath))); @@ -1154,7 +1154,7 @@ EXPECT_TRUE(base::CreateDirectory( GetExtensionCacheDirectoryForAccountID(kAccountId1))); base::FilePath test_dir; - ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_dir)); + ASSERT_TRUE(base::PathService::Get(chrome::DIR_TEST_DATA, &test_dir)); const base::FilePath cached_hosted_app = GetCacheCRXFile(kAccountId1, kHostedAppID, kHostedAppVersion); EXPECT_TRUE(CopyFile(test_dir.Append(kHostedAppCRXPath), @@ -1279,7 +1279,7 @@ GetCacheCRXFilePath(kGoodExtensionID, kGoodExtensionVersion, temp_path); base::FilePath test_dir; std::string hash; - ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_dir)); + ASSERT_TRUE(base::PathService::Get(chrome::DIR_TEST_DATA, &test_dir)); EXPECT_TRUE(CopyFile(test_dir.Append(kGoodExtensionCRXPath), temp_file)); cache_impl.AllowCaching(kGoodExtensionID); run_loop.reset(new base::RunLoop); @@ -1437,7 +1437,7 @@ WaitForPolicy(); base::FilePath test_dir; - ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_dir)); + ASSERT_TRUE(base::PathService::Get(chrome::DIR_TEST_DATA, &test_dir)); std::string image_data; ASSERT_TRUE(base::ReadFileToString( test_dir.Append(chromeos::test::kUserAvatarImage1RelativePath), @@ -1479,7 +1479,7 @@ ASSERT_TRUE(user); base::FilePath user_data_dir; - ASSERT_TRUE(PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)); + ASSERT_TRUE(base::PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)); const base::FilePath saved_image_path = user_data_dir.Append(account_id_1_.GetUserEmail()).AddExtension("jpg"); @@ -1547,7 +1547,7 @@ extensions::NOTIFICATION_CRX_INSTALLER_DONE, content::NotificationService::AllSources()); base::FilePath test_dir; - ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_dir)); + ASSERT_TRUE(base::PathService::Get(chrome::DIR_TEST_DATA, &test_dir)); installer->InstallCrx(test_dir.Append(kPackagedAppCRXPath)); app_install_observer.Wait(); const extensions::Extension* app = @@ -2439,7 +2439,7 @@ // The Terms of Service URL was valid. Verify that the screen is showing the // downloaded Terms of Service and the accept button is enabled. base::FilePath test_dir; - ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_dir)); + ASSERT_TRUE(base::PathService::Get(chrome::DIR_TEST_DATA, &test_dir)); std::string terms_of_service; ASSERT_TRUE(base::ReadFileToString( test_dir.Append(kExistentTermsOfServicePath), &terms_of_service));
diff --git a/chrome/browser/chromeos/policy/device_local_account_external_data_service.cc b/chrome/browser/chromeos/policy/device_local_account_external_data_service.cc index 92eb02e..1a46366 100644 --- a/chrome/browser/chromeos/policy/device_local_account_external_data_service.cc +++ b/chrome/browser/chromeos/policy/device_local_account_external_data_service.cc
@@ -27,8 +27,8 @@ backend_task_runner_(backend_task_runner), io_task_runner_(io_task_runner) { base::FilePath cache_dir; - CHECK(PathService::Get(chromeos::DIR_DEVICE_LOCAL_ACCOUNT_EXTERNAL_DATA, - &cache_dir)); + CHECK(base::PathService::Get(chromeos::DIR_DEVICE_LOCAL_ACCOUNT_EXTERNAL_DATA, + &cache_dir)); resource_cache_.reset(new ResourceCache(cache_dir, backend_task_runner)); parent_->AddObserver(this); }
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 ca56b213..d7fa050 100644 --- a/chrome/browser/chromeos/policy/device_local_account_policy_service.cc +++ b/chrome/browser/chromeos/policy/device_local_account_policy_service.cc
@@ -115,8 +115,8 @@ // the removal is in progress. void DeleteObsoleteExtensionCache(const std::string& account_id_to_delete) { base::FilePath cache_root_dir; - CHECK(PathService::Get(chromeos::DIR_DEVICE_LOCAL_ACCOUNT_EXTENSIONS, - &cache_root_dir)); + CHECK(base::PathService::Get(chromeos::DIR_DEVICE_LOCAL_ACCOUNT_EXTENSIONS, + &cache_root_dir)); const base::FilePath path = cache_root_dir.Append( GetCacheSubdirectoryForAccountID(account_id_to_delete)); if (base::DirectoryExists(path)) @@ -151,8 +151,8 @@ account, store_.get(), &schema_registry_)); } base::FilePath cache_root_dir; - CHECK(PathService::Get(chromeos::DIR_DEVICE_LOCAL_ACCOUNT_EXTENSIONS, - &cache_root_dir)); + CHECK(base::PathService::Get(chromeos::DIR_DEVICE_LOCAL_ACCOUNT_EXTENSIONS, + &cache_root_dir)); extension_loader_ = new chromeos::DeviceLocalAccountExternalPolicyLoader( store_.get(), cache_root_dir.Append( @@ -289,8 +289,9 @@ &DeviceLocalAccountPolicyService::UpdateAccountListIfNonePending, base::Unretained(this)))), weak_factory_(this) { - CHECK(PathService::Get(chromeos::DIR_DEVICE_LOCAL_ACCOUNT_COMPONENT_POLICY, - &component_policy_cache_root_)); + CHECK(base::PathService::Get( + chromeos::DIR_DEVICE_LOCAL_ACCOUNT_COMPONENT_POLICY, + &component_policy_cache_root_)); external_data_service_.reset(new DeviceLocalAccountExternalDataService( this, external_data_service_backend_task_runner, @@ -517,8 +518,8 @@ orphan_extension_cache_deletion_state_ = IN_PROGRESS; base::FilePath cache_root_dir; - CHECK(PathService::Get(chromeos::DIR_DEVICE_LOCAL_ACCOUNT_EXTENSIONS, - &cache_root_dir)); + CHECK(base::PathService::Get(chromeos::DIR_DEVICE_LOCAL_ACCOUNT_EXTENSIONS, + &cache_root_dir)); extension_cache_task_runner_->PostTaskAndReply( FROM_HERE, base::BindOnce(&DeleteOrphanedCaches, cache_root_dir,
diff --git a/chrome/browser/chromeos/policy/device_local_account_policy_service_unittest.cc b/chrome/browser/chromeos/policy/device_local_account_policy_service_unittest.cc index 845d0803..592d6bd 100644 --- a/chrome/browser/chromeos/policy/device_local_account_policy_service_unittest.cc +++ b/chrome/browser/chromeos/policy/device_local_account_policy_service_unittest.cc
@@ -546,7 +546,7 @@ // the caches for all existing accounts are running. TEST_F(DeviceLocalAccountPolicyExtensionCacheTest, Startup) { base::FilePath test_data_dir; - ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir)); + ASSERT_TRUE(base::PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir)); const base::FilePath source_crx_file = test_data_dir.Append(kExtensionCRXPath); const std::string target_crx_file_name =
diff --git a/chrome/browser/chromeos/policy/device_policy_cros_browser_test.cc b/chrome/browser/chromeos/policy/device_policy_cros_browser_test.cc index 7ce2cfa2..2156bb7f 100644 --- a/chrome/browser/chromeos/policy/device_policy_cros_browser_test.cc +++ b/chrome/browser/chromeos/policy/device_policy_cros_browser_test.cc
@@ -33,8 +33,8 @@ void WriteInstallAttributesFile(const std::string& install_attrs_blob) { base::FilePath install_attrs_file; - ASSERT_TRUE( - PathService::Get(chromeos::FILE_INSTALL_ATTRIBUTES, &install_attrs_file)); + ASSERT_TRUE(base::PathService::Get(chromeos::FILE_INSTALL_ATTRIBUTES, + &install_attrs_file)); ASSERT_EQ(base::checked_cast<int>(install_attrs_blob.size()), base::WriteFile(install_attrs_file, install_attrs_blob.c_str(), install_attrs_blob.size())); @@ -72,7 +72,8 @@ OverridePaths(); base::FilePath owner_key_file; - ASSERT_TRUE(PathService::Get(chromeos::FILE_OWNER_KEY, &owner_key_file)); + ASSERT_TRUE( + base::PathService::Get(chromeos::FILE_OWNER_KEY, &owner_key_file)); std::string owner_key_bits = device_policy()->GetPublicSigningKeyAsString(); ASSERT_FALSE(owner_key_bits.empty()); ASSERT_EQ(base::checked_cast<int>(owner_key_bits.length()), @@ -86,7 +87,7 @@ // use the overridden paths before ChromeBrowserMain starts. Make sure that // the paths are overridden before using them. base::FilePath user_data_dir; - ASSERT_TRUE(PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)); + ASSERT_TRUE(base::PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)); chromeos::RegisterStubPathOverrides(user_data_dir); }
diff --git a/chrome/browser/chromeos/policy/power_policy_browsertest.cc b/chrome/browser/chromeos/policy/power_policy_browsertest.cc index d34ae538..40b990c5 100644 --- a/chrome/browser/chromeos/policy/power_policy_browsertest.cc +++ b/chrome/browser/chromeos/policy/power_policy_browsertest.cc
@@ -207,7 +207,8 @@ void PowerPolicyBrowserTestBase::InstallUserKey() { base::FilePath user_keys_dir; - ASSERT_TRUE(PathService::Get(chromeos::DIR_USER_POLICY_KEYS, &user_keys_dir)); + ASSERT_TRUE( + base::PathService::Get(chromeos::DIR_USER_POLICY_KEYS, &user_keys_dir)); std::string sanitized_username = chromeos::CryptohomeClient::GetStubSanitizedUsername( cryptohome::Identification(user_manager::StubAccountId()));
diff --git a/chrome/browser/chromeos/policy/pre_signin_policy_fetcher.cc b/chrome/browser/chromeos/policy/pre_signin_policy_fetcher.cc index 5fbc62bd..e824d918 100644 --- a/chrome/browser/chromeos/policy/pre_signin_policy_fetcher.cc +++ b/chrome/browser/chromeos/policy/pre_signin_policy_fetcher.cc
@@ -110,7 +110,8 @@ // are not signed). if (!policy_blob.empty() && !is_active_directory_managed_) { base::FilePath policy_key_dir; - CHECK(PathService::Get(chromeos::DIR_USER_POLICY_KEYS, &policy_key_dir)); + CHECK(base::PathService::Get(chromeos::DIR_USER_POLICY_KEYS, + &policy_key_dir)); cached_policy_key_loader_ = std::make_unique<CachedPolicyKeyLoaderChromeOS>( cryptohome_client_, task_runner_, account_id_, policy_key_dir); cached_policy_key_loader_->EnsurePolicyKeyLoaded(base::Bind(
diff --git a/chrome/browser/chromeos/policy/pre_signin_policy_fetcher_unittest.cc b/chrome/browser/chromeos/policy/pre_signin_policy_fetcher_unittest.cc index 0b93415..768cafe 100644 --- a/chrome/browser/chromeos/policy/pre_signin_policy_fetcher_unittest.cc +++ b/chrome/browser/chromeos/policy/pre_signin_policy_fetcher_unittest.cc
@@ -63,8 +63,8 @@ // are shared between session_manager and chrome through files) and set it // into PathService, so PreSigninPolicyFetcher will use it. ASSERT_TRUE(tmp_dir_.CreateUniqueTempDir()); - PathService::Override(chromeos::DIR_USER_POLICY_KEYS, - user_policy_keys_dir()); + base::PathService::Override(chromeos::DIR_USER_POLICY_KEYS, + user_policy_keys_dir()); auto cloud_policy_client = std::make_unique<MockCloudPolicyClient>(); cloud_policy_client_ = cloud_policy_client.get();
diff --git a/chrome/browser/chromeos/policy/user_cloud_external_data_manager_browsertest.cc b/chrome/browser/chromeos/policy/user_cloud_external_data_manager_browsertest.cc index bedf27d..2edefe79 100644 --- a/chrome/browser/chromeos/policy/user_cloud_external_data_manager_browsertest.cc +++ b/chrome/browser/chromeos/policy/user_cloud_external_data_manager_browsertest.cc
@@ -59,7 +59,7 @@ embedded_test_server()->GetURL(std::string("/") + kExternalDataPath); base::FilePath test_dir; - ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_dir)); + ASSERT_TRUE(base::PathService::Get(chrome::DIR_TEST_DATA, &test_dir)); ASSERT_TRUE(base::ReadFileToString(test_dir.AppendASCII(kExternalDataPath), &external_data_)); ASSERT_FALSE(external_data_.empty());
diff --git a/chrome/browser/chromeos/policy/user_policy_manager_factory_chromeos.cc b/chrome/browser/chromeos/policy/user_policy_manager_factory_chromeos.cc index 2a700eb..32168051 100644 --- a/chrome/browser/chromeos/policy/user_policy_manager_factory_chromeos.cc +++ b/chrome/browser/chromeos/policy/user_policy_manager_factory_chromeos.cc
@@ -358,7 +358,8 @@ const base::FilePath external_data_dir = profile_dir.Append(kPolicy).Append(kPolicyExternalDataDir); base::FilePath policy_key_dir; - CHECK(PathService::Get(chromeos::DIR_USER_POLICY_KEYS, &policy_key_dir)); + CHECK( + base::PathService::Get(chromeos::DIR_USER_POLICY_KEYS, &policy_key_dir)); std::unique_ptr<UserCloudPolicyStoreChromeOS> store = std::make_unique<UserCloudPolicyStoreChromeOS>(
diff --git a/chrome/browser/chromeos/power/ml/user_activity_manager.h b/chrome/browser/chromeos/power/ml/user_activity_manager.h index 8fe4c42..dbf8f283 100644 --- a/chrome/browser/chromeos/power/ml/user_activity_manager.h +++ b/chrome/browser/chromeos/power/ml/user_activity_manager.h
@@ -45,6 +45,7 @@ // Tab URL's engagement score. -1 if engagement service is disabled. int engagement_score; // Tab content type. + // TODO(michaelpg): Move definition into user_activity_event.proto. metrics::TabMetricsEvent::ContentType content_type; // Whether user has form entry, i.e. text input. bool has_form_entry;
diff --git a/chrome/browser/chromeos/power/ml/user_activity_ukm_logger_impl.h b/chrome/browser/chromeos/power/ml/user_activity_ukm_logger_impl.h index 10239e5..39bccace 100644 --- a/chrome/browser/chromeos/power/ml/user_activity_ukm_logger_impl.h +++ b/chrome/browser/chromeos/power/ml/user_activity_ukm_logger_impl.h
@@ -7,7 +7,6 @@ #include "base/macros.h" #include "chrome/browser/chromeos/power/ml/user_activity_ukm_logger.h" -#include "chrome/browser/resource_coordinator/tab_metrics_event.pb.h" #include "services/metrics/public/cpp/ukm_recorder.h" namespace chromeos {
diff --git a/chrome/browser/chromeos/settings/install_attributes_unittest.cc b/chrome/browser/chromeos/settings/install_attributes_unittest.cc index c466e39..d632356 100644 --- a/chrome/browser/chromeos/settings/install_attributes_unittest.cc +++ b/chrome/browser/chromeos/settings/install_attributes_unittest.cc
@@ -48,7 +48,7 @@ void SetUp() override { ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); - ASSERT_TRUE(PathService::OverrideAndCreateIfNeeded( + ASSERT_TRUE(base::PathService::OverrideAndCreateIfNeeded( FILE_INSTALL_ATTRIBUTES, GetTempPath(), true, false)); DBusThreadManager::Initialize(); install_attributes_ = std::make_unique<InstallAttributes>(
diff --git a/chrome/browser/chromeos/system/automatic_reboot_manager.cc b/chrome/browser/chromeos/system/automatic_reboot_manager.cc index f1082d51..fb4786d 100644 --- a/chrome/browser/chromeos/system/automatic_reboot_manager.cc +++ b/chrome/browser/chromeos/system/automatic_reboot_manager.cc
@@ -75,10 +75,10 @@ AutomaticRebootManager::SystemEventTimes GetSystemEventTimes() { base::FilePath uptime_file; - CHECK(PathService::Get(chromeos::FILE_UPTIME, &uptime_file)); + CHECK(base::PathService::Get(chromeos::FILE_UPTIME, &uptime_file)); base::FilePath update_reboot_needed_uptime_file; - CHECK(PathService::Get(chromeos::FILE_UPDATE_REBOOT_NEEDED_UPTIME, - &update_reboot_needed_uptime_file)); + CHECK(base::PathService::Get(chromeos::FILE_UPDATE_REBOOT_NEEDED_UPTIME, + &update_reboot_needed_uptime_file)); return AutomaticRebootManager::SystemEventTimes( ReadTimeDeltaFromFile(uptime_file), ReadTimeDeltaFromFile(update_reboot_needed_uptime_file)); @@ -89,15 +89,15 @@ const base::TimeDelta kZeroTimeDelta; base::FilePath update_reboot_needed_uptime_file; - CHECK(PathService::Get(chromeos::FILE_UPDATE_REBOOT_NEEDED_UPTIME, - &update_reboot_needed_uptime_file)); + CHECK(base::PathService::Get(chromeos::FILE_UPDATE_REBOOT_NEEDED_UPTIME, + &update_reboot_needed_uptime_file)); const base::TimeDelta last_update_reboot_needed_uptime = ReadTimeDeltaFromFile(update_reboot_needed_uptime_file); if (last_update_reboot_needed_uptime != kZeroTimeDelta) return; base::FilePath uptime_file; - CHECK(PathService::Get(chromeos::FILE_UPTIME, &uptime_file)); + CHECK(base::PathService::Get(chromeos::FILE_UPTIME, &uptime_file)); const base::TimeDelta uptime = ReadTimeDeltaFromFile(uptime_file); if (uptime == kZeroTimeDelta) return;
diff --git a/chrome/browser/chromeos/system/automatic_reboot_manager_unittest.cc b/chrome/browser/chromeos/system/automatic_reboot_manager_unittest.cc index 59bde8d..8874962 100644 --- a/chrome/browser/chromeos/system/automatic_reboot_manager_unittest.cc +++ b/chrome/browser/chromeos/system/automatic_reboot_manager_unittest.cc
@@ -319,9 +319,10 @@ update_reboot_needed_uptime_file_ = temp_dir.Append("update_reboot_needed_uptime"); ASSERT_EQ(0, base::WriteFile(update_reboot_needed_uptime_file_, NULL, 0)); - ASSERT_TRUE(PathService::Override(chromeos::FILE_UPTIME, uptime_file)); - ASSERT_TRUE(PathService::Override(chromeos::FILE_UPDATE_REBOOT_NEEDED_UPTIME, - update_reboot_needed_uptime_file_)); + ASSERT_TRUE(base::PathService::Override(chromeos::FILE_UPTIME, uptime_file)); + ASSERT_TRUE( + base::PathService::Override(chromeos::FILE_UPDATE_REBOOT_NEEDED_UPTIME, + update_reboot_needed_uptime_file_)); TestingBrowserProcess::GetGlobal()->SetLocalState(&local_state_); AutomaticRebootManager::RegisterPrefs(local_state_.registry());
diff --git a/chrome/browser/chromeos/tpm_firmware_update.cc b/chrome/browser/chromeos/tpm_firmware_update.cc index 8048088..a547e231 100644 --- a/chrome/browser/chromeos/tpm_firmware_update.cc +++ b/chrome/browser/chromeos/tpm_firmware_update.cc
@@ -102,8 +102,9 @@ private: static base::FilePath GetUpdateLocationFilePath() { base::FilePath update_location_file; - CHECK(PathService::Get(chrome::FILE_CHROME_OS_TPM_FIRMWARE_UPDATE_LOCATION, - &update_location_file)); + CHECK(base::PathService::Get( + chrome::FILE_CHROME_OS_TPM_FIRMWARE_UPDATE_LOCATION, + &update_location_file)); return update_location_file; }
diff --git a/chrome/browser/chromeos/tpm_firmware_update_unittest.cc b/chrome/browser/chromeos/tpm_firmware_update_unittest.cc index 3f025359..e4bc226 100644 --- a/chrome/browser/chromeos/tpm_firmware_update_unittest.cc +++ b/chrome/browser/chromeos/tpm_firmware_update_unittest.cc
@@ -67,9 +67,9 @@ void SetUpdateAvailability(Availability availability) { base::FilePath update_location_path; - ASSERT_TRUE( - PathService::Get(chrome::FILE_CHROME_OS_TPM_FIRMWARE_UPDATE_LOCATION, - &update_location_path)); + ASSERT_TRUE(base::PathService::Get( + chrome::FILE_CHROME_OS_TPM_FIRMWARE_UPDATE_LOCATION, + &update_location_path)); switch (availability) { case Availability::kPending: base::DeleteFile(update_location_path, false);
diff --git a/chrome/browser/component_updater/component_installers_unittest.cc b/chrome/browser/component_updater/component_installers_unittest.cc index d410325..b4da7ec 100644 --- a/chrome/browser/component_updater/component_installers_unittest.cc +++ b/chrome/browser/component_updater/component_installers_unittest.cc
@@ -69,7 +69,7 @@ // The test directory is chrome/test/data/components/flapper. base::FilePath manifest; - PathService::Get(chrome::DIR_TEST_DATA, &manifest); + base::PathService::Get(chrome::DIR_TEST_DATA, &manifest); manifest = manifest.Append(kDataPath); manifest = manifest.AppendASCII("manifest.json");
diff --git a/chrome/browser/component_updater/component_patcher_operation_browsertest.cc b/chrome/browser/component_updater/component_patcher_operation_browsertest.cc index 0ae45282..38bf0ad 100644 --- a/chrome/browser/component_updater/component_patcher_operation_browsertest.cc +++ b/chrome/browser/component_updater/component_patcher_operation_browsertest.cc
@@ -43,7 +43,7 @@ static base::FilePath TestFile(const char* name) { base::FilePath path; - PathService::Get(base::DIR_SOURCE_ROOT, &path); + base::PathService::Get(base::DIR_SOURCE_ROOT, &path); return path.AppendASCII("components") .AppendASCII("test") .AppendASCII("data")
diff --git a/chrome/browser/component_updater/cros_component_installer.cc b/chrome/browser/component_updater/cros_component_installer.cc index f59e4cb..6141be51 100644 --- a/chrome/browser/component_updater/cros_component_installer.cc +++ b/chrome/browser/component_updater/cros_component_installer.cc
@@ -64,7 +64,7 @@ void CleanUpOldInstalls(const std::string& name) { // Clean up components installed at old path. base::FilePath path; - if (!PathService::Get(DIR_COMPONENT_USER, &path)) + if (!base::PathService::Get(DIR_COMPONENT_USER, &path)) return; path = path.Append(name); if (base::PathExists(path)) @@ -75,7 +75,7 @@ std::vector<ComponentConfig> GetInstalled() { std::vector<ComponentConfig> configs; base::FilePath root; - if (!PathService::Get(DIR_COMPONENT_USER, &root)) + if (!base::PathService::Get(DIR_COMPONENT_USER, &root)) return configs; root = root.Append(kComponentsRootPath);
diff --git a/chrome/browser/component_updater/pepper_flash_component_installer.cc b/chrome/browser/component_updater/pepper_flash_component_installer.cc index 191b880..edfa2839 100644 --- a/chrome/browser/component_updater/pepper_flash_component_installer.cc +++ b/chrome/browser/component_updater/pepper_flash_component_installer.cc
@@ -202,7 +202,8 @@ content::WebPluginInfo web_plugin = plugin_info.ToWebPluginInfo(); base::FilePath system_flash_path; - PathService::Get(chrome::FILE_PEPPER_FLASH_SYSTEM_PLUGIN, &system_flash_path); + base::PathService::Get(chrome::FILE_PEPPER_FLASH_SYSTEM_PLUGIN, + &system_flash_path); std::vector<content::WebPluginInfo> plugins; PluginService::GetInstance()->GetInternalPlugins(&plugins); @@ -237,7 +238,7 @@ } void UpdatePathService(const base::FilePath& path) { - PathService::Override(chrome::DIR_PEPPER_FLASH_PLUGIN, path); + base::PathService::Override(chrome::DIR_PEPPER_FLASH_PLUGIN, path); } #endif // !defined(OS_LINUX) && defined(GOOGLE_CHROME_BUILD)
diff --git a/chrome/browser/component_updater/pnacl_component_installer.cc b/chrome/browser/component_updater/pnacl_component_installer.cc index 7d7af54..b1a1774 100644 --- a/chrome/browser/component_updater/pnacl_component_installer.cc +++ b/chrome/browser/component_updater/pnacl_component_installer.cc
@@ -92,7 +92,8 @@ // Tell the rest of the world where to find the platform-specific PNaCl files. void OverrideDirPnaclComponent(const base::FilePath& base_path) { - PathService::Override(chrome::DIR_PNACL_COMPONENT, GetPlatformDir(base_path)); + base::PathService::Override(chrome::DIR_PNACL_COMPONENT, + GetPlatformDir(base_path)); } base::DictionaryValue* ReadJSONManifest(const base::FilePath& manifest_path) {
diff --git a/chrome/browser/component_updater/recovery_component_installer.cc b/chrome/browser/component_updater/recovery_component_installer.cc index ff540f7..61b0023 100644 --- a/chrome/browser/component_updater/recovery_component_installer.cc +++ b/chrome/browser/component_updater/recovery_component_installer.cc
@@ -426,7 +426,7 @@ // Passed the basic tests. Copy the installation to a permanent directory. base::FilePath path; - if (!PathService::Get(DIR_RECOVERY_BASE, &path)) + if (!base::PathService::Get(DIR_RECOVERY_BASE, &path)) return false; if (!base::PathExists(path) && !base::CreateDirectory(path)) return false;
diff --git a/chrome/browser/component_updater/supervised_user_whitelist_installer.cc b/chrome/browser/component_updater/supervised_user_whitelist_installer.cc index abeebe8..5bb043fb 100644 --- a/chrome/browser/component_updater/supervised_user_whitelist_installer.cc +++ b/chrome/browser/component_updater/supervised_user_whitelist_installer.cc
@@ -113,7 +113,8 @@ base::FilePath GetSanitizedWhitelistPath(const std::string& crx_id) { base::FilePath base_dir; - PathService::Get(chrome::DIR_SUPERVISED_USER_INSTALLED_WHITELISTS, &base_dir); + base::PathService::Get(chrome::DIR_SUPERVISED_USER_INSTALLED_WHITELISTS, + &base_dir); return base_dir.empty() ? base::FilePath() : base_dir.AppendASCII(crx_id + kSanitizedWhitelistExtension); @@ -187,7 +188,7 @@ void RemoveUnregisteredWhitelistsOnTaskRunner( const std::set<std::string>& registered_whitelists) { base::FilePath base_dir; - PathService::Get(DIR_SUPERVISED_USER_WHITELISTS, &base_dir); + base::PathService::Get(DIR_SUPERVISED_USER_WHITELISTS, &base_dir); if (!base_dir.empty()) { base::FileEnumerator file_enumerator(base_dir, false, base::FileEnumerator::DIRECTORIES); @@ -210,7 +211,8 @@ } } - PathService::Get(chrome::DIR_SUPERVISED_USER_INSTALLED_WHITELISTS, &base_dir); + base::PathService::Get(chrome::DIR_SUPERVISED_USER_INSTALLED_WHITELISTS, + &base_dir); if (!base_dir.empty()) { base::FilePath pattern(FILE_PATH_LITERAL("*")); pattern = pattern.AppendASCII(kSanitizedWhitelistExtension);
diff --git a/chrome/browser/component_updater/supervised_user_whitelist_installer_unittest.cc b/chrome/browser/component_updater/supervised_user_whitelist_installer_unittest.cc index 0e6d66f..be5ea57 100644 --- a/chrome/browser/component_updater/supervised_user_whitelist_installer_unittest.cc +++ b/chrome/browser/component_updater/supervised_user_whitelist_installer_unittest.cc
@@ -219,14 +219,14 @@ profile_attributes_storage(), &local_state_); - ASSERT_TRUE(PathService::Get(DIR_SUPERVISED_USER_WHITELISTS, - &whitelist_base_directory_)); + ASSERT_TRUE(base::PathService::Get(DIR_SUPERVISED_USER_WHITELISTS, + &whitelist_base_directory_)); whitelist_directory_ = whitelist_base_directory_.AppendASCII(kCrxId); whitelist_version_directory_ = whitelist_directory_.AppendASCII(kVersion); ASSERT_TRUE( - PathService::Get(chrome::DIR_SUPERVISED_USER_INSTALLED_WHITELISTS, - &installed_whitelist_directory_)); + base::PathService::Get(chrome::DIR_SUPERVISED_USER_INSTALLED_WHITELISTS, + &installed_whitelist_directory_)); std::string crx_id(kCrxId); whitelist_path_ = installed_whitelist_directory_.AppendASCII(crx_id + ".json");
diff --git a/chrome/browser/crash_upload_list/crash_upload_list.cc b/chrome/browser/crash_upload_list/crash_upload_list.cc index c6345fb..c1bbfc7 100644 --- a/chrome/browser/crash_upload_list/crash_upload_list.cc +++ b/chrome/browser/crash_upload_list/crash_upload_list.cc
@@ -25,7 +25,7 @@ return new CrashUploadListCrashpad(); #else base::FilePath crash_dir_path; - PathService::Get(chrome::DIR_CRASH_DUMPS, &crash_dir_path); + base::PathService::Get(chrome::DIR_CRASH_DUMPS, &crash_dir_path); base::FilePath upload_log_path = crash_dir_path.AppendASCII(CrashUploadList::kReporterLogFilename); #if defined(OS_ANDROID)
diff --git a/chrome/browser/devtools/devtools_file_system_indexer_unittest.cc b/chrome/browser/devtools/devtools_file_system_indexer_unittest.cc index f071144..c3be1b6 100644 --- a/chrome/browser/devtools/devtools_file_system_indexer_unittest.cc +++ b/chrome/browser/devtools/devtools_file_system_indexer_unittest.cc
@@ -44,7 +44,7 @@ TEST_F(DevToolsFileSystemIndexerTest, BasicUsage) { base::FilePath base_test_path; - PathService::Get(chrome::DIR_TEST_DATA, &base_test_path); + base::PathService::Get(chrome::DIR_TEST_DATA, &base_test_path); base::FilePath index_path = base_test_path.Append(FILE_PATH_LITERAL("devtools")) .Append(FILE_PATH_LITERAL("indexer"));
diff --git a/chrome/browser/devtools/devtools_sanity_browsertest.cc b/chrome/browser/devtools/devtools_sanity_browsertest.cc index 8960b3f9..955f501d 100644 --- a/chrome/browser/devtools/devtools_sanity_browsertest.cc +++ b/chrome/browser/devtools/devtools_sanity_browsertest.cc
@@ -486,7 +486,7 @@ public content::NotificationObserver { public: DevToolsExtensionTest() : DevToolsSanityTest() { - PathService::Get(chrome::DIR_TEST_DATA, &test_extensions_dir_); + base::PathService::Get(chrome::DIR_TEST_DATA, &test_extensions_dir_); test_extensions_dir_ = test_extensions_dir_.AppendASCII("devtools"); test_extensions_dir_ = test_extensions_dir_.AppendASCII("extensions"); } @@ -1933,7 +1933,7 @@ command_line->AppendSwitchASCII(switches::kRemoteDebuggingPort, "9222"); // Override the extension root path. - PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir_); + base::PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir_); test_data_dir_ = test_data_dir_.AppendASCII("devtools"); } };
diff --git a/chrome/browser/devtools/remote_debugging_server.cc b/chrome/browser/devtools/remote_debugging_server.cc index 7a6bf06..0f48441 100644 --- a/chrome/browser/devtools/remote_debugging_server.cc +++ b/chrome/browser/devtools/remote_debugging_server.cc
@@ -103,13 +103,13 @@ // The client requested an ephemeral port. Must write the selected // port to a well-known location in the profile directory to // bootstrap the connection process. - bool result = PathService::Get(chrome::DIR_USER_DATA, &output_dir); + bool result = base::PathService::Get(chrome::DIR_USER_DATA, &output_dir); DCHECK(result); } base::FilePath debug_frontend_dir; #if BUILDFLAG(DEBUG_DEVTOOLS) - PathService::Get(chrome::DIR_INSPECTOR_DEBUG, &debug_frontend_dir); + base::PathService::Get(chrome::DIR_INSPECTOR_DEBUG, &debug_frontend_dir); #endif content::DevToolsAgentHost::StartRemoteDebuggingServer(
diff --git a/chrome/browser/diagnostics/diagnostics_controller_unittest.cc b/chrome/browser/diagnostics/diagnostics_controller_unittest.cc index d004fb35..999f600a 100644 --- a/chrome/browser/diagnostics/diagnostics_controller_unittest.cc +++ b/chrome/browser/diagnostics/diagnostics_controller_unittest.cc
@@ -37,7 +37,7 @@ void SetUp() override { ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); base::FilePath test_data; - PathService::Get(chrome::DIR_TEST_DATA, &test_data); + base::PathService::Get(chrome::DIR_TEST_DATA, &test_data); test_data = test_data.Append(FILE_PATH_LITERAL("diagnostics")); test_data = test_data.Append(FILE_PATH_LITERAL("user")); base::CopyDirectory(test_data, temp_dir_.GetPath(), true); @@ -47,8 +47,8 @@ // Redirect the home dir to the profile directory. We have to do this // because NSS uses the HOME directory to find where to store it's database, // so that's where the diagnostics and recovery code looks for it. - PathService::Get(base::DIR_HOME, &old_home_dir_); - PathService::Override(base::DIR_HOME, profile_dir_); + base::PathService::Get(base::DIR_HOME, &old_home_dir_); + base::PathService::Override(base::DIR_HOME, profile_dir_); #endif cmdline_ = base::CommandLine(base::CommandLine::NO_PROGRAM); @@ -63,7 +63,7 @@ void TearDown() override { DiagnosticsController::GetInstance()->ClearResults(); #if defined(OS_CHROMEOS) - PathService::Override(base::DIR_HOME, old_home_dir_); + base::PathService::Override(base::DIR_HOME, old_home_dir_); old_home_dir_.clear(); #endif }
diff --git a/chrome/browser/diagnostics/diagnostics_model.cc b/chrome/browser/diagnostics/diagnostics_model.cc index 320113a..2dd4315 100644 --- a/chrome/browser/diagnostics/diagnostics_model.cc +++ b/chrome/browser/diagnostics/diagnostics_model.cc
@@ -234,7 +234,7 @@ base::FilePath user_data_dir = cmdline.GetSwitchValuePath(switches::kUserDataDir); if (!user_data_dir.empty()) - PathService::Override(chrome::DIR_USER_DATA, user_data_dir); + base::PathService::Override(chrome::DIR_USER_DATA, user_data_dir); #if defined(OS_WIN) return new DiagnosticsModelWin(); #elif defined(OS_MACOSX)
diff --git a/chrome/browser/diagnostics/diagnostics_test.cc b/chrome/browser/diagnostics/diagnostics_test.cc index da7cc784..9334eb1 100644 --- a/chrome/browser/diagnostics/diagnostics_test.cc +++ b/chrome/browser/diagnostics/diagnostics_test.cc
@@ -77,7 +77,7 @@ // static base::FilePath DiagnosticsTest::GetUserDefaultProfileDir() { base::FilePath path; - if (!PathService::Get(chrome::DIR_USER_DATA, &path)) + if (!base::PathService::Get(chrome::DIR_USER_DATA, &path)) return base::FilePath(); return path.AppendASCII(chrome::kInitialProfile); }
diff --git a/chrome/browser/diagnostics/recon_diagnostics.cc b/chrome/browser/diagnostics/recon_diagnostics.cc index 61b9db92..ebbd221 100644 --- a/chrome/browser/diagnostics/recon_diagnostics.cc +++ b/chrome/browser/diagnostics/recon_diagnostics.cc
@@ -59,7 +59,7 @@ bool ExecuteImpl(DiagnosticsModel::Observer* observer) override { base::FilePath data_dir; - if (!PathService::Get(chrome::DIR_USER_DATA, &data_dir)) + if (!base::PathService::Get(chrome::DIR_USER_DATA, &data_dir)) return false; int64_t disk_space = base::SysInfo::AmountOfFreeDiskSpace(data_dir); if (disk_space < 0) { @@ -232,7 +232,7 @@ return false; } base::FilePath dir_or_file; - if (!PathService::Get(path_info_.path_id, &dir_or_file)) { + if (!base::PathService::Get(path_info_.path_id, &dir_or_file)) { RecordStopFailure(DIAG_RECON_PATH_PROVIDER, "Path provider failure"); return false; } @@ -329,7 +329,7 @@ std::unique_ptr<DiagnosticsTest> MakeLocalStateTest() { base::FilePath path; - PathService::Get(chrome::DIR_USER_DATA, &path); + base::PathService::Get(chrome::DIR_USER_DATA, &path); path = path.Append(chrome::kLocalStateFilename); return std::make_unique<JSONTest>(path, DIAGNOSTICS_JSON_LOCAL_STATE_TEST, 50 * kOneKilobyte, JSONTest::CRITICAL);
diff --git a/chrome/browser/diagnostics/sqlite_diagnostics.cc b/chrome/browser/diagnostics/sqlite_diagnostics.cc index 8b88e9c..e49200b 100644 --- a/chrome/browser/diagnostics/sqlite_diagnostics.cc +++ b/chrome/browser/diagnostics/sqlite_diagnostics.cc
@@ -232,7 +232,7 @@ #if defined(OS_CHROMEOS) std::unique_ptr<DiagnosticsTest> MakeSqliteNssCertDbTest() { base::FilePath home_dir; - PathService::Get(base::DIR_HOME, &home_dir); + base::PathService::Get(base::DIR_HOME, &home_dir); return std::make_unique<SqliteIntegrityTest>( SqliteIntegrityTest::REMOVE_IF_CORRUPT, DIAGNOSTICS_SQLITE_INTEGRITY_NSS_CERT_TEST, @@ -241,7 +241,7 @@ std::unique_ptr<DiagnosticsTest> MakeSqliteNssKeyDbTest() { base::FilePath home_dir; - PathService::Get(base::DIR_HOME, &home_dir); + base::PathService::Get(base::DIR_HOME, &home_dir); return std::make_unique<SqliteIntegrityTest>( SqliteIntegrityTest::REMOVE_IF_CORRUPT, DIAGNOSTICS_SQLITE_INTEGRITY_NSS_KEY_TEST,
diff --git a/chrome/browser/downgrade/user_data_downgrade.cc b/chrome/browser/downgrade/user_data_downgrade.cc index c4cd1b7..9643ecbe 100644 --- a/chrome/browser/downgrade/user_data_downgrade.cc +++ b/chrome/browser/downgrade/user_data_downgrade.cc
@@ -118,7 +118,7 @@ void MoveUserDataForFirstRunAfterDowngrade() { base::FilePath user_data_dir; - if (!PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)) + if (!base::PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)) return; InstallLevel install_level = GetInstallLevel(); base::Version current_version(chrome::kChromeVersion); @@ -162,7 +162,7 @@ void DeleteMovedUserDataSoon() { base::FilePath user_data_dir; - PathService::Get(chrome::DIR_USER_DATA, &user_data_dir); + base::PathService::Get(chrome::DIR_USER_DATA, &user_data_dir); content::BrowserThread::PostAfterStartupTask( FROM_HERE, base::CreateTaskRunnerWithTraits(
diff --git a/chrome/browser/downgrade/user_data_downgrade_browsertest.cc b/chrome/browser/downgrade/user_data_downgrade_browsertest.cc index 834f197b..f6f432c 100644 --- a/chrome/browser/downgrade/user_data_downgrade_browsertest.cc +++ b/chrome/browser/downgrade/user_data_downgrade_browsertest.cc
@@ -34,7 +34,7 @@ // InProcessBrowserTest: bool SetUpUserDataDirectory() override { - if (!PathService::Get(chrome::DIR_USER_DATA, &user_data_dir_)) + if (!base::PathService::Get(chrome::DIR_USER_DATA, &user_data_dir_)) return false; if (!CreateTemporaryFileInDir(user_data_dir_, &other_file_)) return false;
diff --git a/chrome/browser/download/chrome_download_manager_delegate_unittest.cc b/chrome/browser/download/chrome_download_manager_delegate_unittest.cc index 7197867..d746ade 100644 --- a/chrome/browser/download/chrome_download_manager_delegate_unittest.cc +++ b/chrome/browser/download/chrome_download_manager_delegate_unittest.cc
@@ -377,7 +377,7 @@ base::FilePath ChromeDownloadManagerDelegateTest::GetDefaultDownloadPath() const { base::FilePath path; - CHECK(PathService::Get(chrome::DIR_DEFAULT_DOWNLOADS, &path)); + CHECK(base::PathService::Get(chrome::DIR_DEFAULT_DOWNLOADS, &path)); return path; }
diff --git a/chrome/browser/download/download_browsertest.cc b/chrome/browser/download/download_browsertest.cc index b9fed5a..dbb251e 100644 --- a/chrome/browser/download/download_browsertest.cc +++ b/chrome/browser/download/download_browsertest.cc
@@ -468,7 +468,8 @@ // Returning false indicates a failure of the setup, and should be asserted // in the caller. bool InitialSetup() { - bool have_test_dir = PathService::Get(chrome::DIR_TEST_DATA, &test_dir_); + bool have_test_dir = + base::PathService::Get(chrome::DIR_TEST_DATA, &test_dir_); EXPECT_TRUE(have_test_dir); if (!have_test_dir) return false; @@ -498,7 +499,7 @@ base::FilePath GetTestDataDirectory() { base::FilePath test_file_directory; - PathService::Get(chrome::DIR_TEST_DATA, &test_file_directory); + base::PathService::Get(chrome::DIR_TEST_DATA, &test_file_directory); return test_file_directory; } @@ -959,8 +960,8 @@ // If it's not where we asked it to be, it should be in the // My Documents folder. base::FilePath my_docs_folder; - EXPECT_TRUE(PathService::Get(chrome::DIR_USER_DOCUMENTS, - &my_docs_folder)); + EXPECT_TRUE(base::PathService::Get(chrome::DIR_USER_DOCUMENTS, + &my_docs_folder)); EXPECT_EQ(0u, my_downloaded_file.value().find(my_docs_folder.value())); }
diff --git a/chrome/browser/download/download_path_reservation_tracker.cc b/chrome/browser/download/download_path_reservation_tracker.cc index 71494aad..18b9b78 100644 --- a/chrome/browser/download/download_path_reservation_tracker.cc +++ b/chrome/browser/download/download_path_reservation_tracker.cc
@@ -181,7 +181,7 @@ if (!base::PathIsWritable(target_path->DirName())) { DVLOG(1) << "Unable to write to path \"" << target_path->value() << "\""; base::FilePath target_dir; - PathService::Get(chrome::DIR_USER_DOCUMENTS, &target_dir); + base::PathService::Get(chrome::DIR_USER_DOCUMENTS, &target_dir); *target_path = target_dir.Append(target_path->BaseName()); return PathValidationResult::PATH_NOT_WRITABLE; }
diff --git a/chrome/browser/download/download_prefs.cc b/chrome/browser/download/download_prefs.cc index d9f9fe5..1387228 100644 --- a/chrome/browser/download/download_prefs.cc +++ b/chrome/browser/download/download_prefs.cc
@@ -74,7 +74,7 @@ return false; #else base::FilePath desktop_dir; - if (!PathService::Get(base::DIR_USER_DESKTOP, &desktop_dir)) { + if (!base::PathService::Get(base::DIR_USER_DESKTOP, &desktop_dir)) { NOTREACHED(); return false; } @@ -90,13 +90,13 @@ friend struct base::LazyInstanceTraitsBase<DefaultDownloadDirectory>; DefaultDownloadDirectory() { - if (!PathService::Get(chrome::DIR_DEFAULT_DOWNLOADS, &path_)) { + if (!base::PathService::Get(chrome::DIR_DEFAULT_DOWNLOADS, &path_)) { NOTREACHED(); } if (DownloadPathIsDangerous(path_)) { // This is only useful on platforms that support // DIR_DEFAULT_DOWNLOADS_SAFE. - if (!PathService::Get(chrome::DIR_DEFAULT_DOWNLOADS_SAFE, &path_)) { + if (!base::PathService::Get(chrome::DIR_DEFAULT_DOWNLOADS_SAFE, &path_)) { NOTREACHED(); } }
diff --git a/chrome/browser/download/download_target_determiner_unittest.cc b/chrome/browser/download/download_target_determiner_unittest.cc index 8d528aa..94497fb 100644 --- a/chrome/browser/download/download_target_determiner_unittest.cc +++ b/chrome/browser/download/download_target_determiner_unittest.cc
@@ -289,7 +289,7 @@ base::FilePath test_download_dir() const { base::FilePath path; - CHECK(PathService::Get(chrome::DIR_DEFAULT_DOWNLOADS, &path)); + CHECK(base::PathService::Get(chrome::DIR_DEFAULT_DOWNLOADS, &path)); return path; }
diff --git a/chrome/browser/download/save_page_browsertest.cc b/chrome/browser/download/save_page_browsertest.cc index 981c0f34..6323683 100644 --- a/chrome/browser/download/save_page_browsertest.cc +++ b/chrome/browser/download/save_page_browsertest.cc
@@ -292,7 +292,7 @@ content::SetupCrossSiteRedirector(embedded_test_server()); embedded_test_server()->StartAcceptingConnections(); - ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_dir_)); + ASSERT_TRUE(base::PathService::Get(chrome::DIR_TEST_DATA, &test_dir_)); InProcessBrowserTest::SetUp(); } @@ -1187,7 +1187,7 @@ IN_PROC_BROWSER_TEST_P(SavePageOriginalVsSavedComparisonTest, ObjectElementsViaFile) { base::FilePath test_data_dir; - ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir)); + ASSERT_TRUE(base::PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir)); GURL url(net::FilePathToFileURL( test_data_dir.Append(FILE_PATH_LITERAL("save_page/frames-objects.htm")))); EXPECT_TRUE(url.SchemeIsFile());
diff --git a/chrome/browser/extensions/api/automation/automation_apitest.cc b/chrome/browser/extensions/api/automation/automation_apitest.cc index 2c75475..3d50db2f 100644 --- a/chrome/browser/extensions/api/automation/automation_apitest.cc +++ b/chrome/browser/extensions/api/automation/automation_apitest.cc
@@ -61,7 +61,7 @@ void StartEmbeddedTestServer() { base::FilePath test_data; - ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_data)); + ASSERT_TRUE(base::PathService::Get(chrome::DIR_TEST_DATA, &test_data)); embedded_test_server()->ServeFilesFromDirectory( test_data.AppendASCII("extensions/api_test") .AppendASCII(kSitesDir));
diff --git a/chrome/browser/extensions/api/bookmarks/bookmarks_api.cc b/chrome/browser/extensions/api/bookmarks/bookmarks_api.cc index a3b5d74d..f092d09 100644 --- a/chrome/browser/extensions/api/bookmarks/bookmarks_api.cc +++ b/chrome/browser/extensions/api/bookmarks/bookmarks_api.cc
@@ -90,7 +90,7 @@ base::i18n::ReplaceIllegalCharactersInPath(&filename, '_'); base::FilePath default_path; - PathService::Get(chrome::DIR_USER_DOCUMENTS, &default_path); + base::PathService::Get(chrome::DIR_USER_DOCUMENTS, &default_path); return default_path.Append(filename); }
diff --git a/chrome/browser/extensions/api/debugger/debugger_apitest.cc b/chrome/browser/extensions/api/debugger/debugger_apitest.cc index 02a65d4..bdd6e19b 100644 --- a/chrome/browser/extensions/api/debugger/debugger_apitest.cc +++ b/chrome/browser/extensions/api/debugger/debugger_apitest.cc
@@ -164,7 +164,7 @@ DebuggerNotAllowedOnOtherExtensionPages) { // Load another arbitrary extension with an associated resource (popup.html). base::FilePath path; - ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &path)); + ASSERT_TRUE(base::PathService::Get(chrome::DIR_TEST_DATA, &path)); path = path.AppendASCII("extensions").AppendASCII("simple_with_popup"); const Extension* another_extension = LoadExtension(path); ASSERT_TRUE(another_extension);
diff --git a/chrome/browser/extensions/api/declarative_net_request/declarative_net_request_browsertest.cc b/chrome/browser/extensions/api/declarative_net_request/declarative_net_request_browsertest.cc index 13840d1..b11b31b 100644 --- a/chrome/browser/extensions/api/declarative_net_request/declarative_net_request_browsertest.cc +++ b/chrome/browser/extensions/api/declarative_net_request/declarative_net_request_browsertest.cc
@@ -120,7 +120,7 @@ ExtensionBrowserTest::SetUpOnMainThread(); base::FilePath test_root_path; - PathService::Get(chrome::DIR_TEST_DATA, &test_root_path); + base::PathService::Get(chrome::DIR_TEST_DATA, &test_root_path); test_root_path = test_root_path.AppendASCII("extensions") .AppendASCII("declarative_net_request"); embedded_test_server()->ServeFilesFromDirectory(test_root_path);
diff --git a/chrome/browser/extensions/api/desktop_capture/desktop_capture_apitest.cc b/chrome/browser/extensions/api/desktop_capture/desktop_capture_apitest.cc index c6c75b4..66e3efd 100644 --- a/chrome/browser/extensions/api/desktop_capture/desktop_capture_apitest.cc +++ b/chrome/browser/extensions/api/desktop_capture/desktop_capture_apitest.cc
@@ -254,7 +254,7 @@ IN_PROC_BROWSER_TEST_F(DesktopCaptureApiTest, DISABLED_Delegation) { // Initialize test server. base::FilePath test_data; - EXPECT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_data)); + EXPECT_TRUE(base::PathService::Get(chrome::DIR_TEST_DATA, &test_data)); embedded_test_server()->ServeFilesFromDirectory(test_data.AppendASCII( "extensions/api_test/desktop_capture_delegate")); ASSERT_TRUE(embedded_test_server()->Start());
diff --git a/chrome/browser/extensions/api/developer_private/developer_private_apitest.cc b/chrome/browser/extensions/api/developer_private/developer_private_apitest.cc index aaa7aced..570844d 100644 --- a/chrome/browser/extensions/api/developer_private/developer_private_apitest.cc +++ b/chrome/browser/extensions/api/developer_private/developer_private_apitest.cc
@@ -34,7 +34,7 @@ // Tests opening the developer tools for an app window. IN_PROC_BROWSER_TEST_F(DeveloperPrivateApiTest, InspectAppWindowView) { base::FilePath dir; - PathService::Get(chrome::DIR_TEST_DATA, &dir); + base::PathService::Get(chrome::DIR_TEST_DATA, &dir); dir = dir.AppendASCII("extensions") .AppendASCII("platform_apps") .AppendASCII("minimal"); @@ -85,7 +85,7 @@ IN_PROC_BROWSER_TEST_F(DeveloperPrivateApiTest, InspectEmbeddedOptionsPage) { base::FilePath dir; - PathService::Get(chrome::DIR_TEST_DATA, &dir); + base::PathService::Get(chrome::DIR_TEST_DATA, &dir); // Load an extension that only has an embedded options_ui page. const Extension* extension = LoadExtension(dir.AppendASCII("extensions") .AppendASCII("delayed_install")
diff --git a/chrome/browser/extensions/api/file_system/chrome_file_system_delegate.cc b/chrome/browser/extensions/api/file_system/chrome_file_system_delegate.cc index 99964e18..5d0ccc2 100644 --- a/chrome/browser/extensions/api/file_system/chrome_file_system_delegate.cc +++ b/chrome/browser/extensions/api/file_system/chrome_file_system_delegate.cc
@@ -230,7 +230,7 @@ base::FilePath ChromeFileSystemDelegate::GetDefaultDirectory() { base::FilePath documents_dir; - PathService::Get(chrome::DIR_USER_DOCUMENTS, &documents_dir); + base::PathService::Get(chrome::DIR_USER_DOCUMENTS, &documents_dir); return documents_dir; }
diff --git a/chrome/browser/extensions/api/file_system/file_system_apitest.cc b/chrome/browser/extensions/api/file_system/file_system_apitest.cc index 50a2b82..fe2b33b 100644 --- a/chrome/browser/extensions/api/file_system/file_system_apitest.cc +++ b/chrome/browser/extensions/api/file_system/file_system_apitest.cc
@@ -163,7 +163,7 @@ IN_PROC_BROWSER_TEST_F(FileSystemApiTest, FileSystemApiGetDisplayPathPrettify) { { base::ScopedAllowBlockingForTesting allow_blocking; - ASSERT_TRUE(PathService::OverrideAndCreateIfNeeded( + ASSERT_TRUE(base::PathService::OverrideAndCreateIfNeeded( base::DIR_HOME, test_root_folder_, false, false)); } @@ -230,7 +230,7 @@ ASSERT_FALSE(test_file.empty()); { base::ScopedAllowBlockingForTesting allow_blocking; - ASSERT_TRUE(PathService::OverrideAndCreateIfNeeded( + ASSERT_TRUE(base::PathService::OverrideAndCreateIfNeeded( chrome::DIR_USER_DOCUMENTS, test_file.DirName(), false, false)); } FileSystemChooseEntryFunction:: @@ -254,7 +254,7 @@ ASSERT_FALSE(test_file.empty()); { base::ScopedAllowBlockingForTesting allow_blocking; - ASSERT_TRUE(PathService::OverrideAndCreateIfNeeded( + ASSERT_TRUE(base::PathService::OverrideAndCreateIfNeeded( chrome::DIR_USER_DOCUMENTS, test_file.DirName(), false, false)); } FileSystemChooseEntryFunction:: @@ -269,7 +269,7 @@ ASSERT_FALSE(test_file.empty()); { base::ScopedAllowBlockingForTesting allow_blocking; - ASSERT_TRUE(PathService::OverrideAndCreateIfNeeded( + ASSERT_TRUE(base::PathService::OverrideAndCreateIfNeeded( chrome::DIR_USER_DOCUMENTS, test_file.DirName(), false, false)); } FileSystemChooseEntryFunction::SkipPickerAndSelectSuggestedPathForTest(); @@ -351,7 +351,7 @@ base::FilePath test_directory = test_file.DirName(); { base::ScopedAllowBlockingForTesting allow_blocking; - ASSERT_TRUE(PathService::OverrideAndCreateIfNeeded( + ASSERT_TRUE(base::PathService::OverrideAndCreateIfNeeded( kGraylistedPath, test_directory, false, false)); } FileSystemChooseEntryFunction::SkipPickerAndAlwaysSelectPathForTest( @@ -369,7 +369,7 @@ base::FilePath test_directory = test_file.DirName(); { base::ScopedAllowBlockingForTesting allow_blocking; - ASSERT_TRUE(PathService::OverrideAndCreateIfNeeded( + ASSERT_TRUE(base::PathService::OverrideAndCreateIfNeeded( kGraylistedPath, test_directory, false, false)); } FileSystemChooseEntryFunction::SkipPickerAndAlwaysSelectPathForTest( @@ -388,7 +388,7 @@ base::FilePath parent_directory = test_directory.DirName(); { base::ScopedAllowBlockingForTesting allow_blocking; - ASSERT_TRUE(PathService::OverrideAndCreateIfNeeded( + ASSERT_TRUE(base::PathService::OverrideAndCreateIfNeeded( kGraylistedPath, test_directory, false, false)); } FileSystemChooseEntryFunction::SkipPickerAndAlwaysSelectPathForTest( @@ -410,7 +410,7 @@ base::FilePath parent_directory = test_directory.DirName(); { base::ScopedAllowBlockingForTesting allow_blocking; - ASSERT_TRUE(PathService::OverrideAndCreateIfNeeded( + ASSERT_TRUE(base::PathService::OverrideAndCreateIfNeeded( kGraylistedPath, parent_directory, false, false)); } FileSystemChooseEntryFunction::SkipPickerAndAlwaysSelectPathForTest(
diff --git a/chrome/browser/extensions/api/file_system/file_system_apitest_chromeos.cc b/chrome/browser/extensions/api/file_system/file_system_apitest_chromeos.cc index 9fa91d2..183e3cad 100644 --- a/chrome/browser/extensions/api/file_system/file_system_apitest_chromeos.cc +++ b/chrome/browser/extensions/api/file_system/file_system_apitest_chromeos.cc
@@ -299,7 +299,7 @@ FileSystemApiOpenMultipleSuggested) { base::FilePath test_file = drive::util::GetDriveMountPointPath( browser()->profile()).AppendASCII("root/open_existing.txt"); - ASSERT_TRUE(PathService::OverrideAndCreateIfNeeded( + ASSERT_TRUE(base::PathService::OverrideAndCreateIfNeeded( chrome::DIR_USER_DOCUMENTS, test_file.DirName(), true, false)); FileSystemChooseEntryFunction::SkipPickerAndSelectSuggestedPathForTest(); ASSERT_TRUE(RunPlatformAppTest(
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 022c1f2..37cccf1 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
@@ -25,8 +25,10 @@ #include "ui/base/ime/chromeos/input_method_manager.h" #include "ui/base/ime/ime_engine_handler_interface.h" #include "ui/keyboard/keyboard_controller.h" +#include "ui/keyboard/keyboard_util.h" namespace input_ime = extensions::api::input_ime; +namespace input_method_private = extensions::api::input_method_private; namespace DeleteSurroundingText = extensions::api::input_ime::DeleteSurroundingText; namespace UpdateMenuItems = extensions::api::input_ime::UpdateMenuItems; @@ -188,6 +190,38 @@ OnCompositionBoundsChanged::kEventName, std::move(args)); } + void OnFocus( + const IMEEngineHandlerInterface::InputContext& context) override { + if (extension_id_.empty()) + return; + + // There is both a public and private OnFocus event. The private OnFocus + // event is only for ChromeOS and contains additional information about pen + // inputs. We ensure that we only trigger one OnFocus event. + if (HasListener(input_method_private::OnFocus::kEventName) && + keyboard::IsStylusVirtualKeyboardEnabled()) { + input_method_private::InputContext input_context; + input_context.context_id = context.id; + input_context.type = input_method_private::ParseInputContextType( + ConvertInputContextType(context)); + input_context.auto_correct = ConvertInputContextAutoCorrect(context); + input_context.auto_complete = ConvertInputContextAutoComplete(context); + input_context.spell_check = ConvertInputContextSpellCheck(context); + input_context.focus_reason = input_method_private::ParseFocusReason( + ConvertInputContextFocusReason(context)); + + std::unique_ptr<base::ListValue> args( + input_method_private::OnFocus::Create(input_context)); + + DispatchEventToExtension( + extensions::events::INPUT_METHOD_PRIVATE_ON_FOCUS, + input_method_private::OnFocus::kEventName, std::move(args)); + return; + } + + ImeObserver::OnFocus(context); + } + private: // ui::ImeObserver overrides. void DispatchEventToExtension( @@ -251,6 +285,22 @@ return "normal"; } + std::string ConvertInputContextFocusReason( + ui::IMEEngineHandlerInterface::InputContext input_context) { + switch (input_context.focus_reason) { + case ui::TextInputClient::FOCUS_REASON_NONE: + return ""; + case ui::TextInputClient::FOCUS_REASON_MOUSE: + return "mouse"; + case ui::TextInputClient::FOCUS_REASON_TOUCH: + return "touch"; + case ui::TextInputClient::FOCUS_REASON_PEN: + return "pen"; + case ui::TextInputClient::FOCUS_REASON_OTHER: + return "other"; + } + } + DISALLOW_COPY_AND_ASSIGN(ImeObserverChromeOS); };
diff --git a/chrome/browser/extensions/api/media_galleries/media_galleries_apitest.cc b/chrome/browser/extensions/api/media_galleries/media_galleries_apitest.cc index 39bdf5e..95796a2 100644 --- a/chrome/browser/extensions/api/media_galleries/media_galleries_apitest.cc +++ b/chrome/browser/extensions/api/media_galleries/media_galleries_apitest.cc
@@ -254,7 +254,7 @@ void SetUpOnMainThread() override { MediaGalleriesPlatformAppBrowserTest::SetUpOnMainThread(); - ASSERT_TRUE(PathService::Get(chrome::DIR_GEN_TEST_DATA, &app_dir_)); + ASSERT_TRUE(base::PathService::Get(chrome::DIR_GEN_TEST_DATA, &app_dir_)); app_dir_ = app_dir_.AppendASCII("ppapi") .AppendASCII("tests") .AppendASCII("extensions")
diff --git a/chrome/browser/extensions/api/messaging/native_messaging_test_util.cc b/chrome/browser/extensions/api/messaging/native_messaging_test_util.cc index 4067196..1acf4ae 100644 --- a/chrome/browser/extensions/api/messaging/native_messaging_test_util.cc +++ b/chrome/browser/extensions/api/messaging/native_messaging_test_util.cc
@@ -74,7 +74,8 @@ ScopedTestNativeMessagingHost test_host; base::FilePath test_user_data_dir; - ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_user_data_dir)); + ASSERT_TRUE( + base::PathService::Get(chrome::DIR_TEST_DATA, &test_user_data_dir)); test_user_data_dir = test_user_data_dir.AppendASCII("native_messaging") .AppendASCII("native_hosts");
diff --git a/chrome/browser/extensions/api/messaging/native_process_launcher_posix.cc b/chrome/browser/extensions/api/messaging/native_process_launcher_posix.cc index 0a5d016..c084362 100644 --- a/chrome/browser/extensions/api/messaging/native_process_launcher_posix.cc +++ b/chrome/browser/extensions/api/messaging/native_process_launcher_posix.cc
@@ -22,7 +22,7 @@ base::FilePath FindManifestInDir(int dir_key, const std::string& host_name) { base::FilePath base_path; - if (PathService::Get(dir_key, &base_path)) { + if (base::PathService::Get(dir_key, &base_path)) { base::FilePath path = base_path.Append(host_name + ".json"); if (base::PathExists(path)) return path;
diff --git a/chrome/browser/extensions/api/platform_keys/platform_keys_test_base.cc b/chrome/browser/extensions/api/platform_keys/platform_keys_test_base.cc index 74e8911..1b3a6e9 100644 --- a/chrome/browser/extensions/api/platform_keys/platform_keys_test_base.cc +++ b/chrome/browser/extensions/api/platform_keys/platform_keys_test_base.cc
@@ -56,7 +56,7 @@ void PlatformKeysTestBase::SetUp() { base::FilePath test_data_dir; - PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir); + base::PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir); embedded_test_server()->ServeFilesFromDirectory(test_data_dir); embedded_test_server()->RegisterRequestHandler(base::BindRepeating(
diff --git a/chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc b/chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc index 4036417..b30736ca 100644 --- a/chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc +++ b/chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc
@@ -283,6 +283,10 @@ info->arch = extensions::api::runtime::PLATFORM_ARCH_X86_32; } else if (strcmp(arch, "x64") == 0) { info->arch = extensions::api::runtime::PLATFORM_ARCH_X86_64; + } else if (strcmp(arch, "mipsel") == 0) { + info->arch = extensions::api::runtime::PLATFORM_ARCH_MIPS; + } else if (strcmp(arch, "mips64el") == 0) { + info->arch = extensions::api::runtime::PLATFORM_ARCH_MIPS64; } else { NOTREACHED(); return false; @@ -295,6 +299,10 @@ info->nacl_arch = extensions::api::runtime::PLATFORM_NACL_ARCH_X86_32; } else if (strcmp(nacl_arch, "x86-64") == 0) { info->nacl_arch = extensions::api::runtime::PLATFORM_NACL_ARCH_X86_64; + } else if (strcmp(nacl_arch, "mips32") == 0) { + info->nacl_arch = extensions::api::runtime::PLATFORM_NACL_ARCH_MIPS; + } else if (strcmp(nacl_arch, "mips64") == 0) { + info->nacl_arch = extensions::api::runtime::PLATFORM_NACL_ARCH_MIPS64; } else { NOTREACHED(); return false;
diff --git a/chrome/browser/extensions/api/sessions/sessions_apitest.cc b/chrome/browser/extensions/api/sessions/sessions_apitest.cc index 1cc32e8..22bbf3ac 100644 --- a/chrome/browser/extensions/api/sessions/sessions_apitest.cc +++ b/chrome/browser/extensions/api/sessions/sessions_apitest.cc
@@ -205,7 +205,7 @@ void ExtensionSessionsTest::CreateTestProfileSyncService() { ProfileManager* profile_manager = g_browser_process->profile_manager(); base::FilePath path; - PathService::Get(chrome::DIR_USER_DATA, &path); + base::PathService::Get(chrome::DIR_USER_DATA, &path); path = path.AppendASCII("test_profile"); if (!base::PathExists(path)) CHECK(base::CreateDirectory(path));
diff --git a/chrome/browser/extensions/api/tab_capture/tab_capture_apitest.cc b/chrome/browser/extensions/api/tab_capture/tab_capture_apitest.cc index 2d9f7f3..daea6c2 100644 --- a/chrome/browser/extensions/api/tab_capture/tab_capture_apitest.cc +++ b/chrome/browser/extensions/api/tab_capture/tab_capture_apitest.cc
@@ -259,15 +259,10 @@ EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); } -// http://crbug.com/177163 -#if defined(OS_WIN) && !defined(NDEBUG) -#define MAYBE_ActiveTabPermission DISABLED_ActiveTabPermission -#else -#define MAYBE_ActiveTabPermission ActiveTabPermission -#endif +// http://crbug.com/177163, http://crbug.com/427730 // Make sure tabCapture.capture only works if the tab has been granted // permission via an extension icon click or the extension is whitelisted. -IN_PROC_BROWSER_TEST_F(TabCaptureApiTest, MAYBE_ActiveTabPermission) { +IN_PROC_BROWSER_TEST_F(TabCaptureApiTest, DISABLED_ActiveTabPermission) { ExtensionTestMessageListener before_open_tab("ready1", true); ExtensionTestMessageListener before_grant_permission("ready2", true); ExtensionTestMessageListener before_open_new_tab("ready3", true);
diff --git a/chrome/browser/extensions/app_background_page_apitest.cc b/chrome/browser/extensions/app_background_page_apitest.cc index fc1314f..df3de11 100644 --- a/chrome/browser/extensions/app_background_page_apitest.cc +++ b/chrome/browser/extensions/app_background_page_apitest.cc
@@ -141,7 +141,7 @@ void LaunchTestingApp() { base::ScopedAllowBlockingForTesting allow_blocking; base::FilePath app_dir; - PathService::Get(chrome::DIR_GEN_TEST_DATA, &app_dir); + base::PathService::Get(chrome::DIR_GEN_TEST_DATA, &app_dir); app_dir = app_dir.AppendASCII( "ppapi/tests/extensions/background_keepalive/newlib"); extension_ = LoadExtension(app_dir);
diff --git a/chrome/browser/extensions/browsertest_util.cc b/chrome/browser/extensions/browsertest_util.cc index c03cc0e..d085db6 100644 --- a/chrome/browser/extensions/browsertest_util.cc +++ b/chrome/browser/extensions/browsertest_util.cc
@@ -43,8 +43,8 @@ void CreateAndInitializeLocalCache() { #if defined(OS_CHROMEOS) base::FilePath extension_cache_dir; - CHECK(PathService::Get(chromeos::DIR_DEVICE_EXTENSION_LOCAL_CACHE, - &extension_cache_dir)); + CHECK(base::PathService::Get(chromeos::DIR_DEVICE_EXTENSION_LOCAL_CACHE, + &extension_cache_dir)); base::FilePath cache_init_file = extension_cache_dir.Append( extensions::LocalExtensionCache::kCacheReadyFlagFileName); EXPECT_EQ(base::WriteFile(cache_init_file, "", 0), 0);
diff --git a/chrome/browser/extensions/chrome_component_extension_resource_manager.cc b/chrome/browser/extensions/chrome_component_extension_resource_manager.cc index 0205bb2..cce474c 100644 --- a/chrome/browser/extensions/chrome_component_extension_resource_manager.cc +++ b/chrome/browser/extensions/chrome_component_extension_resource_manager.cc
@@ -76,7 +76,7 @@ base::FilePath directory_path = extension_path; base::FilePath resources_dir; base::FilePath relative_path; - if (!PathService::Get(chrome::DIR_RESOURCES, &resources_dir) || + if (!base::PathService::Get(chrome::DIR_RESOURCES, &resources_dir) || !resources_dir.AppendRelativePath(directory_path, &relative_path)) { return false; }
diff --git a/chrome/browser/extensions/chrome_component_extension_resource_manager_unittest.cc b/chrome/browser/extensions/chrome_component_extension_resource_manager_unittest.cc index 2e47fd77..8364e164 100644 --- a/chrome/browser/extensions/chrome_component_extension_resource_manager_unittest.cc +++ b/chrome/browser/extensions/chrome_component_extension_resource_manager_unittest.cc
@@ -34,7 +34,7 @@ // Get the extension test data path. base::FilePath test_path; - ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_path)); + ASSERT_TRUE(base::PathService::Get(chrome::DIR_TEST_DATA, &test_path)); test_path = test_path.AppendASCII("extensions").AppendASCII("file_manager"); // Load the manifest data. @@ -46,7 +46,7 @@ // Build a path inside Chrome's resources directory where a component // extension might be installed. base::FilePath resources_path; - ASSERT_TRUE(PathService::Get(chrome::DIR_RESOURCES, &resources_path)); + ASSERT_TRUE(base::PathService::Get(chrome::DIR_RESOURCES, &resources_path)); resources_path = resources_path.AppendASCII("file_manager"); // Create a simulated component extension.
diff --git a/chrome/browser/extensions/chrome_info_map_unittest.cc b/chrome/browser/extensions/chrome_info_map_unittest.cc index 7033305..77b2aee 100644 --- a/chrome/browser/extensions/chrome_info_map_unittest.cc +++ b/chrome/browser/extensions/chrome_info_map_unittest.cc
@@ -18,7 +18,7 @@ scoped_refptr<Extension> LoadManifest(const std::string& dir, const std::string& test_file) { base::FilePath path; - PathService::Get(chrome::DIR_TEST_DATA, &path); + base::PathService::Get(chrome::DIR_TEST_DATA, &path); path = path.AppendASCII("extensions").AppendASCII(dir).AppendASCII(test_file); JSONFileValueDeserializer deserializer(path);
diff --git a/chrome/browser/extensions/chrome_url_request_util.cc b/chrome/browser/extensions/chrome_url_request_util.cc index 6a2d44b..41e7ad9 100644 --- a/chrome/browser/extensions/chrome_url_request_util.cc +++ b/chrome/browser/extensions/chrome_url_request_util.cc
@@ -310,7 +310,7 @@ // Try to load extension resources from chrome resource file if // directory_path is a descendant of resources_path. resources_path // corresponds to src/chrome/browser/resources in source tree. - if (PathService::Get(chrome::DIR_RESOURCES, &resources_path) && + if (base::PathService::Get(chrome::DIR_RESOURCES, &resources_path) && // Since component extension resources are included in // component_extension_resources.pak file in resources_path, calculate // extension relative path against resources_path. @@ -343,7 +343,7 @@ // |chrome_resources_path| corresponds to src/chrome/browser/resources in // source tree. base::FilePath chrome_resources_path; - if (!PathService::Get(chrome::DIR_RESOURCES, &chrome_resources_path)) + if (!base::PathService::Get(chrome::DIR_RESOURCES, &chrome_resources_path)) return base::FilePath(); // Since component extension resources are included in
diff --git a/chrome/browser/extensions/component_loader.cc b/chrome/browser/extensions/component_loader.cc index c8cbcf2..0d199af7 100644 --- a/chrome/browser/extensions/component_loader.cc +++ b/chrome/browser/extensions/component_loader.cc
@@ -119,7 +119,7 @@ const base::FilePath& directory) : manifest(std::move(manifest_param)), root_directory(directory) { if (!root_directory.IsAbsolute()) { - CHECK(PathService::Get(chrome::DIR_RESOURCES, &root_directory)); + CHECK(base::PathService::Get(chrome::DIR_RESOURCES, &root_directory)); root_directory = root_directory.Append(directory); } extension_id = GenerateId(manifest.get(), root_directory); @@ -325,7 +325,7 @@ base::FilePath resources_path; if ((chromeos::switches::IsZipArchiverPackerEnabled() || chromeos::switches::IsZipArchiverUnpackerEnabled()) && - PathService::Get(chrome::DIR_RESOURCES, &resources_path)) { + base::PathService::Get(chrome::DIR_RESOURCES, &resources_path)) { AddWithNameAndDescriptionFromDir( resources_path.Append(extension_misc::kZipArchiverExtensionPath), extension_misc::kZipArchiverExtensionId,
diff --git a/chrome/browser/extensions/component_loader_unittest.cc b/chrome/browser/extensions/component_loader_unittest.cc index aa59fd17..5c823c7 100644 --- a/chrome/browser/extensions/component_loader_unittest.cc +++ b/chrome/browser/extensions/component_loader_unittest.cc
@@ -125,7 +125,7 @@ base::FilePath GetBasePath() { base::FilePath test_data_dir; - PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir); + base::PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir); return test_data_dir.AppendASCII("extensions"); } };
diff --git a/chrome/browser/extensions/content_capabilities_browsertest.cc b/chrome/browser/extensions/content_capabilities_browsertest.cc index bd99c268..2b0875a 100644 --- a/chrome/browser/extensions/content_capabilities_browsertest.cc +++ b/chrome/browser/extensions/content_capabilities_browsertest.cc
@@ -48,7 +48,7 @@ void SetUpOnMainThread() override { ExtensionApiTest::SetUpOnMainThread(); base::FilePath test_data; - EXPECT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_data)); + EXPECT_TRUE(base::PathService::Get(chrome::DIR_TEST_DATA, &test_data)); embedded_test_server()->ServeFilesFromDirectory( test_data.AppendASCII("extensions/content_capabilities")); ASSERT_TRUE(embedded_test_server()->Start());
diff --git a/chrome/browser/extensions/convert_user_script_unittest.cc b/chrome/browser/extensions/convert_user_script_unittest.cc index b14e368..55a4988 100644 --- a/chrome/browser/extensions/convert_user_script_unittest.cc +++ b/chrome/browser/extensions/convert_user_script_unittest.cc
@@ -38,7 +38,7 @@ ASSERT_TRUE(extensions_dir.CreateUniqueTempDir()); base::FilePath test_file; - ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_file)); + ASSERT_TRUE(base::PathService::Get(chrome::DIR_TEST_DATA, &test_file)); test_file = test_file.AppendASCII("extensions") .AppendASCII("user_script_basic.user.js"); @@ -91,7 +91,7 @@ ASSERT_TRUE(extensions_dir.CreateUniqueTempDir()); base::FilePath test_file; - ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_file)); + ASSERT_TRUE(base::PathService::Get(chrome::DIR_TEST_DATA, &test_file)); test_file = test_file.AppendASCII("extensions") .AppendASCII("user_script_no_metadata.user.js"); @@ -140,7 +140,7 @@ ASSERT_TRUE(extensions_dir.CreateUniqueTempDir()); base::FilePath test_file; - ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_file)); + ASSERT_TRUE(base::PathService::Get(chrome::DIR_TEST_DATA, &test_file)); test_file = test_file.AppendASCII("extensions") .AppendASCII("user_script_not_utf8.user.js"); @@ -158,7 +158,7 @@ ASSERT_TRUE(extensions_dir.CreateUniqueTempDir()); base::FilePath test_file; - ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_file)); + ASSERT_TRUE(base::PathService::Get(chrome::DIR_TEST_DATA, &test_file)); test_file = test_file.AppendASCII("extensions") .AppendASCII("user_script_run_at_start.user.js"); @@ -193,7 +193,7 @@ ASSERT_TRUE(extensions_dir.CreateUniqueTempDir()); base::FilePath test_file; - ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_file)); + ASSERT_TRUE(base::PathService::Get(chrome::DIR_TEST_DATA, &test_file)); test_file = test_file.AppendASCII("extensions") .AppendASCII("user_script_run_at_end.user.js"); @@ -228,7 +228,7 @@ ASSERT_TRUE(extensions_dir.CreateUniqueTempDir()); base::FilePath test_file; - ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_file)); + ASSERT_TRUE(base::PathService::Get(chrome::DIR_TEST_DATA, &test_file)); test_file = test_file.AppendASCII("extensions") .AppendASCII("user_script_run_at_idle.user.js"); ASSERT_TRUE(base::PathExists(test_file)) << test_file.value();
diff --git a/chrome/browser/extensions/convert_web_app_unittest.cc b/chrome/browser/extensions/convert_web_app_unittest.cc index d5fb61e..673aa4f 100644 --- a/chrome/browser/extensions/convert_web_app_unittest.cc +++ b/chrome/browser/extensions/convert_web_app_unittest.cc
@@ -46,7 +46,7 @@ WebApplicationInfo::IconInfo result; base::FilePath icon_file; - if (!PathService::Get(chrome::DIR_TEST_DATA, &icon_file)) { + if (!base::PathService::Get(chrome::DIR_TEST_DATA, &icon_file)) { ADD_FAILURE() << "Could not get test data directory."; return result; }
diff --git a/chrome/browser/extensions/docs/examples/apps/calculator_browsertest.cc b/chrome/browser/extensions/docs/examples/apps/calculator_browsertest.cc index c78dae67..5b4d9a2 100644 --- a/chrome/browser/extensions/docs/examples/apps/calculator_browsertest.cc +++ b/chrome/browser/extensions/docs/examples/apps/calculator_browsertest.cc
@@ -18,7 +18,7 @@ IN_PROC_BROWSER_TEST_F(CalculatorBrowserTest, Model) { base::FilePath test_file; - PathService::Get(chrome::DIR_TEST_DATA, &test_file); + base::PathService::Get(chrome::DIR_TEST_DATA, &test_file); test_file = test_file.DirName().DirName() .AppendASCII("common").AppendASCII("extensions").AppendASCII("docs") .AppendASCII("examples").AppendASCII("apps").AppendASCII("calculator")
diff --git a/chrome/browser/extensions/event_router_forwarder.cc b/chrome/browser/extensions/event_router_forwarder.cc index c30364a..02b97f0 100644 --- a/chrome/browser/extensions/event_router_forwarder.cc +++ b/chrome/browser/extensions/event_router_forwarder.cc
@@ -49,30 +49,6 @@ profile, use_profile_to_restrict_events, event_url); } -void EventRouterForwarder::BroadcastEventToExtension( - const std::string& extension_id, - events::HistogramValue histogram_value, - const std::string& event_name, - std::unique_ptr<base::ListValue> event_args, - const GURL& event_url) { - HandleEvent(extension_id, histogram_value, event_name, std::move(event_args), - 0, true, event_url); -} - -void EventRouterForwarder::DispatchEventToExtension( - const std::string& extension_id, - events::HistogramValue histogram_value, - const std::string& event_name, - std::unique_ptr<base::ListValue> event_args, - void* profile, - bool use_profile_to_restrict_events, - const GURL& event_url) { - if (!profile) - return; - HandleEvent(extension_id, histogram_value, event_name, std::move(event_args), - profile, use_profile_to_restrict_events, event_url); -} - void EventRouterForwarder::HandleEvent( const std::string& extension_id, events::HistogramValue histogram_value,
diff --git a/chrome/browser/extensions/event_router_forwarder.h b/chrome/browser/extensions/event_router_forwarder.h index ad4a90f1..485b15a 100644 --- a/chrome/browser/extensions/event_router_forwarder.h +++ b/chrome/browser/extensions/event_router_forwarder.h
@@ -41,17 +41,6 @@ const GURL& event_url); // Calls - // DispatchEventToExtension(extension_id, event_name, event_args, - // profile, event_url) - // on all (original) profiles' EventRouters. - // May be called on any thread. - void BroadcastEventToExtension(const std::string& extension_id, - events::HistogramValue histogram_value, - const std::string& event_name, - std::unique_ptr<base::ListValue> event_args, - const GURL& event_url); - - // Calls // DispatchEventToRenderers(event_name, event_args, // use_profile_to_restrict_events ? profile : NULL, event_url) // on |profile|'s EventRouter. May be called on any thread. @@ -62,18 +51,6 @@ bool use_profile_to_restrict_events, const GURL& event_url); - // Calls - // DispatchEventToExtension(extension_id, event_name, event_args, - // use_profile_to_restrict_events ? profile : NULL, event_url) - // on |profile|'s EventRouter. May be called on any thread. - void DispatchEventToExtension(const std::string& extension_id, - events::HistogramValue histogram_value, - const std::string& event_name, - std::unique_ptr<base::ListValue> event_args, - void* profile, - bool use_profile_to_restrict_events, - const GURL& event_url); - protected: // Protected for testing. virtual ~EventRouterForwarder();
diff --git a/chrome/browser/extensions/event_router_forwarder_unittest.cc b/chrome/browser/extensions/event_router_forwarder_unittest.cc index defd32b..6b3785c 100644 --- a/chrome/browser/extensions/event_router_forwarder_unittest.cc +++ b/chrome/browser/extensions/event_router_forwarder_unittest.cc
@@ -30,7 +30,6 @@ const events::HistogramValue kHistogramValue = events::FOR_TEST; const char kEventName[] = "event_name"; -const char kExt[] = "extension"; class MockEventRouterForwarder : public EventRouterForwarder { public: @@ -78,29 +77,6 @@ use_profile_to_restrict_events, url); } -static void BroadcastEventToExtension(EventRouterForwarder* event_router, - const std::string& extension, - events::HistogramValue histogram_value, - const std::string& event_name, - const GURL& url) { - std::unique_ptr<base::ListValue> args(new base::ListValue()); - event_router->BroadcastEventToExtension(extension, histogram_value, - event_name, std::move(args), url); -} - -static void DispatchEventToExtension(EventRouterForwarder* event_router, - const std::string& extension, - events::HistogramValue histogram_value, - const std::string& event_name, - void* profile, - bool use_profile_to_restrict_events, - const GURL& url) { - std::unique_ptr<base::ListValue> args(new base::ListValue()); - event_router->DispatchEventToExtension(extension, histogram_value, event_name, - std::move(args), profile, - use_profile_to_restrict_events, url); -} - } // namespace class EventRouterForwarderTest : public testing::Test { @@ -259,42 +235,4 @@ profile1_, false, url); } -TEST_F(EventRouterForwarderTest, BroadcastExtensionUI) { - scoped_refptr<MockEventRouterForwarder> event_router( - new MockEventRouterForwarder); - GURL url; - EXPECT_CALL(*event_router, CallEventRouter(profile1_, kExt, kHistogramValue, - kEventName, profile1_, url)); - EXPECT_CALL(*event_router, CallEventRouter(profile2_, kExt, kHistogramValue, - kEventName, profile2_, url)); - BroadcastEventToExtension(event_router.get(), kExt, kHistogramValue, - kEventName, url); -} - -TEST_F(EventRouterForwarderTest, UnicastExtensionUIRestricted) { - scoped_refptr<MockEventRouterForwarder> event_router( - new MockEventRouterForwarder); - using ::testing::_; - GURL url; - EXPECT_CALL(*event_router, CallEventRouter(profile1_, kExt, kHistogramValue, - kEventName, profile1_, url)); - EXPECT_CALL(*event_router, CallEventRouter(profile2_, _, _, _, _, _)) - .Times(0); - DispatchEventToExtension(event_router.get(), kExt, kHistogramValue, - kEventName, profile1_, true, url); -} - -TEST_F(EventRouterForwarderTest, UnicastExtensionUIUnrestricted) { - scoped_refptr<MockEventRouterForwarder> event_router( - new MockEventRouterForwarder); - using ::testing::_; - GURL url; - EXPECT_CALL(*event_router, CallEventRouter(profile1_, kExt, kHistogramValue, - kEventName, NULL, url)); - EXPECT_CALL(*event_router, CallEventRouter(profile2_, _, _, _, _, _)) - .Times(0); - DispatchEventToExtension(event_router.get(), kExt, kHistogramValue, - kEventName, profile1_, false, url); -} - } // namespace extensions
diff --git a/chrome/browser/extensions/extension_action_icon_factory_unittest.cc b/chrome/browser/extensions/extension_action_icon_factory_unittest.cc index 11c7d3cb..2c9a9b8 100644 --- a/chrome/browser/extensions/extension_action_icon_factory_unittest.cc +++ b/chrome/browser/extensions/extension_action_icon_factory_unittest.cc
@@ -67,7 +67,7 @@ gfx::Image LoadIcon(const std::string& filename) { base::FilePath path; - PathService::Get(chrome::DIR_TEST_DATA, &path); + base::PathService::Get(chrome::DIR_TEST_DATA, &path); path = path.AppendASCII("extensions/api_test").AppendASCII(filename); std::string file_contents; @@ -98,7 +98,7 @@ scoped_refptr<Extension> CreateExtension(const char* name) { // Create and load an extension. base::FilePath test_file; - if (!PathService::Get(chrome::DIR_TEST_DATA, &test_file)) { + if (!base::PathService::Get(chrome::DIR_TEST_DATA, &test_file)) { EXPECT_FALSE(true); return NULL; }
diff --git a/chrome/browser/extensions/extension_apitest.cc b/chrome/browser/extensions/extension_apitest.cc index bbf966f..c8e7c07 100644 --- a/chrome/browser/extensions/extension_apitest.cc +++ b/chrome/browser/extensions/extension_apitest.cc
@@ -495,7 +495,7 @@ test_data_dir_ = test_data_dir_.AppendASCII("api_test"); extensions::RegisterPathProvider(); - PathService::Get(extensions::DIR_TEST_DATA, &shared_test_data_dir_); + base::PathService::Get(extensions::DIR_TEST_DATA, &shared_test_data_dir_); shared_test_data_dir_ = shared_test_data_dir_.AppendASCII("api_test"); // Backgrounded renderer processes run at a lower priority, causing the
diff --git a/chrome/browser/extensions/extension_browsertest.cc b/chrome/browser/extensions/extension_browsertest.cc index 5d82a5f..a9cbd6f6 100644 --- a/chrome/browser/extensions/extension_browsertest.cc +++ b/chrome/browser/extensions/extension_browsertest.cc
@@ -175,7 +175,7 @@ } void ExtensionBrowserTest::SetUpCommandLine(base::CommandLine* command_line) { - PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir_); + base::PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir_); test_data_dir_ = test_data_dir_.AppendASCII("extensions"); // We don't want any warning bubbles for, e.g., unpacked extensions. @@ -216,7 +216,7 @@ // chrome/test/data/extensions, and subclasses have a nasty habit of altering // the data dir in SetUpCommandLine(). base::FilePath test_root_path; - PathService::Get(chrome::DIR_TEST_DATA, &test_root_path); + base::PathService::Get(chrome::DIR_TEST_DATA, &test_root_path); test_root_path = test_root_path.AppendASCII("extensions"); test_protocol_handler_ = base::Bind(&ExtensionProtocolTestHandler, test_root_path);
diff --git a/chrome/browser/extensions/extension_gcm_app_handler_unittest.cc b/chrome/browser/extensions/extension_gcm_app_handler_unittest.cc index 5671c21c..fe55b30 100644 --- a/chrome/browser/extensions/extension_gcm_app_handler_unittest.cc +++ b/chrome/browser/extensions/extension_gcm_app_handler_unittest.cc
@@ -308,7 +308,7 @@ void UpdateExtension(const Extension* extension, const std::string& update_crx) { base::FilePath data_dir; - if (!PathService::Get(chrome::DIR_TEST_DATA, &data_dir)) { + if (!base::PathService::Get(chrome::DIR_TEST_DATA, &data_dir)) { ADD_FAILURE(); return; }
diff --git a/chrome/browser/extensions/extension_icon_manager_unittest.cc b/chrome/browser/extensions/extension_icon_manager_unittest.cc index 9ec559c..07db300 100644 --- a/chrome/browser/extensions/extension_icon_manager_unittest.cc +++ b/chrome/browser/extensions/extension_icon_manager_unittest.cc
@@ -111,7 +111,7 @@ gfx::Image default_icon = GetDefaultIcon(); base::FilePath test_dir; - ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_dir)); + ASSERT_TRUE(base::PathService::Get(chrome::DIR_TEST_DATA, &test_dir)); base::FilePath manifest_path = test_dir.AppendASCII( "extensions/image_loading_tracker/app.json"); @@ -154,7 +154,7 @@ gfx::Image default_icon = GetDefaultIcon(); base::FilePath test_dir; - ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_dir)); + ASSERT_TRUE(base::PathService::Get(chrome::DIR_TEST_DATA, &test_dir)); base::FilePath manifest_path = test_dir.AppendASCII( "extensions/file_manager/app.json"); @@ -198,7 +198,7 @@ const gfx::Image default_icon = GetDefaultIcon(); base::FilePath test_dir; - ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_dir)); + ASSERT_TRUE(base::PathService::Get(chrome::DIR_TEST_DATA, &test_dir)); base::FilePath manifest_path = test_dir.AppendASCII("extensions/context_menus/icons/manifest.json");
diff --git a/chrome/browser/extensions/extension_messages_apitest.cc b/chrome/browser/extensions/extension_messages_apitest.cc index 8b38789..9cf823e 100644 --- a/chrome/browser/extensions/extension_messages_apitest.cc +++ b/chrome/browser/extensions/extension_messages_apitest.cc
@@ -509,7 +509,7 @@ void SetUpOnMainThread() override { base::FilePath test_data; - EXPECT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_data)); + EXPECT_TRUE(base::PathService::Get(chrome::DIR_TEST_DATA, &test_data)); embedded_test_server()->ServeFilesFromDirectory(test_data.AppendASCII( "extensions/api_test/messaging/externally_connectable/sites")); MessagingApiTest::SetUpOnMainThread();
diff --git a/chrome/browser/extensions/extension_prefs_unittest.cc b/chrome/browser/extensions/extension_prefs_unittest.cc index 1dd71dfd..e45ea541 100644 --- a/chrome/browser/extensions/extension_prefs_unittest.cc +++ b/chrome/browser/extensions/extension_prefs_unittest.cc
@@ -488,7 +488,7 @@ } void Initialize() override { - PathService::Get(chrome::DIR_TEST_DATA, &basedir_); + base::PathService::Get(chrome::DIR_TEST_DATA, &basedir_); now_ = Time::Now(); id1_ = prefs_.AddExtensionAndReturnId("1"); id2_ = prefs_.AddExtensionAndReturnId("2");
diff --git a/chrome/browser/extensions/extension_protocols_unittest.cc b/chrome/browser/extensions/extension_protocols_unittest.cc index 3382ab3..475fccad 100644 --- a/chrome/browser/extensions/extension_protocols_unittest.cc +++ b/chrome/browser/extensions/extension_protocols_unittest.cc
@@ -69,13 +69,13 @@ base::FilePath GetTestPath(const std::string& name) { base::FilePath path; - EXPECT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &path)); + EXPECT_TRUE(base::PathService::Get(chrome::DIR_TEST_DATA, &path)); return path.AppendASCII("extensions").AppendASCII(name); } base::FilePath GetContentVerifierTestPath() { base::FilePath path; - EXPECT_TRUE(PathService::Get(extensions::DIR_TEST_DATA, &path)); + EXPECT_TRUE(base::PathService::Get(extensions::DIR_TEST_DATA, &path)); return path.AppendASCII("content_hash_fetcher") .AppendASCII("different_sized_files"); } @@ -111,7 +111,7 @@ .Build(); base::FilePath path; - EXPECT_TRUE(PathService::Get(chrome::DIR_RESOURCES, &path)); + EXPECT_TRUE(base::PathService::Get(chrome::DIR_RESOURCES, &path)); path = path.AppendASCII("web_store"); std::string error; @@ -668,7 +668,7 @@ base::FilePath unzipped_path = temp_dir.GetPath(); base::FilePath path; - EXPECT_TRUE(PathService::Get(extensions::DIR_TEST_DATA, &path)); + EXPECT_TRUE(base::PathService::Get(extensions::DIR_TEST_DATA, &path)); scoped_refptr<Extension> extension = content_verifier_test_utils::UnzipToDirAndLoadExtension(
diff --git a/chrome/browser/extensions/extension_service_test_base.cc b/chrome/browser/extensions/extension_service_test_base.cc index cfd74cd..09a169b 100644 --- a/chrome/browser/extensions/extension_service_test_base.cc +++ b/chrome/browser/extensions/extension_service_test_base.cc
@@ -89,7 +89,7 @@ testing_local_state_(TestingBrowserProcess::GetGlobal()), registry_(nullptr) { base::FilePath test_data_dir; - if (!PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir)) { + if (!base::PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir)) { ADD_FAILURE(); return; }
diff --git a/chrome/browser/extensions/extension_startup_browsertest.cc b/chrome/browser/extensions/extension_startup_browsertest.cc index a6954d5..b1b86b1 100644 --- a/chrome/browser/extensions/extension_startup_browsertest.cc +++ b/chrome/browser/extensions/extension_startup_browsertest.cc
@@ -89,7 +89,7 @@ bool SetUpUserDataDirectory() override { base::FilePath profile_dir; - PathService::Get(chrome::DIR_USER_DATA, &profile_dir); + base::PathService::Get(chrome::DIR_USER_DATA, &profile_dir); profile_dir = profile_dir.AppendASCII(TestingProfile::kTestUserProfileDir); base::CreateDirectory(profile_dir); @@ -99,7 +99,7 @@ if (load_extensions_.empty()) { base::FilePath src_dir; - PathService::Get(chrome::DIR_TEST_DATA, &src_dir); + base::PathService::Get(chrome::DIR_TEST_DATA, &src_dir); src_dir = src_dir.AppendASCII("extensions").AppendASCII("good"); base::CopyFile(src_dir.Append(chrome::kPreferencesFilename), @@ -168,7 +168,7 @@ // Load a page affected by the content script and test to see the effect. base::FilePath test_file; - PathService::Get(chrome::DIR_TEST_DATA, &test_file); + base::PathService::Get(chrome::DIR_TEST_DATA, &test_file); test_file = test_file.AppendASCII("extensions").AppendASCII("test_file.html"); @@ -256,7 +256,7 @@ public: ExtensionsLoadTest() { base::FilePath one_extension_path; - PathService::Get(chrome::DIR_TEST_DATA, &one_extension_path); + base::PathService::Get(chrome::DIR_TEST_DATA, &one_extension_path); one_extension_path = one_extension_path.AppendASCII("extensions") .AppendASCII("good") .AppendASCII("Extensions") @@ -290,7 +290,7 @@ public: ExtensionsLoadMultipleTest() { base::FilePath one_extension_path; - PathService::Get(chrome::DIR_TEST_DATA, &one_extension_path); + base::PathService::Get(chrome::DIR_TEST_DATA, &one_extension_path); one_extension_path = one_extension_path.AppendASCII("extensions") .AppendASCII("good") .AppendASCII("Extensions") @@ -299,19 +299,19 @@ load_extensions_.push_back(one_extension_path.value()); base::FilePath second_extension_path; - PathService::Get(chrome::DIR_TEST_DATA, &second_extension_path); + base::PathService::Get(chrome::DIR_TEST_DATA, &second_extension_path); second_extension_path = second_extension_path.AppendASCII("extensions").AppendASCII("app"); load_extensions_.push_back(second_extension_path.value()); base::FilePath third_extension_path; - PathService::Get(chrome::DIR_TEST_DATA, &third_extension_path); + base::PathService::Get(chrome::DIR_TEST_DATA, &third_extension_path); third_extension_path = third_extension_path.AppendASCII("extensions").AppendASCII("app1"); load_extensions_.push_back(third_extension_path.value()); base::FilePath fourth_extension_path; - PathService::Get(chrome::DIR_TEST_DATA, &fourth_extension_path); + base::PathService::Get(chrome::DIR_TEST_DATA, &fourth_extension_path); fourth_extension_path = fourth_extension_path.AppendASCII("extensions").AppendASCII("app2"); load_extensions_.push_back(fourth_extension_path.value());
diff --git a/chrome/browser/extensions/extension_webui_apitest.cc b/chrome/browser/extensions/extension_webui_apitest.cc index cf6cf5c..507401d6 100644 --- a/chrome/browser/extensions/extension_webui_apitest.cc +++ b/chrome/browser/extensions/extension_webui_apitest.cc
@@ -40,7 +40,7 @@ base::ScopedAllowBlockingForTesting allow_blocking; // Tests are located in chrome/test/data/extensions/webui/$(name). base::FilePath path; - PathService::Get(chrome::DIR_TEST_DATA, &path); + base::PathService::Get(chrome::DIR_TEST_DATA, &path); path = path.AppendASCII("extensions").AppendASCII("webui").AppendASCII(name);
diff --git a/chrome/browser/extensions/external_pref_loader.cc b/chrome/browser/extensions/external_pref_loader.cc index 53e9c07..fde0d9c1 100644 --- a/chrome/browser/extensions/external_pref_loader.cc +++ b/chrome/browser/extensions/external_pref_loader.cc
@@ -238,12 +238,12 @@ auto prefs = std::make_unique<base::DictionaryValue>(); // TODO(skerner): Some values of base_path_id_ will cause - // PathService::Get() to return false, because the path does + // base::PathService::Get() to return false, because the path does // not exist. Find and fix the build/install scripts so that // this can become a CHECK(). Known examples include chrome // OS developer builds and linux install packages. // Tracked as crbug.com/70402 . - if (PathService::Get(base_path_id_, &base_path_)) { + if (base::PathService::Get(base_path_id_, &base_path_)) { ReadExternalExtensionPrefFile(prefs.get()); if (!prefs->empty())
diff --git a/chrome/browser/extensions/external_provider_impl_unittest.cc b/chrome/browser/extensions/external_provider_impl_unittest.cc index d154419..13ee682 100644 --- a/chrome/browser/extensions/external_provider_impl_unittest.cc +++ b/chrome/browser/extensions/external_provider_impl_unittest.cc
@@ -131,7 +131,7 @@ } if (url.path() == kAppPath) { base::FilePath test_data_dir; - PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir); + base::PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir); std::string contents; base::ReadFileToString( test_data_dir.AppendASCII("extensions/dummyiap.crx"),
diff --git a/chrome/browser/extensions/lazy_background_page_apitest.cc b/chrome/browser/extensions/lazy_background_page_apitest.cc index acaff7d7..0d5f0493 100644 --- a/chrome/browser/extensions/lazy_background_page_apitest.cc +++ b/chrome/browser/extensions/lazy_background_page_apitest.cc
@@ -329,7 +329,7 @@ { base::FilePath extdir; base::ScopedAllowBlockingForTesting allow_blocking; - ASSERT_TRUE(PathService::Get(chrome::DIR_GEN_TEST_DATA, &extdir)); + ASSERT_TRUE(base::PathService::Get(chrome::DIR_GEN_TEST_DATA, &extdir)); extdir = extdir.AppendASCII("ppapi/tests/extensions/load_unload/newlib"); LazyBackgroundObserver page_complete; ASSERT_TRUE(LoadExtension(extdir)); @@ -366,7 +366,7 @@ { base::FilePath extdir; base::ScopedAllowBlockingForTesting allow_blocking; - ASSERT_TRUE(PathService::Get(chrome::DIR_GEN_TEST_DATA, &extdir)); + ASSERT_TRUE(base::PathService::Get(chrome::DIR_GEN_TEST_DATA, &extdir)); extdir = extdir.AppendASCII("ppapi/tests/extensions/popup/newlib"); ResultCatcher catcher; const Extension* extension = LoadExtension(extdir);
diff --git a/chrome/browser/extensions/pack_extension_unittest.cc b/chrome/browser/extensions/pack_extension_unittest.cc index 59a770b..40baeb4 100644 --- a/chrome/browser/extensions/pack_extension_unittest.cc +++ b/chrome/browser/extensions/pack_extension_unittest.cc
@@ -20,7 +20,7 @@ class PackExtensionTest : public testing::Test { public: PackExtensionTest() { - PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir_); + base::PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir_); test_data_dir_ = test_data_dir_.AppendASCII("extensions"); }
diff --git a/chrome/browser/extensions/plugin_manager.cc b/chrome/browser/extensions/plugin_manager.cc index 9f86623..06ddedcf 100644 --- a/chrome/browser/extensions/plugin_manager.cc +++ b/chrome/browser/extensions/plugin_manager.cc
@@ -144,7 +144,7 @@ // MIME type to plugins which handle NaCl modules in order to allow the // individual modules to handle these types. base::FilePath path; - if (!PathService::Get(chrome::FILE_NACL_PLUGIN, &path)) + if (!base::PathService::Get(chrome::FILE_NACL_PLUGIN, &path)) return; const content::PepperPluginInfo* pepper_info = PluginService::GetInstance()->GetRegisteredPpapiPluginInfo(path);
diff --git a/chrome/browser/extensions/process_manager_browsertest.cc b/chrome/browser/extensions/process_manager_browsertest.cc index c2ae44c8..94a48c2 100644 --- a/chrome/browser/extensions/process_manager_browsertest.cc +++ b/chrome/browser/extensions/process_manager_browsertest.cc
@@ -1107,7 +1107,7 @@ // open a <webview> when it's loaded. ASSERT_TRUE(embedded_test_server()->Start()); base::FilePath dir; - PathService::Get(chrome::DIR_TEST_DATA, &dir); + base::PathService::Get(chrome::DIR_TEST_DATA, &dir); dir = dir.AppendASCII("extensions") .AppendASCII("platform_apps") .AppendASCII("web_view")
diff --git a/chrome/browser/extensions/startup_helper_browsertest.cc b/chrome/browser/extensions/startup_helper_browsertest.cc index 6703aea..b8855bd 100644 --- a/chrome/browser/extensions/startup_helper_browsertest.cc +++ b/chrome/browser/extensions/startup_helper_browsertest.cc
@@ -22,7 +22,7 @@ void SetUpCommandLine(base::CommandLine* command_line) override { command_line->AppendSwitch(switches::kNoStartupWindow); - PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir_); + base::PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir_); test_data_dir_ = test_data_dir_.AppendASCII("extensions"); InProcessBrowserTest::SetUpCommandLine(command_line); }
diff --git a/chrome/browser/extensions/updater/chromeos_extension_cache_delegate.cc b/chrome/browser/extensions/updater/chromeos_extension_cache_delegate.cc index 135dcb6e..35400d2b 100644 --- a/chrome/browser/extensions/updater/chromeos_extension_cache_delegate.cc +++ b/chrome/browser/extensions/updater/chromeos_extension_cache_delegate.cc
@@ -14,8 +14,8 @@ namespace extensions { ChromeOSExtensionCacheDelegate::ChromeOSExtensionCacheDelegate() { - CHECK(PathService::Get(chromeos::DIR_DEVICE_EXTENSION_LOCAL_CACHE, - &cache_dir_)); + CHECK(base::PathService::Get(chromeos::DIR_DEVICE_EXTENSION_LOCAL_CACHE, + &cache_dir_)); } ChromeOSExtensionCacheDelegate::ChromeOSExtensionCacheDelegate(
diff --git a/chrome/browser/extensions/user_script_listener_unittest.cc b/chrome/browser/extensions/user_script_listener_unittest.cc index 7358e3d..0182176 100644 --- a/chrome/browser/extensions/user_script_listener_unittest.cc +++ b/chrome/browser/extensions/user_script_listener_unittest.cc
@@ -95,7 +95,7 @@ scoped_refptr<Extension> LoadExtension(const std::string& filename, std::string* error) { base::FilePath path; - PathService::Get(chrome::DIR_TEST_DATA, &path); + base::PathService::Get(chrome::DIR_TEST_DATA, &path); path = path. AppendASCII("extensions"). AppendASCII("manifest_tests"). @@ -198,7 +198,7 @@ void LoadTestExtension() { base::FilePath test_dir; - ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_dir)); + ASSERT_TRUE(base::PathService::Get(chrome::DIR_TEST_DATA, &test_dir)); base::FilePath extension_path = test_dir .AppendASCII("extensions") .AppendASCII("good")
diff --git a/chrome/browser/extensions/webstore_installer.cc b/chrome/browser/extensions/webstore_installer.cc index 6ea2da1e..e8460ea 100644 --- a/chrome/browser/extensions/webstore_installer.cc +++ b/chrome/browser/extensions/webstore_installer.cc
@@ -581,7 +581,7 @@ MaybeAppendAuthUserParameter(approval_->authuser, &download_url_); base::FilePath user_data_dir; - PathService::Get(chrome::DIR_USER_DATA, &user_data_dir); + base::PathService::Get(chrome::DIR_USER_DATA, &user_data_dir); base::FilePath download_path = user_data_dir.Append(kWebstoreDownloadFolder); base::FilePath download_directory(g_download_directory_for_tests ?
diff --git a/chrome/browser/extensions/window_open_apitest.cc b/chrome/browser/extensions/window_open_apitest.cc index 9f09710..f6f9adef 100644 --- a/chrome/browser/extensions/window_open_apitest.cc +++ b/chrome/browser/extensions/window_open_apitest.cc
@@ -140,7 +140,7 @@ IN_PROC_BROWSER_TEST_F(WindowOpenApiTest, WindowOpenPopupIframe) { base::FilePath test_data_dir; - PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir); + base::PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir); embedded_test_server()->ServeFilesFromDirectory(test_data_dir); ASSERT_TRUE(StartEmbeddedTestServer()); ASSERT_TRUE(LoadExtension(
diff --git a/chrome/browser/extensions/zipfile_installer_unittest.cc b/chrome/browser/extensions/zipfile_installer_unittest.cc index 0159e28..98fbaa5 100644 --- a/chrome/browser/extensions/zipfile_installer_unittest.cc +++ b/chrome/browser/extensions/zipfile_installer_unittest.cc
@@ -137,7 +137,7 @@ void RunInstaller(const std::string& zip_name, bool expect_error) { base::FilePath original_path; - ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &original_path)); + ASSERT_TRUE(base::PathService::Get(chrome::DIR_TEST_DATA, &original_path)); original_path = original_path.AppendASCII("extensions") .AppendASCII("zipfile_installer") .AppendASCII(zip_name);
diff --git a/chrome/browser/file_select_helper_unittest.cc b/chrome/browser/file_select_helper_unittest.cc index 93443945..8fe4b75 100644 --- a/chrome/browser/file_select_helper_unittest.cc +++ b/chrome/browser/file_select_helper_unittest.cc
@@ -28,7 +28,7 @@ protected: void SetUp() override { - ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &data_dir_)); + ASSERT_TRUE(base::PathService::Get(chrome::DIR_TEST_DATA, &data_dir_)); data_dir_ = data_dir_.AppendASCII("file_select_helper"); ASSERT_TRUE(base::PathExists(data_dir_)); }
diff --git a/chrome/browser/first_run/first_run.cc b/chrome/browser/first_run/first_run.cc index 76117ba..79d6f211 100644 --- a/chrome/browser/first_run/first_run.cc +++ b/chrome/browser/first_run/first_run.cc
@@ -372,7 +372,7 @@ bool GetFirstRunSentinelFilePath(base::FilePath* path) { base::FilePath user_data_dir; - if (!PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)) + if (!base::PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)) return false; *path = user_data_dir.Append(chrome::kFirstRunSentinel); return true;
diff --git a/chrome/browser/first_run/first_run_internal_linux.cc b/chrome/browser/first_run/first_run_internal_linux.cc index f2441e2..c6766661 100644 --- a/chrome/browser/first_run/first_run_internal_linux.cc +++ b/chrome/browser/first_run/first_run_internal_linux.cc
@@ -20,7 +20,7 @@ base::FilePath MasterPrefsPath() { // The standard location of the master prefs is next to the chrome binary. base::FilePath master_prefs; - if (!PathService::Get(base::DIR_EXE, &master_prefs)) + if (!base::PathService::Get(base::DIR_EXE, &master_prefs)) return base::FilePath(); return master_prefs.AppendASCII(installer::kDefaultMasterPrefs); }
diff --git a/chrome/browser/first_run/first_run_internal_posix.cc b/chrome/browser/first_run/first_run_internal_posix.cc index 3af5f979..ec17ddf 100644 --- a/chrome/browser/first_run/first_run_internal_posix.cc +++ b/chrome/browser/first_run/first_run_internal_posix.cc
@@ -51,7 +51,7 @@ #endif base::FilePath local_state_path; - PathService::Get(chrome::FILE_LOCAL_STATE, &local_state_path); + base::PathService::Get(chrome::FILE_LOCAL_STATE, &local_state_path); if (base::PathExists(local_state_path)) return false;
diff --git a/chrome/browser/first_run/first_run_internal_win.cc b/chrome/browser/first_run/first_run_internal_win.cc index 1da4593..ef08159e 100644 --- a/chrome/browser/first_run/first_run_internal_win.cc +++ b/chrome/browser/first_run/first_run_internal_win.cc
@@ -43,7 +43,7 @@ bool LaunchSetupForEula(const base::FilePath::StringType& value, int* ret_code) { base::FilePath exe_dir; - if (!PathService::Get(base::DIR_MODULE, &exe_dir)) + if (!base::PathService::Get(base::DIR_MODULE, &exe_dir)) return false; exe_dir = exe_dir.Append(installer::kInstallerDir); base::FilePath exe_path = exe_dir.Append(installer::kSetupExe); @@ -157,7 +157,7 @@ base::FilePath MasterPrefsPath() { // The standard location of the master prefs is next to the chrome binary. base::FilePath master_prefs; - if (!PathService::Get(base::DIR_EXE, &master_prefs)) + if (!base::PathService::Get(base::DIR_EXE, &master_prefs)) return base::FilePath(); return master_prefs.AppendASCII(installer::kDefaultMasterPrefs); }
diff --git a/chrome/browser/first_run/first_run_unittest.cc b/chrome/browser/first_run/first_run_unittest.cc index 5698942..d3ef9ff 100644 --- a/chrome/browser/first_run/first_run_unittest.cc +++ b/chrome/browser/first_run/first_run_unittest.cc
@@ -139,7 +139,7 @@ first_run::CreateSentinelIfNeeded(); // Gets the creation time of the first run sentinel. base::FilePath user_data_dir; - PathService::Get(chrome::DIR_USER_DATA, &user_data_dir); + base::PathService::Get(chrome::DIR_USER_DATA, &user_data_dir); base::File::Info info; ASSERT_TRUE(base::GetFileInfo(user_data_dir.Append(chrome::kFirstRunSentinel), &info)); @@ -149,7 +149,7 @@ TEST_F(FirstRunTest, GetFirstRunSentinelCreationTime_NotCreated) { base::FilePath user_data_dir; - PathService::Get(chrome::DIR_USER_DATA, &user_data_dir); + base::PathService::Get(chrome::DIR_USER_DATA, &user_data_dir); base::File::Info info; ASSERT_FALSE(base::GetFileInfo( user_data_dir.Append(chrome::kFirstRunSentinel), &info));
diff --git a/chrome/browser/first_run/upgrade_util_linux.cc b/chrome/browser/first_run/upgrade_util_linux.cc index 65e4f95..7396dc6 100644 --- a/chrome/browser/first_run/upgrade_util_linux.cc +++ b/chrome/browser/first_run/upgrade_util_linux.cc
@@ -38,7 +38,7 @@ double GetLastModifiedTimeOfExe() { base::FilePath exe_file_path; - if (!PathService::Get(base::FILE_EXE, &exe_file_path)) { + if (!base::PathService::Get(base::FILE_EXE, &exe_file_path)) { LOG(WARNING) << "Failed to get base::FilePath object for FILE_EXE."; return saved_last_modified_time_of_exe; }
diff --git a/chrome/browser/first_run/upgrade_util_win.cc b/chrome/browser/first_run/upgrade_util_win.cc index af75420..b87e19b 100644 --- a/chrome/browser/first_run/upgrade_util_win.cc +++ b/chrome/browser/first_run/upgrade_util_win.cc
@@ -46,7 +46,7 @@ namespace { bool GetNewerChromeFile(base::FilePath* path) { - if (!PathService::Get(base::DIR_EXE, path)) + if (!base::PathService::Get(base::DIR_EXE, path)) return false; *path = path->Append(installer::kChromeNewExe); return true; @@ -81,7 +81,7 @@ bool RelaunchChromeBrowser(const base::CommandLine& command_line) { base::FilePath chrome_exe; - if (!PathService::Get(base::FILE_EXE, &chrome_exe)) { + if (!base::PathService::Get(base::FILE_EXE, &chrome_exe)) { NOTREACHED(); return false; }
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc index 11b40d03..3735a1e 100644 --- a/chrome/browser/flag_descriptions.cc +++ b/chrome/browser/flag_descriptions.cc
@@ -707,6 +707,12 @@ "An experimental full screen with keyboard lock mode requiring users to " "hold Esc to exit."; +const char kExperimentalProductivityFeaturesName[] = + "Experimental Productivity Features"; +const char kExperimentalProductivityFeaturesDescription[] = + "Enable support for experimental developer productivity features, such as " + "Layered APIs and policies for avoiding slow rendering."; + const char kExperimentalSecurityFeaturesName[] = "Potentially annoying security features"; const char kExperimentalSecurityFeaturesDescription[] = @@ -3026,6 +3032,14 @@ const char kEnableInputImeApiDescription[] = "Enable the use of chrome.input.ime API."; +#if !defined(OS_CHROMEOS) + +const char kWarnBeforeQuittingFlagName[] = "Warn Before Quitting"; +const char kWarnBeforeQuittingFlagDescription[] = + "Confirm to quit by either holding the quit shortcut or pressing it twice."; + +#endif // !defined(OS_CHROMEOS) + #endif // defined(OS_WIN) || defined(OS_LINUX) #if defined(OS_WIN) || defined(OS_MACOSX)
diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h index 9949be4..a37dc74 100644 --- a/chrome/browser/flag_descriptions.h +++ b/chrome/browser/flag_descriptions.h
@@ -455,6 +455,9 @@ extern const char kExperimentalKeyboardLockUiName[]; extern const char kExperimentalKeyboardLockUiDescription[]; +extern const char kExperimentalProductivityFeaturesName[]; +extern const char kExperimentalProductivityFeaturesDescription[]; + extern const char kExperimentalSecurityFeaturesName[]; extern const char kExperimentalSecurityFeaturesDescription[]; @@ -1851,6 +1854,13 @@ extern const char kEnableInputImeApiName[]; extern const char kEnableInputImeApiDescription[]; +#if !defined(OS_CHROMEOS) + +extern const char kWarnBeforeQuittingFlagName[]; +extern const char kWarnBeforeQuittingFlagDescription[]; + +#endif // !defined(OS_CHROMEOS) + #endif // defined(OS_WIN) || defined(OS_LINUX) #if defined(OS_WIN) || defined(OS_MACOSX)
diff --git a/chrome/browser/google/google_update_settings_posix.cc b/chrome/browser/google/google_update_settings_posix.cc index d6de41e..292e42de 100644 --- a/chrome/browser/google/google_update_settings_posix.cc +++ b/chrome/browser/google/google_update_settings_posix.cc
@@ -59,7 +59,7 @@ // static bool GoogleUpdateSettings::GetCollectStatsConsent() { base::FilePath consent_file; - PathService::Get(chrome::DIR_USER_DATA, &consent_file); + base::PathService::Get(chrome::DIR_USER_DATA, &consent_file); consent_file = consent_file.Append(kConsentToSendStats); if (!base::DirectoryExists(consent_file.DirName())) @@ -83,7 +83,7 @@ #endif base::FilePath consent_dir; - PathService::Get(chrome::DIR_USER_DATA, &consent_dir); + base::PathService::Get(chrome::DIR_USER_DATA, &consent_dir); if (!base::DirectoryExists(consent_dir)) return false;
diff --git a/chrome/browser/google/google_update_settings_unittest.cc b/chrome/browser/google/google_update_settings_unittest.cc index c78235d1..1bd1852 100644 --- a/chrome/browser/google/google_update_settings_unittest.cc +++ b/chrome/browser/google/google_update_settings_unittest.cc
@@ -86,7 +86,7 @@ EXPECT_TRUE(GoogleUpdateSettings::SetCollectStatsConsent(true)); base::FilePath consent_dir; - ASSERT_TRUE(PathService::Get(chrome::DIR_USER_DATA, &consent_dir)); + ASSERT_TRUE(base::PathService::Get(chrome::DIR_USER_DATA, &consent_dir)); ASSERT_TRUE(base::DirectoryExists(consent_dir)); base::FilePath consent_file = consent_dir.Append("Consent To Send Stats");
diff --git a/chrome/browser/google/google_update_win.cc b/chrome/browser/google/google_update_win.cc index df33d514..6a1eda72 100644 --- a/chrome/browser/google/google_update_win.cc +++ b/chrome/browser/google/google_update_win.cc
@@ -490,7 +490,7 @@ // Instantiate GoogleUpdate3Web{Machine,User}Class. if (!google_update_) { base::FilePath chrome_exe; - if (!PathService::Get(base::DIR_EXE, &chrome_exe)) + if (!base::PathService::Get(base::DIR_EXE, &chrome_exe)) NOTREACHED(); system_level_install_ = !InstallUtil::IsPerUserInstall();
diff --git a/chrome/browser/google/google_update_win_unittest.cc b/chrome/browser/google/google_update_win_unittest.cc index c9146aa..7bce75e 100644 --- a/chrome/browser/google/google_update_win_unittest.cc +++ b/chrome/browser/google/google_update_win_unittest.cc
@@ -546,7 +546,7 @@ // Override FILE_EXE so that it looks like the test is running from the // standard install location for this mode (system-level or user-level). base::FilePath file_exe; - ASSERT_TRUE(PathService::Get(base::FILE_EXE, &file_exe)); + ASSERT_TRUE(base::PathService::Get(base::FILE_EXE, &file_exe)); base::FilePath install_dir( installer::GetChromeInstallPath(system_level_install_)); file_exe_override_.reset(new base::ScopedPathOverride( @@ -556,13 +556,13 @@ // Override these paths so that they can be found after the registry // override manager is in place. base::FilePath temp; - PathService::Get(base::DIR_PROGRAM_FILES, &temp); + base::PathService::Get(base::DIR_PROGRAM_FILES, &temp); program_files_override_.reset( new base::ScopedPathOverride(base::DIR_PROGRAM_FILES, temp)); - PathService::Get(base::DIR_PROGRAM_FILESX86, &temp); + base::PathService::Get(base::DIR_PROGRAM_FILESX86, &temp); program_files_x86_override_.reset( new base::ScopedPathOverride(base::DIR_PROGRAM_FILESX86, temp)); - PathService::Get(base::DIR_LOCAL_APP_DATA, &temp); + base::PathService::Get(base::DIR_LOCAL_APP_DATA, &temp); local_app_data_override_.reset( new base::ScopedPathOverride(base::DIR_LOCAL_APP_DATA, temp)); @@ -672,8 +672,8 @@ // non-standard location. base::FilePath file_exe; base::FilePath dir_temp; - ASSERT_TRUE(PathService::Get(base::FILE_EXE, &file_exe)); - ASSERT_TRUE(PathService::Get(base::DIR_TEMP, &dir_temp)); + ASSERT_TRUE(base::PathService::Get(base::FILE_EXE, &file_exe)); + ASSERT_TRUE(base::PathService::Get(base::DIR_TEMP, &dir_temp)); file_exe_override_.reset(); file_exe_override_.reset(new base::ScopedPathOverride( base::FILE_EXE, dir_temp.Append(file_exe.BaseName()),
diff --git a/chrome/browser/history/android/android_urls_database_unittest.cc b/chrome/browser/history/android/android_urls_database_unittest.cc index f59d983e..21c0a33 100644 --- a/chrome/browser/history/android/android_urls_database_unittest.cc +++ b/chrome/browser/history/android/android_urls_database_unittest.cc
@@ -27,7 +27,7 @@ profile_.reset(new TestingProfile); base::FilePath data_path; - ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &data_path)); + ASSERT_TRUE(base::PathService::Get(chrome::DIR_TEST_DATA, &data_path)); data_path = data_path.AppendASCII("History"); history_db_name_ = profile_->GetPath().Append(kHistoryFilename);
diff --git a/chrome/browser/importer/edge_importer_browsertest_win.cc b/chrome/browser/importer/edge_importer_browsertest_win.cc index 1742658b..74fc5c4c 100644 --- a/chrome/browser/importer/edge_importer_browsertest_win.cc +++ b/chrome/browser/importer/edge_importer_browsertest_win.cc
@@ -198,7 +198,7 @@ kEdgeFaviconGroup, kEdgeFaviconGroup + arraysize(kEdgeFaviconGroup)); base::FilePath data_path; - ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &data_path)); + ASSERT_TRUE(base::PathService::Get(chrome::DIR_TEST_DATA, &data_path)); data_path = data_path.AppendASCII("edge_profile"); base::FilePath temp_path = temp_dir_.GetPath(); @@ -242,7 +242,7 @@ kEdgeFaviconGroup, kEdgeFaviconGroup + arraysize(kEdgeFaviconGroup)); base::FilePath data_path; - ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &data_path)); + ASSERT_TRUE(base::PathService::Get(chrome::DIR_TEST_DATA, &data_path)); data_path = data_path.AppendASCII("edge_profile"); {
diff --git a/chrome/browser/importer/firefox_importer_browsertest.cc b/chrome/browser/importer/firefox_importer_browsertest.cc index f2f9dcc5..3ab2558 100644 --- a/chrome/browser/importer/firefox_importer_browsertest.cc +++ b/chrome/browser/importer/firefox_importer_browsertest.cc
@@ -286,11 +286,11 @@ importer::ImporterProgressObserver* observer, ProfileWriter* writer) { base::FilePath data_path; - ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &data_path)); + ASSERT_TRUE(base::PathService::Get(chrome::DIR_TEST_DATA, &data_path)); data_path = data_path.AppendASCII(profile_dir); ASSERT_TRUE(base::CopyDirectory(data_path, profile_path_, true)); - ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &data_path)); + ASSERT_TRUE(base::PathService::Get(chrome::DIR_TEST_DATA, &data_path)); data_path = data_path.AppendASCII("firefox3_nss"); ASSERT_TRUE(base::CopyDirectory(data_path, profile_path_, false)); @@ -305,7 +305,7 @@ base::CreateDirectory(custom_search_engine_path); // Copy over search engines. - ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &data_path)); + ASSERT_TRUE(base::PathService::Get(chrome::DIR_TEST_DATA, &data_path)); data_path = data_path.AppendASCII("firefox_searchplugins"); base::FilePath default_search_engine_source_path = data_path.AppendASCII("default");
diff --git a/chrome/browser/load_library_perf_test.cc b/chrome/browser/load_library_perf_test.cc index 3424836..a2d0707 100644 --- a/chrome/browser/load_library_perf_test.cc +++ b/chrome/browser/load_library_perf_test.cc
@@ -31,7 +31,7 @@ const base::FilePath& library_relative_dir, const base::FilePath& library_name) { base::FilePath output_dir; - ASSERT_TRUE(PathService::Get(base::DIR_MODULE, &output_dir)); + ASSERT_TRUE(base::PathService::Get(base::DIR_MODULE, &output_dir)); output_dir = output_dir.Append(library_relative_dir); base::FilePath library_path = output_dir.Append(library_name); ASSERT_TRUE(base::PathExists(library_path)) << library_path.value();
diff --git a/chrome/browser/loader/chrome_resource_dispatcher_host_delegate_browsertest.cc b/chrome/browser/loader/chrome_resource_dispatcher_host_delegate_browsertest.cc index 2b17790..20e9ad3f 100644 --- a/chrome/browser/loader/chrome_resource_dispatcher_host_delegate_browsertest.cc +++ b/chrome/browser/loader/chrome_resource_dispatcher_host_delegate_browsertest.cc
@@ -474,7 +474,7 @@ prefs::kGoogleServicesUserAccountId, "account_id"); base::FilePath root_http; - PathService::Get(chrome::DIR_TEST_DATA, &root_http); + base::PathService::Get(chrome::DIR_TEST_DATA, &root_http); root_http = root_http.AppendASCII("mirror_request_header"); struct TestCase {
diff --git a/chrome/browser/local_discovery/service_discovery_shared_client.cc b/chrome/browser/local_discovery/service_discovery_shared_client.cc index cdaa3e55..88561686 100644 --- a/chrome/browser/local_discovery/service_discovery_shared_client.cc +++ b/chrome/browser/local_discovery/service_discovery_shared_client.cc
@@ -38,7 +38,7 @@ #if defined(OS_WIN) void ReportFirewallStats() { base::FilePath exe_path; - if (!PathService::Get(base::FILE_EXE, &exe_path)) + if (!base::PathService::Get(base::FILE_EXE, &exe_path)) return; base::ElapsedTimer timer; std::unique_ptr<installer::FirewallManager> manager =
diff --git a/chrome/browser/mac/relauncher.mm b/chrome/browser/mac/relauncher.mm index 2521b2c..32fbc9f 100644 --- a/chrome/browser/mac/relauncher.mm +++ b/chrome/browser/mac/relauncher.mm
@@ -82,7 +82,7 @@ // helper process, because there's no guarantee that the updated version's // relauncher implementation will be compatible with the running version's. base::FilePath child_path; - if (!PathService::Get(content::CHILD_PROCESS_EXE, &child_path)) { + if (!base::PathService::Get(content::CHILD_PROCESS_EXE, &child_path)) { LOG(ERROR) << "No CHILD_PROCESS_EXE"; return false; }
diff --git a/chrome/browser/media/media_engagement_autoplay_browsertest.cc b/chrome/browser/media/media_engagement_autoplay_browsertest.cc index eecb5e1..bf499cb 100644 --- a/chrome/browser/media/media_engagement_autoplay_browsertest.cc +++ b/chrome/browser/media/media_engagement_autoplay_browsertest.cc
@@ -161,7 +161,7 @@ // Get the path to the "generator" binary in the module path. base::FilePath module_dir; - EXPECT_TRUE(PathService::Get(base::DIR_MODULE, &module_dir)); + EXPECT_TRUE(base::PathService::Get(base::DIR_MODULE, &module_dir)); // Launch the generator and wait for it to finish. base::CommandLine cmd(GetPythonPath()); @@ -180,7 +180,7 @@ void ApplyEmptyPreloadedList() { // Get the path relative to the source root. base::FilePath source_root; - EXPECT_TRUE(PathService::Get(base::DIR_SOURCE_ROOT, &source_root)); + EXPECT_TRUE(base::PathService::Get(base::DIR_SOURCE_ROOT, &source_root)); base::ScopedAllowBlockingForTesting allow_blocking; EXPECT_TRUE(MediaEngagementPreloadedList::GetInstance()->LoadFromFile(
diff --git a/chrome/browser/media/media_engagement_preloaded_list_unittest.cc b/chrome/browser/media/media_engagement_preloaded_list_unittest.cc index 31f0a4f..75ace4e 100644 --- a/chrome/browser/media/media_engagement_preloaded_list_unittest.cc +++ b/chrome/browser/media/media_engagement_preloaded_list_unittest.cc
@@ -38,9 +38,9 @@ base::FilePath GetModulePath() { base::FilePath module_dir; #if defined(OS_ANDROID) - EXPECT_TRUE(PathService::Get(base::DIR_SOURCE_ROOT, &module_dir)); + EXPECT_TRUE(base::PathService::Get(base::DIR_SOURCE_ROOT, &module_dir)); #else - EXPECT_TRUE(PathService::Get(base::DIR_MODULE, &module_dir)); + EXPECT_TRUE(base::PathService::Get(base::DIR_MODULE, &module_dir)); #endif return module_dir; }
diff --git a/chrome/browser/media/webrtc/webrtc_apprtc_browsertest.cc b/chrome/browser/media/webrtc/webrtc_apprtc_browsertest.cc index b029655..86c027a 100644 --- a/chrome/browser/media/webrtc/webrtc_apprtc_browsertest.cc +++ b/chrome/browser/media/webrtc/webrtc_apprtc_browsertest.cc
@@ -199,7 +199,7 @@ base::FilePath GetSourceDir() { base::FilePath source_dir; - PathService::Get(base::DIR_SOURCE_ROOT, &source_dir); + base::PathService::Get(base::DIR_SOURCE_ROOT, &source_dir); return source_dir; }
diff --git a/chrome/browser/media/webrtc/webrtc_browsertest_audio.cc b/chrome/browser/media/webrtc/webrtc_browsertest_audio.cc index 041cfa5..500fbec 100644 --- a/chrome/browser/media/webrtc/webrtc_browsertest_audio.cc +++ b/chrome/browser/media/webrtc/webrtc_browsertest_audio.cc
@@ -82,8 +82,7 @@ file_parameters->Reset( media::AudioParameters::AUDIO_PCM_LOW_LATENCY, media::GuessChannelLayout(wav_audio_handler->num_channels()), - wav_audio_handler->sample_rate(), wav_audio_handler->bits_per_sample(), - wav_audio_handler->total_frames()); + wav_audio_handler->sample_rate(), wav_audio_handler->total_frames()); file_parameters->set_channels_for_discrete(wav_audio_handler->num_channels()); return power_monitor.ReadCurrentPowerAndClip().first;
diff --git a/chrome/browser/media/webrtc/webrtc_browsertest_base.cc b/chrome/browser/media/webrtc/webrtc_browsertest_base.cc index b49ae90..ed10bf1 100644 --- a/chrome/browser/media/webrtc/webrtc_browsertest_base.cc +++ b/chrome/browser/media/webrtc/webrtc_browsertest_base.cc
@@ -764,7 +764,7 @@ if (!desktop_capture_extension_.get()) { extensions::ChromeTestExtensionLoader loader(browser()->profile()); base::FilePath extension_path; - EXPECT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &extension_path)); + EXPECT_TRUE(base::PathService::Get(chrome::DIR_TEST_DATA, &extension_path)); extension_path = extension_path.AppendASCII("extensions/desktop_capture"); desktop_capture_extension_ = loader.LoadExtension(extension_path); LOG(INFO) << "Loaded desktop capture extension, id = "
diff --git a/chrome/browser/media/webrtc/webrtc_browsertest_common.cc b/chrome/browser/media/webrtc/webrtc_browsertest_common.cc index 00105e3..5a52dc70 100644 --- a/chrome/browser/media/webrtc/webrtc_browsertest_common.cc +++ b/chrome/browser/media/webrtc/webrtc_browsertest_common.cc
@@ -50,7 +50,7 @@ base::FilePath GetReferenceFilesDir() { base::FilePath test_data_dir; - PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir); + base::PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir); return test_data_dir.Append(kReferenceFilesDirName); }
diff --git a/chrome/browser/media/webrtc/webrtc_video_quality_browsertest.cc b/chrome/browser/media/webrtc/webrtc_video_quality_browsertest.cc index eda6c34..8fde3e73 100644 --- a/chrome/browser/media/webrtc/webrtc_video_quality_browsertest.cc +++ b/chrome/browser/media/webrtc/webrtc_video_quality_browsertest.cc
@@ -324,13 +324,13 @@ private: base::FilePath GetSourceDir() { base::FilePath source_dir; - PathService::Get(base::DIR_SOURCE_ROOT, &source_dir); + base::PathService::Get(base::DIR_SOURCE_ROOT, &source_dir); return source_dir; } base::FilePath GetBrowserDir() { base::FilePath browser_dir; - EXPECT_TRUE(PathService::Get(base::DIR_MODULE, &browser_dir)); + EXPECT_TRUE(base::PathService::Get(base::DIR_MODULE, &browser_dir)); return browser_dir; }
diff --git a/chrome/browser/media/wv_test_license_server_config.cc b/chrome/browser/media/wv_test_license_server_config.cc index 6d65988..f8d3b1f 100644 --- a/chrome/browser/media/wv_test_license_server_config.cc +++ b/chrome/browser/media/wv_test_license_server_config.cc
@@ -149,7 +149,7 @@ void WVTestLicenseServerConfig::GetLicenseServerRootPath( base::FilePath* path) { base::FilePath source_root; - PathService::Get(base::DIR_SOURCE_ROOT, &source_root); + base::PathService::Get(base::DIR_SOURCE_ROOT, &source_root); *path = source_root.Append(FILE_PATH_LITERAL("third_party")) .Append(FILE_PATH_LITERAL("widevine")) .Append(FILE_PATH_LITERAL("test"))
diff --git a/chrome/browser/media_galleries/fileapi/media_file_validator_browsertest.cc b/chrome/browser/media_galleries/fileapi/media_file_validator_browsertest.cc index fea64e8..80ec88c 100644 --- a/chrome/browser/media_galleries/fileapi/media_file_validator_browsertest.cc +++ b/chrome/browser/media_galleries/fileapi/media_file_validator_browsertest.cc
@@ -64,7 +64,7 @@ base::FilePath GetMediaTestDir() { base::FilePath test_file; - if (!PathService::Get(base::DIR_SOURCE_ROOT, &test_file)) + if (!base::PathService::Get(base::DIR_SOURCE_ROOT, &test_file)) return base::FilePath(); return test_file.AppendASCII("media").AppendASCII("test").AppendASCII("data"); }
diff --git a/chrome/browser/media_galleries/media_file_system_registry_unittest.cc b/chrome/browser/media_galleries/media_file_system_registry_unittest.cc index a53a42e1..2be9c73 100644 --- a/chrome/browser/media_galleries/media_file_system_registry_unittest.cc +++ b/chrome/browser/media_galleries/media_file_system_registry_unittest.cc
@@ -1057,11 +1057,11 @@ // on the test platform. In ChromeOS, these directories do not exist. base::FilePath path; if (num_auto_galleries() > 0) { - ASSERT_TRUE(PathService::Get(chrome::DIR_USER_MUSIC, &path)); + ASSERT_TRUE(base::PathService::Get(chrome::DIR_USER_MUSIC, &path)); profile_state->AddNameForAllCompare(GetExpectedFolderName(path)); - ASSERT_TRUE(PathService::Get(chrome::DIR_USER_PICTURES, &path)); + ASSERT_TRUE(base::PathService::Get(chrome::DIR_USER_PICTURES, &path)); profile_state->AddNameForAllCompare(GetExpectedFolderName(path)); - ASSERT_TRUE(PathService::Get(chrome::DIR_USER_VIDEOS, &path)); + ASSERT_TRUE(base::PathService::Get(chrome::DIR_USER_VIDEOS, &path)); profile_state->AddNameForAllCompare(GetExpectedFolderName(path)); profile_state->CheckGalleries("names-dir", one_expectation, auto_galleries);
diff --git a/chrome/browser/media_galleries/media_galleries_permission_controller.cc b/chrome/browser/media_galleries/media_galleries_permission_controller.cc index 08299df..72bfee8 100644 --- a/chrome/browser/media_galleries/media_galleries_permission_controller.cc +++ b/chrome/browser/media_galleries/media_galleries_permission_controller.cc
@@ -207,7 +207,7 @@ extensions::file_system_api::GetLastChooseEntryDirectory( extensions::ExtensionPrefs::Get(GetProfile()), extension_->id()); if (default_path.empty()) - PathService::Get(base::DIR_USER_DESKTOP, &default_path); + base::PathService::Get(base::DIR_USER_DESKTOP, &default_path); select_folder_dialog_ = ui::SelectFileDialog::Create( this, std::make_unique<ChromeSelectFilePolicy>(nullptr)); select_folder_dialog_->SelectFile(
diff --git a/chrome/browser/media_galleries/media_galleries_preferences.cc b/chrome/browser/media_galleries/media_galleries_preferences.cc index d9aaa21..7390d00 100644 --- a/chrome/browser/media_galleries/media_galleries_preferences.cc +++ b/chrome/browser/media_galleries/media_galleries_preferences.cc
@@ -401,7 +401,8 @@ #if defined(OS_CHROMEOS) // See chrome/browser/chromeos/fileapi/file_system_backend.cc base::FilePath download_path; - if (PathService::Get(chrome::DIR_DEFAULT_DOWNLOADS_SAFE, &download_path)) { + if (base::PathService::Get(chrome::DIR_DEFAULT_DOWNLOADS_SAFE, + &download_path)) { base::FilePath relative; if (download_path.AppendRelativePath(path, &relative)) return relative.LossyDisplayName(); @@ -508,7 +509,7 @@ for (size_t i = 0; i < arraysize(kDirectories); ++i) { base::FilePath path; - if (!PathService::Get(kDirectories[i].directory_key, &path)) + if (!base::PathService::Get(kDirectories[i].directory_key, &path)) continue; base::FilePath relative_path; @@ -906,11 +907,12 @@ base::FilePath music_path; base::FilePath pictures_path; base::FilePath videos_path; - bool got_music_path = PathService::Get(chrome::DIR_USER_MUSIC, &music_path); + bool got_music_path = + base::PathService::Get(chrome::DIR_USER_MUSIC, &music_path); bool got_pictures_path = - PathService::Get(chrome::DIR_USER_PICTURES, &pictures_path); + base::PathService::Get(chrome::DIR_USER_PICTURES, &pictures_path); bool got_videos_path = - PathService::Get(chrome::DIR_USER_VIDEOS, &videos_path); + base::PathService::Get(chrome::DIR_USER_VIDEOS, &videos_path); PrefService* prefs = profile_->GetPrefs(); std::unique_ptr<ListPrefUpdate> update(
diff --git a/chrome/browser/media_galleries/media_galleries_preferences_unittest.cc b/chrome/browser/media_galleries/media_galleries_preferences_unittest.cc index 717f6f8..f3fe09b 100644 --- a/chrome/browser/media_galleries/media_galleries_preferences_unittest.cc +++ b/chrome/browser/media_galleries/media_galleries_preferences_unittest.cc
@@ -1240,11 +1240,12 @@ base::FilePath music_path; base::FilePath pictures_path; base::FilePath videos_path; - bool got_music_path = PathService::Get(chrome::DIR_USER_MUSIC, &music_path); + bool got_music_path = + base::PathService::Get(chrome::DIR_USER_MUSIC, &music_path); bool got_pictures_path = - PathService::Get(chrome::DIR_USER_PICTURES, &pictures_path); + base::PathService::Get(chrome::DIR_USER_PICTURES, &pictures_path); bool got_videos_path = - PathService::Get(chrome::DIR_USER_VIDEOS, &videos_path); + base::PathService::Get(chrome::DIR_USER_VIDEOS, &videos_path); int num_default_galleries = 0; @@ -1296,11 +1297,11 @@ base::FilePath old_pictures_path; base::FilePath old_videos_path; bool got_old_music_path = - PathService::Get(chrome::DIR_USER_MUSIC, &old_music_path); + base::PathService::Get(chrome::DIR_USER_MUSIC, &old_music_path); bool got_old_pictures_path = - PathService::Get(chrome::DIR_USER_PICTURES, &old_pictures_path); + base::PathService::Get(chrome::DIR_USER_PICTURES, &old_pictures_path); bool got_old_videos_path = - PathService::Get(chrome::DIR_USER_VIDEOS, &old_videos_path); + base::PathService::Get(chrome::DIR_USER_VIDEOS, &old_videos_path); bool found_music = false; bool found_pictures = false; @@ -1347,11 +1348,11 @@ base::FilePath new_pictures_path; base::FilePath new_videos_path; bool got_new_music_path = - PathService::Get(chrome::DIR_USER_MUSIC, &new_music_path); + base::PathService::Get(chrome::DIR_USER_MUSIC, &new_music_path); bool got_new_pictures_path = - PathService::Get(chrome::DIR_USER_PICTURES, &new_pictures_path); + base::PathService::Get(chrome::DIR_USER_PICTURES, &new_pictures_path); bool got_new_videos_path = - PathService::Get(chrome::DIR_USER_VIDEOS, &new_videos_path); + base::PathService::Get(chrome::DIR_USER_VIDEOS, &new_videos_path); EXPECT_NE(new_music_path, old_music_path); EXPECT_NE(new_pictures_path, old_pictures_path); @@ -1421,11 +1422,12 @@ base::FilePath music_path; base::FilePath pictures_path; base::FilePath videos_path; - bool got_music_path = PathService::Get(chrome::DIR_USER_MUSIC, &music_path); + bool got_music_path = + base::PathService::Get(chrome::DIR_USER_MUSIC, &music_path); bool got_pictures_path = - PathService::Get(chrome::DIR_USER_PICTURES, &pictures_path); + base::PathService::Get(chrome::DIR_USER_PICTURES, &pictures_path); bool got_videos_path = - PathService::Get(chrome::DIR_USER_VIDEOS, &videos_path); + base::PathService::Get(chrome::DIR_USER_VIDEOS, &videos_path); bool found_music = false; bool found_pictures = false;
diff --git a/chrome/browser/memory_details_win.cc b/chrome/browser/memory_details_win.cc index 11515e7..050620d 100644 --- a/chrome/browser/memory_details_win.cc +++ b/chrome/browser/memory_details_win.cc
@@ -30,7 +30,7 @@ MemoryDetails::MemoryDetails() { base::FilePath browser_process_path; - PathService::Get(base::FILE_EXE, &browser_process_path); + base::PathService::Get(base::FILE_EXE, &browser_process_path); ProcessData process; process.name = l10n_util::GetStringUTF16(IDS_PRODUCT_NAME);
diff --git a/chrome/browser/metrics/antivirus_metrics_provider_win.cc b/chrome/browser/metrics/antivirus_metrics_provider_win.cc index 205b329..7f164fb 100644 --- a/chrome/browser/metrics/antivirus_metrics_provider_win.cc +++ b/chrome/browser/metrics/antivirus_metrics_provider_win.cc
@@ -481,7 +481,7 @@ // Rapport always installs into 32-bit Program Files in directory // %DIR_PROGRAM_FILESX86%\Trusteer\Rapport base::FilePath binary_path; - if (!PathService::Get(base::DIR_PROGRAM_FILESX86, &binary_path)) + if (!base::PathService::Get(base::DIR_PROGRAM_FILESX86, &binary_path)) return; binary_path = binary_path.AppendASCII("Trusteer")
diff --git a/chrome/browser/metrics/chrome_stability_metrics_provider.cc b/chrome/browser/metrics/chrome_stability_metrics_provider.cc index e1fd325..42acea2 100644 --- a/chrome/browser/metrics/chrome_stability_metrics_provider.cc +++ b/chrome/browser/metrics/chrome_stability_metrics_provider.cc
@@ -98,7 +98,7 @@ } #endif helper_.LogRendererCrash(was_extension_process, process_info->status, - process_info->exit_code); + process_info->exit_code, process_info->uptime); break; }
diff --git a/chrome/browser/metrics/desktop_session_duration/audible_contents_tracker_browsertest.cc b/chrome/browser/metrics/desktop_session_duration/audible_contents_tracker_browsertest.cc index 37823f0f..033d973 100644 --- a/chrome/browser/metrics/desktop_session_duration/audible_contents_tracker_browsertest.cc +++ b/chrome/browser/metrics/desktop_session_duration/audible_contents_tracker_browsertest.cc
@@ -72,7 +72,7 @@ // Add a request handler for serving audio. base::FilePath test_data_dir; - ASSERT_TRUE(PathService::Get(base::DIR_SOURCE_ROOT, &test_data_dir)); + ASSERT_TRUE(base::PathService::Get(base::DIR_SOURCE_ROOT, &test_data_dir)); embedded_test_server()->ServeFilesFromDirectory( test_data_dir.AppendASCII("chrome/test/data/")); // Start the test server after adding the request handler for thread safety.
diff --git a/chrome/browser/metrics/metrics_service_browsertest.cc b/chrome/browser/metrics/metrics_service_browsertest.cc index 18397a5..fbd9d10 100644 --- a/chrome/browser/metrics/metrics_service_browsertest.cc +++ b/chrome/browser/metrics/metrics_service_browsertest.cc
@@ -122,7 +122,7 @@ ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION; base::FilePath test_directory; - ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_directory)); + ASSERT_TRUE(base::PathService::Get(chrome::DIR_TEST_DATA, &test_directory)); base::FilePath page1_path = test_directory.AppendASCII("title2.html"); ui_test_utils::NavigateToURLWithDisposition(
diff --git a/chrome/browser/metrics/testing/metrics_reporting_pref_helper.cc b/chrome/browser/metrics/testing/metrics_reporting_pref_helper.cc index 1bdd104..dd3423b 100644 --- a/chrome/browser/metrics/testing/metrics_reporting_pref_helper.cc +++ b/chrome/browser/metrics/testing/metrics_reporting_pref_helper.cc
@@ -47,7 +47,7 @@ is_enabled); base::FilePath user_data_dir; - if (!PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)) + if (!base::PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)) return base::FilePath(); #if defined(OS_CHROMEOS)
diff --git a/chrome/browser/nacl_host/nacl_browser_delegate_impl.cc b/chrome/browser/nacl_host/nacl_browser_delegate_impl.cc index 1de6640..f9ac1ac 100644 --- a/chrome/browser/nacl_host/nacl_browser_delegate_impl.cc +++ b/chrome/browser/nacl_host/nacl_browser_delegate_impl.cc
@@ -74,22 +74,22 @@ bool NaClBrowserDelegateImpl::GetCacheDirectory(base::FilePath* cache_dir) { base::FilePath user_data_dir; - if (!PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)) + if (!base::PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)) return false; chrome::GetUserCacheDirectory(user_data_dir, cache_dir); return true; } bool NaClBrowserDelegateImpl::GetPluginDirectory(base::FilePath* plugin_dir) { - return PathService::Get(chrome::DIR_INTERNAL_PLUGINS, plugin_dir); + return base::PathService::Get(chrome::DIR_INTERNAL_PLUGINS, plugin_dir); } bool NaClBrowserDelegateImpl::GetPnaclDirectory(base::FilePath* pnacl_dir) { - return PathService::Get(chrome::DIR_PNACL_COMPONENT, pnacl_dir); + return base::PathService::Get(chrome::DIR_PNACL_COMPONENT, pnacl_dir); } bool NaClBrowserDelegateImpl::GetUserDirectory(base::FilePath* user_dir) { - return PathService::Get(chrome::DIR_USER_DATA, user_dir); + return base::PathService::Get(chrome::DIR_USER_DATA, user_dir); } std::string NaClBrowserDelegateImpl::GetVersionString() const {
diff --git a/chrome/browser/nacl_host/test/gdb_debug_stub_browsertest.cc b/chrome/browser/nacl_host/test/gdb_debug_stub_browsertest.cc index ae6f097..b208a60e 100644 --- a/chrome/browser/nacl_host/test/gdb_debug_stub_browsertest.cc +++ b/chrome/browser/nacl_host/test/gdb_debug_stub_browsertest.cc
@@ -41,7 +41,7 @@ // We call python script to reuse GDB RSP protocol implementation. base::CommandLine cmd(base::FilePath(FILE_PATH_LITERAL("python"))); base::FilePath script; - PathService::Get(chrome::DIR_TEST_DATA, &script); + base::PathService::Get(chrome::DIR_TEST_DATA, &script); script = script.AppendASCII("nacl/debug_stub_browser_tests.py"); cmd.AppendArgPath(script); cmd.AppendArg(base::IntToString(debug_stub_port));
diff --git a/chrome/browser/nacl_host/test/nacl_gdb_browsertest.cc b/chrome/browser/nacl_host/test/nacl_gdb_browsertest.cc index 80141fb..ddad81f 100644 --- a/chrome/browser/nacl_host/test/nacl_gdb_browsertest.cc +++ b/chrome/browser/nacl_host/test/nacl_gdb_browsertest.cc
@@ -34,7 +34,7 @@ PPAPINaClNewlibTest::SetUpCommandLine(command_line); base::FilePath mock_nacl_gdb; - EXPECT_TRUE(PathService::Get(base::DIR_EXE, &mock_nacl_gdb)); + EXPECT_TRUE(base::PathService::Get(base::DIR_EXE, &mock_nacl_gdb)); mock_nacl_gdb = mock_nacl_gdb.Append(kMockNaClGdb); command_line->AppendSwitchPath(switches::kNaClGdb, mock_nacl_gdb); EXPECT_TRUE(base::CreateTemporaryFile(&script_));
diff --git a/chrome/browser/net/chrome_network_delegate.cc b/chrome/browser/net/chrome_network_delegate.cc index 511d85e..68b06dd 100644 --- a/chrome/browser/net/chrome_network_delegate.cc +++ b/chrome/browser/net/chrome_network_delegate.cc
@@ -165,7 +165,8 @@ #elif defined(OS_ANDROID) // Access to files in external storage is allowed. base::FilePath external_storage_path; - PathService::Get(base::DIR_ANDROID_EXTERNAL_STORAGE, &external_storage_path); + base::PathService::Get(base::DIR_ANDROID_EXTERNAL_STORAGE, + &external_storage_path); if (external_storage_path.IsParent(path)) return true;
diff --git a/chrome/browser/net/chrome_network_delegate_browsertest.cc b/chrome/browser/net/chrome_network_delegate_browsertest.cc index d19a21f..01493090a 100644 --- a/chrome/browser/net/chrome_network_delegate_browsertest.cc +++ b/chrome/browser/net/chrome_network_delegate_browsertest.cc
@@ -39,7 +39,7 @@ // via file: scheme is rejected with ERR_ACCESS_DENIED. IN_PROC_BROWSER_TEST_F(ChromeNetworkDelegateBrowserTest, AccessToFile) { base::FilePath test_dir; - ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_dir)); + ASSERT_TRUE(base::PathService::Get(chrome::DIR_TEST_DATA, &test_dir)); base::FilePath test_file = test_dir.AppendASCII("empty.html"); ASSERT_FALSE( ChromeNetworkDelegate::IsAccessAllowed(test_file, base::FilePath())); @@ -58,13 +58,13 @@ // ERR_ACCESS_DENIED. IN_PROC_BROWSER_TEST_F(ChromeNetworkDelegateBrowserTest, AccessToSymlink) { base::FilePath test_dir; - ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_dir)); + ASSERT_TRUE(base::PathService::Get(chrome::DIR_TEST_DATA, &test_dir)); base::FilePath test_file = test_dir.AppendASCII("empty.html"); ASSERT_FALSE( ChromeNetworkDelegate::IsAccessAllowed(test_file, base::FilePath())); base::FilePath temp_dir; - ASSERT_TRUE(PathService::Get(base::DIR_TEMP, &temp_dir)); + ASSERT_TRUE(base::PathService::Get(base::DIR_TEMP, &temp_dir)); base::ScopedTempDir scoped_temp_dir; ASSERT_TRUE(scoped_temp_dir.CreateUniqueTempDirUnderPath(temp_dir)); base::FilePath symlink = scoped_temp_dir.GetPath().AppendASCII("symlink");
diff --git a/chrome/browser/net/chrome_network_delegate_unittest.cc b/chrome/browser/net/chrome_network_delegate_unittest.cc index 3418ef2d..e4b2df2 100644 --- a/chrome/browser/net/chrome_network_delegate_unittest.cc +++ b/chrome/browser/net/chrome_network_delegate_unittest.cc
@@ -609,7 +609,7 @@ #if defined(OS_CHROMEOS) base::FilePath temp_dir; - ASSERT_TRUE(PathService::Get(base::DIR_TEMP, &temp_dir)); + ASSERT_TRUE(base::PathService::Get(base::DIR_TEMP, &temp_dir)); // Chrome OS allows the following directories. EXPECT_TRUE(IsAccessAllowed("/home/chronos/user/Downloads", "")); EXPECT_TRUE(IsAccessAllowed("/home/chronos/user/log", "")); @@ -642,7 +642,8 @@ // Files in external storage are allowed. base::FilePath external_storage_path; - PathService::Get(base::DIR_ANDROID_EXTERNAL_STORAGE, &external_storage_path); + base::PathService::Get(base::DIR_ANDROID_EXTERNAL_STORAGE, + &external_storage_path); EXPECT_TRUE(IsAccessAllowed( external_storage_path.AppendASCII("foo.txt").AsUTF8Unsafe(), "")); // The external storage root itself is not allowed.
diff --git a/chrome/browser/net/dns_probe_browsertest.cc b/chrome/browser/net/dns_probe_browsertest.cc index 9ce0468..31235f30 100644 --- a/chrome/browser/net/dns_probe_browsertest.cc +++ b/chrome/browser/net/dns_probe_browsertest.cc
@@ -110,7 +110,7 @@ FilePath GetMockLinkDoctorFilePath() { FilePath root_http; - PathService::Get(chrome::DIR_TEST_DATA, &root_http); + base::PathService::Get(chrome::DIR_TEST_DATA, &root_http); return root_http.AppendASCII("mock-link-doctor.json"); }
diff --git a/chrome/browser/net/url_request_mock_util.cc b/chrome/browser/net/url_request_mock_util.cc index 78824398..8532920 100644 --- a/chrome/browser/net/url_request_mock_util.cc +++ b/chrome/browser/net/url_request_mock_util.cc
@@ -39,7 +39,7 @@ net::URLRequestSlowDownloadJob::AddUrlHandler(); base::FilePath root_http; - PathService::Get(chrome::DIR_TEST_DATA, &root_http); + base::PathService::Get(chrome::DIR_TEST_DATA, &root_http); net::URLRequestMockHTTPJob::AddUrlHandlers(root_http); } else { // Revert to the default handlers. @@ -59,7 +59,7 @@ return false; base::FilePath file_path; - PathService::Get(chrome::DIR_TEST_DATA, &file_path); + base::PathService::Get(chrome::DIR_TEST_DATA, &file_path); file_path = file_path.AppendASCII(path); std::string contents;
diff --git a/chrome/browser/notifications/notification_helper_launches_chrome_unittest.cc b/chrome/browser/notifications/notification_helper_launches_chrome_unittest.cc index d793754..c44f839d 100644 --- a/chrome/browser/notifications/notification_helper_launches_chrome_unittest.cc +++ b/chrome/browser/notifications/notification_helper_launches_chrome_unittest.cc
@@ -211,7 +211,7 @@ // test executable, as the test build target has a data_deps dependency on // it. base::FilePath dir_exe; - ASSERT_TRUE(PathService::Get(base::DIR_EXE, &dir_exe)); + ASSERT_TRUE(base::PathService::Get(base::DIR_EXE, &dir_exe)); base::FilePath notification_helper_path = dir_exe.Append(installer::kNotificationHelperExe);
diff --git a/chrome/browser/notifications/notification_platform_bridge_win_interactive_uitest.cc b/chrome/browser/notifications/notification_platform_bridge_win_interactive_uitest.cc index 4814906..78a5f10 100644 --- a/chrome/browser/notifications/notification_platform_bridge_win_interactive_uitest.cc +++ b/chrome/browser/notifications/notification_platform_bridge_win_interactive_uitest.cc
@@ -66,7 +66,7 @@ Profile* CreateTestingProfile(const std::string& profile_name) { base::FilePath path; - PathService::Get(chrome::DIR_USER_DATA, &path); + base::PathService::Get(chrome::DIR_USER_DATA, &path); path = path.AppendASCII(profile_name); return CreateTestingProfile(path); }
diff --git a/chrome/browser/notifications/platform_notification_service_interactive_uitest.cc b/chrome/browser/notifications/platform_notification_service_interactive_uitest.cc index 3a055bd7..1773f332 100644 --- a/chrome/browser/notifications/platform_notification_service_interactive_uitest.cc +++ b/chrome/browser/notifications/platform_notification_service_interactive_uitest.cc
@@ -623,7 +623,7 @@ // This case should fail because a file URL is used. base::FilePath dir_source_root; - EXPECT_TRUE(PathService::Get(base::DIR_SOURCE_ROOT, &dir_source_root)); + EXPECT_TRUE(base::PathService::Get(base::DIR_SOURCE_ROOT, &dir_source_root)); base::FilePath full_file_path = dir_source_root.Append(server_root_).AppendASCII(kTestFileName); GURL file_url(net::FilePathToFileURL(full_file_path));
diff --git a/chrome/browser/offline_pages/android/offline_page_model_factory.cc b/chrome/browser/offline_pages/android/offline_page_model_factory.cc index 7247d001..791f0c6 100644 --- a/chrome/browser/offline_pages/android/offline_page_model_factory.cc +++ b/chrome/browser/offline_pages/android/offline_page_model_factory.cc
@@ -55,7 +55,7 @@ base::FilePath persistent_archives_dir = profile->GetPath().Append(chrome::kOfflinePageArchivesDirname); - // If PathService::Get returns false, the temporary_archives_dir will be + // If base::PathService::Get returns false, the temporary_archives_dir will be // empty, and no temporary pages will be saved during this chrome lifecycle. base::FilePath temporary_archives_dir; if (PathService::Get(base::DIR_CACHE, &temporary_archives_dir)) {
diff --git a/chrome/browser/offline_pages/offline_page_mhtml_archiver_unittest.cc b/chrome/browser/offline_pages/offline_page_mhtml_archiver_unittest.cc index 4c7f0fd..8d04667 100644 --- a/chrome/browser/offline_pages/offline_page_mhtml_archiver_unittest.cc +++ b/chrome/browser/offline_pages/offline_page_mhtml_archiver_unittest.cc
@@ -179,7 +179,8 @@ void OfflinePageMHTMLArchiverTest::SetUp() { base::FilePath test_data_dir_path; - ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir_path)); + ASSERT_TRUE( + base::PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir_path)); archive_dir_path_ = test_data_dir_path.AppendASCII("offline_pages"); }
diff --git a/chrome/browser/offline_pages/offline_page_request_job_unittest.cc b/chrome/browser/offline_pages/offline_page_request_job_unittest.cc index 3900d635..ab82af5 100644 --- a/chrome/browser/offline_pages/offline_page_request_job_unittest.cc +++ b/chrome/browser/offline_pages/offline_page_request_job_unittest.cc
@@ -585,7 +585,7 @@ // model's maintenance tasks must not be executed in the meantime otherwise // these files will be wiped by consistency checks. base::FilePath test_data_dir_path; - PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir_path); + base::PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir_path); base::FilePath test_data_private_archives_dir = test_data_dir_path.AppendASCII(kPrivateOfflineFileDir); ASSERT_TRUE(base::CopyDirectory(test_data_private_archives_dir,
diff --git a/chrome/browser/offline_pages/test_offline_page_model_builder.cc b/chrome/browser/offline_pages/test_offline_page_model_builder.cc index 88ebfd3..8644bb07 100644 --- a/chrome/browser/offline_pages/test_offline_page_model_builder.cc +++ b/chrome/browser/offline_pages/test_offline_page_model_builder.cc
@@ -37,7 +37,7 @@ base::FilePath private_archives_dir = context->GetPath().Append(chrome::kOfflinePageArchivesDirname); base::FilePath public_archives_dir("/sdcard/Download"); - // If PathService::Get returns false, the temporary_archives_dir will be + // If base::PathService::Get returns false, the temporary_archives_dir will be // empty, and no temporary pages will be saved during this chrome lifecycle. base::FilePath temporary_archives_dir; if (PathService::Get(base::DIR_CACHE, &temporary_archives_dir)) {
diff --git a/chrome/browser/password_manager/password_manager_browsertest.cc b/chrome/browser/password_manager/password_manager_browsertest.cc index 685f3b6e..fbd9002 100644 --- a/chrome/browser/password_manager/password_manager_browsertest.cc +++ b/chrome/browser/password_manager/password_manager_browsertest.cc
@@ -105,7 +105,7 @@ GURL GetFileURL(const char* filename) { base::ScopedAllowBlockingForTesting allow_blocking; base::FilePath path; - PathService::Get(chrome::DIR_TEST_DATA, &path); + base::PathService::Get(chrome::DIR_TEST_DATA, &path); path = path.AppendASCII("password").AppendASCII(filename); CHECK(base::PathExists(path)); return net::FilePathToFileURL(path);
diff --git a/chrome/browser/pdf/pdf_extension_test.cc b/chrome/browser/pdf/pdf_extension_test.cc index 55ae52d..80411b4 100644 --- a/chrome/browser/pdf/pdf_extension_test.cc +++ b/chrome/browser/pdf/pdf_extension_test.cc
@@ -164,13 +164,13 @@ { base::ScopedAllowBlockingForTesting allow_blocking; base::FilePath test_data_dir; - PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir); + base::PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir); test_data_dir = test_data_dir.Append(FILE_PATH_LITERAL("pdf")); base::FilePath test_util_path = test_data_dir.AppendASCII("test_util.js"); ASSERT_TRUE(base::ReadFileToString(test_util_path, &test_util_js)); base::FilePath source_root_dir; - PathService::Get(base::DIR_SOURCE_ROOT, &source_root_dir); + base::PathService::Get(base::DIR_SOURCE_ROOT, &source_root_dir); base::FilePath mock_interactions_path = source_root_dir.Append( FILE_PATH_LITERAL("third_party/polymer/v1_0/components-chromium/" "iron-test-helpers/mock-interactions.js")); @@ -230,7 +230,7 @@ void LoadAllPdfsTest(const std::string& dir_name, int k) { base::ScopedAllowBlockingForTesting allow_blocking; base::FilePath test_data_dir; - ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir)); + ASSERT_TRUE(base::PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir)); base::FileEnumerator file_enumerator(test_data_dir.AppendASCII(dir_name), false, base::FileEnumerator::FILES, FILE_PATH_LITERAL("*.pdf")); @@ -588,7 +588,7 @@ { base::ScopedAllowBlockingForTesting allow_blocking; base::FilePath test_data_dir; - ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir)); + ASSERT_TRUE(base::PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir)); test_data_dir = test_data_dir.Append(FILE_PATH_LITERAL("pdf")); base::FilePath test_data_file = test_data_dir.AppendASCII("test.pdf"); ASSERT_TRUE(PathExists(test_data_file));
diff --git a/chrome/browser/plugins/flash_permission_browsertest.cc b/chrome/browser/plugins/flash_permission_browsertest.cc index c50f67bc..36539ff 100644 --- a/chrome/browser/plugins/flash_permission_browsertest.cc +++ b/chrome/browser/plugins/flash_permission_browsertest.cc
@@ -195,7 +195,7 @@ IN_PROC_BROWSER_TEST_F(FlashPermissionBrowserTest, AllowFileURL) { base::FilePath test_path; - PathService::Get(chrome::DIR_TEST_DATA, &test_path); + base::PathService::Get(chrome::DIR_TEST_DATA, &test_path); ui_test_utils::NavigateToURL( browser(), GURL("file://" + test_path.AsUTF8Unsafe() + test_url())); CommonSucceedsIfAllowed(); @@ -210,7 +210,7 @@ IN_PROC_BROWSER_TEST_F(FlashPermissionBrowserTest, BlockFileURL) { base::FilePath test_path; - PathService::Get(chrome::DIR_TEST_DATA, &test_path); + base::PathService::Get(chrome::DIR_TEST_DATA, &test_path); ui_test_utils::NavigateToURL( browser(), GURL("file://" + test_path.AsUTF8Unsafe() + test_url())); CommonFailsIfBlocked();
diff --git a/chrome/browser/plugins/plugin_prefs.cc b/chrome/browser/plugins/plugin_prefs.cc index b08000e..9e8c985 100644 --- a/chrome/browser/plugins/plugin_prefs.cc +++ b/chrome/browser/plugins/plugin_prefs.cc
@@ -121,7 +121,7 @@ base::FilePath last_internal_dir = prefs_->GetFilePath(prefs::kPluginsLastInternalDirectory); base::FilePath cur_internal_dir; - if (PathService::Get(chrome::DIR_INTERNAL_PLUGINS, &cur_internal_dir) && + if (base::PathService::Get(chrome::DIR_INTERNAL_PLUGINS, &cur_internal_dir) && cur_internal_dir != last_internal_dir) { update_internal_dir = true; prefs_->SetFilePath( @@ -256,7 +256,7 @@ plugins_list->Clear(); base::FilePath internal_dir; - if (PathService::Get(chrome::DIR_INTERNAL_PLUGINS, &internal_dir)) + if (base::PathService::Get(chrome::DIR_INTERNAL_PLUGINS, &internal_dir)) prefs_->SetFilePath(prefs::kPluginsLastInternalDirectory, internal_dir); base::AutoLock auto_lock(lock_);
diff --git a/chrome/browser/plugins/plugin_prefs_factory.cc b/chrome/browser/plugins/plugin_prefs_factory.cc index f97c9f7..769ff02 100644 --- a/chrome/browser/plugins/plugin_prefs_factory.cc +++ b/chrome/browser/plugins/plugin_prefs_factory.cc
@@ -54,7 +54,7 @@ void PluginPrefsFactory::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { base::FilePath internal_dir; - PathService::Get(chrome::DIR_INTERNAL_PLUGINS, &internal_dir); + base::PathService::Get(chrome::DIR_INTERNAL_PLUGINS, &internal_dir); registry->RegisterFilePathPref(prefs::kPluginsLastInternalDirectory, internal_dir); registry->RegisterListPref(prefs::kPluginsPluginsList);
diff --git a/chrome/browser/policy/chrome_browser_policy_connector.cc b/chrome/browser/policy/chrome_browser_policy_connector.cc index 1bff9b0..0a94d60 100644 --- a/chrome/browser/policy/chrome_browser_policy_connector.cc +++ b/chrome/browser/policy/chrome_browser_policy_connector.cc
@@ -62,7 +62,7 @@ std::unique_ptr<MachineLevelUserCloudPolicyManager> CreateMachineLevelUserCloudPolicyManager() { base::FilePath user_data_dir; - if (!PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)) + if (!base::PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)) return nullptr; DVLOG(1) << "Creating machine level cloud policy manager"; @@ -213,7 +213,7 @@ std::move(loader)); #elif defined(OS_POSIX) && !defined(OS_ANDROID) base::FilePath config_dir_path; - if (PathService::Get(chrome::DIR_POLICY_FILES, &config_dir_path)) { + if (base::PathService::Get(chrome::DIR_POLICY_FILES, &config_dir_path)) { std::unique_ptr<AsyncPolicyLoader> loader(new ConfigDirPolicyLoader( base::CreateSequencedTaskRunnerWithTraits( {base::MayBlock(), base::TaskPriority::BACKGROUND}),
diff --git a/chrome/browser/policy/cloud/cloud_policy_browsertest.cc b/chrome/browser/policy/cloud/cloud_policy_browsertest.cc index 7981def..42c93d7 100644 --- a/chrome/browser/policy/cloud/cloud_policy_browsertest.cc +++ b/chrome/browser/policy/cloud/cloud_policy_browsertest.cc
@@ -259,8 +259,8 @@ #if defined(OS_CHROMEOS) // Get the path to the user policy key file. base::FilePath user_policy_key_dir; - ASSERT_TRUE( - PathService::Get(chromeos::DIR_USER_POLICY_KEYS, &user_policy_key_dir)); + ASSERT_TRUE(base::PathService::Get(chromeos::DIR_USER_POLICY_KEYS, + &user_policy_key_dir)); std::string sanitized_username = chromeos::CryptohomeClient::GetStubSanitizedUsername( cryptohome::Identification(
diff --git a/chrome/browser/policy/cloud/component_cloud_policy_browsertest.cc b/chrome/browser/policy/cloud/component_cloud_policy_browsertest.cc index 0c6504b..488c8ce 100644 --- a/chrome/browser/policy/cloud/component_cloud_policy_browsertest.cc +++ b/chrome/browser/policy/cloud/component_cloud_policy_browsertest.cc
@@ -153,7 +153,7 @@ scoped_refptr<const extensions::Extension> LoadExtension( const base::FilePath::CharType* path) { base::FilePath full_path; - if (!PathService::Get(chrome::DIR_TEST_DATA, &full_path)) { + if (!base::PathService::Get(chrome::DIR_TEST_DATA, &full_path)) { ADD_FAILURE(); return NULL; }
diff --git a/chrome/browser/policy/cloud/machine_level_user_cloud_policy_browsertest.cc b/chrome/browser/policy/cloud/machine_level_user_cloud_policy_browsertest.cc index afd6adc..efff73a 100644 --- a/chrome/browser/policy/cloud/machine_level_user_cloud_policy_browsertest.cc +++ b/chrome/browser/policy/cloud/machine_level_user_cloud_policy_browsertest.cc
@@ -306,7 +306,7 @@ CombinedSchemaRegistry schema_registry; CloudPolicyStoreObserverStub observer; - PathService::Get(chrome::DIR_USER_DATA, &user_data_dir); + base::PathService::Get(chrome::DIR_USER_DATA, &user_data_dir); std::unique_ptr<MachineLevelUserCloudPolicyStore> policy_store = MachineLevelUserCloudPolicyStore::Create(
diff --git a/chrome/browser/policy/policy_browsertest.cc b/chrome/browser/policy/policy_browsertest.cc index 63e05dfa..bb13e68 100644 --- a/chrome/browser/policy/policy_browsertest.cc +++ b/chrome/browser/policy/policy_browsertest.cc
@@ -328,7 +328,8 @@ #endif void GetTestDataDirectory(base::FilePath* test_data_directory) { - ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, test_data_directory)); + ASSERT_TRUE( + base::PathService::Get(chrome::DIR_TEST_DATA, test_data_directory)); } // Filters requests to the hosts in |urls| and redirects them to the test data
diff --git a/chrome/browser/policy/test/local_policy_test_server.cc b/chrome/browser/policy/test/local_policy_test_server.cc index 2633e0ce..cbb7d63 100644 --- a/chrome/browser/policy/test/local_policy_test_server.cc +++ b/chrome/browser/policy/test/local_policy_test_server.cc
@@ -76,7 +76,7 @@ // Read configuration from a file in chrome/test/data/policy. base::ScopedAllowBlockingForTesting allow_blocking; base::FilePath source_root; - CHECK(PathService::Get(base::DIR_SOURCE_ROOT, &source_root)); + CHECK(base::PathService::Get(base::DIR_SOURCE_ROOT, &source_root)); config_file_ = source_root .AppendASCII("chrome") .AppendASCII("test") @@ -189,7 +189,7 @@ // We need protobuf python bindings. base::FilePath third_party_dir; - if (!PathService::Get(base::DIR_SOURCE_ROOT, &third_party_dir)) { + if (!base::PathService::Get(base::DIR_SOURCE_ROOT, &third_party_dir)) { LOG(ERROR) << "Failed to get DIR_SOURCE_ROOT"; return false; } @@ -225,7 +225,7 @@ base::FilePath* testserver_path) const { base::ScopedAllowBlockingForTesting allow_blocking; base::FilePath source_root; - if (!PathService::Get(base::DIR_SOURCE_ROOT, &source_root)) { + if (!base::PathService::Get(base::DIR_SOURCE_ROOT, &source_root)) { LOG(ERROR) << "Failed to get DIR_SOURCE_ROOT"; return false; }
diff --git a/chrome/browser/prefs/pref_service_browsertest.cc b/chrome/browser/prefs/pref_service_browsertest.cc index 3729c61..70f2870 100644 --- a/chrome/browser/prefs/pref_service_browsertest.cc +++ b/chrome/browser/prefs/pref_service_browsertest.cc
@@ -47,7 +47,7 @@ public: bool SetUpUserDataDirectory() override { base::FilePath user_data_directory; - PathService::Get(chrome::DIR_USER_DATA, &user_data_directory); + base::PathService::Get(chrome::DIR_USER_DATA, &user_data_directory); original_pref_file_ = ui_test_utils::GetTestFilePath( base::FilePath()
diff --git a/chrome/browser/prefs/tracked/pref_hash_browsertest.cc b/chrome/browser/prefs/tracked/pref_hash_browsertest.cc index 2f76e46..7163747 100644 --- a/chrome/browser/prefs/tracked/pref_hash_browsertest.cc +++ b/chrome/browser/prefs/tracked/pref_hash_browsertest.cc
@@ -80,7 +80,7 @@ } base::FilePath profile_dir; - EXPECT_TRUE(PathService::Get(chrome::DIR_USER_DATA, &profile_dir)); + EXPECT_TRUE(base::PathService::Get(chrome::DIR_USER_DATA, &profile_dir)); // Use a location under the real PreferenceMACs path so that the backup // cleanup logic in ChromeTestLauncherDelegate::PreSharding() for interrupted @@ -234,7 +234,7 @@ #endif base::FilePath profile_dir; - EXPECT_TRUE(PathService::Get(chrome::DIR_USER_DATA, &profile_dir)); + EXPECT_TRUE(base::PathService::Get(chrome::DIR_USER_DATA, &profile_dir)); profile_dir = profile_dir.AppendASCII(TestingProfile::kTestUserProfileDir); // Sanity check that old protected pref file is never present in modern @@ -339,7 +339,7 @@ base::FilePath num_tracked_prefs_file; ASSERT_TRUE( - PathService::Get(chrome::DIR_USER_DATA, &num_tracked_prefs_file)); + base::PathService::Get(chrome::DIR_USER_DATA, &num_tracked_prefs_file)); num_tracked_prefs_file = num_tracked_prefs_file.AppendASCII(kNumTrackedPrefFilename);
diff --git a/chrome/browser/printing/cloud_print/privet_http_unittest.cc b/chrome/browser/printing/cloud_print/privet_http_unittest.cc index b38a906a..d7b19a7 100644 --- a/chrome/browser/printing/cloud_print/privet_http_unittest.cc +++ b/chrome/browser/printing/cloud_print/privet_http_unittest.cc
@@ -1152,7 +1152,7 @@ std::make_unique<EmbeddedTestServer>(EmbeddedTestServer::TYPE_HTTP); base::FilePath test_data_dir; - ASSERT_TRUE(PathService::Get(base::DIR_SOURCE_ROOT, &test_data_dir)); + ASSERT_TRUE(base::PathService::Get(base::DIR_SOURCE_ROOT, &test_data_dir)); server_->ServeFilesFromDirectory( test_data_dir.Append(FILE_PATH_LITERAL("chrome/test/data"))); ASSERT_TRUE(server_->Start());
diff --git a/chrome/browser/printing/print_browsertest.cc b/chrome/browser/printing/print_browsertest.cc index 6947a5b..970f22f 100644 --- a/chrome/browser/printing/print_browsertest.cc +++ b/chrome/browser/printing/print_browsertest.cc
@@ -263,7 +263,7 @@ { base::ScopedAllowBlockingForTesting allow_blocking; base::FilePath test_data_dir; - PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir); + base::PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir); extension = LoadExtension( test_data_dir.AppendASCII("printing").AppendASCII("test_extension")); ASSERT_TRUE(extension);
diff --git a/chrome/browser/printing/printer_manager_dialog_win.cc b/chrome/browser/printing/printer_manager_dialog_win.cc index 983dea7..ab3c245 100644 --- a/chrome/browser/printing/printer_manager_dialog_win.cc +++ b/chrome/browser/printing/printer_manager_dialog_win.cc
@@ -18,7 +18,7 @@ // A helper callback that opens the printer management dialog. void OpenPrintersDialogCallback() { base::FilePath sys_dir; - PathService::Get(base::DIR_SYSTEM, &sys_dir); + base::PathService::Get(base::DIR_SYSTEM, &sys_dir); base::FilePath rundll32 = sys_dir.Append(L"rundll32.exe"); base::FilePath shell32dll = sys_dir.Append(L"shell32.dll");
diff --git a/chrome/browser/printing/printing_layout_browsertest.cc b/chrome/browser/printing/printing_layout_browsertest.cc index a6daff0..978a86f 100644 --- a/chrome/browser/printing/printing_layout_browsertest.cc +++ b/chrome/browser/printing/printing_layout_browsertest.cc
@@ -46,7 +46,7 @@ public: PrintingLayoutTest() { base::FilePath browser_directory; - PathService::Get(chrome::DIR_APP, &browser_directory); + base::PathService::Get(chrome::DIR_APP, &browser_directory); emf_path_ = browser_directory.AppendASCII("metafile_dumps"); }
diff --git a/chrome/browser/printing/pwg_raster_converter_browsertest.cc b/chrome/browser/printing/pwg_raster_converter_browsertest.cc index 3021e459..790d604f 100644 --- a/chrome/browser/printing/pwg_raster_converter_browsertest.cc +++ b/chrome/browser/printing/pwg_raster_converter_browsertest.cc
@@ -45,7 +45,7 @@ void GetPdfData(const char* file_name, base::FilePath* test_data_dir, scoped_refptr<base::RefCountedString>* pdf_data) { - ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, test_data_dir)); + ASSERT_TRUE(base::PathService::Get(chrome::DIR_TEST_DATA, test_data_dir)); *test_data_dir = test_data_dir->AppendASCII("printing"); base::FilePath pdf_file = test_data_dir->AppendASCII(file_name); std::string pdf_data_str;
diff --git a/chrome/browser/process_singleton_browsertest.cc b/chrome/browser/process_singleton_browsertest.cc index 6240eef..ac8aa37 100644 --- a/chrome/browser/process_singleton_browsertest.cc +++ b/chrome/browser/process_singleton_browsertest.cc
@@ -185,7 +185,7 @@ static const int kNbTries = 10; int num_tries = 0; base::FilePath program; - ASSERT_TRUE(PathService::Get(base::FILE_EXE, &program)); + ASSERT_TRUE(base::PathService::Get(base::FILE_EXE, &program)); base::FilePath::StringType exe_name = program.BaseName().value(); while (base::GetProcessCount(exe_name, &process_tree_filter) > 0 && num_tries++ < kNbTries) {
diff --git a/chrome/browser/process_singleton_posix.cc b/chrome/browser/process_singleton_posix.cc index 1dffacdb..330ec23a 100644 --- a/chrome/browser/process_singleton_posix.cc +++ b/chrome/browser/process_singleton_posix.cc
@@ -861,7 +861,7 @@ to_send.push_back(kTokenDelimiter); base::FilePath current_dir; - if (!PathService::Get(base::DIR_CURRENT, ¤t_dir)) + if (!base::PathService::Get(base::DIR_CURRENT, ¤t_dir)) return PROCESS_NONE; to_send.append(current_dir.value());
diff --git a/chrome/browser/profile_resetter/profile_resetter.cc b/chrome/browser/profile_resetter/profile_resetter.cc index fb13d5f8..e37702e 100644 --- a/chrome/browser/profile_resetter/profile_resetter.cc +++ b/chrome/browser/profile_resetter/profile_resetter.cc
@@ -56,7 +56,7 @@ base::AssertBlockingAllowed(); // Get full path of chrome. base::FilePath chrome_exe; - if (!PathService::Get(base::FILE_EXE, &chrome_exe)) + if (!base::PathService::Get(base::FILE_EXE, &chrome_exe)) return; BrowserDistribution* dist = BrowserDistribution::GetDistribution(); for (int location = ShellUtil::SHORTCUT_LOCATION_FIRST; @@ -355,7 +355,7 @@ base::AssertBlockingAllowed(); // Get full path of chrome. base::FilePath chrome_exe; - if (!PathService::Get(base::FILE_EXE, &chrome_exe)) + if (!base::PathService::Get(base::FILE_EXE, &chrome_exe)) return std::vector<ShortcutCommand>(); BrowserDistribution* dist = BrowserDistribution::GetDistribution(); std::vector<ShortcutCommand> shortcuts;
diff --git a/chrome/browser/profile_resetter/profile_resetter_unittest.cc b/chrome/browser/profile_resetter/profile_resetter_unittest.cc index 8da2ac4..57c8bb01 100644 --- a/chrome/browser/profile_resetter/profile_resetter_unittest.cc +++ b/chrome/browser/profile_resetter/profile_resetter_unittest.cc
@@ -275,12 +275,12 @@ const base::string16& args) { EXPECT_TRUE(shortcut_path_.empty()); base::FilePath path_to_create; - EXPECT_TRUE(PathService::Get(base::DIR_USER_DESKTOP, &path_to_create)); + EXPECT_TRUE(base::PathService::Get(base::DIR_USER_DESKTOP, &path_to_create)); path_to_create = path_to_create.Append(name); EXPECT_FALSE(base::PathExists(path_to_create)) << path_to_create.value(); base::FilePath path_exe; - EXPECT_TRUE(PathService::Get(base::FILE_EXE, &path_exe)); + EXPECT_TRUE(base::PathService::Get(base::FILE_EXE, &path_exe)); base::win::ShortcutProperties shortcut_properties; shortcut_properties.set_target(path_exe); shortcut_properties.set_arguments(args);
diff --git a/chrome/browser/profiles/host_zoom_map_browsertest.cc b/chrome/browser/profiles/host_zoom_map_browsertest.cc index 080230d..9cdd3a9 100644 --- a/chrome/browser/profiles/host_zoom_map_browsertest.cc +++ b/chrome/browser/profiles/host_zoom_map_browsertest.cc
@@ -185,7 +185,7 @@ } base::FilePath user_data_directory, path_to_prefs; - PathService::Get(chrome::DIR_USER_DATA, &user_data_directory); + base::PathService::Get(chrome::DIR_USER_DATA, &user_data_directory); path_to_prefs = user_data_directory .AppendASCII(TestingProfile::kTestUserProfileDir) .Append(chrome::kPreferencesFilename);
diff --git a/chrome/browser/profiles/profile.cc b/chrome/browser/profiles/profile.cc index 9d77a6d..a3459df8 100644 --- a/chrome/browser/profiles/profile.cc +++ b/chrome/browser/profiles/profile.cc
@@ -158,7 +158,7 @@ false); #endif base::FilePath home; - PathService::Get(base::DIR_HOME, &home); + base::PathService::Get(base::DIR_HOME, &home); registry->RegisterStringPref(prefs::kSelectFileLastDirectory, home.MaybeAsASCII()); #if !defined(OS_ANDROID)
diff --git a/chrome/browser/profiles/profile_avatar_icon_util.cc b/chrome/browser/profiles/profile_avatar_icon_util.cc index 5b641a4..87ad4ac 100644 --- a/chrome/browser/profiles/profile_avatar_icon_util.cc +++ b/chrome/browser/profiles/profile_avatar_icon_util.cc
@@ -461,7 +461,7 @@ base::FilePath GetPathOfHighResAvatarAtIndex(size_t index) { const char* file_name = GetDefaultAvatarIconFileNameAtIndex(index); base::FilePath user_data_dir; - CHECK(PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)); + CHECK(base::PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)); return user_data_dir.AppendASCII( kHighResAvatarFolderName).AppendASCII(file_name); }
diff --git a/chrome/browser/profiles/profile_browsertest.cc b/chrome/browser/profiles/profile_browsertest.cc index 7616ff5..beb7eb0 100644 --- a/chrome/browser/profiles/profile_browsertest.cc +++ b/chrome/browser/profiles/profile_browsertest.cc
@@ -887,6 +887,6 @@ IN_PROC_BROWSER_TEST_F(ProfileBrowserTest, LastSelectedDirectory) { ProfileImpl* profile_impl = static_cast<ProfileImpl*>(browser()->profile()); base::FilePath home; - PathService::Get(base::DIR_HOME, &home); + base::PathService::Get(base::DIR_HOME, &home); ASSERT_EQ(profile_impl->last_selected_directory(), home); } \ No newline at end of file
diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc index f9d9362..556dd4cb 100644 --- a/chrome/browser/profiles/profile_impl.cc +++ b/chrome/browser/profiles/profile_impl.cc
@@ -1313,7 +1313,7 @@ base::ThreadRestrictions::ScopedAllowIO allow_io; base::FilePath browser_directory; - PathService::Get(base::DIR_CURRENT, &browser_directory); + base::PathService::Get(base::DIR_CURRENT, &browser_directory); GURL home_page(url_formatter::FixupRelativeFile( browser_directory, command_line.GetSwitchValuePath(switches::kHomePage)));
diff --git a/chrome/browser/profiles/profile_io_data.cc b/chrome/browser/profiles/profile_io_data.cc index 208e426..2d884371 100644 --- a/chrome/browser/profiles/profile_io_data.cc +++ b/chrome/browser/profiles/profile_io_data.cc
@@ -250,7 +250,8 @@ return false; base::FilePath inspector_debug_dir; - if (!PathService::Get(chrome::DIR_INSPECTOR_DEBUG, &inspector_debug_dir)) + if (!base::PathService::Get(chrome::DIR_INSPECTOR_DEBUG, + &inspector_debug_dir)) return false; DCHECK(!inspector_debug_dir.empty());
diff --git a/chrome/browser/profiles/profile_manager_browsertest.cc b/chrome/browser/profiles/profile_manager_browsertest.cc index f479ebd4..fb608a7 100644 --- a/chrome/browser/profiles/profile_manager_browsertest.cc +++ b/chrome/browser/profiles/profile_manager_browsertest.cc
@@ -411,7 +411,7 @@ EXPECT_TRUE(last_used_profile != NULL); base::FilePath profile_path; - PathService::Get(chrome::DIR_USER_DATA, &profile_path); + base::PathService::Get(chrome::DIR_USER_DATA, &profile_path); profile_path = profile_path.AppendASCII( std::string(chrome::kProfileDirPrefix) + "test-user-hash");
diff --git a/chrome/browser/profiles/profile_shortcut_manager_unittest_win.cc b/chrome/browser/profiles/profile_shortcut_manager_unittest_win.cc index 1053a59..bc147f62a 100644 --- a/chrome/browser/profiles/profile_shortcut_manager_unittest_win.cc +++ b/chrome/browser/profiles/profile_shortcut_manager_unittest_win.cc
@@ -262,7 +262,7 @@ base::FilePath GetExePath() { base::FilePath exe_path; - EXPECT_TRUE(PathService::Get(base::FILE_EXE, &exe_path)); + EXPECT_TRUE(base::PathService::Get(base::FILE_EXE, &exe_path)); return exe_path; }
diff --git a/chrome/browser/profiles/profile_shortcut_manager_win.cc b/chrome/browser/profiles/profile_shortcut_manager_win.cc index 334d0f6..c807fce 100644 --- a/chrome/browser/profiles/profile_shortcut_manager_win.cc +++ b/chrome/browser/profiles/profile_shortcut_manager_win.cc
@@ -492,7 +492,7 @@ } base::FilePath chrome_exe; - if (!PathService::Get(base::FILE_EXE, &chrome_exe)) { + if (!base::PathService::Get(base::FILE_EXE, &chrome_exe)) { NOTREACHED(); return; } @@ -586,7 +586,7 @@ base::AssertBlockingAllowed(); base::FilePath chrome_exe; - if (!PathService::Get(base::FILE_EXE, &chrome_exe)) { + if (!base::PathService::Get(base::FILE_EXE, &chrome_exe)) { NOTREACHED(); return; } @@ -633,7 +633,7 @@ base::AssertBlockingAllowed(); base::FilePath chrome_exe; - if (!PathService::Get(base::FILE_EXE, &chrome_exe)) { + if (!base::PathService::Get(base::FILE_EXE, &chrome_exe)) { NOTREACHED(); return false; } @@ -856,7 +856,7 @@ base::string16* name, base::FilePath* icon_path) { base::FilePath chrome_exe; - if (!PathService::Get(base::FILE_EXE, &chrome_exe)) { + if (!base::PathService::Get(base::FILE_EXE, &chrome_exe)) { NOTREACHED(); return; }
diff --git a/chrome/browser/renderer_host/render_process_host_chrome_browsertest.cc b/chrome/browser/renderer_host/render_process_host_chrome_browsertest.cc index b7eca3c..b568c07 100644 --- a/chrome/browser/renderer_host/render_process_host_chrome_browsertest.cc +++ b/chrome/browser/renderer_host/render_process_host_chrome_browsertest.cc
@@ -612,7 +612,7 @@ // Set up the server and get the test pages. base::FilePath test_data_dir; - ASSERT_TRUE(PathService::Get(base::DIR_SOURCE_ROOT, &test_data_dir)); + ASSERT_TRUE(base::PathService::Get(base::DIR_SOURCE_ROOT, &test_data_dir)); embedded_test_server()->ServeFilesFromDirectory( test_data_dir.AppendASCII("chrome/test/data/")); audio_url_ = embedded_test_server()->GetURL("/extensions/loop_audio.html");
diff --git a/chrome/browser/resource_coordinator/resource_coordinator_render_process_probe.cc b/chrome/browser/resource_coordinator/resource_coordinator_render_process_probe.cc index fd7b17dc..53eafce1 100644 --- a/chrome/browser/resource_coordinator/resource_coordinator_render_process_probe.cc +++ b/chrome/browser/resource_coordinator/resource_coordinator_render_process_probe.cc
@@ -7,6 +7,7 @@ #include <vector> #include "base/bind.h" +#include "base/values.h" #include "build/build_config.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/render_process_host.h" @@ -26,6 +27,9 @@ constexpr base::TimeDelta kDefaultMeasurementInterval = base::TimeDelta::FromMinutes(10); +base::LazyInstance<ResourceCoordinatorRenderProcessProbe>::DestructorAtExit + g_probe = LAZY_INSTANCE_INITIALIZER; + } // namespace ResourceCoordinatorRenderProcessProbe::RenderProcessInfo::RenderProcessInfo() = @@ -45,8 +49,7 @@ // static ResourceCoordinatorRenderProcessProbe* ResourceCoordinatorRenderProcessProbe::GetInstance() { - static base::NoDestructor<ResourceCoordinatorRenderProcessProbe> probe; - return probe.get(); + return g_probe.Pointer(); } // static @@ -129,24 +132,16 @@ content::BrowserThread::PostTask( content::BrowserThread::IO, FROM_HERE, - base::BindOnce( - &ResourceCoordinatorRenderProcessProbe:: - CollectRenderProcessMetricsAndStartMemoryDumpOnIOThread, - base::Unretained(this))); + base::BindOnce(&ResourceCoordinatorRenderProcessProbe:: + CollectAndDispatchRenderProcessMetricsOnIOThread, + base::Unretained(this))); } void ResourceCoordinatorRenderProcessProbe:: - CollectRenderProcessMetricsAndStartMemoryDumpOnIOThread() { + CollectAndDispatchRenderProcessMetricsOnIOThread() { DCHECK_CURRENTLY_ON(content::BrowserThread::IO); DCHECK(is_gathering_); - // Dispatch the memory collection request. - memory_instrumentation::MemoryInstrumentation::GetInstance() - ->RequestGlobalDump( - base::BindRepeating(&ResourceCoordinatorRenderProcessProbe:: - ProcessGlobalMemoryDumpAndDispatchOnIOThread, - base::Unretained(this))); - RenderProcessInfoMap::iterator iter = render_process_info_map_.begin(); while (iter != render_process_info_map_.end()) { auto& render_process_info = iter->second; @@ -162,21 +157,12 @@ continue; } } -} -void ResourceCoordinatorRenderProcessProbe:: - ProcessGlobalMemoryDumpAndDispatchOnIOThread( - bool global_success, - std::unique_ptr<memory_instrumentation::GlobalMemoryDump> dump) { // Create the measurement batch. mojom::ProcessResourceMeasurementBatchPtr batch = mojom::ProcessResourceMeasurementBatch::New(); - // TODO(siggi): Add start/end times. This will need some support from - // the memory_instrumentation code. - - // Start by adding the render process hosts we know about to the batch. - for (const auto& render_process_info_map_entry : render_process_info_map_) { + for (auto& render_process_info_map_entry : render_process_info_map_) { auto& render_process_info = render_process_info_map_entry.second; // TODO(oysteine): Move the multiplier used to avoid precision loss // into a shared location, when this property gets used. @@ -185,35 +171,13 @@ measurement->pid = render_process_info.process.Pid(); measurement->cpu_usage = render_process_info.cpu_usage; + // TODO(siggi): Add the private footprint. batch->measurements.push_back(std::move(measurement)); } - if (dump) { - // Then amend the ones we have memory metrics for with their private - // footprint. The global dump may contain non-renderer processes, it may - // contain renderer processes we didn't capture at the start of the cycle, - // and it may not contain all the renderer processes we know about. - // This may happen due to the inherent race between the request and - // starting/stopping renderers, or because of other failures - // This may therefore provide incomplete information. - for (const auto& dump_entry : dump->process_dumps()) { - base::ProcessId pid = dump_entry.pid(); - - for (const auto& measurement : batch->measurements) { - if (measurement->pid == pid) { - measurement->private_footprint_kb = - dump_entry.os_dump().private_footprint_kb; - break; - } - } - } - } else { - // We should only get a nullptr in case of failure. - DCHECK(!global_success); - } - bool should_restart = DispatchMetrics(std::move(batch)); + content::BrowserThread::PostTask( content::BrowserThread::UI, FROM_HERE, base::BindOnce(
diff --git a/chrome/browser/resource_coordinator/resource_coordinator_render_process_probe.h b/chrome/browser/resource_coordinator/resource_coordinator_render_process_probe.h index 057ec82..7849d48 100644 --- a/chrome/browser/resource_coordinator/resource_coordinator_render_process_probe.h +++ b/chrome/browser/resource_coordinator/resource_coordinator_render_process_probe.h
@@ -9,12 +9,11 @@ #include <memory> #include <utility> +#include "base/lazy_instance.h" #include "base/macros.h" -#include "base/no_destructor.h" #include "base/process/process.h" #include "base/process/process_metrics.h" #include "base/timer/timer.h" -#include "services/resource_coordinator/public/cpp/memory_instrumentation/memory_instrumentation.h" #include "services/resource_coordinator/public/cpp/system_resource_coordinator.h" namespace resource_coordinator { @@ -42,7 +41,6 @@ void StartSingleGather(); protected: - // Internal state protected for testing. struct RenderProcessInfo { RenderProcessInfo(); ~RenderProcessInfo(); @@ -53,7 +51,9 @@ }; using RenderProcessInfoMap = std::map<int, RenderProcessInfo>; - friend class base::NoDestructor<ResourceCoordinatorRenderProcessProbe>; + // Internal state protected for testing. + friend struct base::LazyInstanceTraitsBase< + ResourceCoordinatorRenderProcessProbe>; ResourceCoordinatorRenderProcessProbe(); virtual ~ResourceCoordinatorRenderProcessProbe(); @@ -61,13 +61,10 @@ // (1) Identify all of the render processes that are active to measure. // Child render processes can only be discovered in the browser's UI thread. void RegisterAliveRenderProcessesOnUIThread(); - // (2) Collect the render process CPU metrics and initiate a memory dump. - void CollectRenderProcessMetricsAndStartMemoryDumpOnIOThread(); - // (3) Process the results of the memory dump and dispatch the results. - void ProcessGlobalMemoryDumpAndDispatchOnIOThread( - bool success, - std::unique_ptr<memory_instrumentation::GlobalMemoryDump> dump); - // (4) Initiate the next render process metrics collection cycle if the + // (2) Collect and dispatch the render process metrics to the system + // coordination unit. + void CollectAndDispatchRenderProcessMetricsOnIOThread(); + // (3) Initiate the next render process metrics collection cycle if the // cycle has been started and |restart_cycle| is true, which consists of a // delayed call to perform (1) via a timer. // Virtual for testing.
diff --git a/chrome/browser/resource_coordinator/resource_coordinator_render_process_probe_browsertest.cc b/chrome/browser/resource_coordinator/resource_coordinator_render_process_probe_browsertest.cc index 4e7a783..80d9718 100644 --- a/chrome/browser/resource_coordinator/resource_coordinator_render_process_probe_browsertest.cc +++ b/chrome/browser/resource_coordinator/resource_coordinator_render_process_probe_browsertest.cc
@@ -135,10 +135,8 @@ EXPECT_EQ(initial_size, probe.last_measurement_batch()->measurements.size()); // A quirk of the process_metrics implementation is that the first CPU // measurement returns zero. - for (const auto& measurement : probe.last_measurement_batch()->measurements) { + for (const auto& measurement : probe.last_measurement_batch()->measurements) EXPECT_EQ(0.0, measurement->cpu_usage); - EXPECT_NE(0u, measurement->private_footprint_kb); - } // Open a second tab and complete a navigation. ui_test_utils::NavigateToURLWithDisposition( @@ -166,10 +164,8 @@ size_t info_map_size = info_map.size(); probe.StartGatherCycleAndWait(); // The second and subsequent CPU measurements should return some data. - for (const auto& measurement : probe.last_measurement_batch()->measurements) { + for (const auto& measurement : probe.last_measurement_batch()->measurements) EXPECT_LE(0.0, measurement->cpu_usage); - EXPECT_NE(0u, measurement->private_footprint_kb); - } EXPECT_EQ(info_map_size, info_map.size()); for (const auto& entry : probe.render_process_info_map()) {
diff --git a/chrome/browser/resource_coordinator/tab_activity_watcher_browsertest.cc b/chrome/browser/resource_coordinator/tab_activity_watcher_browsertest.cc index d3fca26..a5c5b29 100644 --- a/chrome/browser/resource_coordinator/tab_activity_watcher_browsertest.cc +++ b/chrome/browser/resource_coordinator/tab_activity_watcher_browsertest.cc
@@ -5,7 +5,6 @@ #include <memory> #include "base/macros.h" -#include "chrome/browser/resource_coordinator/tab_metrics_event.pb.h" #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser_window.h" #include "chrome/browser/ui/tabs/tab_strip_model.h" @@ -19,7 +18,6 @@ #include "services/metrics/public/mojom/ukm_interface.mojom.h" #include "testing/gtest/include/gtest/gtest.h" -using metrics::TabMetricsEvent; using ukm::builders::TabManager_TabMetrics; using ukm::builders::TabManager_Background_ForegroundedOrClosed; @@ -33,12 +31,8 @@ // The default metric values for a tab. const UkmMetricMap kBasicMetricValues({ - {TabManager_TabMetrics::kContentTypeName, - TabMetricsEvent::CONTENT_TYPE_TEXT_HTML}, - {TabManager_TabMetrics::kDefaultProtocolHandlerName, base::nullopt}, {TabManager_TabMetrics::kHasBeforeUnloadHandlerName, 0}, {TabManager_TabMetrics::kHasFormEntryName, 0}, - {TabManager_TabMetrics::kIsExtensionProtectedName, 0}, {TabManager_TabMetrics::kIsPinnedName, 0}, {TabManager_TabMetrics::kKeyEventCountName, 0}, {TabManager_TabMetrics::kNavigationEntryCountName, 1},
diff --git a/chrome/browser/resource_coordinator/tab_activity_watcher_unittest.cc b/chrome/browser/resource_coordinator/tab_activity_watcher_unittest.cc index f368fa3..6f2e526 100644 --- a/chrome/browser/resource_coordinator/tab_activity_watcher_unittest.cc +++ b/chrome/browser/resource_coordinator/tab_activity_watcher_unittest.cc
@@ -8,11 +8,8 @@ #include "base/macros.h" #include "base/test/simple_test_tick_clock.h" -#include "chrome/browser/browser_process.h" #include "chrome/browser/engagement/site_engagement_service.h" #include "chrome/browser/resource_coordinator/tab_activity_watcher.h" -#include "chrome/browser/resource_coordinator/tab_manager.h" -#include "chrome/browser/resource_coordinator/tab_metrics_event.pb.h" #include "chrome/browser/resource_coordinator/time.h" #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/tabs/tab_activity_simulator.h" @@ -34,7 +31,6 @@ using blink::WebInputEvent; using content::WebContentsTester; -using metrics::TabMetricsEvent; using ukm::builders::TabManager_TabMetrics; using ForegroundedOrClosed = ukm::builders::TabManager_Background_ForegroundedOrClosed; @@ -50,18 +46,14 @@ // The default metric values for a tab. const UkmMetricMap kBasicMetricValues({ - {TabManager_TabMetrics::kContentTypeName, - TabMetricsEvent::CONTENT_TYPE_TEXT_HTML}, {TabManager_TabMetrics::kHasBeforeUnloadHandlerName, 0}, {TabManager_TabMetrics::kHasFormEntryName, 0}, - {TabManager_TabMetrics::kIsExtensionProtectedName, 0}, {TabManager_TabMetrics::kIsPinnedName, 0}, {TabManager_TabMetrics::kKeyEventCountName, 0}, {TabManager_TabMetrics::kMouseEventCountName, 0}, {TabManager_TabMetrics::kSiteEngagementScoreName, 0}, {TabManager_TabMetrics::kTouchEventCountName, 0}, {TabManager_TabMetrics::kWasRecentlyAudibleName, 0}, - {TabManager_TabMetrics::kDefaultProtocolHandlerName, base::nullopt}, }); blink::WebMouseEvent CreateMouseEvent(WebInputEvent::Type event_type) { @@ -248,11 +240,6 @@ ExpectNewEntry(kTestUrls[1], expected_metrics); } - // Simulate an extension protecting the tab. - g_browser_process->GetTabManager()->SetTabAutoDiscardableState( - test_contents_2, false); - expected_metrics[TabManager_TabMetrics::kIsExtensionProtectedName] = 1; - // Site engagement score should round down to the nearest 10. SiteEngagementService::Get(profile())->ResetBaseScoreForURL(kTestUrls[1], 45); expected_metrics[TabManager_TabMetrics::kSiteEngagementScoreName] = 40;
diff --git a/chrome/browser/resource_coordinator/tab_features.h b/chrome/browser/resource_coordinator/tab_features.h index a9afec38..9ee440b6 100644 --- a/chrome/browser/resource_coordinator/tab_features.h +++ b/chrome/browser/resource_coordinator/tab_features.h
@@ -9,7 +9,6 @@ #include <string> #include "base/optional.h" -#include "chrome/browser/resource_coordinator/tab_metrics_event.pb.h" #include "ui/base/page_transition_types.h" namespace resource_coordinator { @@ -25,11 +24,8 @@ // Keep properties in alphabetical order to match the order in // TabMetricsLogger::LogBackgroundTab() and make it easier to check which // properties are sent via UKM. - metrics::TabMetricsEvent::ContentType content_type = - metrics::TabMetricsEvent::CONTENT_TYPE_UNKNOWN; bool has_before_unload_handler = false; bool has_form_entry = false; - bool is_extension_protected = false; bool is_pinned = false; int32_t key_event_count = 0; int32_t mouse_event_count = 0;
diff --git a/chrome/browser/resource_coordinator/tab_metrics_event.proto b/chrome/browser/resource_coordinator/tab_metrics_event.proto index 2916004..06a637c 100644 --- a/chrome/browser/resource_coordinator/tab_metrics_event.proto +++ b/chrome/browser/resource_coordinator/tab_metrics_event.proto
@@ -44,40 +44,6 @@ } optional ContentType content_type = 1; - - // URI schemes that can be handled by a protocol handler. - enum ProtocolHandlerScheme { - option allow_alias = true; // Allow LAST alias for static assertions. - - // Not one of the below, including custom handlers. - PROTOCOL_HANDLER_SCHEME_OTHER = 0; - - // Schemes whitelisted for registerProtocolHandler. - PROTOCOL_HANDLER_SCHEME_BITCOIN = 1; - PROTOCOL_HANDLER_SCHEME_GEO = 2; - PROTOCOL_HANDLER_SCHEME_IM = 3; - PROTOCOL_HANDLER_SCHEME_IRC = 4; - PROTOCOL_HANDLER_SCHEME_IRCS = 5; - PROTOCOL_HANDLER_SCHEME_MAGNET = 6; - PROTOCOL_HANDLER_SCHEME_MAILTO = 7; - PROTOCOL_HANDLER_SCHEME_MMS = 8; - PROTOCOL_HANDLER_SCHEME_NEWS = 9; - PROTOCOL_HANDLER_SCHEME_NNTP = 10; - PROTOCOL_HANDLER_SCHEME_OPENPGP4FPR = 11; - PROTOCOL_HANDLER_SCHEME_SIP = 12; - PROTOCOL_HANDLER_SCHEME_SMS = 13; - PROTOCOL_HANDLER_SCHEME_SMSTO = 14; - PROTOCOL_HANDLER_SCHEME_SSH = 15; - PROTOCOL_HANDLER_SCHEME_TEL = 16; - PROTOCOL_HANDLER_SCHEME_URN = 17; - PROTOCOL_HANDLER_SCHEME_WEBCAL = 18; - PROTOCOL_HANDLER_SCHEME_WTAI = 19; - PROTOCOL_HANDLER_SCHEME_XMPP = 20; - - PROTOCOL_HANDLER_SCHEME_LAST = 20; - } - - repeated ProtocolHandlerScheme enabled_protocol_handlers = 2; } // Defines specialized fields used by the TabManager.WindowMetrics UKM event
diff --git a/chrome/browser/resource_coordinator/tab_metrics_logger.cc b/chrome/browser/resource_coordinator/tab_metrics_logger.cc index ec81b94b..ab2f8be 100644 --- a/chrome/browser/resource_coordinator/tab_metrics_logger.cc +++ b/chrome/browser/resource_coordinator/tab_metrics_logger.cc
@@ -6,22 +6,17 @@ #include <algorithm> #include <string> -#include <vector> #include "base/stl_util.h" #include "base/time/time.h" #include "chrome/browser/browser_process.h" -#include "chrome/browser/custom_handlers/protocol_handler_registry.h" -#include "chrome/browser/custom_handlers/protocol_handler_registry_factory.h" #include "chrome/browser/engagement/site_engagement_service.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/resource_coordinator/tab_features.h" -#include "chrome/browser/resource_coordinator/tab_lifecycle_unit_external.h" #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser_finder.h" #include "chrome/browser/ui/browser_list.h" #include "chrome/browser/ui/tabs/tab_strip_model.h" -#include "chrome/common/custom_handlers/protocol_handler.h" #include "content/public/browser/render_frame_host.h" #include "content/public/browser/web_contents.h" #include "content/public/common/page_importance_signals.h" @@ -34,61 +29,6 @@ namespace { -// Order must match the metrics.TabMetricsEvent.Scheme enum. -const char* kWhitelistedSchemes[] = { - "", // Placeholder for PROTOCOL_HANDLER_SCHEME_OTHER. - "bitcoin", "geo", "im", "irc", "ircs", "magnet", "mailto", - "mms", "news", "nntp", "openpgp4fpr", "sip", "sms", "smsto", - "ssh", "tel", "urn", "webcal", "wtai", "xmpp", -}; - -// Adds a DefaultProtocolHandler metric with the handler's scheme to |entry| -// if the protocol handler is a default protocol handler. -void PopulateSchemeForHandler(ProtocolHandlerRegistry* registry, - const ProtocolHandler& handler, - ukm::builders::TabManager_TabMetrics* entry) { - if (registry->IsDefault(handler)) { - // Append a DefaultProtocolHandler metric whose value is the scheme. - // Note that multiple DefaultProtocolHandler metrics may be added, one for - // each scheme the entry's origin handles by default. - entry->SetDefaultProtocolHandler( - TabMetricsLogger::GetSchemeValueFromString(handler.protocol())); - } -} - -// Populates the protocol handler fields based on the WebContents' origin. -// We match the origin instead of the full page URL because: -// - a handler relevant for one page is probably relevant for the whole site -// - a handler maps to a template string, so matching on a full URL is hard -// - even if this page was opened from a protocol handler, a redirect may have -// changed the URL anyway. -void PopulateProtocolHandlers(content::WebContents* web_contents, - ukm::builders::TabManager_TabMetrics* entry) { - ProtocolHandlerRegistry* registry = - ProtocolHandlerRegistryFactory::GetForBrowserContext( - web_contents->GetBrowserContext()); - // May be null in tests. - if (!registry) - return; - - const GURL origin = web_contents->GetLastCommittedURL().GetOrigin(); - if (origin.is_empty()) - return; - - // Fetch all schemes that have been registered (accepted or denied). - std::vector<std::string> registered_schemes; - registry->GetRegisteredProtocols(®istered_schemes); - - // Protocol handlers are stored by scheme, not URL. For each scheme, find the - // URLs of the handlers registered for it. - for (const std::string& scheme : registered_schemes) { - for (const ProtocolHandler& handler : registry->GetHandlersFor(scheme)) { - if (handler.url().GetOrigin() == origin) - PopulateSchemeForHandler(registry, handler, entry); - } - } -} - // Populates navigation-related metrics. void PopulatePageTransitionFeatures(resource_coordinator::TabFeatures* tab, ui::PageTransition page_transition) { @@ -155,18 +95,6 @@ } // static -TabMetricsEvent::ProtocolHandlerScheme -TabMetricsLogger::GetSchemeValueFromString(const std::string& scheme) { - const char* const* const scheme_ptr = std::find( - std::begin(kWhitelistedSchemes), std::end(kWhitelistedSchemes), scheme); - if (scheme_ptr == std::end(kWhitelistedSchemes)) - return TabMetricsEvent::PROTOCOL_HANDLER_SCHEME_OTHER; - - size_t index = scheme_ptr - std::begin(kWhitelistedSchemes); - return static_cast<TabMetricsEvent::ProtocolHandlerScheme>(index); -} - -// static int TabMetricsLogger::GetSiteEngagementScore( const content::WebContents* web_contents) { if (!SiteEngagementService::IsEnabled()) @@ -195,18 +123,11 @@ resource_coordinator::TabFeatures tab; - TabMetricsEvent::ContentType content_type = - GetContentTypeFromMimeType(web_contents->GetContentsMimeType()); - tab.content_type = content_type; tab.has_before_unload_handler = web_contents->GetMainFrame()->GetSuddenTerminationDisablerState( blink::kBeforeUnloadHandler); tab.has_form_entry = web_contents->GetPageImportanceSignals().had_form_interaction; - tab.is_extension_protected = - !resource_coordinator::TabLifecycleUnitExternal::FromWebContents( - web_contents) - ->IsAutoDiscardable(); int index = tab_strip_model->GetIndexOfWebContents(web_contents); DCHECK_NE(index, TabStripModel::kNoTab); @@ -259,16 +180,12 @@ ukm::builders::TabManager_TabMetrics entry(ukm_source_id); resource_coordinator::TabFeatures tab = GetTabFeatures(browser, tab_metrics); - PopulateProtocolHandlers(web_contents, &entry); - // Keep these Set functions in alphabetical order so they're easy to check // against the list of metrics in the UKM event. // TODO(michaelpg): Add PluginType field if mime type matches "application/*" // using PluginUMAReporter. - entry.SetContentType(tab.content_type); entry.SetHasBeforeUnloadHandler(tab.has_before_unload_handler); entry.SetHasFormEntry(tab.has_form_entry); - entry.SetIsExtensionProtected(tab.is_extension_protected); entry.SetIsPinned(tab.is_pinned); entry.SetKeyEventCount(tab.key_event_count); entry.SetMouseEventCount(tab.mouse_event_count);
diff --git a/chrome/browser/resource_coordinator/tab_metrics_logger.h b/chrome/browser/resource_coordinator/tab_metrics_logger.h index 78f8e5e..cb5ebd1e 100644 --- a/chrome/browser/resource_coordinator/tab_metrics_logger.h +++ b/chrome/browser/resource_coordinator/tab_metrics_logger.h
@@ -86,12 +86,6 @@ static metrics::TabMetricsEvent::ContentType GetContentTypeFromMimeType( const std::string& mime_type); - // Returns the ProtocolHandlerScheme enumerator matching the string. - // The enumerator value is used in the UKM entry, since UKM entries can't - // store strings. - static metrics::TabMetricsEvent::ProtocolHandlerScheme - GetSchemeValueFromString(const std::string& scheme); - // Returns the site engagement score for the WebContents, rounded down to 10s // to limit granularity. Returns -1 if site engagement service is disabled. static int GetSiteEngagementScore(const content::WebContents* web_contents);
diff --git a/chrome/browser/resource_coordinator/tab_metrics_logger_unittest.cc b/chrome/browser/resource_coordinator/tab_metrics_logger_unittest.cc index 787df4c..4273110a 100644 --- a/chrome/browser/resource_coordinator/tab_metrics_logger_unittest.cc +++ b/chrome/browser/resource_coordinator/tab_metrics_logger_unittest.cc
@@ -7,8 +7,6 @@ #include "chrome/browser/browser_process.h" #include "chrome/browser/engagement/site_engagement_service.h" #include "chrome/browser/resource_coordinator/tab_features.h" -#include "chrome/browser/resource_coordinator/tab_manager.h" -#include "chrome/browser/resource_coordinator/tab_metrics_event.pb.h" #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/tabs/tab_activity_simulator.h" #include "chrome/browser/ui/tabs/tab_strip_model.h" @@ -19,7 +17,6 @@ #include "content/public/test/web_contents_tester.h" #include "testing/gtest/include/gtest/gtest.h" -using metrics::TabMetricsEvent; using content::WebContentsTester; // Sanity checks for functions in TabMetricsLogger. @@ -53,11 +50,8 @@ resource_coordinator::TabFeatures bg_features = TabMetricsLogger::GetTabFeatures(browser.get(), bg_metrics); - EXPECT_EQ(TabMetricsEvent::CONTENT_TYPE_TEXT_HTML, - bg_features.content_type); EXPECT_EQ(bg_features.has_before_unload_handler, false); EXPECT_EQ(bg_features.has_form_entry, false); - EXPECT_EQ(bg_features.is_extension_protected, false); EXPECT_EQ(bg_features.is_pinned, false); EXPECT_EQ(bg_features.key_event_count, 0); EXPECT_EQ(bg_features.mouse_event_count, 0); @@ -80,9 +74,6 @@ tab_activity_simulator.Navigate(bg_contents, GURL("https://www.chromium.org"), page_transition); tab_strip_model->SetTabPinned(1, true); - // Simulate an extension protecting a tab. - g_browser_process->GetTabManager()->SetTabAutoDiscardableState(bg_contents, - false); SiteEngagementService::Get(profile())->ResetBaseScoreForURL( GURL("https://www.chromium.org"), 91); @@ -96,11 +87,8 @@ resource_coordinator::TabFeatures bg_features = TabMetricsLogger::GetTabFeatures(browser.get(), bg_metrics); - EXPECT_EQ(TabMetricsEvent::CONTENT_TYPE_TEXT_HTML, - bg_features.content_type); EXPECT_EQ(bg_features.has_before_unload_handler, false); EXPECT_EQ(bg_features.has_form_entry, false); - EXPECT_EQ(bg_features.is_extension_protected, true); EXPECT_EQ(bg_features.is_pinned, true); EXPECT_EQ(bg_features.key_event_count, 3); EXPECT_EQ(bg_features.mouse_event_count, 42); @@ -120,74 +108,3 @@ tab_strip_model->CloseAllTabs(); } - -// Tests that protocol schemes are mapped to the correct enumerators. -TEST_F(TabMetricsLoggerTest, Schemes) { - EXPECT_EQ(TabMetricsEvent::PROTOCOL_HANDLER_SCHEME_BITCOIN, - TabMetricsLogger::GetSchemeValueFromString("bitcoin")); - EXPECT_EQ(TabMetricsEvent::PROTOCOL_HANDLER_SCHEME_GEO, - TabMetricsLogger::GetSchemeValueFromString("geo")); - EXPECT_EQ(TabMetricsEvent::PROTOCOL_HANDLER_SCHEME_IM, - TabMetricsLogger::GetSchemeValueFromString("im")); - EXPECT_EQ(TabMetricsEvent::PROTOCOL_HANDLER_SCHEME_IRC, - TabMetricsLogger::GetSchemeValueFromString("irc")); - EXPECT_EQ(TabMetricsEvent::PROTOCOL_HANDLER_SCHEME_IRCS, - TabMetricsLogger::GetSchemeValueFromString("ircs")); - EXPECT_EQ(TabMetricsEvent::PROTOCOL_HANDLER_SCHEME_MAGNET, - TabMetricsLogger::GetSchemeValueFromString("magnet")); - EXPECT_EQ(TabMetricsEvent::PROTOCOL_HANDLER_SCHEME_MAILTO, - TabMetricsLogger::GetSchemeValueFromString("mailto")); - EXPECT_EQ(TabMetricsEvent::PROTOCOL_HANDLER_SCHEME_MMS, - TabMetricsLogger::GetSchemeValueFromString("mms")); - EXPECT_EQ(TabMetricsEvent::PROTOCOL_HANDLER_SCHEME_NEWS, - TabMetricsLogger::GetSchemeValueFromString("news")); - EXPECT_EQ(TabMetricsEvent::PROTOCOL_HANDLER_SCHEME_NNTP, - TabMetricsLogger::GetSchemeValueFromString("nntp")); - EXPECT_EQ(TabMetricsEvent::PROTOCOL_HANDLER_SCHEME_OPENPGP4FPR, - TabMetricsLogger::GetSchemeValueFromString("openpgp4fpr")); - EXPECT_EQ(TabMetricsEvent::PROTOCOL_HANDLER_SCHEME_SIP, - TabMetricsLogger::GetSchemeValueFromString("sip")); - EXPECT_EQ(TabMetricsEvent::PROTOCOL_HANDLER_SCHEME_SMS, - TabMetricsLogger::GetSchemeValueFromString("sms")); - EXPECT_EQ(TabMetricsEvent::PROTOCOL_HANDLER_SCHEME_SMSTO, - TabMetricsLogger::GetSchemeValueFromString("smsto")); - EXPECT_EQ(TabMetricsEvent::PROTOCOL_HANDLER_SCHEME_SSH, - TabMetricsLogger::GetSchemeValueFromString("ssh")); - EXPECT_EQ(TabMetricsEvent::PROTOCOL_HANDLER_SCHEME_TEL, - TabMetricsLogger::GetSchemeValueFromString("tel")); - EXPECT_EQ(TabMetricsEvent::PROTOCOL_HANDLER_SCHEME_URN, - TabMetricsLogger::GetSchemeValueFromString("urn")); - EXPECT_EQ(TabMetricsEvent::PROTOCOL_HANDLER_SCHEME_WEBCAL, - TabMetricsLogger::GetSchemeValueFromString("webcal")); - EXPECT_EQ(TabMetricsEvent::PROTOCOL_HANDLER_SCHEME_WTAI, - TabMetricsLogger::GetSchemeValueFromString("wtai")); - EXPECT_EQ(TabMetricsEvent::PROTOCOL_HANDLER_SCHEME_XMPP, - TabMetricsLogger::GetSchemeValueFromString("xmpp")); - - static_assert( - TabMetricsEvent::PROTOCOL_HANDLER_SCHEME_LAST == - TabMetricsEvent::PROTOCOL_HANDLER_SCHEME_XMPP && - TabMetricsEvent::PROTOCOL_HANDLER_SCHEME_LAST == 20, - "This test and the scheme list in TabMetricsLoggerImpl must be updated " - "when new protocol handlers are added."); -} - -// Tests non-whitelisted protocol schemes. -TEST_F(TabMetricsLoggerTest, NonWhitelistedSchemes) { - // Native (non-web-based) handler. - EXPECT_EQ(TabMetricsEvent::PROTOCOL_HANDLER_SCHEME_OTHER, - TabMetricsLogger::GetSchemeValueFromString("foo")); - - // Custom ("web+") protocol handlers. - EXPECT_EQ(TabMetricsEvent::PROTOCOL_HANDLER_SCHEME_OTHER, - TabMetricsLogger::GetSchemeValueFromString("web+foo")); - // "mailto" after the web+ prefix doesn't trigger any special handling. - EXPECT_EQ(TabMetricsEvent::PROTOCOL_HANDLER_SCHEME_OTHER, - TabMetricsLogger::GetSchemeValueFromString("web+mailto")); - - // Nonsense protocol handlers. - EXPECT_EQ(TabMetricsEvent::PROTOCOL_HANDLER_SCHEME_OTHER, - TabMetricsLogger::GetSchemeValueFromString("")); - EXPECT_EQ(TabMetricsEvent::PROTOCOL_HANDLER_SCHEME_OTHER, - TabMetricsLogger::GetSchemeValueFromString("mailto-xyz")); -}
diff --git a/chrome/browser/resources/BUILD.gn b/chrome/browser/resources/BUILD.gn index bc3eb244..503f3a5 100644 --- a/chrome/browser/resources/BUILD.gn +++ b/chrome/browser/resources/BUILD.gn
@@ -20,6 +20,7 @@ "md_extensions:closure_compile", "md_history:closure_compile", "md_user_manager:closure_compile", + "media_router:closure_compile", "offline_pages:closure_compile", "settings:closure_compile", "signin/dice_sync_confirmation:closure_compile",
diff --git a/chrome/browser/resources/chromeos/login/md_login_shared.js b/chrome/browser/resources/chromeos/login/md_login_shared.js index d25a427..e2785597 100644 --- a/chrome/browser/resources/chromeos/login/md_login_shared.js +++ b/chrome/browser/resources/chromeos/login/md_login_shared.js
@@ -467,6 +467,14 @@ return cr.sendWithPromise('getPrimaryDisplayNameForTesting'); }; + /** + * Sets the number of users on the views login screen. + * @param {number} userCount The number of users. + */ + Oobe.setLoginUserCount = function(userCount) { + Oobe.getInstance().setLoginUserCount(userCount); + }; + // Export return {Oobe: Oobe}; });
diff --git a/chrome/browser/resources/chromeos/login/screen_error_message.js b/chrome/browser/resources/chromeos/login/screen_error_message.js index 1f123607..a05c446 100644 --- a/chrome/browser/resources/chromeos/login/screen_error_message.js +++ b/chrome/browser/resources/chromeos/login/screen_error_message.js
@@ -83,8 +83,13 @@ // Error screen initial error state. error_state_: ERROR_STATE.UNKNOWN, - // Whether the screen can be cancelled. - cancelable_: false, + /** + * Whether the screen can be closed. + * @type {boolean} + */ + get closable() { + return Oobe.getInstance().hasUserPods; + }, /** @override */ decorate: function() { @@ -251,8 +256,7 @@ cr.ui.Oobe.clearErrors(); cr.ui.DropDown.show('offline-networks-list', false); $('login-header-bar').signinUIState = SIGNIN_UI_STATE.ERROR; - this.cancelable_ = $('pod-row').pods.length; - $('error-message-back-button').disabled = !this.cancelable_; + $('error-message-back-button').disabled = !this.closable; }, /** @@ -388,7 +392,7 @@ * Cancels error screen and drops to user pods. */ cancel: function() { - if (this.cancelable_) + if (this.closable) Oobe.showUserPods(); }, };
diff --git a/chrome/browser/resources/chromeos/login/screen_gaia_signin.js b/chrome/browser/resources/chromeos/login/screen_gaia_signin.js index ed6754da..471ae80 100644 --- a/chrome/browser/resources/chromeos/login/screen_gaia_signin.js +++ b/chrome/browser/resources/chromeos/login/screen_gaia_signin.js
@@ -118,17 +118,6 @@ lastBackMessageValue_: false, /** - * Number of users in the login screen UI. - * This is mainly used by views login screen, this value is always 0 for - * WebUI login screen. - * TODO(crbug.com/808271): WebUI and views implementation should return the - * same user list. - * @type {number} - * @private - */ - userCount_: 0, - - /** * Whether the dialog could be closed. * This is being checked in cancel() when user clicks on signin-back-button * (normal gaia flow) or the buttons in gaia-navigation (used in enterprise @@ -138,10 +127,7 @@ * @type {boolean} */ get closable() { - var hasUser = Oobe.getInstance().showingViewsLogin ? - (!!this.userCount_) : - (!!$('pod-row').pods.length); - return hasUser || this.isOffline(); + return Oobe.getInstance().hasUserPods || this.isOffline(); }, /** @@ -704,7 +690,6 @@ this.chromeOSApiVersion_ = data.chromeOSApiVersion; // This triggers updateSigninFrameContainers_() this.screenMode = data.screenMode; - this.userCount_ = data.userCount; this.email = ''; this.authCompleted_ = false; this.lastBackMessageValue_ = false;
diff --git a/chrome/browser/resources/md_extensions/toggle_row.html b/chrome/browser/resources/md_extensions/toggle_row.html index b326dc8c..b71803d4 100644 --- a/chrome/browser/resources/md_extensions/toggle_row.html +++ b/chrome/browser/resources/md_extensions/toggle_row.html
@@ -37,7 +37,7 @@ flex: 1; } </style> - <label id="label" on-click="onLabelTap_"> + <label id="label"> <input id="native" type="checkbox" checked="[[checked]]" on-change="onNativeChange_" on-click="onNativeClick_"> <slot></slot>
diff --git a/chrome/browser/resources/md_extensions/toggle_row.js b/chrome/browser/resources/md_extensions/toggle_row.js index 8667db2..1b5de89 100644 --- a/chrome/browser/resources/md_extensions/toggle_row.js +++ b/chrome/browser/resources/md_extensions/toggle_row.js
@@ -30,18 +30,6 @@ * @param {!Event} * @private */ - onLabelTap_: function(e) { - // If the interaction sequence (pointerdown+pointerup) began within the - // cr-toggle itself, then prevent this event from changing the state of - // the toggle. - if (this.$.crToggle.shouldIgnoreHostTap(e)) - e.preventDefault(); - }, - - /** - * @param {!Event} - * @private - */ onNativeClick_: function(e) { // Even though the native checkbox is hidden and can't be actually // cilcked/tapped by the user, because it resides within the <label> the
diff --git a/chrome/browser/resources/media_router/BUILD.gn b/chrome/browser/resources/media_router/BUILD.gn new file mode 100644 index 0000000..ad4aebea --- /dev/null +++ b/chrome/browser/resources/media_router/BUILD.gn
@@ -0,0 +1,58 @@ +# Copyright 2018 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("//third_party/closure_compiler/compile_js.gni") + +group("closure_compile") { + deps = [ + ":media_router_resources", + "elements/issue_banner:closure_compile", + "elements/media_router_container:closure_compile", + "elements/media_router_header:closure_compile", + "elements/media_router_search_highlighter:closure_compile", + "elements/route_controls:closure_compile", + "elements/route_details:closure_compile", + ] +} + +js_type_check("media_router_resources") { + deps = [ + ":media_router", + ":media_router_browser_api", + ":media_router_data", + ":media_router_ui_interface", + ] +} + +js_library("media_router") { + deps = [ + ":media_router_ui_interface", + "elements/media_router_container:media_router_container_interface", + "elements/media_router_header:media_router_header", + "//ui/webui/resources/js:cr", + ] +} + +js_library("media_router_browser_api") { + deps = [ + ":media_router_data", + ] + externs_list = [ "$externs_path/chrome_send.js" ] +} + +js_library("media_router_data") { + deps = [ + "//ui/webui/resources/js:cr", + "//ui/webui/resources/js:load_time_data", + ] +} + +js_library("media_router_ui_interface") { + deps = [ + ":media_router_browser_api", + "elements/media_router_container:media_router_container_interface", + "elements/media_router_header:media_router_header", + "elements/route_controls:route_controls_interface", + ] +}
diff --git a/chrome/browser/resources/media_router/compiled_resources2.gyp b/chrome/browser/resources/media_router/compiled_resources2.gyp deleted file mode 100644 index ff0af052..0000000 --- a/chrome/browser/resources/media_router/compiled_resources2.gyp +++ /dev/null
@@ -1,47 +0,0 @@ -# Copyright 2016 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. -{ - 'targets': [ - { - 'target_name': 'externs', - 'includes': ['../../../../third_party/closure_compiler/include_js.gypi'], - }, - { - 'target_name': 'media_router', - 'dependencies': [ - '<(DEPTH)/ui/webui/resources/js/compiled_resources2.gyp:cr', - 'media_router_ui_interface', - 'elements/media_router_header/compiled_resources2.gyp:media_router_header', - 'elements/media_router_container/compiled_resources2.gyp:media_router_container_interface', - ], - 'includes': ['../../../../third_party/closure_compiler/compile_js2.gypi'], - }, - { - 'target_name': 'media_router_browser_api', - 'dependencies': [ - 'media_router_data', - '<(EXTERNS_GYP):chrome_send', - ], - 'includes': ['../../../../third_party/closure_compiler/compile_js2.gypi'], - }, - { - 'target_name': 'media_router_data', - 'dependencies': [ - '<(DEPTH)/ui/webui/resources/js/compiled_resources2.gyp:cr', - '<(DEPTH)/ui/webui/resources/js/compiled_resources2.gyp:load_time_data', - ], - 'includes': ['../../../../third_party/closure_compiler/compile_js2.gypi'], - }, - { - 'target_name': 'media_router_ui_interface', - 'dependencies': [ - 'media_router_browser_api', - 'elements/media_router_header/compiled_resources2.gyp:media_router_header', - 'elements/media_router_container/compiled_resources2.gyp:media_router_container_interface', - 'elements/route_controls/compiled_resources2.gyp:route_controls_interface', - ], - 'includes': ['../../../../third_party/closure_compiler/compile_js2.gypi'], - }, - ], -}
diff --git a/chrome/browser/resources/media_router/elements/issue_banner/BUILD.gn b/chrome/browser/resources/media_router/elements/issue_banner/BUILD.gn new file mode 100644 index 0000000..0994f8c --- /dev/null +++ b/chrome/browser/resources/media_router/elements/issue_banner/BUILD.gn
@@ -0,0 +1,18 @@ +# Copyright 2018 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("//third_party/closure_compiler/compile_js.gni") + +js_type_check("closure_compile") { + deps = [ + ":issue_banner", + ] +} + +js_library("issue_banner") { + deps = [ + "../..:media_router_data", + "//ui/webui/resources/js:i18n_behavior", + ] +}
diff --git a/chrome/browser/resources/media_router/elements/issue_banner/compiled_resources2.gyp b/chrome/browser/resources/media_router/elements/issue_banner/compiled_resources2.gyp deleted file mode 100644 index 621a1d48..0000000 --- a/chrome/browser/resources/media_router/elements/issue_banner/compiled_resources2.gyp +++ /dev/null
@@ -1,15 +0,0 @@ -# Copyright 2016 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. -{ - 'targets': [ - { - 'target_name': 'issue_banner', - 'dependencies': [ - '../../compiled_resources2.gyp:media_router_data', - '<(DEPTH)/ui/webui/resources/js/compiled_resources2.gyp:i18n_behavior', - ], - 'includes': ['../../../../../../third_party/closure_compiler/compile_js2.gypi'], - }, - ], -}
diff --git a/chrome/browser/resources/media_router/elements/media_router_container/BUILD.gn b/chrome/browser/resources/media_router/elements/media_router_container/BUILD.gn new file mode 100644 index 0000000..be701f7 --- /dev/null +++ b/chrome/browser/resources/media_router/elements/media_router_container/BUILD.gn
@@ -0,0 +1,39 @@ +# Copyright 2018 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("//third_party/closure_compiler/compile_js.gni") + +js_type_check("closure_compile") { + deps = [ + ":media_router_container", + ":media_router_container_interface", + ":pseudo_sink_search_state", + ] +} + +js_library("media_router_container") { + deps = [ + ":pseudo_sink_search_state", + "../..:media_router_browser_api", + "../..:media_router_data", + "../../elements/issue_banner:issue_banner", + "../../elements/media_router_header:media_router_header", + "../../elements/media_router_search_highlighter:media_router_search_highlighter", + "../../elements/route_details:route_details", + ] + externs_list = [ "../../externs.js" ] +} + +js_library("media_router_container_interface") { + deps = [ + "../..:media_router_data", + "../../elements/media_router_header:media_router_header", + ] +} + +js_library("pseudo_sink_search_state") { + deps = [ + "../..:media_router_data", + ] +}
diff --git a/chrome/browser/resources/media_router/elements/media_router_container/compiled_resources2.gyp b/chrome/browser/resources/media_router/elements/media_router_container/compiled_resources2.gyp deleted file mode 100644 index dc5aa26c..0000000 --- a/chrome/browser/resources/media_router/elements/media_router_container/compiled_resources2.gyp +++ /dev/null
@@ -1,36 +0,0 @@ -# Copyright 2016 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. -{ - 'targets': [ - { - 'target_name': 'media_router_container', - 'dependencies': [ - 'pseudo_sink_search_state', - '../../compiled_resources2.gyp:externs', - '../../compiled_resources2.gyp:media_router_browser_api', - '../../compiled_resources2.gyp:media_router_data', - '../../elements/issue_banner/compiled_resources2.gyp:issue_banner', - '../../elements/media_router_header/compiled_resources2.gyp:media_router_header', - '../../elements/media_router_search_highlighter/compiled_resources2.gyp:media_router_search_highlighter', - '../../elements/route_details/compiled_resources2.gyp:route_details', - ], - 'includes': ['../../../../../../third_party/closure_compiler/compile_js2.gypi'], - }, - { - 'target_name': 'media_router_container_interface', - 'dependencies': [ - '../../compiled_resources2.gyp:media_router_data', - '../../elements/media_router_header/compiled_resources2.gyp:media_router_header', - ], - 'includes': ['../../../../../../third_party/closure_compiler/compile_js2.gypi'], - }, - { - 'target_name': 'pseudo_sink_search_state', - 'dependencies': [ - '../../compiled_resources2.gyp:media_router_data', - ], - 'includes': ['../../../../../../third_party/closure_compiler/compile_js2.gypi'], - }, - ], -}
diff --git a/chrome/browser/resources/media_router/elements/media_router_header/BUILD.gn b/chrome/browser/resources/media_router/elements/media_router_header/BUILD.gn new file mode 100644 index 0000000..2033647 --- /dev/null +++ b/chrome/browser/resources/media_router/elements/media_router_header/BUILD.gn
@@ -0,0 +1,19 @@ +# Copyright 2018 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("//third_party/closure_compiler/compile_js.gni") + +js_type_check("closure_compile") { + deps = [ + ":media_router_header", + ] +} + +js_library("media_router_header") { + deps = [ + "../..:media_router_data", + "//ui/webui/resources/js:i18n_behavior", + "//ui/webui/resources/js:util", + ] +}
diff --git a/chrome/browser/resources/media_router/elements/media_router_header/compiled_resources2.gyp b/chrome/browser/resources/media_router/elements/media_router_header/compiled_resources2.gyp deleted file mode 100644 index 40cfdea..0000000 --- a/chrome/browser/resources/media_router/elements/media_router_header/compiled_resources2.gyp +++ /dev/null
@@ -1,16 +0,0 @@ -# Copyright 2016 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. -{ - 'targets': [ - { - 'target_name': 'media_router_header', - 'dependencies': [ - '../../compiled_resources2.gyp:media_router_data', - '<(DEPTH)/ui/webui/resources/js/compiled_resources2.gyp:i18n_behavior', - '<(DEPTH)/ui/webui/resources/js/compiled_resources2.gyp:util', - ], - 'includes': ['../../../../../../third_party/closure_compiler/compile_js2.gypi'], - }, - ], -}
diff --git a/chrome/browser/resources/media_router/elements/media_router_search_highlighter/BUILD.gn b/chrome/browser/resources/media_router/elements/media_router_search_highlighter/BUILD.gn new file mode 100644 index 0000000..7881aba --- /dev/null +++ b/chrome/browser/resources/media_router/elements/media_router_search_highlighter/BUILD.gn
@@ -0,0 +1,17 @@ +# Copyright 2018 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("//third_party/closure_compiler/compile_js.gni") + +js_type_check("closure_compile") { + deps = [ + ":media_router_search_highlighter", + ] +} + +js_library("media_router_search_highlighter") { + deps = [ + "//ui/webui/resources/js:util", + ] +}
diff --git a/chrome/browser/resources/media_router/elements/media_router_search_highlighter/compiled_resources2.gyp b/chrome/browser/resources/media_router/elements/media_router_search_highlighter/compiled_resources2.gyp deleted file mode 100644 index 18e64ac..0000000 --- a/chrome/browser/resources/media_router/elements/media_router_search_highlighter/compiled_resources2.gyp +++ /dev/null
@@ -1,14 +0,0 @@ -# Copyright 2016 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. -{ - 'targets': [ - { - 'target_name': 'media_router_search_highlighter', - 'dependencies': [ - '<(DEPTH)/ui/webui/resources/js/compiled_resources2.gyp:util', - ], - 'includes': ['../../../../../../third_party/closure_compiler/compile_js2.gypi'], - }, - ], -}
diff --git a/chrome/browser/resources/media_router/elements/route_controls/BUILD.gn b/chrome/browser/resources/media_router/elements/route_controls/BUILD.gn new file mode 100644 index 0000000..8ff292f --- /dev/null +++ b/chrome/browser/resources/media_router/elements/route_controls/BUILD.gn
@@ -0,0 +1,29 @@ +# Copyright 2018 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("//third_party/closure_compiler/compile_js.gni") + +js_type_check("closure_compile") { + deps = [ + ":route_controls", + ":route_controls_interface", + ] +} + +js_library("route_controls") { + deps = [ + "../..:media_router_browser_api", + "../..:media_router_data", + "../..:media_router_ui_interface", + "//ui/webui/resources/js:i18n_behavior", + "//ui/webui/resources/js:load_time_data", + ] +} + +js_library("route_controls_interface") { + deps = [ + "../..:media_router_data", + "//third_party/polymer/v1_0/components-chromium/paper-checkbox:paper-checkbox-extracted", + ] +}
diff --git a/chrome/browser/resources/media_router/elements/route_controls/compiled_resources2.gyp b/chrome/browser/resources/media_router/elements/route_controls/compiled_resources2.gyp deleted file mode 100644 index cb312ae..0000000 --- a/chrome/browser/resources/media_router/elements/route_controls/compiled_resources2.gyp +++ /dev/null
@@ -1,25 +0,0 @@ -# Copyright 2017 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. -{ - 'targets': [ - { - 'target_name': 'route_controls', - 'dependencies': [ - '../../compiled_resources2.gyp:media_router_browser_api', - '../../compiled_resources2.gyp:media_router_data', - '../../compiled_resources2.gyp:media_router_ui_interface', - '<(DEPTH)/ui/webui/resources/js/compiled_resources2.gyp:i18n_behavior', - '<(DEPTH)/ui/webui/resources/js/compiled_resources2.gyp:load_time_data', - ], - 'includes': ['../../../../../../third_party/closure_compiler/compile_js2.gypi'], - }, - { - 'target_name': 'route_controls_interface', - 'dependencies': [ - '../../compiled_resources2.gyp:media_router_data', - ], - 'includes': ['../../../../../../third_party/closure_compiler/compile_js2.gypi'], - }, - ], -}
diff --git a/chrome/browser/resources/media_router/elements/route_controls/route_controls.js b/chrome/browser/resources/media_router/elements/route_controls/route_controls.js index f2cc3e3..328aa1d 100644 --- a/chrome/browser/resources/media_router/elements/route_controls/route_controls.js +++ b/chrome/browser/resources/media_router/elements/route_controls/route_controls.js
@@ -75,7 +75,7 @@ /** * Set to true when the user is dragging the volume bar. Volume updates from * the browser will be ignored when set to true. - * @private {boolean} + * @private */ isVolumeChanging_: { type: Boolean, @@ -84,7 +84,7 @@ /** * The timestamp for when the controller last submitted a seek request. - * @private {number} + * @private */ lastSeekByUser_: { type: Number, @@ -93,7 +93,7 @@ /** * The timestamp for when |routeStatus| was last updated. - * @private {number} + * @private */ lastStatusUpdate_: { type: Number, @@ -103,7 +103,7 @@ /** * The timestamp for when the controller last submitted a volume change * request. - * @private {boolean} + * @private */ lastVolumeChangeByUser_: { type: Number, @@ -112,7 +112,7 @@ /** * Keep in sync with media remoting individual user setting. - * @private {boolean} + * @private */ mediaRemotingEnabled_: { type: Boolean, @@ -401,7 +401,7 @@ this.FullscreenVideoOption_.REMOTE_SCREEN : this.FullscreenVideoOption_.BOTH_SCREENS; } - this.shouldShowRouteStatusTitle_ = newRouteStatus.title && + this.shouldShowRouteStatusTitle_ = !!newRouteStatus.title && newRouteStatus.title != '' && newRouteStatus.title != this.routeDescription_; },
diff --git a/chrome/browser/resources/media_router/elements/route_details/BUILD.gn b/chrome/browser/resources/media_router/elements/route_details/BUILD.gn new file mode 100644 index 0000000..b7559add --- /dev/null +++ b/chrome/browser/resources/media_router/elements/route_details/BUILD.gn
@@ -0,0 +1,21 @@ +# Copyright 2018 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("//third_party/closure_compiler/compile_js.gni") + +js_type_check("closure_compile") { + deps = [ + ":route_details", + ] +} + +js_library("route_details") { + deps = [ + "../..:media_router_data", + "../..:media_router_ui_interface", + "../route_controls:route_controls", + "//ui/webui/resources/js:i18n_behavior", + "//ui/webui/resources/js:load_time_data", + ] +}
diff --git a/chrome/browser/resources/media_router/elements/route_details/compiled_resources2.gyp b/chrome/browser/resources/media_router/elements/route_details/compiled_resources2.gyp deleted file mode 100644 index d8eb228..0000000 --- a/chrome/browser/resources/media_router/elements/route_details/compiled_resources2.gyp +++ /dev/null
@@ -1,18 +0,0 @@ -# Copyright 2016 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. -{ - 'targets': [ - { - 'target_name': 'route_details', - 'dependencies': [ - '../../compiled_resources2.gyp:media_router_data', - '../../compiled_resources2.gyp:media_router_ui_interface', - '../route_controls/compiled_resources2.gyp:route_controls', - '<(DEPTH)/ui/webui/resources/js/compiled_resources2.gyp:i18n_behavior', - '<(DEPTH)/ui/webui/resources/js/compiled_resources2.gyp:load_time_data', - ], - 'includes': ['../../../../../../third_party/closure_compiler/compile_js2.gypi'], - }, - ], -}
diff --git a/chrome/browser/resources/media_router/elements/route_details/route_details.js b/chrome/browser/resources/media_router/elements/route_details/route_details.js index a91b589..7152686 100644 --- a/chrome/browser/resources/media_router/elements/route_details/route_details.js +++ b/chrome/browser/resources/media_router/elements/route_details/route_details.js
@@ -191,7 +191,7 @@ * @private */ shouldShowWebUiControls_: function(route) { - return route && route.supportsWebUiController; + return !!route && !!route.supportsWebUiController; }, /**
diff --git a/chrome/browser/resources/print_preview/new/app.js b/chrome/browser/resources/print_preview/new/app.js index 229656f..ee0eae5 100644 --- a/chrome/browser/resources/print_preview/new/app.js +++ b/chrome/browser/resources/print_preview/new/app.js
@@ -148,6 +148,9 @@ /** @private {boolean} */ openPdfInPreview_: false, + /** @private {boolean} */ + isInKioskAutoPrintMode_: false, + /** @override */ attached: function() { this.nativeLayer_ = print_preview.NativeLayer.getInstance(); @@ -156,6 +159,9 @@ this.listenerTracker_ = new WebUIListenerTracker(); this.listenerTracker_.add( 'use-cloud-print', this.onCloudPrintEnable_.bind(this)); + this.listenerTracker_.add('print-failed', this.onPrintFailed_.bind(this)); + this.listenerTracker_.add( + 'print-preset-options', this.onPrintPresetOptions_.bind(this)); this.destinationStore_ = new print_preview.DestinationStore( this.userInfo_, this.listenerTracker_); this.invitationStore_ = new print_preview.InvitationStore(this.userInfo_); @@ -268,6 +274,7 @@ settings.serializedDefaultDestinationSelectionRulesStr, this.recentDestinations_); this.isInAppKioskMode_ = settings.isInAppKioskMode; + this.isInKioskAutoPrintMode_ = settings.isInKioskAutoPrintMode; }, /** @@ -320,12 +327,16 @@ this.set( 'destination_.capabilities', this.destinationStore_.selectedDestination.capabilities); - if (this.state != print_preview_new.State.READY && - this.state != print_preview_new.State.FATAL_ERROR) { - this.$.state.transitTo(print_preview_new.State.READY); - } + if (!this.$.model.initialized()) this.$.model.applyStickySettings(); + + if (this.state == print_preview_new.State.NOT_READY || + this.state == print_preview_new.State.INVALID_PRINTER) { + this.$.state.transitTo(print_preview_new.State.READY); + if (this.isInKioskAutoPrintMode_) + this.onPrintRequested_(); + } }, /** @@ -497,6 +508,24 @@ }, /** + * Updates printing options according to source document presets. + * @param {boolean} disableScaling Whether the document disables scaling. + * @param {number} copies The default number of copies from the document. + * @param {number} duplex The default duplex setting from the document. + * @private + */ + onPrintPresetOptions_: function(disableScaling, copies, duplex) { + if (disableScaling) + this.documentInfo_.updateIsScalingDisabled(true); + + if (copies > 0 && this.getSetting('copies').available) + this.setSetting('copies', copies); + + if (duplex >= 0 && this.getSetting('duplex').available) + this.setSetting('duplex', duplex); + }, + + /** * @return {boolean} Whether to show the "More settings" link. * @private */
diff --git a/chrome/browser/resources/print_preview/new/copies_settings.js b/chrome/browser/resources/print_preview/new/copies_settings.js index 7453e36..f76e484 100644 --- a/chrome/browser/resources/print_preview/new/copies_settings.js +++ b/chrome/browser/resources/print_preview/new/copies_settings.js
@@ -17,22 +17,16 @@ disabled: Boolean, }, - /** @private {boolean} */ - isInitialized_: false, - observers: [ 'onInputChanged_(currentValue_, inputValid_)', - 'onInitialized_(settings.copies.value, settings.collate.value)' + 'onSettingsChanged_(settings.copies.value, settings.collate.value)' ], /** * Updates the input string when the setting has been initialized. * @private */ - onInitialized_: function() { - if (this.isInitialized_) - return; - this.isInitialized_ = true; + onSettingsChanged_: function() { const copies = this.getSetting('copies'); this.currentValue_ = /** @type {string} */ (copies.value.toString()); const collate = this.getSetting('collate');
diff --git a/chrome/browser/resources/settings/controls/settings_toggle_button.js b/chrome/browser/resources/settings/controls/settings_toggle_button.js index a2a896c..320cacdd2 100644 --- a/chrome/browser/resources/settings/controls/settings_toggle_button.js +++ b/chrome/browser/resources/settings/controls/settings_toggle_button.js
@@ -78,13 +78,6 @@ if (this.controlDisabled()) return; - // Ignore this |tap| event, if the interaction sequence - // (pointerdown+pointerup) began within the cr-toggle itself. - if (/** @type {!CrToggleElement} */ (this.$.control) - .shouldIgnoreHostTap(e)) { - return; - } - this.checked = !this.checked; this.notifyChangedByUserInteraction(); this.fire('change');
diff --git a/chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_runner_win.cc b/chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_runner_win.cc index 543fe160..4aa35af 100644 --- a/chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_runner_win.cc +++ b/chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_runner_win.cc
@@ -100,7 +100,7 @@ cleaner_command_line_.AppendSwitchASCII(chrome_cleaner::kChromeChannelSwitch, base::IntToString(ChannelAsInt())); base::FilePath chrome_exe_path; - PathService::Get(base::FILE_EXE, &chrome_exe_path); + base::PathService::Get(base::FILE_EXE, &chrome_exe_path); cleaner_command_line_.AppendSwitchPath(chrome_cleaner::kChromeExePathSwitch, chrome_exe_path); if (!InstallUtil::IsPerUserInstall())
diff --git a/chrome/browser/safe_browsing/download_protection/disk_image_type_sniffer_mac_unittest.cc b/chrome/browser/safe_browsing/download_protection/disk_image_type_sniffer_mac_unittest.cc index 1450180e..853764f 100644 --- a/chrome/browser/safe_browsing/download_protection/disk_image_type_sniffer_mac_unittest.cc +++ b/chrome/browser/safe_browsing/download_protection/disk_image_type_sniffer_mac_unittest.cc
@@ -36,7 +36,7 @@ protected: base::FilePath GetFilePath(const char* file_name) { base::FilePath test_data; - EXPECT_TRUE(PathService::Get(chrome::DIR_GEN_TEST_DATA, &test_data)); + EXPECT_TRUE(base::PathService::Get(chrome::DIR_GEN_TEST_DATA, &test_data)); return test_data.AppendASCII("chrome") .AppendASCII("safe_browsing_dmg") .AppendASCII(file_name);
diff --git a/chrome/browser/safe_browsing/download_protection/download_protection_service_unittest.cc b/chrome/browser/safe_browsing/download_protection/download_protection_service_unittest.cc index 2ae80d2..6be228bd 100644 --- a/chrome/browser/safe_browsing/download_protection/download_protection_service_unittest.cc +++ b/chrome/browser/safe_browsing/download_protection/download_protection_service_unittest.cc
@@ -280,7 +280,7 @@ has_result_ = false; base::FilePath source_path; - ASSERT_TRUE(PathService::Get(base::DIR_SOURCE_ROOT, &source_path)); + ASSERT_TRUE(base::PathService::Get(base::DIR_SOURCE_ROOT, &source_path)); testdata_path_ = source_path.AppendASCII("chrome") .AppendASCII("test") .AppendASCII("data") @@ -1428,7 +1428,7 @@ net::URLRequestStatus::SUCCESS); base::FilePath signed_dmg; - EXPECT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &signed_dmg)); + EXPECT_TRUE(base::PathService::Get(chrome::DIR_TEST_DATA, &signed_dmg)); signed_dmg = signed_dmg.AppendASCII("safe_browsing") .AppendASCII("mach_o") .AppendASCII("signed-archive.dmg"); @@ -1451,7 +1451,8 @@ EXPECT_EQ(2215u, GetClientDownloadRequest()->udif_code_signature().length()); base::FilePath signed_dmg_signature; - EXPECT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &signed_dmg_signature)); + EXPECT_TRUE( + base::PathService::Get(chrome::DIR_TEST_DATA, &signed_dmg_signature)); signed_dmg_signature = signed_dmg_signature.AppendASCII("safe_browsing") .AppendASCII("mach_o") .AppendASCII("signed-archive-signature.data"); @@ -1474,7 +1475,7 @@ net::URLRequestStatus::SUCCESS); base::FilePath unsigned_dmg; - EXPECT_TRUE(PathService::Get(chrome::DIR_GEN_TEST_DATA, &unsigned_dmg)); + EXPECT_TRUE(base::PathService::Get(chrome::DIR_GEN_TEST_DATA, &unsigned_dmg)); unsigned_dmg = unsigned_dmg.AppendASCII("chrome") .AppendASCII("safe_browsing_dmg") .AppendASCII("mach_o_in_dmg.dmg"); @@ -1510,7 +1511,7 @@ net::URLRequestStatus::SUCCESS); base::FilePath test_data; - EXPECT_TRUE(PathService::Get(chrome::DIR_GEN_TEST_DATA, &test_data)); + EXPECT_TRUE(base::PathService::Get(chrome::DIR_GEN_TEST_DATA, &test_data)); test_data = test_data.AppendASCII("chrome") .AppendASCII("safe_browsing_dmg") .AppendASCII("mach_o_in_dmg.txt"); @@ -1543,7 +1544,7 @@ net::URLRequestStatus::SUCCESS); base::FilePath test_data; - EXPECT_TRUE(PathService::Get(chrome::DIR_GEN_TEST_DATA, &test_data)); + EXPECT_TRUE(base::PathService::Get(chrome::DIR_GEN_TEST_DATA, &test_data)); test_data = test_data.AppendASCII("chrome") .AppendASCII("safe_browsing_dmg") .AppendASCII("mach_o_in_dmg_no_koly_signature.txt"); @@ -1576,7 +1577,7 @@ net::URLRequestStatus::SUCCESS); base::FilePath unsigned_dmg; - EXPECT_TRUE(PathService::Get(chrome::DIR_GEN_TEST_DATA, &unsigned_dmg)); + EXPECT_TRUE(base::PathService::Get(chrome::DIR_GEN_TEST_DATA, &unsigned_dmg)); unsigned_dmg = unsigned_dmg.AppendASCII("chrome") .AppendASCII("safe_browsing_dmg") .AppendASCII("mach_o_in_dmg.dmg");
diff --git a/chrome/browser/safe_browsing/download_protection/path_sanitizer.cc b/chrome/browser/safe_browsing/download_protection/path_sanitizer.cc index b593ab0..f2da90f 100644 --- a/chrome/browser/safe_browsing/download_protection/path_sanitizer.cc +++ b/chrome/browser/safe_browsing/download_protection/path_sanitizer.cc
@@ -11,7 +11,7 @@ PathSanitizer::PathSanitizer() { // Get the home directory path. - if (!PathService::Get(base::DIR_HOME, &home_path_)) + if (!base::PathService::Get(base::DIR_HOME, &home_path_)) NOTREACHED(); }
diff --git a/chrome/browser/safe_browsing/download_protection/path_sanitizer_unittest.cc b/chrome/browser/safe_browsing/download_protection/path_sanitizer_unittest.cc index e339dd7..f91fbfe9 100644 --- a/chrome/browser/safe_browsing/download_protection/path_sanitizer_unittest.cc +++ b/chrome/browser/safe_browsing/download_protection/path_sanitizer_unittest.cc
@@ -15,7 +15,7 @@ // Returns the root directory with a trailing separator. Works on all platforms. base::FilePath GetRootDirectory() { base::FilePath dir_temp; - if (!PathService::Get(base::DIR_TEMP, &dir_temp)) + if (!base::PathService::Get(base::DIR_TEMP, &dir_temp)) NOTREACHED(); std::vector<base::FilePath::StringType> components;
diff --git a/chrome/browser/safe_browsing/download_protection/two_phase_uploader_unittest.cc b/chrome/browser/safe_browsing/download_protection/two_phase_uploader_unittest.cc index 822cd9b58..c176a62 100644 --- a/chrome/browser/safe_browsing/download_protection/two_phase_uploader_unittest.cc +++ b/chrome/browser/safe_browsing/download_protection/two_phase_uploader_unittest.cc
@@ -53,7 +53,7 @@ base::FilePath GetTestFilePath() { base::FilePath file_path; - PathService::Get(base::DIR_SOURCE_ROOT, &file_path); + base::PathService::Get(base::DIR_SOURCE_ROOT, &file_path); file_path = file_path.AppendASCII("net"); file_path = file_path.AppendASCII("data"); file_path = file_path.AppendASCII("url_request_unittest");
diff --git a/chrome/browser/safe_browsing/incident_reporting/binary_integrity_analyzer_mac_unittest.cc b/chrome/browser/safe_browsing/incident_reporting/binary_integrity_analyzer_mac_unittest.cc index 01b9e0d5..c134711 100644 --- a/chrome/browser/safe_browsing/incident_reporting/binary_integrity_analyzer_mac_unittest.cc +++ b/chrome/browser/safe_browsing/incident_reporting/binary_integrity_analyzer_mac_unittest.cc
@@ -54,7 +54,7 @@ }; void BinaryIntegrityAnalyzerMacTest::SetUp() { - ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir_)); + ASSERT_TRUE(base::PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir_)); test_data_dir_ = test_data_dir_.Append("safe_browsing/mach_o/"); // Set up the temp directory to copy the bundle to.
diff --git a/chrome/browser/safe_browsing/incident_reporting/binary_integrity_analyzer_win.cc b/chrome/browser/safe_browsing/incident_reporting/binary_integrity_analyzer_win.cc index 5551091..e54d4a3e 100644 --- a/chrome/browser/safe_browsing/incident_reporting/binary_integrity_analyzer_win.cc +++ b/chrome/browser/safe_browsing/incident_reporting/binary_integrity_analyzer_win.cc
@@ -34,7 +34,7 @@ // Find where chrome.exe is installed. base::FilePath chrome_exe_dir; - if (!PathService::Get(base::DIR_EXE, &chrome_exe_dir)) + if (!base::PathService::Get(base::DIR_EXE, &chrome_exe_dir)) NOTREACHED(); std::vector<base::FilePath> critical_binaries;
diff --git a/chrome/browser/safe_browsing/incident_reporting/binary_integrity_analyzer_win_unittest.cc b/chrome/browser/safe_browsing/incident_reporting/binary_integrity_analyzer_win_unittest.cc index 13c1681..7824dd1 100644 --- a/chrome/browser/safe_browsing/incident_reporting/binary_integrity_analyzer_win_unittest.cc +++ b/chrome/browser/safe_browsing/incident_reporting/binary_integrity_analyzer_win_unittest.cc
@@ -65,7 +65,7 @@ // We retrieve DIR_TEST_DATA here because it is based on DIR_EXE and we are // about to override the path to the latter. - if (!PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir_)) + if (!base::PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir_)) NOTREACHED(); exe_dir_override_.reset(
diff --git a/chrome/browser/safe_browsing/local_two_phase_testserver.cc b/chrome/browser/safe_browsing/local_two_phase_testserver.cc index 90ffcfe..1a642ba 100644 --- a/chrome/browser/safe_browsing/local_two_phase_testserver.cc +++ b/chrome/browser/safe_browsing/local_two_phase_testserver.cc
@@ -23,7 +23,7 @@ bool LocalTwoPhaseTestServer::GetTestServerPath( base::FilePath* testserver_path) const { base::FilePath testserver_dir; - if (!PathService::Get(chrome::DIR_TEST_DATA, &testserver_dir)) { + if (!base::PathService::Get(chrome::DIR_TEST_DATA, &testserver_dir)) { LOG(ERROR) << "Failed to get DIR_TEST_DATA"; return false; }
diff --git a/chrome/browser/safe_browsing/safe_browsing_service.cc b/chrome/browser/safe_browsing/safe_browsing_service.cc index ffe274d..de3f7b3 100644 --- a/chrome/browser/safe_browsing/safe_browsing_service.cc +++ b/chrome/browser/safe_browsing/safe_browsing_service.cc
@@ -104,7 +104,7 @@ // static base::FilePath SafeBrowsingService::GetBaseFilename() { base::FilePath path; - bool result = PathService::Get(chrome::DIR_USER_DATA, &path); + bool result = base::PathService::Get(chrome::DIR_USER_DATA, &path); DCHECK(result); return path.Append(safe_browsing::kSafeBrowsingBaseFilename); } @@ -139,7 +139,7 @@ FileTypePolicies::GetInstance(); base::FilePath user_data_dir; - bool result = PathService::Get(chrome::DIR_USER_DATA, &user_data_dir); + bool result = base::PathService::Get(chrome::DIR_USER_DATA, &user_data_dir); DCHECK(result); url_request_context_getter_ = new SafeBrowsingURLRequestContextGetter(
diff --git a/chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc b/chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc index dd45c24..f1294054 100644 --- a/chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc +++ b/chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc
@@ -789,7 +789,7 @@ void SetUpInProcessBrowserTestFixture() override { base::FilePath test_data_dir; - PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir); + base::PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir); embedded_test_server()->RegisterRequestHandler( base::Bind(&HandleNeverCompletingRequests)); embedded_test_server()->RegisterRequestHandler( @@ -2067,7 +2067,7 @@ EXPECT_FALSE(base::PathExists(cookie_path)); base::FilePath test_dir; - if (!PathService::Get(chrome::DIR_TEST_DATA, &test_dir)) { + if (!base::PathService::Get(chrome::DIR_TEST_DATA, &test_dir)) { EXPECT_TRUE(false); return false; }
diff --git a/chrome/browser/safe_browsing/safe_browsing_store_file_unittest.cc b/chrome/browser/safe_browsing/safe_browsing_store_file_unittest.cc index b75e7c6..597c897 100644 --- a/chrome/browser/safe_browsing/safe_browsing_store_file_unittest.cc +++ b/chrome/browser/safe_browsing/safe_browsing_store_file_unittest.cc
@@ -758,7 +758,7 @@ // - Sub chunk kSubChunk1 containing kHash3. const char kBasename[] = "FileStoreVersion7"; base::FilePath golden_path; - ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &golden_path)); + ASSERT_TRUE(base::PathService::Get(chrome::DIR_TEST_DATA, &golden_path)); golden_path = golden_path.AppendASCII("SafeBrowsing"); golden_path = golden_path.AppendASCII(kBasename); ASSERT_TRUE(base::CopyFile(golden_path, filename_)); @@ -792,7 +792,7 @@ // - Sub chunk kSubChunk1 containing kHash3. const char kBasename[] = "FileStoreVersion8"; base::FilePath golden_path; - ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &golden_path)); + ASSERT_TRUE(base::PathService::Get(chrome::DIR_TEST_DATA, &golden_path)); golden_path = golden_path.AppendASCII("SafeBrowsing"); golden_path = golden_path.AppendASCII(kBasename); ASSERT_TRUE(base::CopyFile(golden_path, filename_));
diff --git a/chrome/browser/safe_browsing/signature_evaluator_mac_unittest.cc b/chrome/browser/safe_browsing/signature_evaluator_mac_unittest.cc index aa3f72d..c8a56c0 100644 --- a/chrome/browser/safe_browsing/signature_evaluator_mac_unittest.cc +++ b/chrome/browser/safe_browsing/signature_evaluator_mac_unittest.cc
@@ -49,14 +49,14 @@ protected: void SetUp() override { base::FilePath source_path; - ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &source_path)); + ASSERT_TRUE(base::PathService::Get(chrome::DIR_TEST_DATA, &source_path)); testdata_path_ = source_path.AppendASCII("safe_browsing").AppendASCII("mach_o"); base::FilePath dir_exe; - ASSERT_TRUE(PathService::Get(base::DIR_EXE, &dir_exe)); + ASSERT_TRUE(base::PathService::Get(base::DIR_EXE, &dir_exe)); base::FilePath file_exe; - ASSERT_TRUE(PathService::Get(base::FILE_EXE, &file_exe)); + ASSERT_TRUE(base::PathService::Get(base::FILE_EXE, &file_exe)); ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); }
diff --git a/chrome/browser/search/local_files_ntp_source.cc b/chrome/browser/search/local_files_ntp_source.cc index b7e98e7..d3d66ee 100644 --- a/chrome/browser/search/local_files_ntp_source.cc +++ b/chrome/browser/search/local_files_ntp_source.cc
@@ -123,7 +123,7 @@ const std::string& origin, const content::URLDataSource::GotDataCallback& callback) { base::FilePath fullpath; - PathService::Get(base::DIR_SOURCE_ROOT, &fullpath); + base::PathService::Get(base::DIR_SOURCE_ROOT, &fullpath); fullpath = fullpath.AppendASCII(kBasePath).AppendASCII(path); content::URLDataSource::GotDataCallback wrapper = base::Bind(&CheckLocalIncludes, callback);
diff --git a/chrome/browser/search/one_google_bar/one_google_bar_fetcher_impl.cc b/chrome/browser/search/one_google_bar/one_google_bar_fetcher_impl.cc index 1438708..201c47f 100644 --- a/chrome/browser/search/one_google_bar/one_google_bar_fetcher_impl.cc +++ b/chrome/browser/search/one_google_bar/one_google_bar_fetcher_impl.cc
@@ -334,10 +334,10 @@ data_decoder::SafeJsonParser::Parse( content::ServiceManagerConnection::GetForProcess()->GetConnector(), response, - base::Bind(&OneGoogleBarFetcherImpl::JsonParsed, - weak_ptr_factory_.GetWeakPtr()), - base::Bind(&OneGoogleBarFetcherImpl::JsonParseFailed, - weak_ptr_factory_.GetWeakPtr())); + base::BindRepeating(&OneGoogleBarFetcherImpl::JsonParsed, + weak_ptr_factory_.GetWeakPtr()), + base::BindRepeating(&OneGoogleBarFetcherImpl::JsonParseFailed, + weak_ptr_factory_.GetWeakPtr())); } void OneGoogleBarFetcherImpl::JsonParsed(std::unique_ptr<base::Value> value) {
diff --git a/chrome/browser/search_engines/template_url_fetcher_unittest.cc b/chrome/browser/search_engines/template_url_fetcher_unittest.cc index a6f00d5..e58a047 100644 --- a/chrome/browser/search_engines/template_url_fetcher_unittest.cc +++ b/chrome/browser/search_engines/template_url_fetcher_unittest.cc
@@ -106,7 +106,7 @@ }; bool GetTestDataDir(base::FilePath* dir) { - if (!PathService::Get(base::DIR_SOURCE_ROOT, dir)) + if (!base::PathService::Get(base::DIR_SOURCE_ROOT, dir)) return false; *dir = dir->AppendASCII("components") .AppendASCII("test")
diff --git a/chrome/browser/search_engines/template_url_parser_unittest.cc b/chrome/browser/search_engines/template_url_parser_unittest.cc index bb78768..2d30e24 100644 --- a/chrome/browser/search_engines/template_url_parser_unittest.cc +++ b/chrome/browser/search_engines/template_url_parser_unittest.cc
@@ -75,7 +75,7 @@ } void TemplateURLParserTest::SetUp() { - ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &osdd_dir_)); + ASSERT_TRUE(base::PathService::Get(chrome::DIR_TEST_DATA, &osdd_dir_)); osdd_dir_ = osdd_dir_.AppendASCII("osdd"); ASSERT_TRUE(base::PathExists(osdd_dir_)); }
diff --git a/chrome/browser/search_engines/template_url_scraper_browsertest.cc b/chrome/browser/search_engines/template_url_scraper_browsertest.cc index 0007d0f..ae7427b 100644 --- a/chrome/browser/search_engines/template_url_scraper_browsertest.cc +++ b/chrome/browser/search_engines/template_url_scraper_browsertest.cc
@@ -57,7 +57,7 @@ std::unique_ptr<net::test_server::HttpResponse> SendResponse( const net::test_server::HttpRequest& request) { base::FilePath test_data_dir; - PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir); + base::PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir); base::FilePath index_file = test_data_dir.AppendASCII("template_url_scraper") .AppendASCII("submit_handler") .AppendASCII("index.html");
diff --git a/chrome/browser/service_process/service_process_control_browsertest.cc b/chrome/browser/service_process/service_process_control_browsertest.cc index aed74498..aadc960 100644 --- a/chrome/browser/service_process/service_process_control_browsertest.cc +++ b/chrome/browser/service_process/service_process_control_browsertest.cc
@@ -138,7 +138,7 @@ void SetUpCommandLine(base::CommandLine* command_line) override { ServiceProcessControlBrowserTest::SetUpCommandLine(command_line); base::FilePath exe; - PathService::Get(base::DIR_EXE, &exe); + base::PathService::Get(base::DIR_EXE, &exe); #if defined(OS_MACOSX) exe = exe.DirName().DirName().DirName(); #endif
diff --git a/chrome/browser/sessions/better_session_restore_browsertest.cc b/chrome/browser/sessions/better_session_restore_browsertest.cc index 6f77acb..9e9afa3 100644 --- a/chrome/browser/sessions/better_session_restore_browsertest.cc +++ b/chrome/browser/sessions/better_session_restore_browsertest.cc
@@ -112,7 +112,7 @@ test_files_.push_back("session_storage.html"); test_files_.push_back("subdomain_cookies.html"); - CHECK(PathService::Get(base::DIR_SOURCE_ROOT, &test_file_dir_)); + CHECK(base::PathService::Get(base::DIR_SOURCE_ROOT, &test_file_dir_)); test_file_dir_ = test_file_dir_.AppendASCII("chrome/test/data").AppendASCII(test_path_);
diff --git a/chrome/browser/shell_integration_linux.cc b/chrome/browser/shell_integration_linux.cc index f00a684..8a3a1056 100644 --- a/chrome/browser/shell_integration_linux.cc +++ b/chrome/browser/shell_integration_linux.cc
@@ -99,7 +99,7 @@ std::string* chrome_version) { // Get the path to the Chrome version. base::FilePath chrome_dir; - if (!PathService::Get(base::DIR_EXE, &chrome_dir)) + if (!base::PathService::Get(base::DIR_EXE, &chrome_dir)) return false; base::FilePath chrome_version_path = chrome_dir.Append(script); @@ -333,7 +333,7 @@ DCHECK_EQ(shortcut_filename.BaseName().value(), shortcut_filename.value()); base::FilePath desktop_path; - if (!PathService::Get(base::DIR_USER_DESKTOP, &desktop_path)) + if (!base::PathService::Get(base::DIR_USER_DESKTOP, &desktop_path)) return false; int desktop_fd = open(desktop_path.value().c_str(), O_RDONLY | O_DIRECTORY); @@ -557,7 +557,7 @@ // Just return the name of the executable path for Chrome. base::FilePath chrome_exe_path; - PathService::Get(base::FILE_EXE, &chrome_exe_path); + base::PathService::Get(base::FILE_EXE, &chrome_exe_path); return chrome_exe_path; } @@ -669,7 +669,7 @@ const std::string& extension_id) { base::FilePath desktop_path; // If Get returns false, just leave desktop_path empty. - PathService::Get(base::DIR_USER_DESKTOP, &desktop_path); + base::PathService::Get(base::DIR_USER_DESKTOP, &desktop_path); return GetExistingShortcutLocations(env, profile_path, extension_id, desktop_path); } @@ -734,7 +734,7 @@ base::i18n::ReplaceIllegalCharactersInPath(&filename, '_'); base::FilePath desktop_path; - if (!PathService::Get(base::DIR_USER_DESKTOP, &desktop_path)) + if (!base::PathService::Get(base::DIR_USER_DESKTOP, &desktop_path)) return base::FilePath(); base::FilePath filepath = desktop_path.Append(filename);
diff --git a/chrome/browser/shell_integration_win.cc b/chrome/browser/shell_integration_win.cc index d25a53c8..7f8f3e6a 100644 --- a/chrome/browser/shell_integration_win.cc +++ b/chrome/browser/shell_integration_win.cc
@@ -150,11 +150,11 @@ // Get full path of chrome. base::FilePath chrome_exe; - if (!PathService::Get(base::FILE_EXE, &chrome_exe)) + if (!base::PathService::Get(base::FILE_EXE, &chrome_exe)) return; base::FilePath pins_path; - if (!PathService::Get(base::DIR_TASKBAR_PINS, &pins_path)) { + if (!base::PathService::Get(base::DIR_TASKBAR_PINS, &pins_path)) { NOTREACHED(); return; } @@ -533,7 +533,7 @@ base::AssertBlockingAllowed(); base::FilePath chrome_exe; - if (!PathService::Get(base::FILE_EXE, &chrome_exe)) { + if (!base::PathService::Get(base::FILE_EXE, &chrome_exe)) { LOG(ERROR) << "Error getting app exe path"; return false; } @@ -557,7 +557,7 @@ return false; base::FilePath chrome_exe; - if (!PathService::Get(base::FILE_EXE, &chrome_exe)) { + if (!base::PathService::Get(base::FILE_EXE, &chrome_exe)) { LOG(ERROR) << "Error getting app exe path"; return false; } @@ -637,7 +637,7 @@ base::AssertBlockingAllowed(); base::FilePath chrome_exe; - if (!PathService::Get(base::FILE_EXE, &chrome_exe)) { + if (!base::PathService::Get(base::FILE_EXE, &chrome_exe)) { NOTREACHED() << "Error getting app exe path"; return false; } @@ -657,7 +657,7 @@ base::AssertBlockingAllowed(); base::FilePath chrome_exe; - if (!PathService::Get(base::FILE_EXE, &chrome_exe)) { + if (!base::PathService::Get(base::FILE_EXE, &chrome_exe)) { NOTREACHED() << "Error getting app exe path"; on_finished_callback.Run(); return; @@ -684,7 +684,7 @@ base::AssertBlockingAllowed(); base::FilePath chrome_exe; - if (!PathService::Get(base::FILE_EXE, &chrome_exe)) { + if (!base::PathService::Get(base::FILE_EXE, &chrome_exe)) { NOTREACHED() << "Error getting app exe path"; return false; } @@ -707,7 +707,7 @@ base::AssertBlockingAllowed(); base::FilePath chrome_exe; - if (!PathService::Get(base::FILE_EXE, &chrome_exe)) { + if (!base::PathService::Get(base::FILE_EXE, &chrome_exe)) { NOTREACHED() << "Error getting app exe path"; on_finished_callback.Run(); return;
diff --git a/chrome/browser/site_details_browsertest.cc b/chrome/browser/site_details_browsertest.cc index 0eb9ec0..ca793026 100644 --- a/chrome/browser/site_details_browsertest.cc +++ b/chrome/browser/site_details_browsertest.cc
@@ -177,7 +177,7 @@ // Add content/test/data so we can use cross_site_iframe_factory.html base::FilePath test_data_dir; - ASSERT_TRUE(PathService::Get(base::DIR_SOURCE_ROOT, &test_data_dir)); + ASSERT_TRUE(base::PathService::Get(base::DIR_SOURCE_ROOT, &test_data_dir)); embedded_test_server()->ServeFilesFromDirectory( test_data_dir.AppendASCII("content/test/data/")); ASSERT_TRUE(embedded_test_server()->Start());
diff --git a/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc b/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc index aeb5838a..6a7fa0c 100644 --- a/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc +++ b/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc
@@ -65,7 +65,7 @@ bool success = false; #if defined(OS_WIN) base::FilePath dict_dir; - PathService::Get(chrome::DIR_USER_DATA, &dict_dir); + base::PathService::Get(chrome::DIR_USER_DATA, &dict_dir); base::FilePath fallback_file_path = dict_dir.Append(path.BaseName()); bytes_written = @@ -333,7 +333,7 @@ // Check if the dictionary exists in the fallback location. If so, use it // rather than downloading anew. base::FilePath user_dir; - PathService::Get(chrome::DIR_USER_DATA, &user_dir); + base::PathService::Get(chrome::DIR_USER_DATA, &user_dir); base::FilePath fallback = user_dir.Append(path.BaseName()); if (!base::PathExists(path) && base::PathExists(fallback)) dictionary.path = fallback; @@ -379,7 +379,7 @@ // sequence because it checks if there is a "Dictionaries" directory and // create it. base::FilePath dict_dir; - PathService::Get(chrome::DIR_APP_DICTIONARIES, &dict_dir); + base::PathService::Get(chrome::DIR_APP_DICTIONARIES, &dict_dir); base::FilePath dict_path = spellcheck::GetVersionedFileName(language, dict_dir);
diff --git a/chrome/browser/spellchecker/spellcheck_service_browsertest.cc b/chrome/browser/spellchecker/spellcheck_service_browsertest.cc index 9cd14b52..2ac4bc0 100644 --- a/chrome/browser/spellchecker/spellcheck_service_browsertest.cc +++ b/chrome/browser/spellchecker/spellcheck_service_browsertest.cc
@@ -431,7 +431,7 @@ // Write the corrupted BDICT data to create a corrupted BDICT file. base::FilePath dict_dir; - ASSERT_TRUE(PathService::Get(chrome::DIR_APP_DICTIONARIES, &dict_dir)); + ASSERT_TRUE(base::PathService::Get(chrome::DIR_APP_DICTIONARIES, &dict_dir)); base::FilePath bdict_path = spellcheck::GetVersionedFileName("en-US", dict_dir);
diff --git a/chrome/browser/ssl/security_state_tab_helper_browsertest.cc b/chrome/browser/ssl/security_state_tab_helper_browsertest.cc index 0b9a48b..619f4b44 100644 --- a/chrome/browser/ssl/security_state_tab_helper_browsertest.cc +++ b/chrome/browser/ssl/security_state_tab_helper_browsertest.cc
@@ -1512,7 +1512,7 @@ // Prepare a file for the upload form. base::FilePath file_path; - EXPECT_TRUE(PathService::Get(base::DIR_TEMP, &file_path)); + EXPECT_TRUE(base::PathService::Get(base::DIR_TEMP, &file_path)); file_path = file_path.AppendASCII("bar"); // Fill out the form to refer to the test file. @@ -2448,7 +2448,7 @@ void SetUpOnMainThread() override { base::FilePath serve_file; - PathService::Get(chrome::DIR_TEST_DATA, &serve_file); + base::PathService::Get(chrome::DIR_TEST_DATA, &serve_file); serve_file = serve_file.Append(FILE_PATH_LITERAL("title1.html")); content::BrowserThread::PostTask( content::BrowserThread::IO, FROM_HERE, @@ -2660,7 +2660,7 @@ // Prepare a file for the upload form. base::FilePath file_path; - EXPECT_TRUE(PathService::Get(base::DIR_TEMP, &file_path)); + EXPECT_TRUE(base::PathService::Get(base::DIR_TEMP, &file_path)); file_path = file_path.AppendASCII("bar"); // Fill out the form to refer to the test file.
diff --git a/chrome/browser/ssl/ssl_error_controller_client.cc b/chrome/browser/ssl/ssl_error_controller_client.cc index 5bae65f..401e999 100644 --- a/chrome/browser/ssl/ssl_error_controller_client.cc +++ b/chrome/browser/ssl/ssl_error_controller_client.cc
@@ -105,7 +105,7 @@ #elif defined(OS_WIN) base::FilePath path; - PathService::Get(base::DIR_SYSTEM, &path); + base::PathService::Get(base::DIR_SYSTEM, &path); static const base::char16 kControlPanelExe[] = L"control.exe"; path = path.Append(base::string16(kControlPanelExe)); base::CommandLine command(path);
diff --git a/chrome/browser/subresource_filter/subresource_filter_browser_test_harness.cc b/chrome/browser/subresource_filter/subresource_filter_browser_test_harness.cc index 9c1d2b1..8c77922 100644 --- a/chrome/browser/subresource_filter/subresource_filter_browser_test_harness.cc +++ b/chrome/browser/subresource_filter/subresource_filter_browser_test_harness.cc
@@ -65,7 +65,7 @@ ->SetIsAfterStartupForTesting(); base::FilePath test_data_dir; - ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir)); + ASSERT_TRUE(base::PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir)); embedded_test_server()->ServeFilesFromDirectory(test_data_dir); host_resolver()->AddSimulatedFailure("host-with-dns-lookup-failure"); @@ -73,7 +73,7 @@ content::SetupCrossSiteRedirector(embedded_test_server()); // Add content/test/data for cross_site_iframe_factory.html - ASSERT_TRUE(PathService::Get(content::DIR_TEST_DATA, &test_data_dir)); + ASSERT_TRUE(base::PathService::Get(content::DIR_TEST_DATA, &test_data_dir)); embedded_test_server()->ServeFilesFromDirectory(test_data_dir); ASSERT_TRUE(embedded_test_server()->Start());
diff --git a/chrome/browser/supervised_user/supervised_user_service.cc b/chrome/browser/supervised_user/supervised_user_service.cc index 8520d819..9b046f50 100644 --- a/chrome/browser/supervised_user/supervised_user_service.cc +++ b/chrome/browser/supervised_user/supervised_user_service.cc
@@ -144,7 +144,7 @@ base::FilePath GetBlacklistPath() { base::FilePath blacklist_dir; - PathService::Get(chrome::DIR_USER_DATA, &blacklist_dir); + base::PathService::Get(chrome::DIR_USER_DATA, &blacklist_dir); return blacklist_dir.AppendASCII(kBlacklistFilename); }
diff --git a/chrome/browser/supervised_user/supervised_user_service_unittest.cc b/chrome/browser/supervised_user/supervised_user_service_unittest.cc index cc1fc28b..7df4eb5 100644 --- a/chrome/browser/supervised_user/supervised_user_service_unittest.cc +++ b/chrome/browser/supervised_user/supervised_user_service_unittest.cc
@@ -625,7 +625,7 @@ // Load a whitelist. base::FilePath test_data_dir; - ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir)); + ASSERT_TRUE(base::PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir)); SupervisedUserWhitelistService* whitelist_service = supervised_user_service->GetWhitelistService(); base::FilePath whitelist_path =
diff --git a/chrome/browser/supervised_user/supervised_user_whitelist_service_unittest.cc b/chrome/browser/supervised_user/supervised_user_whitelist_service_unittest.cc index 03d1aa2..21e606f 100644 --- a/chrome/browser/supervised_user/supervised_user_whitelist_service_unittest.cc +++ b/chrome/browser/supervised_user/supervised_user_whitelist_service_unittest.cc
@@ -199,7 +199,7 @@ base::RunLoop run_loop; site_lists_changed_callback_ = run_loop.QuitClosure(); base::FilePath test_data_dir; - ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir)); + ASSERT_TRUE(base::PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir)); base::FilePath whitelist_path = test_data_dir.AppendASCII("whitelists/content_pack/site_list.json"); installer_->NotifyWhitelistReady("aaaa", base::ASCIIToUTF16("Title"),
diff --git a/chrome/browser/sync/glue/extensions_activity_monitor_unittest.cc b/chrome/browser/sync/glue/extensions_activity_monitor_unittest.cc index d7e98119..3228f65 100644 --- a/chrome/browser/sync/glue/extensions_activity_monitor_unittest.cc +++ b/chrome/browser/sync/glue/extensions_activity_monitor_unittest.cc
@@ -32,7 +32,7 @@ // Create and return an extension with the given path. scoped_refptr<Extension> MakeExtension(const std::string& name) { base::FilePath path; - EXPECT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &path)); + EXPECT_TRUE(base::PathService::Get(chrome::DIR_TEST_DATA, &path)); path = path.AppendASCII(name); base::DictionaryValue value;
diff --git a/chrome/browser/sync/test/integration/bookmarks_helper.cc b/chrome/browser/sync/test/integration/bookmarks_helper.cc index edc0ede3..d9be41f 100644 --- a/chrome/browser/sync/test/integration/bookmarks_helper.cc +++ b/chrome/browser/sync/test/integration/bookmarks_helper.cc
@@ -929,7 +929,7 @@ return gfx::Image(); base::FilePath full_path; - if (!PathService::Get(chrome::DIR_TEST_DATA, &full_path)) + if (!base::PathService::Get(chrome::DIR_TEST_DATA, &full_path)) return gfx::Image(); full_path = full_path.AppendASCII("sync").AppendASCII(path);
diff --git a/chrome/browser/sync/test/integration/single_client_polling_sync_test.cc b/chrome/browser/sync/test/integration/single_client_polling_sync_test.cc index f63fba1..7b4891a 100644 --- a/chrome/browser/sync/test/integration/single_client_polling_sync_test.cc +++ b/chrome/browser/sync/test/integration/single_client_polling_sync_test.cc
@@ -9,6 +9,7 @@ #include "chrome/browser/sync/test/integration/session_hierarchy_match_checker.h" #include "chrome/browser/sync/test/integration/sessions_helper.h" #include "chrome/browser/sync/test/integration/sync_test.h" +#include "chrome/browser/sync/test/integration/updated_progress_marker_checker.h" #include "chrome/common/webui_url_constants.h" #include "components/browser_sync/profile_sync_service.h" #include "components/sync/base/sync_prefs.h" @@ -17,6 +18,8 @@ #include "testing/gmock/include/gmock/gmock.h" using testing::Eq; +using testing::Ge; +using testing::Le; using sessions_helper::CheckInitialState; using sessions_helper::OpenTab; using syncer::SyncPrefs; @@ -96,14 +99,45 @@ Eq(1234)); } -// TODO(tschumann): Add a test that tests a poll on start-up in a simpler set -// up: Bring up a single client, let it sync a local mode and do a fake restart. -// After that, GetLastCycleSnapshot() should be an empty snapshot, so the we can -// use the UpdatedProgressMarker checker to verify a poll has taken place. This -// might require changing -// UpdatedProgressMarkerChecker::IsExitConditionSatisfied() to require non-empty -// progress markers. -// This test could also verify that the last poll time gets not simply set -// to the start-up time but kept if not yet expired. +// This test simulates the poll interval expiring between restarts. +// It first starts up a client, executes a sync cycle and stops it. After a +// simulated pause, the client gets started up again and we expect a sync cycle +// to happen (which would be caused by polling). +// Note, that there's a more realistic (and more complex) test for this in +// two_client_polling_sync_test.cc too. +IN_PROC_BROWSER_TEST_F(SingleClientPollingSyncTest, + ShouldPollWhenIntervalExpiredAcrossRestarts) { + base::Time start = base::Time::Now(); + ASSERT_TRUE(SetupSync()) << "SetupSync() failed."; + // Trigger a sync-cycle. + ASSERT_TRUE(CheckInitialState(0)); + ASSERT_TRUE(OpenTab(0, GURL(chrome::kChromeUIHistoryURL))); + ASSERT_TRUE(SessionHierarchyMatchChecker( + fake_server::SessionsHierarchy( + {{GURL(chrome::kChromeUIHistoryURL).spec()}}), + GetSyncService(0), GetFakeServer()) + .Wait()); + + // Verify that the last poll time got initialized to a reasonable value. + SyncPrefs remote_prefs(GetProfile(0)->GetPrefs()); + EXPECT_THAT(remote_prefs.GetLastPollTime(), Ge(start)); + EXPECT_THAT(remote_prefs.GetLastPollTime(), Le(base::Time::Now())); + + // Make sure no extra sync cycles get triggered by test infrastructure and + // stop sync. + StopConfigurationRefresher(); + GetClient(0)->StopSyncService(syncer::SyncService::KEEP_DATA); + + // Simulate elapsed time so that the poll interval expired. + remote_prefs.SetShortPollInterval(base::TimeDelta::FromMinutes(10)); + remote_prefs.SetLongPollInterval(base::TimeDelta::FromMinutes(10)); + remote_prefs.SetLastPollTime(base::Time::Now() - + base::TimeDelta::FromMinutes(11)); + ASSERT_TRUE(GetClient(0)->StartSyncService()) << "SetupSync() failed."; + // After the start, the last sync cycle snapshot should be empty. + // Once a sync request happened (e.g. by a poll), that snapshot is populated. + // We use the following checker to simply wait for an non-empty snapshot. + EXPECT_TRUE(UpdatedProgressMarkerChecker(GetSyncService(0)).Wait()); +} } // namespace
diff --git a/chrome/browser/sync/test/integration/sync_test.cc b/chrome/browser/sync/test/integration/sync_test.cc index d0d2113d..9a8fa18 100644 --- a/chrome/browser/sync/test/integration/sync_test.cc +++ b/chrome/browser/sync/test/integration/sync_test.cc
@@ -340,7 +340,7 @@ // about it. This is needed in tests such as supervised user cases which // assume browser->profile() as the custodian profile. base::FilePath user_data_dir; - PathService::Get(chrome::DIR_USER_DATA, &user_data_dir); + base::PathService::Get(chrome::DIR_USER_DATA, &user_data_dir); if (!tmp_profile_paths_[index]->CreateUniqueTempDirUnderPath( user_data_dir)) { ADD_FAILURE(); @@ -557,7 +557,7 @@ // Create the verifier profile. if (use_verifier_) { base::FilePath user_data_dir; - PathService::Get(chrome::DIR_USER_DATA, &user_data_dir); + base::PathService::Get(chrome::DIR_USER_DATA, &user_data_dir); profile_delegates_[num_clients_] = std::make_unique<SyncProfileDelegate>(base::Callback<void(Profile*)>()); verifier_ = MakeTestProfile(
diff --git a/chrome/browser/task_manager/providers/web_contents/tab_contents_tag_browsertest.cc b/chrome/browser/task_manager/providers/web_contents/tab_contents_tag_browsertest.cc index 0b95fd67..08029a58 100644 --- a/chrome/browser/task_manager/providers/web_contents/tab_contents_tag_browsertest.cc +++ b/chrome/browser/task_manager/providers/web_contents/tab_contents_tag_browsertest.cc
@@ -294,7 +294,7 @@ // Check that the task manager uses the specified favicon for the page. base::FilePath test_dir; - PathService::Get(chrome::DIR_TEST_DATA, &test_dir); + base::PathService::Get(chrome::DIR_TEST_DATA, &test_dir); std::string favicon_string; { base::ScopedAllowBlockingForTesting allow_blocking;
diff --git a/chrome/browser/task_manager/sampling/shared_sampler_win_unittest.cc b/chrome/browser/task_manager/sampling/shared_sampler_win_unittest.cc index 78348437..3ffbed20 100644 --- a/chrome/browser/task_manager/sampling/shared_sampler_win_unittest.cc +++ b/chrome/browser/task_manager/sampling/shared_sampler_win_unittest.cc
@@ -169,7 +169,7 @@ int buffer_size) { // Calculate the number of bytes required for the structure, and ImageName. base::FilePath current_exe; - CHECK(PathService::Get(base::FILE_EXE, ¤t_exe)); + CHECK(base::PathService::Get(base::FILE_EXE, ¤t_exe)); base::string16 image_name = current_exe.BaseName().value(); const int kImageNameBytes = image_name.length() * sizeof(base::char16);
diff --git a/chrome/browser/themes/browser_theme_pack_unittest.cc b/chrome/browser/themes/browser_theme_pack_unittest.cc index 8d1f3f3..535ef2ad 100644 --- a/chrome/browser/themes/browser_theme_pack_unittest.cc +++ b/chrome/browser/themes/browser_theme_pack_unittest.cc
@@ -168,7 +168,7 @@ base::FilePath GetStarGazingPath() { base::FilePath test_path; - if (!PathService::Get(chrome::DIR_TEST_DATA, &test_path)) { + if (!base::PathService::Get(chrome::DIR_TEST_DATA, &test_path)) { NOTREACHED(); return test_path; } @@ -184,7 +184,7 @@ base::FilePath GetHiDpiThemePath() { base::FilePath test_path; - if (!PathService::Get(chrome::DIR_TEST_DATA, &test_path)) { + if (!base::PathService::Get(chrome::DIR_TEST_DATA, &test_path)) { NOTREACHED(); return test_path; }
diff --git a/chrome/browser/themes/theme_service_unittest.cc b/chrome/browser/themes/theme_service_unittest.cc index 909ae16..82720299 100644 --- a/chrome/browser/themes/theme_service_unittest.cc +++ b/chrome/browser/themes/theme_service_unittest.cc
@@ -66,7 +66,7 @@ std::string LoadUnpackedThemeAt(const base::FilePath& temp_dir) { base::FilePath dst_manifest_path = temp_dir.AppendASCII("manifest.json"); base::FilePath test_data_dir; - EXPECT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir)); + EXPECT_TRUE(base::PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir)); base::FilePath src_manifest_path = test_data_dir.AppendASCII("extensions/theme_minimal/manifest.json"); EXPECT_TRUE(base::CopyFile(src_manifest_path, dst_manifest_path));
diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn index 391a9a1..e0ec670 100644 --- a/chrome/browser/ui/BUILD.gn +++ b/chrome/browser/ui/BUILD.gn
@@ -2281,6 +2281,11 @@ sources += [ "input_method/input_method_engine.cc", "input_method/input_method_engine.h", + "views/confirm_quit_bubble.cc", + "views/confirm_quit_bubble.h", + "views/confirm_quit_bubble.h", + "views/confirm_quit_bubble_controller.cc", + "views/confirm_quit_bubble_controller.h", ] } }
diff --git a/chrome/browser/ui/app_list/app_list_controller_browsertest.cc b/chrome/browser/ui/app_list/app_list_controller_browsertest.cc index aaa63dc..47290cd5 100644 --- a/chrome/browser/ui/app_list/app_list_controller_browsertest.cc +++ b/chrome/browser/ui/app_list/app_list_controller_browsertest.cc
@@ -55,7 +55,8 @@ IN_PROC_BROWSER_TEST_F(AppListControllerSearchResultsBrowserTest, UninstallSearchResult) { base::FilePath test_extension_path; - ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_extension_path)); + ASSERT_TRUE( + base::PathService::Get(chrome::DIR_TEST_DATA, &test_extension_path)); test_extension_path = test_extension_path.AppendASCII("extensions") .AppendASCII("platform_apps") .AppendASCII("minimal");
diff --git a/chrome/browser/ui/ash/launcher/launcher_controller_helper.cc b/chrome/browser/ui/ash/launcher/launcher_controller_helper.cc index 43f4ba7..02620367a 100644 --- a/chrome/browser/ui/ash/launcher/launcher_controller_helper.cc +++ b/chrome/browser/ui/ash/launcher/launcher_controller_helper.cc
@@ -170,6 +170,11 @@ if (arc_prefs && arc_prefs->IsRegistered(id)) return true; + crostini::CrostiniRegistryService* registry_service = + crostini::CrostiniRegistryServiceFactory::GetForProfile(profile_); + if (registry_service && registry_service->IsCrostiniShelfAppId(id)) + return registry_service->GetRegistration(id) != nullptr; + if (app_list::IsInternalApp(id)) return true;
diff --git a/chrome/browser/ui/ash/wallpaper_controller_client.cc b/chrome/browser/ui/ash/wallpaper_controller_client.cc index c18cc079..07e9142b 100644 --- a/chrome/browser/ui/ash/wallpaper_controller_client.cc +++ b/chrome/browser/ui/ash/wallpaper_controller_client.cc
@@ -450,13 +450,13 @@ // Get the paths of wallpaper directories. base::FilePath user_data_path; - CHECK(PathService::Get(chrome::DIR_USER_DATA, &user_data_path)); + CHECK(base::PathService::Get(chrome::DIR_USER_DATA, &user_data_path)); base::FilePath chromeos_wallpapers_path; - CHECK(PathService::Get(chrome::DIR_CHROMEOS_WALLPAPERS, - &chromeos_wallpapers_path)); + CHECK(base::PathService::Get(chrome::DIR_CHROMEOS_WALLPAPERS, + &chromeos_wallpapers_path)); base::FilePath chromeos_custom_wallpapers_path; - CHECK(PathService::Get(chrome::DIR_CHROMEOS_CUSTOM_WALLPAPERS, - &chromeos_custom_wallpapers_path)); + CHECK(base::PathService::Get(chrome::DIR_CHROMEOS_CUSTOM_WALLPAPERS, + &chromeos_custom_wallpapers_path)); wallpaper_controller_->Init( std::move(client), user_data_path, chromeos_wallpapers_path,
diff --git a/chrome/browser/ui/ash/wallpaper_policy_handler.cc b/chrome/browser/ui/ash/wallpaper_policy_handler.cc index 89410da3..f61c4d3 100644 --- a/chrome/browser/ui/ash/wallpaper_policy_handler.cc +++ b/chrome/browser/ui/ash/wallpaper_policy_handler.cc
@@ -63,8 +63,8 @@ // Initialize the desired file path for device policy wallpaper. The path will // be used by WallpaperController to access the wallpaper file. base::FilePath chromeos_wallpapers_path; - CHECK(PathService::Get(chrome::DIR_CHROMEOS_WALLPAPERS, - &chromeos_wallpapers_path)); + CHECK(base::PathService::Get(chrome::DIR_CHROMEOS_WALLPAPERS, + &chromeos_wallpapers_path)); device_wallpaper_file_path_ = chromeos_wallpapers_path.Append(kDeviceWallpaperDir) .Append(kDeviceWallpaperFile);
diff --git a/chrome/browser/ui/blocked_content/safe_browsing_triggered_popup_blocker_browsertest.cc b/chrome/browser/ui/blocked_content/safe_browsing_triggered_popup_blocker_browsertest.cc index aff9734..a98ca203 100644 --- a/chrome/browser/ui/blocked_content/safe_browsing_triggered_popup_blocker_browsertest.cc +++ b/chrome/browser/ui/blocked_content/safe_browsing_triggered_popup_blocker_browsertest.cc
@@ -141,7 +141,7 @@ void SetUpOnMainThread() override { base::FilePath test_data_dir; - PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir); + base::PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir); embedded_test_server()->ServeFilesFromDirectory(test_data_dir); host_resolver()->AddRule("*", "127.0.0.1"); content::SetupCrossSiteRedirector(embedded_test_server());
diff --git a/chrome/browser/ui/browser_focus_uitest.cc b/chrome/browser/ui/browser_focus_uitest.cc index 254a583..807f907c 100644 --- a/chrome/browser/ui/browser_focus_uitest.cc +++ b/chrome/browser/ui/browser_focus_uitest.cc
@@ -185,7 +185,7 @@ explicit TestInterstitialPage(WebContents* tab) { base::ScopedAllowBlockingForTesting allow_blocking; base::FilePath file_path; - bool success = PathService::Get(chrome::DIR_TEST_DATA, &file_path); + bool success = base::PathService::Get(chrome::DIR_TEST_DATA, &file_path); EXPECT_TRUE(success); file_path = file_path.AppendASCII("focus/typical_page.html"); success = base::ReadFileToString(file_path, &html_contents_);
diff --git a/chrome/browser/ui/cocoa/download/download_util_mac_unittest.mm b/chrome/browser/ui/cocoa/download/download_util_mac_unittest.mm index df2cb63..9e4f813f 100644 --- a/chrome/browser/ui/cocoa/download/download_util_mac_unittest.mm +++ b/chrome/browser/ui/cocoa/download/download_util_mac_unittest.mm
@@ -32,7 +32,7 @@ TEST_F(DownloadUtilMacTest, AddFileToPasteboardTest) { // Get a download test file for addition to the pasteboard. base::FilePath testPath; - ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &testPath)); + ASSERT_TRUE(base::PathService::Get(chrome::DIR_TEST_DATA, &testPath)); base::FilePath testFile(FILE_PATH_LITERAL("download-test1.lib")); testPath = testPath.Append(testFile);
diff --git a/chrome/browser/ui/cocoa/extensions/browser_action_test_util_views_cocoa.mm b/chrome/browser/ui/cocoa/extensions/browser_action_test_util_views_cocoa.mm index c56c265..821f0f1e 100644 --- a/chrome/browser/ui/cocoa/extensions/browser_action_test_util_views_cocoa.mm +++ b/chrome/browser/ui/cocoa/extensions/browser_action_test_util_views_cocoa.mm
@@ -67,7 +67,7 @@ if (!base::mac::FrameworkBundle()) { // Look in the framework bundle for resources. base::FilePath path; - PathService::Get(base::DIR_EXE, &path); + base::PathService::Get(base::DIR_EXE, &path); path = path.Append(chrome::kFrameworkName); base::mac::SetOverrideFrameworkBundlePath(path); }
diff --git a/chrome/browser/ui/cocoa/extensions/extension_install_prompt_test_utils.mm b/chrome/browser/ui/cocoa/extensions/extension_install_prompt_test_utils.mm index 6b1d185..3cb657b 100644 --- a/chrome/browser/ui/cocoa/extensions/extension_install_prompt_test_utils.mm +++ b/chrome/browser/ui/cocoa/extensions/extension_install_prompt_test_utils.mm
@@ -23,7 +23,7 @@ scoped_refptr<Extension> extension; base::FilePath path; - PathService::Get(chrome::DIR_TEST_DATA, &path); + base::PathService::Get(chrome::DIR_TEST_DATA, &path); path = path.AppendASCII("extensions") .AppendASCII(extension_dir_name) .AppendASCII(manifest_file); @@ -53,7 +53,7 @@ gfx::Image LoadInstallPromptIcon() { base::ScopedAllowBlockingForTesting allow_blocking; base::FilePath path; - PathService::Get(chrome::DIR_TEST_DATA, &path); + base::PathService::Get(chrome::DIR_TEST_DATA, &path); path = path.AppendASCII("extensions") .AppendASCII("install_prompt") .AppendASCII("icon.png");
diff --git a/chrome/browser/ui/cocoa/extensions/extension_installed_bubble_controller_unittest.mm b/chrome/browser/ui/cocoa/extensions/extension_installed_bubble_controller_unittest.mm index bd5ae5a..b6e35bf 100644 --- a/chrome/browser/ui/cocoa/extensions/extension_installed_bubble_controller_unittest.mm +++ b/chrome/browser/ui/cocoa/extensions/extension_installed_bubble_controller_unittest.mm
@@ -155,7 +155,7 @@ // Load test icon from extension test directory. SkBitmap LoadTestIcon() { base::FilePath path; - PathService::Get(chrome::DIR_TEST_DATA, &path); + base::PathService::Get(chrome::DIR_TEST_DATA, &path); path = path.AppendASCII("extensions").AppendASCII("icon1.png"); std::string file_contents;
diff --git a/chrome/browser/ui/cocoa/share_menu_controller_browsertest.mm b/chrome/browser/ui/cocoa/share_menu_controller_browsertest.mm index 15e246d5..43f37743 100644 --- a/chrome/browser/ui/cocoa/share_menu_controller_browsertest.mm +++ b/chrome/browser/ui/cocoa/share_menu_controller_browsertest.mm
@@ -61,7 +61,7 @@ void SetUpOnMainThread() override { base::FilePath test_data_dir; - PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir); + base::PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir); embedded_test_server()->ServeFilesFromDirectory(test_data_dir); ASSERT_TRUE(embedded_test_server()->Start());
diff --git a/chrome/browser/ui/cocoa/test/cocoa_test_helper.mm b/chrome/browser/ui/cocoa/test/cocoa_test_helper.mm index 0ab828f..8972330 100644 --- a/chrome/browser/ui/cocoa/test/cocoa_test_helper.mm +++ b/chrome/browser/ui/cocoa/test/cocoa_test_helper.mm
@@ -17,7 +17,7 @@ void CocoaTest::BootstrapCocoa() { // Look in the framework bundle for resources. base::FilePath path; - PathService::Get(base::DIR_EXE, &path); + base::PathService::Get(base::DIR_EXE, &path); path = path.Append(chrome::kFrameworkName); base::mac::SetOverrideFrameworkBundlePath(path); }
diff --git a/chrome/browser/ui/global_error/global_error_browsertest.cc b/chrome/browser/ui/global_error/global_error_browsertest.cc index 39a20e38..c43ef29 100644 --- a/chrome/browser/ui/global_error/global_error_browsertest.cc +++ b/chrome/browser/ui/global_error/global_error_browsertest.cc
@@ -57,7 +57,7 @@ base::FilePath crx_path = temp_dir->GetPath().AppendASCII("temp.crx"); base::FilePath test_data; - EXPECT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_data)); + EXPECT_TRUE(base::PathService::Get(chrome::DIR_TEST_DATA, &test_data)); test_data = test_data.AppendASCII("extensions"); base::FilePath dir_path = test_data.AppendASCII(extension_folder);
diff --git a/chrome/browser/ui/input_method/input_method_engine_base.cc b/chrome/browser/ui/input_method/input_method_engine_base.cc index 43b53f99..12be7ec 100644 --- a/chrome/browser/ui/input_method/input_method_engine_base.cc +++ b/chrome/browser/ui/input_method/input_method_engine_base.cc
@@ -306,8 +306,8 @@ ++next_context_id_; observer_->OnFocus(ui::IMEEngineHandlerInterface::InputContext( - context_id_, input_context.type, input_context.mode, - input_context.flags)); + context_id_, input_context.type, input_context.mode, input_context.flags, + input_context.focus_reason)); } void InputMethodEngineBase::FocusOut() {
diff --git a/chrome/browser/ui/input_method/input_method_engine_unittest.cc b/chrome/browser/ui/input_method/input_method_engine_unittest.cc index 09dad54..42d0bbe 100644 --- a/chrome/browser/ui/input_method/input_method_engine_unittest.cc +++ b/chrome/browser/ui/input_method/input_method_engine_unittest.cc
@@ -171,7 +171,8 @@ void FocusIn(ui::TextInputType input_type) { ui::IMEEngineHandlerInterface::InputContext input_context( - input_type, ui::TEXT_INPUT_MODE_DEFAULT, ui::TEXT_INPUT_FLAG_NONE); + input_type, ui::TEXT_INPUT_MODE_DEFAULT, ui::TEXT_INPUT_FLAG_NONE, + ui::TextInputClient::FOCUS_REASON_OTHER); engine_->FocusIn(input_context); ui::IMEBridge::Get()->SetCurrentInputContext(input_context); }
diff --git a/chrome/browser/ui/media_router/presentation_receiver_window_controller_browsertest.cc b/chrome/browser/ui/media_router/presentation_receiver_window_controller_browsertest.cc index 0f7b7e6..d7d0279 100644 --- a/chrome/browser/ui/media_router/presentation_receiver_window_controller_browsertest.cc +++ b/chrome/browser/ui/media_router/presentation_receiver_window_controller_browsertest.cc
@@ -51,7 +51,7 @@ base::FilePath GetResourceFile(base::FilePath::StringPieceType relative_path) { base::FilePath base_dir; - if (!PathService::Get(chrome::DIR_TEST_DATA, &base_dir)) + if (!base::PathService::Get(chrome::DIR_TEST_DATA, &base_dir)) return base::FilePath(); base::FilePath full_path = base_dir.Append(kResourcePath).Append(relative_path);
diff --git a/chrome/browser/ui/passwords/password_manager_porter.cc b/chrome/browser/ui/passwords/password_manager_porter.cc index 751f337..ddd5dfb6 100644 --- a/chrome/browser/ui/passwords/password_manager_porter.cc +++ b/chrome/browser/ui/passwords/password_manager_porter.cc
@@ -49,7 +49,7 @@ base::FilePath GetDefaultFilepathForPasswordFile( const base::FilePath::StringType& default_extension) { base::FilePath default_path; - PathService::Get(chrome::DIR_USER_DOCUMENTS, &default_path); + base::PathService::Get(chrome::DIR_USER_DOCUMENTS, &default_path); #if defined(OS_WIN) base::string16 file_name = l10n_util::GetStringUTF16(IDS_PASSWORD_MANAGER_DEFAULT_EXPORT_FILENAME);
diff --git a/chrome/browser/ui/prefs/prefs_tab_helper_browsertest.cc b/chrome/browser/ui/prefs/prefs_tab_helper_browsertest.cc index f3a78bd..ef8f83867 100644 --- a/chrome/browser/ui/prefs/prefs_tab_helper_browsertest.cc +++ b/chrome/browser/ui/prefs/prefs_tab_helper_browsertest.cc
@@ -18,7 +18,7 @@ protected: virtual base::FilePath GetPreferencesFilePath() { base::FilePath test_data_directory; - PathService::Get(chrome::DIR_TEST_DATA, &test_data_directory); + base::PathService::Get(chrome::DIR_TEST_DATA, &test_data_directory); return test_data_directory .AppendASCII("profiles") .AppendASCII("web_prefs") @@ -28,7 +28,7 @@ bool SetUpUserDataDirectory() override { base::FilePath user_data_directory; - PathService::Get(chrome::DIR_USER_DATA, &user_data_directory); + base::PathService::Get(chrome::DIR_USER_DATA, &user_data_directory); base::FilePath default_profile = user_data_directory.AppendASCII(TestingProfile::kTestUserProfileDir); if (!base::CreateDirectory(default_profile)) {
diff --git a/chrome/browser/ui/profile_error_browsertest.cc b/chrome/browser/ui/profile_error_browsertest.cc index 09c2333e..74baf84 100644 --- a/chrome/browser/ui/profile_error_browsertest.cc +++ b/chrome/browser/ui/profile_error_browsertest.cc
@@ -33,7 +33,7 @@ bool SetUpUserDataDirectory() override { base::FilePath profile_dir; - if (!PathService::Get(chrome::DIR_USER_DATA, &profile_dir)) { + if (!base::PathService::Get(chrome::DIR_USER_DATA, &profile_dir)) { ADD_FAILURE(); return false; }
diff --git a/chrome/browser/ui/startup/startup_browser_creator_corrupt_profiles_browsertest_win.cc b/chrome/browser/ui/startup/startup_browser_creator_corrupt_profiles_browsertest_win.cc index bfffd91..8859215 100644 --- a/chrome/browser/ui/startup/startup_browser_creator_corrupt_profiles_browsertest_win.cc +++ b/chrome/browser/ui/startup/startup_browser_creator_corrupt_profiles_browsertest_win.cc
@@ -117,7 +117,7 @@ bool DeleteProfileData(const std::string& basepath) { base::FilePath user_data_dir; - if (!PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)) + if (!base::PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)) return false; base::FilePath dir_to_delete = user_data_dir.AppendASCII(basepath); @@ -127,7 +127,7 @@ bool RemoveCreateDirectoryPermissionForUserDataDirectory() { base::FilePath user_data_dir; - return PathService::Get(chrome::DIR_USER_DATA, &user_data_dir) && + return base::PathService::Get(chrome::DIR_USER_DATA, &user_data_dir) && base::DenyFilePermission(user_data_dir, FILE_ADD_SUBDIRECTORY); }
diff --git a/chrome/browser/ui/startup/startup_browser_creator_impl.cc b/chrome/browser/ui/startup/startup_browser_creator_impl.cc index 2f24225..a056dbe 100644 --- a/chrome/browser/ui/startup/startup_browser_creator_impl.cc +++ b/chrome/browser/ui/startup/startup_browser_creator_impl.cc
@@ -373,6 +373,20 @@ DCHECK(profile); profile_ = profile; +#if defined(OS_WIN) + // If the command line has the kNotificationLaunchId switch, then this + // Launch() call is from notification_helper.exe to process toast activation. + // Delegate to the notification system; do not open a browser window here. + if (command_line_.HasSwitch(switches::kNotificationLaunchId)) { + DCHECK(!command_line_.HasSwitch(switches::kAppId)); + if (NotificationPlatformBridgeWin::HandleActivation(command_line_)) { + RecordLaunchModeHistogram(LM_WIN_PLATFORM_NOTIFICATION); + return true; + } + return false; + } +#endif // defined(OS_WIN) + if (command_line_.HasSwitch(switches::kAppId)) { std::string app_id = command_line_.GetSwitchValueASCII(switches::kAppId); const Extension* extension = GetPlatformApp(profile, app_id); @@ -390,19 +404,6 @@ } } -#if defined(OS_WIN) - // If the command line has the kNotificationLaunchId switch, then this - // Launch() call is from notification_helper.exe to process toast activation. - // Delegate to the notification system; do not open a browser window here. - if (command_line_.HasSwitch(switches::kNotificationLaunchId)) { - if (NotificationPlatformBridgeWin::HandleActivation(command_line_)) { - RecordLaunchModeHistogram(LM_WIN_PLATFORM_NOTIFICATION); - return true; - } - return false; - } -#endif // defined(OS_WIN) - // Open the required browser windows and tabs. First, see if // we're being run as an application window. If so, the user // opened an app shortcut. Don't restore tabs or open initial
diff --git a/chrome/browser/ui/views/confirm_quit_bubble.cc b/chrome/browser/ui/views/confirm_quit_bubble.cc new file mode 100644 index 0000000..610a92a72 --- /dev/null +++ b/chrome/browser/ui/views/confirm_quit_bubble.cc
@@ -0,0 +1,76 @@ +// Copyright 2018 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome/browser/ui/views/confirm_quit_bubble.h" + +#include <utility> + +#include "base/message_loop/message_loop.h" +#include "base/strings/utf_string_conversions.h" +#include "chrome/browser/ui/views/subtle_notification_view.h" +#include "ui/gfx/animation/animation.h" +#include "ui/gfx/animation/slide_animation.h" +#include "ui/gfx/geometry/rect.h" +#include "ui/gfx/geometry/size.h" +#include "ui/strings/grit/ui_strings.h" +#include "ui/views/border.h" +#include "ui/views/view.h" +#include "ui/views/widget/widget.h" + +namespace { + +constexpr base::TimeDelta kSlideDuration = + base::TimeDelta::FromMilliseconds(200); + +} // namespace + +ConfirmQuitBubble::ConfirmQuitBubble() + : animation_(std::make_unique<gfx::SlideAnimation>(this)) { + animation_->SetSlideDuration(kSlideDuration.InMilliseconds()); +} + +ConfirmQuitBubble::~ConfirmQuitBubble() {} + +void ConfirmQuitBubble::Show() { + animation_->Show(); +} + +void ConfirmQuitBubble::Hide() { + animation_->Hide(); +} + +void ConfirmQuitBubble::AnimationProgressed(const gfx::Animation* animation) { + float opacity = static_cast<float>(animation->CurrentValueBetween(0.0, 1.0)); + if (opacity == 0) { + popup_.reset(); + } else { + if (!popup_) { + SubtleNotificationView* view = new SubtleNotificationView(); + + popup_ = std::make_unique<views::Widget>(); + views::Widget::InitParams params(views::Widget::InitParams::TYPE_POPUP); + params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; + params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; + params.accept_events = false; + params.keep_on_top = true; + popup_->Init(params); + popup_->SetContentsView(view); + + // TODO(thomasanderson): Localize this string. + view->UpdateContent( + base::WideToUTF16(L"Hold |Ctrl|+|Shift|+|Q| to quit")); + + gfx::Size size = view->GetPreferredSize(); + view->SetSize(size); + popup_->CenterWindow(size); + + popup_->ShowInactive(); + } + popup_->SetOpacity(opacity); + } +} + +void ConfirmQuitBubble::AnimationEnded(const gfx::Animation* animation) { + AnimationProgressed(animation); +}
diff --git a/chrome/browser/ui/views/confirm_quit_bubble.h b/chrome/browser/ui/views/confirm_quit_bubble.h new file mode 100644 index 0000000..b4de3d0 --- /dev/null +++ b/chrome/browser/ui/views/confirm_quit_bubble.h
@@ -0,0 +1,47 @@ +// Copyright 2018 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CHROME_BROWSER_UI_VIEWS_CONFIRM_QUIT_BUBBLE_H_ +#define CHROME_BROWSER_UI_VIEWS_CONFIRM_QUIT_BUBBLE_H_ + +#include <memory> + +#include "base/macros.h" +#include "chrome/browser/ui/views/confirm_quit_bubble_base.h" +#include "ui/gfx/animation/animation_delegate.h" + +namespace gfx { +class Animation; +class SlideAnimation; +} // namespace gfx + +namespace views { +class Widget; +} // namespace views + +// Manages showing and hiding a notification bubble that gives instructions to +// continue holding the quit accelerator to quit. +class ConfirmQuitBubble : public ConfirmQuitBubbleBase, + public gfx::AnimationDelegate { + public: + ConfirmQuitBubble(); + ~ConfirmQuitBubble() override; + + void Show() override; + void Hide() override; + + private: + // gfx::AnimationDelegate: + void AnimationProgressed(const gfx::Animation* animation) override; + void AnimationEnded(const gfx::Animation* animation) override; + + // Animation controlling showing/hiding of the bubble. + std::unique_ptr<gfx::SlideAnimation> const animation_; + + std::unique_ptr<views::Widget> popup_; + + DISALLOW_COPY_AND_ASSIGN(ConfirmQuitBubble); +}; + +#endif // CHROME_BROWSER_UI_VIEWS_CONFIRM_QUIT_BUBBLE_H_
diff --git a/chrome/browser/ui/views/confirm_quit_bubble_base.h b/chrome/browser/ui/views/confirm_quit_bubble_base.h new file mode 100644 index 0000000..8bd73c2 --- /dev/null +++ b/chrome/browser/ui/views/confirm_quit_bubble_base.h
@@ -0,0 +1,19 @@ +// Copyright 2018 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CHROME_BROWSER_UI_VIEWS_CONFIRM_QUIT_BUBBLE_BASE_H_ +#define CHROME_BROWSER_UI_VIEWS_CONFIRM_QUIT_BUBBLE_BASE_H_ + +// Base class of ConfirmQuitBubble necessary for unit testing +// ConfirmQuitBubbleController. +class ConfirmQuitBubbleBase { + public: + ConfirmQuitBubbleBase() {} + virtual ~ConfirmQuitBubbleBase() {} + + virtual void Show() = 0; + virtual void Hide() = 0; +}; + +#endif // CHROME_BROWSER_UI_VIEWS_CONFIRM_QUIT_BUBBLE_BASE_H_
diff --git a/chrome/browser/ui/views/confirm_quit_bubble_controller.cc b/chrome/browser/ui/views/confirm_quit_bubble_controller.cc new file mode 100644 index 0000000..ab391c1 --- /dev/null +++ b/chrome/browser/ui/views/confirm_quit_bubble_controller.cc
@@ -0,0 +1,94 @@ +// Copyright 2018 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome/browser/ui/views/confirm_quit_bubble_controller.h" + +#include <utility> + +#include "base/feature_list.h" +#include "base/memory/singleton.h" +#include "base/threading/thread_task_runner_handle.h" +#include "chrome/browser/ui/browser_commands.h" +#include "chrome/browser/ui/views/confirm_quit_bubble.h" +#include "ui/base/accelerators/accelerator.h" +#include "ui/events/keycodes/keyboard_codes.h" + +namespace { + +constexpr ui::KeyboardCode kAcceleratorKeyCode = ui::VKEY_Q; +constexpr int kAcceleratorModifiers = ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN; + +constexpr base::TimeDelta kShowDuration = + base::TimeDelta::FromMilliseconds(1500); + +} // namespace + +// static +ConfirmQuitBubbleController* ConfirmQuitBubbleController::GetInstance() { + return base::Singleton<ConfirmQuitBubbleController>::get(); +} + +ConfirmQuitBubbleController::ConfirmQuitBubbleController() + : view_(std::make_unique<ConfirmQuitBubble>()), + hide_timer_(std::make_unique<base::OneShotTimer>()) {} + +ConfirmQuitBubbleController::ConfirmQuitBubbleController( + std::unique_ptr<ConfirmQuitBubbleBase> bubble, + std::unique_ptr<base::Timer> hide_timer) + : view_(std::move(bubble)), hide_timer_(std::move(hide_timer)) {} + +ConfirmQuitBubbleController::~ConfirmQuitBubbleController() {} + +bool ConfirmQuitBubbleController::HandleKeyboardEvent( + const ui::Accelerator& accelerator) { + if (accelerator.key_code() == kAcceleratorKeyCode && + accelerator.modifiers() == kAcceleratorModifiers && + accelerator.key_state() == ui::Accelerator::KeyState::PRESSED && + !accelerator.IsRepeat()) { + if (!hide_timer_->IsRunning()) { + view_->Show(); + released_key_ = false; + hide_timer_->Start(FROM_HERE, kShowDuration, this, + &ConfirmQuitBubbleController::OnTimerElapsed); + } else { + // The accelerator was pressed while the bubble was showing. Consider + // this a confirmation to quit. + view_->Hide(); + hide_timer_->Stop(); + Quit(); + } + return true; + } + if (accelerator.key_code() == kAcceleratorKeyCode && + accelerator.key_state() == ui::Accelerator::KeyState::RELEASED) { + released_key_ = true; + return true; + } + return false; +} + +void ConfirmQuitBubbleController::OnTimerElapsed() { + view_->Hide(); + + if (!released_key_) { + // The accelerator was held down the entire time the bubble was showing. + Quit(); + } +} + +void ConfirmQuitBubbleController::Quit() { + if (quit_action_) { + std::move(quit_action_).Run(); + } else { + // Delay quitting because doing so destroys objects that may be used when + // unwinding the stack. + base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, + base::BindOnce(chrome::Exit)); + } +} + +void ConfirmQuitBubbleController::SetQuitActionForTest( + base::OnceClosure quit_action) { + quit_action_ = std::move(quit_action); +}
diff --git a/chrome/browser/ui/views/confirm_quit_bubble_controller.h b/chrome/browser/ui/views/confirm_quit_bubble_controller.h new file mode 100644 index 0000000..4357d38 --- /dev/null +++ b/chrome/browser/ui/views/confirm_quit_bubble_controller.h
@@ -0,0 +1,62 @@ +// Copyright 2018 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CHROME_BROWSER_UI_VIEWS_CONFIRM_QUIT_BUBBLE_CONTROLLER_H_ +#define CHROME_BROWSER_UI_VIEWS_CONFIRM_QUIT_BUBBLE_CONTROLLER_H_ + +#include <memory> + +#include "base/macros.h" +#include "base/timer/timer.h" + +class ConfirmQuitBubbleBase; + +namespace base { +template <typename T> +struct DefaultSingletonTraits; +} + +namespace ui { +class Accelerator; +} + +// Manages showing and hiding the confirm-to-quit bubble. Requests Chrome to be +// closed if the quit accelerator is held down or pressed twice in succession. +class ConfirmQuitBubbleController { + public: + static ConfirmQuitBubbleController* GetInstance(); + + ~ConfirmQuitBubbleController(); + + // Returns true if the event was handled. + bool HandleKeyboardEvent(const ui::Accelerator& accelerator); + + private: + friend struct base::DefaultSingletonTraits<ConfirmQuitBubbleController>; + friend class ConfirmQuitBubbleControllerTest; + + ConfirmQuitBubbleController(std::unique_ptr<ConfirmQuitBubbleBase> bubble, + std::unique_ptr<base::Timer> hide_timer); + + ConfirmQuitBubbleController(); + + void OnTimerElapsed(); + + void Quit(); + + void SetQuitActionForTest(base::OnceClosure quit_action); + + std::unique_ptr<ConfirmQuitBubbleBase> const view_; + + // Indicates if the accelerator was released while the timer was active. + bool released_key_ = false; + + std::unique_ptr<base::Timer> hide_timer_; + + base::OnceClosure quit_action_; + + DISALLOW_COPY_AND_ASSIGN(ConfirmQuitBubbleController); +}; + +#endif // CHROME_BROWSER_UI_VIEWS_CONFIRM_QUIT_BUBBLE_CONTROLLER_H_
diff --git a/chrome/browser/ui/views/confirm_quit_bubble_controller_unittest.cc b/chrome/browser/ui/views/confirm_quit_bubble_controller_unittest.cc new file mode 100644 index 0000000..e88cc753 --- /dev/null +++ b/chrome/browser/ui/views/confirm_quit_bubble_controller_unittest.cc
@@ -0,0 +1,130 @@ +// Copyright 2018 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome/browser/ui/views/confirm_quit_bubble_controller.h" + +#include <memory> +#include <utility> + +#include "base/bind.h" +#include "base/macros.h" +#include "base/timer/mock_timer.h" +#include "chrome/browser/ui/views/confirm_quit_bubble.h" +#include "testing/gtest/include/gtest/gtest.h" +#include "ui/base/accelerators/accelerator.h" +#include "ui/events/keycodes/keyboard_codes.h" + +class TestConfirmQuitBubble : public ConfirmQuitBubbleBase { + public: + TestConfirmQuitBubble() {} + ~TestConfirmQuitBubble() override {} + + void Show() override {} + void Hide() override {} + + private: + DISALLOW_COPY_AND_ASSIGN(TestConfirmQuitBubble); +}; + +class ConfirmQuitBubbleControllerTest : public testing::Test { + protected: + void SetUp() override { + std::unique_ptr<TestConfirmQuitBubble> bubble = + std::make_unique<TestConfirmQuitBubble>(); + std::unique_ptr<base::MockTimer> timer = + std::make_unique<base::MockTimer>(false, false); + bubble_ = bubble.get(); + timer_ = timer.get(); + controller_.reset( + new ConfirmQuitBubbleController(std::move(bubble), std::move(timer))); + + quit_called_ = false; + controller_->SetQuitActionForTest(base::BindOnce( + &ConfirmQuitBubbleControllerTest::OnQuit, base::Unretained(this))); + } + + void TearDown() override { controller_.reset(); } + + void OnQuit() { quit_called_ = true; } + + void SendAccelerator(bool quit, bool press, bool repeat) { + ui::KeyboardCode key = quit ? ui::VKEY_Q : ui::VKEY_P; + int modifiers = ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN; + if (repeat) + modifiers |= ui::EF_IS_REPEAT; + ui::Accelerator::KeyState state = press + ? ui::Accelerator::KeyState::PRESSED + : ui::Accelerator::KeyState::RELEASED; + controller_->HandleKeyboardEvent(ui::Accelerator(key, modifiers, state)); + } + + void PressQuitAccelerator() { SendAccelerator(true, true, false); } + + void ReleaseQuitAccelerator() { SendAccelerator(true, false, false); } + + void RepeatQuitAccelerator() { SendAccelerator(true, true, true); } + + void PressOtherAccelerator() { SendAccelerator(false, true, false); } + + void ReleaseOtherAccelerator() { SendAccelerator(false, false, false); } + + std::unique_ptr<ConfirmQuitBubbleController> controller_; + + // Owned by |controller_|. + TestConfirmQuitBubble* bubble_; + + // Owned by |controller_|. + base::MockTimer* timer_; + + bool quit_called_ = false; +}; + +// Pressing and holding the shortcut should quit. +TEST_F(ConfirmQuitBubbleControllerTest, PressAndHold) { + PressQuitAccelerator(); + EXPECT_TRUE(timer_->IsRunning()); + timer_->Fire(); + EXPECT_TRUE(quit_called_); +} + +// Pressing the shortcut twice should quit. +TEST_F(ConfirmQuitBubbleControllerTest, DoublePress) { + PressQuitAccelerator(); + ReleaseQuitAccelerator(); + EXPECT_TRUE(timer_->IsRunning()); + PressQuitAccelerator(); + EXPECT_FALSE(timer_->IsRunning()); + EXPECT_TRUE(quit_called_); +} + +// Pressing the shortcut once should not quit. +TEST_F(ConfirmQuitBubbleControllerTest, SinglePress) { + PressQuitAccelerator(); + ReleaseQuitAccelerator(); + EXPECT_TRUE(timer_->IsRunning()); + timer_->Fire(); + EXPECT_FALSE(quit_called_); +} + +// Repeated presses should not be counted. +TEST_F(ConfirmQuitBubbleControllerTest, RepeatedPresses) { + PressQuitAccelerator(); + RepeatQuitAccelerator(); + ReleaseQuitAccelerator(); + EXPECT_TRUE(timer_->IsRunning()); + timer_->Fire(); + EXPECT_FALSE(quit_called_); +} + +// Other keys shouldn't matter. +TEST_F(ConfirmQuitBubbleControllerTest, OtherKeyPress) { + PressQuitAccelerator(); + ReleaseQuitAccelerator(); + PressOtherAccelerator(); + ReleaseOtherAccelerator(); + EXPECT_TRUE(timer_->IsRunning()); + PressQuitAccelerator(); + EXPECT_FALSE(timer_->IsRunning()); + EXPECT_TRUE(quit_called_); +}
diff --git a/chrome/browser/ui/views/extensions/extension_install_dialog_view_browsertest.cc b/chrome/browser/ui/views/extensions/extension_install_dialog_view_browsertest.cc index 6fa05a0..157755c 100644 --- a/chrome/browser/ui/views/extensions/extension_install_dialog_view_browsertest.cc +++ b/chrome/browser/ui/views/extensions/extension_install_dialog_view_browsertest.cc
@@ -236,7 +236,7 @@ void ShowUi(const std::string& name) override { extensions::ChromeTestExtensionLoader loader(browser()->profile()); base::FilePath test_data_dir; - PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir); + base::PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir); scoped_refptr<const extensions::Extension> extension = loader.LoadExtension( test_data_dir.AppendASCII("extensions/uitest/long_name"));
diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc index d2394950..d5563e1 100644 --- a/chrome/browser/ui/views/frame/browser_view.cc +++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -64,6 +64,7 @@ #include "chrome/browser/ui/views/autofill/save_card_icon_view.h" #include "chrome/browser/ui/views/bookmarks/bookmark_bar_view.h" #include "chrome/browser/ui/views/bookmarks/bookmark_bubble_view.h" +#include "chrome/browser/ui/views/confirm_quit_bubble_controller.h" #include "chrome/browser/ui/views/download/download_in_progress_dialog_view.h" #include "chrome/browser/ui/views/download/download_shelf_view.h" #include "chrome/browser/ui/views/exclusive_access_bubble_views.h" @@ -95,6 +96,7 @@ #include "chrome/browser/ui/views/update_recommended_message_box.h" #include "chrome/browser/ui/window_sizer/window_sizer.h" #include "chrome/common/channel_info.h" +#include "chrome/common/chrome_features.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/extensions/command.h" #include "chrome/common/pref_names.h" @@ -1323,6 +1325,14 @@ return content::KeyboardEventProcessingResult::NOT_HANDLED; } +#if defined(OS_WIN) || (defined(OS_LINUX) && !defined(OS_CHROMEOS)) + if (base::FeatureList::IsEnabled(features::kWarnBeforeQuitting) && + ConfirmQuitBubbleController::GetInstance()->HandleKeyboardEvent( + accelerator)) { + return content::KeyboardEventProcessingResult::HANDLED_WANTS_KEY_UP; + } +#endif // defined(OS_WIN) || (defined(OS_LINUX) && !defined(OS_CHROMEOS)) + #if defined(OS_CHROMEOS) if (ash_util::IsAcceleratorDeprecated(accelerator)) { return (event.GetType() == blink::WebInputEvent::kRawKeyDown) @@ -2089,6 +2099,14 @@ // BrowserView, ui::AcceleratorTarget overrides: bool BrowserView::AcceleratorPressed(const ui::Accelerator& accelerator) { +#if defined(OS_WIN) || (defined(OS_LINUX) && !defined(OS_CHROMEOS)) + if (base::FeatureList::IsEnabled(features::kWarnBeforeQuitting) && + ConfirmQuitBubbleController::GetInstance()->HandleKeyboardEvent( + accelerator)) { + return true; + } +#endif // defined(OS_WIN) || (defined(OS_LINUX) && !defined(OS_CHROMEOS)) + int command_id; // Though AcceleratorManager should not send unknown |accelerator| to us, it's // still possible the command cannot be executed now.
diff --git a/chrome/browser/ui/views/harmony/chrome_typography.cc b/chrome/browser/ui/views/harmony/chrome_typography.cc index cbd0ea1d..2a5649e 100644 --- a/chrome/browser/ui/views/harmony/chrome_typography.cc +++ b/chrome/browser/ui/views/harmony/chrome_typography.cc
@@ -12,15 +12,9 @@ #include "ui/base/ui_features.h" #include "ui/gfx/platform_font.h" -namespace { - // Mac doesn't use LocationBarView (yet). #if !defined(OS_MACOSX) || BUILDFLAG(MAC_VIEWS_BROWSER) -// Takes a desired font size and returns the size delta to request from -// ui::ResourceBundle that will result either in that font size, or the biggest -// font size that is smaller than the desired font size but will fit inside -// |available_height|. int GetFontSizeDeltaBoundedByAvailableHeight(int available_height, int desired_font_size) { int size_delta = desired_font_size - gfx::PlatformFont::kDefaultBaseFontSize; @@ -31,9 +25,10 @@ // if, for example, the user has changed their system font sizes or the // current locale has been overridden to use a different default font size. // Adjust for the difference in default font sizes. + int user_or_locale_delta = 0; if (base_font.GetFontSize() != desired_font_size) { - size_delta += desired_font_size - base_font.GetFontSize(); - base_font = bundle.GetFontListWithDelta(size_delta); + user_or_locale_delta = desired_font_size - base_font.GetFontSize(); + base_font = bundle.GetFontListWithDelta(size_delta + user_or_locale_delta); } DCHECK_EQ(desired_font_size, base_font.GetFontSize()); @@ -41,13 +36,15 @@ // TODO(tapted): Move DeriveWithHeightUpperBound() to ui::ResourceBundle to // take advantage of the font cache. base_font = base_font.DeriveWithHeightUpperBound(available_height); - return base_font.GetFontSize() - gfx::PlatformFont::kDefaultBaseFontSize; + + // To ensure a subsequent request from the ResourceBundle ignores the delta + // due to user or locale settings, include it here. + return base_font.GetFontSize() - gfx::PlatformFont::kDefaultBaseFontSize + + user_or_locale_delta; } #endif // OS_MACOSX || MAC_VIEWS_BROWSER -} // namespace - void ApplyCommonFontStyles(int context, int style, int* size_delta,
diff --git a/chrome/browser/ui/views/harmony/chrome_typography.h b/chrome/browser/ui/views/harmony/chrome_typography.h index 3773a6d1..0b2b67c 100644 --- a/chrome/browser/ui/views/harmony/chrome_typography.h +++ b/chrome/browser/ui/views/harmony/chrome_typography.h
@@ -71,6 +71,13 @@ STYLE_EMPHASIZED_SECONDARY, }; +// Takes a desired font size and returns the size delta to request from +// ui::ResourceBundle that will result either in that font size, or the biggest +// font size that is smaller than the desired font size but will fit inside +// |available_height|. +int GetFontSizeDeltaBoundedByAvailableHeight(int available_height, + int desired_font_size); + // Sets the |size_delta| and |font_weight| for text that should not be affected // by the Harmony spec. void ApplyCommonFontStyles(int context,
diff --git a/chrome/browser/ui/views/harmony/layout_provider_unittest.cc b/chrome/browser/ui/views/harmony/layout_provider_unittest.cc index f72a02e..e5ab434b 100644 --- a/chrome/browser/ui/views/harmony/layout_provider_unittest.cc +++ b/chrome/browser/ui/views/harmony/layout_provider_unittest.cc
@@ -13,6 +13,7 @@ #include "ui/base/resource/resource_bundle.h" #include "ui/base/ui_base_features.h" #include "ui/gfx/font_list.h" +#include "ui/strings/grit/app_locale_settings.h" #include "ui/views/controls/label.h" #include "ui/views/controls/styled_label.h" #include "ui/views/style/typography.h" @@ -380,3 +381,67 @@ styled_label.SizeToFit(kStyledLabelWidth); EXPECT_EQ(kBodyLineHeight, styled_label.height()); } + +// Only run explicit font-size checks on ChromeOS. Elsewhere, font sizes can be +// affected by bot configuration, but ChromeOS controls this in the +// ResourceBundle. Also on other platforms font metrics change a lot across OS +// versions, but on ChromeOS, there is only one OS version, so we can rely on +// consistent behavior. Also ChromeOS is the only place where +// IDS_UI_FONT_FAMILY_CROS works, which this test uses to control results. +#if defined(OS_CHROMEOS) + +// Ensure the omnibox font is always 14pt, even in Hebrew. On ChromeOS, Hebrew +// has a larger default font size applied from the resource bundle, but the +// Omnibox font configuration ignores it. +TEST_F(LayoutProviderTest, OmniboxFontAlways14) { + constexpr int kOmniboxHeight = 24; + constexpr int kDecorationHeight = 14; + constexpr int kOmniboxDesiredSize = 14; + constexpr int kDecorationRequestedSize = 11; + + auto& bundle = ui::ResourceBundle::GetSharedInstance(); + + auto set_system_font = [&bundle](const char* font) { + bundle.OverrideLocaleStringResource(IDS_UI_FONT_FAMILY_CROS, + base::ASCIIToUTF16(font)); + bundle.ReloadFonts(); + return gfx::FontList().GetFontSize(); + }; + + int base_font_size = set_system_font("Roboto, 12px"); + EXPECT_EQ(12, base_font_size); + EXPECT_EQ(base_font_size, bundle.GetFontListWithDelta(0).GetFontSize()); + EXPECT_EQ(14 - base_font_size, GetFontSizeDeltaBoundedByAvailableHeight( + kOmniboxHeight, kOmniboxDesiredSize)); + EXPECT_EQ(11 - base_font_size, + GetFontSizeDeltaBoundedByAvailableHeight(kDecorationHeight, + kDecorationRequestedSize)); + + // Ensure there is a threshold where the font actually shrinks. + int latin_height_threshold = kOmniboxHeight; + for (; latin_height_threshold > 0; --latin_height_threshold) { + if (kOmniboxDesiredSize - base_font_size != + GetFontSizeDeltaBoundedByAvailableHeight(latin_height_threshold, + kOmniboxDesiredSize)) + break; + } + // The threshold should always be the same, but the value depends on font + // metrics. Check for some sane value. This should only change if Roboto + // itself changes. + EXPECT_EQ(16, latin_height_threshold); + + // Switch to Hebrew settings. + base_font_size = set_system_font("Roboto, Noto Sans Hebrew, 13px"); + EXPECT_EQ(13, gfx::FontList().GetFontSize()); + EXPECT_EQ(base_font_size, bundle.GetFontListWithDelta(0).GetFontSize()); + + // The base font size has increased, but the delta returned should still + // result in a 14pt font. + EXPECT_EQ(14 - base_font_size, GetFontSizeDeltaBoundedByAvailableHeight( + kOmniboxHeight, kOmniboxDesiredSize)); + EXPECT_EQ(11 - base_font_size, + GetFontSizeDeltaBoundedByAvailableHeight(kDecorationHeight, + kDecorationRequestedSize)); +} + +#endif // OS_CHROMEOS
diff --git a/chrome/browser/ui/views/ime_driver/remote_text_input_client.cc b/chrome/browser/ui/views/ime_driver/remote_text_input_client.cc index 74ef0721..1c04fa2 100644 --- a/chrome/browser/ui/views/ime_driver/remote_text_input_client.cc +++ b/chrome/browser/ui/views/ime_driver/remote_text_input_client.cc
@@ -91,6 +91,12 @@ return false; } +ui::TextInputClient::FocusReason RemoteTextInputClient::GetFocusReason() const { + // TODO(https://crbug.com/824604): Implement this correctly. + NOTIMPLEMENTED_LOG_ONCE(); + return ui::TextInputClient::FOCUS_REASON_OTHER; +} + bool RemoteTextInputClient::GetTextRange(gfx::Range* range) const { // TODO(moshayedi): crbug.com/631527. NOTIMPLEMENTED_LOG_ONCE();
diff --git a/chrome/browser/ui/views/ime_driver/remote_text_input_client.h b/chrome/browser/ui/views/ime_driver/remote_text_input_client.h index a2e3550a..63b1b9cf 100644 --- a/chrome/browser/ui/views/ime_driver/remote_text_input_client.h +++ b/chrome/browser/ui/views/ime_driver/remote_text_input_client.h
@@ -42,6 +42,7 @@ bool GetCompositionCharacterBounds(uint32_t index, gfx::Rect* rect) const override; bool HasCompositionText() const override; + FocusReason GetFocusReason() const override; bool GetTextRange(gfx::Range* range) const override; bool GetCompositionTextRange(gfx::Range* range) const override; bool GetSelectionRange(gfx::Range* range) const override;
diff --git a/chrome/browser/ui/views/overlay/overlay_window_views.cc b/chrome/browser/ui/views/overlay/overlay_window_views.cc index 69a5286..5230c576 100644 --- a/chrome/browser/ui/views/overlay/overlay_window_views.cc +++ b/chrome/browser/ui/views/overlay/overlay_window_views.cc
@@ -192,7 +192,7 @@ kPlayPauseIconSize.width(), SK_ColorWHITE); play_pause_controls_view_->SetToggledImage(views::Button::STATE_NORMAL, &pause_icon); - play_pause_controls_view_->SetToggled(false); + play_pause_controls_view_->SetToggled(controller_->IsPlayerActive()); // Paint to ui::Layers to use in the OverlaySurfaceEmbedder. video_view_->SetPaintToLayer(ui::LAYER_TEXTURED); @@ -309,6 +309,9 @@ controller_->Close(); event->SetHandled(); } else if (GetPlayPauseControlsBounds().Contains(event->location())) { + // Retrieve expected active state based on what command was sent in + // TogglePlayPause() since the IPC message may not have been propogated + // the media player yet. bool is_active = controller_->TogglePlayPause(); play_pause_controls_view_->SetToggled(is_active); event->SetHandled();
diff --git a/chrome/browser/ui/views/profiles/profile_chooser_view_browsertest.cc b/chrome/browser/ui/views/profiles/profile_chooser_view_browsertest.cc index c35a1bac..f5874f8 100644 --- a/chrome/browser/ui/views/profiles/profile_chooser_view_browsertest.cc +++ b/chrome/browser/ui/views/profiles/profile_chooser_view_browsertest.cc
@@ -69,7 +69,7 @@ Profile* CreateTestingProfile(const std::string& profile_name) { base::FilePath path; - PathService::Get(chrome::DIR_USER_DATA, &path); + base::PathService::Get(chrome::DIR_USER_DATA, &path); path = path.AppendASCII(profile_name); return CreateTestingProfile(path); }
diff --git a/chrome/browser/ui/views/select_file_dialog_extension_browsertest.cc b/chrome/browser/ui/views/select_file_dialog_extension_browsertest.cc index fd53233..dd1ac5d 100644 --- a/chrome/browser/ui/views/select_file_dialog_extension_browsertest.cc +++ b/chrome/browser/ui/views/select_file_dialog_extension_browsertest.cc
@@ -110,7 +110,7 @@ // We have to provide at least one mount point. // File manager looks for "Downloads" mount point, so use this name. base::FilePath tmp_path; - PathService::Get(base::DIR_TEMP, &tmp_path); + base::PathService::Get(base::DIR_TEMP, &tmp_path); ASSERT_TRUE(tmp_dir_.CreateUniqueTempDirUnderPath(tmp_path)); downloads_dir_ = tmp_dir_.GetPath().Append("Downloads"); base::CreateDirectory(downloads_dir_);
diff --git a/chrome/browser/ui/views/toolbar/toolbar_button.cc b/chrome/browser/ui/views/toolbar/toolbar_button.cc index 29ba5ab3..7b976bf 100644 --- a/chrome/browser/ui/views/toolbar/toolbar_button.cc +++ b/chrome/browser/ui/views/toolbar/toolbar_button.cc
@@ -138,7 +138,7 @@ void ToolbarButton::GetAccessibleNodeData(ui::AXNodeData* node_data) { Button::GetAccessibleNodeData(node_data); node_data->role = ax::mojom::Role::kButton; - node_data->AddState(ax::mojom::State::kHaspopup); + node_data->SetHasPopup(ax::mojom::HasPopup::kMenu); if (enabled()) node_data->SetDefaultActionVerb(ax::mojom::DefaultActionVerb::kPress); }
diff --git a/chrome/browser/ui/webui/chromeos/login/core_oobe_handler.cc b/chrome/browser/ui/webui/chromeos/login/core_oobe_handler.cc index 215295c9..cdc687eb 100644 --- a/chrome/browser/ui/webui/chromeos/login/core_oobe_handler.cc +++ b/chrome/browser/ui/webui/chromeos/login/core_oobe_handler.cc
@@ -431,6 +431,10 @@ CallJSOrDefer("showShutdown", !reboot_on_shutdown); } +void CoreOobeHandler::SetLoginUserCount(int user_count) { + CallJSOrDefer("setLoginUserCount", user_count); +} + void CoreOobeHandler::UpdateA11yState() { if (ash_util::IsRunningInMash()) { NOTIMPLEMENTED();
diff --git a/chrome/browser/ui/webui/chromeos/login/core_oobe_handler.h b/chrome/browser/ui/webui/chromeos/login/core_oobe_handler.h index 795c016d..9c57496 100644 --- a/chrome/browser/ui/webui/chromeos/login/core_oobe_handler.h +++ b/chrome/browser/ui/webui/chromeos/login/core_oobe_handler.h
@@ -77,6 +77,9 @@ // false. void UpdateShutdownAndRebootVisibility(bool reboot_on_shutdown); + // Notify WebUI of the user count on the views login screen. + void SetLoginUserCount(int user_count); + private: // CoreOobeView implementation: void ShowSignInError(int login_attempts,
diff --git a/chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.cc index 6816c75..28dee8d 100644 --- a/chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.cc +++ b/chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.cc
@@ -6,6 +6,7 @@ #include <memory> +#include "ash/public/cpp/ash_switches.h" #include "base/bind.h" #include "base/callback.h" #include "base/containers/flat_set.h" @@ -362,11 +363,6 @@ UpdateAuthParams(¶ms, IsRestrictiveProxy()); - int user_count = LoginDisplayHost::default_host() - ? LoginDisplayHost::default_host()->GetUsers().size() - : 0; - params.SetInteger("userCount", user_count); - GaiaScreenMode screen_mode = GetGaiaScreenMode(context.email, context.use_offline); params.SetInteger("screenMode", screen_mode); @@ -982,13 +978,18 @@ gaia_silent_load_ = false; } - // Note that LoadAuthExtension clears |populated_email_|. - if (populated_email_.empty()) { - LoginDisplayHost::default_host()->LoadSigninWallpaper(); - } else { - LoginDisplayHost::default_host()->LoadWallpaper( - user_manager::known_user::GetAccountId( - populated_email_, std::string() /* id */, AccountType::UNKNOWN)); + // Views-based login may reach here while pre-loading the Gaia screen, so + // update the wallpaper in |LoginDisplayHostMojo::UpdateGaiaDialogVisibility| + // instead, which controls the actual visibility of the Gaia screen. + if (!ash::switches::IsUsingViewsLogin()) { + // Note that LoadAuthExtension clears |populated_email_|. + if (populated_email_.empty()) { + LoginDisplayHost::default_host()->LoadSigninWallpaper(); + } else { + LoginDisplayHost::default_host()->LoadWallpaper( + user_manager::known_user::GetAccountId( + populated_email_, std::string() /* id */, AccountType::UNKNOWN)); + } } input_method::InputMethodManager* imm =
diff --git a/chrome/browser/ui/webui/chromeos/login/oobe_ui.cc b/chrome/browser/ui/webui/chromeos/login/oobe_ui.cc index 07bf91a..704bd85 100644 --- a/chrome/browser/ui/webui/chromeos/login/oobe_ui.cc +++ b/chrome/browser/ui/webui/chromeos/login/oobe_ui.cc
@@ -694,4 +694,8 @@ oobe_display_chooser_->TryToPlaceUiOnTouchDisplay(); } +void OobeUI::SetLoginUserCount(int user_count) { + core_handler_->SetLoginUserCount(user_count); +} + } // namespace chromeos
diff --git a/chrome/browser/ui/webui/chromeos/login/oobe_ui.h b/chrome/browser/ui/webui/chromeos/login/oobe_ui.h index fefd818..8821236 100644 --- a/chrome/browser/ui/webui/chromeos/login/oobe_ui.h +++ b/chrome/browser/ui/webui/chromeos/login/oobe_ui.h
@@ -190,6 +190,9 @@ // Re-evaluate OOBE display placement. void OnDisplayConfigurationChanged(); + // Notify WebUI of the user count on the views login screen. + void SetLoginUserCount(int user_count); + private: // Lookup a view by its statically registered OobeScreen. template <typename TView>
diff --git a/chrome/browser/ui/webui/extensions/extension_settings_browsertest.cc b/chrome/browser/ui/webui/extensions/extension_settings_browsertest.cc index 374c39e..6d07db3 100644 --- a/chrome/browser/ui/webui/extensions/extension_settings_browsertest.cc +++ b/chrome/browser/ui/webui/extensions/extension_settings_browsertest.cc
@@ -32,7 +32,7 @@ : policy_provider_(TestManagementPolicyProvider::PROHIBIT_MODIFY_STATUS | TestManagementPolicyProvider::MUST_REMAIN_ENABLED | TestManagementPolicyProvider::MUST_REMAIN_INSTALLED) { - CHECK(PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir_)); + CHECK(base::PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir_)); test_data_dir_ = test_data_dir_.AppendASCII("extensions"); }
diff --git a/chrome/browser/ui/webui/memory_internals_ui.cc b/chrome/browser/ui/webui/memory_internals_ui.cc index 60437aa..b2cb6b6 100644 --- a/chrome/browser/ui/webui/memory_internals_ui.cc +++ b/chrome/browser/ui/webui/memory_internals_ui.cc
@@ -217,7 +217,7 @@ // TODO(bug 757115) Does it make sense to show the Android file picker here // instead? Need to test what that looks like. base::FilePath user_data_dir; - PathService::Get(chrome::DIR_USER_DATA, &user_data_dir); + base::PathService::Get(chrome::DIR_USER_DATA, &user_data_dir); base::FilePath output_path = user_data_dir.Append(default_file); ProfilingProcessHost::GetInstance()->SaveTraceWithHeapDumpToFile( std::move(output_path),
diff --git a/chrome/browser/ui/webui/nacl_ui.cc b/chrome/browser/ui/webui/nacl_ui.cc index 153107f0..2a5b223 100644 --- a/chrome/browser/ui/webui/nacl_ui.cc +++ b/chrome/browser/ui/webui/nacl_ui.cc
@@ -259,7 +259,8 @@ // Obtain the version of the PNaCl translator. base::FilePath pnacl_path; - bool got_path = PathService::Get(chrome::DIR_PNACL_COMPONENT, &pnacl_path); + bool got_path = + base::PathService::Get(chrome::DIR_PNACL_COMPONENT, &pnacl_path); if (!got_path || pnacl_path.empty() || !pnacl_path_exists_) { AddPair(list, ASCIIToUTF16("PNaCl translator"), @@ -344,7 +345,8 @@ bool CheckPathAndVersion(std::string* version) { base::FilePath pnacl_path; - bool got_path = PathService::Get(chrome::DIR_PNACL_COMPONENT, &pnacl_path); + bool got_path = + base::PathService::Get(chrome::DIR_PNACL_COMPONENT, &pnacl_path); if (got_path && !pnacl_path.empty() && base::PathExists(pnacl_path)) { CheckVersion(pnacl_path, version); return true;
diff --git a/chrome/browser/ui/webui/policy_tool_ui_browsertest.cc b/chrome/browser/ui/webui/policy_tool_ui_browsertest.cc index eb0d7ef..d0c9dad 100644 --- a/chrome/browser/ui/webui/policy_tool_ui_browsertest.cc +++ b/chrome/browser/ui/webui/policy_tool_ui_browsertest.cc
@@ -94,7 +94,7 @@ base::FilePath PolicyToolUITest::GetSessionsDir() { base::FilePath profile_dir; - EXPECT_TRUE(PathService::Get(chrome::DIR_USER_DATA, &profile_dir)); + EXPECT_TRUE(base::PathService::Get(chrome::DIR_USER_DATA, &profile_dir)); return profile_dir.AppendASCII(TestingProfile::kTestUserProfileDir) .Append(kPolicyToolSessionsDir); }
diff --git a/chrome/browser/ui/webui/settings/chromeos/change_picture_handler.cc b/chrome/browser/ui/webui/settings/chromeos/change_picture_handler.cc index 578bbdbb..d62f3fb 100644 --- a/chrome/browser/ui/webui/settings/chromeos/change_picture_handler.cc +++ b/chrome/browser/ui/webui/settings/chromeos/change_picture_handler.cc
@@ -149,7 +149,7 @@ std::make_unique<ChromeSelectFilePolicy>(web_ui()->GetWebContents())); base::FilePath downloads_path; - if (!PathService::Get(chrome::DIR_DEFAULT_DOWNLOADS, &downloads_path)) { + if (!base::PathService::Get(chrome::DIR_DEFAULT_DOWNLOADS, &downloads_path)) { NOTREACHED(); return; }
diff --git a/chrome/browser/ui/webui/settings/chromeos/cups_printers_handler.cc b/chrome/browser/ui/webui/settings/chromeos/cups_printers_handler.cc index fc5e447..f9c8f31 100644 --- a/chrome/browser/ui/webui/settings/chromeos/cups_printers_handler.cc +++ b/chrome/browser/ui/webui/settings/chromeos/cups_printers_handler.cc
@@ -185,9 +185,10 @@ printers_manager_( CupsPrintersManagerFactory::GetInstance()->GetForBrowserContext( profile_)), + printers_manager_observer_(this), weak_factory_(this) {} -CupsPrintersHandler::~CupsPrintersHandler() {} +CupsPrintersHandler::~CupsPrintersHandler() = default; void CupsPrintersHandler::RegisterMessages() { web_ui()->RegisterMessageCallback( @@ -247,11 +248,13 @@ } void CupsPrintersHandler::OnJavascriptAllowed() { - printers_manager_->AddObserver(this); + if (!printers_manager_observer_.IsObservingSources()) { + printers_manager_observer_.Add(printers_manager_); + } } void CupsPrintersHandler::OnJavascriptDisallowed() { - printers_manager_->RemoveObserver(this); + printers_manager_observer_.RemoveAll(); } void CupsPrintersHandler::HandleGetCupsPrintersList(
diff --git a/chrome/browser/ui/webui/settings/chromeos/cups_printers_handler.h b/chrome/browser/ui/webui/settings/chromeos/cups_printers_handler.h index be88aebd..dddfb63e 100644 --- a/chrome/browser/ui/webui/settings/chromeos/cups_printers_handler.h +++ b/chrome/browser/ui/webui/settings/chromeos/cups_printers_handler.h
@@ -12,6 +12,7 @@ #include "base/files/file_path.h" #include "base/memory/weak_ptr.h" +#include "base/scoped_observer.h" #include "chrome/browser/chromeos/printing/cups_printers_manager.h" #include "chrome/browser/chromeos/printing/printer_configurer.h" #include "chrome/browser/chromeos/printing/printer_event_tracker.h" @@ -180,6 +181,9 @@ std::string webui_callback_id_; CupsPrintersManager* printers_manager_; + ScopedObserver<CupsPrintersManager, CupsPrintersManager::Observer> + printers_manager_observer_; + base::WeakPtrFactory<CupsPrintersHandler> weak_factory_; DISALLOW_COPY_AND_ASSIGN(CupsPrintersHandler);
diff --git a/chrome/browser/ui/webui/settings_utils_win.cc b/chrome/browser/ui/webui/settings_utils_win.cc index 7badcf5..4445cee 100644 --- a/chrome/browser/ui/webui/settings_utils_win.cc +++ b/chrome/browser/ui/webui/settings_utils_win.cc
@@ -76,15 +76,15 @@ // new dialog to be made for each call. rundll32 uses the same global // dialog and it seems to share with the shortcut in control panel. base::FilePath rundll32; - PathService::Get(base::DIR_SYSTEM, &rundll32); + base::PathService::Get(base::DIR_SYSTEM, &rundll32); rundll32 = rundll32.AppendASCII("rundll32.exe"); base::FilePath shell32dll; - PathService::Get(base::DIR_SYSTEM, &shell32dll); + base::PathService::Get(base::DIR_SYSTEM, &shell32dll); shell32dll = shell32dll.AppendASCII("shell32.dll"); base::FilePath inetcpl; - PathService::Get(base::DIR_SYSTEM, &inetcpl); + base::PathService::Get(base::DIR_SYSTEM, &inetcpl); inetcpl = inetcpl.AppendASCII("inetcpl.cpl,,4"); std::wstring args(shell32dll.value());
diff --git a/chrome/browser/ui/webui/test_files_request_filter.cc b/chrome/browser/ui/webui/test_files_request_filter.cc index b9604f3..e4cdc784 100644 --- a/chrome/browser/ui/webui/test_files_request_filter.cc +++ b/chrome/browser/ui/webui/test_files_request_filter.cc
@@ -25,7 +25,7 @@ std::string contents; base::FilePath test_data_dir; - PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir); + base::PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir); if (!base::ReadFileToString( test_data_dir.AppendASCII("webui").AppendASCII(url_substr[1]), &contents))
diff --git a/chrome/browser/ui/webui/webui_webview_browsertest.cc b/chrome/browser/ui/webui/webui_webview_browsertest.cc index 1c31268e..ae7ad188 100644 --- a/chrome/browser/ui/webui/webui_webview_browsertest.cc +++ b/chrome/browser/ui/webui/webui_webview_browsertest.cc
@@ -110,7 +110,7 @@ base::FilePath(FILE_PATH_LITERAL("webview_basic.js"))); base::FilePath test_data_dir; - PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir); + base::PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir); embedded_test_server()->ServeFilesFromDirectory(test_data_dir); ASSERT_TRUE(embedded_test_server()->Start()); }
diff --git a/chrome/browser/vr/test/paths.cc b/chrome/browser/vr/test/paths.cc index 068921f..8b129c74 100644 --- a/chrome/browser/vr/test/paths.cc +++ b/chrome/browser/vr/test/paths.cc
@@ -13,7 +13,7 @@ void GetTestDataPath(base::FilePath* result) { base::FilePath path; - ASSERT_TRUE(PathService::Get(base::DIR_SOURCE_ROOT, &path)); + ASSERT_TRUE(base::PathService::Get(base::DIR_SOURCE_ROOT, &path)); path = path.Append(FILE_PATH_LITERAL("chrome")) .Append(FILE_PATH_LITERAL("browser")) .Append(FILE_PATH_LITERAL("vr"))
diff --git a/chrome/browser/vr/test/vr_test_suite.cc b/chrome/browser/vr/test/vr_test_suite.cc index df5fa72..bf5a4761 100644 --- a/chrome/browser/vr/test/vr_test_suite.cc +++ b/chrome/browser/vr/test/vr_test_suite.cc
@@ -33,9 +33,9 @@ base::FilePath pak_path; #if defined(OS_ANDROID) ui::RegisterPathProvider(); - PathService::Get(ui::DIR_RESOURCE_PAKS_ANDROID, &pak_path); + base::PathService::Get(ui::DIR_RESOURCE_PAKS_ANDROID, &pak_path); #else - PathService::Get(base::DIR_MODULE, &pak_path); + base::PathService::Get(base::DIR_MODULE, &pak_path); #endif ui::ResourceBundle::InitSharedInstanceWithPakPath( pak_path.AppendASCII("vr_test.pak"));
diff --git a/chrome/browser/vr/testapp/test_keyboard_renderer.cc b/chrome/browser/vr/testapp/test_keyboard_renderer.cc index 5f5140e..2233ae3 100644 --- a/chrome/browser/vr/testapp/test_keyboard_renderer.cc +++ b/chrome/browser/vr/testapp/test_keyboard_renderer.cc
@@ -29,7 +29,7 @@ // is provided by the physical keyboard. // Read and decode keyboard image. base::FilePath dir; - PathService::Get(base::DIR_CURRENT, &dir); + base::PathService::Get(base::DIR_CURRENT, &dir); dir = dir.Append(base::FilePath().AppendASCII(kKeyboardImagePath)); DCHECK(base::PathExists(dir)); std::string file_contents;
diff --git a/chrome/browser/vr/testapp/vr_test_context.cc b/chrome/browser/vr/testapp/vr_test_context.cc index aff4cfe..675d766b 100644 --- a/chrome/browser/vr/testapp/vr_test_context.cc +++ b/chrome/browser/vr/testapp/vr_test_context.cc
@@ -79,7 +79,7 @@ VrTestContext::VrTestContext() : view_scale_factor_(kDefaultViewScaleFactor) { base::FilePath pak_path; - PathService::Get(base::DIR_MODULE, &pak_path); + base::PathService::Get(base::DIR_MODULE, &pak_path); ui::ResourceBundle::InitSharedInstanceWithPakPath( pak_path.AppendASCII("vr_testapp.pak"));
diff --git a/chrome/browser/web_applications/web_app_mac.mm b/chrome/browser/web_applications/web_app_mac.mm index 0c27520..59150ce3 100644 --- a/chrome/browser/web_applications/web_app_mac.mm +++ b/chrome/browser/web_applications/web_app_mac.mm
@@ -209,7 +209,7 @@ bool HasSameUserDataDir(const base::FilePath& bundle_path) { NSDictionary* plist = ReadPlist(GetPlistPath(bundle_path)); base::FilePath user_data_dir; - PathService::Get(chrome::DIR_USER_DATA, &user_data_dir); + base::PathService::Get(chrome::DIR_USER_DATA, &user_data_dir); DCHECK(!user_data_dir.empty()); return base::StartsWith( base::SysNSStringToUTF8(
diff --git a/chrome/browser/web_applications/web_app_mac_unittest.mm b/chrome/browser/web_applications/web_app_mac_unittest.mm index b8ee531..c6078b3 100644 --- a/chrome/browser/web_applications/web_app_mac_unittest.mm +++ b/chrome/browser/web_applications/web_app_mac_unittest.mm
@@ -236,9 +236,9 @@ } TEST_F(WebAppShortcutCreatorTest, DeleteShortcuts) { - // When using PathService::Override, it calls base::MakeAbsoluteFilePath. - // On Mac this prepends "/private" to the path, but points to the same - // directory in the file system. + // When using base::PathService::Override, it calls + // base::MakeAbsoluteFilePath. On Mac this prepends "/private" to the path, + // but points to the same directory in the file system. app_data_dir_ = base::MakeAbsoluteFilePath(app_data_dir_); base::ScopedTempDir other_folder_temp_dir; @@ -277,7 +277,8 @@ [plist writeToFile:plist_path atomically:YES]; - EXPECT_TRUE(PathService::Override(chrome::DIR_USER_DATA, app_data_dir_)); + EXPECT_TRUE( + base::PathService::Override(chrome::DIR_USER_DATA, app_data_dir_)); shortcut_creator.DeleteShortcuts(); EXPECT_FALSE(base::PathExists(internal_shim_path_)); EXPECT_TRUE(base::PathExists(shim_path_));
diff --git a/chrome/browser/web_applications/web_app_win.cc b/chrome/browser/web_applications/web_app_win.cc index c414fd6a..218f41d 100644 --- a/chrome/browser/web_applications/web_app_win.cc +++ b/chrome/browser/web_applications/web_app_win.cc
@@ -188,7 +188,7 @@ } base::FilePath chrome_exe; - if (!PathService::Get(base::FILE_EXE, &chrome_exe)) { + if (!base::PathService::Get(base::FILE_EXE, &chrome_exe)) { NOTREACHED(); return false; } @@ -343,7 +343,7 @@ shortcut_info.profile_path); base::FilePath chrome_exe; - if (!PathService::Get(base::FILE_EXE, &chrome_exe)) { + if (!base::PathService::Get(base::FILE_EXE, &chrome_exe)) { NOTREACHED(); return; }
diff --git a/chrome/browser/win/browser_util.cc b/chrome/browser/win/browser_util.cc index 09565896..f64cc0d 100644 --- a/chrome/browser/win/browser_util.cc +++ b/chrome/browser/win/browser_util.cc
@@ -18,7 +18,7 @@ bool IsBrowserAlreadyRunning() { static HANDLE handle = NULL; base::FilePath exe_path; - PathService::Get(base::FILE_EXE, &exe_path); + base::PathService::Get(base::FILE_EXE, &exe_path); std::wstring exe = exe_path.value(); std::replace(exe.begin(), exe.end(), '\\', '!'); std::transform(exe.begin(), exe.end(), exe.begin(), tolower);
diff --git a/chrome/browser/win/jumplist.cc b/chrome/browser/win/jumplist.cc index 5da989c..1a1d4d0 100644 --- a/chrome/browser/win/jumplist.cc +++ b/chrome/browser/win/jumplist.cc
@@ -154,7 +154,7 @@ JumpListUpdater* jumplist_updater, IncognitoModePrefs::Availability incognito_availability) { base::FilePath chrome_path; - if (!PathService::Get(base::FILE_EXE, &chrome_path)) + if (!base::PathService::Get(base::FILE_EXE, &chrome_path)) return false; int icon_index = install_static::GetIconResourceIndex();
diff --git a/chrome/browser/win/jumplist_updater.cc b/chrome/browser/win/jumplist_updater.cc index 86eedd5..32c4105 100644 --- a/chrome/browser/win/jumplist_updater.cc +++ b/chrome/browser/win/jumplist_updater.cc
@@ -163,7 +163,7 @@ // Retrieve the absolute path to "chrome.exe". base::FilePath application_path; - if (!PathService::Get(base::FILE_EXE, &application_path)) + if (!base::PathService::Get(base::FILE_EXE, &application_path)) return false; // Create an EnumerableObjectCollection object to be added items of the @@ -202,7 +202,7 @@ // Retrieve the absolute path to "chrome.exe". base::FilePath application_path; - if (!PathService::Get(base::FILE_EXE, &application_path)) + if (!base::PathService::Get(base::FILE_EXE, &application_path)) return false; // Exit this function when the given vector does not contain any items
diff --git a/chrome/common/chrome_features.cc b/chrome/common/chrome_features.cc index 8eb2170..9569d92 100644 --- a/chrome/common/chrome_features.cc +++ b/chrome/common/chrome_features.cc
@@ -363,6 +363,11 @@ "AcknowledgeNtpOverrideOnDeactivate", base::FEATURE_DISABLED_BY_DEFAULT}; #endif +#if defined(OS_WIN) || (defined(OS_LINUX) && !defined(OS_CHROMEOS)) +const base::Feature kWarnBeforeQuitting{"WarnBeforeQuitting", + base::FEATURE_DISABLED_BY_DEFAULT}; +#endif + // The material redesign of the Incognito NTP. const base::Feature kMaterialDesignIncognitoNTP{ "MaterialDesignIncognitoNTP",
diff --git a/chrome/common/chrome_features.h b/chrome/common/chrome_features.h index 20b7000..42958c3 100644 --- a/chrome/common/chrome_features.h +++ b/chrome/common/chrome_features.h
@@ -202,6 +202,10 @@ extern const base::Feature kAcknowledgeNtpOverrideOnDeactivate; #endif +#if defined(OS_WIN) || (defined(OS_LINUX) && !defined(OS_CHROMEOS)) +extern const base::Feature kWarnBeforeQuitting; +#endif + extern const base::Feature kMaterialDesignIncognitoNTP; #if !defined(OS_ANDROID)
diff --git a/chrome/common/extensions/api/automation.idl b/chrome/common/extensions/api/automation.idl index 8d98e48..8279c7e 100644 --- a/chrome/common/extensions/api/automation.idl +++ b/chrome/common/extensions/api/automation.idl
@@ -208,7 +208,7 @@ expanded, focusable, focused, - haspopup, + hasPopup, horizontal, hovered, ignored, @@ -309,6 +309,16 @@ readOnly }; + // Indicates the availability and type of interactive popup element + enum HasPopup { + true, + menu, + listbox, + tree, + grid, + dialog + }; + // Describes possible actions when performing a do default action. enum DefaultActionVerb { activate, @@ -761,6 +771,15 @@ // The language code for this subtree. DOMString? language; + // Indicates the availability and type of interactive popup element + // true - the popup is a menu + // menu - the popup is a menu + // listbox - the popup is a listbox + // tree - the popup is a tree + // grid - the popup is a grid + // dialog - the popup is a dialog + DOMString? hasPopup; + // Input restriction, if any, such as readonly or disabled: // undefined - enabled control or other object that is not disabled // Restriction.DISABLED - disallows input in itself + any descendants
diff --git a/chrome/common/extensions/api/input_method_private.json b/chrome/common/extensions/api/input_method_private.json index 78605375..95d0610 100644 --- a/chrome/common/extensions/api/input_method_private.json +++ b/chrome/common/extensions/api/input_method_private.json
@@ -32,6 +32,31 @@ "checked": {"type": "boolean", "optional": true, "description": "Indicates this item should be drawn with a check."}, "enabled": {"type": "boolean", "optional": true, "description": "Indicates this item is enabled."} } + }, + { + "id": "FocusReason", + "type": "string", + "description": "Describes how the text field was focused", + "enum": ["mouse", "touch", "pen", "other"] + }, + { + "id": "InputContextType", + "type": "string", + "description": "Type of value this text field edits, (Text, Number, URL, etc)", + "enum": ["text", "search", "tel", "url", "email", "number", "password"] + }, + { + "id": "InputContext", + "type": "object", + "description": "Describes an input Context", + "properties": { + "contextID": {"type": "integer", "description": "This is used to specify targets of text field operations. This ID becomes invalid as soon as onBlur is called."}, + "type": {"$ref": "InputContextType", "description": "Type of value this text field edits, (Text, Number, URL, etc)"}, + "autoCorrect": {"type": "boolean", "description": "Whether the text field wants auto-correct."}, + "autoComplete": {"type": "boolean", "description": "Whether the text field wants auto-complete."}, + "spellCheck": {"type": "boolean", "description": "Whether the text field wants spell-check."}, + "focusReason": {"$ref": "FocusReason", "description": "How the text field was focused"} + } } ], "functions": [ @@ -347,6 +372,17 @@ "description": "MenuItems to add or update." } ] + }, { + "name": "onFocus", + "type": "function", + "description": "This event is sent when focus enters a text box. It is sent to all extensions that are listening to this event, and enabled by the user.", + "parameters": [ + { + "$ref": "InputContext", + "name": "context", + "description": "Describes the text field that has acquired focus." + } + ] } ] }
diff --git a/chrome/renderer/extensions/cast_streaming_native_handler.cc b/chrome/renderer/extensions/cast_streaming_native_handler.cc index 352b29e..1b9fb2b5 100644 --- a/chrome/renderer/extensions/cast_streaming_native_handler.cc +++ b/chrome/renderer/extensions/cast_streaming_native_handler.cc
@@ -920,8 +920,8 @@ media::AudioParameters::AUDIO_PCM_LINEAR, media::GuessChannelLayout(audio_config.channels), audio_config.rtp_timebase, // sampling rate - 16, static_cast<int>(audio_config.rtp_timebase / - audio_config.target_frame_rate)); + static_cast<int>(audio_config.rtp_timebase / + audio_config.target_frame_rate)); if (!params.IsValid()) { args.GetIsolate()->ThrowException(v8::Exception::TypeError(
diff --git a/chrome/renderer/media/cast_rtp_stream.cc b/chrome/renderer/media/cast_rtp_stream.cc index f6ce1f61a..1439c51 100644 --- a/chrome/renderer/media/cast_rtp_stream.cc +++ b/chrome/renderer/media/cast_rtp_stream.cc
@@ -394,8 +394,7 @@ << output_sample_rate_ << " Hz}"; const media::AudioParameters output_params( media::AudioParameters::AUDIO_PCM_LOW_LATENCY, - media::GuessChannelLayout(output_channels_), - output_sample_rate_, 32, + media::GuessChannelLayout(output_channels_), output_sample_rate_, output_sample_rate_ * input_params_.frames_per_buffer() / input_params_.sample_rate()); converter_.reset(
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn index 4545de1..bbe48c9 100644 --- a/chrome/test/BUILD.gn +++ b/chrome/test/BUILD.gn
@@ -3189,6 +3189,11 @@ } } + if (is_win || (is_linux && !is_chromeos)) { + sources += + [ "../browser/ui/views/confirm_quit_bubble_controller_unittest.cc" ] + } + if (enable_native_notifications) { if (is_desktop_linux) { sources += [ "../browser/notifications/notification_platform_bridge_linux_unittest.cc" ]
diff --git a/chrome/test/data/webui/cr_elements/cr_toggle_test.js b/chrome/test/data/webui/cr_elements/cr_toggle_test.js index 202c01a..5258d316 100644 --- a/chrome/test/data/webui/cr_elements/cr_toggle_test.js +++ b/chrome/test/data/webui/cr_elements/cr_toggle_test.js
@@ -20,7 +20,7 @@ assertTrue(toggle.hasAttribute('checked')); assertEquals('true', toggle.getAttribute('aria-pressed')); // Asserting that the toggle button has actually moved. - assertTrue(getComputedStyle(toggle.$.button).transform.includes('matrix')); + assertTrue(getComputedStyle(toggle.$.knob).transform.includes('matrix')); } function assertNotChecked() { @@ -28,7 +28,7 @@ assertEquals(null, toggle.getAttribute('checked')); assertEquals('false', toggle.getAttribute('aria-pressed')); // Asserting that the toggle button has not moved. - assertEquals('none', getComputedStyle(toggle.$.button).transform); + assertEquals('none', getComputedStyle(toggle.$.knob).transform); } function assertDisabled() {
diff --git a/chrome/test/data/webui/extensions/a11y/extensions_a11y_test.js b/chrome/test/data/webui/extensions/a11y/extensions_a11y_test.js index a2763a6..8eba99c 100644 --- a/chrome/test/data/webui/extensions/a11y/extensions_a11y_test.js +++ b/chrome/test/data/webui/extensions/a11y/extensions_a11y_test.js
@@ -60,7 +60,15 @@ node.element, 'iron-iconset-svg'); }); }); - } + }, + 'button-name': function(nodeResult) { + const parentNode = nodeResult.element.parentNode; + + // Ignore the <button> residing within cr-toggle, which has tabindex -1 + // anyway. + return parentNode && parentNode.host && + parentNode.host.tagName == 'CR-TOGGLE'; + }, }; }
diff --git a/chrome/test/data/webui/print_preview/destination_select_test.js b/chrome/test/data/webui/print_preview/destination_select_test.js index 6c25939..30986a6d 100644 --- a/chrome/test/data/webui/print_preview/destination_select_test.js +++ b/chrome/test/data/webui/print_preview/destination_select_test.js
@@ -6,7 +6,9 @@ /** @enum {string} */ const TestNames = { SingleRecentDestination: 'single recent destination', - MultipleRecentDestinations: 'multiple recent destination', + MultipleRecentDestinations: 'multiple recent destinations', + MultipleRecentDestinationsOneRequest: + 'multiple recent destinations one request', DefaultDestinationSelectionRules: 'default destination selection rules', SystemDefaultPrinterPolicy: 'system default printer policy', }; @@ -81,11 +83,8 @@ * destinations are marked as recent in the store. */ test(assert(TestNames.MultipleRecentDestinations), function() { - const recentDestinations = []; - destinations.slice(0, 3).forEach(destination => { - recentDestinations.push( - print_preview.makeRecentDestination(destination)); - }); + const recentDestinations = destinations.slice(0, 3).map( + destination => print_preview.makeRecentDestination(destination)); initialSettings.serializedAppStateStr = JSON.stringify({ version: 2, @@ -110,10 +109,49 @@ const match = reportedPrinters.find((reportedPrinter) => { return reportedPrinter.id == destination.id;}); assertFalse(typeof match === "undefined"); - if (index < 3) - assertTrue(match.isRecent); - else - assertFalse(match.isRecent); + assertEquals(index < 3, match.isRecent); + }); + }); + }); + + /** + * Tests that if the user has multiple valid recent destinations, this + * does not result in multiple calls to getPrinterCapabilities and the + * correct destination is selected for the preview request. + * For crbug.com/666595. + */ + test(assert(TestNames.MultipleRecentDestinationsOneRequest), function() { + const recentDestinations = destinations.slice(0, 3).map( + destination => print_preview.makeRecentDestination(destination)); + + initialSettings.serializedAppStateStr = JSON.stringify({ + version: 2, + recentDestinations: recentDestinations, + }); + + return setInitialSettings().then(function(argsArray) { + // Should have loaded ID1 as the selected printer, since it was most + // recent. + assertEquals('ID1', argsArray[1].destinationId); + assertEquals(print_preview.PrinterType.LOCAL, argsArray[1].type); + assertEquals('ID1', page.destination_.id); + + return nativeLayer.whenCalled('getPreview'); + }).then(function(previewArgs) { + const ticket = JSON.parse(previewArgs.printTicket); + assertEquals(0, ticket.requestID); + assertEquals('ID1', ticket.deviceName); + + // None of the other printers should have been loaded. Should only have + // ID1 and Save as PDF. They will be loaded when the dialog is opened + // and startLoadDestinations() is called. + const reportedPrinters = page.destinationStore_.destinations(); + assertEquals(2, reportedPrinters.length); + destinations.forEach((destination, index) => { + if (destination.id == 'ID1') + return; + + assertFalse(reportedPrinters.some(p => p.id == destination.id)); }); }); });
diff --git a/chrome/test/data/webui/print_preview/new_print_preview_ui_browsertest.js b/chrome/test/data/webui/print_preview/new_print_preview_ui_browsertest.js index 2897c058..d63a2e5 100644 --- a/chrome/test/data/webui/print_preview/new_print_preview_ui_browsertest.js +++ b/chrome/test/data/webui/print_preview/new_print_preview_ui_browsertest.js
@@ -141,6 +141,14 @@ this.runMochaTest(settings_sections_tests.TestNames.SetOther); }); +TEST_F('PrintPreviewSettingsSectionsTest', 'PresetCopies', function() { + this.runMochaTest(settings_sections_tests.TestNames.PresetCopies); +}); + +TEST_F('PrintPreviewSettingsSectionsTest', 'PresetDuplex', function() { + this.runMochaTest(settings_sections_tests.TestNames.PresetDuplex); +}); + PrintPreviewSettingsSelectTest = class extends NewPrintPreviewTest { /** @override */ get browsePreload() { @@ -459,6 +467,13 @@ destination_select_test.TestNames.MultipleRecentDestinations); }); +TEST_F('PrintPreviewDestinationSelectTest', + 'MultipleRecentDestinationsOneRequest', + function() { + this.runMochaTest( + destination_select_test.TestNames.MultipleRecentDestinationsOneRequest); +}); + TEST_F('PrintPreviewDestinationSelectTest', 'DefaultDestinationSelectionRules', function() { this.runMochaTest(
diff --git a/chrome/test/data/webui/print_preview/settings_section_test.js b/chrome/test/data/webui/print_preview/settings_section_test.js index 759d5e9353..9d7b538 100644 --- a/chrome/test/data/webui/print_preview/settings_section_test.js +++ b/chrome/test/data/webui/print_preview/settings_section_test.js
@@ -24,6 +24,8 @@ SetMargins: 'set margins', SetScaling: 'set scaling', SetOther: 'set other', + PresetCopies: 'preset copies', + PresetDuplex: 'preset duplex', }; const suiteName = 'SettingsSectionsTests'; @@ -826,6 +828,43 @@ optionsElement.$$('#rasterize'), false, page.settings.rasterize); } }); + + test(assert(TestNames.PresetCopies), function() { + const copiesElement = page.$$('print-preview-copies-settings'); + assertFalse(copiesElement.hidden); + + // Default value is 1 + const copiesInput = + copiesElement.$$('print-preview-number-settings-section') + .$$('.user-value'); + expectEquals('1', copiesInput.value); + expectEquals(1, page.settings.copies.value); + + // Send a preset value of 2 + const copies = 2; + cr.webUIListenerCallback('print-preset-options', true, copies); + assertEquals(copies, page.settings.copies.value); + assertEquals(copies.toString(), copiesInput.value); + }); + + test(assert(TestNames.PresetDuplex), function() { + toggleMoreSettings(); + const optionsElement = page.$$('print-preview-other-options-settings'); + assertFalse(optionsElement.hidden); + + // Default value is on, so turn it off + page.setSetting('duplex', print_preview_new.DuplexMode.SIMPLEX); + const checkbox = optionsElement.$$('#duplex'); + assertFalse(checkbox.checked); + assertEquals(print_preview_new.DuplexMode.SIMPLEX, + page.settings.duplex.value); + + // Send a preset value of LONG_EDGE + const duplex = print_preview_new.DuplexMode.LONG_EDGE; + cr.webUIListenerCallback('print-preset-options', false, 1, duplex); + assertEquals(duplex, page.settings.duplex.value); + assertTrue(checkbox.checked); + }); }); return {
diff --git a/chrome/test/data/webui/settings/a11y/basic_a11y_test.js b/chrome/test/data/webui/settings/a11y/basic_a11y_test.js index d9c86006..dc9f4217 100644 --- a/chrome/test/data/webui/settings/a11y/basic_a11y_test.js +++ b/chrome/test/data/webui/settings/a11y/basic_a11y_test.js
@@ -19,11 +19,5 @@ /** @override */ tests: {'Accessible with No Changes': function() {}}, /** @override */ - violationFilter: - Object.assign({}, SettingsAccessibilityTest.violationFilter, { - 'button-name': function(nodeResult) { - const node = nodeResult.element; - return node.classList.contains('icon-expand-more'); - }, - }), + violationFilter: SettingsAccessibilityTest.violationFilter, });
diff --git a/chrome/test/data/webui/settings/a11y/edit_dictionary_a11y_test.js b/chrome/test/data/webui/settings/a11y/edit_dictionary_a11y_test.js index 151ea51..17e5aa6 100644 --- a/chrome/test/data/webui/settings/a11y/edit_dictionary_a11y_test.js +++ b/chrome/test/data/webui/settings/a11y/edit_dictionary_a11y_test.js
@@ -35,10 +35,6 @@ nodeResult.element.getAttribute('aria-describedby'); return describerId === '' && nodeResult.element.tagName == 'INPUT'; }, - 'button-name': function(nodeResult) { - const node = nodeResult.element; - return node.classList.contains('icon-expand-more'); - }, 'tabindex': function(nodeResult) { // TODO(crbug.com/808276): remove this exception when bug is fixed. return nodeResult.element.getAttribute('tabindex') == '0';
diff --git a/chrome/test/data/webui/settings/a11y/manage_profile_a11y_test.js b/chrome/test/data/webui/settings/a11y/manage_profile_a11y_test.js index ea27705..f637d14 100644 --- a/chrome/test/data/webui/settings/a11y/manage_profile_a11y_test.js +++ b/chrome/test/data/webui/settings/a11y/manage_profile_a11y_test.js
@@ -27,24 +27,19 @@ /** @override */ tests: {'Accessible with No Changes': function() {}}, /** @override */ - violationFilter: { - 'aria-valid-attr': function(nodeResult) { - return nodeResult.element.hasAttribute('aria-active-attribute'); - }, - // Excuse Polymer paper-input elements. - 'aria-valid-attr-value': function(nodeResult) { - const describerId = nodeResult.element.getAttribute('aria-describedby'); - return describerId === '' && nodeResult.element.tagName == 'INPUT'; - }, - 'button-name': function(nodeResult) { - const node = nodeResult.element; - return node.classList.contains('icon-expand-more'); - }, - 'tabindex': function(nodeResult) { - // TODO(crbug.com/808276): remove this exception when bug is fixed. - return nodeResult.element.getAttribute('tabindex') == '0'; - }, - }, + violationFilter: + Object.assign({}, SettingsAccessibilityTest.violationFilter, { + // Excuse Polymer paper-input elements. + 'aria-valid-attr-value': function(nodeResult) { + const describerId = + nodeResult.element.getAttribute('aria-describedby'); + return describerId === '' && nodeResult.element.tagName == 'INPUT'; + }, + 'tabindex': function(nodeResult) { + // TODO(crbug.com/808276): remove this exception when bug is fixed. + return nodeResult.element.getAttribute('tabindex') == '0'; + }, + }), }); GEN('#endif // !defined(OS_CHROMEOS)');
diff --git a/chrome/test/data/webui/settings/a11y/passwords_a11y_test.js b/chrome/test/data/webui/settings/a11y/passwords_a11y_test.js index 4d2db5a..28844f5 100644 --- a/chrome/test/data/webui/settings/a11y/passwords_a11y_test.js +++ b/chrome/test/data/webui/settings/a11y/passwords_a11y_test.js
@@ -101,12 +101,7 @@ assertEquals(10, this.passwordsSection.savedPasswords.length); }, }, + /** @override */ - violationFilter: - Object.assign({}, SettingsAccessibilityTest.violationFilter, { - 'button-name': function(nodeResult) { - const node = nodeResult.element; - return node.classList.contains('icon-expand-more'); - }, - }), + violationFilter: SettingsAccessibilityTest.violationFilter, });
diff --git a/chrome/test/data/webui/settings/a11y/settings_accessibility_test.js b/chrome/test/data/webui/settings/a11y/settings_accessibility_test.js index b09130e..e5e9da2 100644 --- a/chrome/test/data/webui/settings/a11y/settings_accessibility_test.js +++ b/chrome/test/data/webui/settings/a11y/settings_accessibility_test.js
@@ -37,6 +37,16 @@ 'aria-valid-attr': function(nodeResult) { return nodeResult.element.hasAttribute('aria-active-attribute'); }, + 'button-name': function(nodeResult) { + if (nodeResult.element.classList.contains('icon-expand-more')) + return true; + + // Ignore the <button> residing within cr-toggle, which has tabindex -1 + // anyway. + const parentNode = nodeResult.element.parentNode; + return parentNode && parentNode.host && + parentNode.host.tagName == 'CR-TOGGLE'; + }, }; SettingsAccessibilityTest.prototype = {
diff --git a/chromecast/browser/android/apk/src/org/chromium/chromecast/shell/CastWebContentsComponent.java b/chromecast/browser/android/apk/src/org/chromium/chromecast/shell/CastWebContentsComponent.java index 996cfd3..5132e351 100644 --- a/chromecast/browser/android/apk/src/org/chromium/chromecast/shell/CastWebContentsComponent.java +++ b/chromecast/browser/android/apk/src/org/chromium/chromecast/shell/CastWebContentsComponent.java
@@ -37,6 +37,9 @@ */ public interface OnKeyDownHandler { void onKeyDown(int keyCode); } + /** + * Callback interface for when UI events occur. + */ public interface SurfaceEventHandler { void onVisibilityChange(int visibilityType); boolean consumeGesture(int gestureType); @@ -65,9 +68,11 @@ void stop(Context context); } - private class ActivityDelegate implements Delegate { + @VisibleForTesting + class ActivityDelegate implements Delegate { private static final String TAG = "cr_CastWebContent_AD"; private boolean mEnableTouchInput; + private boolean mStarted = false; public ActivityDelegate(boolean enableTouchInput) { mEnableTouchInput = enableTouchInput; @@ -75,13 +80,16 @@ @Override public void start(StartParams params) { + if (mStarted) return; // No-op if already started. if (DEBUG) Log.d(TAG, "start: SHOW_WEB_CONTENT in activity"); startCastActivity(params.context, params.webContents, mEnableTouchInput); + mStarted = true; } @Override public void stop(Context context) { sendStopWebContentEvent(); + mStarted = false; } }
diff --git a/chromecast/browser/android/junit/src/org/chromium/chromecast/shell/CastWebContentsComponentTest.java b/chromecast/browser/android/junit/src/org/chromium/chromecast/shell/CastWebContentsComponentTest.java index 8441ff2..3011cbc 100644 --- a/chromecast/browser/android/junit/src/org/chromium/chromecast/shell/CastWebContentsComponentTest.java +++ b/chromecast/browser/android/junit/src/org/chromium/chromecast/shell/CastWebContentsComponentTest.java
@@ -12,7 +12,6 @@ import static org.mockito.Mockito.verify; import android.app.Activity; -import android.app.Application; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; @@ -35,33 +34,23 @@ import org.robolectric.shadows.ShadowActivity; import org.chromium.base.ContextUtils; +import org.chromium.base.test.BaseRobolectricTestRunner; import org.chromium.chromecast.shell.CastWebContentsComponent.StartParams; import org.chromium.content_public.browser.WebContents; -import org.chromium.testing.local.LocalRobolectricTestRunner; /** * Tests for CastWebContentsComponent. */ -@RunWith(LocalRobolectricTestRunner.class) -@Config(manifest = Config.NONE, application = CastWebContentsComponentTest.FakeApplication.class) +@RunWith(BaseRobolectricTestRunner.class) +@Config(manifest = Config.NONE) public class CastWebContentsComponentTest { - public static class FakeApplication extends Application { - @Override - protected void attachBaseContext(Context base) { - super.attachBaseContext(base); - ContextUtils.initApplicationContextForTests(this); - } - } - private static final String INSTANCE_ID = "1"; private static final String APP_ID = "app"; private static final int VISIBILITY_PRIORITY = 2; - @Mock - private WebContents mWebContents; - + private @Mock WebContents mWebContents; private Activity mActivity; private ShadowActivity mShadowActivity; private StartParams mStartParams; @@ -240,4 +229,19 @@ Assert.assertFalse(component.isStarted()); verify(delegate, times(1)).stop(any(Context.class)); } + + @Test + public void testStartActivityDelegateTwiceNoops() { + // Sending focus events to a started Activity is unnecessary because the Activity is always + // in focus, and issues with onNewIntent() and duplicate detection can cause unintended + // side effects. + CastWebContentsComponent component = + new CastWebContentsComponent(INSTANCE_ID, null, null, null, false, false); + component.setDelegate(component.new ActivityDelegate(false)); + component.start(mStartParams); + Assert.assertEquals(mShadowActivity.getNextStartedActivity().getComponent().getClassName(), + CastWebContentsActivity.class.getName()); + component.start(mStartParams); + Assert.assertNull(mShadowActivity.getNextStartedActivity()); + } }
diff --git a/chromecast/browser/android/junit/src/org/chromium/chromecast/shell/CastWebContentsIntentUtilsTest.java b/chromecast/browser/android/junit/src/org/chromium/chromecast/shell/CastWebContentsIntentUtilsTest.java index b559074..58a078fb 100644 --- a/chromecast/browser/android/junit/src/org/chromium/chromecast/shell/CastWebContentsIntentUtilsTest.java +++ b/chromecast/browser/android/junit/src/org/chromium/chromecast/shell/CastWebContentsIntentUtilsTest.java
@@ -5,9 +5,7 @@ package org.chromium.chromecast.shell; import android.app.Activity; -import android.app.Application; import android.content.BroadcastReceiver; -import android.content.Context; import android.content.Intent; import android.net.Uri; @@ -21,38 +19,22 @@ import org.robolectric.Robolectric; import org.robolectric.annotation.Config; -import org.chromium.base.ContextUtils; +import org.chromium.base.test.BaseRobolectricTestRunner; import org.chromium.content_public.browser.WebContents; -import org.chromium.testing.local.LocalRobolectricTestRunner; /** * Tests for CastWebContentsComponent. */ -@RunWith(LocalRobolectricTestRunner.class) -@Config(manifest = Config.NONE, application = CastWebContentsComponentTest.FakeApplication.class) +@RunWith(BaseRobolectricTestRunner.class) +@Config(manifest = Config.NONE) public class CastWebContentsIntentUtilsTest { - public static class FakeApplication extends Application { - @Override - protected void attachBaseContext(Context base) { - super.attachBaseContext(base); - ContextUtils.initApplicationContextForTests(this); - } - } - private static final String INSTANCE_ID = "1"; - private static final String EXPECTED_URI = "cast://webcontents/1"; - private static final String APP_ID = "app"; - private static final int VISIBILITY_PRIORITY = 2; - @Mock - private WebContents mWebContents; - - @Mock - private BroadcastReceiver mReceiver; - + private @Mock WebContents mWebContents; + private @Mock BroadcastReceiver mReceiver; private Activity mActivity; @Before
diff --git a/chromecast/media/audio/cast_audio_manager.cc b/chromecast/media/audio/cast_audio_manager.cc index eedb42b..2c28631 100644 --- a/chromecast/media/audio/cast_audio_manager.cc +++ b/chromecast/media/audio/cast_audio_manager.cc
@@ -67,7 +67,7 @@ // Need to send a valid AudioParameters object even when it will be unused. return ::media::AudioParameters( ::media::AudioParameters::AUDIO_PCM_LOW_LATENCY, - ::media::CHANNEL_LAYOUT_STEREO, kDefaultSampleRate, 16, + ::media::CHANNEL_LAYOUT_STEREO, kDefaultSampleRate, kDefaultInputBufferSize); } @@ -137,7 +137,6 @@ ::media::ChannelLayout channel_layout = ::media::CHANNEL_LAYOUT_STEREO; int sample_rate = kDefaultSampleRate; int buffer_size = kDefaultOutputBufferSize; - int bits_per_sample = 16; if (input_params.IsValid()) { // Do not change: // - the channel layout @@ -151,7 +150,7 @@ ::media::AudioParameters output_params( ::media::AudioParameters::AUDIO_PCM_LOW_LATENCY, channel_layout, - sample_rate, bits_per_sample, buffer_size); + sample_rate, buffer_size); return output_params; }
diff --git a/chromecast/media/audio/cast_audio_manager_alsa.cc b/chromecast/media/audio/cast_audio_manager_alsa.cc index 326447e..16eae25e 100644 --- a/chromecast/media/audio/cast_audio_manager_alsa.cc +++ b/chromecast/media/audio/cast_audio_manager_alsa.cc
@@ -61,7 +61,7 @@ // Need to send a valid AudioParameters object even when it will be unused. return ::media::AudioParameters( ::media::AudioParameters::AUDIO_PCM_LOW_LATENCY, - ::media::CHANNEL_LAYOUT_STEREO, kDefaultSampleRate, 16, + ::media::CHANNEL_LAYOUT_STEREO, kDefaultSampleRate, kDefaultInputBufferSize); }
diff --git a/chromecast/media/audio/cast_audio_manager_unittest.cc b/chromecast/media/audio/cast_audio_manager_unittest.cc index 7af2788c..bd140601 100644 --- a/chromecast/media/audio/cast_audio_manager_unittest.cc +++ b/chromecast/media/audio/cast_audio_manager_unittest.cc
@@ -29,7 +29,6 @@ ::media::AudioParameters::AUDIO_PCM_LOW_LATENCY, ::media::CHANNEL_LAYOUT_STEREO, ::media::AudioParameters::kAudioCDSampleRate, - 16, 256); class CastAudioManagerTest : public testing::Test {
diff --git a/chromecast/media/audio/cast_audio_mixer.cc b/chromecast/media/audio/cast_audio_mixer.cc index 9033ea7..0b9884eb 100644 --- a/chromecast/media/audio/cast_audio_mixer.cc +++ b/chromecast/media/audio/cast_audio_mixer.cc
@@ -13,7 +13,6 @@ #include "media/base/channel_layout.h" namespace { -const int kBitsPerSample = 16; const int kFramesPerBuffer = 1024; const int kSampleRate = 48000; } // namespace @@ -184,8 +183,7 @@ : audio_manager_(audio_manager), error_(false), output_stream_(nullptr) { output_params_ = ::media::AudioParameters( ::media::AudioParameters::Format::AUDIO_PCM_LOW_LATENCY, - ::media::CHANNEL_LAYOUT_STEREO, kSampleRate, kBitsPerSample, - kFramesPerBuffer); + ::media::CHANNEL_LAYOUT_STEREO, kSampleRate, kFramesPerBuffer); mixer_.reset( new ::media::AudioConverter(output_params_, output_params_, false)); DETACH_FROM_THREAD(audio_thread_checker_);
diff --git a/chromecast/media/audio/cast_audio_mixer_unittest.cc b/chromecast/media/audio/cast_audio_mixer_unittest.cc index 180f2be..8394c75 100644 --- a/chromecast/media/audio/cast_audio_mixer_unittest.cc +++ b/chromecast/media/audio/cast_audio_mixer_unittest.cc
@@ -36,7 +36,7 @@ ::media::AudioParameters GetAudioParams() { return ::media::AudioParameters( ::media::AudioParameters::AUDIO_PCM_LOW_LATENCY, - ::media::CHANNEL_LAYOUT_STEREO, 48000, 16, 1024); + ::media::CHANNEL_LAYOUT_STEREO, 48000, 1024); } // Mock implementations
diff --git a/chromecast/media/audio/cast_audio_output_stream.cc b/chromecast/media/audio/cast_audio_output_stream.cc index c8d16e35..45f66692 100644 --- a/chromecast/media/audio/cast_audio_output_stream.cc +++ b/chromecast/media/audio/cast_audio_output_stream.cc
@@ -92,7 +92,7 @@ AudioConfig audio_config; audio_config.codec = kCodecPCM; audio_config.sample_format = kSampleFormatS16; - audio_config.bytes_per_channel = audio_params_.bits_per_sample() / 8; + audio_config.bytes_per_channel = 2; audio_config.channel_number = audio_params_.channels(); audio_config.samples_per_second = audio_params_.sample_rate(); if (!decoder_->SetConfig(audio_config)) { @@ -106,8 +106,8 @@ } audio_bus_ = ::media::AudioBus::Create(audio_params_); - decoder_buffer_ = new DecoderBufferAdapter( - new ::media::DecoderBuffer(audio_params_.GetBytesPerBuffer())); + decoder_buffer_ = new DecoderBufferAdapter(new ::media::DecoderBuffer( + audio_params_.GetBytesPerBuffer(::media::kSampleFormatS16))); timestamp_helper_.SetBaseTimestamp(base::TimeDelta()); std::move(completion_cb).Run(true); } @@ -169,9 +169,10 @@ DCHECK_EQ(frame_count, audio_bus_->frames()); DCHECK_EQ(static_cast<int>(decoder_buffer_->data_size()), - frame_count * audio_params_.GetBytesPerFrame()); - audio_bus_->ToInterleaved(frame_count, audio_params_.bits_per_sample() / 8, - decoder_buffer_->writable_data()); + audio_params_.GetBytesPerBuffer(::media::kSampleFormatS16)); + audio_bus_->ToInterleaved<::media::SignedInt16SampleTypeTraits>( + frame_count, + reinterpret_cast<int16_t*>(decoder_buffer_->writable_data())); decoder_buffer_->set_timestamp(timestamp_helper_.GetTimestamp()); timestamp_helper_.AddFrames(frame_count);
diff --git a/chromecast/media/audio/cast_audio_output_stream_unittest.cc b/chromecast/media/audio/cast_audio_output_stream_unittest.cc index 87d0793..cc585d8 100644 --- a/chromecast/media/audio/cast_audio_output_stream_unittest.cc +++ b/chromecast/media/audio/cast_audio_output_stream_unittest.cc
@@ -199,7 +199,6 @@ format_(::media::AudioParameters::AUDIO_PCM_LINEAR), channel_layout_(::media::CHANNEL_LAYOUT_MONO), sample_rate_(::media::AudioParameters::kAudioCDSampleRate), - bits_per_sample_(16), frames_per_buffer_(256) {} ~CastAudioOutputStreamTest() override {} @@ -222,7 +221,7 @@ ::media::AudioParameters GetAudioParams() { return ::media::AudioParameters(format_, channel_layout_, sample_rate_, - bits_per_sample_, frames_per_buffer_); + frames_per_buffer_); } FakeCmaBackend* GetBackend() { return media_pipeline_backend_; } @@ -259,7 +258,6 @@ ::media::AudioParameters::Format format_; ::media::ChannelLayout channel_layout_; int sample_rate_; - int bits_per_sample_; int frames_per_buffer_; }; @@ -317,20 +315,6 @@ stream->Close(); } -TEST_F(CastAudioOutputStreamTest, BitsPerSample) { - bits_per_sample_ = 16; - ::media::AudioOutputStream* stream = CreateStream(); - ASSERT_TRUE(stream); - EXPECT_TRUE(stream->Open()); - - FakeAudioDecoder* audio_decoder = GetAudio(); - ASSERT_TRUE(audio_decoder); - const AudioConfig& audio_config = audio_decoder->config(); - EXPECT_EQ(bits_per_sample_ / 8, audio_config.bytes_per_channel); - - stream->Close(); -} - TEST_F(CastAudioOutputStreamTest, DeviceState) { ::media::AudioOutputStream* stream = CreateStream(); ASSERT_TRUE(stream); @@ -383,7 +367,7 @@ // Verify decoder buffer. ::media::AudioParameters audio_params = GetAudioParams(); const size_t expected_frame_size = - static_cast<size_t>(audio_params.GetBytesPerBuffer()); + audio_params.GetBytesPerBuffer(::media::kSampleFormatS16); const DecoderBufferBase* buffer = audio_decoder->last_buffer(); EXPECT_TRUE(buffer->data()); EXPECT_EQ(expected_frame_size, buffer->data_size());
diff --git a/chromecast/media/cma/backend/android/audio_decoder_android.cc b/chromecast/media/cma/backend/android/audio_decoder_android.cc index edcb7327..8f23a7b 100644 --- a/chromecast/media/cma/backend/android/audio_decoder_android.cc +++ b/chromecast/media/cma/backend/android/audio_decoder_android.cc
@@ -39,7 +39,6 @@ namespace { const int kNumChannels = 2; -const int kBitsPerSample = 32; const int kDefaultFramesPerBuffer = 1024; const int kSilenceBufferFrames = 2048; const int kMaxOutputMs = 20; @@ -317,8 +316,7 @@ rate_shifter_->Initialize( ::media::AudioParameters(::media::AudioParameters::AUDIO_PCM_LINEAR, ::media::CHANNEL_LAYOUT_STEREO, - samples_per_second, kBitsPerSample, - kDefaultFramesPerBuffer), + samples_per_second, kDefaultFramesPerBuffer), is_encrypted); }
diff --git a/chromecast/media/cma/backend/audio_decoder_for_mixer.cc b/chromecast/media/cma/backend/audio_decoder_for_mixer.cc index d4e2fd8..59529cd 100644 --- a/chromecast/media/cma/backend/audio_decoder_for_mixer.cc +++ b/chromecast/media/cma/backend/audio_decoder_for_mixer.cc
@@ -38,7 +38,6 @@ namespace { const int kNumChannels = 2; -const int kBitsPerSample = 32; const int kDefaultFramesPerBuffer = 1024; const int kSilenceBufferFrames = 2048; const int kMaxOutputMs = 20; @@ -314,8 +313,7 @@ rate_shifter_->Initialize( ::media::AudioParameters(::media::AudioParameters::AUDIO_PCM_LINEAR, ::media::CHANNEL_LAYOUT_STEREO, - samples_per_second, kBitsPerSample, - kDefaultFramesPerBuffer), + samples_per_second, kDefaultFramesPerBuffer), is_encrypted); }
diff --git a/chromeos/BUILD.gn b/chromeos/BUILD.gn index ff828231..4f66dca 100644 --- a/chromeos/BUILD.gn +++ b/chromeos/BUILD.gn
@@ -2,6 +2,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +import("//build/config/chromeos/rules.gni") import("//build/config/ui.gni") import("//testing/libfuzzer/fuzzer_test.gni") import("//testing/test.gni") @@ -266,12 +267,8 @@ "dbus/power_policy_controller.h", "dbus/services/chrome_features_service_provider.cc", "dbus/services/chrome_features_service_provider.h", - "dbus/services/console_service_provider.cc", - "dbus/services/console_service_provider.h", "dbus/services/cros_dbus_service.cc", "dbus/services/cros_dbus_service.h", - "dbus/services/display_power_service_provider.cc", - "dbus/services/display_power_service_provider.h", "dbus/services/liveness_service_provider.cc", "dbus/services/liveness_service_provider.h", "dbus/services/proxy_resolution_service_provider.cc", @@ -791,6 +788,10 @@ ] } +generate_vm_runner_script("cros_vm_launcher") { + generated_script = "$root_build_dir/bin/launch_cros_vm" +} + fuzzer_test("variable_expander_fuzzer") { sources = [ "tools/variable_expander_fuzzer.cc",
diff --git a/chromeos/CHROMEOS_LKGM b/chromeos/CHROMEOS_LKGM index 3c071ca..7ee235ff 100644 --- a/chromeos/CHROMEOS_LKGM +++ b/chromeos/CHROMEOS_LKGM
@@ -1 +1 @@ -10634.0.0 \ No newline at end of file +10645.0.0 \ No newline at end of file
diff --git a/chromeos/dbus/services/console_service_provider.cc b/chromeos/dbus/services/console_service_provider.cc deleted file mode 100644 index 84bbd1a..0000000 --- a/chromeos/dbus/services/console_service_provider.cc +++ /dev/null
@@ -1,72 +0,0 @@ -// Copyright 2014 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "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" - -namespace chromeos { -namespace { - -void OnDisplayOwnershipChanged( - const dbus::ExportedObject::ResponseSender& response_sender, - std::unique_ptr<dbus::Response> response, - bool status) { - dbus::MessageWriter writer(response.get()); - writer.AppendBool(status); - response_sender.Run(std::move(response)); -} - -} // namespace - -ConsoleServiceProvider::ConsoleServiceProvider(Delegate* delegate) - : delegate_(delegate), weak_ptr_factory_(this) {} - -ConsoleServiceProvider::~ConsoleServiceProvider() = default; - -void ConsoleServiceProvider::Start( - scoped_refptr<dbus::ExportedObject> exported_object) { - exported_object->ExportMethod( - kDisplayServiceInterface, kDisplayServiceTakeOwnershipMethod, - base::Bind(&ConsoleServiceProvider::TakeDisplayOwnership, - weak_ptr_factory_.GetWeakPtr()), - base::Bind(&ConsoleServiceProvider::OnExported, - weak_ptr_factory_.GetWeakPtr())); - - exported_object->ExportMethod( - kDisplayServiceInterface, kDisplayServiceReleaseOwnershipMethod, - base::Bind(&ConsoleServiceProvider::ReleaseDisplayOwnership, - weak_ptr_factory_.GetWeakPtr()), - base::Bind(&ConsoleServiceProvider::OnExported, - weak_ptr_factory_.GetWeakPtr())); -} - -void ConsoleServiceProvider::TakeDisplayOwnership( - dbus::MethodCall* method_call, - dbus::ExportedObject::ResponseSender response_sender) { - delegate_->TakeDisplayOwnership( - base::Bind(&OnDisplayOwnershipChanged, response_sender, - base::Passed(dbus::Response::FromMethodCall(method_call)))); -} - -void ConsoleServiceProvider::ReleaseDisplayOwnership( - dbus::MethodCall* method_call, - dbus::ExportedObject::ResponseSender response_sender) { - delegate_->ReleaseDisplayOwnership( - base::Bind(&OnDisplayOwnershipChanged, response_sender, - base::Passed(dbus::Response::FromMethodCall(method_call)))); -} - -void ConsoleServiceProvider::OnExported(const std::string& interface_name, - const std::string& method_name, - bool success) { - if (!success) - LOG(ERROR) << "failed to export " << interface_name << "." << method_name; -} - -} // namespace chromeos
diff --git a/chromeos/dbus/services/console_service_provider.h b/chromeos/dbus/services/console_service_provider.h deleted file mode 100644 index 958e4c3..0000000 --- a/chromeos/dbus/services/console_service_provider.h +++ /dev/null
@@ -1,76 +0,0 @@ -// Copyright 2014 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef CHROMEOS_DBUS_SERVICES_CONSOLE_SERVICE_PROVIDER_H_ -#define CHROMEOS_DBUS_SERVICES_CONSOLE_SERVICE_PROVIDER_H_ - -#include <memory> -#include <string> - -#include "base/macros.h" -#include "base/memory/weak_ptr.h" -#include "chromeos/chromeos_export.h" -#include "chromeos/dbus/services/cros_dbus_service.h" -#include "dbus/exported_object.h" - -namespace chromeos { - -// This class provides an API for external apps to notify -// chrome that it should release control of the display server. -// The main client is the console application. This can -// also be used by crouton to take over the display. -class CHROMEOS_EXPORT ConsoleServiceProvider - : public CrosDBusService::ServiceProviderInterface { - public: - class Delegate { - public: - typedef base::Callback<void(bool)> UpdateOwnershipCallback; - - virtual ~Delegate() {} - - // Performs the actual work needed by the provider methods with the same - // names. - virtual void TakeDisplayOwnership( - const UpdateOwnershipCallback& callback) = 0; - virtual void ReleaseDisplayOwnership( - const UpdateOwnershipCallback& callback) = 0; - }; - - // The caller must ensure that |delegate| outlives this object. - explicit ConsoleServiceProvider(Delegate* delegate); - ~ConsoleServiceProvider() override; - - // CrosDBusService::ServiceProviderInterface overrides: - void Start(scoped_refptr<dbus::ExportedObject> exported_object) override; - - private: - // This method will get called when a external process no longer needs - // control of the display and Chrome can take ownership. - void TakeDisplayOwnership( - dbus::MethodCall* method_call, - dbus::ExportedObject::ResponseSender response_sender); - - // This method will get called when a external process needs control of - // the display and needs Chrome to release ownership. - void ReleaseDisplayOwnership( - dbus::MethodCall* method_call, - dbus::ExportedObject::ResponseSender response_sender); - - // This method is called when a dbus method is exported. If the export of the - // method is successful, |success| will be true. It will be false - // otherwise. - void OnExported(const std::string& interface_name, - const std::string& method_name, - bool success); - - Delegate* delegate_; // Not owned. - - base::WeakPtrFactory<ConsoleServiceProvider> weak_ptr_factory_; - - DISALLOW_COPY_AND_ASSIGN(ConsoleServiceProvider); -}; - -} // namespace chromeos - -#endif // CHROMEOS_DBUS_SERVICES_CONSOLE_SERVICE_PROVIDER_H_
diff --git a/chromeos/dbus/services/display_power_service_provider.cc b/chromeos/dbus/services/display_power_service_provider.cc deleted file mode 100644 index cb30e519..0000000 --- a/chromeos/dbus/services/display_power_service_provider.cc +++ /dev/null
@@ -1,87 +0,0 @@ -// Copyright (c) 2013 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "chromeos/dbus/services/display_power_service_provider.h" - -#include <utility> - -#include "base/bind.h" -#include "dbus/message.h" - -namespace chromeos { - -namespace { - -void RunConfigurationCallback( - dbus::MethodCall* method_call, - dbus::ExportedObject::ResponseSender response_sender, - bool status) { - response_sender.Run(dbus::Response::FromMethodCall(method_call)); -} - -} // namespace - -DisplayPowerServiceProvider::DisplayPowerServiceProvider( - std::unique_ptr<Delegate> delegate) - : delegate_(std::move(delegate)), weak_ptr_factory_(this) {} - -DisplayPowerServiceProvider::~DisplayPowerServiceProvider() = default; - -void DisplayPowerServiceProvider::Start( - scoped_refptr<dbus::ExportedObject> exported_object) { - exported_object->ExportMethod( - kDisplayServiceInterface, kDisplayServiceSetPowerMethod, - base::Bind(&DisplayPowerServiceProvider::SetDisplayPower, - weak_ptr_factory_.GetWeakPtr()), - base::Bind(&DisplayPowerServiceProvider::OnExported, - weak_ptr_factory_.GetWeakPtr())); - exported_object->ExportMethod( - kDisplayServiceInterface, kDisplayServiceSetSoftwareDimmingMethod, - base::Bind(&DisplayPowerServiceProvider::SetDisplaySoftwareDimming, - weak_ptr_factory_.GetWeakPtr()), - base::Bind(&DisplayPowerServiceProvider::OnExported, - weak_ptr_factory_.GetWeakPtr())); -} - -void DisplayPowerServiceProvider::OnExported(const std::string& interface_name, - const std::string& method_name, - bool success) { - if (!success) { - LOG(ERROR) << "Failed to export " << interface_name << "." - << method_name; - } -} - -void DisplayPowerServiceProvider::SetDisplayPower( - dbus::MethodCall* method_call, - dbus::ExportedObject::ResponseSender response_sender) { - dbus::MessageReader reader(method_call); - int int_state = 0; - Delegate::ResponseCallback callback = - base::Bind(&RunConfigurationCallback, method_call, response_sender); - if (reader.PopInt32(&int_state)) { - DisplayPowerState state = static_cast<DisplayPowerState>(int_state); - delegate_->SetDisplayPower(state, callback); - } else { - LOG(ERROR) << "Unable to parse " << kDisplayServiceSetPowerMethod - << " request"; - callback.Run(false); - } -} - -void DisplayPowerServiceProvider::SetDisplaySoftwareDimming( - dbus::MethodCall* method_call, - dbus::ExportedObject::ResponseSender response_sender) { - dbus::MessageReader reader(method_call); - bool dimmed = false; - if (reader.PopBool(&dimmed)) { - delegate_->SetDimming(dimmed); - } else { - LOG(ERROR) << "Unable to parse " << kDisplayServiceSetSoftwareDimmingMethod - << " request"; - } - response_sender.Run(dbus::Response::FromMethodCall(method_call)); -} - -} // namespace chromeos
diff --git a/chromeos/dbus/services/display_power_service_provider.h b/chromeos/dbus/services/display_power_service_provider.h deleted file mode 100644 index 4d42cfd4c..0000000 --- a/chromeos/dbus/services/display_power_service_provider.h +++ /dev/null
@@ -1,78 +0,0 @@ -// Copyright (c) 2013 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef CHROMEOS_DBUS_SERVICES_DISPLAY_POWER_SERVICE_PROVIDER_H_ -#define CHROMEOS_DBUS_SERVICES_DISPLAY_POWER_SERVICE_PROVIDER_H_ - -#include <memory> -#include <string> - -#include "base/compiler_specific.h" -#include "base/macros.h" -#include "base/memory/ref_counted.h" -#include "base/memory/weak_ptr.h" -#include "chromeos/chromeos_export.h" -#include "chromeos/dbus/services/cros_dbus_service.h" -#include "dbus/exported_object.h" -#include "third_party/cros_system_api/dbus/service_constants.h" - -namespace dbus { -class MethodCall; -} - -namespace chromeos { - -// This class exports "SetDisplayPower" and "SetDisplaySoftwareDimming" -// D-Bus methods that the power manager calls to instruct Chrome to turn -// various displays on or off or dim them. -class CHROMEOS_EXPORT DisplayPowerServiceProvider - : public CrosDBusService::ServiceProviderInterface { - public: - class Delegate { - public: - typedef base::Callback<void(bool)> ResponseCallback; - - virtual ~Delegate() {} - - // Sets the display power state. After the display power is set, |callback| - // is called with the operation status. - virtual void SetDisplayPower(DisplayPowerState power_state, - const ResponseCallback& callback) = 0; - - // Dims or undims the screen. - virtual void SetDimming(bool dimmed) = 0; - }; - - explicit DisplayPowerServiceProvider(std::unique_ptr<Delegate> delegate); - ~DisplayPowerServiceProvider() override; - - // CrosDBusService::ServiceProviderInterface overrides: - void Start(scoped_refptr<dbus::ExportedObject> exported_object) override; - - private: - // Called from ExportedObject when a handler is exported as a D-Bus - // method or failed to be exported. - void OnExported(const std::string& interface_name, - const std::string& method_name, - bool success); - - // Called on UI thread in response to D-Bus requests. - void SetDisplayPower(dbus::MethodCall* method_call, - dbus::ExportedObject::ResponseSender response_sender); - void SetDisplaySoftwareDimming( - dbus::MethodCall* method_call, - dbus::ExportedObject::ResponseSender response_sender); - - std::unique_ptr<Delegate> delegate_; - - // Keep this last so that all weak pointers will be invalidated at the - // beginning of destruction. - base::WeakPtrFactory<DisplayPowerServiceProvider> weak_ptr_factory_; - - DISALLOW_COPY_AND_ASSIGN(DisplayPowerServiceProvider); -}; - -} // namespace chromeos - -#endif // CHROMEOS_DBUS_SERVICES_DISPLAY_POWER_SERVICE_PROVIDER_H_
diff --git a/components/arc/ime/arc_ime_service.cc b/components/arc/ime/arc_ime_service.cc index a90baf5f..b530e6ac 100644 --- a/components/arc/ime/arc_ime_service.cc +++ b/components/arc/ime/arc_ime_service.cc
@@ -483,6 +483,13 @@ return has_composition_text_; } +ui::TextInputClient::FocusReason ArcImeService::GetFocusReason() const { + // TODO(https://crbug.com/824604): Determine how the current input client got + // focused. + NOTIMPLEMENTED_LOG_ONCE(); + return ui::TextInputClient::FOCUS_REASON_OTHER; +} + bool ArcImeService::GetCompositionTextRange(gfx::Range* range) const { return false; }
diff --git a/components/arc/ime/arc_ime_service.h b/components/arc/ime/arc_ime_service.h index 7355c1b..feee49e 100644 --- a/components/arc/ime/arc_ime_service.h +++ b/components/arc/ime/arc_ime_service.h
@@ -125,6 +125,7 @@ bool GetCompositionCharacterBounds(uint32_t index, gfx::Rect* rect) const override; bool HasCompositionText() const override; + FocusReason GetFocusReason() const override; bool GetCompositionTextRange(gfx::Range* range) const override; bool SetSelectionRange(const gfx::Range& range) override; bool DeleteRange(const gfx::Range& range) override;
diff --git a/components/google/core/browser/google_url_tracker.cc b/components/google/core/browser/google_url_tracker.cc index f516867..422d112aa 100644 --- a/components/google/core/browser/google_url_tracker.cc +++ b/components/google/core/browser/google_url_tracker.cc
@@ -61,8 +61,9 @@ if (mode == NORMAL_MODE) { static const int kStartFetchDelayMS = 5000; base::ThreadTaskRunnerHandle::Get()->PostDelayedTask( - FROM_HERE, base::Bind(&GoogleURLTracker::FinishSleep, - weak_ptr_factory_.GetWeakPtr()), + FROM_HERE, + base::BindOnce(&GoogleURLTracker::FinishSleep, + weak_ptr_factory_.GetWeakPtr()), base::TimeDelta::FromMilliseconds(kStartFetchDelayMS)); } }
diff --git a/components/metrics/stability_metrics_helper.cc b/components/metrics/stability_metrics_helper.cc index 4fbcf10b..375f75c 100644 --- a/components/metrics/stability_metrics_helper.cc +++ b/components/metrics/stability_metrics_helper.cc
@@ -60,6 +60,24 @@ histogram_type, RENDERER_TYPE_COUNT); } +// Macro for logging the age of a crashed process. +// +// Notes: +// - IMPORTANT: When changing the constants below, please change the names of +// the histograms logged via UMA_HISTOGRAM_CRASHED_PROCESS_AGE. +// - 99th percentile of Memory.Experimental.Renderer.Uptime hovers around 17h. +// - |kCrashedProcessAgeMin| is as low as possible, so that we may with +// high-confidence categorize crashes that occur during early startup (e.g. +// crashes that end up with STATUS_DLL_INIT_FAILED or STATUS_DLL_NOT_FOUND). +// - Note that even with just 50 buckets, we still get narrow and accurate +// buckets at the lower end: 0ms, 1ms, 2ms, 3ms, 4-5ms, 6-8ms, 9-12ms, ... +constexpr auto kCrashedProcessAgeMin = base::TimeDelta::FromMilliseconds(1); +constexpr auto kCrashedProcessAgeMax = base::TimeDelta::FromHours(48); +constexpr uint32_t kCrashedProcessAgeCount = 50; +#define UMA_HISTOGRAM_CRASHED_PROCESS_AGE(histogram_name, uptime) \ + UMA_HISTOGRAM_CUSTOM_TIMES(histogram_name, uptime, kCrashedProcessAgeMin, \ + kCrashedProcessAgeMax, kCrashedProcessAgeCount) + } // namespace StabilityMetricsHelper::StabilityMetricsHelper(PrefService* local_state) @@ -184,9 +202,11 @@ // might be lost due to a crash :-(. } -void StabilityMetricsHelper::LogRendererCrash(bool was_extension_process, - base::TerminationStatus status, - int exit_code) { +void StabilityMetricsHelper::LogRendererCrash( + bool was_extension_process, + base::TerminationStatus status, + int exit_code, + base::Optional<base::TimeDelta> uptime) { RendererType histogram_type = was_extension_process ? RENDERER_TYPE_EXTENSION : RENDERER_TYPE_RENDERER; @@ -204,11 +224,19 @@ base::UmaHistogramSparse("CrashExitCodes.Extension", MapCrashExitCodeForHistogram(exit_code)); + if (uptime.has_value()) { + UMA_HISTOGRAM_CRASHED_PROCESS_AGE( + "Stability.CrashedProcessAge.Extension", uptime.value()); + } } else { IncrementPrefValue(prefs::kStabilityRendererCrashCount); base::UmaHistogramSparse("CrashExitCodes.Renderer", MapCrashExitCodeForHistogram(exit_code)); + if (uptime.has_value()) { + UMA_HISTOGRAM_CRASHED_PROCESS_AGE( + "Stability.CrashedProcessAge.Renderer", uptime.value()); + } } UMA_HISTOGRAM_ENUMERATION("BrowserRenderProcessHost.ChildCrashes",
diff --git a/components/metrics/stability_metrics_helper.h b/components/metrics/stability_metrics_helper.h index b7105772..ddf4d50c 100644 --- a/components/metrics/stability_metrics_helper.h +++ b/components/metrics/stability_metrics_helper.h
@@ -6,7 +6,9 @@ #define COMPONENTS_METRICS_STABILITY_METRICS_HELPER_H_ #include "base/macros.h" +#include "base/optional.h" #include "base/process/kill.h" +#include "base/time/time.h" class PrefRegistrySimple; class PrefService; @@ -37,7 +39,8 @@ // Records a renderer process crash. void LogRendererCrash(bool was_extension_process, base::TerminationStatus status, - int exit_code); + int exit_code, + base::Optional<base::TimeDelta> uptime); // Records that a new renderer process was successfully launched. void LogRendererLaunched(bool was_extension_process);
diff --git a/components/metrics/stability_metrics_helper_unittest.cc b/components/metrics/stability_metrics_helper_unittest.cc index 010aa90..bcaa2c1 100644 --- a/components/metrics/stability_metrics_helper_unittest.cc +++ b/components/metrics/stability_metrics_helper_unittest.cc
@@ -4,6 +4,8 @@ #include "components/metrics/stability_metrics_helper.h" +#include <memory> + #include "base/macros.h" #include "base/test/histogram_tester.h" #include "build/build_config.h" @@ -65,22 +67,25 @@ TEST_F(StabilityMetricsHelperTest, LogRendererCrash) { StabilityMetricsHelper helper(prefs()); base::HistogramTester histogram_tester; + const base::TimeDelta kUptime = base::TimeDelta::FromSeconds(123); // Crash and abnormal termination should increment renderer crash count. - helper.LogRendererCrash(false, base::TERMINATION_STATUS_PROCESS_CRASHED, 1); + helper.LogRendererCrash(false, base::TERMINATION_STATUS_PROCESS_CRASHED, 1, + kUptime); helper.LogRendererCrash(false, base::TERMINATION_STATUS_ABNORMAL_TERMINATION, - 1); + 1, kUptime); // OOM should increment renderer crash count. - helper.LogRendererCrash(false, base::TERMINATION_STATUS_OOM, 1); + helper.LogRendererCrash(false, base::TERMINATION_STATUS_OOM, 1, kUptime); // Kill does not increment renderer crash count. - helper.LogRendererCrash(false, base::TERMINATION_STATUS_PROCESS_WAS_KILLED, - 1); + helper.LogRendererCrash(false, base::TERMINATION_STATUS_PROCESS_WAS_KILLED, 1, + kUptime); // Failed launch increments failed launch count. - helper.LogRendererCrash(false, base::TERMINATION_STATUS_LAUNCH_FAILED, 1); + helper.LogRendererCrash(false, base::TERMINATION_STATUS_LAUNCH_FAILED, 1, + kUptime); metrics::SystemProfileProto system_profile; @@ -108,6 +113,8 @@ RENDERER_TYPE_EXTENSION, 0); histogram_tester.ExpectBucketCount( "BrowserRenderProcessHost.ChildLaunchFailureCodes", 1, 1); + histogram_tester.ExpectUniqueSample("Stability.CrashedProcessAge.Renderer", + kUptime.InMilliseconds(), 3); } // Note: ENABLE_EXTENSIONS is set to false in Android @@ -115,15 +122,18 @@ TEST_F(StabilityMetricsHelperTest, LogRendererCrashEnableExtensions) { StabilityMetricsHelper helper(prefs()); base::HistogramTester histogram_tester; + const base::TimeDelta kUptime = base::TimeDelta::FromSeconds(123); // Crash and abnormal termination should increment extension crash count. - helper.LogRendererCrash(true, base::TERMINATION_STATUS_PROCESS_CRASHED, 1); + helper.LogRendererCrash(true, base::TERMINATION_STATUS_PROCESS_CRASHED, 1, + kUptime); // OOM should increment extension renderer crash count. - helper.LogRendererCrash(true, base::TERMINATION_STATUS_OOM, 1); + helper.LogRendererCrash(true, base::TERMINATION_STATUS_OOM, 1, kUptime); // Failed launch increments extension failed launch count. - helper.LogRendererCrash(true, base::TERMINATION_STATUS_LAUNCH_FAILED, 1); + helper.LogRendererCrash(true, base::TERMINATION_STATUS_LAUNCH_FAILED, 1, + kUptime); metrics::SystemProfileProto system_profile; helper.ProvideStabilityMetrics(&system_profile); @@ -141,6 +151,8 @@ histogram_tester.ExpectBucketCount( "BrowserRenderProcessHost.ChildLaunchFailures", RENDERER_TYPE_EXTENSION, 1); + histogram_tester.ExpectUniqueSample("Stability.CrashedProcessAge.Extension", + kUptime.InMilliseconds(), 2); } #endif
diff --git a/components/ntp_snippets/contextual/contextual_suggestions_metrics_reporter.cc b/components/ntp_snippets/contextual/contextual_suggestions_metrics_reporter.cc index f3f4b600..a83da23 100644 --- a/components/ntp_snippets/contextual/contextual_suggestions_metrics_reporter.cc +++ b/components/ntp_snippets/contextual/contextual_suggestions_metrics_reporter.cc
@@ -77,7 +77,8 @@ return; sheet_opened_ = true; break; - case UI_CLOSED: + case UI_DISMISSED_WITHOUT_OPEN: + case UI_DISMISSED_AFTER_OPEN: if (sheet_closed_) return; sheet_closed_ = true; @@ -92,9 +93,12 @@ return; any_suggestion_taken_ = true; break; + case UI_CLOSED_OBSOLETE: + NOTREACHED() << "Obsolete event, do not use!"; + return; default: NOTREACHED() << "Unexpected event, not correctly handled!"; - break; + return; } UMA_HISTOGRAM_ENUMERATION("ContextualSuggestions.Events", event); }
diff --git a/components/ntp_snippets/contextual/contextual_suggestions_metrics_reporter.h b/components/ntp_snippets/contextual/contextual_suggestions_metrics_reporter.h index 8772d05..58f33f0 100644 --- a/components/ntp_snippets/contextual/contextual_suggestions_metrics_reporter.h +++ b/components/ntp_snippets/contextual/contextual_suggestions_metrics_reporter.h
@@ -52,15 +52,21 @@ UI_PEEK_REVERSE_SCROLL = 8, // The UI sheet was opened. UI_OPENED = 9, - // The UI was closed (via the close box). - UI_CLOSED = 10, + // The UI was closed. General event for closed/dismissed, now obsolete. + UI_CLOSED_OBSOLETE = 10, // A suggestion was downloaded. SUGGESTION_DOWNLOADED = 11, // A suggestion was taken, either with a click, or opened in a separate tab. SUGGESTION_CLICKED = 12, + // The UI was dismissed without ever being opened. This means the sheet was + // closed while peeked before ever being expanded. + UI_DISMISSED_WITHOUT_OPEN = 13, + // The UI was dismissed after having been opened. This means the sheet was + // closed from any position after it was expanded at least once. + UI_DISMISSED_AFTER_OPEN = 14, // Special name that marks the maximum value in an Enum used for UMA. // https://cs.chromium.org/chromium/src/tools/metrics/histograms/README.md. - kMaxValue = SUGGESTION_CLICKED, + kMaxValue = UI_DISMISSED_AFTER_OPEN, }; class ContextualSuggestionsMetricsReporter;
diff --git a/components/ntp_snippets/contextual/contextual_suggestions_metrics_reporter_unittest.cc b/components/ntp_snippets/contextual/contextual_suggestions_metrics_reporter_unittest.cc index 9539533..cc46245 100644 --- a/components/ntp_snippets/contextual/contextual_suggestions_metrics_reporter_unittest.cc +++ b/components/ntp_snippets/contextual/contextual_suggestions_metrics_reporter_unittest.cc
@@ -30,9 +30,11 @@ const int kFetchCompleted = 7; const int kUiPeekReverseScroll = 8; const int kUiOpened = 9; -const int kUiClosed = 10; +const int kUiClosedObsolete = 10; const int kSuggestionDownloaded = 11; const int kSuggestionClicked = 12; +const int kUiDismissedWithoutOpen = 13; +const int kUiDismissedAfterOpen = 14; } // namespace class ContextualSuggestionsMetricsReporterTest : public ::testing::Test { @@ -103,11 +105,16 @@ histogram_tester.ExpectBucketCount(kEventsHistogramName, kUiPeekReverseScroll, 1); histogram_tester.ExpectBucketCount(kEventsHistogramName, kUiOpened, 1); - histogram_tester.ExpectBucketCount(kEventsHistogramName, kUiClosed, 0); + histogram_tester.ExpectBucketCount(kEventsHistogramName, kUiClosedObsolete, + 0); histogram_tester.ExpectBucketCount(kEventsHistogramName, kSuggestionDownloaded, 1); histogram_tester.ExpectBucketCount(kEventsHistogramName, kSuggestionClicked, 1); + histogram_tester.ExpectBucketCount(kEventsHistogramName, + kUiDismissedWithoutOpen, 0); + histogram_tester.ExpectBucketCount(kEventsHistogramName, + kUiDismissedAfterOpen, 0); } void ContextualSuggestionsMetricsReporterTest::ExpectMultipleEventsCountOnce( @@ -138,8 +145,12 @@ ExpectMultipleEventsCountOnce(UI_OPENED); } -TEST_F(ContextualSuggestionsMetricsReporterTest, UiClosedTest) { - ExpectMultipleEventsCountOnce(UI_CLOSED); +TEST_F(ContextualSuggestionsMetricsReporterTest, UiDismissedWithoutOpenTest) { + ExpectMultipleEventsCountOnce(UI_DISMISSED_WITHOUT_OPEN); +} + +TEST_F(ContextualSuggestionsMetricsReporterTest, UiDismissedAfterOpenTest) { + ExpectMultipleEventsCountOnce(UI_DISMISSED_AFTER_OPEN); } TEST_F(ContextualSuggestionsMetricsReporterTest, SuggestionDownloadedTest) {
diff --git a/components/ntp_snippets/contextual/contextual_suggestions_ukm_entry.cc b/components/ntp_snippets/contextual/contextual_suggestions_ukm_entry.cc index 73bda536..d06920c 100644 --- a/components/ntp_snippets/contextual/contextual_suggestions_ukm_entry.cc +++ b/components/ntp_snippets/contextual/contextual_suggestions_ukm_entry.cc
@@ -70,10 +70,8 @@ was_sheet_opened_ = true; StartTimerIfNeeded(); break; - case UI_CLOSED: - if (!was_sheet_opened_) - closed_from_peek_ = true; - StopTimerIfNeeded(); + case UI_CLOSED_OBSOLETE: + NOTREACHED(); break; case SUGGESTION_DOWNLOADED: any_suggestion_downloaded_ = true; @@ -83,6 +81,13 @@ any_suggestion_taken_ = true; StopTimerIfNeeded(); break; + case UI_DISMISSED_WITHOUT_OPEN: + closed_from_peek_ = true; + StopTimerIfNeeded(); + break; + case UI_DISMISSED_AFTER_OPEN: + StopTimerIfNeeded(); + break; } }
diff --git a/components/sync/base/cryptographer.cc b/components/sync/base/cryptographer.cc index 14dfa15..e5e35e6c 100644 --- a/components/sync/base/cryptographer.cc +++ b/components/sync/base/cryptographer.cc
@@ -35,9 +35,9 @@ it != other.nigoris_.end(); ++it) { std::string user_key, encryption_key, mac_key; it->second->ExportKeys(&user_key, &encryption_key, &mac_key); - linked_ptr<Nigori> nigori_copy(new Nigori()); + auto nigori_copy = std::make_unique<Nigori>(); nigori_copy->InitByImport(user_key, encryption_key, mac_key); - nigoris_.insert(std::make_pair(it->first, nigori_copy)); + nigoris_.emplace(it->first, std::move(nigori_copy)); } if (other.pending_keys_) { @@ -144,11 +144,10 @@ // Create a bag of all the Nigori parameters we know about. sync_pb::NigoriKeyBag bag; - for (NigoriMap::const_iterator it = nigoris_.begin(); it != nigoris_.end(); - ++it) { - const Nigori& nigori = *it->second; + for (const auto& key_name_and_nigori : nigoris_) { + const Nigori& nigori = *key_name_and_nigori.second; sync_pb::NigoriKey* key = bag.add_key(); - key->set_name(it->first); + key->set_name(key_name_and_nigori.first); nigori.ExportKeys(key->mutable_user_key(), key->mutable_encryption_key(), key->mutable_mac_key()); } @@ -196,7 +195,7 @@ return false; } - nigoris_[name] = make_linked_ptr(initialized_nigori.release()); + nigoris_[name] = std::move(initialized_nigori); // Check if the key we just added can decrypt the pending keys and add them // too if so. @@ -310,7 +309,7 @@ NOTREACHED(); continue; } - nigoris_[key.name()] = make_linked_ptr(new_nigori.release()); + nigoris_[key.name()] = std::move(new_nigori); } } }
diff --git a/components/sync/base/cryptographer.h b/components/sync/base/cryptographer.h index b4fcb90..05879f9 100644 --- a/components/sync/base/cryptographer.h +++ b/components/sync/base/cryptographer.h
@@ -10,7 +10,6 @@ #include <string> #include "base/macros.h" -#include "base/memory/linked_ptr.h" #include "components/sync/base/nigori.h" #include "components/sync/protocol/encryption.pb.h" @@ -185,7 +184,7 @@ bool ImportNigoriKey(const std::string& serialized_nigori_key); private: - using NigoriMap = std::map<std::string, linked_ptr<const Nigori>>; + using NigoriMap = std::map<std::string, std::unique_ptr<const Nigori>>; // Helper method to instantiate Nigori instances for each set of key // parameters in |bag|.
diff --git a/components/sync/engine/engine_util.cc b/components/sync/engine/engine_util.cc index b79b15f..695c2df 100644 --- a/components/sync/engine/engine_util.cc +++ b/components/sync/engine/engine_util.cc
@@ -8,6 +8,7 @@ #include <memory> +#include "base/logging.h" #include "base/macros.h" #include "components/sync/base/cryptographer.h" #include "components/sync/protocol/password_specifics.pb.h"
diff --git a/components/sync/model_impl/client_tag_based_model_type_processor.cc b/components/sync/model_impl/client_tag_based_model_type_processor.cc index ee3bddc..aad8c2d3 100644 --- a/components/sync/model_impl/client_tag_based_model_type_processor.cc +++ b/components/sync/model_impl/client_tag_based_model_type_processor.cc
@@ -106,7 +106,7 @@ } model_type_state_ = batch->GetModelTypeState(); } else { - DCHECK_EQ(0u, batch->TakeAllMetadata().size()); + DCHECK(commit_only_ || batch->TakeAllMetadata().empty()); // First time syncing; initialize metadata. model_type_state_.mutable_progress_marker()->set_data_type_id( GetSpecificsFieldNumberFromModelType(type_));
diff --git a/components/viz/service/display/overlay_strategy_fullscreen.cc b/components/viz/service/display/overlay_strategy_fullscreen.cc index d7bd9f6..15ba911f 100644 --- a/components/viz/service/display/overlay_strategy_fullscreen.cc +++ b/components/viz/service/display/overlay_strategy_fullscreen.cc
@@ -50,13 +50,11 @@ if (!candidate.display_rect.origin().IsOrigin() || gfx::ToRoundedSize(candidate.display_rect.size()) != - render_pass->output_rect.size() || - render_pass->output_rect.size() != candidate.resource_size_in_pixels) { + render_pass->output_rect.size()) { return false; } candidate.is_opaque = true; candidate.plane_z_order = 0; - candidate.overlay_handled = true; cc::OverlayCandidateList new_candidate_list; new_candidate_list.push_back(candidate); capability_checker_->CheckOverlaySupport(&new_candidate_list);
diff --git a/components/viz/service/display/overlay_unittest.cc b/components/viz/service/display/overlay_unittest.cc index 992c40d..056ca06 100644 --- a/components/viz/service/display/overlay_unittest.cc +++ b/components/viz/service/display/overlay_unittest.cc
@@ -72,7 +72,9 @@ } bool AllowCALayerOverlays() override { return false; } bool AllowDCLayerOverlays() override { return false; } - void CheckOverlaySupport(cc::OverlayCandidateList* surfaces) override {} + void CheckOverlaySupport(cc::OverlayCandidateList* surfaces) override { + surfaces->back().overlay_handled = true; + } }; class SingleOverlayValidator : public OverlayCandidateValidator { @@ -658,7 +660,7 @@ EXPECT_EQ(0U, candidate_list.size()); } -TEST_F(FullscreenOverlayTest, ResourceSizeInPixelsFail) { +TEST_F(FullscreenOverlayTest, SuccessfulResourceSizeInPixels) { std::unique_ptr<RenderPass> pass = CreateRenderPass(); TextureDrawQuad* original_quad = CreateFullscreenCandidateQuad( resource_provider_.get(), child_resource_provider_.get(), @@ -677,10 +679,10 @@ resource_provider_.get(), &pass_list, GetIdentityColorMatrix(), render_pass_filters, render_pass_background_filters, &candidate_list, nullptr, nullptr, &damage_rect_, &content_bounds_); - ASSERT_EQ(0U, candidate_list.size()); + ASSERT_EQ(1U, candidate_list.size()); - // Check that the quad is not gone. - EXPECT_EQ(1U, main_pass->quad_list.size()); + // Check that the quad is gone. + EXPECT_EQ(0U, main_pass->quad_list.size()); } TEST_F(FullscreenOverlayTest, OnTopFail) {
diff --git a/components/viz/test/test_web_graphics_context_3d.cc b/components/viz/test/test_web_graphics_context_3d.cc index 1f14058..11a2504 100644 --- a/components/viz/test/test_web_graphics_context_3d.cc +++ b/components/viz/test/test_web_graphics_context_3d.cc
@@ -22,7 +22,17 @@ namespace viz { -static unsigned s_context_id = 1; +unsigned NextContextId() { + static uint16_t s_context_id = 1; + // We need to ensure that the context_id fits in 16 bits since it is placed on + // the top 16 bits of the 32 bit identifiers (program_id, framebuffer_id, + // shader_id, etc.) generated by the context. + if (s_context_id == std::numeric_limits<uint16_t>::max()) { + LOG(ERROR) << "Exceeded max context id count; wrapping around"; + s_context_id = 1; + } + return s_context_id++; +} const GLuint TestWebGraphicsContext3D::kExternalTextureId = 1337; @@ -50,7 +60,7 @@ } TestWebGraphicsContext3D::TestWebGraphicsContext3D() - : context_id_(s_context_id++), + : context_id_(NextContextId()), times_bind_texture_succeeds_(-1), times_end_query_succeeds_(-1), context_lost_(false),
diff --git a/content/browser/accessibility/accessibility_tree_formatter_blink.cc b/content/browser/accessibility/accessibility_tree_formatter_blink.cc index 569515a..f5d217da 100644 --- a/content/browser/accessibility/accessibility_tree_formatter_blink.cc +++ b/content/browser/accessibility/accessibility_tree_formatter_blink.cc
@@ -71,6 +71,8 @@ return ui::ToString(static_cast<ax::mojom::DefaultActionVerb>(value)); case ax::mojom::IntAttribute::kDescriptionFrom: return ui::ToString(static_cast<ax::mojom::DescriptionFrom>(value)); + case ax::mojom::IntAttribute::kHasPopup: + return ui::ToString(static_cast<ax::mojom::HasPopup>(value)); case ax::mojom::IntAttribute::kInvalidState: return ui::ToString(static_cast<ax::mojom::InvalidState>(value)); case ax::mojom::IntAttribute::kNameFrom:
diff --git a/content/browser/accessibility/browser_accessibility_android.cc b/content/browser/accessibility/browser_accessibility_android.cc index bf5d3aa0..89e57e0e 100644 --- a/content/browser/accessibility/browser_accessibility_android.cc +++ b/content/browser/accessibility/browser_accessibility_android.cc
@@ -366,7 +366,7 @@ } bool BrowserAccessibilityAndroid::CanOpenPopup() const { - return HasState(ax::mojom::State::kHaspopup); + return HasIntAttribute(ax::mojom::IntAttribute::kHasPopup); } const char* BrowserAccessibilityAndroid::GetClassName() const {
diff --git a/content/browser/accessibility/browser_accessibility_cocoa.mm b/content/browser/accessibility/browser_accessibility_cocoa.mm index 3c7c2eb..bc4b972f 100644 --- a/content/browser/accessibility/browser_accessibility_cocoa.mm +++ b/content/browser/accessibility/browser_accessibility_cocoa.mm
@@ -1133,7 +1133,7 @@ - (NSNumber*)hasPopup { if (![self instanceActive]) return nil; - return browserAccessibility_->HasState(ax::mojom::State::kHaspopup) ? @YES + return browserAccessibility_->HasState(ax::mojom::State::kHasPopup) ? @YES : @NO; } @@ -3071,7 +3071,7 @@ [ret addObjectsFromArray:@[ NSAccessibilityGrabbedAttribute ]]; } - if (browserAccessibility_->HasState(ax::mojom::State::kHaspopup)) { + if (browserAccessibility_->HasState(ax::mojom::State::kHasPopup)) { [ret addObjectsFromArray:@[ NSAccessibilityHasPopupAttribute ]]; }
diff --git a/content/browser/child_process_launcher.cc b/content/browser/child_process_launcher.cc index 947e364..17e9a10e5 100644 --- a/content/browser/child_process_launcher.cc +++ b/content/browser/child_process_launcher.cc
@@ -4,6 +4,8 @@ #include "content/browser/child_process_launcher.h" +#include <utility> + #include "base/bind.h" #include "base/command_line.h" #include "base/files/file_util.h" @@ -30,6 +32,7 @@ bool terminate_on_shutdown) : client_(client), starting_(true), + start_time_(base::TimeTicks::Now()), #if defined(ADDRESS_SANITIZER) || defined(LEAK_SANITIZER) || \ defined(MEMORY_SANITIZER) || defined(THREAD_SANITIZER) || \ defined(UNDEFINED_SANITIZER) @@ -104,14 +107,19 @@ if (!process_.process.IsValid()) { // Make sure to avoid using the default termination status if the process // hasn't even started yet. - if (IsStarting()) + if (IsStarting()) { termination_info_.status = base::TERMINATION_STATUS_STILL_RUNNING; + termination_info_.uptime = base::TimeTicks::Now() - start_time_; + DCHECK_LE(base::TimeDelta::FromSeconds(0), termination_info_.uptime); + } // Process doesn't exist, so return the cached termination info. return termination_info_; } termination_info_ = helper_->GetTerminationInfo(process_, known_dead); + termination_info_.uptime = base::TimeTicks::Now() - start_time_; + DCHECK_LE(base::TimeDelta::FromSeconds(0), termination_info_.uptime); // POSIX: If the process crashed, then the kernel closed the socket for it and // so the child has already died by the time we get here. Since
diff --git a/content/browser/child_process_launcher.h b/content/browser/child_process_launcher.h index e00d2ea..c40e71b 100644 --- a/content/browser/child_process_launcher.h +++ b/content/browser/child_process_launcher.h
@@ -6,6 +6,7 @@ #define CONTENT_BROWSER_CHILD_PROCESS_LAUNCHER_H_ #include <memory> +#include <string> #include "base/macros.h" #include "base/memory/ref_counted.h" @@ -14,6 +15,7 @@ #include "base/process/kill.h" #include "base/process/process.h" #include "base/sequence_checker.h" +#include "base/time/time.h" #include "build/build_config.h" #include "content/browser/child_process_launcher_helper.h" #include "content/common/content_export.h" @@ -79,7 +81,7 @@ // constructed on. virtual void OnProcessLaunched() = 0; - virtual void OnProcessLaunchFailed(int error_code) {}; + virtual void OnProcessLaunchFailed(int error_code) {} protected: virtual ~Client() {} @@ -171,6 +173,7 @@ ChildProcessTerminationInfo termination_info_; bool starting_; + base::TimeTicks start_time_; // Controls whether the child process should be terminated on browser // shutdown. Default behavior is to terminate the child.
diff --git a/content/browser/devtools/protocol/devtools_protocol_browsertest.cc b/content/browser/devtools/protocol/devtools_protocol_browsertest.cc index 4bdd0b3..504b785f 100644 --- a/content/browser/devtools/protocol/devtools_protocol_browsertest.cc +++ b/content/browser/devtools/protocol/devtools_protocol_browsertest.cc
@@ -1560,206 +1560,6 @@ EXPECT_EQ("about:blank", url); } -namespace { -class NavigationFinishedObserver : public content::WebContentsObserver { - public: - explicit NavigationFinishedObserver(WebContents* web_contents) - : WebContentsObserver(web_contents), - num_finished_(0), - num_to_wait_for_(0) {} - - ~NavigationFinishedObserver() override {} - - void DidFinishNavigation( - content::NavigationHandle* navigation_handle) override { - if (navigation_handle->WasServerRedirect()) - return; - - num_finished_++; - if (num_finished_ >= num_to_wait_for_ && num_to_wait_for_ != 0) { - base::RunLoop::QuitCurrentDeprecated(); - } - } - - void WaitForNavigationsToFinish(int num_to_wait_for) { - if (num_finished_ < num_to_wait_for) { - num_to_wait_for_ = num_to_wait_for; - RunMessageLoop(); - } - num_to_wait_for_ = 0; - } - - private: - int num_finished_; - int num_to_wait_for_; -}; - -class LoadFinishedObserver : public content::WebContentsObserver { - public: - explicit LoadFinishedObserver(WebContents* web_contents) - : WebContentsObserver(web_contents), num_finished_(0) {} - - ~LoadFinishedObserver() override {} - - void DidStopLoading() override { - num_finished_++; - if (run_loop_.running()) - run_loop_.Quit(); - } - - void WaitForLoadToFinish() { - if (num_finished_ == 0) - run_loop_.Run(); - } - - private: - int num_finished_; - base::RunLoop run_loop_; -}; - -} // namespace - -IN_PROC_BROWSER_TEST_F(DevToolsProtocolTest, PageStopLoading) { - ASSERT_TRUE(embedded_test_server()->Start()); - - // Navigate to about:blank first so we can make sure there is a target page we - // can attach to, and have Network.setRequestInterception complete - // before we start the navigations we're interested in. - NavigateToURLBlockUntilNavigationsComplete(shell(), GURL("about:blank"), 1); - Attach(); - - std::unique_ptr<base::DictionaryValue> params(new base::DictionaryValue()); - std::unique_ptr<base::ListValue> patterns(new base::ListValue()); - patterns->Append(std::make_unique<base::DictionaryValue>()); - params->Set("patterns", std::move(patterns)); - SendCommand("Network.setRequestInterception", std::move(params), true); - - LoadFinishedObserver load_finished_observer(shell()->web_contents()); - - // The page will try to navigate twice, however since - // Network.setRequestInterception is true, - // it'll wait for confirmation before committing to the navigation. - GURL test_url = embedded_test_server()->GetURL( - "/devtools/control_navigations/meta_tag.html"); - shell()->LoadURL(test_url); - - // Stop all navigations. - SendCommand("Page.stopLoading", nullptr); - - // Wait for the initial navigation to finish. - load_finished_observer.WaitForLoadToFinish(); -} - -IN_PROC_BROWSER_TEST_F(DevToolsProtocolTest, ControlNavigationsMainFrame) { - ASSERT_TRUE(embedded_test_server()->Start()); - - // Navigate to about:blank first so we can make sure there is a target page we - // can attach to, and have Network.setRequestInterception complete - // before we start the navigations we're interested in. - NavigateToURLBlockUntilNavigationsComplete(shell(), GURL("about:blank"), 1); - Attach(); - - std::unique_ptr<base::DictionaryValue> params(new base::DictionaryValue()); - std::unique_ptr<base::ListValue> patterns(new base::ListValue()); - patterns->Append(std::make_unique<base::DictionaryValue>()); - params->Set("patterns", std::move(patterns)); - SendCommand("Network.setRequestInterception", std::move(params), true); - - NavigationFinishedObserver navigation_finished_observer( - shell()->web_contents()); - - GURL test_url = embedded_test_server()->GetURL( - "/devtools/control_navigations/meta_tag.html"); - shell()->LoadURL(test_url); - - std::vector<ExpectedNavigation> expected_navigations = { - {"http://127.0.0.1/devtools/control_navigations/meta_tag.html", - false /* expected_is_redirect */, false /* abort */}, - {"http://127.0.0.1/devtools/navigation.html", - false /* expected_is_redirect */, true /* abort */}}; - - ProcessNavigationsAnyOrder(std::move(expected_navigations)); - - // Wait for the initial navigation and the cancelled meta refresh navigation - // to finish. - navigation_finished_observer.WaitForNavigationsToFinish(2); - - // Check main frame has the expected url. - EXPECT_EQ( - "http://127.0.0.1/devtools/control_navigations/meta_tag.html", - RemovePort( - shell()->web_contents()->GetMainFrame()->GetLastCommittedURL())); -} - -class IsolatedDevToolsProtocolTest : public DevToolsProtocolTest { - public: - ~IsolatedDevToolsProtocolTest() override {} - - void SetUpCommandLine(base::CommandLine* command_line) override { - IsolateAllSitesForTesting(command_line); - } -}; - -IN_PROC_BROWSER_TEST_F(IsolatedDevToolsProtocolTest, - ControlNavigationsChildFrames) { - content::SetupCrossSiteRedirector(embedded_test_server()); - ASSERT_TRUE(embedded_test_server()->Start()); - - // Navigate to about:blank first so we can make sure there is a target page we - // can attach to, and have Network.setRequestInterception complete - // before we start the navigations we're interested in. - NavigateToURLBlockUntilNavigationsComplete(shell(), GURL("about:blank"), 1); - Attach(); - - std::unique_ptr<base::DictionaryValue> params(new base::DictionaryValue()); - std::unique_ptr<base::ListValue> patterns(new base::ListValue()); - patterns->Append(std::make_unique<base::DictionaryValue>()); - params->Set("patterns", std::move(patterns)); - SendCommand("Network.setRequestInterception", std::move(params), true); - - NavigationFinishedObserver navigation_finished_observer( - shell()->web_contents()); - - GURL test_url = embedded_test_server()->GetURL( - "/devtools/control_navigations/iframe_navigation.html"); - shell()->LoadURL(test_url); - - // Allow main frame navigation, and all iframe navigations to http://a.com - // Allow initial iframe navigation to http://b.com but dissallow it to - // navigate to /devtools/navigation.html. - std::vector<ExpectedNavigation> expected_navigations = { - {"http://127.0.0.1/devtools/control_navigations/" - "iframe_navigation.html", - false /* expected_is_redirect */, false /* abort */}, - {"http://127.0.0.1/cross-site/a.com/devtools/control_navigations/" - "meta_tag.html", - false /* expected_is_redirect */, false /* abort */}, - {"http://127.0.0.1/cross-site/b.com/devtools/control_navigations/" - "meta_tag.html", - false /* expected_is_redirect */, false /* abort */}, - {"http://a.com/devtools/control_navigations/meta_tag.html", - true /* expected_is_redirect */, false /* abort */}, - {"http://b.com/devtools/control_navigations/meta_tag.html", - true /* expected_is_redirect */, false /* abort */}, - {"http://a.com/devtools/navigation.html", - false /* expected_is_redirect */, false /* abort */}, - {"http://b.com/devtools/navigation.html", - false /* expected_is_redirect */, true /* abort */}}; - - ProcessNavigationsAnyOrder(std::move(expected_navigations)); - - // Wait for each frame's navigation to finish, ignoring redirects. - navigation_finished_observer.WaitForNavigationsToFinish(3); - - // Make sure each frame has the expected url. - EXPECT_THAT( - GetAllFrameUrls(), - ElementsAre("http://127.0.0.1/devtools/control_navigations/" - "iframe_navigation.html", - "http://a.com/devtools/navigation.html", - "http://b.com/devtools/control_navigations/meta_tag.html")); -} - IN_PROC_BROWSER_TEST_F(DevToolsProtocolTest, VirtualTimeTest) { NavigateToURLBlockUntilNavigationsComplete(shell(), GURL("about:blank"), 1); Attach();
diff --git a/content/browser/frame_host/navigation_handle_impl.cc b/content/browser/frame_host/navigation_handle_impl.cc index de4e732..b0cd9e4b 100644 --- a/content/browser/frame_host/navigation_handle_impl.cc +++ b/content/browser/frame_host/navigation_handle_impl.cc
@@ -816,7 +816,6 @@ TRACE_EVENT_ASYNC_STEP_INTO0("navigation", "NavigationHandle", this, "ReadyToCommitNavigation"); - DCHECK(!render_frame_host_ || render_frame_host_ == render_frame_host); render_frame_host_ = render_frame_host; state_ = READY_TO_COMMIT; ready_to_commit_time_ = base::TimeTicks::Now();
diff --git a/content/browser/frame_host/navigation_handle_impl_browsertest.cc b/content/browser/frame_host/navigation_handle_impl_browsertest.cc index 1e6c0406..61d4412e 100644 --- a/content/browser/frame_host/navigation_handle_impl_browsertest.cc +++ b/content/browser/frame_host/navigation_handle_impl_browsertest.cc
@@ -1654,8 +1654,8 @@ }; // Test to verify that error pages caused by NavigationThrottle blocking a -// request from being made are properly committed in the original process -// that requested the navigation. +// request in the main frame from being made are properly committed in a +// separate error page process. IN_PROC_BROWSER_TEST_F(PlzNavigateNavigationHandleImplBrowserTest, ErrorPageBlockedNavigation) { SetupCrossSiteRedirector(embedded_test_server()); @@ -1680,8 +1680,8 @@ NavigationThrottle::PROCEED); { - // A blocked, renderer-initiated navigation should commit an error page - // in the process that originated the navigation. + // A blocked, renderer-initiated navigation in the main frame should commit + // an error page in a new process. NavigationHandleObserver observer(shell()->web_contents(), blocked_url); TestNavigationObserver navigation_observer(shell()->web_contents(), 1); EXPECT_TRUE( @@ -1690,27 +1690,20 @@ navigation_observer.Wait(); EXPECT_TRUE(observer.has_committed()); EXPECT_TRUE(observer.is_error()); - EXPECT_EQ(site_instance, + EXPECT_NE(site_instance, shell()->web_contents()->GetMainFrame()->GetSiteInstance()); + EXPECT_EQ(kUnreachableWebDataURL, shell() + ->web_contents() + ->GetMainFrame() + ->GetSiteInstance() + ->GetSiteURL()); } { - // Reloading the blocked document from the renderer process should not - // transfer processes. - NavigationHandleObserver observer(shell()->web_contents(), blocked_url); - TestNavigationObserver navigation_observer(shell()->web_contents(), 1); - - EXPECT_TRUE(ExecuteScript(shell(), "location.reload()")); - navigation_observer.Wait(); - EXPECT_TRUE(observer.has_committed()); - EXPECT_TRUE(observer.is_error()); - EXPECT_EQ(site_instance, - shell()->web_contents()->GetMainFrame()->GetSiteInstance()); - } - - { - // Reloading the blocked document from the browser process ends up - // transferring processes in --site-per-process. + // Reloading the blocked document from the browser process still ends up + // in the error page process. + int process_id = + shell()->web_contents()->GetMainFrame()->GetProcess()->GetID(); NavigationHandleObserver observer(shell()->web_contents(), blocked_url); TestNavigationObserver navigation_observer(shell()->web_contents(), 1); @@ -1718,13 +1711,13 @@ navigation_observer.Wait(); EXPECT_TRUE(observer.has_committed()); EXPECT_TRUE(observer.is_error()); - if (AreAllSitesIsolatedForTesting()) { - EXPECT_NE(site_instance, - shell()->web_contents()->GetMainFrame()->GetSiteInstance()); - } else { - EXPECT_EQ(site_instance, - shell()->web_contents()->GetMainFrame()->GetSiteInstance()); - } + EXPECT_EQ(kUnreachableWebDataURL, shell() + ->web_contents() + ->GetMainFrame() + ->GetSiteInstance() + ->GetSiteURL()); + EXPECT_EQ(process_id, + shell()->web_contents()->GetMainFrame()->GetProcess()->GetID()); } installer.reset(); @@ -1761,6 +1754,46 @@ EXPECT_TRUE(observer.is_error()); EXPECT_NE(site_instance, shell()->web_contents()->GetMainFrame()->GetSiteInstance()); + EXPECT_EQ(kUnreachableWebDataURL, shell() + ->web_contents() + ->GetMainFrame() + ->GetSiteInstance() + ->GetSiteURL()); + } + + installer.reset(); + + { + // A blocked subframe navigation should commit an error page in the same + // process. + EXPECT_TRUE(NavigateToURL(shell(), start_url)); + const std::string javascript = + "var i = document.createElement('iframe');" + "i.src = '" + + blocked_url.spec() + + "';" + "document.body.appendChild(i);"; + + installer = std::make_unique<TestNavigationThrottleInstaller>( + shell()->web_contents(), NavigationThrottle::BLOCK_REQUEST, + NavigationThrottle::PROCEED, NavigationThrottle::PROCEED, + NavigationThrottle::PROCEED); + + content::RenderFrameHost* rfh = shell()->web_contents()->GetMainFrame(); + TestNavigationObserver navigation_observer(shell()->web_contents(), 1); + ASSERT_TRUE(content::ExecuteScript(rfh, javascript)); + navigation_observer.Wait(); + + FrameTreeNode* root = static_cast<WebContentsImpl*>(shell()->web_contents()) + ->GetFrameTree() + ->root(); + ASSERT_EQ(1u, root->child_count()); + FrameTreeNode* child = root->child_at(0u); + + EXPECT_EQ(root->current_frame_host()->GetSiteInstance(), + child->current_frame_host()->GetSiteInstance()); + EXPECT_NE(kUnreachableWebDataURL, + child->current_frame_host()->GetSiteInstance()->GetSiteURL()); } } @@ -1795,6 +1828,11 @@ EXPECT_TRUE(observer.is_error()); EXPECT_NE(site_instance, shell()->web_contents()->GetMainFrame()->GetSiteInstance()); + EXPECT_EQ(kUnreachableWebDataURL, shell() + ->web_contents() + ->GetMainFrame() + ->GetSiteInstance() + ->GetSiteURL()); } }
diff --git a/content/browser/frame_host/navigation_request.cc b/content/browser/frame_host/navigation_request.cc index 132e3b6..b108f913 100644 --- a/content/browser/frame_host/navigation_request.cc +++ b/content/browser/frame_host/navigation_request.cc
@@ -1044,28 +1044,45 @@ return; } - // Decide whether to leave the error page in the original process. - // * If this was a renderer-initiated navigation, and the request is blocked - // because the initiating document wasn't allowed to make the request, - // commit the error in the existing process. This is a strategy to to avoid - // creating a process for the destination, which may belong to an origin - // with a higher privilege level. - // * Error pages resulting from errors like network outage, no network, or DNS - // error can reasonably expect that a reload at a later point in time would - // work. These should be allowed to transfer away from the current process: - // they do belong to whichever process that will host the destination URL, - // as a reload will end up committing in that process anyway. - // * Error pages that arise during browser-initiated navigations to blocked - // URLs should be allowed to transfer away from the current process, which - // didn't request the navigation and may have a higher privilege level than - // the blocked destination. RenderFrameHostImpl* render_frame_host = nullptr; - if (net_error == net::ERR_BLOCKED_BY_CLIENT && !browser_initiated()) { - render_frame_host = frame_tree_node_->current_frame_host(); - } else { + if (frame_tree_node_->IsMainFrame()) { + // Main frame error pages must be isolated from the source or destination + // process. + // + // Note: Since this navigation resulted in an error, clear the expected + // process for the original navigation since for main frames the error page + // will go into a new process. + // TODO(nasko): Investigate whether GetFrameHostForNavigation can properly + // account for clearing the expected process if it clears the speculative + // RenderFrameHost. See https://crbug.com/793127. + navigation_handle_->SetExpectedProcess(nullptr); render_frame_host = frame_tree_node_->render_manager()->GetFrameHostForNavigation(*this); + } else { + // Decide whether to leave the error page in the original process. + // * If this was a renderer-initiated navigation, and the request is blocked + // because the initiating document wasn't allowed to make the request, + // commit the error in the existing process. This is a strategy to to + // avoid creating a process for the destination, which may belong to an + // origin with a higher privilege level. + // * Error pages resulting from errors like network outage, no network, or + // DNS error can reasonably expect that a reload at a later point in time + // would work. These should be allowed to transfer away from the current + // process: they do belong to whichever process that will host the + // destination URL, as a reload will end up committing in that process + // anyway. + // * Error pages that arise during browser-initiated navigations to blocked + // URLs should be allowed to transfer away from the current process, which + // didn't request the navigation and may have a higher privilege level + // than the blocked destination. + if (net_error == net::ERR_BLOCKED_BY_CLIENT && !browser_initiated()) { + render_frame_host = frame_tree_node_->current_frame_host(); + } else { + render_frame_host = + frame_tree_node_->render_manager()->GetFrameHostForNavigation(*this); + } } + DCHECK(render_frame_host); // Don't ask the renderer to commit an URL if the browser will kill it when
diff --git a/content/browser/frame_host/navigator_impl.cc b/content/browser/frame_host/navigator_impl.cc index a42e7e3..799fbb8 100644 --- a/content/browser/frame_host/navigator_impl.cc +++ b/content/browser/frame_host/navigator_impl.cc
@@ -467,13 +467,12 @@ } // Update the site of the SiteInstance if it doesn't have one yet, unless - // assigning a site is not necessary for this URL or the commit was for an - // error page. In that case, the SiteInstance can still be considered unused - // until a navigation to a real page. + // assigning a site is not necessary for this URL. In that case, the + // SiteInstance can still be considered unused until a navigation to a real + // page. SiteInstanceImpl* site_instance = render_frame_host->GetSiteInstance(); if (!site_instance->HasSite() && - SiteInstanceImpl::ShouldAssignSiteForURL(params.url) && - !params.url_is_unreachable) { + SiteInstanceImpl::ShouldAssignSiteForURL(params.url)) { site_instance->SetSite(params.url); }
diff --git a/content/browser/frame_host/render_frame_host_manager.cc b/content/browser/frame_host/render_frame_host_manager.cc index d7875ac..0347880f 100644 --- a/content/browser/frame_host/render_frame_host_manager.cc +++ b/content/browser/frame_host/render_frame_host_manager.cc
@@ -965,6 +965,7 @@ SiteInstance* dest_instance, SiteInstance* candidate_instance, ui::PageTransition transition, + bool is_failure, bool dest_is_restore, bool dest_is_view_source_mode, bool was_server_redirect) { @@ -1024,7 +1025,7 @@ if (ShouldTransitionCrossSite() || force_swap) { new_instance_descriptor = DetermineSiteInstanceForURL( dest_url, source_instance, current_instance, dest_instance, transition, - dest_is_restore, dest_is_view_source_mode, force_swap, + is_failure, dest_is_restore, dest_is_view_source_mode, force_swap, was_server_redirect); } @@ -1100,6 +1101,7 @@ SiteInstance* current_instance, SiteInstance* dest_instance, ui::PageTransition transition, + bool is_failure, bool dest_is_restore, bool dest_is_view_source_mode, bool force_browsing_instance_swap, @@ -1126,6 +1128,18 @@ return SiteInstanceDescriptor(browser_context, dest_url, SiteInstanceRelation::UNRELATED); + // If error page navigations should be isolated, ensure a dedicated + // SiteInstance is used for them. + if (is_failure && GetContentClient()->browser()->ShouldIsolateErrorPage( + frame_tree_node_->IsMainFrame())) { + // Keep the error page in the same BrowsingInstance, such that in the case + // of transient network errors, a subsequent successful load of the same + // document will not result in broken scripting relationships between + // windows. + return SiteInstanceDescriptor(browser_context, GURL(kUnreachableWebDataURL), + SiteInstanceRelation::RELATED); + } + // (UGLY) HEURISTIC, process-per-site only: // // If this navigation is generated, then it probably corresponds to a search @@ -1918,13 +1932,14 @@ // marked as renderer-initiated are created by receiving a BeginNavigation // IPC, and will then proceed in the same renderer. In site-per-process // mode, it is possible for renderer-intiated navigations to be allowed to - // go cross-process. Check it first. + // go cross-process. Main frame navigations resulting in an error are also + // expected to change process. Check it first. bool can_renderer_initiate_transfer = - render_frame_host_->IsRenderFrameLive() && - IsURLHandledByNetworkStack(request.common_params().url) && - IsRendererTransferNeededForNavigation(render_frame_host_.get(), - request.common_params().url); - + request.state() == NavigationRequest::FAILED || + (render_frame_host_->IsRenderFrameLive() && + IsURLHandledByNetworkStack(request.common_params().url) && + IsRendererTransferNeededForNavigation(render_frame_host_.get(), + request.common_params().url)); no_renderer_swap_allowed |= request.from_begin_navigation() && !can_renderer_initiate_transfer; } else { @@ -1951,6 +1966,7 @@ request.common_params().url, request.source_site_instance(), request.dest_site_instance(), candidate_site_instance, request.common_params().transition, + request.state() == NavigationRequest::FAILED, request.restore_type() != RestoreType::NONE, request.is_view_source(), was_server_redirect);
diff --git a/content/browser/frame_host/render_frame_host_manager.h b/content/browser/frame_host/render_frame_host_manager.h index a6f58d99..f40d6a22 100644 --- a/content/browser/frame_host/render_frame_host_manager.h +++ b/content/browser/frame_host/render_frame_host_manager.h
@@ -569,6 +569,7 @@ SiteInstance* dest_instance, SiteInstance* candidate_instance, ui::PageTransition transition, + bool is_failure, bool dest_is_restore, bool dest_is_view_source_mode, bool was_server_redirect); @@ -593,6 +594,7 @@ SiteInstance* current_instance, SiteInstance* dest_instance, ui::PageTransition transition, + bool is_failure, bool dest_is_restore, bool dest_is_view_source_mode, bool force_browsing_instance_swap,
diff --git a/content/browser/frame_host/render_frame_host_manager_browsertest.cc b/content/browser/frame_host/render_frame_host_manager_browsertest.cc index c7447ed..421be9d 100644 --- a/content/browser/frame_host/render_frame_host_manager_browsertest.cc +++ b/content/browser/frame_host/render_frame_host_manager_browsertest.cc
@@ -46,15 +46,19 @@ #include "content/public/test/browser_test_utils.h" #include "content/public/test/content_browser_test.h" #include "content/public/test/content_browser_test_utils.h" +#include "content/public/test/navigation_handle_observer.h" #include "content/public/test/test_frame_navigation_observer.h" #include "content/public/test/test_navigation_observer.h" #include "content/public/test/test_utils.h" +#include "content/public/test/url_loader_interceptor.h" #include "content/shell/browser/shell.h" #include "content/test/content_browser_test_utils_internal.h" #include "net/dns/mock_host_resolver.h" #include "net/test/embedded_test_server/controllable_http_response.h" #include "net/test/embedded_test_server/embedded_test_server.h" #include "net/test/embedded_test_server/request_handler_util.h" +#include "net/test/url_request/url_request_failed_job.h" +#include "services/network/public/cpp/features.h" #include "testing/gmock/include/gmock/gmock-matchers.h" using base::ASCIIToUTF16; @@ -172,6 +176,21 @@ ASSERT_TRUE(embedded_test_server()->Start()); } + std::unique_ptr<content::URLLoaderInterceptor> SetupRequestFailForURL( + const GURL& url) { + return std::make_unique<content::URLLoaderInterceptor>(base::BindRepeating( + [](const GURL& url, + content::URLLoaderInterceptor::RequestParams* params) { + if (params->url_request.url != url) + return false; + network::URLLoaderCompletionStatus status; + status.error_code = net::ERR_DNS_TIMED_OUT; + params->client->OnComplete(status); + return true; + }, + url)); + } + // Returns a URL on foo.com with the given path. GURL GetCrossSiteURL(const std::string& path) { GURL cross_site_url(embedded_test_server()->GetURL(path)); @@ -3981,4 +4000,179 @@ } } +// Test to verify that navigations in the main frame, which result in an error +// page, properly commit the error page in its own dedicated process. +IN_PROC_BROWSER_TEST_F(RenderFrameHostManagerTest, + ErrorPageNavigationInMainFrame) { + StartEmbeddedServer(); + GURL url(embedded_test_server()->GetURL("/title1.html")); + GURL error_url(embedded_test_server()->GetURL("/empty.html")); + std::unique_ptr<URLLoaderInterceptor> url_interceptor = + SetupRequestFailForURL(error_url); + + // Start with a successful navigation to a document. + EXPECT_TRUE(NavigateToURL(shell(), url)); + scoped_refptr<SiteInstance> success_site_instance = + shell()->web_contents()->GetMainFrame()->GetSiteInstance(); + + // Browser-initiated navigation to an error page should result in changing the + // SiteInstance and process. + { + NavigationHandleObserver observer(shell()->web_contents(), error_url); + EXPECT_FALSE(NavigateToURL(shell(), error_url)); + EXPECT_TRUE(observer.is_error()); + EXPECT_EQ(net::ERR_DNS_TIMED_OUT, observer.net_error_code()); + + scoped_refptr<SiteInstance> error_site_instance = + shell()->web_contents()->GetMainFrame()->GetSiteInstance(); + EXPECT_NE(success_site_instance, error_site_instance); + EXPECT_TRUE(success_site_instance->IsRelatedSiteInstance( + error_site_instance.get())); + EXPECT_NE(success_site_instance->GetProcess()->GetID(), + error_site_instance->GetProcess()->GetID()); + EXPECT_EQ(GURL(kUnreachableWebDataURL), error_site_instance->GetSiteURL()); + + // Verify that the error page process is locked to origin + auto* policy = ChildProcessSecurityPolicyImpl::GetInstance(); + EXPECT_EQ( + GURL(kUnreachableWebDataURL), + policy->GetOriginLock(error_site_instance->GetProcess()->GetID())); + } + + // Navigate successfully again to a document, then perform a + // renderer-initiated navigation and verify it behaves the same way. + EXPECT_TRUE(NavigateToURL(shell(), url)); + success_site_instance = + shell()->web_contents()->GetMainFrame()->GetSiteInstance(); + + { + NavigationHandleObserver observer(shell()->web_contents(), error_url); + TestFrameNavigationObserver frame_observer(shell()->web_contents()); + EXPECT_TRUE(ExecuteScript(shell()->web_contents(), + "location.href = '" + error_url.spec() + "';")); + frame_observer.Wait(); + EXPECT_TRUE(observer.is_error()); + EXPECT_EQ(net::ERR_DNS_TIMED_OUT, observer.net_error_code()); + + scoped_refptr<SiteInstance> error_site_instance = + shell()->web_contents()->GetMainFrame()->GetSiteInstance(); + EXPECT_NE(success_site_instance, error_site_instance); + EXPECT_TRUE(success_site_instance->IsRelatedSiteInstance( + error_site_instance.get())); + EXPECT_NE(success_site_instance->GetProcess()->GetID(), + error_site_instance->GetProcess()->GetID()); + EXPECT_EQ(GURL(kUnreachableWebDataURL), error_site_instance->GetSiteURL()); + } +} + +// Test to verify that navigations in subframes, which result in an error +// page, commit the error page in the same process and not in the dedicated +// error page process. +IN_PROC_BROWSER_TEST_F(RenderFrameHostManagerTest, + ErrorPageNavigationInChildFrame) { + StartEmbeddedServer(); + GURL url(embedded_test_server()->GetURL("/page_with_iframe.html")); + GURL error_url(embedded_test_server()->GetURL("/empty.html")); + std::unique_ptr<URLLoaderInterceptor> url_interceptor = + SetupRequestFailForURL(error_url); + + // Start with a successful navigation to a document. + EXPECT_TRUE(NavigateToURL(shell(), url)); + + WebContentsImpl* web_contents = + static_cast<WebContentsImpl*>(shell()->web_contents()); + + FrameTreeNode* root = web_contents->GetFrameTree()->root(); + FrameTreeNode* child = root->child_at(0); + + scoped_refptr<SiteInstance> success_site_instance = + child->current_frame_host()->GetSiteInstance(); + + NavigationHandleObserver observer(web_contents, error_url); + TestFrameNavigationObserver frame_observer(child); + EXPECT_TRUE( + ExecuteScript(child, "location.href = '" + error_url.spec() + "';")); + frame_observer.Wait(); + + EXPECT_TRUE(observer.is_error()); + EXPECT_EQ(net::ERR_DNS_TIMED_OUT, observer.net_error_code()); + + scoped_refptr<SiteInstance> error_site_instance = + child->current_frame_host()->GetSiteInstance(); + EXPECT_EQ(success_site_instance, error_site_instance); + EXPECT_NE(GURL(kUnreachableWebDataURL), error_site_instance->GetSiteURL()); +} + +// Test to verify that navigations in new window, which result in an error +// page, commit the error page in the dedicated error page process and not in +// the one for the destination site. +IN_PROC_BROWSER_TEST_F(RenderFrameHostManagerTest, + ErrorPageNavigationInNewWindow) { + StartEmbeddedServer(); + GURL error_url(embedded_test_server()->GetURL("/empty.html")); + std::unique_ptr<URLLoaderInterceptor> url_interceptor = + SetupRequestFailForURL(error_url); + + // Start with a successful navigation to a document. + EXPECT_TRUE( + NavigateToURL(shell(), embedded_test_server()->GetURL("/title1.html"))); + + FrameTreeNode* root = static_cast<WebContentsImpl*>(shell()->web_contents()) + ->GetFrameTree() + ->root(); + scoped_refptr<SiteInstance> main_site_instance = + root->current_frame_host()->GetSiteInstance(); + + Shell* new_shell = OpenPopup(shell(), error_url, "foo"); + EXPECT_TRUE(new_shell); + + scoped_refptr<SiteInstance> error_site_instance = + new_shell->web_contents()->GetMainFrame()->GetSiteInstance(); + EXPECT_NE(main_site_instance, error_site_instance); + EXPECT_EQ(GURL(kUnreachableWebDataURL), error_site_instance->GetSiteURL()); +} + +// Test to verify that windows that are not part of the same +// BrowsingInstance end up using the same error page process, even though +// their SiteInstances are not related. +IN_PROC_BROWSER_TEST_F(RenderFrameHostManagerTest, + ErrorPageNavigationInUnrelatedWindows) { + StartEmbeddedServer(); + GURL error_url(embedded_test_server()->GetURL("/empty.html")); + std::unique_ptr<URLLoaderInterceptor> url_interceptor = + SetupRequestFailForURL(error_url); + + // Navigate the main window to an error page and verify. + { + NavigationHandleObserver observer(shell()->web_contents(), error_url); + EXPECT_FALSE(NavigateToURL(shell(), error_url)); + scoped_refptr<SiteInstance> error_site_instance = + shell()->web_contents()->GetMainFrame()->GetSiteInstance(); + EXPECT_TRUE(observer.is_error()); + EXPECT_EQ(net::ERR_DNS_TIMED_OUT, observer.net_error_code()); + EXPECT_EQ(GURL(kUnreachableWebDataURL), error_site_instance->GetSiteURL()); + } + + // Creat a new, unrelated, window, navigate it to an error page and + // verify. + Shell* new_shell = CreateBrowser(); + { + NavigationHandleObserver observer(new_shell->web_contents(), error_url); + EXPECT_FALSE(NavigateToURL(new_shell, error_url)); + scoped_refptr<SiteInstance> error_site_instance = + new_shell->web_contents()->GetMainFrame()->GetSiteInstance(); + EXPECT_TRUE(observer.is_error()); + EXPECT_EQ(net::ERR_DNS_TIMED_OUT, observer.net_error_code()); + EXPECT_EQ(GURL(kUnreachableWebDataURL), error_site_instance->GetSiteURL()); + } + + // Verify the two SiteInstanes are not related, but they end up using the + // same underlying RenderProcessHost. + EXPECT_FALSE( + shell()->web_contents()->GetSiteInstance()->IsRelatedSiteInstance( + new_shell->web_contents()->GetSiteInstance())); + EXPECT_EQ(shell()->web_contents()->GetSiteInstance()->GetProcess(), + new_shell->web_contents()->GetSiteInstance()->GetProcess()); +} + } // namespace content
diff --git a/content/browser/isolated_origin_browsertest.cc b/content/browser/isolated_origin_browsertest.cc index 42e4fce..04376b7 100644 --- a/content/browser/isolated_origin_browsertest.cc +++ b/content/browser/isolated_origin_browsertest.cc
@@ -18,6 +18,7 @@ #include "content/public/test/browser_test_utils.h" #include "content/public/test/content_browser_test.h" #include "content/public/test/content_browser_test_utils.h" +#include "content/public/test/navigation_handle_observer.h" #include "content/public/test/test_frame_navigation_observer.h" #include "content/public/test/test_navigation_observer.h" #include "content/public/test/test_utils.h" @@ -1173,6 +1174,61 @@ EXPECT_NE(subframe1->GetSiteInstance(), subframe2->GetSiteInstance()); } +// Check that navigating a subframe to an isolated origin error page puts the +// subframe into an OOPIF and its own SiteInstance. Also check that a +// non-isolated error page in a subframe ends up in the correct SiteInstance. +IN_PROC_BROWSER_TEST_F(IsolatedOriginTest, SubframeErrorPages) { + GURL top_url( + embedded_test_server()->GetURL("/frame_tree/page_with_two_frames.html")); + GURL isolated_url( + embedded_test_server()->GetURL("isolated.foo.com", "/close-socket")); + GURL regular_url(embedded_test_server()->GetURL("a.com", "/close-socket")); + + EXPECT_TRUE(NavigateToURL(shell(), top_url)); + FrameTreeNode* root = web_contents()->GetFrameTree()->root(); + EXPECT_EQ(2u, root->child_count()); + + FrameTreeNode* child1 = root->child_at(0); + FrameTreeNode* child2 = root->child_at(1); + + { + TestFrameNavigationObserver observer(child1); + NavigationHandleObserver handle_observer(web_contents(), isolated_url); + EXPECT_TRUE(ExecuteScript( + child1, "location.href = '" + isolated_url.spec() + "';")); + observer.Wait(); + EXPECT_EQ(child1->current_url(), isolated_url); + EXPECT_TRUE(handle_observer.is_error()); + + EXPECT_NE(root->current_frame_host()->GetSiteInstance(), + child1->current_frame_host()->GetSiteInstance()); + EXPECT_EQ(GURL(isolated_url.GetOrigin()), + child1->current_frame_host()->GetSiteInstance()->GetSiteURL()); + } + + { + TestFrameNavigationObserver observer(child2); + NavigationHandleObserver handle_observer(web_contents(), regular_url); + EXPECT_TRUE( + ExecuteScript(child2, "location.href = '" + regular_url.spec() + "';")); + observer.Wait(); + EXPECT_EQ(child2->current_url(), regular_url); + EXPECT_TRUE(handle_observer.is_error()); + if (AreAllSitesIsolatedForTesting()) { + EXPECT_NE(root->current_frame_host()->GetSiteInstance(), + child2->current_frame_host()->GetSiteInstance()); + EXPECT_EQ(SiteInstance::GetSiteForURL(web_contents()->GetBrowserContext(), + regular_url), + child2->current_frame_host()->GetSiteInstance()->GetSiteURL()); + } else { + EXPECT_EQ(root->current_frame_host()->GetSiteInstance(), + child2->current_frame_host()->GetSiteInstance()); + } + EXPECT_NE(GURL(kUnreachableWebDataURL), + child2->current_frame_host()->GetSiteInstance()->GetSiteURL()); + } +} + // Ensure that --disable-site-isolation-trials disables field trials. class IsolatedOriginTrialOverrideTest : public IsolatedOriginFieldTrialTest { public:
diff --git a/content/browser/loader/cross_site_document_blocking_browsertest.cc b/content/browser/loader/cross_site_document_blocking_browsertest.cc index f7fcc5e..76e8358a 100644 --- a/content/browser/loader/cross_site_document_blocking_browsertest.cc +++ b/content/browser/loader/cross_site_document_blocking_browsertest.cc
@@ -417,11 +417,23 @@ // jsonp.* - JSONP (i.e., script) mislabeled as a document. // img.* - Contents that won't match the document label. // valid.* - Correctly labeled responses of non-document types. - const char* sniff_allowed_resources[] = { - "js.html", "comment_js.html", "js.xml", "js.json", - "js.txt", "jsonp.html", "jsonp.xml", "jsonp.json", - "jsonp.txt", "img.html", "img.xml", "img.json", - "img.txt", "valid.js", "json-list.js", "nosniff.json-list.js"}; + const char* sniff_allowed_resources[] = {"js.html", + "comment_js.html", + "js.xml", + "js.json", + "js.txt", + "jsonp.html", + "jsonp.xml", + "jsonp.json", + "jsonp.txt", + "img.html", + "img.xml", + "img.json", + "img.txt", + "valid.js", + "json-list.js", + "nosniff.json-list.js", + "js-html-polyglot.html"}; for (const char* resource : sniff_allowed_resources) { SCOPED_TRACE(base::StringPrintf("... while testing page: %s", resource)); base::HistogramTester histograms;
diff --git a/content/browser/media/capture/audio_mirroring_manager_unittest.cc b/content/browser/media/capture/audio_mirroring_manager_unittest.cc index 2d6efe0..a485e46 100644 --- a/content/browser/media/capture/audio_mirroring_manager_unittest.cc +++ b/content/browser/media/capture/audio_mirroring_manager_unittest.cc
@@ -114,7 +114,6 @@ : params_(AudioParameters::AUDIO_FAKE, media::CHANNEL_LAYOUT_STEREO, AudioParameters::kAudioCDSampleRate, - 16, AudioParameters::kAudioCDSampleRate / 10) {} MockDiverter* CreateStream(int render_process_id,
diff --git a/content/browser/media/capture/web_contents_audio_input_stream_unittest.cc b/content/browser/media/capture/web_contents_audio_input_stream_unittest.cc index 147dd466..e0d38421 100644 --- a/content/browser/media/capture/web_contents_audio_input_stream_unittest.cc +++ b/content/browser/media/capture/web_contents_audio_input_stream_unittest.cc
@@ -55,9 +55,8 @@ const AudioParameters& TestAudioParameters() { static const AudioParameters params( - AudioParameters::AUDIO_FAKE, - media::CHANNEL_LAYOUT_STEREO, - AudioParameters::kAudioCDSampleRate, 16, + AudioParameters::AUDIO_FAKE, media::CHANNEL_LAYOUT_STEREO, + AudioParameters::kAudioCDSampleRate, AudioParameters::kAudioCDSampleRate / 100); return params; }
diff --git a/content/browser/media/media_internals_unittest.cc b/content/browser/media/media_internals_unittest.cc index 0dcc32a..a02bcad 100644 --- a/content/browser/media/media_internals_unittest.cc +++ b/content/browser/media/media_internals_unittest.cc
@@ -216,7 +216,7 @@ private: static media::AudioParameters MakeAudioParams() { media::AudioParameters params(media::AudioParameters::AUDIO_PCM_LINEAR, - media::CHANNEL_LAYOUT_MONO, 48000, 16, 128); + media::CHANNEL_LAYOUT_MONO, 48000, 128); params.set_effects(media::AudioParameters::ECHO_CANCELLER | media::AudioParameters::DUCKING); return params;
diff --git a/content/browser/network_service_restart_browsertest.cc b/content/browser/network_service_restart_browsertest.cc index 3e93dfa3..ef0217f 100644 --- a/content/browser/network_service_restart_browsertest.cc +++ b/content/browser/network_service_restart_browsertest.cc
@@ -188,6 +188,22 @@ } // namespace +// TODO(crbug.com/826869): These tests don't have to have Network Service +// enabled and should be merged into 'storage_partition_impl_browsertest.cc'. +class NetworkServiceStoragePartititionBrowsertest : public ContentBrowserTest { + public: + NetworkServiceStoragePartititionBrowsertest() = default; + + GURL GetTestURL() const { + // Use '/echoheader' instead of '/echo' to avoid a disk_cache bug. + // See https://crbug.com/792255. + return embedded_test_server()->GetURL("/echoheader"); + } + + private: + DISALLOW_COPY_AND_ASSIGN(NetworkServiceStoragePartititionBrowsertest); +}; + // This test source has been excluded from Android as Android doesn't have // out-of-process Network Service. class NetworkServiceRestartBrowserTest : public ContentBrowserTest { @@ -577,10 +593,32 @@ } // Make sure the factory getter returned from +// |StoragePartition::GetURLLoaderFactoryForBrowserProcessIOThread()| works. +IN_PROC_BROWSER_TEST_F(NetworkServiceStoragePartititionBrowsertest, + GetURLLoaderFactoryForBrowserProcessIOThread) { + ASSERT_TRUE(embedded_test_server()->Start()); + + base::ScopedAllowBlockingForTesting allow_blocking; + auto shared_url_loader_factory_info = + BrowserContext::GetDefaultStoragePartition( + shell()->web_contents()->GetBrowserContext()) + ->GetURLLoaderFactoryForBrowserProcessIOThread(); + + scoped_refptr<network::SharedURLLoaderFactory> shared_url_loader_factory = + GetSharedFactoryOnIOThread(std::move(shared_url_loader_factory_info)); + + EXPECT_EQ(net::OK, LoadBasicRequestOnIOThread(shared_url_loader_factory.get(), + GetTestURL())); + ReleaseOnIOThread(std::move(shared_url_loader_factory)); +} + +// Make sure the factory getter returned from // |StoragePartition::GetURLLoaderFactoryForBrowserProcessIOThread()| doesn't // crash if it's called after the StoragePartition is deleted. -IN_PROC_BROWSER_TEST_F(NetworkServiceRestartBrowserTest, +IN_PROC_BROWSER_TEST_F(NetworkServiceStoragePartititionBrowsertest, BrowserIOFactoryGetterAfterStoragePartitionGone) { + ASSERT_TRUE(embedded_test_server()->Start()); + base::ScopedAllowBlockingForTesting allow_blocking; std::unique_ptr<ShellBrowserContext> browser_context = std::make_unique<ShellBrowserContext>(true, nullptr); @@ -603,8 +641,10 @@ // Make sure the factory returned from // |StoragePartition::GetURLLoaderFactoryForBrowserProcessIOThread()| doesn't // crash if it's called after the StoragePartition is deleted. -IN_PROC_BROWSER_TEST_F(NetworkServiceRestartBrowserTest, +IN_PROC_BROWSER_TEST_F(NetworkServiceStoragePartititionBrowsertest, BrowserIOFactoryAfterStoragePartitionGone) { + ASSERT_TRUE(embedded_test_server()->Start()); + base::ScopedAllowBlockingForTesting allow_blocking; std::unique_ptr<ShellBrowserContext> browser_context = std::make_unique<ShellBrowserContext>(true, nullptr);
diff --git a/content/browser/picture_in_picture/picture_in_picture_window_controller_impl.cc b/content/browser/picture_in_picture/picture_in_picture_window_controller_impl.cc index 0bc864a4..7795d827 100644 --- a/content/browser/picture_in_picture/picture_in_picture_window_controller_impl.cc +++ b/content/browser/picture_in_picture/picture_in_picture_window_controller_impl.cc
@@ -47,23 +47,16 @@ if (initiator_->IsBeingDestroyed()) return; - content::MediaWebContentsObserver* observer = - static_cast<content::WebContentsImpl* const>(initiator_) - ->media_web_contents_observer(); - DCHECK(observer); - - base::Optional<content::WebContentsObserver::MediaPlayerId> player_id = - observer->GetPictureInPictureVideoMediaPlayerId(); - // |this| is torn down when there is a new Picture-in-Picture initiator, such // as when a video in another tab requests to enter Picture-in-Picture. In // cases like this, pause the current video so there is only one video // playing at a time. - if (player_id.has_value() && observer->IsPlayerActive(*player_id)) { - player_id->first->Send(new MediaPlayerDelegateMsg_Pause( - player_id->first->GetRoutingID(), player_id->second)); - player_id->first->Send(new MediaPlayerDelegateMsg_EndPictureInPictureMode( - player_id->first->GetRoutingID(), player_id->second)); + if (IsPlayerActive()) { + media_player_id_->first->Send(new MediaPlayerDelegateMsg_Pause( + media_player_id_->first->GetRoutingID(), media_player_id_->second)); + media_player_id_->first->Send( + new MediaPlayerDelegateMsg_EndPictureInPictureMode( + media_player_id_->first->GetRoutingID(), media_player_id_->second)); } } @@ -72,9 +65,13 @@ : initiator_(initiator) { DCHECK(initiator_); + media_web_contents_observer_ = static_cast<WebContentsImpl* const>(initiator_) + ->media_web_contents_observer(); + media_player_id_ = + media_web_contents_observer_->GetPictureInPictureVideoMediaPlayerId(); + window_ = - content::GetContentClient()->browser()->CreateWindowForPictureInPicture( - this); + GetContentClient()->browser()->CreateWindowForPictureInPicture(this); DCHECK(window_) << "Picture in Picture requires a valid window."; } @@ -91,16 +88,11 @@ surface_id_ = viz::SurfaceId(); - content::MediaWebContentsObserver* observer = - static_cast<content::WebContentsImpl* const>(initiator_) - ->media_web_contents_observer(); - base::Optional<content::WebContentsObserver::MediaPlayerId> player_id = - observer->GetPictureInPictureVideoMediaPlayerId(); - DCHECK(player_id.has_value()); - - if (observer->IsPlayerActive(*player_id)) - player_id->first->Send(new MediaPlayerDelegateMsg_EndPictureInPictureMode( - player_id->first->GetRoutingID(), player_id->second)); + if (IsPlayerActive()) { + media_player_id_->first->Send( + new MediaPlayerDelegateMsg_EndPictureInPictureMode( + media_player_id_->first->GetRoutingID(), media_player_id_->second)); + } } void PictureInPictureWindowControllerImpl::EmbedSurface( @@ -126,6 +118,14 @@ embedder_->UpdateLayerBounds(); } +bool PictureInPictureWindowControllerImpl::IsPlayerActive() { + if (!media_player_id_.has_value()) + media_web_contents_observer_->GetPictureInPictureVideoMediaPlayerId(); + + return media_player_id_.has_value() && + media_web_contents_observer_->IsPlayerActive(*media_player_id_); +} + WebContents* PictureInPictureWindowControllerImpl::GetInitiatorWebContents() { return initiator_; } @@ -133,21 +133,14 @@ bool PictureInPictureWindowControllerImpl::TogglePlayPause() { DCHECK(window_ && window_->IsActive()); - content::MediaWebContentsObserver* observer = - static_cast<content::WebContentsImpl* const>(initiator_) - ->media_web_contents_observer(); - base::Optional<content::WebContentsObserver::MediaPlayerId> player_id = - observer->GetPictureInPictureVideoMediaPlayerId(); - DCHECK(player_id.has_value()); - - if (observer->IsPlayerActive(*player_id)) { - player_id->first->Send(new MediaPlayerDelegateMsg_Pause( - player_id->first->GetRoutingID(), player_id->second)); + if (IsPlayerActive()) { + media_player_id_->first->Send(new MediaPlayerDelegateMsg_Pause( + media_player_id_->first->GetRoutingID(), media_player_id_->second)); return false; } - player_id->first->Send(new MediaPlayerDelegateMsg_Play( - player_id->first->GetRoutingID(), player_id->second)); + media_player_id_->first->Send(new MediaPlayerDelegateMsg_Play( + media_player_id_->first->GetRoutingID(), media_player_id_->second)); return true; }
diff --git a/content/browser/picture_in_picture/picture_in_picture_window_controller_impl.h b/content/browser/picture_in_picture/picture_in_picture_window_controller_impl.h index 4fb50fd..afb6e11 100644 --- a/content/browser/picture_in_picture/picture_in_picture_window_controller_impl.h +++ b/content/browser/picture_in_picture/picture_in_picture_window_controller_impl.h
@@ -13,6 +13,7 @@ namespace content { class OverlaySurfaceEmbedder; class WebContents; +class MediaWebContentsObserver; // TODO(thakis,mlamouri): PictureInPictureWindowControllerImpl isn't // CONTENT_EXPORT'd because it creates complicated build issues with @@ -39,6 +40,7 @@ const gfx::Size& natural_size) override; CONTENT_EXPORT OverlayWindow* GetWindowForTesting() override; CONTENT_EXPORT void UpdateLayerBounds() override; + CONTENT_EXPORT bool IsPlayerActive() override; CONTENT_EXPORT WebContents* GetInitiatorWebContents() override; CONTENT_EXPORT bool TogglePlayPause() override; @@ -52,7 +54,12 @@ std::unique_ptr<OverlayWindow> window_; std::unique_ptr<OverlaySurfaceEmbedder> embedder_; - content::WebContents* const initiator_; + WebContents* const initiator_; + + // Used to determine the state of the media player and route messages to + // the corresponding media player with id |media_player_id_|. + MediaWebContentsObserver* media_web_contents_observer_; + base::Optional<WebContentsObserver::MediaPlayerId> media_player_id_; viz::SurfaceId surface_id_;
diff --git a/content/browser/renderer_host/browser_compositor_view_mac.h b/content/browser/renderer_host/browser_compositor_view_mac.h index e91eba74..1fbbedd 100644 --- a/content/browser/renderer_host/browser_compositor_view_mac.h +++ b/content/browser/renderer_host/browser_compositor_view_mac.h
@@ -119,12 +119,8 @@ ui::Layer* DelegatedFrameHostGetLayer() const override; bool DelegatedFrameHostIsVisible() const override; SkColor DelegatedFrameHostGetGutterColor() const override; - bool DelegatedFrameCanCreateResizeLock() const override; - std::unique_ptr<CompositorResizeLock> DelegatedFrameHostCreateResizeLock() - override; void OnFirstSurfaceActivation(const viz::SurfaceInfo& surface_info) override; void OnBeginFrame(base::TimeTicks frame_time) override; - bool IsAutoResizeEnabled() const override; void OnFrameTokenChanged(uint32_t frame_token) override; void DidReceiveFirstFrameAfterNavigation() override;
diff --git a/content/browser/renderer_host/browser_compositor_view_mac.mm b/content/browser/renderer_host/browser_compositor_view_mac.mm index 4f09e6d..b83bbad5 100644 --- a/content/browser/renderer_host/browser_compositor_view_mac.mm +++ b/content/browser/renderer_host/browser_compositor_view_mac.mm
@@ -180,7 +180,7 @@ root_layer_.reset(new ui::Layer(ui::LAYER_SOLID_COLOR)); delegated_frame_host_.reset(new DelegatedFrameHost( - frame_sink_id, this, features::IsSurfaceSynchronizationEnabled(), + frame_sink_id, this, base::FeatureList::IsEnabled(features::kVizDisplayCompositor), true /* should_register_frame_sink_id */)); @@ -464,17 +464,6 @@ return client_->BrowserCompositorMacGetGutterColor(); } -bool BrowserCompositorMac::DelegatedFrameCanCreateResizeLock() const { - // Mac uses the RenderWidgetResizeHelper instead of a resize lock. - return false; -} - -std::unique_ptr<CompositorResizeLock> -BrowserCompositorMac::DelegatedFrameHostCreateResizeLock() { - NOTREACHED(); - return nullptr; -} - void BrowserCompositorMac::OnFirstSurfaceActivation( const viz::SurfaceInfo& surface_info) { if (!recyclable_compositor_) @@ -512,11 +501,6 @@ client_->BrowserCompositorMacOnBeginFrame(frame_time); } -bool BrowserCompositorMac::IsAutoResizeEnabled() const { - NOTREACHED(); - return false; -} - void BrowserCompositorMac::OnFrameTokenChanged(uint32_t frame_token) { client_->OnFrameTokenChanged(frame_token); }
diff --git a/content/browser/renderer_host/delegated_frame_host.cc b/content/browser/renderer_host/delegated_frame_host.cc index fabec88c..b9a4883 100644 --- a/content/browser/renderer_host/delegated_frame_host.cc +++ b/content/browser/renderer_host/delegated_frame_host.cc
@@ -11,7 +11,6 @@ #include "base/callback_helpers.h" #include "base/command_line.h" -#include "base/time/default_tick_clock.h" #include "build/build_config.h" #include "cc/base/switches.h" #include "components/viz/common/frame_sinks/copy_output_request.h" @@ -24,7 +23,6 @@ #include "components/viz/service/surfaces/surface_hittest.h" #include "content/browser/compositor/surface_utils.h" #include "content/browser/gpu/compositor_util.h" -#include "content/browser/renderer_host/compositor_resize_lock.h" #include "content/public/common/content_switches.h" #include "third_party/skia/include/core/SkColor.h" #include "ui/gfx/geometry/dip_util.h" @@ -36,15 +34,12 @@ DelegatedFrameHost::DelegatedFrameHost(const viz::FrameSinkId& frame_sink_id, DelegatedFrameHostClient* client, - bool enable_surface_synchronization, bool enable_viz, bool should_register_frame_sink_id) : frame_sink_id_(frame_sink_id), client_(client), - enable_surface_synchronization_(enable_surface_synchronization), enable_viz_(enable_viz), should_register_frame_sink_id_(should_register_frame_sink_id), - tick_clock_(base::DefaultTickClock::GetInstance()), frame_evictor_(std::make_unique<viz::FrameEvictor>(this)) { ImageTransportFactory* factory = ImageTransportFactory::GetInstance(); factory->GetContextFactory()->AddObserver(this); @@ -76,12 +71,6 @@ const ui::LatencyInfo& latency_info) { frame_evictor_->SetVisible(true); - if (!enable_surface_synchronization_ && !HasFallbackSurface() && - !released_front_lock_.get()) { - if (compositor_) - released_front_lock_ = compositor_->GetCompositorLock(nullptr); - } - if (compositor_) compositor_->SetLatencyInfo(latency_info); @@ -98,34 +87,6 @@ void DelegatedFrameHost::WasHidden() { frame_evictor_->SetVisible(false); - released_front_lock_ = nullptr; -} - -void DelegatedFrameHost::MaybeCreateResizeLock() { - DCHECK(!resize_lock_); - - if (!compositor_) - return; - - if (base::CommandLine::ForCurrentProcess()->HasSwitch( - switches::kDisableResizeLock)) - return; - - if (!HasFallbackSurface()) - return; - - if (!client_->DelegatedFrameCanCreateResizeLock()) - return; - - gfx::Size desired_size = pending_surface_dip_size_; - if (desired_size.IsEmpty()) - return; - if (desired_size == current_frame_size_in_dip_) - return; - - resize_lock_ = client_->DelegatedFrameHostCreateResizeLock(); - bool locked = resize_lock_->Lock(); - DCHECK(locked); } void DelegatedFrameHost::CopyFromCompositingSurface( @@ -254,18 +215,6 @@ return fallback_surface_id && fallback_surface_id->is_valid(); } -bool DelegatedFrameHost::ShouldSkipFrame(const gfx::Size& size_in_dip) { - if (!resize_lock_) - return false; - // Allow a single renderer frame through even though there's a resize lock - // currently in place. - if (allow_one_renderer_frame_during_resize_lock_) { - allow_one_renderer_frame_during_resize_lock_ = false; - return false; - } - return size_in_dip != resize_lock_->expected_size(); -} - void DelegatedFrameHost::SynchronizeVisualProperties( const viz::LocalSurfaceId& new_pending_local_surface_id, const gfx::Size& new_pending_dip_size, @@ -276,66 +225,48 @@ pending_local_surface_id_ = new_pending_local_surface_id; pending_surface_dip_size_ = new_pending_dip_size; - if (enable_surface_synchronization_) { - if (!client_->DelegatedFrameHostIsVisible()) { - // If the tab is resized while hidden, reset the fallback so that the next - // time user switches back to it the page is blank. This is preferred to - // showing contents of old size. Don't call EvictDelegatedFrame to avoid - // races when dragging tabs across displays. See https://crbug.com/813157. - if (pending_surface_dip_size_ != current_frame_size_in_dip_ && - HasFallbackSurface()) { - client_->DelegatedFrameHostGetLayer()->SetFallbackSurfaceId( - viz::SurfaceId()); - } - // Don't update the SurfaceLayer when invisible to avoid blocking on - // renderers that do not submit CompositorFrames. Next time the renderer - // is visible, SynchronizeVisualProperties will be called again. See - // WasShown. - return; + if (!client_->DelegatedFrameHostIsVisible()) { + // If the tab is resized while hidden, reset the fallback so that the next + // time user switches back to it the page is blank. This is preferred to + // showing contents of old size. Don't call EvictDelegatedFrame to avoid + // races when dragging tabs across displays. See https://crbug.com/813157. + if (pending_surface_dip_size_ != current_frame_size_in_dip_ && + HasFallbackSurface()) { + client_->DelegatedFrameHostGetLayer()->SetFallbackSurfaceId( + viz::SurfaceId()); } - - if (!primary_surface_id || - primary_surface_id->local_surface_id() != pending_local_surface_id_) { - current_frame_size_in_dip_ = pending_surface_dip_size_; - - viz::SurfaceId surface_id(frame_sink_id_, pending_local_surface_id_); -#if defined(OS_WIN) || defined(USE_X11) - // On Windows and Linux, we would like to produce new content as soon as - // possible or the OS will create an additional black gutter. Until we can - // block resize on surface synchronization on these platforms, we will not - // block UI on the top-level renderer. The exception to this is if we're - // using an infinite deadline, in which case we should respect the - // specified deadline and block UI since that's what was requested. - if (deadline_policy.policy_type() != - cc::DeadlinePolicy::kUseInfiniteDeadline) { - deadline_policy = cc::DeadlinePolicy::UseSpecifiedDeadline(0u); - } -#endif - client_->DelegatedFrameHostGetLayer()->SetShowPrimarySurface( - surface_id, current_frame_size_in_dip_, GetGutterColor(), - deadline_policy, false /* stretch_content_to_fill_bounds */); - if (compositor_ && !base::CommandLine::ForCurrentProcess()->HasSwitch( - switches::kDisableResizeLock)) { - compositor_->OnChildResizing(); - } - } - - // Input throttling and guttering are handled differently when surface - // synchronization is enabled so exit early here. + // Don't update the SurfaceLayer when invisible to avoid blocking on + // renderers that do not submit CompositorFrames. Next time the renderer + // is visible, SynchronizeVisualProperties will be called again. See + // WasShown. return; } - if (pending_surface_dip_size_ != current_frame_size_in_dip_ && - !client_->DelegatedFrameHostIsVisible()) { - EvictDelegatedFrame(); - } + if (!primary_surface_id || + primary_surface_id->local_surface_id() != pending_local_surface_id_) { + current_frame_size_in_dip_ = pending_surface_dip_size_; - // If |create_resize_lock_after_commit_| is true, we're waiting to recreate - // an expired resize lock after the next UI frame is submitted, so don't - // make a lock here. - if (!resize_lock_ && !create_resize_lock_after_commit_) - MaybeCreateResizeLock(); - UpdateGutters(); + viz::SurfaceId surface_id(frame_sink_id_, pending_local_surface_id_); +#if defined(OS_WIN) || defined(USE_X11) + // On Windows and Linux, we would like to produce new content as soon as + // possible or the OS will create an additional black gutter. Until we can + // block resize on surface synchronization on these platforms, we will not + // block UI on the top-level renderer. The exception to this is if we're + // using an infinite deadline, in which case we should respect the + // specified deadline and block UI since that's what was requested. + if (deadline_policy.policy_type() != + cc::DeadlinePolicy::kUseInfiniteDeadline) { + deadline_policy = cc::DeadlinePolicy::UseSpecifiedDeadline(0u); + } +#endif + client_->DelegatedFrameHostGetLayer()->SetShowPrimarySurface( + surface_id, current_frame_size_in_dip_, GetGutterColor(), + deadline_policy, false /* stretch_content_to_fill_bounds */); + if (compositor_ && !base::CommandLine::ForCurrentProcess()->HasSwitch( + switches::kDisableResizeLock)) { + compositor_->OnChildResizing(); + } + } } SkColor DelegatedFrameHost::GetGutterColor() const { @@ -345,57 +276,8 @@ return client_->DelegatedFrameHostGetGutterColor(); } -void DelegatedFrameHost::UpdateGutters() { - if (!HasFallbackSurface() || enable_surface_synchronization_) { - right_gutter_.reset(); - bottom_gutter_.reset(); - return; - } - - gfx::Size size_in_dip = pending_surface_dip_size_; - if (current_frame_size_in_dip_.width() < size_in_dip.width()) { - right_gutter_.reset(new ui::Layer(ui::LAYER_SOLID_COLOR)); - right_gutter_->SetColor(GetGutterColor()); - int width = size_in_dip.width() - current_frame_size_in_dip_.width(); - // The right gutter also includes the bottom-right corner, if necessary. - int height = size_in_dip.height(); - right_gutter_->SetBounds( - gfx::Rect(current_frame_size_in_dip_.width(), 0, width, height)); - - client_->DelegatedFrameHostGetLayer()->Add(right_gutter_.get()); - } else { - right_gutter_.reset(); - } - - if (current_frame_size_in_dip_.height() < size_in_dip.height()) { - bottom_gutter_.reset(new ui::Layer(ui::LAYER_SOLID_COLOR)); - bottom_gutter_->SetColor(GetGutterColor()); - int width = current_frame_size_in_dip_.width(); - int height = size_in_dip.height() - current_frame_size_in_dip_.height(); - bottom_gutter_->SetBounds( - gfx::Rect(0, current_frame_size_in_dip_.height(), width, height)); - client_->DelegatedFrameHostGetLayer()->Add(bottom_gutter_.get()); - } else { - bottom_gutter_.reset(); - } -} - gfx::Size DelegatedFrameHost::GetRequestedRendererSize() const { - if (resize_lock_) - return resize_lock_->expected_size(); - else - return pending_surface_dip_size_; -} - -void DelegatedFrameHost::CheckResizeLock() { - if (!resize_lock_ || - resize_lock_->expected_size() != current_frame_size_in_dip_) - return; - - // Since we got the size we were looking for, unlock the compositor. But delay - // the release of the lock until we've kicked a frame with the new texture, to - // avoid resizing the UI before we have a chance to draw a "good" frame. - resize_lock_->UnlockCompositor(); + return pending_surface_dip_size_; } void DelegatedFrameHost::DidCreateNewRendererCompositorFrameSink( @@ -409,54 +291,6 @@ const viz::LocalSurfaceId& local_surface_id, viz::CompositorFrame frame, viz::mojom::HitTestRegionListPtr hit_test_region_list) { -#if defined(OS_CHROMEOS) - DCHECK(!resize_lock_ || !client_->IsAutoResizeEnabled()); -#endif - float frame_device_scale_factor = frame.metadata.device_scale_factor; - viz::BeginFrameAck ack(frame.metadata.begin_frame_ack); - - DCHECK(!frame.render_pass_list.empty()); - - viz::RenderPass* root_pass = frame.render_pass_list.back().get(); - - gfx::Size frame_size = root_pass->output_rect.size(); - gfx::Size frame_size_in_dip = - gfx::ConvertSizeToDIP(frame_device_scale_factor, frame_size); - - if (ShouldSkipFrame(frame_size_in_dip)) { - std::vector<viz::ReturnedResource> resources = - viz::TransferableResource::ReturnResources(frame.resource_list); - - skipped_latency_info_list_.insert(skipped_latency_info_list_.end(), - frame.metadata.latency_info.begin(), - frame.metadata.latency_info.end()); - - renderer_compositor_frame_sink_->DidReceiveCompositorFrameAck(resources); - - skipped_frames_ = true; - ack.has_damage = false; - DidNotProduceFrame(ack); - return; - } - - // If we are allowing one renderer frame through, this would ensure the frame - // gets through even if we regrab the lock after the UI compositor makes one - // frame. If the renderer frame beats the UI compositor, then we don't need to - // allow any more, though. - allow_one_renderer_frame_during_resize_lock_ = false; - - if (skipped_frames_) { - skipped_frames_ = false; - - // Give the same damage rect to the compositor. - root_pass->damage_rect = gfx::Rect(frame_size); - } - - frame.metadata.latency_info.insert(frame.metadata.latency_info.end(), - skipped_latency_info_list_.begin(), - skipped_latency_info_list_.end()); - skipped_latency_info_list_.clear(); - // If surface synchronization is off, then OnFirstSurfaceActivation will be // called in the same call stack. support_->SubmitCompositorFrame(local_surface_id, std::move(frame), @@ -468,7 +302,6 @@ // content. This will result in a white flash if we switch back to this // content. // https://crbug.com/739621 - released_front_lock_.reset(); EvictDelegatedFrame(); } @@ -503,51 +336,42 @@ void DelegatedFrameHost::OnFirstSurfaceActivation( const viz::SurfaceInfo& surface_info) { - gfx::Size frame_size_in_dip = gfx::ConvertSizeToDIP( - surface_info.device_scale_factor(), surface_info.size_in_pixels()); - if (enable_surface_synchronization_) { - // If this is the first Surface created after navigation, notify |client_|. - // If the Surface was created before navigation, drop it. - uint32_t parent_sequence_number = - surface_info.id().local_surface_id().parent_sequence_number(); - uint32_t latest_parent_sequence_number = - pending_local_surface_id_.parent_sequence_number(); - // If |latest_parent_sequence_number| is less than - // |first_parent_sequence_number_after_navigation_|, then the parent id has - // wrapped around. Make sure that case is covered. - if (parent_sequence_number >= - first_parent_sequence_number_after_navigation_ || - (latest_parent_sequence_number < - first_parent_sequence_number_after_navigation_ && - parent_sequence_number <= latest_parent_sequence_number)) { - if (!received_frame_after_navigation_) { - received_frame_after_navigation_ = true; - client_->DidReceiveFirstFrameAfterNavigation(); - } - } else { - ImageTransportFactory* factory = ImageTransportFactory::GetInstance(); - viz::HostFrameSinkManager* host_frame_sink_manager = - factory->GetContextFactoryPrivate()->GetHostFrameSinkManager(); - host_frame_sink_manager->DropTemporaryReference(surface_info.id()); - return; - } - - // If there's no primary surface, then we don't wish to display content at - // this time (e.g. the view is hidden) and so we don't need a fallback - // surface either. Since we won't use the fallback surface, we drop the - // temporary reference here to save resources. - if (!HasPrimarySurface()) { - ImageTransportFactory* factory = ImageTransportFactory::GetInstance(); - viz::HostFrameSinkManager* host_frame_sink_manager = - factory->GetContextFactoryPrivate()->GetHostFrameSinkManager(); - host_frame_sink_manager->DropTemporaryReference(surface_info.id()); - return; + // If this is the first Surface created after navigation, notify |client_|. + // If the Surface was created before navigation, drop it. + uint32_t parent_sequence_number = + surface_info.id().local_surface_id().parent_sequence_number(); + uint32_t latest_parent_sequence_number = + pending_local_surface_id_.parent_sequence_number(); + // If |latest_parent_sequence_number| is less than + // |first_parent_sequence_number_after_navigation_|, then the parent id has + // wrapped around. Make sure that case is covered. + if (parent_sequence_number >= + first_parent_sequence_number_after_navigation_ || + (latest_parent_sequence_number < + first_parent_sequence_number_after_navigation_ && + parent_sequence_number <= latest_parent_sequence_number)) { + if (!received_frame_after_navigation_) { + received_frame_after_navigation_ = true; + client_->DidReceiveFirstFrameAfterNavigation(); } } else { - client_->DelegatedFrameHostGetLayer()->SetShowPrimarySurface( - surface_info.id(), frame_size_in_dip, GetGutterColor(), - cc::DeadlinePolicy::UseDefaultDeadline(), - false /* stretch_content_to_fill_bounds */); + ImageTransportFactory* factory = ImageTransportFactory::GetInstance(); + viz::HostFrameSinkManager* host_frame_sink_manager = + factory->GetContextFactoryPrivate()->GetHostFrameSinkManager(); + host_frame_sink_manager->DropTemporaryReference(surface_info.id()); + return; + } + + // If there's no primary surface, then we don't wish to display content at + // this time (e.g. the view is hidden) and so we don't need a fallback + // surface either. Since we won't use the fallback surface, we drop the + // temporary reference here to save resources. + if (!HasPrimarySurface()) { + ImageTransportFactory* factory = ImageTransportFactory::GetInstance(); + viz::HostFrameSinkManager* host_frame_sink_manager = + factory->GetContextFactoryPrivate()->GetHostFrameSinkManager(); + host_frame_sink_manager->DropTemporaryReference(surface_info.id()); + return; } client_->DelegatedFrameHostGetLayer()->SetFallbackSurfaceId( @@ -555,16 +379,6 @@ active_local_surface_id_ = surface_info.id().local_surface_id(); active_device_scale_factor_ = surface_info.device_scale_factor(); - // Surface synchronization deals with resizes in - // SynchronizeVisualProperties(). - if (!enable_surface_synchronization_) { - released_front_lock_ = nullptr; - current_frame_size_in_dip_ = frame_size_in_dip; - CheckResizeLock(); - - UpdateGutters(); - } - // This is used by macOS' unique resize path. client_->OnFirstSurfaceActivation(surface_info); @@ -593,15 +407,9 @@ // It is possible that we are embedding the contents of previous // DelegatedFrameHost. In this case, HasSavedFrame() will return false but we // still need to clear the layer. - if (enable_surface_synchronization_) { - if (HasFallbackSurface()) { - client_->DelegatedFrameHostGetLayer()->SetFallbackSurfaceId( - viz::SurfaceId()); - } - } else { - client_->DelegatedFrameHostGetLayer()->SetShowSolidColorContent(); - resize_lock_.reset(); - UpdateGutters(); + if (HasFallbackSurface()) { + client_->DelegatedFrameHostGetLayer()->SetFallbackSurfaceId( + viz::SurfaceId()); } if (!HasSavedFrame()) @@ -615,21 +423,6 @@ // DelegatedFrameHost, ui::CompositorObserver implementation: void DelegatedFrameHost::OnCompositingDidCommit(ui::Compositor* compositor) { - // If |create_resize_lock_after_commit_| then we should have popped the old - // lock already. - DCHECK(!resize_lock_ || !create_resize_lock_after_commit_); - - if (resize_lock_ && - resize_lock_->expected_size() == current_frame_size_in_dip_) { - resize_lock_.reset(); - // We had a lock but the UI may have resized in the meantime. - create_resize_lock_after_commit_ = true; - } - - if (create_resize_lock_after_commit_) { - create_resize_lock_after_commit_ = false; - MaybeCreateResizeLock(); - } } void DelegatedFrameHost::OnCompositingStarted(ui::Compositor* compositor, @@ -639,22 +432,6 @@ void DelegatedFrameHost::OnCompositingLockStateChanged( ui::Compositor* compositor) { - if (resize_lock_ && resize_lock_->timed_out()) { - // A compositor lock that is part of a resize lock timed out. We allow - // the UI to produce a frame before locking it again, so we don't lock here. - // We release the |resize_lock_| though to allow any other resizes that are - // desired at the same time since we're allowing the UI to make a frame - // which will gutter anyways. - resize_lock_.reset(); - create_resize_lock_after_commit_ = true; - // Because this timed out, we're going to allow the UI to update and lock - // again. We would allow renderer frames through during this time if they - // came late, but would stop them again once the UI finished its frame. We - // want to allow the slow renderer to show us one frame even if its wrong - // since we're guttering anyways, but not unlimited number of frames as that - // would be a waste of power. - allow_one_renderer_frame_during_resize_lock_ = true; - } } void DelegatedFrameHost::OnCompositingChildResizing( @@ -689,7 +466,6 @@ void DelegatedFrameHost::ResetCompositor() { if (!compositor_) return; - resize_lock_.reset(); if (compositor_->HasObserver(this)) compositor_->RemoveObserver(this); if (should_register_frame_sink_id_) @@ -765,10 +541,6 @@ } client_->DelegatedFrameHostGetLayer()->SetFallbackSurfaceId( *other->client_->DelegatedFrameHostGetLayer()->GetFallbackSurfaceId()); - if (!enable_surface_synchronization_) { - current_frame_size_in_dip_ = other->current_frame_size_in_dip_; - UpdateGutters(); - } } } // namespace content
diff --git a/content/browser/renderer_host/delegated_frame_host.h b/content/browser/renderer_host/delegated_frame_host.h index b48bf45..c4fad688 100644 --- a/content/browser/renderer_host/delegated_frame_host.h +++ b/content/browser/renderer_host/delegated_frame_host.h
@@ -27,10 +27,6 @@ #include "ui/events/event.h" #include "ui/gfx/geometry/rect_conversions.h" -namespace base { -class TickClock; -} - namespace viz { class CompositorFrameSinkSupport; } @@ -38,7 +34,6 @@ namespace content { class DelegatedFrameHost; -class CompositorResizeLock; // The DelegatedFrameHostClient is the interface from the DelegatedFrameHost, // which manages delegated frames, and the ui::Compositor being used to @@ -53,14 +48,9 @@ // Returns the color that the resize gutters should be drawn with. virtual SkColor DelegatedFrameHostGetGutterColor() const = 0; - virtual bool DelegatedFrameCanCreateResizeLock() const = 0; - virtual std::unique_ptr<CompositorResizeLock> - DelegatedFrameHostCreateResizeLock() = 0; - virtual void OnFirstSurfaceActivation( const viz::SurfaceInfo& surface_info) = 0; virtual void OnBeginFrame(base::TimeTicks frame_time) = 0; - virtual bool IsAutoResizeEnabled() const = 0; virtual void OnFrameTokenChanged(uint32_t frame_token) = 0; virtual void DidReceiveFirstFrameAfterNavigation() = 0; }; @@ -82,7 +72,6 @@ // responsible for doing the appropriate [un]registration. DelegatedFrameHost(const viz::FrameSinkId& frame_sink_id, DelegatedFrameHostClient* client, - bool enable_surface_synchronization, bool enable_viz, bool should_register_frame_sink_id); ~DelegatedFrameHost() override; @@ -187,9 +176,6 @@ void OnCompositingDidCommitForTesting(ui::Compositor* compositor) { OnCompositingDidCommit(compositor); } - bool ReleasedFrontLockActiveForTesting() const { - return !!released_front_lock_.get(); - } gfx::Size CurrentFrameSizeInDipForTesting() const { return current_frame_size_in_dip_; @@ -215,21 +201,8 @@ void LockResources(); void UnlockResources(); - bool ShouldSkipFrame(const gfx::Size& size_in_dip); - - // Lazily grab a resize lock if the aura window size doesn't match the current - // frame size, to give time to the renderer. - void MaybeCreateResizeLock(); - - // Checks if the resize lock can be released because we received an new frame. - void CheckResizeLock(); - SkColor GetGutterColor() const; - // Update the layers for the resize gutters to the right and bottom of the - // surface layer. - void UpdateGutters(); - void CreateCompositorFrameSinkSupport(); void ResetCompositorFrameSinkSupport(); @@ -238,7 +211,6 @@ const viz::FrameSinkId frame_sink_id_; DelegatedFrameHostClient* const client_; - const bool enable_surface_synchronization_; const bool enable_viz_; const bool should_register_frame_sink_id_; ui::Compositor* compositor_ = nullptr; @@ -262,36 +234,12 @@ // TODO(ccameron): The meaning of "current" should be made more clear here. gfx::Size current_frame_size_in_dip_; - // Overridable tick clock used for testing functions using current time. - const base::TickClock* tick_clock_; - - // True after a delegated frame has been skipped, until a frame is not - // skipped. - bool skipped_frames_ = false; - std::vector<ui::LatencyInfo> skipped_latency_info_list_; - - std::unique_ptr<ui::Layer> right_gutter_; - std::unique_ptr<ui::Layer> bottom_gutter_; - // This is the last root background color from a swapped frame. SkColor background_color_; // State for rendering into a Surface. std::unique_ptr<viz::CompositorFrameSinkSupport> support_; - // This lock is the one waiting for a frame of the right size to come back - // from the renderer/GPU process. It is set from the moment the aura window - // got resized, to the moment we committed the renderer frame of the same - // size. It keeps track of the size we expect from the renderer, and locks the - // compositor, as well as the UI for a short time to give a chance to the - // renderer of producing a frame of the right size. - std::unique_ptr<CompositorResizeLock> resize_lock_; - bool create_resize_lock_after_commit_ = false; - bool allow_one_renderer_frame_during_resize_lock_ = false; - - // This lock is for waiting for a front surface to become available to draw. - std::unique_ptr<ui::CompositorLock> released_front_lock_; - bool needs_begin_frame_ = false; viz::mojom::CompositorFrameSinkClient* renderer_compositor_frame_sink_ =
diff --git a/content/browser/renderer_host/delegated_frame_host_client_aura.cc b/content/browser/renderer_host/delegated_frame_host_client_aura.cc index 849ee1f..ae82cc4 100644 --- a/content/browser/renderer_host/delegated_frame_host_client_aura.cc +++ b/content/browser/renderer_host/delegated_frame_host_client_aura.cc
@@ -40,33 +40,6 @@ return render_widget_host_view_->background_color_; } -bool DelegatedFrameHostClientAura::DelegatedFrameCanCreateResizeLock() const { -#if !defined(OS_CHROMEOS) - // On Windows and Linux, holding pointer moves will not help throttling - // resizes. - // TODO(piman): on Windows we need to block (nested run loop?) the - // WM_SIZE event. On Linux we need to throttle at the WM level using - // _NET_WM_SYNC_REQUEST. - return false; -#else - if (!render_widget_host_view_->host_->renderer_initialized() || - render_widget_host_view_->host_->auto_resize_enabled()) { - return false; - } - return true; -#endif -} - -std::unique_ptr<CompositorResizeLock> -DelegatedFrameHostClientAura::DelegatedFrameHostCreateResizeLock() { - // Pointer moves are released when the CompositorResizeLock ends. - auto* host = render_widget_host_view_->window_->GetHost(); - host->dispatcher()->HoldPointerMoves(); - - gfx::Size desired_size = render_widget_host_view_->window_->bounds().size(); - return std::make_unique<CompositorResizeLock>(this, desired_size); -} - void DelegatedFrameHostClientAura::OnFirstSurfaceActivation( const viz::SurfaceInfo& surface_info) {} @@ -74,10 +47,6 @@ render_widget_host_view_->OnBeginFrame(frame_time); } -bool DelegatedFrameHostClientAura::IsAutoResizeEnabled() const { - return render_widget_host_view_->host_->auto_resize_enabled(); -} - void DelegatedFrameHostClientAura::OnFrameTokenChanged(uint32_t frame_token) { render_widget_host_view_->OnFrameTokenChangedForView(frame_token); }
diff --git a/content/browser/renderer_host/delegated_frame_host_client_aura.h b/content/browser/renderer_host/delegated_frame_host_client_aura.h index 0fcd7a4..9af64eb 100644 --- a/content/browser/renderer_host/delegated_frame_host_client_aura.h +++ b/content/browser/renderer_host/delegated_frame_host_client_aura.h
@@ -32,12 +32,8 @@ ui::Layer* DelegatedFrameHostGetLayer() const override; bool DelegatedFrameHostIsVisible() const override; SkColor DelegatedFrameHostGetGutterColor() const override; - bool DelegatedFrameCanCreateResizeLock() const override; - std::unique_ptr<CompositorResizeLock> DelegatedFrameHostCreateResizeLock() - override; void OnFirstSurfaceActivation(const viz::SurfaceInfo& surface_info) override; void OnBeginFrame(base::TimeTicks frame_time) override; - bool IsAutoResizeEnabled() const override; void OnFrameTokenChanged(uint32_t frame_token) override; void DidReceiveFirstFrameAfterNavigation() override;
diff --git a/content/browser/renderer_host/media/audio_output_authorization_handler_unittest.cc b/content/browser/renderer_host/media/audio_output_authorization_handler_unittest.cc index eccbda5..59faea3 100644 --- a/content/browser/renderer_host/media/audio_output_authorization_handler_unittest.cc +++ b/content/browser/renderer_host/media/audio_output_authorization_handler_unittest.cc
@@ -48,24 +48,20 @@ // TestBrowserContext has a URLRequestContextGetter which uses a NullTaskRunner. // This causes it to be destroyed on the wrong thread. This BrowserContext -// instead uses the IO thread task runner for the URLRequestContextGetter. -class TestBrowserContextWithRealURLRequestContextGetter +// instead returns nullptr since it's not required by the test. +class TestBrowserContextWithoutURLRequestContextGetter : public TestBrowserContext { public: - TestBrowserContextWithRealURLRequestContextGetter() { - request_context_ = - base::MakeRefCounted<net::TrivialURLRequestContextGetter>( - &context_, - BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); + TestBrowserContextWithoutURLRequestContextGetter() { salt_ = TestBrowserContext::GetMediaDeviceIDSalt(); } - ~TestBrowserContextWithRealURLRequestContextGetter() override {} + ~TestBrowserContextWithoutURLRequestContextGetter() override {} net::URLRequestContextGetter* CreateRequestContext( ProtocolHandlerMap* protocol_handlers, URLRequestInterceptorScopedVector request_interceptors) override { - return request_context_.get(); + return nullptr; } std::string GetMediaDeviceIDSalt() override { return salt_; } @@ -73,8 +69,6 @@ void set_media_device_id_salt(std::string salt) { salt_ = std::move(salt); } private: - net::TestURLRequestContext context_; - scoped_refptr<net::URLRequestContextGetter> request_context_; std::string salt_; }; @@ -96,7 +90,7 @@ BrowserContext* CreateBrowserContext() override { // Caller takes ownership. - return new TestBrowserContextWithRealURLRequestContextGetter(); + return new TestBrowserContextWithoutURLRequestContextGetter(); } void SetUp() override { @@ -411,7 +405,7 @@ // Reset the salt and expect authorization of the device ID hashed with // the old salt to fail. auto* context = - static_cast<TestBrowserContextWithRealURLRequestContextGetter*>( + static_cast<TestBrowserContextWithoutURLRequestContextGetter*>( browser_context()); context->set_media_device_id_salt("new salt"); EXPECT_CALL(listener, Run(media::OUTPUT_DEVICE_STATUS_ERROR_NOT_FOUND, _, _,
diff --git a/content/browser/renderer_host/media/media_devices_manager_unittest.cc b/content/browser/renderer_host/media/media_devices_manager_unittest.cc index b447591d..761b26e 100644 --- a/content/browser/renderer_host/media/media_devices_manager_unittest.cc +++ b/content/browser/renderer_host/media/media_devices_manager_unittest.cc
@@ -91,13 +91,13 @@ media::AudioParameters GetDefaultOutputStreamParameters() override { return media::AudioParameters(media::AudioParameters::AUDIO_PCM_LOW_LATENCY, - media::CHANNEL_LAYOUT_STEREO, 48000, 16, 128); + media::CHANNEL_LAYOUT_STEREO, 48000, 128); } media::AudioParameters GetOutputStreamParameters( const std::string& device_id) override { return media::AudioParameters(media::AudioParameters::AUDIO_PCM_LOW_LATENCY, - media::CHANNEL_LAYOUT_STEREO, 48000, 16, 128); + media::CHANNEL_LAYOUT_STEREO, 48000, 128); } void SetNumAudioOutputDevices(size_t num_devices) {
diff --git a/content/browser/renderer_host/media/media_stream_manager.cc b/content/browser/renderer_host/media/media_stream_manager.cc index c45c089..366ad60 100644 --- a/content/browser/renderer_host/media/media_stream_manager.cc +++ b/content/browser/renderer_host/media/media_stream_manager.cc
@@ -1597,9 +1597,9 @@ if (sample_rate <= 0 || sample_rate > 96000) sample_rate = 44100; - media::AudioParameters params( - device.input.format(), media::CHANNEL_LAYOUT_STEREO, sample_rate, - device.input.bits_per_sample(), device.input.frames_per_buffer()); + media::AudioParameters params(device.input.format(), + media::CHANNEL_LAYOUT_STEREO, sample_rate, + device.input.frames_per_buffer()); params.set_effects(device.input.effects()); params.set_mic_positions(device.input.mic_positions()); DCHECK(params.IsValid());
diff --git a/content/browser/renderer_host/media/media_stream_manager_unittest.cc b/content/browser/renderer_host/media/media_stream_manager_unittest.cc index 5eb15845..fe58e21 100644 --- a/content/browser/renderer_host/media/media_stream_manager_unittest.cc +++ b/content/browser/renderer_host/media/media_stream_manager_unittest.cc
@@ -108,13 +108,13 @@ media::AudioParameters GetDefaultOutputStreamParameters() override { return media::AudioParameters(media::AudioParameters::AUDIO_PCM_LOW_LATENCY, - media::CHANNEL_LAYOUT_STEREO, 48000, 16, 128); + media::CHANNEL_LAYOUT_STEREO, 48000, 128); } media::AudioParameters GetOutputStreamParameters( const std::string& device_id) override { return media::AudioParameters(media::AudioParameters::AUDIO_PCM_LOW_LATENCY, - media::CHANNEL_LAYOUT_STEREO, 48000, 16, 128); + media::CHANNEL_LAYOUT_STEREO, 48000, 128); } void SetNumAudioOutputDevices(size_t num_devices) {
diff --git a/content/browser/renderer_host/media/render_frame_audio_input_stream_factory_unittest.cc b/content/browser/renderer_host/media/render_frame_audio_input_stream_factory_unittest.cc index 135e6c4..c44f5ad 100644 --- a/content/browser/renderer_host/media/render_frame_audio_input_stream_factory_unittest.cc +++ b/content/browser/renderer_host/media/render_frame_audio_input_stream_factory_unittest.cc
@@ -39,7 +39,6 @@ const bool kAGC = false; const uint32_t kSharedMemoryCount = 345; const int kSampleFrequency = 44100; -const int kBitsPerSample = 16; const int kSamplesPerBuffer = kSampleFrequency / 100; const bool kInitiallyMuted = false; const int kRenderProcessID = -1; @@ -48,7 +47,7 @@ media::AudioParameters GetTestAudioParameters() { return media::AudioParameters(media::AudioParameters::AUDIO_PCM_LOW_LATENCY, media::CHANNEL_LAYOUT_MONO, kSampleFrequency, - kBitsPerSample, kSamplesPerBuffer); + kSamplesPerBuffer); } class FakeAudioInputDelegate : public media::AudioInputDelegate {
diff --git a/content/browser/renderer_host/media/render_frame_audio_output_stream_factory_unittest.cc b/content/browser/renderer_host/media/render_frame_audio_output_stream_factory_unittest.cc index e0961f9..6d8e16e 100644 --- a/content/browser/renderer_host/media/render_frame_audio_output_stream_factory_unittest.cc +++ b/content/browser/renderer_host/media/render_frame_audio_output_stream_factory_unittest.cc
@@ -54,14 +54,13 @@ const int kRenderProcessId = 42; const int kRenderFrameId = 24; const int kSampleFrequency = 44100; -const int kBitsPerSample = 16; const int kSamplesPerBuffer = kSampleFrequency / 100; const char kSalt[] = "salt"; media::AudioParameters GetTestAudioParameters() { return media::AudioParameters(media::AudioParameters::AUDIO_PCM_LOW_LATENCY, media::CHANNEL_LAYOUT_MONO, kSampleFrequency, - kBitsPerSample, kSamplesPerBuffer); + kSamplesPerBuffer); } class MockAudioOutputDelegate : public media::AudioOutputDelegate {
diff --git a/content/browser/renderer_host/media/service_video_capture_device_launcher_unittest.cc b/content/browser/renderer_host/media/service_video_capture_device_launcher_unittest.cc index aa6c203..f54b3f57 100644 --- a/content/browser/renderer_host/media/service_video_capture_device_launcher_unittest.cc +++ b/content/browser/renderer_host/media/service_video_capture_device_launcher_unittest.cc
@@ -37,11 +37,18 @@ DoGetDeviceInfos(callback); } - void AddVirtualDevice(const media::VideoCaptureDeviceInfo& device_info, - video_capture::mojom::ProducerPtr producer, - video_capture::mojom::VirtualDeviceRequest - virtual_device_request) override { - DoAddVirtualDevice(device_info, producer.get(), &virtual_device_request); + void AddSharedMemoryVirtualDevice( + const media::VideoCaptureDeviceInfo& device_info, + video_capture::mojom::ProducerPtr producer, + video_capture::mojom::SharedMemoryVirtualDeviceRequest virtual_device) + override { + DoAddVirtualDevice(device_info, producer.get(), &virtual_device); + } + + void AddTextureVirtualDevice(const media::VideoCaptureDeviceInfo& device_info, + video_capture::mojom::TextureVirtualDeviceRequest + virtual_device) override { + NOTIMPLEMENTED(); } MOCK_METHOD1(DoGetDeviceInfos, void(GetDeviceInfosCallback& callback)); @@ -49,11 +56,11 @@ void(const std::string& device_id, video_capture::mojom::DeviceRequest* device_request, CreateDeviceCallback& callback)); - MOCK_METHOD3( - DoAddVirtualDevice, - void(const media::VideoCaptureDeviceInfo& device_info, - video_capture::mojom::ProducerProxy* producer, - video_capture::mojom::VirtualDeviceRequest* virtual_device_request)); + MOCK_METHOD3(DoAddVirtualDevice, + void(const media::VideoCaptureDeviceInfo& device_info, + video_capture::mojom::ProducerProxy* producer, + video_capture::mojom::SharedMemoryVirtualDeviceRequest* + virtual_device_request)); }; class MockVideoCaptureDeviceLauncherCallbacks
diff --git a/content/browser/renderer_host/media/service_video_capture_provider_unittest.cc b/content/browser/renderer_host/media/service_video_capture_provider_unittest.cc index d1dc91e..6a683e5 100644 --- a/content/browser/renderer_host/media/service_video_capture_provider_unittest.cc +++ b/content/browser/renderer_host/media/service_video_capture_provider_unittest.cc
@@ -59,11 +59,17 @@ CreateDeviceCallback callback) override { DoCreateDevice(device_id, &device_request, callback); } - void AddVirtualDevice(const media::VideoCaptureDeviceInfo& device_info, - video_capture::mojom::ProducerPtr producer, - video_capture::mojom::VirtualDeviceRequest - virtual_device_request) override { - DoAddVirtualDevice(device_info, producer.get(), &virtual_device_request); + void AddSharedMemoryVirtualDevice( + const media::VideoCaptureDeviceInfo& device_info, + video_capture::mojom::ProducerPtr producer, + video_capture::mojom::SharedMemoryVirtualDeviceRequest virtual_device) + override { + DoAddVirtualDevice(device_info, producer.get(), &virtual_device); + } + void AddTextureVirtualDevice(const media::VideoCaptureDeviceInfo& device_info, + video_capture::mojom::TextureVirtualDeviceRequest + virtual_device) override { + NOTIMPLEMENTED(); } MOCK_METHOD1(DoGetDeviceInfos, void(GetDeviceInfosCallback& callback)); @@ -71,11 +77,11 @@ void(const std::string& device_id, video_capture::mojom::DeviceRequest* device_request, CreateDeviceCallback& callback)); - MOCK_METHOD3( - DoAddVirtualDevice, - void(const media::VideoCaptureDeviceInfo& device_info, - video_capture::mojom::ProducerProxy* producer, - video_capture::mojom::VirtualDeviceRequest* virtual_device_request)); + MOCK_METHOD3(DoAddVirtualDevice, + void(const media::VideoCaptureDeviceInfo& device_info, + video_capture::mojom::ProducerProxy* producer, + video_capture::mojom::SharedMemoryVirtualDeviceRequest* + virtual_device_request)); }; class MockVideoCaptureDeviceLauncherCallbacks
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc index 363fe607..07935be 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -3585,6 +3585,12 @@ if (command_line.HasSwitch(switches::kProcessPerSite)) return true; + // Error pages should use process-per-site model, as it is useful to + // consolidate them to minimize resource usage and there is no security + // drawback to combining them all in the same process. + if (url.SchemeIs(kChromeErrorScheme)) + return true; + // We want to consolidate particular sites like WebUI even when we are using // the process-per-tab or process-per-site-instance models. // Note: DevTools pages have WebUI type but should not reuse the same host.
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc index 2443ab8..8309ff8 100644 --- a/content/browser/renderer_host/render_view_host_impl.cc +++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -342,8 +342,9 @@ params->renderer_wide_named_frame_lookup = GetSiteInstance()->GetSiteURL().SchemeIs(kGuestScheme); - GetWidget()->GetVisualProperties(¶ms->visual_properties); - GetWidget()->SetInitialVisualProperties(params->visual_properties); + bool needs_ack = false; + GetWidget()->GetVisualProperties(¶ms->visual_properties, &needs_ack); + GetWidget()->SetInitialVisualProperties(params->visual_properties, needs_ack); GetProcess()->GetRendererInterface()->CreateView(std::move(params));
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc index 190a4c0b..4f629c96 100644 --- a/content/browser/renderer_host/render_widget_host_impl.cc +++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -340,7 +340,6 @@ clock_(base::DefaultTickClock::GetInstance()), is_loading_(false), is_hidden_(hidden), - repaint_ack_pending_(false), resize_ack_pending_(false), auto_resize_enabled_(false), waiting_for_screen_rects_ack_(false), @@ -515,11 +514,6 @@ void RenderWidgetHostImpl::ResetSizeAndRepaintPendingFlags() { resize_ack_pending_ = false; - if (repaint_ack_pending_) { - TRACE_EVENT_ASYNC_END0( - "renderer_host", "RenderWidgetHostImpl::repaint_ack_pending_", this); - } - repaint_ack_pending_ = false; if (old_visual_properties_) old_visual_properties_->new_size = gfx::Size(); } @@ -748,7 +742,8 @@ #endif bool RenderWidgetHostImpl::GetVisualProperties( - VisualProperties* visual_properties) { + VisualProperties* visual_properties, + bool* needs_ack) { *visual_properties = VisualProperties(); GetScreenInfo(&visual_properties->screen_info); @@ -840,23 +835,23 @@ old_visual_properties_->content_source_id != visual_properties->content_source_id); - // We don't expect to receive an ACK when the requested size or the physical - // backing size is empty, or when the main viewport size didn't change. - visual_properties->needs_resize_ack = - !auto_resize_enabled_ && g_check_for_pending_resize_ack && - !visual_properties->new_size.IsEmpty() && - !visual_properties->compositor_viewport_pixel_size.IsEmpty() && - (size_changed || next_resize_needs_resize_ack_) && - (visual_properties->local_surface_id.has_value() && - visual_properties->local_surface_id->is_valid()); + // We should throttle sending updated VisualProperties to the renderer to + // the rate of commit. This ensures we don't overwhelm the renderer with + // visual updates faster than it can keep up. |needs_ack| corresponds to + // cases where a commit is expected. + *needs_ack = g_check_for_pending_resize_ack && + !visual_properties->auto_resize_enabled && + !visual_properties->new_size.IsEmpty() && + !visual_properties->compositor_viewport_pixel_size.IsEmpty() && + visual_properties->local_surface_id && size_changed; return dirty; } void RenderWidgetHostImpl::SetInitialVisualProperties( - const VisualProperties& visual_properties) { - resize_ack_pending_ = visual_properties.needs_resize_ack; - + const VisualProperties& visual_properties, + bool needs_ack) { + resize_ack_pending_ = needs_ack; old_visual_properties_ = std::make_unique<VisualProperties>(visual_properties); } @@ -875,7 +870,8 @@ } std::unique_ptr<VisualProperties> visual_properties(new VisualProperties); - if (!GetVisualProperties(visual_properties.get())) + bool needs_ack = false; + if (!GetVisualProperties(visual_properties.get(), &needs_ack)) return false; visual_properties->scroll_focused_node_into_view = scroll_focused_node_into_view; @@ -887,8 +883,7 @@ bool sent_visual_properties = false; if (Send(new ViewMsg_SynchronizeVisualProperties(routing_id_, *visual_properties))) { - resize_ack_pending_ = visual_properties->needs_resize_ack; - next_resize_needs_resize_ack_ = false; + resize_ack_pending_ = needs_ack; old_visual_properties_.swap(visual_properties); sent_visual_properties = true; } @@ -1002,7 +997,7 @@ return; // Do not pause if there is not a paint or resize already coming. - if (!repaint_ack_pending_ && !resize_ack_pending_) + if (!resize_ack_pending_) return; // OnResizeOrRepaintACK posts a task to the default TaskRunner in auto-resize, @@ -1112,7 +1107,6 @@ // Resize messages before navigation are not acked, so reset // |resize_ack_pending_| and make sure the next resize will be acked if the // last resize before navigation was supposed to be acked. - next_resize_needs_resize_ack_ = resize_ack_pending_; resize_ack_pending_ = false; if (view_) view_->DidNavigate(); @@ -1435,6 +1429,9 @@ switch (delegate_->PreHandleKeyboardEvent(key_event)) { case KeyboardEventProcessingResult::HANDLED: return; + case KeyboardEventProcessingResult::HANDLED_WANTS_KEY_UP: + suppress_events_until_keydown_ = false; + return; #if defined(USE_AURA) case KeyboardEventProcessingResult::HANDLED_DONT_UPDATE_EVENT: if (update_event) @@ -2145,35 +2142,15 @@ void RenderWidgetHostImpl::OnResizeOrRepaintACK( const ViewHostMsg_ResizeOrRepaint_ACK_Params& params) { TRACE_EVENT0("renderer_host", "RenderWidgetHostImpl::OnResizeOrRepaintACK"); - TimeTicks paint_start = clock_->NowTicks(); // Update our knowledge of the RenderWidget's size. current_size_ = params.view_size; - bool is_resize_ack = - ViewHostMsg_ResizeOrRepaint_ACK_Flags::is_resize_ack(params.flags); - - // resize_ack_pending_ needs to be cleared before we call DidPaintRect, since - // that will end up reaching GetBackingStore. - if (is_resize_ack) { - DCHECK(!g_check_for_pending_resize_ack || resize_ack_pending_); - resize_ack_pending_ = false; - } - - bool is_repaint_ack = - ViewHostMsg_ResizeOrRepaint_ACK_Flags::is_repaint_ack(params.flags); - if (is_repaint_ack) { - DCHECK(repaint_ack_pending_); - TRACE_EVENT_ASYNC_END0( - "renderer_host", "RenderWidgetHostImpl::repaint_ack_pending_", this); - repaint_ack_pending_ = false; - TimeDelta delta = clock_->NowTicks() - repaint_start_time_; - UMA_HISTOGRAM_TIMES("MPArch.RWH_RepaintDelta", delta); - } + resize_ack_pending_ = false; DCHECK(!params.view_size.IsEmpty()); - DidCompleteResizeOrRepaint(params, paint_start); + DidCompleteResizeOrRepaint(params); if (auto_resize_enabled_ && view_) { viz::ScopedSurfaceIdAllocator scoped_allocator = @@ -2185,17 +2162,10 @@ this, params.view_size, *params.child_allocated_local_surface_id); } } - - // Log the time delta for processing a paint message. On platforms that don't - // support asynchronous painting, this is equivalent to - // MPArch.RWH_TotalPaintTime. - TimeDelta delta = clock_->NowTicks() - paint_start; - UMA_HISTOGRAM_TIMES("MPArch.RWH_OnMsgResizeOrRepaintACK", delta); } void RenderWidgetHostImpl::DidCompleteResizeOrRepaint( - const ViewHostMsg_ResizeOrRepaint_ACK_Params& params, - const TimeTicks& paint_start) { + const ViewHostMsg_ResizeOrRepaint_ACK_Params& params) { TRACE_EVENT0("renderer_host", "RenderWidgetHostImpl::DidCompleteResizeOrRepaint"); @@ -2209,11 +2179,9 @@ if (is_hidden_) return; - // If we got a resize ack, then perhaps we have another resize to send? - bool is_resize_ack = - ViewHostMsg_ResizeOrRepaint_ACK_Flags::is_resize_ack(params.flags); - if (is_resize_ack) - SynchronizeVisualProperties(); + // If we got an ack, then perhaps we have another change of visual properties + // to send? + SynchronizeVisualProperties(); } void RenderWidgetHostImpl::OnSetCursor(const WebCursor& cursor) {
diff --git a/content/browser/renderer_host/render_widget_host_impl.h b/content/browser/renderer_host/render_widget_host_impl.h index f87e1b4..7cae9ef7 100644 --- a/content/browser/renderer_host/render_widget_host_impl.h +++ b/content/browser/renderer_host/render_widget_host_impl.h
@@ -564,11 +564,13 @@ // Fills in the |visual_properties| struct. // Returns |false| if the update is redundant, |true| otherwise. - bool GetVisualProperties(VisualProperties* visual_properties); + bool GetVisualProperties(VisualProperties* visual_properties, + bool* needs_ack); // Sets the |visual_properties| that were sent to the renderer bundled with // the request to create a new RenderWidget. - void SetInitialVisualProperties(const VisualProperties& visual_properties); + void SetInitialVisualProperties(const VisualProperties& visual_properties, + bool needs_ack); // Pushes updated visual properties to the renderer as well as whether the // focused node should be scrolled into view. @@ -817,8 +819,7 @@ // Called after resize or repaint has completed in the renderer. void DidCompleteResizeOrRepaint( - const ViewHostMsg_ResizeOrRepaint_ACK_Params& params, - const base::TimeTicks& paint_start); + const ViewHostMsg_ResizeOrRepaint_ACK_Params& params); // Give key press listeners a chance to handle this key press. This allow // widgets that don't have focus to still handle key presses. @@ -926,9 +927,6 @@ ChildProcessImportance importance_ = ChildProcessImportance::NORMAL; #endif - // Set if we are waiting for a repaint ack for the view. - bool repaint_ack_pending_; - // True when waiting for RESIZE_ACK. bool resize_ack_pending_; @@ -1148,8 +1146,6 @@ // ownership of the bitmaps with these ids to avoid leaking them. std::set<viz::SharedBitmapId> owned_bitmaps_; - bool next_resize_needs_resize_ack_ = false; - bool force_enable_zoom_ = false; RenderFrameMetadataProviderImpl render_frame_metadata_provider_;
diff --git a/content/browser/renderer_host/render_widget_host_unittest.cc b/content/browser/renderer_host/render_widget_host_unittest.cc index 09aeaeee..e3d8341 100644 --- a/content/browser/renderer_host/render_widget_host_unittest.cc +++ b/content/browser/renderer_host/render_widget_host_unittest.cc
@@ -334,11 +334,14 @@ if (bounds_ == bounds) return; bounds_ = bounds; - local_surface_id_ = local_surface_id_allocator_.GenerateId(); + local_surface_id_allocator_.GenerateId(); } void SetScreenInfo(const ScreenInfo& screen_info) { + if (screen_info_ == screen_info) + return; screen_info_ = screen_info; + local_surface_id_allocator_.GenerateId(); } void GetScreenInfo(ScreenInfo* screen_info) const override { @@ -371,11 +374,20 @@ void SetMockCompositorViewportPixelSize( const gfx::Size& mock_compositor_viewport_pixel_size) { + if (use_fake_compositor_viewport_pixel_size_ && + mock_compositor_viewport_pixel_size_ == + mock_compositor_viewport_pixel_size) { + return; + } use_fake_compositor_viewport_pixel_size_ = true; mock_compositor_viewport_pixel_size_ = mock_compositor_viewport_pixel_size; + local_surface_id_allocator_.GenerateId(); } void ClearMockCompositorViewportPixelSize() { + if (!use_fake_compositor_viewport_pixel_size_) + return; use_fake_compositor_viewport_pixel_size_ = false; + local_surface_id_allocator_.GenerateId(); } const viz::BeginFrameAck& last_did_not_produce_frame_ack() { @@ -389,7 +401,7 @@ return bottom_controls_height_; } viz::LocalSurfaceId GetLocalSurfaceId() const override { - return local_surface_id_; + return local_surface_id_allocator_.GetCurrentLocalSurfaceId(); } void ProcessAckedTouchEvent(const TouchEventWithLatencyInfo& touch, @@ -431,7 +443,6 @@ float top_controls_height_; float bottom_controls_height_; viz::BeginFrameAck last_did_not_produce_frame_ack_; - viz::LocalSurfaceId local_surface_id_; viz::ParentLocalSurfaceIdAllocator local_surface_id_allocator_; ScreenInfo screen_info_; @@ -737,8 +748,9 @@ void SetInitialVisualProperties() { VisualProperties visual_properties; - host_->GetVisualProperties(&visual_properties); - host_->SetInitialVisualProperties(visual_properties); + bool needs_ack = false; + host_->GetVisualProperties(&visual_properties, &needs_ack); + host_->SetInitialVisualProperties(visual_properties, needs_ack); } virtual void ConfigureView(TestView* view) { @@ -981,33 +993,24 @@ EXPECT_TRUE(process_->sink().GetUniqueMessageMatching( ViewMsg_SynchronizeVisualProperties::ID)); ViewHostMsg_ResizeOrRepaint_ACK_Params params; - params.flags = ViewHostMsg_ResizeOrRepaint_ACK_Flags::IS_RESIZE_ACK; params.view_size = original_size.size(); host_->OnResizeOrRepaintACK(params); EXPECT_FALSE(host_->resize_ack_pending_); - // Send out a update that's not a resize ack after setting resize ack pending - // flag. This should not clean the resize ack pending flag. process_->sink().ClearMessages(); gfx::Rect second_size(0, 0, 110, 110); EXPECT_FALSE(host_->resize_ack_pending_); view_->SetBounds(second_size); - host_->SynchronizeVisualProperties(); + EXPECT_TRUE(host_->SynchronizeVisualProperties()); EXPECT_TRUE(host_->resize_ack_pending_); - params.flags = 0; - params.view_size = gfx::Size(100, 100); - host_->OnResizeOrRepaintACK(params); - EXPECT_TRUE(host_->resize_ack_pending_); - EXPECT_EQ(second_size.size(), host_->old_visual_properties_->new_size); // Sending out a new notification should NOT send out a new IPC message since // a resize ACK is pending. gfx::Rect third_size(0, 0, 120, 120); process_->sink().ClearMessages(); view_->SetBounds(third_size); - host_->SynchronizeVisualProperties(); + EXPECT_FALSE(host_->SynchronizeVisualProperties()); EXPECT_TRUE(host_->resize_ack_pending_); - EXPECT_EQ(second_size.size(), host_->old_visual_properties_->new_size); EXPECT_FALSE(process_->sink().GetUniqueMessageMatching( ViewMsg_SynchronizeVisualProperties::ID)); @@ -1015,7 +1018,6 @@ // this isn't the second_size, the message handler should immediately send // a new resize message for the new size to the renderer. process_->sink().ClearMessages(); - params.flags = ViewHostMsg_ResizeOrRepaint_ACK_Flags::IS_RESIZE_ACK; params.view_size = original_size.size(); host_->OnResizeOrRepaintACK(params); EXPECT_TRUE(host_->resize_ack_pending_); @@ -1025,7 +1027,6 @@ // Send the resize ack for the latest size. process_->sink().ClearMessages(); - params.flags = ViewHostMsg_ResizeOrRepaint_ACK_Flags::IS_RESIZE_ACK; params.view_size = third_size.size(); host_->OnResizeOrRepaintACK(params); EXPECT_FALSE(host_->resize_ack_pending_); @@ -2165,7 +2166,8 @@ view_->SetMockCompositorViewportPixelSize(compositor_viewport_pixel_size); VisualProperties visual_properties; - host_->GetVisualProperties(&visual_properties); + bool needs_ack = false; + host_->GetVisualProperties(&visual_properties, &needs_ack); EXPECT_EQ(bounds.size(), visual_properties.new_size); EXPECT_EQ(compositor_viewport_pixel_size, visual_properties.compositor_viewport_pixel_size); @@ -2188,7 +2190,8 @@ view_->set_bottom_controls_height(bottom_controls_height); VisualProperties visual_properties; - host_->GetVisualProperties(&visual_properties); + bool needs_ack = false; + host_->GetVisualProperties(&visual_properties, &needs_ack); EXPECT_EQ(top_controls_height * device_scale, visual_properties.top_controls_height); EXPECT_EQ(bottom_controls_height * device_scale, @@ -2237,7 +2240,7 @@ // with the reqiest to new up the RenderView and so subsequent // SynchronizeVisualProperties calls should not result in new IPC (unless the // size has actually changed). - host_->SynchronizeVisualProperties(); + EXPECT_FALSE(host_->SynchronizeVisualProperties()); EXPECT_FALSE(process_->sink().GetUniqueMessageMatching( ViewMsg_SynchronizeVisualProperties::ID)); EXPECT_EQ(initial_size_, host_->old_visual_properties_->new_size);
diff --git a/content/browser/renderer_host/render_widget_host_view_android.cc b/content/browser/renderer_host/render_widget_host_view_android.cc index 7437c08..6d93ec7 100644 --- a/content/browser/renderer_host/render_widget_host_view_android.cc +++ b/content/browser/renderer_host/render_widget_host_view_android.cc
@@ -183,7 +183,9 @@ frame_evictor_(new viz::FrameEvictor(this)), observing_root_window_(false), prev_top_shown_pix_(0.f), + prev_top_controls_translate_(0.f), prev_bottom_shown_pix_(0.f), + prev_bottom_controls_translate_(0.f), page_scale_(1.f), min_page_scale_(1.f), max_page_scale_(1.f), @@ -1259,25 +1261,32 @@ bool top_changed = !FloatEquals(top_shown_pix, prev_top_shown_pix_); // TODO(carlosil, https://crbug.com/825765): Remove the IsInVR() check here, - // which is a temporary hack. When interstitial pages load they set the - // top controls offset to 0, and if we don't ignore that hit targeting on - // interstitial pages breaks. The fix is still crucial for VR as VR needs the - // top controls to be initially hidden correctly. + // which is a temporary hack. Interstitial pages are not committed navigations + // and their metadata updates never leave the content layer, so Chrome and the + // content layer end up mismatched and hit testing is offset. They rely on the + // previous (erroneous) behavior of ignoring the initial control offset update + // if offset is 0. The fix is still crucial for VR as VR needs the top + // controls to be initially hidden correctly (so we don't want the offset of 0 + // to get ignored. Tracking bug for the interstitial work to fix this by + // converting interstitials to committed navigations is + // https://crbug.com/755632. + float top_translate = top_shown_pix - top_controls_pix; if (top_changed || (!controls_initialized_ && IsInVR())) { - float translate = top_shown_pix - top_controls_pix; - view_.OnTopControlsChanged(translate, top_shown_pix); - prev_top_shown_pix_ = top_shown_pix; + view_.OnTopControlsChanged(top_translate, top_shown_pix); } + prev_top_shown_pix_ = top_shown_pix; + prev_top_controls_translate_ = top_translate; float bottom_controls_pix = frame_metadata.bottom_controls_height * to_pix; float bottom_shown_pix = bottom_controls_pix * frame_metadata.bottom_controls_shown_ratio; bool bottom_changed = !FloatEquals(bottom_shown_pix, prev_bottom_shown_pix_); + float bottom_translate = bottom_controls_pix - bottom_shown_pix; if (bottom_changed || (!controls_initialized_ && IsInVR())) { - float translate = bottom_controls_pix - bottom_shown_pix; - view_.OnBottomControlsChanged(translate, bottom_shown_pix); - prev_bottom_shown_pix_ = bottom_shown_pix; + view_.OnBottomControlsChanged(bottom_translate, bottom_shown_pix); } + prev_bottom_shown_pix_ = bottom_shown_pix; + prev_bottom_controls_translate_ = bottom_translate; controls_initialized_ = true; page_scale_ = frame_metadata.page_scale_factor; @@ -1823,6 +1832,17 @@ touch_selection_controller_ = CreateSelectionController( touch_selection_controller_client_manager_.get(), view_.parent()); } + + if (is_in_vr_ && controls_initialized_) { + // TODO(carlosil, https://crbug.com/825765): See the TODO in + // RenderWidgetHostViewAndroid::OnFrameMetadataUpdated. RWHVA isn't + // initialized with VR state so the initial frame metadata top controls + // height can be dropped when a new RWHVA is created. + view_.OnTopControlsChanged(prev_top_controls_translate_, + prev_top_shown_pix_); + view_.OnBottomControlsChanged(prev_bottom_controls_translate_, + prev_bottom_shown_pix_); + } } bool RenderWidgetHostViewAndroid::IsInVR() const {
diff --git a/content/browser/renderer_host/render_widget_host_view_android.h b/content/browser/renderer_host/render_widget_host_view_android.h index 241d66d..69efdb0a 100644 --- a/content/browser/renderer_host/render_widget_host_view_android.h +++ b/content/browser/renderer_host/render_widget_host_view_android.h
@@ -479,7 +479,9 @@ bool controls_initialized_ = false; float prev_top_shown_pix_; + float prev_top_controls_translate_; float prev_bottom_shown_pix_; + float prev_bottom_controls_translate_; float page_scale_; float min_page_scale_; float max_page_scale_;
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc index dad3ee7..9047b52 100644 --- a/content/browser/renderer_host/render_widget_host_view_aura.cc +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -668,7 +668,7 @@ } // If the primary surface was evicted, we should create a new primary. - if (features::IsSurfaceSynchronizationEnabled() && delegated_frame_host_ && + if (delegated_frame_host_ && delegated_frame_host_->IsPrimarySurfaceEvicted()) { SynchronizeVisualProperties(cc::DeadlinePolicy::UseDefaultDeadline(), base::nullopt); @@ -1330,6 +1330,23 @@ return has_composition_text_; } +ui::TextInputClient::FocusReason RenderWidgetHostViewAura::GetFocusReason() + const { + if (!HasFocus()) + return ui::TextInputClient::FOCUS_REASON_NONE; + + switch (last_pointer_type_before_focus_) { + case ui::EventPointerType::POINTER_TYPE_MOUSE: + return ui::TextInputClient::FOCUS_REASON_MOUSE; + case ui::EventPointerType::POINTER_TYPE_PEN: + return ui::TextInputClient::FOCUS_REASON_PEN; + case ui::EventPointerType::POINTER_TYPE_TOUCH: + return ui::TextInputClient::FOCUS_REASON_TOUCH; + default: + return ui::TextInputClient::FOCUS_REASON_OTHER; + } +} + bool RenderWidgetHostViewAura::GetTextRange(gfx::Range* range) const { if (!text_input_manager_ || !GetFocusedWidget()) return false; @@ -1599,6 +1616,7 @@ // RenderWidgetHostViewAura, ui::EventHandler implementation: void RenderWidgetHostViewAura::OnKeyEvent(ui::KeyEvent* event) { + last_pointer_type_ = ui::EventPointerType::POINTER_TYPE_UNKNOWN; event_handler_->OnKeyEvent(event); } @@ -1612,6 +1630,7 @@ last_mouse_move_location_ = event->location(); } #endif + last_pointer_type_ = ui::EventPointerType::POINTER_TYPE_MOUSE; event_handler_->OnMouseEvent(event); } @@ -1664,6 +1683,12 @@ void RenderWidgetHostViewAura::FocusedNodeChanged( bool editable, const gfx::Rect& node_bounds_in_screen) { + // The last gesture most likely caused the focus change. The focus reason will + // be incorrect if the focus was triggered without a user gesture. + // TODO(https://crbug.com/824604): Get the focus reason from the renderer + // process instead to get the true focus reason. + last_pointer_type_before_focus_ = last_pointer_type_; + auto* input_method = GetInputMethod(); if (input_method) input_method->CancelComposition(this); @@ -1694,10 +1719,12 @@ } void RenderWidgetHostViewAura::OnTouchEvent(ui::TouchEvent* event) { + last_pointer_type_ = event->pointer_details().pointer_type; event_handler_->OnTouchEvent(event); } void RenderWidgetHostViewAura::OnGestureEvent(ui::GestureEvent* event) { + last_pointer_type_ = event->details().primary_pointer_type(); event_handler_->OnGestureEvent(event); } @@ -1925,8 +1952,7 @@ const bool enable_viz = base::FeatureList::IsEnabled(features::kVizDisplayCompositor); delegated_frame_host_ = std::make_unique<DelegatedFrameHost>( - frame_sink_id_, delegated_frame_host_client_.get(), - features::IsSurfaceSynchronizationEnabled(), enable_viz, + frame_sink_id_, delegated_frame_host_client_.get(), enable_viz, false /* should_register_frame_sink_id */); // Let the page-level input event router know about our surface ID @@ -2253,6 +2279,11 @@ wm::RestoreWindowBoundsOnClientFocusLost(window_->GetToplevelWindow()); #endif // defined(OS_CHROMEOS) } + +#if defined(OS_WIN) + // Reset the keyboard observer because it attaches to the input method. + keyboard_observer_.reset(); +#endif // defined(OS_WIN) } void RenderWidgetHostViewAura::ForwardKeyboardEventWithLatencyInfo(
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.h b/content/browser/renderer_host/render_widget_host_view_aura.h index f855da84..8d9e498 100644 --- a/content/browser/renderer_host/render_widget_host_view_aura.h +++ b/content/browser/renderer_host/render_widget_host_view_aura.h
@@ -225,6 +225,7 @@ bool GetCompositionCharacterBounds(uint32_t index, gfx::Rect* rect) const override; bool HasCompositionText() const override; + ui::TextInputClient::FocusReason GetFocusReason() const override; bool GetTextRange(gfx::Range* range) const override; bool GetCompositionTextRange(gfx::Range* range) const override; bool GetSelectionRange(gfx::Range* range) const override; @@ -399,6 +400,8 @@ VirtualKeyboardFocusEnsureCaretInRect); FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, HitTestRegionListSubmitted); + FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraKeyboardTest, + KeyboardObserverDestroyed); FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraSurfaceSynchronizationTest, DropFallbackWhenHidden); FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraSurfaceSynchronizationTest, @@ -669,6 +672,14 @@ // EnsureSurfaceSynchronizedForLayoutTest(). uint32_t latest_capture_sequence_number_ = 0u; + // The pointer type of the most recent gesture/mouse/touch event. + ui::EventPointerType last_pointer_type_ = + ui::EventPointerType::POINTER_TYPE_UNKNOWN; + // The pointer type that caused the most recent focus. This value will be + // incorrect if the focus was not triggered by a user gesture. + ui::EventPointerType last_pointer_type_before_focus_ = + ui::EventPointerType::POINTER_TYPE_UNKNOWN; + base::WeakPtrFactory<RenderWidgetHostViewAura> weak_ptr_factory_; DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura);
diff --git a/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc b/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc index fee8c165..1a68a39 100644 --- a/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc +++ b/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
@@ -95,6 +95,8 @@ #include "ui/aura/window_observer.h" #include "ui/base/clipboard/clipboard.h" #include "ui/base/ime/input_method.h" +#include "ui/base/ime/input_method_keyboard_controller.h" +#include "ui/base/ime/mock_input_method.h" #include "ui/base/ui_base_features.h" #include "ui/base/ui_base_switches.h" #include "ui/base/ui_base_types.h" @@ -250,11 +252,6 @@ bool compositor_locked() const { return compositor_locked_; } private: - // DelegatedFrameHostClientAura implementation. - bool DelegatedFrameCanCreateResizeLock() const override { - return can_create_resize_lock_; - } - // CompositorResizeLockClient implemention. Overrides from // DelegatedFrameHostClientAura, to prevent the lock from timing out. std::unique_ptr<ui::CompositorLock> GetCompositorLock( @@ -341,10 +338,6 @@ return GetDelegatedFrameHost()->HasFallbackSurface(); } - bool released_front_lock_active() const { - return GetDelegatedFrameHost()->ReleasedFrontLockActiveForTesting(); - } - void ReclaimResources(const std::vector<viz::ReturnedResource>& resources) { GetDelegatedFrameHost()->ReclaimResources(resources); } @@ -545,8 +538,7 @@ view->delegated_frame_host_ = nullptr; view->delegated_frame_host_ = std::make_unique<DelegatedFrameHost>( view->frame_sink_id_, view->delegated_frame_host_client_.get(), - features::IsSurfaceSynchronizationEnabled(), enable_viz, - false /* should_register_frame_sink_id */); + enable_viz, false /* should_register_frame_sink_id */); } FakeRenderWidgetHostViewAura* CreateView(bool is_guest_view_hack) { @@ -3318,72 +3310,6 @@ } } -// If the view size is larger than the compositor frame then extra layers -// should be created to fill the gap. -TEST_F(RenderWidgetHostViewAuraTest, DelegatedFrameGutter) { - // TODO(fsamuel): Delete this test once surface synchronization is on for - // all platforms. - if (features::IsSurfaceSynchronizationEnabled()) - return; - - gfx::Size large_size(100, 100); - gfx::Size small_size(40, 45); - gfx::Size medium_size(40, 95); - viz::LocalSurfaceId small_id = - parent_local_surface_id_allocator_.GenerateId(); - viz::LocalSurfaceId medium_id = - parent_local_surface_id_allocator_.GenerateId(); - - // Prevent the DelegatedFrameHost from skipping frames. - view_->DisableResizeLock(); - - view_->InitAsChild(nullptr); - aura::client::ParentWindowWithContext( - view_->GetNativeView(), parent_view_->GetNativeView()->GetRootWindow(), - gfx::Rect()); - view_->SetSize(large_size); - view_->Show(); - viz::CompositorFrame frame = - MakeDelegatedFrame(1.f, small_size, gfx::Rect(small_size)); - frame.metadata.root_background_color = SK_ColorRED; - - cc::RenderFrameMetadata metadata; - metadata.root_background_color = SK_ColorRED; - view_->SetRenderFrameMetadata(metadata); - view_->OnRenderFrameMetadataChanged(); - view_->SubmitCompositorFrame(small_id, std::move(frame), nullptr); - - ui::Layer* parent_layer = view_->GetNativeView()->layer(); - - ASSERT_EQ(2u, parent_layer->children().size()); - EXPECT_EQ(gfx::Rect(40, 0, 60, 100), parent_layer->children()[0]->bounds()); - EXPECT_EQ(SK_ColorRED, parent_layer->children()[0]->background_color()); - EXPECT_EQ(gfx::Rect(0, 45, 40, 55), parent_layer->children()[1]->bounds()); - EXPECT_EQ(SK_ColorRED, parent_layer->children()[1]->background_color()); - - delegates_.back()->set_is_fullscreen(true); - view_->SetSize(medium_size); - - // Right gutter is unnecessary. - ASSERT_EQ(1u, parent_layer->children().size()); - EXPECT_EQ(gfx::Rect(0, 45, 40, 50), parent_layer->children()[0]->bounds()); - - // RWH is fullscreen, so gutters should be black. - EXPECT_EQ(SK_ColorBLACK, parent_layer->children()[0]->background_color()); - - frame = MakeDelegatedFrame(1.f, medium_size, gfx::Rect(medium_size)); - view_->SubmitCompositorFrame(medium_id, std::move(frame), nullptr); - EXPECT_EQ(0u, parent_layer->children().size()); - - view_->SetSize(large_size); - ASSERT_EQ(2u, parent_layer->children().size()); - - // This should evict the frame and remove the gutter layers. - view_->Hide(); - view_->SetSize(small_size); - ASSERT_EQ(0u, parent_layer->children().size()); -} - TEST_F(RenderWidgetHostViewAuraTest, ZeroSizeStillGetsLocalSurfaceId) { gfx::Size frame_size; viz::LocalSurfaceId local_surface_id = @@ -3464,7 +3390,6 @@ root_window->GetHost()->compositor()); ViewHostMsg_ResizeOrRepaint_ACK_Params update_params; update_params.view_size = size1; - update_params.flags = ViewHostMsg_ResizeOrRepaint_ACK_Flags::IS_RESIZE_ACK; widget_host_->OnMessageReceived(ViewHostMsg_ResizeOrRepaint_ACK( widget_host_->GetRoutingID(), update_params)); sink_->ClearMessages(); @@ -3550,257 +3475,6 @@ sink_->ClearMessages(); } -// Skipped frames should not drop their damage. -TEST_F(RenderWidgetHostViewAuraTest, SkippedDelegatedFrames) { - // TODO(fsamuel): Delete this test once surface synchronization is on for - // all platforms. - if (features::IsSurfaceSynchronizationEnabled()) - return; - - gfx::Rect view_rect(100, 100); - gfx::Size frame_size = view_rect.size(); - viz::LocalSurfaceId local_surface_id = - parent_local_surface_id_allocator_.GenerateId(); - - view_->InitAsChild(nullptr); - aura::client::ParentWindowWithContext( - view_->GetNativeView(), - parent_view_->GetNativeView()->GetRootWindow(), - gfx::Rect()); - view_->SetSize(view_rect.size()); - - // A full frame of damage. - view_->SubmitCompositorFrame(local_surface_id, - MakeDelegatedFrame(1.f, frame_size, view_rect), - nullptr); - EXPECT_EQ(kFrameIndexStart + 1u, FrameIndexForView(view_)); - EXPECT_EQ(view_rect, DamageRectForView(view_)); - view_->RunOnCompositingDidCommit(); - - // A partial damage frame. - gfx::Rect partial_view_rect(30, 30, 20, 20); - view_->SubmitCompositorFrame( - local_surface_id, MakeDelegatedFrame(1.f, frame_size, partial_view_rect), - nullptr); - EXPECT_EQ(kFrameIndexStart + 2u, FrameIndexForView(view_)); - EXPECT_EQ(partial_view_rect, DamageRectForView(view_)); - view_->RunOnCompositingDidCommit(); - - EXPECT_FALSE(view_->resize_locked()); - EXPECT_FALSE(view_->compositor_locked()); - - // Lock the compositor. Now we should drop frames. - view_rect = gfx::Rect(150, 150); - view_->SetSize(view_rect.size()); - EXPECT_TRUE(view_->resize_locked()); - EXPECT_TRUE(view_->compositor_locked()); - - // This frame is dropped. - gfx::Rect dropped_damage_rect_1(10, 20, 30, 40); - view_->SubmitCompositorFrame( - local_surface_id, - MakeDelegatedFrame(1.f, frame_size, dropped_damage_rect_1), nullptr); - EXPECT_EQ(kFrameIndexStart + 2u, FrameIndexForView(view_)); - view_->RunOnCompositingDidCommit(); - - gfx::Rect dropped_damage_rect_2(40, 50, 10, 20); - view_->SubmitCompositorFrame( - local_surface_id, - MakeDelegatedFrame(1.f, frame_size, dropped_damage_rect_2), nullptr); - EXPECT_EQ(kFrameIndexStart + 2u, FrameIndexForView(view_)); - view_->RunOnCompositingDidCommit(); - - EXPECT_TRUE(view_->resize_locked()); - EXPECT_TRUE(view_->compositor_locked()); - - // Unlock the compositor. This frame should damage everything. - frame_size = view_rect.size(); - local_surface_id = parent_local_surface_id_allocator_.GenerateId(); - - gfx::Rect new_damage_rect(5, 6, 10, 10); - view_->SubmitCompositorFrame( - local_surface_id, MakeDelegatedFrame(1.f, frame_size, new_damage_rect), - nullptr); - // The swap unlocks the compositor. - EXPECT_TRUE(view_->resize_locked()); - EXPECT_FALSE(view_->compositor_locked()); - EXPECT_EQ(kFrameIndexStart + 3u, FrameIndexForView(view_)); - EXPECT_EQ(view_rect, DamageRectForView(view_)); - // The UI commit unlocks for further resize. - view_->RunOnCompositingDidCommit(); - EXPECT_FALSE(view_->resize_locked()); - EXPECT_FALSE(view_->compositor_locked()); - - // A partial damage frame, this should not be dropped. - view_->SubmitCompositorFrame( - local_surface_id, MakeDelegatedFrame(1.f, frame_size, partial_view_rect), - nullptr); - EXPECT_EQ(kFrameIndexStart + 4u, FrameIndexForView(view_)); - EXPECT_EQ(partial_view_rect, DamageRectForView(view_)); - view_->RunOnCompositingDidCommit(); - EXPECT_FALSE(view_->resize_locked()); - EXPECT_FALSE(view_->compositor_locked()); - - // Resize to something empty. This doesn't lock anything since it's not - // visible anymore anyways. - view_rect = gfx::Rect(100, 0); - view_->SetSize(view_rect.size()); - EXPECT_FALSE(view_->resize_locked()); - EXPECT_FALSE(view_->compositor_locked()); - - // We're never expecting empty frames, resize to something non-empty. - view_rect = gfx::Rect(100, 100); - frame_size = view_rect.size(); - local_surface_id = parent_local_surface_id_allocator_.GenerateId(); - view_->SetSize(view_rect.size()); - EXPECT_TRUE(view_->resize_locked()); - EXPECT_TRUE(view_->compositor_locked()); - - // This frame should not be dropped. - view_->SubmitCompositorFrame(local_surface_id, - MakeDelegatedFrame(1.f, frame_size, view_rect), - nullptr); - EXPECT_EQ(kFrameIndexStart + 5u, FrameIndexForView(view_)); - EXPECT_EQ(view_rect, DamageRectForView(view_)); - EXPECT_TRUE(view_->resize_locked()); - EXPECT_FALSE(view_->compositor_locked()); - view_->RunOnCompositingDidCommit(); - EXPECT_FALSE(view_->resize_locked()); - EXPECT_FALSE(view_->compositor_locked()); -} - -// If resize races with a renderer frame, we should lock for the right size. -TEST_F(RenderWidgetHostViewAuraTest, ResizeAfterReceivingFrame) { - // TODO(fsamuel): Delete this test once surface synchronization is on for - // all platforms. - if (features::IsSurfaceSynchronizationEnabled()) - return; - - gfx::Rect view_rect(100, 100); - gfx::Size frame_size = view_rect.size(); - viz::LocalSurfaceId local_surface_id = - parent_local_surface_id_allocator_.GenerateId(); - - view_->InitAsChild(nullptr); - aura::client::ParentWindowWithContext( - view_->GetNativeView(), parent_view_->GetNativeView()->GetRootWindow(), - gfx::Rect()); - view_->SetSize(view_rect.size()); - - // A frame of initial size. - view_->SubmitCompositorFrame( - local_surface_id, - MakeDelegatedFrame(1.f, frame_size, gfx::Rect(frame_size)), nullptr); - EXPECT_EQ(kFrameIndexStart + 1, FrameIndexForView(view_)); - EXPECT_EQ(view_rect, DamageRectForView(view_)); - view_->RunOnCompositingDidCommit(); - - // A frame of initial size arrives, but we don't commit in the UI yet. - view_->SubmitCompositorFrame( - local_surface_id, - MakeDelegatedFrame(1.f, frame_size, gfx::Rect(frame_size)), nullptr); - EXPECT_EQ(kFrameIndexStart + 2, FrameIndexForView(view_)); - - EXPECT_FALSE(view_->resize_locked()); - EXPECT_FALSE(view_->compositor_locked()); - - // Resize, and lock the compositor. Now we should drop frames of the old size. - view_rect = gfx::Rect(150, 150); - view_->SetSize(view_rect.size()); - EXPECT_TRUE(view_->resize_locked()); - EXPECT_TRUE(view_->compositor_locked()); - - view_->SubmitCompositorFrame( - local_surface_id, - MakeDelegatedFrame(1.f, frame_size, gfx::Rect(frame_size)), nullptr); - EXPECT_EQ(kFrameIndexStart + 2, FrameIndexForView(view_)); - - // If the CompositorLock times out in the meantime, a commit would happen. - // Verify that if a commit occurs, the lock remains and we reject frames - // of the wrong size still. - view_->RunOnCompositingDidCommit(); - - EXPECT_TRUE(view_->resize_locked()); - // In this case we lied about it and the CompositorLock is still active. - EXPECT_TRUE(view_->compositor_locked()); - - view_->SubmitCompositorFrame( - local_surface_id, - MakeDelegatedFrame(1.f, frame_size, gfx::Rect(frame_size)), nullptr); - EXPECT_EQ(kFrameIndexStart + 2, FrameIndexForView(view_)); - - // A frame arrives of the new size, which will be accepted. - frame_size = view_rect.size(); - local_surface_id = parent_local_surface_id_allocator_.GenerateId(); - view_->SubmitCompositorFrame( - local_surface_id, - MakeDelegatedFrame(1.f, frame_size, gfx::Rect(frame_size)), nullptr); - // Receiving the frame unlocks the compositor so it can commit. - EXPECT_TRUE(view_->resize_locked()); - EXPECT_FALSE(view_->compositor_locked()); - EXPECT_EQ(kFrameIndexStart + 3, FrameIndexForView(view_)); - - // When the frame of the correct size is committed, the CompositorResizeLock - // is released. - view_->RunOnCompositingDidCommit(); - EXPECT_FALSE(view_->resize_locked()); - EXPECT_FALSE(view_->compositor_locked()); -} - -// When the DelegatedFrameHost does not have a frame from the renderer, it has -// no reason to lock the compositor as there can't be guttering around a -// renderer frame that doesn't exist. -TEST_F(RenderWidgetHostViewAuraTest, MissingFramesDontLock) { - // TODO(fsamuel): Delete this test once surface synchronization is on for - // all platforms. - if (features::IsSurfaceSynchronizationEnabled()) - return; - - gfx::Rect view_rect(100, 100); - gfx::Size frame_size = view_rect.size(); - - view_->InitAsChild(nullptr); - aura::client::ParentWindowWithContext( - view_->GetNativeView(), parent_view_->GetNativeView()->GetRootWindow(), - gfx::Rect()); - - // The view is resized before the first frame, which should not lock the - // compositor as it's never received a frame to show yet. - view_->SetSize(view_rect.size()); - - EXPECT_FALSE(view_->resize_locked()); - EXPECT_FALSE(view_->compositor_locked()); - - // Submit a frame of initial size to make a frame present in - // DelegatedFrameHost, at which point locking becomes feasible if resized. - view_->SubmitCompositorFrame( - kArbitraryLocalSurfaceId, - MakeDelegatedFrame(1.f, frame_size, gfx::Rect(frame_size)), nullptr); - view_->RunOnCompositingDidCommit(); - - EXPECT_FALSE(view_->resize_locked()); - EXPECT_FALSE(view_->compositor_locked()); - - // The view is resized and has its frame evicted, before a new frame arrives. - // The resize will lock the compositor, but when evicted, it should no longer - // be locked. - view_rect.SetRect(0, 0, 150, 150); - view_->SetSize(view_rect.size()); - EXPECT_TRUE(view_->resize_locked()); - EXPECT_TRUE(view_->compositor_locked()); - - view_->ClearCompositorFrame(); - EXPECT_FALSE(view_->resize_locked()); - EXPECT_FALSE(view_->compositor_locked()); - - // And future resizes after eviction should not lock the compositor since - // there is no frame present. - view_rect.SetRect(0, 0, 120, 120); - view_->SetSize(view_rect.size()); - EXPECT_FALSE(view_->resize_locked()); - EXPECT_FALSE(view_->compositor_locked()); -} - TEST_F(RenderWidgetHostViewAuraTest, OutputSurfaceIdChange) { // TODO: fix for mash. if (base::FeatureList::IsEnabled(features::kMash)) @@ -4134,160 +3808,6 @@ } } -TEST_F(RenderWidgetHostViewAuraTest, DiscardDelegatedFrames) { - // TODO(fsamuel): Delete this test once surface synchronization is on for - // all platforms. - if (features::IsSurfaceSynchronizationEnabled()) - return; - - view_->InitAsChild(nullptr); - - size_t max_renderer_frames = - FrameEvictionManager::GetInstance()->GetMaxNumberOfSavedFrames(); - ASSERT_LE(2u, max_renderer_frames); - size_t renderer_count = max_renderer_frames + 1; - gfx::Rect view_rect(100, 100); - gfx::Size frame_size = view_rect.size(); - - std::unique_ptr<RenderWidgetHostImpl* []> hosts( - new RenderWidgetHostImpl*[renderer_count]); - std::unique_ptr<FakeRenderWidgetHostViewAura* []> views( - new FakeRenderWidgetHostViewAura*[renderer_count]); - - // Create a bunch of renderers. - for (size_t i = 0; i < renderer_count; ++i) { - int32_t routing_id = process_host_->GetNextRoutingID(); - delegates_.push_back(base::WrapUnique(new MockRenderWidgetHostDelegate)); - hosts[i] = MockRenderWidgetHostImpl::Create(delegates_.back().get(), - process_host_, routing_id); - delegates_.back()->set_widget_host(hosts[i]); - hosts[i]->Init(); - views[i] = new FakeRenderWidgetHostViewAura(hosts[i], false); - // Prevent frames from being skipped due to resize, this test does not - // run a UI compositor so the DelegatedFrameHost doesn't get the chance - // to release its resize lock once it receives a frame of the expected - // size. - views[i]->DisableResizeLock(); - views[i]->InitAsChild(nullptr); - aura::client::ParentWindowWithContext( - views[i]->GetNativeView(), - parent_view_->GetNativeView()->GetRootWindow(), - gfx::Rect()); - views[i]->SetSize(view_rect.size()); - } - - // Make each renderer visible, and swap a frame on it, then make it invisible. - for (size_t i = 0; i < renderer_count; ++i) { - views[i]->Show(); - views[i]->SubmitCompositorFrame( - kArbitraryLocalSurfaceId, - MakeDelegatedFrame(1.f, frame_size, view_rect), nullptr); - EXPECT_TRUE(views[i]->HasFallbackSurface()); - views[i]->Hide(); - } - - // There should be max_renderer_frames with a frame in it, and one without it. - // Since the logic is LRU eviction, the first one should be without. - EXPECT_FALSE(views[0]->HasFallbackSurface()); - for (size_t i = 1; i < renderer_count; ++i) - EXPECT_TRUE(views[i]->HasFallbackSurface()); - - // LRU renderer is [0], make it visible, it shouldn't evict anything yet. - views[0]->Show(); - EXPECT_FALSE(views[0]->HasFallbackSurface()); - EXPECT_TRUE(views[1]->HasFallbackSurface()); - // Since [0] doesn't have a frame, it should be waiting for the renderer to - // give it one. - EXPECT_TRUE(views[0]->released_front_lock_active()); - - // Swap a frame on it, it should evict the next LRU [1]. - views[0]->SubmitCompositorFrame( - kArbitraryLocalSurfaceId, MakeDelegatedFrame(1.f, frame_size, view_rect), - nullptr); - EXPECT_TRUE(views[0]->HasFallbackSurface()); - EXPECT_FALSE(views[1]->HasFallbackSurface()); - // Now that [0] got a frame, it shouldn't be waiting any more. - EXPECT_FALSE(views[0]->released_front_lock_active()); - views[0]->Hide(); - - // LRU renderer is [1], still hidden. Swap a frame on it, it should evict - // the next LRU [2]. - views[1]->SubmitCompositorFrame( - kArbitraryLocalSurfaceId, MakeDelegatedFrame(1.f, frame_size, view_rect), - nullptr); - EXPECT_TRUE(views[0]->HasFallbackSurface()); - EXPECT_TRUE(views[1]->HasFallbackSurface()); - EXPECT_FALSE(views[2]->HasFallbackSurface()); - for (size_t i = 3; i < renderer_count; ++i) - EXPECT_TRUE(views[i]->HasFallbackSurface()); - - // Make all renderers but [0] visible and swap a frame on them, keep [0] - // hidden, it becomes the LRU. - for (size_t i = 1; i < renderer_count; ++i) { - views[i]->Show(); - // The renderers who don't have a frame should be waiting. The ones that - // have a frame should not. - // In practice, [1] has a frame, but anything after has its frame evicted. - EXPECT_EQ(!views[i]->HasFallbackSurface(), - views[i]->released_front_lock_active()); - views[i]->SubmitCompositorFrame( - kArbitraryLocalSurfaceId, - MakeDelegatedFrame(1.f, frame_size, view_rect), nullptr); - // Now everyone has a frame. - EXPECT_FALSE(views[i]->released_front_lock_active()); - EXPECT_TRUE(views[i]->HasFallbackSurface()); - } - EXPECT_FALSE(views[0]->HasFallbackSurface()); - - // Swap a frame on [0], it should be evicted immediately. - views[0]->SubmitCompositorFrame( - kArbitraryLocalSurfaceId, MakeDelegatedFrame(1.f, frame_size, view_rect), - nullptr); - EXPECT_FALSE(views[0]->HasFallbackSurface()); - - // Make [0] visible, and swap a frame on it. Nothing should be evicted - // although we're above the limit. - views[0]->Show(); - // We don't have a frame, wait. - EXPECT_TRUE(views[0]->released_front_lock_active()); - views[0]->SubmitCompositorFrame( - kArbitraryLocalSurfaceId, MakeDelegatedFrame(1.f, frame_size, view_rect), - nullptr); - EXPECT_FALSE(views[0]->released_front_lock_active()); - for (size_t i = 0; i < renderer_count; ++i) - EXPECT_TRUE(views[i]->HasFallbackSurface()); - - // Make [0] hidden, it should evict its frame. - views[0]->Hide(); - EXPECT_FALSE(views[0]->HasFallbackSurface()); - - // Make [0] visible, don't give it a frame, it should be waiting. - views[0]->Show(); - EXPECT_TRUE(views[0]->released_front_lock_active()); - // Make [0] hidden, it should stop waiting. - views[0]->Hide(); - EXPECT_FALSE(views[0]->released_front_lock_active()); - - // Make [1] hidden, resize it. It should drop its frame. - views[1]->Hide(); - EXPECT_TRUE(views[1]->HasFallbackSurface()); - gfx::Size size2(200, 200); - viz::LocalSurfaceId id2 = parent_local_surface_id_allocator_.GenerateId(); - views[1]->SetSize(size2); - EXPECT_FALSE(views[1]->HasFallbackSurface()); - // Show it, it should block until we give it a frame. - views[1]->Show(); - EXPECT_TRUE(views[1]->released_front_lock_active()); - views[1]->SubmitCompositorFrame( - id2, MakeDelegatedFrame(1.f, size2, gfx::Rect(size2)), nullptr); - EXPECT_FALSE(views[1]->released_front_lock_active()); - - for (size_t i = 0; i < renderer_count; ++i) { - views[i]->Destroy(); - delete hosts[i]; - } -} - TEST_F(RenderWidgetHostViewAuraTest, DiscardDelegatedFramesWithLocking) { // TODO: fix for mash. if (base::FeatureList::IsEnabled(features::kMash)) @@ -7348,4 +6868,164 @@ EXPECT_FALSE(has_composition_text()); } +TEST_F(RenderWidgetHostViewAuraTest, FocusReasonNotFocused) { + EXPECT_EQ(ui::TextInputClient::FOCUS_REASON_NONE, + parent_view_->GetFocusReason()); +} + +TEST_F(RenderWidgetHostViewAuraTest, FocusReasonMouse) { + parent_view_->Focus(); + ActivateViewForTextInputManager(parent_view_, ui::TEXT_INPUT_TYPE_TEXT); + + ui::MouseEvent mouse_event(ui::ET_MOUSE_PRESSED, gfx::Point(), gfx::Point(), + ui::EventTimeForNow(), ui::EF_LEFT_MOUSE_BUTTON, + 0); + parent_view_->OnMouseEvent(&mouse_event); + parent_view_->FocusedNodeChanged(true, gfx::Rect()); + + EXPECT_EQ(ui::TextInputClient::FOCUS_REASON_MOUSE, + parent_view_->GetFocusReason()); +} + +TEST_F(RenderWidgetHostViewAuraTest, FocusReasonTouch) { + parent_view_->Focus(); + ActivateViewForTextInputManager(parent_view_, ui::TEXT_INPUT_TYPE_TEXT); + + ui::GestureEventDetails tap_details(ui::ET_GESTURE_TAP_DOWN); + tap_details.set_device_type(ui::GestureDeviceType::DEVICE_TOUCHSCREEN); + tap_details.set_primary_pointer_type( + ui::EventPointerType::POINTER_TYPE_TOUCH); + ui::GestureEvent touch_event(0, 0, 0, base::TimeTicks(), tap_details); + + parent_view_->OnGestureEvent(&touch_event); + parent_view_->FocusedNodeChanged(true, gfx::Rect()); + + EXPECT_EQ(ui::TextInputClient::FOCUS_REASON_TOUCH, + parent_view_->GetFocusReason()); +} + +TEST_F(RenderWidgetHostViewAuraTest, FocusReasonPen) { + parent_view_->Focus(); + ActivateViewForTextInputManager(parent_view_, ui::TEXT_INPUT_TYPE_TEXT); + + ui::GestureEventDetails tap_details(ui::ET_GESTURE_TAP_DOWN); + tap_details.set_device_type(ui::GestureDeviceType::DEVICE_TOUCHSCREEN); + tap_details.set_primary_pointer_type(ui::EventPointerType::POINTER_TYPE_PEN); + ui::GestureEvent pen_event(0, 0, 0, base::TimeTicks(), tap_details); + + parent_view_->OnGestureEvent(&pen_event); + parent_view_->FocusedNodeChanged(true, gfx::Rect()); + + EXPECT_EQ(ui::TextInputClient::FOCUS_REASON_PEN, + parent_view_->GetFocusReason()); +} + +TEST_F(RenderWidgetHostViewAuraTest, FocusReasonMultipleEventsOnSameNode) { + parent_view_->Focus(); + ActivateViewForTextInputManager(parent_view_, ui::TEXT_INPUT_TYPE_TEXT); + + // Touch then pen. + { + ui::GestureEventDetails tap_details(ui::ET_GESTURE_TAP_DOWN); + tap_details.set_device_type(ui::GestureDeviceType::DEVICE_TOUCHSCREEN); + tap_details.set_primary_pointer_type( + ui::EventPointerType::POINTER_TYPE_TOUCH); + ui::GestureEvent touch_event(0, 0, 0, base::TimeTicks(), tap_details); + + parent_view_->OnGestureEvent(&touch_event); + parent_view_->FocusedNodeChanged(true, gfx::Rect()); + } + + { + ui::GestureEventDetails tap_details(ui::ET_GESTURE_TAP_DOWN); + tap_details.set_device_type(ui::GestureDeviceType::DEVICE_TOUCHSCREEN); + tap_details.set_primary_pointer_type( + ui::EventPointerType::POINTER_TYPE_PEN); + ui::GestureEvent pen_event(0, 0, 0, base::TimeTicks(), tap_details); + + parent_view_->OnGestureEvent(&pen_event); + } + + EXPECT_EQ(ui::TextInputClient::FOCUS_REASON_TOUCH, + parent_view_->GetFocusReason()); +} + +#if defined(OS_WIN) +class MockInputMethodKeyboardController + : public ui::InputMethodKeyboardController { + public: + MockInputMethodKeyboardController() = default; + bool DisplayVirtualKeyboard() final { return true; } + + void DismissVirtualKeyboard() final {} + + void AddObserver(ui::InputMethodKeyboardControllerObserver* observer) final { + observer_count_++; + } + + void RemoveObserver( + ui::InputMethodKeyboardControllerObserver* observer) final { + observer_count_--; + } + + bool IsKeyboardVisible() const final { return false; } + + size_t observer_count() const { return observer_count_; } + + private: + size_t observer_count_ = 0; + + DISALLOW_COPY_AND_ASSIGN(MockInputMethodKeyboardController); +}; + +class RenderWidgetHostViewAuraKeyboardMockInputMethod + : public ui::MockInputMethod { + public: + RenderWidgetHostViewAuraKeyboardMockInputMethod() + : MockInputMethod(nullptr) {} + ui::InputMethodKeyboardController* GetInputMethodKeyboardController() + override { + return &keyboard_controller_; + } + size_t keyboard_controller_observer_count() const { + return keyboard_controller_.observer_count(); + } + + private: + MockInputMethodKeyboardController keyboard_controller_; + DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAuraKeyboardMockInputMethod); +}; + +class RenderWidgetHostViewAuraKeyboardTest + : public RenderWidgetHostViewAuraTest { + public: + RenderWidgetHostViewAuraKeyboardTest() = default; + ~RenderWidgetHostViewAuraKeyboardTest() override{}; + void SetUp() override { + SetUpEnvironment(); + aura_test_helper_->host()->SetSharedInputMethod(&input_method_); + } + + size_t keyboard_controller_observer_count() const { + return input_method_.keyboard_controller_observer_count(); + } + + private: + RenderWidgetHostViewAuraKeyboardMockInputMethod input_method_; + DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAuraKeyboardTest); +}; + +TEST_F(RenderWidgetHostViewAuraKeyboardTest, + DISABLED_KeyboardObserverDestroyed) { + parent_view_->FocusedNodeTouched(true); + EXPECT_NE(parent_view_->keyboard_observer_.get(), nullptr); + EXPECT_EQ(keyboard_controller_observer_count(), 1u); + // Detach the RenderWidgetHostViewAura from the IME. + parent_view_->DetachFromInputMethod(); + EXPECT_EQ(parent_view_->keyboard_observer_.get(), nullptr); + EXPECT_EQ(keyboard_controller_observer_count(), 0u); +} + +#endif // defined(OS_WIN) + } // namespace content
diff --git a/content/browser/renderer_host/render_widget_host_view_child_frame_browsertest.cc b/content/browser/renderer_host/render_widget_host_view_child_frame_browsertest.cc index 338456d..6152acba 100644 --- a/content/browser/renderer_host/render_widget_host_view_child_frame_browsertest.cc +++ b/content/browser/renderer_host/render_widget_host_view_child_frame_browsertest.cc
@@ -138,7 +138,6 @@ root->current_frame_host()->GetRenderWidgetHost()->GetRoutingID(); ViewHostMsg_ResizeOrRepaint_ACK_Params params; params.view_size = gfx::Size(75, 75); - params.flags = 0; params.child_allocated_local_surface_id = viz::LocalSurfaceId(10, 10, base::UnguessableToken::Create()); root->current_frame_host()->GetRenderWidgetHost()->OnMessageReceived(
diff --git a/content/browser/renderer_host/render_widget_host_view_cocoa.mm b/content/browser/renderer_host/render_widget_host_view_cocoa.mm index 072ddc2..d52927fb 100644 --- a/content/browser/renderer_host/render_widget_host_view_cocoa.mm +++ b/content/browser/renderer_host/render_widget_host_view_cocoa.mm
@@ -484,6 +484,11 @@ } } + // Because |updateCursor:| changes the current cursor, we have to reset it to + // the default cursor on mouse exit. + if (type == NSMouseExited) + [[NSCursor arrowCursor] set]; + if ([self shouldIgnoreMouseEvent:theEvent]) { // If this is the first such event, send a mouse exit to the host view. if (!mouseEventWasIgnored_) { @@ -1848,6 +1853,23 @@ return requestor; } +- (BOOL)shouldChangeCurrentCursor { + // |updateCursor:| might be called outside the view bounds. Check the mouse + // location before setting the cursor. Also, do not set cursor if it's not a + // key window. + NSPoint location = ui::ConvertPointFromScreenToWindow( + [self window], [NSEvent mouseLocation]); + location = [self convertPoint:location fromView:nil]; + if (![self mouse:location inRect:[self bounds]] || + ![[self window] isKeyWindow]) + return NO; + + if (cursorHidden_ || showingContextMenu_) + return NO; + + return YES; +} + - (void)updateCursor:(NSCursor*)cursor { if (currentCursor_ == cursor) return; @@ -1857,8 +1879,8 @@ // NSWindow's invalidateCursorRectsForView: resets cursor rects but does not // update the cursor instantly. The cursor is updated when the mouse moves. - // Update the cursor by setting the current cursor if not hidden. - if (!cursorHidden_ && !showingContextMenu_) + // Update the cursor instantly by setting the current cursor. + if ([self shouldChangeCurrentCursor]) [currentCursor_ set]; }
diff --git a/content/browser/shape_detection/shape_detection_browsertest.cc b/content/browser/shape_detection/shape_detection_browsertest.cc index 8eb87b5f..8b02c0f 100644 --- a/content/browser/shape_detection/shape_detection_browsertest.cc +++ b/content/browser/shape_detection/shape_detection_browsertest.cc
@@ -49,9 +49,9 @@ public ::testing::WithParamInterface<struct TestParameters> { public: void SetUpCommandLine(base::CommandLine* command_line) override { - // Flags to enable ShapeDetection and DOMRect API. + // Flag to enable ShapeDetection API. CommandLine::ForCurrentProcess()->AppendSwitchASCII( - switches::kEnableBlinkFeatures, "ShapeDetection, GeometryInterfaces"); + switches::kEnableBlinkFeatures, "ShapeDetection"); } protected:
diff --git a/content/browser/site_instance_impl.cc b/content/browser/site_instance_impl.cc index c4e6a92..c8fc1c6 100644 --- a/content/browser/site_instance_impl.cc +++ b/content/browser/site_instance_impl.cc
@@ -468,6 +468,12 @@ if (SiteIsolationPolicy::UseDedicatedProcessesForAllSites()) return true; + // Error pages in main frames do require isolation, however since this is + // missing the context whether this is for a main frame or not, that part + // is enforced in RenderFrameHostManager. + if (url.SchemeIs(kChromeErrorScheme)) + return true; + // Always require a dedicated process for isolated origins. GURL site_url = GetSiteForURL(browser_context, url); auto* policy = ChildProcessSecurityPolicyImpl::GetInstance();
diff --git a/content/browser/site_per_process_hit_test_browsertest.cc b/content/browser/site_per_process_hit_test_browsertest.cc index 27ab30f..4ccf2aa 100644 --- a/content/browser/site_per_process_hit_test_browsertest.cc +++ b/content/browser/site_per_process_hit_test_browsertest.cc
@@ -2122,22 +2122,16 @@ } // namespace +// Flaky: https://crbug.com/833380 IN_PROC_BROWSER_TEST_P(SitePerProcessHitTestBrowserTest, - CursorUpdateReceivedFromCrossSiteIframe) { + DISABLED_CursorUpdateReceivedFromCrossSiteIframe) { CursorUpdateReceivedFromCrossSiteIframeHelper(shell(), embedded_test_server()); } -#if defined(THREAD_SANITIZER) // Flaky: https://crbug.com/833380 -#define MAYBE_CursorUpdateReceivedFromCrossSiteIframe \ - DISABLED_CursorUpdateReceivedFromCrossSiteIframe -#else -#define MAYBE_CursorUpdateReceivedFromCrossSiteIframe \ - CursorUpdateReceivedFromCrossSiteIframe -#endif IN_PROC_BROWSER_TEST_P(SitePerProcessHighDPIHitTestBrowserTest, - MAYBE_CursorUpdateReceivedFromCrossSiteIframe) { + DISABLED_CursorUpdateReceivedFromCrossSiteIframe) { CursorUpdateReceivedFromCrossSiteIframeHelper(shell(), embedded_test_server()); }
diff --git a/content/browser/speech/speech_recognition_browsertest.cc b/content/browser/speech/speech_recognition_browsertest.cc index fc367e3d1..bc55d03 100644 --- a/content/browser/speech/speech_recognition_browsertest.cc +++ b/content/browser/speech/speech_recognition_browsertest.cc
@@ -176,9 +176,9 @@ std::unique_ptr<media::AudioBus> audio_bus = media::AudioBus::Create(audio_params); - audio_bus->FromInterleaved(&audio_buffer.get()[0], - audio_bus->frames(), - audio_params.bits_per_sample() / 8); + audio_bus->FromInterleaved<media::SignedInt16SampleTypeTraits>( + reinterpret_cast<int16_t*>(&audio_buffer.get()[0]), + audio_bus->frames()); controller->sync_writer()->Write(audio_bus.get(), 0.0, false, base::TimeTicks::Now()); } @@ -188,9 +188,9 @@ test_audio_input_controller_factory_.controller(); ASSERT_TRUE(controller); const media::AudioParameters& audio_params = controller->audio_parameters(); - const size_t buffer_size = audio_params.GetBytesPerBuffer(); - const int ms_per_buffer = audio_params.frames_per_buffer() * 1000 / - audio_params.sample_rate(); + const size_t buffer_size = + audio_params.GetBytesPerBuffer(media::kSampleFormatS16); + const int ms_per_buffer = audio_params.GetBufferDuration().InMilliseconds(); // We can only simulate durations that are integer multiples of the // buffer size. In this regard see // SpeechRecognitionEngine::GetDesiredAudioChunkDurationMs().
diff --git a/content/browser/speech/speech_recognizer_impl.cc b/content/browser/speech/speech_recognizer_impl.cc index 7cb388ad..5da6517 100644 --- a/content/browser/speech/speech_recognizer_impl.cc +++ b/content/browser/speech/speech_recognizer_impl.cc
@@ -117,9 +117,6 @@ media::AudioSystem* SpeechRecognizerImpl::audio_system_for_tests_ = nullptr; media::AudioManager* SpeechRecognizerImpl::audio_manager_for_tests_ = nullptr; -static_assert(SpeechRecognizerImpl::kNumBitsPerAudioSample % 8 == 0, - "kNumBitsPerAudioSample must be a multiple of 8"); - // SpeechRecognizerImpl::OnDataConverter implementation SpeechRecognizerImpl::OnDataConverter::OnDataConverter( @@ -156,12 +153,15 @@ // See http://crbug.com/506051 for details. audio_converter_.Convert(output_bus_.get()); // Create an audio chunk based on the converted result. - scoped_refptr<AudioChunk> chunk( - new AudioChunk(output_parameters_.GetBytesPerBuffer(), - output_parameters_.bits_per_sample() / 8)); - output_bus_->ToInterleaved(output_bus_->frames(), - output_parameters_.bits_per_sample() / 8, - chunk->writable_data()); + scoped_refptr<AudioChunk> chunk(new AudioChunk( + output_parameters_.GetBytesPerBuffer(media::kSampleFormatS16), + kNumBitsPerAudioSample / 8)); + + static_assert(SpeechRecognizerImpl::kNumBitsPerAudioSample == 16, + "kNumBitsPerAudioSample must match interleaving type."); + output_bus_->ToInterleaved<media::SignedInt16SampleTypeTraits>( + output_bus_->frames(), + reinterpret_cast<int16_t*>(chunk->writable_data())); return chunk; } @@ -598,9 +598,9 @@ // Audio converter shall provide audio based on these parameters as output. // Hard coded, WebSpeech specific parameters are utilized here. int frames_per_buffer = (kAudioSampleRate * chunk_duration_ms) / 1000; - AudioParameters output_parameters = AudioParameters( - AudioParameters::AUDIO_PCM_LOW_LATENCY, kChannelLayout, kAudioSampleRate, - kNumBitsPerAudioSample, frames_per_buffer); + AudioParameters output_parameters = + AudioParameters(AudioParameters::AUDIO_PCM_LOW_LATENCY, kChannelLayout, + kAudioSampleRate, frames_per_buffer); DVLOG(1) << "SRI::output_parameters: " << output_parameters.AsHumanReadableString();
diff --git a/content/browser/storage_partition_impl.cc b/content/browser/storage_partition_impl.cc index 6f9aacb..a57cfed 100644 --- a/content/browser/storage_partition_impl.cc +++ b/content/browser/storage_partition_impl.cc
@@ -657,11 +657,11 @@ base::BindOnce(&BlobStorageContextGetterForStorage, blob_context); partition->blob_url_loader_factory_ = BlobURLLoaderFactory::Create(std::move(blob_getter)); - - partition->url_loader_factory_getter_ = new URLLoaderFactoryGetter(); - partition->url_loader_factory_getter_->Initialize(partition.get()); } + partition->url_loader_factory_getter_ = new URLLoaderFactoryGetter(); + partition->url_loader_factory_getter_->Initialize(partition.get()); + partition->service_worker_context_->Init( path, quota_manager_proxy.get(), context->GetSpecialStoragePolicy(), blob_context.get(), partition->url_loader_factory_getter_.get());
diff --git a/content/browser/storage_partition_impl_map.cc b/content/browser/storage_partition_impl_map.cc index 7b1ad2e9..82f60b6 100644 --- a/content/browser/storage_partition_impl_map.cc +++ b/content/browser/storage_partition_impl_map.cc
@@ -436,15 +436,17 @@ browser_context_->CreateMediaRequestContextForStoragePartition( partition->GetPath(), in_memory)); - if (ServiceWorkerUtils::IsServicificationEnabled() && - !base::FeatureList::IsEnabled(network::features::kNetworkService)) { + if (!base::FeatureList::IsEnabled(network::features::kNetworkService)) { // This needs to happen after SetURLRequestContext() since we need this // code path only for non-NetworkService case where NetworkContext needs to // be initialized using |url_request_context_|, which is initialized by // SetURLRequestContext(). DCHECK(partition->url_loader_factory_getter()); - DCHECK(partition->url_request_context_); - partition->url_loader_factory_getter()->HandleFactoryRequests(); + // TODO(crbug.com/826869): |url_request_context_| is not configured + // correctly in some unittests. We should fix those tests and turn this 'if' + // into a DCHECK. + if (partition->url_request_context_) + partition->url_loader_factory_getter()->HandleFactoryRequests(); } PostCreateInitialization(partition, in_memory);
diff --git a/content/browser/url_loader_factory_getter.cc b/content/browser/url_loader_factory_getter.cc index cc0ae84d..62f3fc7 100644 --- a/content/browser/url_loader_factory_getter.cc +++ b/content/browser/url_loader_factory_getter.cc
@@ -8,6 +8,7 @@ #include "base/feature_list.h" #include "base/lazy_instance.h" #include "content/browser/storage_partition_impl.h" +#include "content/common/service_worker/service_worker_utils.h" #include "services/network/public/cpp/features.h" #include "services/network/public/cpp/shared_url_loader_factory.h" #include "services/network/public/mojom/network_service.mojom.h" @@ -136,8 +137,16 @@ DCHECK(pending_blob_factory_request_.is_pending()); HandleNetworkFactoryRequestOnUIThread( std::move(pending_network_factory_request_)); - partition_->GetBlobURLLoaderFactory()->HandleRequest( - std::move(pending_blob_factory_request_)); + + // |partition->blob_url_loader_factory_| is not available without the feature. + if (base::FeatureList::IsEnabled(network::features::kNetworkService) || + ServiceWorkerUtils::IsServicificationEnabled()) { + DCHECK(partition_->GetBlobURLLoaderFactory()); + partition_->GetBlobURLLoaderFactory()->HandleRequest( + std::move(pending_blob_factory_request_)); + } else { + pending_blob_factory_request_ = nullptr; + } } void URLLoaderFactoryGetter::OnStoragePartitionDestroyed() {
diff --git a/content/browser/url_loader_factory_getter.h b/content/browser/url_loader_factory_getter.h index e1509fe..da31f8c 100644 --- a/content/browser/url_loader_factory_getter.h +++ b/content/browser/url_loader_factory_getter.h
@@ -67,7 +67,8 @@ network::mojom::URLLoaderFactoryRequest network_factory_request); // Called on the IO thread to get the URLLoaderFactory to the blob service. - // The pointer shouldn't be cached. + // Must be used only if the network service or servicified service worker is + // enabled. The pointer shouldn't be cached. CONTENT_EXPORT network::mojom::URLLoaderFactory* GetBlobFactory(); // Overrides the network URLLoaderFactory for subsequent requests. Passing a
diff --git a/content/browser/webauth/authenticator_impl.cc b/content/browser/webauth/authenticator_impl.cc index 08a8a7b..4083268b 100644 --- a/content/browser/webauth/authenticator_impl.cc +++ b/content/browser/webauth/authenticator_impl.cc
@@ -353,6 +353,11 @@ weak_factory_(this) { DCHECK(render_frame_host_); DCHECK(timer_); + + protocols_.insert(device::FidoTransportProtocol::kUsbHumanInterfaceDevice); + if (base::FeatureList::IsEnabled(features::kWebAuthBle)) { + protocols_.insert(device::FidoTransportProtocol::kBluetoothLowEnergy); + } } AuthenticatorImpl::~AuthenticatorImpl() {}
diff --git a/content/child/runtime_features.cc b/content/child/runtime_features.cc index 0c662213..db96199 100644 --- a/content/child/runtime_features.cc +++ b/content/child/runtime_features.cc
@@ -440,6 +440,11 @@ WebRuntimeFeatures::EnableOffMainThreadWebSocket( base::FeatureList::IsEnabled(features::kOffMainThreadWebSocket)); + if (base::FeatureList::IsEnabled( + features::kExperimentalProductivityFeatures)) { + WebRuntimeFeatures::EnableExperimentalProductivityFeatures(true); + } + // End individual features. // Do not add individual features below this line.
diff --git a/content/common/resource_messages.h b/content/common/resource_messages.h index edcf425..c31444d 100644 --- a/content/common/resource_messages.h +++ b/content/common/resource_messages.h
@@ -21,7 +21,7 @@ #include "net/base/request_priority.h" #include "net/http/http_response_info.h" #include "net/traffic_annotation/network_traffic_annotation.h" -#include "services/network/public/cpp/network_param_ipc_traits.h" +#include "services/network/public/cpp/network_ipc_param_traits.h" #include "third_party/blink/public/platform/web_mixed_content_context_type.h" #ifndef INTERNAL_CONTENT_COMMON_RESOURCE_MESSAGES_H_
diff --git a/content/common/url_schemes.cc b/content/common/url_schemes.cc index a269e1de..7da6572 100644 --- a/content/common/url_schemes.cc +++ b/content/common/url_schemes.cc
@@ -58,6 +58,7 @@ url::AddStandardScheme(kChromeDevToolsScheme, url::SCHEME_WITH_HOST); url::AddStandardScheme(kChromeUIScheme, url::SCHEME_WITH_HOST); url::AddStandardScheme(kGuestScheme, url::SCHEME_WITH_HOST); + url::AddStandardScheme(kChromeErrorScheme, url::SCHEME_WITH_HOST); for (auto& scheme : schemes.standard_schemes) url::AddStandardScheme(scheme.c_str(), url::SCHEME_WITH_HOST);
diff --git a/content/common/view_messages.h b/content/common/view_messages.h index 0a677eb..17f0702 100644 --- a/content/common/view_messages.h +++ b/content/common/view_messages.h
@@ -175,7 +175,6 @@ IPC_STRUCT_TRAITS_MEMBER(visible_viewport_size) IPC_STRUCT_TRAITS_MEMBER(is_fullscreen_granted) IPC_STRUCT_TRAITS_MEMBER(display_mode) - IPC_STRUCT_TRAITS_MEMBER(needs_resize_ack) IPC_STRUCT_TRAITS_MEMBER(content_source_id) IPC_STRUCT_TRAITS_MEMBER(capture_sequence_number) IPC_STRUCT_TRAITS_END() @@ -289,20 +288,6 @@ // view size. IPC_STRUCT_MEMBER(gfx::Size, view_size) - // The following describes the various bits that may be set in flags: - // - // ViewHostMsg_ResizeOrRepaint_ACK_Flags::IS_RESIZE_ACK - // Indicates that this is a response to a ViewMsg_Resize message. - // - // ViewHostMsg_ResizeOrRepaint_ACK_Flags::IS_REPAINT_ACK - // Indicates that this is a response to a ViewMsg_Repaint message. - // - // If flags is zero, then this message corresponds to an unsolicited paint - // request by the render view. Any of the above bits may be set in flags, - // which would indicate that this paint message is an ACK for multiple - // request messages. - IPC_STRUCT_MEMBER(int, flags) - // The child-allocated local surface id for the parent to use. IPC_STRUCT_MEMBER(base::Optional<viz::LocalSurfaceId>, child_allocated_local_surface_id) @@ -415,11 +400,6 @@ // Expects a ClosePage_ACK message when finished. IPC_MESSAGE_ROUTED0(ViewMsg_ClosePage) -// Notifies the renderer that a paint is to be generated for the rectangle -// passed in. -IPC_MESSAGE_ROUTED1(ViewMsg_Repaint, - gfx::Size /* The view size to be repainted */) - // Notification that a move or resize renderer's containing window has // started. IPC_MESSAGE_ROUTED0(ViewMsg_MoveOrResizeStarted)
diff --git a/content/common/visual_properties.h b/content/common/visual_properties.h index 3c4390a..bdeab1c 100644 --- a/content/common/visual_properties.h +++ b/content/common/visual_properties.h
@@ -70,11 +70,6 @@ // The display mode. blink::WebDisplayMode display_mode = blink::kWebDisplayModeUndefined; - // If set, requests the renderer to reply with a - // ViewHostMsg_ResizeOrRepaint_ACK with the - // ViewHostMsg_ResizeOrRepaint_ACK_Flags::IS_RESIZE_ACK bit set in flags. - bool needs_resize_ack = false; - // This variable is increased after each cross-document navigation. If the // renderer receives a VisualProperties with stale content_source_id, it still // performs the resize but doesn't use the given LocalSurfaceId.
diff --git a/content/public/browser/child_process_termination_info.h b/content/public/browser/child_process_termination_info.h index 01c67b5..fcdef5c 100644 --- a/content/public/browser/child_process_termination_info.h +++ b/content/public/browser/child_process_termination_info.h
@@ -6,6 +6,7 @@ #define CONTENT_PUBLIC_BROWSER_CHILD_PROCESS_TERMINATION_INFO_H_ #include "base/process/kill.h" +#include "base/time/time.h" #include "build/build_config.h" #include "content/public/common/result_codes.h" @@ -20,6 +21,10 @@ // posix, from GetExitCodeProcess on Windows). int exit_code = RESULT_CODE_NORMAL_EXIT; + // Time delta between 1) the process start and 2) the time when + // ChildProcessTerminationInfo is computed. + base::TimeDelta uptime = base::TimeDelta::Max(); + #if defined(OS_ANDROID) // True if child service has strong or moderate binding at time of death. bool has_oom_protection_bindings = false;
diff --git a/content/public/browser/content_browser_client.cc b/content/public/browser/content_browser_client.cc index 66d869f..f9378cd76 100644 --- a/content/public/browser/content_browser_client.cc +++ b/content/public/browser/content_browser_client.cc
@@ -166,6 +166,10 @@ return false; } +bool ContentBrowserClient::ShouldIsolateErrorPage(bool in_main_frame) { + return in_main_frame; +} + std::unique_ptr<media::AudioManager> ContentBrowserClient::CreateAudioManager( media::AudioLogFactory* audio_log_factory) { return nullptr;
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h index 0a34762..72e9c55 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h
@@ -366,6 +366,9 @@ const GURL& current_url, const GURL& new_url); + // Returns true if error page should be isolated in its own process. + virtual bool ShouldIsolateErrorPage(bool in_main_frame); + // Returns true if the passed in URL should be assigned as the site of the // current SiteInstance, if it does not yet have a site. virtual bool ShouldAssignSiteForURL(const GURL& url);
diff --git a/content/public/browser/keyboard_event_processing_result.h b/content/public/browser/keyboard_event_processing_result.h index 4030a52..ba43542c 100644 --- a/content/public/browser/keyboard_event_processing_result.h +++ b/content/public/browser/keyboard_event_processing_result.h
@@ -11,6 +11,9 @@ // The event was handled. HANDLED, + // The event was handled, and we want to be notified of the keyup event too. + HANDLED_WANTS_KEY_UP, + #if defined(USE_AURA) // The event was handled, but don't update the underlying event. A value // HANDLED results in calling ui::Event::SetHandled(), where as this does not.
diff --git a/content/public/browser/picture_in_picture_window_controller.h b/content/public/browser/picture_in_picture_window_controller.h index b340b37..03842e5 100644 --- a/content/public/browser/picture_in_picture_window_controller.h +++ b/content/public/browser/picture_in_picture_window_controller.h
@@ -39,6 +39,7 @@ const gfx::Size& natural_size) = 0; virtual OverlayWindow* GetWindowForTesting() = 0; virtual void UpdateLayerBounds() = 0; + virtual bool IsPlayerActive() = 0; virtual WebContents* GetInitiatorWebContents() = 0; // Commands.
diff --git a/content/public/common/common_param_traits_macros.h b/content/public/common/common_param_traits_macros.h index 3b72878..b297eae0 100644 --- a/content/public/common/common_param_traits_macros.h +++ b/content/public/common/common_param_traits_macros.h
@@ -15,7 +15,7 @@ #include "content/public/common/webplugininfo_param_traits.h" #include "ipc/ipc_message_macros.h" #include "net/base/network_change_notifier.h" -#include "services/network/public/cpp/network_param_ipc_traits.h" +#include "services/network/public/cpp/network_ipc_param_traits.h" #include "third_party/blink/public/platform/modules/permissions/permission_status.mojom.h" #include "third_party/blink/public/platform/web_history_scroll_restoration_type.h" #include "third_party/blink/public/platform/web_point.h"
diff --git a/content/public/common/content_features.cc b/content/public/common/content_features.cc index 9f648a61..573e9bd2 100644 --- a/content/public/common/content_features.cc +++ b/content/public/common/content_features.cc
@@ -499,6 +499,10 @@ const base::Feature kWebGLImageChromium{"WebGLImageChromium", base::FEATURE_ENABLED_BY_DEFAULT}; +// Enable experimental policy-controlled features and LAPIs +const base::Feature kExperimentalProductivityFeatures{ + "ExperimentalProductivityFeatures", base::FEATURE_DISABLED_BY_DEFAULT}; + // The JavaScript API for payments on the web. const base::Feature kWebPayments{"WebPayments", base::FEATURE_ENABLED_BY_DEFAULT};
diff --git a/content/public/common/content_features.h b/content/public/common/content_features.h index 862cc3b..1b95342b 100644 --- a/content/public/common/content_features.h +++ b/content/public/common/content_features.h
@@ -34,6 +34,7 @@ CONTENT_EXPORT extern const base::Feature kCrossSiteDocumentBlockingAlways; CONTENT_EXPORT extern const base::Feature kCrossSiteDocumentBlockingIfIsolating; CONTENT_EXPORT extern const base::Feature kDataSaverHoldback; +CONTENT_EXPORT extern const base::Feature kExperimentalProductivityFeatures; CONTENT_EXPORT extern const base::Feature kExpensiveBackgroundTimerThrottling; CONTENT_EXPORT extern const base::Feature kExtendedMouseButtons; CONTENT_EXPORT extern const base::Feature kFontCacheScaling;
diff --git a/content/public/common/media_stream_request.cc b/content/public/common/media_stream_request.cc index 2b666452..d2e688e6 100644 --- a/content/public/common/media_stream_request.cc +++ b/content/public/common/media_stream_request.cc
@@ -66,7 +66,6 @@ input(media::AudioParameters::AUDIO_FAKE, static_cast<media::ChannelLayout>(channel_layout), sample_rate, - 16, frames_per_buffer) { DCHECK(input.IsValid()); }
diff --git a/content/public/renderer/media_stream_utils.cc b/content/public/renderer/media_stream_utils.cc index 1aeea995..15d6f12c 100644 --- a/content/public/renderer/media_stream_utils.cc +++ b/content/public/renderer/media_stream_utils.cc
@@ -71,7 +71,7 @@ const media::AudioParameters params( media::AudioParameters::AUDIO_PCM_LOW_LATENCY, channel_layout, - sample_rate, sizeof(int16_t) * 8, frames_per_buffer); + sample_rate, frames_per_buffer); if (!params.IsValid()) { DLOG(ERROR) << "Invalid audio parameters."; return false;
diff --git a/content/public/renderer/render_view.h b/content/public/renderer/render_view.h index b0b765f6..ee8c577 100644 --- a/content/public/renderer/render_view.h +++ b/content/public/renderer/render_view.h
@@ -95,10 +95,6 @@ // false, but set to true by some tests. virtual bool GetContentStateImmediately() const = 0; - // Notifies the renderer that a paint is to be generated for the size - // passed in. - virtual void Repaint(const gfx::Size& size) = 0; - // Inject edit commands to be used for the next keyboard event. // TODO(alexmos): Currently, these are used only by BlinkTestRunner. They // should be removed from RenderView and instead be plumbed through the
diff --git a/content/public/test/browser_test_utils.cc b/content/public/test/browser_test_utils.cc index 9cb8bb1..229ff2a 100644 --- a/content/public/test/browser_test_utils.cc +++ b/content/public/test/browser_test_utils.cc
@@ -2582,7 +2582,6 @@ int routing_id = guest_rwh_impl->GetRoutingID(); ViewHostMsg_ResizeOrRepaint_ACK_Params params; params.view_size = gfx::Size(75, 75); - params.flags = 0; params.child_allocated_local_surface_id = viz::LocalSurfaceId( current_id.parent_sequence_number(), current_id.child_sequence_number() + 1, current_id.embed_token());
diff --git a/content/renderer/accessibility/blink_ax_enum_conversion.cc b/content/renderer/accessibility/blink_ax_enum_conversion.cc index 8643912..d4f186f 100644 --- a/content/renderer/accessibility/blink_ax_enum_conversion.cc +++ b/content/renderer/accessibility/blink_ax_enum_conversion.cc
@@ -20,8 +20,10 @@ if (o.CanSetFocusAttribute()) dst->AddState(ax::mojom::State::kFocusable); - if (o.Role() == blink::kWebAXRolePopUpButton || o.AriaHasPopup()) - dst->AddState(ax::mojom::State::kHaspopup); + if (o.HasPopup()) + dst->SetHasPopup(AXHasPopupFromBlink(o.HasPopup())); + else if (o.Role() == blink::kWebAXRolePopUpButton) + dst->SetHasPopup(ax::mojom::HasPopup::kMenu); if (o.IsHovered()) dst->AddState(ax::mojom::State::kHovered); @@ -488,6 +490,28 @@ return ax::mojom::AriaCurrentState::kNone; } +ax::mojom::HasPopup AXHasPopupFromBlink(blink::WebAXHasPopup has_popup) { + switch (has_popup) { + case blink::kWebAXHasPopupFalse: + return ax::mojom::HasPopup::kFalse; + case blink::kWebAXHasPopupTrue: + return ax::mojom::HasPopup::kTrue; + case blink::kWebAXHasPopupMenu: + return ax::mojom::HasPopup::kMenu; + case blink::kWebAXHasPopupListbox: + return ax::mojom::HasPopup::kListbox; + case blink::kWebAXHasPopupTree: + return ax::mojom::HasPopup::kTree; + case blink::kWebAXHasPopupGrid: + return ax::mojom::HasPopup::kGrid; + case blink::kWebAXHasPopupDialog: + return ax::mojom::HasPopup::kDialog; + } + + NOTREACHED(); + return ax::mojom::HasPopup::kFalse; +} + ax::mojom::InvalidState AXInvalidStateFromBlink( blink::WebAXInvalidState invalid_state) { switch (invalid_state) {
diff --git a/content/renderer/accessibility/blink_ax_enum_conversion.h b/content/renderer/accessibility/blink_ax_enum_conversion.h index 18b471b..7d93f4a 100644 --- a/content/renderer/accessibility/blink_ax_enum_conversion.h +++ b/content/renderer/accessibility/blink_ax_enum_conversion.h
@@ -39,6 +39,8 @@ ax::mojom::AriaCurrentState AXAriaCurrentStateFromBlink( blink::WebAXAriaCurrentState aria_current_state); +ax::mojom::HasPopup AXHasPopupFromBlink(blink::WebAXHasPopup has_popup); + ax::mojom::InvalidState AXInvalidStateFromBlink( blink::WebAXInvalidState invalid_state);
diff --git a/content/renderer/accessibility/blink_ax_tree_source.cc b/content/renderer/accessibility/blink_ax_tree_source.cc index 5cf416ed..1ff0d47 100644 --- a/content/renderer/accessibility/blink_ax_tree_source.cc +++ b/content/renderer/accessibility/blink_ax_tree_source.cc
@@ -549,6 +549,11 @@ dst->AddFloatAttribute(ax::mojom::FloatAttribute::kFontSize, src.FontSize()); + if (src.HasPopup()) + dst->SetHasPopup(AXHasPopupFromBlink(src.HasPopup())); + else if (src.Role() == blink::kWebAXRolePopUpButton) + dst->SetHasPopup(ax::mojom::HasPopup::kMenu); + if (src.AriaCurrentState()) { dst->AddIntAttribute(ax::mojom::IntAttribute::kAriaCurrentState, static_cast<int32_t>(AXAriaCurrentStateFromBlink(
diff --git a/content/renderer/devtools/render_widget_screen_metrics_emulator.cc b/content/renderer/devtools/render_widget_screen_metrics_emulator.cc index 9ea5d04f..dcab579 100644 --- a/content/renderer/devtools/render_widget_screen_metrics_emulator.cc +++ b/content/renderer/devtools/render_widget_screen_metrics_emulator.cc
@@ -24,10 +24,6 @@ original_window_screen_rect_(window_screen_rect) {} RenderWidgetScreenMetricsEmulator::~RenderWidgetScreenMetricsEmulator() { - // needs_resize_ack was handled during OnSynchronizeVisualProperties() and may - // cause a DCHECK to fail in RenderWidget if not cleared - // (https://crbug.com/635560). - original_visual_properties_.needs_resize_ack = false; delegate_->SynchronizeVisualProperties(original_visual_properties_); delegate_->SetScreenMetricsEmulationParameters(false, emulation_params_); delegate_->SetScreenRects(original_view_screen_rect_, @@ -136,7 +132,6 @@ modified_visual_properties.new_size = applied_widget_rect_.size(); modified_visual_properties.visible_viewport_size = applied_widget_rect_.size(); - modified_visual_properties.needs_resize_ack = false; delegate_->SynchronizeVisualProperties(modified_visual_properties); } @@ -145,8 +140,7 @@ original_visual_properties_ = params; Apply(); - if (params.needs_resize_ack) - delegate_->Redraw(); + delegate_->Redraw(); } void RenderWidgetScreenMetricsEmulator::OnUpdateWindowScreenRect(
diff --git a/content/renderer/media/audio_renderer_mixer_manager.cc b/content/renderer/media/audio_renderer_mixer_manager.cc index 54657ba..94255357 100644 --- a/content/renderer/media/audio_renderer_mixer_manager.cc +++ b/content/renderer/media/audio_renderer_mixer_manager.cc
@@ -82,11 +82,9 @@ DCHECK_NE(output_buffer_size, 0); - // Force to 16-bit output for now since we know that works everywhere; - // ChromeOS does not support other bit depths. media::AudioParameters params(input_params.format(), input_params.channel_layout(), - output_sample_rate, 16, output_buffer_size); + output_sample_rate, output_buffer_size); // Use the actual channel count when the channel layout is "DISCRETE". if (input_params.channel_layout() == media::CHANNEL_LAYOUT_DISCRETE)
diff --git a/content/renderer/media/audio_renderer_mixer_manager.h b/content/renderer/media/audio_renderer_mixer_manager.h index 48000535..f7821b0 100644 --- a/content/renderer/media/audio_renderer_mixer_manager.h +++ b/content/renderer/media/audio_renderer_mixer_manager.h
@@ -37,12 +37,6 @@ // // There should only be one instance of AudioRendererMixerManager per render // thread. -// -// TODO(dalecurtis): Right now we require AudioParameters to be an exact match -// when we should be able to ignore bits per channel since we're only dealing -// with floats. However, bits per channel is currently used to interleave the -// audio data by AudioOutputDevice::AudioThreadCallback::Process for consumption -// via the shared memory. See http://crbug.com/114700. class CONTENT_EXPORT AudioRendererMixerManager : public media::AudioRendererMixerPool { public: @@ -102,7 +96,7 @@ }; // Custom compare operator for the AudioRendererMixerMap. Allows reuse of - // mixers where only irrelevant keys mismatch; e.g., effects, bits per sample. + // mixers where only irrelevant keys mismatch. struct MixerKeyCompare { bool operator()(const MixerKey& a, const MixerKey& b) const { if (a.source_render_frame_id != b.source_render_frame_id) @@ -117,9 +111,9 @@ // adding support for it. DCHECK_NE(media::AudioLatency::LATENCY_EXACT_MS, a.latency); - // Ignore effects(), bits_per_sample(), format(), and frames_per_buffer(), - // these parameters do not affect mixer reuse. All AudioRendererMixer - // units disable FIFO, so frames_per_buffer() can be safely ignored. + // Ignore effects(), format(), and frames_per_buffer(), these parameters + // do not affect mixer reuse. All AudioRendererMixer units disable FIFO, + // so frames_per_buffer() can be safely ignored. if (a.params.channel_layout() != b.params.channel_layout()) return a.params.channel_layout() < b.params.channel_layout();
diff --git a/content/renderer/media/audio_renderer_mixer_manager_unittest.cc b/content/renderer/media/audio_renderer_mixer_manager_unittest.cc index ae949e3..bba7a3e 100644 --- a/content/renderer/media/audio_renderer_mixer_manager_unittest.cc +++ b/content/renderer/media/audio_renderer_mixer_manager_unittest.cc
@@ -24,7 +24,6 @@ namespace content { namespace { -const int kBitsPerChannel = 16; const int kSampleRate = 48000; const int kBufferSize = 8192; const int kHardwareSampleRate = 44100; @@ -97,7 +96,6 @@ AudioParameters(AudioParameters::AUDIO_PCM_LINEAR, kChannelLayout, kHardwareSampleRate, - kBitsPerChannel, kHardwareBufferSize))), mock_sink_no_device_(new media::MockAudioRendererSink( kNonexistentDeviceId, @@ -174,8 +172,7 @@ EXPECT_EQ(0, mixer_count()); media::AudioParameters params1(media::AudioParameters::AUDIO_PCM_LINEAR, - kChannelLayout, kSampleRate, kBitsPerChannel, - kBufferSize); + kChannelLayout, kSampleRate, kBufferSize); media::AudioRendererMixer* mixer1 = GetMixer(kRenderFrameId, params1, AudioLatency::LATENCY_PLAYBACK, @@ -193,9 +190,9 @@ ReturnMixer(mixer1); EXPECT_EQ(1, mixer_count()); - media::AudioParameters params2( - AudioParameters::AUDIO_PCM_LINEAR, kAnotherChannelLayout, kSampleRate * 2, - kBitsPerChannel, kBufferSize * 2); + media::AudioParameters params2(AudioParameters::AUDIO_PCM_LINEAR, + kAnotherChannelLayout, kSampleRate * 2, + kBufferSize * 2); media::AudioRendererMixer* mixer2 = GetMixer(kRenderFrameId, params2, AudioLatency::LATENCY_PLAYBACK, kDefaultDeviceId, nullptr); @@ -225,7 +222,6 @@ media::AudioParameters params1(AudioParameters::AUDIO_PCM_LINEAR, kChannelLayout, kSampleRate, - kBitsPerChannel, kBufferSize); media::AudioRendererMixer* mixer1 = GetMixer(kRenderFrameId, params1, AudioLatency::LATENCY_PLAYBACK, @@ -238,7 +234,6 @@ media::AudioParameters params2(AudioParameters::AUDIO_PCM_LOW_LATENCY, kChannelLayout, kSampleRate * 2, - kBitsPerChannel * 2, kBufferSize * 2); media::AudioRendererMixer* mixer2 = GetMixer(kRenderFrameId, params2, AudioLatency::LATENCY_PLAYBACK, @@ -252,7 +247,6 @@ media::AudioParameters params3(AudioParameters::AUDIO_PCM_LOW_LATENCY, kAnotherChannelLayout, kSampleRate, - kBitsPerChannel, kBufferSize); ASSERT_NE(params3.channel_layout(), params1.channel_layout()); media::AudioRendererMixer* mixer3 = @@ -281,9 +275,8 @@ // We expect 2 mixers to be created; each of them should release the sink. EXPECT_CALL(*this, ReleaseSinkPtr(mock_sink_.get())).Times(2); - media::AudioParameters params( - AudioParameters::AUDIO_PCM_LINEAR, kChannelLayout, kSampleRate, - kBitsPerChannel, kBufferSize); + media::AudioParameters params(AudioParameters::AUDIO_PCM_LINEAR, + kChannelLayout, kSampleRate, kBufferSize); // Create two mixer inputs and ensure this doesn't instantiate any mixers yet. EXPECT_EQ(0, mixer_count()); @@ -334,8 +327,7 @@ EXPECT_CALL(*this, ReleaseSinkPtr(mock_sink_matched_device_.get())).Times(1); media::AudioParameters params(AudioParameters::AUDIO_PCM_LINEAR, - kChannelLayout, kSampleRate, kBitsPerChannel, - kBufferSize); + kChannelLayout, kSampleRate, kBufferSize); media::FakeAudioRenderCallback callback(0, kSampleRate); EXPECT_EQ(0, mixer_count()); @@ -409,8 +401,7 @@ EXPECT_CALL(*this, ReleaseSinkPtr(mock_sink_.get())).Times(2); media::AudioParameters params(AudioParameters::AUDIO_PCM_LINEAR, - kChannelLayout, kSampleRate, kBitsPerChannel, - kBufferSize); + kChannelLayout, kSampleRate, kBufferSize); media::AudioRendererMixer* mixer1 = GetMixer(kRenderFrameId, params, AudioLatency::LATENCY_PLAYBACK, kDefaultDeviceId, nullptr); @@ -441,8 +432,7 @@ EXPECT_CALL(*this, ReleaseSinkPtr(mock_sink_.get())).Times(1); media::AudioParameters params(AudioParameters::AUDIO_PCM_LINEAR, - kChannelLayout, kSampleRate, kBitsPerChannel, - kBufferSize); + kChannelLayout, kSampleRate, kBufferSize); media::AudioRendererMixer* mixer1 = GetMixer(kRenderFrameId, params, AudioLatency::LATENCY_PLAYBACK, kDefaultDeviceId, nullptr); @@ -471,8 +461,7 @@ EXPECT_CALL(*this, ReleaseSinkPtr(mock_sink_no_device_.get())).Times(1); media::AudioParameters params(AudioParameters::AUDIO_PCM_LINEAR, - kChannelLayout, kSampleRate, kBitsPerChannel, - kBufferSize); + kChannelLayout, kSampleRate, kBufferSize); media::OutputDeviceStatus device_status = media::OUTPUT_DEVICE_STATUS_OK; media::AudioRendererMixer* mixer = @@ -494,8 +483,7 @@ EXPECT_EQ(0, mixer_count()); media::AudioParameters params(AudioParameters::AUDIO_PCM_LINEAR, - kChannelLayout, kSampleRate, kBitsPerChannel, - kBufferSize); + kChannelLayout, kSampleRate, kBufferSize); media::AudioRendererMixer* mixer1 = GetMixer(kRenderFrameId, params, AudioLatency::LATENCY_PLAYBACK, kDefaultDeviceId, nullptr); @@ -564,7 +552,7 @@ EXPECT_CALL(*this, ReleaseSinkPtr(mock_sink_.get())).Times(1); media::AudioParameters params(AudioParameters::AUDIO_PCM_LINEAR, - kChannelLayout, 32000, kBitsPerChannel, 512); + kChannelLayout, 32000, 512); params.set_latency_tag(AudioLatency::LATENCY_PLAYBACK); media::AudioRendererMixer* mixer = GetMixer( @@ -600,14 +588,14 @@ mock_sink_ = new media::MockAudioRendererSink( std::string(), media::OUTPUT_DEVICE_STATUS_OK, AudioParameters(AudioParameters::AUDIO_PCM_LINEAR, kChannelLayout, 44100, - kBitsPerChannel, 2048)); + 2048)); EXPECT_CALL(*mock_sink_.get(), Start()).Times(1); EXPECT_CALL(*mock_sink_.get(), Stop()).Times(1); EXPECT_CALL(*this, ReleaseSinkPtr(mock_sink_.get())).Times(1); media::AudioParameters params(AudioParameters::AUDIO_PCM_LINEAR, - kChannelLayout, 32000, kBitsPerChannel, 512); + kChannelLayout, 32000, 512); params.set_latency_tag(AudioLatency::LATENCY_PLAYBACK); media::AudioRendererMixer* mixer = GetMixer( @@ -634,14 +622,14 @@ mock_sink_ = new media::MockAudioRendererSink( std::string(), media::OUTPUT_DEVICE_STATUS_OK, AudioParameters(AudioParameters::AUDIO_FAKE, kChannelLayout, 44100, - kBitsPerChannel, 2048)); + 2048)); EXPECT_CALL(*mock_sink_.get(), Start()).Times(1); EXPECT_CALL(*mock_sink_.get(), Stop()).Times(1); EXPECT_CALL(*this, ReleaseSinkPtr(mock_sink_.get())).Times(1); media::AudioParameters params(AudioParameters::AUDIO_PCM_LINEAR, - kChannelLayout, 32000, kBitsPerChannel, 512); + kChannelLayout, 32000, 512); media::AudioRendererMixer* mixer = GetMixer(kRenderFrameId, params, AudioLatency::LATENCY_PLAYBACK, @@ -677,7 +665,7 @@ EXPECT_CALL(*this, ReleaseSinkPtr(mock_sink_.get())).Times(1); media::AudioParameters params(AudioParameters::AUDIO_PCM_LINEAR, - kChannelLayout, 32000, kBitsPerChannel, 512); + kChannelLayout, 32000, 512); params.set_latency_tag(AudioLatency::LATENCY_RTC); media::AudioRendererMixer* mixer = GetMixer( @@ -712,15 +700,14 @@ TEST_F(AudioRendererMixerManagerTest, MixerParamsLatencyRtcFakeAudio) { mock_sink_ = new media::MockAudioRendererSink( std::string(), media::OUTPUT_DEVICE_STATUS_OK, - AudioParameters(AudioParameters::AUDIO_FAKE, kChannelLayout, 44100, - kBitsPerChannel, 128)); + AudioParameters(AudioParameters::AUDIO_FAKE, kChannelLayout, 44100, 128)); EXPECT_CALL(*mock_sink_.get(), Start()).Times(1); EXPECT_CALL(*mock_sink_.get(), Stop()).Times(1); EXPECT_CALL(*this, ReleaseSinkPtr(mock_sink_.get())).Times(1); media::AudioParameters params(AudioParameters::AUDIO_PCM_LINEAR, - kChannelLayout, 32000, kBitsPerChannel, 512); + kChannelLayout, 32000, 512); media::AudioRendererMixer* mixer = GetMixer(kRenderFrameId, params, AudioLatency::LATENCY_RTC, @@ -752,7 +739,7 @@ EXPECT_CALL(*this, ReleaseSinkPtr(mock_sink_.get())).Times(1); media::AudioParameters params(AudioParameters::AUDIO_PCM_LINEAR, - kChannelLayout, 32000, kBitsPerChannel, 512); + kChannelLayout, 32000, 512); params.set_latency_tag(AudioLatency::LATENCY_INTERACTIVE); media::AudioRendererMixer* mixer = GetMixer( @@ -778,14 +765,14 @@ mock_sink_ = new media::MockAudioRendererSink( std::string(), media::OUTPUT_DEVICE_STATUS_OK, AudioParameters(AudioParameters::AUDIO_PCM_LINEAR, kChannelLayout, 44100, - kBitsPerChannel, 2048)); + 2048)); EXPECT_CALL(*mock_sink_.get(), Start()).Times(1); EXPECT_CALL(*mock_sink_.get(), Stop()).Times(1); EXPECT_CALL(*this, ReleaseSinkPtr(mock_sink_.get())).Times(1); media::AudioParameters params(AudioParameters::AUDIO_BITSTREAM_EAC3, - kAnotherChannelLayout, 32000, 8, 512); + kAnotherChannelLayout, 32000, 512); params.set_latency_tag(AudioLatency::LATENCY_PLAYBACK); media::AudioRendererMixer* mixer = GetMixer( @@ -798,8 +785,6 @@ mixer->GetOutputParamsForTesting().channel_layout()); EXPECT_EQ(params.sample_rate(), mixer->GetOutputParamsForTesting().sample_rate()); - EXPECT_EQ(params.bits_per_sample(), - mixer->GetOutputParamsForTesting().bits_per_sample()); EXPECT_EQ(params.frames_per_buffer(), mixer->GetOutputParamsForTesting().frames_per_buffer());
diff --git a/content/renderer/media/renderer_webaudiodevice_impl.cc b/content/renderer/media/renderer_webaudiodevice_impl.cc index 9afe583d..fcbebe9 100644 --- a/content/renderer/media/renderer_webaudiodevice_impl.cc +++ b/content/renderer/media/renderer_webaudiodevice_impl.cc
@@ -139,7 +139,7 @@ DCHECK_NE(0, output_buffer_size); sink_params_.Reset(media::AudioParameters::AUDIO_PCM_LOW_LATENCY, layout, - hardware_params.sample_rate(), 16, output_buffer_size); + hardware_params.sample_rate(), output_buffer_size); // Always set channels, this should be a no-op in all but the discrete case; // this call will fail if channels doesn't match the layout in other cases. sink_params_.set_channels_for_discrete(channels);
diff --git a/content/renderer/media/renderer_webaudiodevice_impl_unittest.cc b/content/renderer/media/renderer_webaudiodevice_impl_unittest.cc index 652af52..5b338c5e 100644 --- a/content/renderer/media/renderer_webaudiodevice_impl_unittest.cc +++ b/content/renderer/media/renderer_webaudiodevice_impl_unittest.cc
@@ -35,7 +35,7 @@ const std::string& device_id) { return media::AudioParameters(media::AudioParameters::AUDIO_PCM_LOW_LATENCY, media::CHANNEL_LAYOUT_STEREO, - kHardwareSampleRate, 16, kHardwareBufferSize); + kHardwareSampleRate, kHardwareBufferSize); } class RendererWebAudioDeviceImplUnderTest : public RendererWebAudioDeviceImpl {
diff --git a/content/renderer/media/stream/external_media_stream_audio_source.cc b/content/renderer/media/stream/external_media_stream_audio_source.cc index 530caa31..da39cf572 100644 --- a/content/renderer/media/stream/external_media_stream_audio_source.cc +++ b/content/renderer/media/stream/external_media_stream_audio_source.cc
@@ -21,7 +21,6 @@ MediaStreamAudioSource::SetFormat(media::AudioParameters( media::AudioParameters::AUDIO_PCM_LOW_LATENCY, channel_layout, sample_rate, - 16, // Legacy parameter (data is always in 32-bit float format). frames_per_buffer)); }
diff --git a/content/renderer/media/stream/local_media_stream_audio_source.cc b/content/renderer/media/stream/local_media_stream_audio_source.cc index f165280b..25d43bf 100644 --- a/content/renderer/media/stream/local_media_stream_audio_source.cc +++ b/content/renderer/media/stream/local_media_stream_audio_source.cc
@@ -41,7 +41,6 @@ SetFormat(media::AudioParameters( media::AudioParameters::AUDIO_PCM_LOW_LATENCY, device.input.channel_layout(), device.input.sample_rate(), - 16, // Legacy parameter (data is always in 32-bit float format). frames_per_buffer)); }
diff --git a/content/renderer/media/stream/media_stream_audio_processor.cc b/content/renderer/media/stream/media_stream_audio_processor.cc index a2f6abe..9b76c67 100644 --- a/content/renderer/media/stream/media_stream_audio_processor.cc +++ b/content/renderer/media/stream/media_stream_audio_processor.cc
@@ -740,7 +740,6 @@ media::AudioParameters::AUDIO_PCM_LOW_LATENCY, output_channel_layout, output_sample_rate, - 16, output_frames); capture_fifo_.reset(
diff --git a/content/renderer/media/stream/media_stream_audio_processor_unittest.cc b/content/renderer/media/stream/media_stream_audio_processor_unittest.cc index 082a38a..16e71069 100644 --- a/content/renderer/media/stream/media_stream_audio_processor_unittest.cc +++ b/content/renderer/media/stream/media_stream_audio_processor_unittest.cc
@@ -115,7 +115,6 @@ : params_(media::AudioParameters::AUDIO_PCM_LOW_LATENCY, media::CHANNEL_LAYOUT_STEREO, 48000, - 16, 480) {} protected: @@ -306,10 +305,9 @@ { 8000, 16000, 22050, 32000, 44100, 48000 }; for (size_t i = 0; i < arraysize(kSupportedSampleRates); ++i) { int buffer_size = kSupportedSampleRates[i] / 100; - media::AudioParameters params( - media::AudioParameters::AUDIO_PCM_LOW_LATENCY, - media::CHANNEL_LAYOUT_STEREO, kSupportedSampleRates[i], 16, - buffer_size); + media::AudioParameters params(media::AudioParameters::AUDIO_PCM_LOW_LATENCY, + media::CHANNEL_LAYOUT_STEREO, + kSupportedSampleRates[i], buffer_size); audio_processor->OnCaptureFormatChanged(params); VerifyDefaultComponents(audio_processor.get()); @@ -394,7 +392,7 @@ EXPECT_FALSE(audio_processor->has_audio_processing()); const media::AudioParameters source_params( media::AudioParameters::AUDIO_PCM_LOW_LATENCY, - media::CHANNEL_LAYOUT_STEREO, 48000, 16, 480); + media::CHANNEL_LAYOUT_STEREO, 48000, 480); audio_processor->OnCaptureFormatChanged(source_params); // There's no sense in continuing if this fails. ASSERT_EQ(2, audio_processor->OutputFormat().channels()); @@ -456,7 +454,7 @@ media::AudioParameters params(media::AudioParameters::AUDIO_PCM_LOW_LATENCY, media::CHANNEL_LAYOUT_STEREO_AND_KEYBOARD_MIC, - 48000, 16, 480); + 48000, 480); audio_processor->OnCaptureFormatChanged(params); ProcessDataAndVerifyFormat(audio_processor.get(),
diff --git a/content/renderer/media/stream/media_stream_audio_unittest.cc b/content/renderer/media/stream/media_stream_audio_unittest.cc index bf1a301e..abddd1d 100644 --- a/content/renderer/media/stream/media_stream_audio_unittest.cc +++ b/content/renderer/media/stream/media_stream_audio_unittest.cc
@@ -93,7 +93,7 @@ if (!audio_bus_ || audio_bus_->frames() != buffer_size) { MediaStreamAudioSource::SetFormat(media::AudioParameters( media::AudioParameters::AUDIO_PCM_LOW_LATENCY, - media::CHANNEL_LAYOUT_MONO, kSampleRate, 16, buffer_size)); + media::CHANNEL_LAYOUT_MONO, kSampleRate, buffer_size)); audio_bus_ = media::AudioBus::Create(1, buffer_size); } @@ -300,7 +300,7 @@ // Check that the audio parameters propagated to the track and sink. const media::AudioParameters expected_params( media::AudioParameters::AUDIO_PCM_LOW_LATENCY, media::CHANNEL_LAYOUT_MONO, - kSampleRate, 16, kBufferSize); + kSampleRate, kBufferSize); EXPECT_TRUE(expected_params.Equals(track()->GetOutputFormat())); EXPECT_TRUE(expected_params.Equals(sink.params())); @@ -369,7 +369,7 @@ base::PlatformThread::Sleep(TestTimeouts::tiny_timeout()); const media::AudioParameters expected_params( media::AudioParameters::AUDIO_PCM_LOW_LATENCY, media::CHANNEL_LAYOUT_MONO, - kSampleRate, 16, kBufferSize); + kSampleRate, kBufferSize); EXPECT_TRUE(expected_params.Equals(track()->GetOutputFormat())); EXPECT_TRUE(expected_params.Equals(sink.params()));
diff --git a/content/renderer/media/stream/media_stream_constraints_util_audio_unittest.cc b/content/renderer/media/stream/media_stream_constraints_util_audio_unittest.cc index 0fc9a21..3dead579 100644 --- a/content/renderer/media/stream/media_stream_constraints_util_audio_unittest.cc +++ b/content/renderer/media/stream/media_stream_constraints_util_audio_unittest.cc
@@ -68,13 +68,13 @@ "default_device", media::AudioParameters(media::AudioParameters::AUDIO_PCM_LOW_LATENCY, media::CHANNEL_LAYOUT_STEREO, - media::AudioParameters::kAudioCDSampleRate, 16, + media::AudioParameters::kAudioCDSampleRate, 1000)); media::AudioParameters hw_echo_canceller_parameters( media::AudioParameters::AUDIO_PCM_LOW_LATENCY, media::CHANNEL_LAYOUT_STEREO, - media::AudioParameters::kAudioCDSampleRate, 24, 1000); + media::AudioParameters::kAudioCDSampleRate, 1000); hw_echo_canceller_parameters.set_effects( media::AudioParameters::ECHO_CANCELLER); capabilities_.emplace_back("hw_echo_canceller_device", @@ -83,7 +83,7 @@ media::AudioParameters geometry_parameters( media::AudioParameters::AUDIO_PCM_LOW_LATENCY, media::CHANNEL_LAYOUT_STEREO, - media::AudioParameters::kAudioCDSampleRate, 16, 1000); + media::AudioParameters::kAudioCDSampleRate, 1000); geometry_parameters.set_mic_positions(kMicPositions); capabilities_.emplace_back("geometry device", geometry_parameters); @@ -323,8 +323,6 @@ EXPECT_EQ(expected_device.DeviceID(), result.device_id()); EXPECT_EQ(expected_device.Parameters().sample_rate(), result.device_parameters().sample_rate()); - EXPECT_EQ(expected_device.Parameters().bits_per_sample(), - result.device_parameters().bits_per_sample()); EXPECT_EQ(expected_device.Parameters().channels(), result.device_parameters().channels()); EXPECT_EQ(expected_device.Parameters().effects(),
diff --git a/content/renderer/media/stream/mock_media_stream_registry.cc b/content/renderer/media/stream/mock_media_stream_registry.cc index a3c084e..88f1bc8 100644 --- a/content/renderer/media/stream/mock_media_stream_registry.cc +++ b/content/renderer/media/stream/mock_media_stream_registry.cc
@@ -28,7 +28,7 @@ SetFormat(media::AudioParameters( media::AudioParameters::AUDIO_PCM_LOW_LATENCY, media::CHANNEL_LAYOUT_STEREO, - media::AudioParameters::kAudioCDSampleRate, 16, + media::AudioParameters::kAudioCDSampleRate, media::AudioParameters::kAudioCDSampleRate / 100)); SetDevice(MediaStreamDevice( MEDIA_DEVICE_AUDIO_CAPTURE, "mock_audio_device_id", "Mock audio device",
diff --git a/content/renderer/media/stream/processed_local_audio_source.cc b/content/renderer/media/stream/processed_local_audio_source.cc index 5496f9a..f40d9816 100644 --- a/content/renderer/media/stream/processed_local_audio_source.cc +++ b/content/renderer/media/stream/processed_local_audio_source.cc
@@ -186,7 +186,6 @@ // ProcessedLocalAudioSource to the processor's output format. media::AudioParameters params(media::AudioParameters::AUDIO_PCM_LOW_LATENCY, channel_layout, device().input.sample_rate(), - 16, GetBufferSize(device().input.sample_rate())); params.set_effects(device().input.effects()); DCHECK(params.IsValid());
diff --git a/content/renderer/media/stream/track_audio_renderer.cc b/content/renderer/media/stream/track_audio_renderer.cc index a27ab49..826d403 100644 --- a/content/renderer/media/stream/track_audio_renderer.cc +++ b/content/renderer/media/stream/track_audio_renderer.cc
@@ -302,7 +302,7 @@ const media::AudioParameters& hardware_params = device_info.output_params(); media::AudioParameters sink_params( hardware_params.format(), source_params_.channel_layout(), - source_params_.sample_rate(), source_params_.bits_per_sample(), + source_params_.sample_rate(), media::AudioLatency::GetRtcBufferSize( source_params_.sample_rate(), hardware_params.frames_per_buffer())); DVLOG(1) << ("TrackAudioRenderer::MaybeStartSink() -- Starting sink. "
diff --git a/content/renderer/media/stream/webaudio_media_stream_source.cc b/content/renderer/media/stream/webaudio_media_stream_source.cc index 30ef899..e6a32f6a 100644 --- a/content/renderer/media/stream/webaudio_media_stream_source.cc +++ b/content/renderer/media/stream/webaudio_media_stream_source.cc
@@ -45,7 +45,7 @@ // I did not want to change behavior. http://crbug.com/577874 fifo_.Reset(sample_rate / 100); media::AudioParameters params(media::AudioParameters::AUDIO_PCM_LOW_LATENCY, - channel_layout, sample_rate, 16, + channel_layout, sample_rate, fifo_.frames_per_buffer()); // Take care of the discrete channel layout case. params.set_channels_for_discrete(number_of_channels);
diff --git a/content/renderer/media/webrtc/peer_connection_remote_audio_source.cc b/content/renderer/media/webrtc/peer_connection_remote_audio_source.cc index 733f9f3..238de5c6 100644 --- a/content/renderer/media/webrtc/peer_connection_remote_audio_source.cc +++ b/content/renderer/media/webrtc/peer_connection_remote_audio_source.cc
@@ -142,7 +142,7 @@ MediaStreamAudioSource::SetFormat( media::AudioParameters(media::AudioParameters::AUDIO_PCM_LOW_LATENCY, media::GuessChannelLayout(number_of_channels), - sample_rate, bits_per_sample, number_of_frames)); + sample_rate, number_of_frames)); } MediaStreamAudioSource::DeliverDataToTracks(*audio_bus_, playout_time);
diff --git a/content/renderer/media/webrtc/webrtc_audio_renderer.cc b/content/renderer/media/webrtc/webrtc_audio_renderer.cc index 88976f2..b9c1a43 100644 --- a/content/renderer/media/webrtc/webrtc_audio_renderer.cc +++ b/content/renderer/media/webrtc/webrtc_audio_renderer.cc
@@ -39,7 +39,6 @@ media::AudioParameters::AUDIO_PCM_LOW_LATENCY; const media::ChannelLayout kChannelLayout = media::CHANNEL_LAYOUT_STEREO; const int kChannels = 2; -const int kBitsPerSample = 16; // Used for UMA histograms. const int kRenderTimeHistogramMinMicroseconds = 100; @@ -174,7 +173,7 @@ source_(nullptr), play_ref_count_(0), start_ref_count_(0), - sink_params_(kFormat, kChannelLayout, 0, kBitsPerSample, 0), + sink_params_(kFormat, kChannelLayout, 0, 0), output_device_id_(device_id) { WebRtcLogMessage(base::StringPrintf( "WAR::WAR. source_render_frame_id=%d, session_id=%d, effects=%i",
diff --git a/content/renderer/media/webrtc/webrtc_audio_renderer_unittest.cc b/content/renderer/media/webrtc/webrtc_audio_renderer_unittest.cc index ee4c258..08271e7 100644 --- a/content/renderer/media/webrtc/webrtc_audio_renderer_unittest.cc +++ b/content/renderer/media/webrtc/webrtc_audio_renderer_unittest.cc
@@ -107,7 +107,7 @@ : media::OUTPUT_DEVICE_STATUS_OK, media::AudioParameters(media::AudioParameters::AUDIO_PCM_LOW_LATENCY, media::CHANNEL_LAYOUT_STEREO, - kHardwareSampleRate, 16, kHardwareBufferSize)); + kHardwareSampleRate, kHardwareBufferSize)); if (device_id != kInvalidOutputDeviceId) { EXPECT_CALL(*mock_sink_.get(), Start());
diff --git a/content/renderer/media/webrtc_local_audio_source_provider.cc b/content/renderer/media/webrtc_local_audio_source_provider.cc index ef772e9b..a59e3c6 100644 --- a/content/renderer/media/webrtc_local_audio_source_provider.cc +++ b/content/renderer/media/webrtc_local_audio_source_provider.cc
@@ -44,7 +44,7 @@ .output_params() .sample_rate(); sink_params_.Reset(media::AudioParameters::AUDIO_PCM_LOW_LATENCY, - media::CHANNEL_LAYOUT_STEREO, sample_rate, 16, + media::CHANNEL_LAYOUT_STEREO, sample_rate, kWebAudioRenderBufferSize); } // Connect the source provider to the track as a sink.
diff --git a/content/renderer/media/webrtc_local_audio_source_provider_unittest.cc b/content/renderer/media/webrtc_local_audio_source_provider_unittest.cc index d318d41ac..bb0b138 100644 --- a/content/renderer/media/webrtc_local_audio_source_provider_unittest.cc +++ b/content/renderer/media/webrtc_local_audio_source_provider_unittest.cc
@@ -20,10 +20,10 @@ protected: void SetUp() override { source_params_.Reset(media::AudioParameters::AUDIO_PCM_LOW_LATENCY, - media::CHANNEL_LAYOUT_MONO, 48000, 16, 480); + media::CHANNEL_LAYOUT_MONO, 48000, 480); sink_params_.Reset( media::AudioParameters::AUDIO_PCM_LOW_LATENCY, - media::CHANNEL_LAYOUT_STEREO, 44100, 16, + media::CHANNEL_LAYOUT_STEREO, 44100, WebRtcLocalAudioSourceProvider::kWebAudioRenderBufferSize); sink_bus_ = media::AudioBus::Create(sink_params_); blink::WebMediaStreamSource audio_source;
diff --git a/content/renderer/media_capture_from_element/html_audio_element_capturer_source.cc b/content/renderer/media_capture_from_element/html_audio_element_capturer_source.cc index 4711085..80afeef 100644 --- a/content/renderer/media_capture_from_element/html_audio_element_capturer_source.cc +++ b/content/renderer/media_capture_from_element/html_audio_element_capturer_source.cc
@@ -89,7 +89,7 @@ MediaStreamAudioSource::SetFormat( media::AudioParameters(media::AudioParameters::AUDIO_PCM_LOW_LATENCY, media::GuessChannelLayout(audio_bus->channels()), - sample_rate, 16, audio_bus->frames())); + sample_rate, audio_bus->frames())); last_sample_rate_ = sample_rate; last_num_channels_ = audio_bus->channels(); last_bus_frames_ = audio_bus->frames();
diff --git a/content/renderer/media_capture_from_element/html_audio_element_capturer_source_unittest.cc b/content/renderer/media_capture_from_element/html_audio_element_capturer_source_unittest.cc index 77dc93e..95df6c2 100644 --- a/content/renderer/media_capture_from_element/html_audio_element_capturer_source_unittest.cc +++ b/content/renderer/media_capture_from_element/html_audio_element_capturer_source_unittest.cc
@@ -102,7 +102,7 @@ const media::AudioParameters params( media::AudioParameters::AUDIO_PCM_LOW_LATENCY, media::GuessChannelLayout(kNumChannelsForTest), - kAudioTrackSampleRate /* sample_rate */, 16 /* bits_per_sample */, + kAudioTrackSampleRate /* sample_rate */, kAudioTrackSamplesPerBuffer /* frames_per_buffer */); audio_source_->Initialize(params, &fake_callback_);
diff --git a/content/renderer/media_recorder/audio_track_opus_encoder.cc b/content/renderer/media_recorder/audio_track_opus_encoder.cc index 3f92f4f2..ae8b1d11 100644 --- a/content/renderer/media_recorder/audio_track_opus_encoder.cc +++ b/content/renderer/media_recorder/audio_track_opus_encoder.cc
@@ -108,8 +108,7 @@ converted_params_ = media::AudioParameters( media::AudioParameters::AUDIO_PCM_LOW_LATENCY, media::GuessChannelLayout(std::min(input_params_.channels(), 2)), - kOpusPreferredSamplingRate, input_params_.bits_per_sample(), - kOpusPreferredFramesPerBuffer); + kOpusPreferredSamplingRate, kOpusPreferredFramesPerBuffer); DVLOG(1) << "|input_params_|:" << input_params_.AsHumanReadableString() << " -->|converted_params_|:" << converted_params_.AsHumanReadableString();
diff --git a/content/renderer/media_recorder/audio_track_recorder_unittest.cc b/content/renderer/media_recorder/audio_track_recorder_unittest.cc index c3440cf..4456840 100644 --- a/content/renderer/media_recorder/audio_track_recorder_unittest.cc +++ b/content/renderer/media_recorder/audio_track_recorder_unittest.cc
@@ -36,7 +36,6 @@ namespace { -const int kDefaultBitsPerSample = 16; const int kDefaultSampleRate = 48000; // The |frames_per_buffer| field of AudioParameters is not used by ATR. const int kIgnoreFramesPerBuffer = 1; @@ -62,7 +61,6 @@ const media::AudioParameters::Format input_format; const media::ChannelLayout channel_layout; const int sample_rate; - const int bits_per_sample; const AudioTrackRecorder::CodecId codec; }; @@ -71,32 +69,26 @@ {media::AudioParameters::AUDIO_PCM_LOW_LATENCY, /* input format */ media::CHANNEL_LAYOUT_STEREO, /* channel layout */ kDefaultSampleRate, /* sample rate */ - kDefaultBitsPerSample, /* bits per sample */ AudioTrackRecorder::CodecId::OPUS}, /* codec for encoding */ // Change to mono: {media::AudioParameters::AUDIO_PCM_LOW_LATENCY, media::CHANNEL_LAYOUT_MONO, - kDefaultSampleRate, kDefaultBitsPerSample, - AudioTrackRecorder::CodecId::OPUS}, + kDefaultSampleRate, AudioTrackRecorder::CodecId::OPUS}, // Different sampling rate as well: {media::AudioParameters::AUDIO_PCM_LOW_LATENCY, media::CHANNEL_LAYOUT_MONO, - 24000, kDefaultBitsPerSample, AudioTrackRecorder::CodecId::OPUS}, + 24000, AudioTrackRecorder::CodecId::OPUS}, {media::AudioParameters::AUDIO_PCM_LOW_LATENCY, - media::CHANNEL_LAYOUT_STEREO, 8000, kDefaultBitsPerSample, - AudioTrackRecorder::CodecId::OPUS}, + media::CHANNEL_LAYOUT_STEREO, 8000, AudioTrackRecorder::CodecId::OPUS}, // Using a non-default Opus sampling rate (48, 24, 16, 12, or 8 kHz). {media::AudioParameters::AUDIO_PCM_LOW_LATENCY, media::CHANNEL_LAYOUT_MONO, - 22050, kDefaultBitsPerSample, AudioTrackRecorder::CodecId::OPUS}, + 22050, AudioTrackRecorder::CodecId::OPUS}, {media::AudioParameters::AUDIO_PCM_LOW_LATENCY, - media::CHANNEL_LAYOUT_STEREO, 44100, kDefaultBitsPerSample, - AudioTrackRecorder::CodecId::OPUS}, + media::CHANNEL_LAYOUT_STEREO, 44100, AudioTrackRecorder::CodecId::OPUS}, {media::AudioParameters::AUDIO_PCM_LOW_LATENCY, - media::CHANNEL_LAYOUT_STEREO, 96000, kDefaultBitsPerSample, - AudioTrackRecorder::CodecId::OPUS}, + media::CHANNEL_LAYOUT_STEREO, 96000, AudioTrackRecorder::CodecId::OPUS}, {media::AudioParameters::AUDIO_PCM_LOW_LATENCY, media::CHANNEL_LAYOUT_MONO, - kDefaultSampleRate, kDefaultBitsPerSample, - AudioTrackRecorder::CodecId::PCM}, + kDefaultSampleRate, AudioTrackRecorder::CodecId::PCM}, {media::AudioParameters::AUDIO_PCM_LOW_LATENCY, - media::CHANNEL_LAYOUT_STEREO, kDefaultSampleRate, kDefaultBitsPerSample, + media::CHANNEL_LAYOUT_STEREO, kDefaultSampleRate, AudioTrackRecorder::CodecId::PCM}, }; @@ -109,12 +101,10 @@ first_params_(GetParam().input_format, GetParam().channel_layout, GetParam().sample_rate, - GetParam().bits_per_sample, kIgnoreFramesPerBuffer), second_params_(media::AudioParameters::AUDIO_PCM_LOW_LATENCY, media::CHANNEL_LAYOUT_STEREO, kDefaultSampleRate, - kDefaultBitsPerSample, kIgnoreFramesPerBuffer), first_source_(first_params_.channels(), /* # channels */ 440, /* frequency */
diff --git a/content/renderer/media_recorder/media_recorder_handler_unittest.cc b/content/renderer/media_recorder/media_recorder_handler_unittest.cc index 7cda742..8297544 100644 --- a/content/renderer/media_recorder/media_recorder_handler_unittest.cc +++ b/content/renderer/media_recorder/media_recorder_handler_unittest.cc
@@ -45,7 +45,6 @@ static const std::string kTestVideoTrackId = "video_track_id"; static const std::string kTestAudioTrackId = "audio_track_id"; static const int kTestAudioChannels = 2; -static const int kTestAudioBitsPerSample = 16; static const int kTestAudioSampleRate = 48000; static const int kTestAudioBufferDurationMs = 10; // Opus works with 60ms buffers, so 6 MediaStreamAudioTrack Buffers are needed @@ -340,7 +339,7 @@ media::AudioParameters params( media::AudioParameters::AUDIO_PCM_LINEAR, media::CHANNEL_LAYOUT_STEREO, - kTestAudioSampleRate, kTestAudioBitsPerSample, + kTestAudioSampleRate, kTestAudioSampleRate * kTestAudioBufferDurationMs / 1000); SetAudioFormatForTesting(params);
diff --git a/content/renderer/pepper/pepper_media_stream_audio_track_host.cc b/content/renderer/pepper/pepper_media_stream_audio_track_host.cc index 331bce1..133684f 100644 --- a/content/renderer/pepper/pepper_media_stream_audio_track_host.cc +++ b/content/renderer/pepper/pepper_media_stream_audio_track_host.cc
@@ -22,6 +22,7 @@ #include "ppapi/proxy/ppapi_messages.h" #include "ppapi/shared_impl/media_stream_audio_track_shared.h" #include "ppapi/shared_impl/media_stream_buffer.h" +#include "ppapi/shared_impl/ppb_audio_config_shared.h" using media::AudioParameters; using ppapi::host::HostMessageContext; @@ -211,8 +212,6 @@ if (first_frame_capture_time_.is_null()) first_frame_capture_time_ = estimated_capture_time; - const int bytes_per_frame = audio_params_.GetBytesPerFrame(); - base::AutoLock lock(lock_); for (int frame_offset = 0; frame_offset < audio_bus.frames(); ) { if (active_buffers_generation_ != buffers_generation_) { @@ -248,20 +247,19 @@ static_cast<PP_AudioBuffer_SampleRate>(audio_params_.sample_rate()); buffer->data_size = output_buffer_size_; buffer->number_of_channels = audio_params_.channels(); - buffer->number_of_samples = buffer->data_size * audio_params_.channels() / - bytes_per_frame; + buffer->number_of_samples = + buffer->data_size * audio_params_.channels() / bytes_per_frame_; } const int frames_per_buffer = buffer->number_of_samples / audio_params_.channels(); - const int frames_to_copy = std::min( - frames_per_buffer - active_buffer_frame_offset_, - audio_bus.frames() - frame_offset); - audio_bus.ToInterleavedPartial( - frame_offset, - frames_to_copy, - audio_params_.bits_per_sample() / 8, - buffer->data + active_buffer_frame_offset_ * bytes_per_frame); + const int frames_to_copy = + std::min(frames_per_buffer - active_buffer_frame_offset_, + audio_bus.frames() - frame_offset); + audio_bus.ToInterleavedPartial<media::SignedInt16SampleTypeTraits>( + frame_offset, frames_to_copy, + reinterpret_cast<int16_t*>(buffer->data + active_buffer_frame_offset_ * + bytes_per_frame_)); active_buffer_frame_offset_ += frames_to_copy; frame_offset += frames_to_copy; @@ -286,24 +284,25 @@ // max(user requested duration, received buffer duration). There are other // ways of dealing with it, but which one is "correct"? DCHECK_LE(params.GetBufferDuration().InMilliseconds(), kMinDuration); - DCHECK_EQ(params.bits_per_sample(), 16); DCHECK_NE(GetPPSampleRate(params.sample_rate()), PP_AUDIOBUFFER_SAMPLERATE_UNKNOWN); // TODO(penghuang): support setting format more than once. if (audio_params_.IsValid()) { DCHECK_EQ(params.sample_rate(), audio_params_.sample_rate()); - DCHECK_EQ(params.bits_per_sample(), audio_params_.bits_per_sample()); DCHECK_EQ(params.channels(), audio_params_.channels()); } else { audio_thread_checker_.DetachFromThread(); audio_params_ = params; + static_assert(ppapi::kBitsPerAudioOutputSample == 16, + "Data must be pcm_s16le."); + int bytes_per_frame = params.GetBytesPerFrame(media::kSampleFormatS16); + int bytes_per_second = params.sample_rate() * bytes_per_frame; main_task_runner_->PostTask( - FROM_HERE, - base::BindOnce(&AudioSink::SetFormatOnMainThread, - weak_factory_.GetWeakPtr(), params.GetBytesPerSecond(), - params.GetBytesPerFrame())); + FROM_HERE, base::BindOnce(&AudioSink::SetFormatOnMainThread, + weak_factory_.GetWeakPtr(), bytes_per_second, + bytes_per_frame)); } }
diff --git a/content/renderer/pepper/pepper_platform_audio_input.cc b/content/renderer/pepper/pepper_platform_audio_input.cc index a794c48c..1d8fb3ff 100644 --- a/content/renderer/pepper/pepper_platform_audio_input.cc +++ b/content/renderer/pepper/pepper_platform_audio_input.cc
@@ -159,7 +159,6 @@ params_.Reset(media::AudioParameters::AUDIO_PCM_LINEAR, media::CHANNEL_LAYOUT_MONO, sample_rate, - ppapi::kBitsPerAudioInputSample, frames_per_buffer); // We need to open the device and obtain the label and session ID before
diff --git a/content/renderer/pepper/pepper_platform_audio_output.cc b/content/renderer/pepper/pepper_platform_audio_output.cc index d279037..267fe95c 100644 --- a/content/renderer/pepper/pepper_platform_audio_output.cc +++ b/content/renderer/pepper/pepper_platform_audio_output.cc
@@ -141,7 +141,6 @@ media::AudioParameters params(media::AudioParameters::AUDIO_PCM_LOW_LATENCY, media::CHANNEL_LAYOUT_STEREO, sample_rate, - ppapi::kBitsPerAudioOutputSample, frames_per_buffer); io_task_runner_->PostTask(
diff --git a/content/renderer/pepper/pepper_platform_audio_output_dev.cc b/content/renderer/pepper/pepper_platform_audio_output_dev.cc index 8eaea85..c4f75ab 100644 --- a/content/renderer/pepper/pepper_platform_audio_output_dev.cc +++ b/content/renderer/pepper/pepper_platform_audio_output_dev.cc
@@ -262,8 +262,7 @@ CHECK(ipc_); params_.Reset(media::AudioParameters::AUDIO_PCM_LOW_LATENCY, - media::CHANNEL_LAYOUT_STEREO, sample_rate, - ppapi::kBitsPerAudioOutputSample, frames_per_buffer); + media::CHANNEL_LAYOUT_STEREO, sample_rate, frames_per_buffer); io_task_runner_->PostTask( FROM_HERE,
diff --git a/content/renderer/render_view_browsertest.cc b/content/renderer/render_view_browsertest.cc index f2e0a6b..bc8a289 100644 --- a/content/renderer/render_view_browsertest.cc +++ b/content/renderer/render_view_browsertest.cc
@@ -453,7 +453,6 @@ view()->min_size_for_auto_resize(); visual_properties.max_size_for_auto_resize = view()->max_size_for_auto_resize(); - visual_properties.needs_resize_ack = false; visual_properties.content_source_id = view()->GetContentSourceId(); view()->OnSynchronizeVisualProperties(visual_properties); ASSERT_EQ(dsf, view()->GetWebScreenInfo().device_scale_factor);
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc index f605f2e..f6ae808 100644 --- a/content/renderer/render_view_impl.cc +++ b/content/renderer/render_view_impl.cc
@@ -1688,10 +1688,6 @@ // blink::WebFrameClient ----------------------------------------------------- -void RenderViewImpl::Repaint(const gfx::Size& size) { - OnRepaint(size); -} - void RenderViewImpl::SetEditCommandForNextKeyEvent(const std::string& name, const std::string& value) { GetWidget()->SetEditCommandForNextKeyEvent(name, value); @@ -1972,7 +1968,6 @@ params.max_size_for_auto_resize); } } else if (auto_resize_mode_changed) { - need_resize_ack_for_auto_resize_ = false; webview()->DisableAutoResizeMode(); if (params.new_size.IsEmpty()) return; @@ -2386,7 +2381,6 @@ visual_properties.visible_viewport_size = visible_viewport_size_; visual_properties.is_fullscreen_granted = is_fullscreen_granted(); visual_properties.display_mode = display_mode_; - visual_properties.needs_resize_ack = false; OnSynchronizeVisualProperties(visual_properties); }
diff --git a/content/renderer/render_view_impl.h b/content/renderer/render_view_impl.h index 75ea018..324745a 100644 --- a/content/renderer/render_view_impl.h +++ b/content/renderer/render_view_impl.h
@@ -342,7 +342,6 @@ blink::WebFrameWidget* GetWebFrameWidget() override; bool ShouldDisplayScrollbars(int width, int height) const override; bool GetContentStateImmediately() const override; - void Repaint(const gfx::Size& size) override; void SetEditCommandForNextKeyEvent(const std::string& name, const std::string& value) override; void ClearEditCommands() override;
diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc index 78d311c..eac38ae2 100644 --- a/content/renderer/render_widget.cc +++ b/content/renderer/render_widget.cc
@@ -376,9 +376,7 @@ compositor_deps_(compositor_deps), webwidget_internal_(nullptr), owner_delegate_(nullptr), - next_paint_flags_(0), auto_resize_mode_(false), - need_resize_ack_for_auto_resize_(false), did_show_(false), is_hidden_(hidden), compositor_never_visible_(never_visible), @@ -658,7 +656,6 @@ OnDisableDeviceEmulation) IPC_MESSAGE_HANDLER(ViewMsg_WasHidden, OnWasHidden) IPC_MESSAGE_HANDLER(ViewMsg_WasShown, OnWasShown) - IPC_MESSAGE_HANDLER(ViewMsg_Repaint, OnRepaint) IPC_MESSAGE_HANDLER(ViewMsg_SetTextDirection, OnSetTextDirection) IPC_MESSAGE_HANDLER(ViewMsg_Move_ACK, OnRequestMoveAck) IPC_MESSAGE_HANDLER(ViewMsg_UpdateScreenRects, OnUpdateScreenRects) @@ -723,7 +720,6 @@ visual_properties.visible_viewport_size = new_window_rect.size(); visual_properties.is_fullscreen_granted = is_fullscreen_granted_; visual_properties.display_mode = display_mode_; - visual_properties.needs_resize_ack = false; SynchronizeVisualProperties(visual_properties); view_screen_rect_ = new_window_rect; @@ -1230,7 +1226,7 @@ // RenderWidgetScreenMetricsDelegate void RenderWidget::Redraw() { - set_next_paint_is_resize_ack(); + needs_visual_properties_ack_ = true; if (compositor_) compositor_->SetNeedsRedrawRect(gfx::Rect(size_)); } @@ -1270,13 +1266,6 @@ if (render_thread) render_thread->SetRenderingColorSpace(params.screen_info.color_space); - if (resizing_mode_selector_->NeverUsesSynchronousResize()) { - // A resize ack shouldn't be requested if we have not ACK'd the previous - // one. - DCHECK(!compositor_ || !params.needs_resize_ack || - !next_paint_is_resize_ack()); - } - // Ignore this during shutdown. if (!GetWebWidget()) return; @@ -1291,14 +1280,6 @@ params.screen_info); UpdateCaptureSequenceNumber(params.capture_sequence_number); if (compositor_) { - // If surface synchronization is enabled, then this will use the provided - // |local_surface_id_| to submit the next generated CompositorFrame. - // If the ID is not valid, then the compositor will defer commits until - // it receives a valid surface ID. This is a no-op if surface - // synchronization is disabled. - DCHECK(!compositor_->IsSurfaceSynchronizationEnabled() || - !params.needs_resize_ack || !params.local_surface_id || - params.local_surface_id->is_valid()); compositor_->SetBrowserControlsHeight( params.top_controls_height, params.bottom_controls_height, params.browser_controls_shrink_blink_size); @@ -1334,32 +1315,19 @@ // When resizing, we want to wait to paint before ACK'ing the resize. This // ensures that we only resize as fast as we can paint. We only need to // send an ACK if we are resized to a non-empty rect. - if (params.new_size.IsEmpty() || - params.compositor_viewport_pixel_size.IsEmpty()) { - // In this case there is no paint/composite and therefore no - // ViewHostMsg_ResizeOrRepaint_ACK to send the resize ack with. We'd need to - // send the ack through a fake ViewHostMsg_ResizeOrRepaint_ACK or a - // different message. - DCHECK(!params.needs_resize_ack); + if (!params.new_size.IsEmpty() && + !params.compositor_viewport_pixel_size.IsEmpty()) { + needs_visual_properties_ack_ = true; } - // Send the Resize_ACK flag once we paint again if requested. - if (params.needs_resize_ack) - set_next_paint_is_resize_ack(); - if (fullscreen_change) DidToggleFullscreen(); - // If a resize ack is requested and it isn't set-up, then no more resizes will - // come in and in general things will go wrong. - DCHECK(!params.needs_resize_ack || next_paint_is_resize_ack()); - // If this resize was initiated before navigation and surface synchronization // is on, it is not expected to be acked. if (compositor_ && compositor_->IsSurfaceSynchronizationEnabled() && - params.needs_resize_ack && !local_surface_id_.is_valid()) { - DCHECK_NE(params.content_source_id, current_content_source_id_); - reset_next_paint_is_resize_ack(); + !local_surface_id_.is_valid()) { + needs_visual_properties_ack_ = false; } } @@ -1397,8 +1365,8 @@ // resize was initiated before navigation, in which case we don't have to ack // it. if (compositor_->IsSurfaceSynchronizationEnabled() && !auto_resize_mode_ && - next_paint_is_resize_ack() && !local_surface_id_.is_valid()) { - reset_next_paint_is_resize_ack(); + !local_surface_id_.is_valid()) { + needs_visual_properties_ack_ = false; } UpdateSurfaceAndScreenInfo(local_surface_id_, compositor_viewport_pixel_size_, @@ -1861,22 +1829,6 @@ observer.UpdateCaptureSequenceNumber(capture_sequence_number); } -void RenderWidget::OnRepaint(gfx::Size size_to_paint) { - // During shutdown we can just ignore this message. - if (!GetWebWidget()) - return; - - // Even if the browser provides an empty damage rect, it's still expecting to - // receive a repaint ack so just damage the entire widget bounds. - if (size_to_paint.IsEmpty()) { - size_to_paint = size_; - } - - set_next_paint_is_repaint_ack(); - if (compositor_) - compositor_->SetNeedsRedrawRect(gfx::Rect(size_to_paint)); -} - void RenderWidget::OnSetTextDirection(WebTextDirection direction) { if (auto* frame = GetFocusedWebLocalFrameInWidget()) frame->SetTextDirection(direction); @@ -2148,24 +2100,6 @@ } } -bool RenderWidget::next_paint_is_resize_ack() const { - return ViewHostMsg_ResizeOrRepaint_ACK_Flags::is_resize_ack( - next_paint_flags_); -} - -void RenderWidget::set_next_paint_is_resize_ack() { - next_paint_flags_ |= ViewHostMsg_ResizeOrRepaint_ACK_Flags::IS_RESIZE_ACK; -} - -void RenderWidget::set_next_paint_is_repaint_ack() { - next_paint_flags_ |= ViewHostMsg_ResizeOrRepaint_ACK_Flags::IS_REPAINT_ACK; -} - -void RenderWidget::reset_next_paint_is_resize_ack() { - DCHECK(next_paint_is_resize_ack()); - next_paint_flags_ ^= ViewHostMsg_ResizeOrRepaint_ACK_Flags::IS_RESIZE_ACK; -} - void RenderWidget::OnImeEventGuardStart(ImeEventGuard* guard) { if (!ime_event_guard_) ime_event_guard_ = guard; @@ -2278,7 +2212,7 @@ screen_info_); if (!resizing_mode_selector_->is_synchronous_mode()) - need_resize_ack_for_auto_resize_ = true; + needs_visual_properties_ack_ = true; } } @@ -2564,10 +2498,8 @@ // If surface synchronization is on, navigation implicitly acks any resize // that has happened so far so we can get the next VisualProperties containing // the LocalSurfaceId that should be used after navigation. - if (compositor_->IsSurfaceSynchronizationEnabled() && !auto_resize_mode_ && - next_paint_is_resize_ack()) { - reset_next_paint_is_resize_ack(); - } + if (compositor_->IsSurfaceSynchronizationEnabled() && !auto_resize_mode_) + needs_visual_properties_ack_ = false; } blink::WebWidget* RenderWidget::GetWebWidget() const { @@ -2597,12 +2529,11 @@ } void RenderWidget::DidResizeOrRepaintAck() { - if (!next_paint_flags_ && !need_resize_ack_for_auto_resize_) + if (!needs_visual_properties_ack_ || size_.IsEmpty()) return; ViewHostMsg_ResizeOrRepaint_ACK_Params params; params.view_size = size_; - params.flags = next_paint_flags_; if (child_local_surface_id_allocator_.GetCurrentLocalSurfaceId().is_valid()) { params.child_allocated_local_surface_id = child_local_surface_id_allocator_.GetCurrentLocalSurfaceId(); @@ -2610,8 +2541,7 @@ } Send(new ViewHostMsg_ResizeOrRepaint_ACK(routing_id_, params)); - next_paint_flags_ = 0; - need_resize_ack_for_auto_resize_ = false; + needs_visual_properties_ack_ = false; } void RenderWidget::UpdateURLForCompositorUkm() {
diff --git a/content/renderer/render_widget.h b/content/renderer/render_widget.h index 5e5c356..94b0896 100644 --- a/content/renderer/render_widget.h +++ b/content/renderer/render_widget.h
@@ -575,7 +575,6 @@ virtual void OnShowContextMenu(ui::MenuSourceType source_type, const gfx::Point& location); - void OnRepaint(gfx::Size size_to_paint); void OnSetTextDirection(blink::WebTextDirection direction); void OnGetFPS(); void OnUpdateScreenRects(const gfx::Rect& view_screen_rect, @@ -624,10 +623,9 @@ void DidToggleFullscreen(); - bool next_paint_is_resize_ack() const; - void set_next_paint_is_resize_ack(); - void set_next_paint_is_repaint_ack(); - void reset_next_paint_is_resize_ack(); + bool needs_visual_properties_ack() const { + return needs_visual_properties_ack_; + } // Returns a rect that the compositor needs to raster. For a main frame this // is always the entire viewprot, but for out-of-process iframes this can be @@ -727,16 +725,12 @@ gfx::Size visible_viewport_size_; // Flags for the next ViewHostMsg_ResizeOrRepaint_ACK message. - int next_paint_flags_; + bool needs_visual_properties_ack_ = false; // Whether the WebWidget is in auto resize mode, which is used for example // by extension popups. bool auto_resize_mode_; - // True if we need to send a ViewHsotMsg_ResizeOrRepaint_ACK message to notify - // the browser about an already-completed auto-resize. - bool need_resize_ack_for_auto_resize_; - // The minimum size to use for auto-resize. gfx::Size min_size_for_auto_resize_;
diff --git a/content/renderer/render_widget_browsertest.cc b/content/renderer/render_widget_browsertest.cc index 3be2e12..10818c5e 100644 --- a/content/renderer/render_widget_browsertest.cc +++ b/content/renderer/render_widget_browsertest.cc
@@ -34,8 +34,8 @@ widget()->GetCompositionRange(range); } - bool next_paint_is_resize_ack() { - return widget()->next_paint_is_resize_ack(); + bool needs_visual_properties_ack() { + return widget()->needs_visual_properties_ack(); } blink::WebInputMethodController* GetInputMethodController() { @@ -64,15 +64,12 @@ visual_properties.top_controls_height = 0.f; visual_properties.browser_controls_shrink_blink_size = false; visual_properties.is_fullscreen_granted = false; - visual_properties.needs_resize_ack = false; visual_properties.content_source_id = 0u; OnSynchronizeVisualProperties(visual_properties); - EXPECT_EQ(visual_properties.needs_resize_ack, next_paint_is_resize_ack()); // Setting empty physical backing size should not send the ack. visual_properties.new_size = gfx::Size(10, 10); OnSynchronizeVisualProperties(visual_properties); - EXPECT_EQ(visual_properties.needs_resize_ack, next_paint_is_resize_ack()); // Setting the bounds to a "real" rect should send the ack. render_thread_->sink().ClearMessages(); @@ -82,35 +79,28 @@ visual_properties.new_size = size; visual_properties.compositor_viewport_pixel_size = size; visual_properties.content_source_id = 1u; - visual_properties.needs_resize_ack = true; OnSynchronizeVisualProperties(visual_properties); - EXPECT_EQ(visual_properties.needs_resize_ack, next_paint_is_resize_ack()); // Clear the flag. widget()->DidCommitCompositorFrame(); widget()->DidCommitAndDrawCompositorFrame(); // Setting the same size again should not send the ack. - visual_properties.needs_resize_ack = false; OnSynchronizeVisualProperties(visual_properties); - EXPECT_EQ(visual_properties.needs_resize_ack, next_paint_is_resize_ack()); // Resetting the rect to empty should not send the ack. visual_properties.new_size = gfx::Size(); visual_properties.compositor_viewport_pixel_size = gfx::Size(); visual_properties.local_surface_id = base::nullopt; OnSynchronizeVisualProperties(visual_properties); - EXPECT_EQ(visual_properties.needs_resize_ack, next_paint_is_resize_ack()); // Changing the screen info should not send the ack. visual_properties.screen_info.orientation_angle = 90; OnSynchronizeVisualProperties(visual_properties); - EXPECT_EQ(visual_properties.needs_resize_ack, next_paint_is_resize_ack()); visual_properties.screen_info.orientation_type = SCREEN_ORIENTATION_VALUES_PORTRAIT_PRIMARY; OnSynchronizeVisualProperties(visual_properties); - EXPECT_EQ(visual_properties.needs_resize_ack, next_paint_is_resize_ack()); } class RenderWidgetInitialSizeTest : public RenderWidgetTest { @@ -125,7 +115,6 @@ new VisualProperties()); initial_visual_properties->new_size = initial_size_; initial_visual_properties->compositor_viewport_pixel_size = initial_size_; - initial_visual_properties->needs_resize_ack = true; initial_visual_properties->local_surface_id = local_surface_id_; return initial_visual_properties; } @@ -138,7 +127,7 @@ TEST_F(RenderWidgetInitialSizeTest, InitialSize) { EXPECT_EQ(initial_size_, widget()->size()); EXPECT_EQ(initial_size_, gfx::Size(widget()->GetWebWidget()->Size())); - EXPECT_TRUE(next_paint_is_resize_ack()); + EXPECT_TRUE(needs_visual_properties_ack()); } TEST_F(RenderWidgetTest, HitTestAPI) {
diff --git a/content/renderer/render_widget_unittest.cc b/content/renderer/render_widget_unittest.cc index aba8905e..90863d1d 100644 --- a/content/renderer/render_widget_unittest.cc +++ b/content/renderer/render_widget_unittest.cc
@@ -389,7 +389,6 @@ viz::LocalSurfaceId(1, 1, base::UnguessableToken::Create()); visual_properties.visible_viewport_size = size; visual_properties.content_source_id = widget()->GetContentSourceId(); - visual_properties.needs_resize_ack = true; widget()->OnMessageReceived(ViewMsg_SynchronizeVisualProperties( widget()->routing_id(), visual_properties));
diff --git a/content/shell/test_runner/web_ax_object_proxy.cc b/content/shell/test_runner/web_ax_object_proxy.cc index 2624776..fa542de 100644 --- a/content/shell/test_runner/web_ax_object_proxy.cc +++ b/content/shell/test_runner/web_ax_object_proxy.cc
@@ -1095,11 +1095,6 @@ return accessibility_object_.IsOffScreen(); } -bool WebAXObjectProxy::HasPopup() { - accessibility_object_.UpdateLayoutAndCheckValidity(); - return accessibility_object_.AriaHasPopup(); -} - bool WebAXObjectProxy::IsValid() { accessibility_object_.UpdateLayoutAndCheckValidity(); return !accessibility_object_.IsDetached(); @@ -1173,6 +1168,26 @@ } } +std::string WebAXObjectProxy::HasPopup() { + accessibility_object_.UpdateLayoutAndCheckValidity(); + switch (accessibility_object_.HasPopup()) { + case blink::kWebAXHasPopupTrue: + return "true"; + case blink::kWebAXHasPopupMenu: + return "menu"; + case blink::kWebAXHasPopupListbox: + return "listbox"; + case blink::kWebAXHasPopupTree: + return "tree"; + case blink::kWebAXHasPopupGrid: + return "grid"; + case blink::kWebAXHasPopupDialog: + return "dialog"; + default: + return std::string(); + } +} + std::string WebAXObjectProxy::Invalid() { accessibility_object_.UpdateLayoutAndCheckValidity(); switch (accessibility_object_.InvalidState()) {
diff --git a/content/shell/test_runner/web_ax_object_proxy.h b/content/shell/test_runner/web_ax_object_proxy.h index 3f0531e..79d25a6 100644 --- a/content/shell/test_runner/web_ax_object_proxy.h +++ b/content/shell/test_runner/web_ax_object_proxy.h
@@ -112,7 +112,6 @@ bool IsVisible(); bool IsOffScreen(); bool IsCollapsed(); - bool HasPopup(); bool IsValid(); bool IsReadOnly(); std::string Restriction(); @@ -125,6 +124,7 @@ float FontSize(); std::string Autocomplete(); std::string Current(); + std::string HasPopup(); std::string Invalid(); std::string KeyShortcuts(); std::string Live();
diff --git a/content/test/data/accessibility/aria/aria-autocomplete-expected-blink.txt b/content/test/data/accessibility/aria/aria-autocomplete-expected-blink.txt index d08611b..b21a54b0 100644 --- a/content/test/data/accessibility/aria/aria-autocomplete-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-autocomplete-expected-blink.txt
@@ -1,18 +1,18 @@ rootWebArea ++genericContainer -++++textFieldWithComboBox haspopup autoComplete='inline' +++++textFieldWithComboBox haspopup autoComplete='inline' haspopup=menu ++++++genericContainer ++++++++staticText name='autocomplete=inline' ++++++++++inlineTextBox name='autocomplete=inline' -++++textFieldWithComboBox haspopup autoComplete='list' +++++textFieldWithComboBox haspopup autoComplete='list' haspopup=menu ++++++genericContainer ++++++++staticText name='autocomplete=list' ++++++++++inlineTextBox name='autocomplete=list' -++++textFieldWithComboBox haspopup autoComplete='both' +++++textFieldWithComboBox haspopup autoComplete='both' haspopup=menu ++++++genericContainer ++++++++staticText name='autocomplete=both' ++++++++++inlineTextBox name='autocomplete=both' -++++textFieldWithComboBox haspopup +++++textFieldWithComboBox haspopup haspopup=menu ++++++genericContainer ++++++++staticText name='autocomplete=none' ++++++++++inlineTextBox name='autocomplete=none'
diff --git a/content/test/data/accessibility/aria/aria-autocomplete-expected-win.txt b/content/test/data/accessibility/aria/aria-autocomplete-expected-win.txt index 27f603f..e1a9b8a 100644 --- a/content/test/data/accessibility/aria/aria-autocomplete-expected-win.txt +++ b/content/test/data/accessibility/aria/aria-autocomplete-expected-win.txt
@@ -1,7 +1,7 @@ ROLE_SYSTEM_DOCUMENT READONLY FOCUSABLE ++IA2_ROLE_SECTION -++++ROLE_SYSTEM_COMBOBOX FOCUSABLE HASPOPUP IA2_STATE_SUPPORTS_AUTOCOMPLETION autocomplete:inline -++++ROLE_SYSTEM_COMBOBOX FOCUSABLE HASPOPUP IA2_STATE_SUPPORTS_AUTOCOMPLETION autocomplete:list -++++ROLE_SYSTEM_COMBOBOX FOCUSABLE HASPOPUP IA2_STATE_SUPPORTS_AUTOCOMPLETION autocomplete:both -++++ROLE_SYSTEM_COMBOBOX FOCUSABLE HASPOPUP +++++ROLE_SYSTEM_COMBOBOX FOCUSABLE HASPOPUP IA2_STATE_SUPPORTS_AUTOCOMPLETION autocomplete:inline haspopup:menu +++++ROLE_SYSTEM_COMBOBOX FOCUSABLE HASPOPUP IA2_STATE_SUPPORTS_AUTOCOMPLETION autocomplete:list haspopup:menu +++++ROLE_SYSTEM_COMBOBOX FOCUSABLE HASPOPUP IA2_STATE_SUPPORTS_AUTOCOMPLETION autocomplete:both haspopup:menu +++++ROLE_SYSTEM_COMBOBOX FOCUSABLE HASPOPUP haspopup:menu ++++ROLE_SYSTEM_TEXT FOCUSABLE IA2_STATE_SUPPORTS_AUTOCOMPLETION autocomplete:inline
diff --git a/content/test/data/accessibility/aria/aria-autocomplete.html b/content/test/data/accessibility/aria/aria-autocomplete.html index f01dbe91..18fb81c 100644 --- a/content/test/data/accessibility/aria/aria-autocomplete.html +++ b/content/test/data/accessibility/aria/aria-autocomplete.html
@@ -1,6 +1,8 @@ <!-- @WIN-ALLOW:IA2_STATE_SUPPORTS_AUTOCOMPLETION @WIN-ALLOW:autocomplete:* +@WIN-ALLOW:haspopup* +@BLINK-ALLOW:haspopup* --> <html> <body>
diff --git a/content/test/data/accessibility/aria/aria-button-expected-blink.txt b/content/test/data/accessibility/aria/aria-button-expected-blink.txt index 61ee15f..0f67bd3 100644 --- a/content/test/data/accessibility/aria/aria-button-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-button-expected-blink.txt
@@ -2,7 +2,7 @@ ++button name='Button1' ++toggleButton name='Button2' checkedState=true ++toggleButton name='Button3' checkedState=false -++popUpButton haspopup name='Button4' +++popUpButton haspopup name='Button4' haspopup=menu ++button name='Button5' ++button name='Complex button ' ++++staticText name='Complex button '
diff --git a/content/test/data/accessibility/aria/aria-button-expected-win.txt b/content/test/data/accessibility/aria/aria-button-expected-win.txt index 6fe30d5..90fbf30 100644 --- a/content/test/data/accessibility/aria/aria-button-expected-win.txt +++ b/content/test/data/accessibility/aria/aria-button-expected-win.txt
@@ -2,7 +2,7 @@ ++ROLE_SYSTEM_PUSHBUTTON name='Button1' FOCUSABLE xml-roles:button ia2_hypertext='Button1' ++IA2_ROLE_TOGGLE_BUTTON name='Button2' PRESSED FOCUSABLE IA2_STATE_CHECKABLE xml-roles:button checkable:true ia2_hypertext='Button2' ++IA2_ROLE_TOGGLE_BUTTON name='Button3' FOCUSABLE IA2_STATE_CHECKABLE xml-roles:button checkable:true ia2_hypertext='Button3' -++ROLE_SYSTEM_BUTTONMENU name='Button4' FOCUSABLE HASPOPUP xml-roles:button ia2_hypertext='Button4' +++ROLE_SYSTEM_BUTTONMENU name='Button4' FOCUSABLE HASPOPUP xml-roles:button haspopup:menu ia2_hypertext='Button4' ++ROLE_SYSTEM_PUSHBUTTON name='Button5' FOCUSABLE xml-roles:button ia2_hypertext='Button5' ++ROLE_SYSTEM_PUSHBUTTON name='Complex button ' FOCUSABLE xml-roles:button ia2_hypertext='Complex button <obj1>' ++++ROLE_SYSTEM_STATICTEXT name='Complex button ' ia2_hypertext='Complex button '
diff --git a/content/test/data/accessibility/aria/aria-button.html b/content/test/data/accessibility/aria/aria-button.html index 6dfd4e28..1070f48 100644 --- a/content/test/data/accessibility/aria/aria-button.html +++ b/content/test/data/accessibility/aria/aria-button.html
@@ -3,9 +3,11 @@ @MAC-ALLOW:AXSubrole* @WIN-ALLOW:checkable* @WIN-ALLOW:HASPOPUP +@WIN-ALLOW:haspopup* @WIN-ALLOW:ia2_hypertext=* @WIN-ALLOW:PRESSED @WIN-ALLOW:xml-roles:* +@BLINK-ALLOW:haspopup* --> <!DOCTYPE html> <html>
diff --git a/content/test/data/accessibility/aria/aria-combobox-expected-blink.txt b/content/test/data/accessibility/aria/aria-combobox-expected-blink.txt index 434b97c..30bf12fe 100644 --- a/content/test/data/accessibility/aria/aria-combobox-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-combobox-expected-blink.txt
@@ -2,7 +2,7 @@ ++genericContainer ++++staticText name='State' ++++++inlineTextBox name='State' -++textFieldWithComboBox haspopup autoComplete='list' name='State' activedescendantId=listBoxOption restriction=readOnly +++textFieldWithComboBox haspopup autoComplete='list' name='State' activedescendantId=listBoxOption restriction=readOnly haspopup=listbox ++listBox ++++listBoxOption name='Alabama' selected=false ++++listBoxOption name='Alaska' selected=true \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-combobox-expected-win.txt b/content/test/data/accessibility/aria/aria-combobox-expected-win.txt index 456c1c3..d41d9161 100644 --- a/content/test/data/accessibility/aria/aria-combobox-expected-win.txt +++ b/content/test/data/accessibility/aria/aria-combobox-expected-win.txt
@@ -1,7 +1,7 @@ ROLE_SYSTEM_DOCUMENT READONLY FOCUSABLE ia2_hypertext='<obj0><obj1><obj2>' ++IA2_ROLE_SECTION ia2_hypertext='State' ++++ROLE_SYSTEM_STATICTEXT name='State' ia2_hypertext='State' -++ROLE_SYSTEM_COMBOBOX name='State' READONLY EXPANDED FOCUSABLE HASPOPUP +++ROLE_SYSTEM_COMBOBOX name='State' READONLY EXPANDED FOCUSABLE HASPOPUP haspopup:listbox ++ROLE_SYSTEM_LIST ia2_hypertext='<obj0><obj1>' ++++ROLE_SYSTEM_LISTITEM name='Alabama' FOCUSABLE SELECTABLE ia2_hypertext='Alabama' ++++ROLE_SYSTEM_LISTITEM name='Alaska' SELECTED FOCUSED FOCUSABLE SELECTABLE ia2_hypertext='Alaska'
diff --git a/content/test/data/accessibility/aria/aria-combobox.html b/content/test/data/accessibility/aria/aria-combobox.html index d4269ec..887d128 100644 --- a/content/test/data/accessibility/aria/aria-combobox.html +++ b/content/test/data/accessibility/aria/aria-combobox.html
@@ -5,8 +5,10 @@ @MAC-ALLOW:AXTitleUIElement* @WIN-DENY:description* @WIN-ALLOW:FOCUS* +@WIN-ALLOW:haspopup* @WIN-ALLOW:ia2_hypertext=* @WIN-ALLOW:SELECT* +@BLINK-ALLOW:haspopup* --> <html> <body> @@ -15,7 +17,7 @@ role="combobox" aria-autocomplete="list" aria-expanded="true" - aria-haspopup="true" + aria-haspopup="listbox" aria-labelledby="state_label" aria-owns="state_list" aria-readonly="true"
diff --git a/content/test/data/accessibility/aria/aria-expanded-expected-blink.txt b/content/test/data/accessibility/aria/aria-expanded-expected-blink.txt index bf3ed19..e829419 100644 --- a/content/test/data/accessibility/aria/aria-expanded-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-expanded-expected-blink.txt
@@ -1,7 +1,7 @@ rootWebArea ++menu -++++menuItem collapsed haspopup name='New' -++++menuItem haspopup name='Open' +++++menuItem collapsed haspopup name='New' haspopup=menu +++++menuItem haspopup name='Open' haspopup=menu ++++menuItem collapsed name='Save' ++++menuItem name='Quit' ++splitter horizontal
diff --git a/content/test/data/accessibility/aria/aria-expanded-expected-win.txt b/content/test/data/accessibility/aria/aria-expanded-expected-win.txt index 267f11dc..5574838 100644 --- a/content/test/data/accessibility/aria/aria-expanded-expected-win.txt +++ b/content/test/data/accessibility/aria/aria-expanded-expected-win.txt
@@ -1,7 +1,7 @@ ROLE_SYSTEM_DOCUMENT READONLY FOCUSABLE ++ROLE_SYSTEM_MENUPOPUP -++++ROLE_SYSTEM_MENUITEM name='New' COLLAPSED HASPOPUP -++++ROLE_SYSTEM_MENUITEM name='Open' EXPANDED HASPOPUP +++++ROLE_SYSTEM_MENUITEM name='New' COLLAPSED HASPOPUP haspopup:menu +++++ROLE_SYSTEM_MENUITEM name='Open' EXPANDED HASPOPUP haspopup:menu ++++ROLE_SYSTEM_MENUITEM name='Save' COLLAPSED ++++ROLE_SYSTEM_MENUITEM name='Quit' EXPANDED ++ROLE_SYSTEM_SEPARATOR IA2_STATE_HORIZONTAL
diff --git a/content/test/data/accessibility/aria/aria-expanded.html b/content/test/data/accessibility/aria/aria-expanded.html index b99f2c4..d308c9d 100644 --- a/content/test/data/accessibility/aria/aria-expanded.html +++ b/content/test/data/accessibility/aria/aria-expanded.html
@@ -3,6 +3,8 @@ @WIN-ALLOW:EXPANDED* @WIN-ALLOW:COLLAPSED* @WIN-ALLOW:HASPOPUP* +@WIN-ALLOW:haspopup* +@BLINK-ALLOW:haspopup* --> <ul role="menu" style="list-style-type: none"> <li role="menuitem" aria-haspopup="true" aria-expanded="false">New</li>
diff --git a/content/test/data/accessibility/aria/aria-haspopup-expected-android.txt b/content/test/data/accessibility/aria/aria-haspopup-expected-android.txt index 1a3ad74..58b57f2 100644 --- a/content/test/data/accessibility/aria/aria-haspopup-expected-android.txt +++ b/content/test/data/accessibility/aria/aria-haspopup-expected-android.txt
@@ -1,3 +1,10 @@ android.webkit.WebView focusable focused scrollable ++android.widget.Spinner clickable focusable +++android.widget.Spinner clickable focusable +++android.widget.Spinner clickable focusable +++android.widget.Spinner clickable focusable +++android.widget.Spinner clickable focusable +++android.widget.Spinner clickable focusable +++android.widget.Spinner clickable focusable +++android.widget.Spinner clickable focusable ++android.widget.Spinner clickable focusable \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-haspopup-expected-blink.txt b/content/test/data/accessibility/aria/aria-haspopup-expected-blink.txt index 3475b9f..bdf525c80 100644 --- a/content/test/data/accessibility/aria/aria-haspopup-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-haspopup-expected-blink.txt
@@ -1,3 +1,10 @@ rootWebArea -++comboBoxMenuButton haspopup -++comboBoxMenuButton \ No newline at end of file +++comboBoxMenuButton haspopup haspopup=menu +++comboBoxMenuButton +++comboBoxMenuButton haspopup haspopup=menu +++comboBoxMenuButton haspopup haspopup=listbox +++comboBoxMenuButton haspopup haspopup=grid +++comboBoxMenuButton haspopup haspopup=dialog +++comboBoxMenuButton haspopup haspopup=menu +++comboBoxMenuButton haspopup haspopup=menu +++comboBoxMenuButton haspopup haspopup=menu \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-haspopup-expected-mac.txt b/content/test/data/accessibility/aria/aria-haspopup-expected-mac.txt index c9d685f..9748002 100644 --- a/content/test/data/accessibility/aria/aria-haspopup-expected-mac.txt +++ b/content/test/data/accessibility/aria/aria-haspopup-expected-mac.txt
@@ -2,3 +2,10 @@ AXWebArea ++AXComboBox ++AXComboBox +++AXComboBox +++AXComboBox +++AXComboBox +++AXComboBox +++AXComboBox +++AXComboBox +++AXComboBox
diff --git a/content/test/data/accessibility/aria/aria-haspopup-expected-win.txt b/content/test/data/accessibility/aria/aria-haspopup-expected-win.txt index fb5e209..73cae5b 100644 --- a/content/test/data/accessibility/aria/aria-haspopup-expected-win.txt +++ b/content/test/data/accessibility/aria/aria-haspopup-expected-win.txt
@@ -1,3 +1,10 @@ ROLE_SYSTEM_DOCUMENT READONLY FOCUSABLE -++ROLE_SYSTEM_COMBOBOX FOCUSABLE HASPOPUP +++ROLE_SYSTEM_COMBOBOX FOCUSABLE HASPOPUP haspopup:menu ++ROLE_SYSTEM_COMBOBOX FOCUSABLE +++ROLE_SYSTEM_COMBOBOX FOCUSABLE HASPOPUP haspopup:menu +++ROLE_SYSTEM_COMBOBOX FOCUSABLE HASPOPUP haspopup:listbox +++ROLE_SYSTEM_COMBOBOX FOCUSABLE HASPOPUP haspopup:grid +++ROLE_SYSTEM_COMBOBOX FOCUSABLE HASPOPUP haspopup:dialog +++ROLE_SYSTEM_COMBOBOX FOCUSABLE HASPOPUP haspopup:menu +++ROLE_SYSTEM_COMBOBOX FOCUSABLE HASPOPUP haspopup:menu +++ROLE_SYSTEM_COMBOBOX FOCUSABLE HASPOPUP haspopup:menu
diff --git a/content/test/data/accessibility/aria/aria-haspopup.html b/content/test/data/accessibility/aria/aria-haspopup.html index 64c00d5..3f8cac0 100644 --- a/content/test/data/accessibility/aria/aria-haspopup.html +++ b/content/test/data/accessibility/aria/aria-haspopup.html
@@ -4,6 +4,8 @@ @MAC-ALLOW:AXPress* @WIN-ALLOW:EXPANDED* @WIN-ALLOW:HASPOPUP* +@WIN-ALLOW:haspopup* +@BLINK-ALLOW:haspopup* --> <!DOCTYPE html> <html> @@ -12,5 +14,19 @@ </div> <div tabindex=1 role="combobox" aria-haspopup="false"> </div> + <div tabindex=2 role="combobox" aria-haspopup="menu"> + </div> + <div tabindex=3 role="combobox" aria-haspopup="listbox"> + </div> + <div tabindex=4 role="combobox" aria-haspopup="grid"> + </div> + <div tabindex=5 role="combobox" aria-haspopup="dialog"> + </div> + <div tabindex=6 role="combobox" aria-haspopup="invalid"> + </div> + <div tabindex=7 role="combobox" aria-haspopup=""> + </div> + <div tabindex=8 role="combobox"> + </div> </body> </html>
diff --git a/content/test/data/accessibility/aria/aria-illegal-val-expected-blink.txt b/content/test/data/accessibility/aria/aria-illegal-val-expected-blink.txt index 26bb886f..6776dbe0 100644 --- a/content/test/data/accessibility/aria/aria-illegal-val-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-illegal-val-expected-blink.txt
@@ -8,7 +8,7 @@ ++genericContainer name='Dropeffect illegal' ++treeItem expanded name='Expanded illegal' selected=false ++genericContainer name='Grabbed illegal' -++popUpButton haspopup name='Haspopup illegal' +++popUpButton haspopup name='Haspopup illegal' haspopup=menu ++genericContainer ariaInvalidValue='X-ILLEGAL' name='Invalid illegal' invalidState=other ++log containerLiveRelevant='additions text' containerLiveStatus='X-ILLEGAL' name='Live illegal' liveRelevant='additions text' liveStatus='X-ILLEGAL' containerLiveAtomic=false containerLiveBusy=false liveAtomic=false ++dialog name='Modal illegal' modal=true
diff --git a/content/test/data/accessibility/aria/aria-illegal-val-expected-win.txt b/content/test/data/accessibility/aria/aria-illegal-val-expected-win.txt index 95705bf..b2e7460 100644 --- a/content/test/data/accessibility/aria/aria-illegal-val-expected-win.txt +++ b/content/test/data/accessibility/aria/aria-illegal-val-expected-win.txt
@@ -8,7 +8,7 @@ ++IA2_ROLE_SECTION name='Dropeffect illegal' dropeffect:X-ILLEGAL ++ROLE_SYSTEM_OUTLINEITEM name='Expanded illegal' EXPANDED ++IA2_ROLE_SECTION name='Grabbed illegal' grabbed:X-ILLEGAL -++ROLE_SYSTEM_BUTTONMENU name='Haspopup illegal' HASPOPUP +++ROLE_SYSTEM_BUTTONMENU name='Haspopup illegal' HASPOPUP haspopup:menu ++IA2_ROLE_SECTION name='Invalid illegal' IA2_STATE_INVALID_ENTRY ++ROLE_SYSTEM_CLIENT name='Live illegal' live:X-ILLEGAL relevant:additions text atomic:false ++ROLE_SYSTEM_DIALOG name='Modal illegal' IA2_STATE_MODAL
diff --git a/content/test/data/accessibility/aria/aria-illegal-val.html b/content/test/data/accessibility/aria/aria-illegal-val.html index 8af8f16..df2f138 100644 --- a/content/test/data/accessibility/aria/aria-illegal-val.html +++ b/content/test/data/accessibility/aria/aria-illegal-val.html
@@ -7,6 +7,7 @@ @WIN-ALLOW:current* @WIN-ALLOW:drop* @WIN-ALLOW:grab* +@WIN-ALLOW:haspopup* @WIN-ALLOW:live* @WIN-ALLOW:relevant* @WIN-ALLOW:sort*
diff --git a/content/test/data/accessibility/aria/aria-readonly-expected-blink.txt b/content/test/data/accessibility/aria/aria-readonly-expected-blink.txt index 4da4158..cf31c5f 100644 --- a/content/test/data/accessibility/aria/aria-readonly-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria-readonly-expected-blink.txt
@@ -18,7 +18,7 @@ ++textField name='Readonly-false contenteditable textbox' ++textField name='Readonly-true contenteditable textbox' restriction=readOnly ++checkBox name='Readonly checkbox' restriction=readOnly -++textFieldWithComboBox haspopup name='Readonly combobox' restriction=readOnly +++textFieldWithComboBox haspopup name='Readonly combobox' restriction=readOnly haspopup=menu ++listBox name='Readonly listbox' restriction=readOnly ++radioGroup name='Readonly radiogroup' restriction=readOnly ++slider horizontal name='Readonly slider' restriction=readOnly
diff --git a/content/test/data/accessibility/aria/aria-readonly-expected-win.txt b/content/test/data/accessibility/aria/aria-readonly-expected-win.txt index 0c8bf3a..8631600 100644 --- a/content/test/data/accessibility/aria/aria-readonly-expected-win.txt +++ b/content/test/data/accessibility/aria/aria-readonly-expected-win.txt
@@ -12,7 +12,7 @@ ++ROLE_SYSTEM_TEXT name='Readonly-false contenteditable textbox' ++ROLE_SYSTEM_TEXT name='Readonly-true contenteditable textbox' READONLY ++ROLE_SYSTEM_CHECKBUTTON name='Readonly checkbox' READONLY -++ROLE_SYSTEM_COMBOBOX name='Readonly combobox' READONLY HASPOPUP IA2_STATE_EDITABLE +++ROLE_SYSTEM_COMBOBOX name='Readonly combobox' READONLY HASPOPUP IA2_STATE_EDITABLE haspopup:menu ++ROLE_SYSTEM_LIST name='Readonly listbox' READONLY ++ROLE_SYSTEM_GROUPING name='Readonly radiogroup' READONLY ++ROLE_SYSTEM_SLIDER name='Readonly slider' READONLY
diff --git a/content/test/data/accessibility/aria/aria-readonly.html b/content/test/data/accessibility/aria/aria-readonly.html index 14fc861..defe376 100644 --- a/content/test/data/accessibility/aria/aria-readonly.html +++ b/content/test/data/accessibility/aria/aria-readonly.html
@@ -1,4 +1,5 @@ <!-- +@WIN-ALLOW:haspopup* @WIN-ALLOW:IA2_STATE_EDITABLE @WIN-DENY:IA2_STATE_MULTI_LINE @WIN-DENY:IA2_STATE_CHECKABLE @@ -6,6 +7,7 @@ @WIN-DENY:IA2_STATE_HORIZONTAL @WIN-DENY:FOCUSABLE @MAC-ALLOW:AXValue=* +@BLINK-ALLOW:haspopup* @BLINK-ALLOW:restriction* @BLINK-DENY:checkedState* @BLINK-DENY:*ForRange*
diff --git a/content/test/data/accessibility/aria/aria1.1-combobox-expected-blink.txt b/content/test/data/accessibility/aria/aria1.1-combobox-expected-blink.txt index 2aef908..2f6d2ab 100644 --- a/content/test/data/accessibility/aria/aria1.1-combobox-expected-blink.txt +++ b/content/test/data/accessibility/aria/aria1.1-combobox-expected-blink.txt
@@ -2,12 +2,12 @@ ++genericContainer ++++staticText name='State' ++++++inlineTextBox name='State' -++comboBoxGrouping haspopup name='State' +++comboBoxGrouping haspopup name='State' haspopup=listbox ++++textField activedescendantId=listBoxOption controlsIds=listBox ++listBox ++++listBoxOption name='Alabama' selected=false ++++listBoxOption name='Alaska' selected=true -++comboBoxGrouping haspopup name='State' +++comboBoxGrouping haspopup name='State' haspopup=listbox ++++textField activedescendantId=listBoxOption controlsIds=listBox ++listBox ++++listBoxOption name='Alabama' selected=false
diff --git a/content/test/data/accessibility/aria/aria1.1-combobox-expected-win.txt b/content/test/data/accessibility/aria/aria1.1-combobox-expected-win.txt index d679b9e..e3b29ce 100644 --- a/content/test/data/accessibility/aria/aria1.1-combobox-expected-win.txt +++ b/content/test/data/accessibility/aria/aria1.1-combobox-expected-win.txt
@@ -1,12 +1,12 @@ ROLE_SYSTEM_DOCUMENT READONLY FOCUSABLE ia2_hypertext='<obj0><obj1><obj2><obj3><obj4>' ++IA2_ROLE_SECTION ia2_hypertext='State' ++++ROLE_SYSTEM_STATICTEXT name='State' ia2_hypertext='State' -++ROLE_SYSTEM_COMBOBOX name='State' EXPANDED HASPOPUP ia2_hypertext='<obj0>' +++ROLE_SYSTEM_COMBOBOX name='State' EXPANDED HASPOPUP haspopup:listbox ia2_hypertext='<obj0>' ++++ROLE_SYSTEM_TEXT FOCUSABLE ++ROLE_SYSTEM_LIST FOCUSABLE ia2_hypertext='<obj0><obj1>' ++++ROLE_SYSTEM_LISTITEM name='Alabama' FOCUSABLE SELECTABLE ia2_hypertext='Alabama' ++++ROLE_SYSTEM_LISTITEM name='Alaska' SELECTED FOCUSED FOCUSABLE SELECTABLE ia2_hypertext='Alaska' -++ROLE_SYSTEM_COMBOBOX name='State' EXPANDED HASPOPUP ia2_hypertext='<obj0>' +++ROLE_SYSTEM_COMBOBOX name='State' EXPANDED HASPOPUP haspopup:listbox ia2_hypertext='<obj0>' ++++ROLE_SYSTEM_TEXT FOCUSABLE ++ROLE_SYSTEM_LIST ia2_hypertext='<obj0><obj1>' ++++ROLE_SYSTEM_LISTITEM name='Alabama' FOCUSABLE SELECTABLE ia2_hypertext='Alabama'
diff --git a/content/test/data/accessibility/aria/aria1.1-combobox.html b/content/test/data/accessibility/aria/aria1.1-combobox.html index 7c06a3de..4fbd0f0 100644 --- a/content/test/data/accessibility/aria/aria1.1-combobox.html +++ b/content/test/data/accessibility/aria/aria1.1-combobox.html
@@ -5,8 +5,10 @@ @MAC-ALLOW:AXTitleUIElement* @WIN-DENY:description* @WIN-ALLOW:FOCUS* +@WIN-ALLOW:haspopup* @WIN-ALLOW:ia2_hypertext=* @WIN-ALLOW:SELECT* +@BLINK-ALLOW:haspopup* --> <html> <body> @@ -16,7 +18,7 @@ <div role="combobox" aria-autocomplete="list" aria-expanded="true" - aria-haspopup="true" + aria-haspopup="listbox" aria-labelledby="state_label"> <input type="text" aria-activedescendant="list1-state2" @@ -33,7 +35,7 @@ <div role="combobox" aria-autocomplete="list" aria-expanded="true" - aria-haspopup="true" + aria-haspopup="listbox" aria-labelledby="state_label"> <input type="text"> </div>
diff --git a/content/test/data/accessibility/html/action-verbs-expected-blink.txt b/content/test/data/accessibility/html/action-verbs-expected-blink.txt index 6500c02..55a157c 100644 --- a/content/test/data/accessibility/html/action-verbs-expected-blink.txt +++ b/content/test/data/accessibility/html/action-verbs-expected-blink.txt
@@ -21,7 +21,7 @@ ++++disclosureTriangle collapsed name='Summary' defaultActionVerb=press ++++++staticText name='Summary' ++++++++inlineTextBox name='Summary' -++popUpButton collapsed haspopup defaultActionVerb=open +++popUpButton collapsed haspopup defaultActionVerb=open haspopup=menu ++++menuListPopup invisible ++++++menuListOption name='Pop-up button' defaultActionVerb=select selected=true ++genericContainer defaultActionVerb=click
diff --git a/content/test/data/accessibility/html/action-verbs-expected-win.txt b/content/test/data/accessibility/html/action-verbs-expected-win.txt index 4f4d94c..e97e67e 100644 --- a/content/test/data/accessibility/html/action-verbs-expected-win.txt +++ b/content/test/data/accessibility/html/action-verbs-expected-win.txt
@@ -17,7 +17,7 @@ ++ROLE_SYSTEM_GROUPING ++++ROLE_SYSTEM_PUSHBUTTON name='Summary' COLLAPSED FOCUSABLE default_action='press' action_name='press' ++++++ROLE_SYSTEM_STATICTEXT name='Summary' -++ROLE_SYSTEM_COMBOBOX COLLAPSED FOCUSABLE HASPOPUP default_action='open' action_name='open' +++ROLE_SYSTEM_COMBOBOX COLLAPSED FOCUSABLE HASPOPUP haspopup:menu default_action='open' action_name='open' ++++ROLE_SYSTEM_LIST INVISIBLE ++++++ROLE_SYSTEM_LISTITEM name='Pop-up button' SELECTED FOCUSABLE default_action='select' action_name='select' ++IA2_ROLE_SECTION default_action='click' action_name='click'
diff --git a/content/test/data/accessibility/html/action-verbs.html b/content/test/data/accessibility/html/action-verbs.html index a51af75..2be9251 100644 --- a/content/test/data/accessibility/html/action-verbs.html +++ b/content/test/data/accessibility/html/action-verbs.html
@@ -1,7 +1,9 @@ <!-- @BLINK-ALLOW:defaultActionVerb* -@WIN-ALLOW:default_action* +@BLINK-ALLOW:haspopup* @WIN-ALLOW:action_name* +@WIN-ALLOW:default_action* +@WIN-ALLOW:haspopup* --> <!doctype html> <html>
diff --git a/content/test/data/accessibility/html/input-datetime-local-expected-win.txt b/content/test/data/accessibility/html/input-datetime-local-expected-win.txt index 35a24a84..ae3830c4 100644 --- a/content/test/data/accessibility/html/input-datetime-local-expected-win.txt +++ b/content/test/data/accessibility/html/input-datetime-local-expected-win.txt
@@ -20,7 +20,7 @@ ++++++++++ROLE_SYSTEM_STATICTEXT name=' ' ia2_hypertext=' ' ++++++++++ROLE_SYSTEM_SPINBUTTON FOCUSABLE ia2_hypertext='--' description='AM/PM' ++++++++++++ROLE_SYSTEM_STATICTEXT name='--' ia2_hypertext='--' -++++++ROLE_SYSTEM_BUTTONMENU FOCUSABLE HASPOPUP +++++++ROLE_SYSTEM_BUTTONMENU FOCUSABLE HASPOPUP haspopup:menu ++++++ROLE_SYSTEM_SPINBUTTON ia2_hypertext='<obj0><obj1>' ++++++++ROLE_SYSTEM_PUSHBUTTON ++++++++ROLE_SYSTEM_PUSHBUTTON \ No newline at end of file
diff --git a/content/test/data/accessibility/html/input-datetime-local.html b/content/test/data/accessibility/html/input-datetime-local.html index 549ae330..e65faf1d 100644 --- a/content/test/data/accessibility/html/input-datetime-local.html +++ b/content/test/data/accessibility/html/input-datetime-local.html
@@ -1,5 +1,6 @@ <!-- @MAC-ALLOW:AXRole* +@WIN-ALLOW:haspopup* @WIN-ALLOW:ia2_hypertext=* @WIN-ALLOW:description=* -->
diff --git a/content/test/data/accessibility/html/input-list-expected-blink.txt b/content/test/data/accessibility/html/input-list-expected-blink.txt index 96e117f..8a9fe30 100644 --- a/content/test/data/accessibility/html/input-list-expected-blink.txt +++ b/content/test/data/accessibility/html/input-list-expected-blink.txt
@@ -3,4 +3,4 @@ ++++labelText ++++++staticText name='Choose a pokemon ' ++++++++inlineTextBox name='Choose a pokemon ' -++++++textFieldWithComboBox editable focusable haspopup autoComplete='list' name='Choose a pokemon ' +++++++textFieldWithComboBox editable focusable haspopup autoComplete='list' name='Choose a pokemon ' haspopup=menu
diff --git a/content/test/data/accessibility/html/input-list-expected-win.txt b/content/test/data/accessibility/html/input-list-expected-win.txt index 3cdec17..595e8dc 100644 --- a/content/test/data/accessibility/html/input-list-expected-win.txt +++ b/content/test/data/accessibility/html/input-list-expected-win.txt
@@ -2,4 +2,4 @@ ++IA2_ROLE_SECTION ++++IA2_ROLE_LABEL ++++++ROLE_SYSTEM_STATICTEXT name='Choose a pokemon ' -++++++ROLE_SYSTEM_COMBOBOX name='Choose a pokemon ' FOCUSABLE HASPOPUP autocomplete:list \ No newline at end of file +++++++ROLE_SYSTEM_COMBOBOX name='Choose a pokemon ' FOCUSABLE HASPOPUP autocomplete:list haspopup:menu \ No newline at end of file
diff --git a/content/test/data/accessibility/html/input-list.html b/content/test/data/accessibility/html/input-list.html index d61913f..c67d33d 100644 --- a/content/test/data/accessibility/html/input-list.html +++ b/content/test/data/accessibility/html/input-list.html
@@ -1,7 +1,9 @@ <!-- @WIN-ALLOW:autocomplete:* -@BLINK-ALLOW:focusable +@WIN-ALLOW:haspopup* @BLINK-ALLOW:editable +@BLINK-ALLOW:focusable +@BLINK-ALLOW:haspopup* --> <!DOCTYPE html> <html>
diff --git a/content/test/data/accessibility/html/input-month-expected-blink.txt b/content/test/data/accessibility/html/input-month-expected-blink.txt index bdf980e..2b00243 100644 --- a/content/test/data/accessibility/html/input-month-expected-blink.txt +++ b/content/test/data/accessibility/html/input-month-expected-blink.txt
@@ -11,7 +11,7 @@ ++++++++++spinButton description='Year' descriptionFrom=attribute valueForRange=0.00 minValueForRange=1.00 maxValueForRange=275760.00 ++++++++++++staticText name='----' ++++++++++++++inlineTextBox name='----' -++++++popUpButton haspopup +++++++popUpButton haspopup haspopup=menu ++++++spinButton ++++++++button ++++++++button
diff --git a/content/test/data/accessibility/html/input-month.html b/content/test/data/accessibility/html/input-month.html index fd74d66..94cb53b 100644 --- a/content/test/data/accessibility/html/input-month.html +++ b/content/test/data/accessibility/html/input-month.html
@@ -1,7 +1,9 @@ <!DOCTYPE html> <!-- @MAC-ALLOW:AXRole* +@WIN-ALLOW:haspopup* @WIN-ALLOW:ia2_hypertext=* +@BLINK-ALLOW:haspopup* --> <html> <body>
diff --git a/content/test/data/accessibility/html/input-suggestions-source-element-expected-blink.txt b/content/test/data/accessibility/html/input-suggestions-source-element-expected-blink.txt index 24ffad1..977adf0e 100644 --- a/content/test/data/accessibility/html/input-suggestions-source-element-expected-blink.txt +++ b/content/test/data/accessibility/html/input-suggestions-source-element-expected-blink.txt
@@ -1,3 +1,3 @@ rootWebArea ++genericContainer -++++textFieldWithComboBox haspopup autoComplete='list' \ No newline at end of file +++++textFieldWithComboBox haspopup autoComplete='list' haspopup=menu \ No newline at end of file
diff --git a/content/test/data/accessibility/html/input-suggestions-source-element-expected-win.txt b/content/test/data/accessibility/html/input-suggestions-source-element-expected-win.txt index 2249f27..535dc56 100644 --- a/content/test/data/accessibility/html/input-suggestions-source-element-expected-win.txt +++ b/content/test/data/accessibility/html/input-suggestions-source-element-expected-win.txt
@@ -1,3 +1,3 @@ ROLE_SYSTEM_DOCUMENT READONLY FOCUSABLE ++IA2_ROLE_SECTION -++++ROLE_SYSTEM_COMBOBOX FOCUSABLE HASPOPUP \ No newline at end of file +++++ROLE_SYSTEM_COMBOBOX FOCUSABLE HASPOPUP haspopup:menu \ No newline at end of file
diff --git a/content/test/data/accessibility/html/input-suggestions-source-element.html b/content/test/data/accessibility/html/input-suggestions-source-element.html index 9cdbb20..1119b333 100644 --- a/content/test/data/accessibility/html/input-suggestions-source-element.html +++ b/content/test/data/accessibility/html/input-suggestions-source-element.html
@@ -1,5 +1,7 @@ <!-- @MAC-ALLOW:AXRole* +@WIN-ALLOW:haspopup* +@BLINK-ALLOW:haspopup* --> <!DOCTYPE html> <html>
diff --git a/content/test/data/accessibility/html/input-week-expected-blink.txt b/content/test/data/accessibility/html/input-week-expected-blink.txt index 91cafb3..933a7e66 100644 --- a/content/test/data/accessibility/html/input-week-expected-blink.txt +++ b/content/test/data/accessibility/html/input-week-expected-blink.txt
@@ -13,7 +13,7 @@ ++++++++++spinButton description='Year' descriptionFrom=attribute valueForRange=0.00 minValueForRange=1.00 maxValueForRange=275760.00 ++++++++++++staticText name='----' ++++++++++++++inlineTextBox name='----' -++++++popUpButton haspopup +++++++popUpButton haspopup haspopup=menu ++++++spinButton ++++++++button ++++++++button
diff --git a/content/test/data/accessibility/html/input-week-expected-win.txt b/content/test/data/accessibility/html/input-week-expected-win.txt index 467a7dcd..909fdbd 100644 --- a/content/test/data/accessibility/html/input-week-expected-win.txt +++ b/content/test/data/accessibility/html/input-week-expected-win.txt
@@ -9,7 +9,7 @@ ++++++++++ROLE_SYSTEM_STATICTEXT name=', ' ia2_hypertext=', ' ++++++++++ROLE_SYSTEM_SPINBUTTON FOCUSABLE ia2_hypertext='----' description='Year' ++++++++++++ROLE_SYSTEM_STATICTEXT name='----' ia2_hypertext='----' -++++++ROLE_SYSTEM_BUTTONMENU FOCUSABLE HASPOPUP +++++++ROLE_SYSTEM_BUTTONMENU FOCUSABLE HASPOPUP haspopup:menu ++++++ROLE_SYSTEM_SPINBUTTON ia2_hypertext='<obj0><obj1>' ++++++++ROLE_SYSTEM_PUSHBUTTON ++++++++ROLE_SYSTEM_PUSHBUTTON \ No newline at end of file
diff --git a/content/test/data/accessibility/html/input-week.html b/content/test/data/accessibility/html/input-week.html index d2e8e15..31628c7 100644 --- a/content/test/data/accessibility/html/input-week.html +++ b/content/test/data/accessibility/html/input-week.html
@@ -2,6 +2,8 @@ @MAC-ALLOW:AXRole* @WIN-ALLOW:ia2_hypertext=* @WIN-ALLOW:description* +@WIN-ALLOW:haspopup* +@BLINK-ALLOW:haspopup* --> <!DOCTYPE html> <html>
diff --git a/content/test/data/accessibility/html/modal-dialog-closed-expected-blink.txt b/content/test/data/accessibility/html/modal-dialog-closed-expected-blink.txt index 401227b..ad8ef8b 100644 --- a/content/test/data/accessibility/html/modal-dialog-closed-expected-blink.txt +++ b/content/test/data/accessibility/html/modal-dialog-closed-expected-blink.txt
@@ -2,7 +2,7 @@ ++staticText name='Test that elements respawn in the accessibility tree after a modal dialog closes.' ++++inlineTextBox name='Test that elements respawn in the accessibility tree after a modal dialog closes.' ++region -++++popUpButton collapsed haspopup +++++popUpButton collapsed haspopup haspopup=menu ++++++menuListPopup invisible ++++++++menuListOption name='This should be in the tree.' selected=true ++colorWell \ No newline at end of file
diff --git a/content/test/data/accessibility/html/modal-dialog-closed-expected-win.txt b/content/test/data/accessibility/html/modal-dialog-closed-expected-win.txt index be1c7779..69b070b 100644 --- a/content/test/data/accessibility/html/modal-dialog-closed-expected-win.txt +++ b/content/test/data/accessibility/html/modal-dialog-closed-expected-win.txt
@@ -1,7 +1,7 @@ ROLE_SYSTEM_DOCUMENT READONLY FOCUSABLE ++ROLE_SYSTEM_STATICTEXT name='Test that elements respawn in the accessibility tree after a modal dialog closes.' ++IA2_ROLE_SECTION -++++ROLE_SYSTEM_COMBOBOX COLLAPSED FOCUSABLE HASPOPUP +++++ROLE_SYSTEM_COMBOBOX COLLAPSED FOCUSABLE HASPOPUP haspopup:menu ++++++ROLE_SYSTEM_LIST INVISIBLE ++++++++ROLE_SYSTEM_LISTITEM name='This should be in the tree.' SELECTED FOCUSABLE ++IA2_ROLE_COLOR_CHOOSER FOCUSABLE \ No newline at end of file
diff --git a/content/test/data/accessibility/html/modal-dialog-closed.html b/content/test/data/accessibility/html/modal-dialog-closed.html index 866014c..a870db86 100644 --- a/content/test/data/accessibility/html/modal-dialog-closed.html +++ b/content/test/data/accessibility/html/modal-dialog-closed.html
@@ -1,5 +1,7 @@ <!-- @MAC-ALLOW:AXSubrole=* +@WIN-ALLOW:haspopup* +@BLINK-ALLOW:haspopup* --> <html> <body>
diff --git a/content/test/data/accessibility/html/select-expected-blink.txt b/content/test/data/accessibility/html/select-expected-blink.txt index 4e5f3620..501f738 100644 --- a/content/test/data/accessibility/html/select-expected-blink.txt +++ b/content/test/data/accessibility/html/select-expected-blink.txt
@@ -1,16 +1,16 @@ rootWebArea focusable ++genericContainer -++++popUpButton collapsed focusable haspopup +++++popUpButton collapsed focusable haspopup haspopup=menu ++++++menuListPopup invisible ++++++++menuListOption focusable name='Placeholder option' selected=true ++++++++menuListOption focusable invisible name='Option 1' selected=false ++++++++menuListOption focusable invisible name='Option 2' selected=false -++++popUpButton collapsed focusable haspopup +++++popUpButton collapsed focusable haspopup haspopup=menu ++++++menuListPopup invisible ++++++++menuListOption focusable invisible name='Option 1' selected=false ++++++++menuListOption focusable name='Option 2' selected=true ++++++++menuListOption focusable invisible name='Option 3' selected=false -++++popUpButton collapsed focusable haspopup required +++++popUpButton collapsed focusable haspopup required haspopup=menu ++++++menuListPopup invisible ++++++++menuListOption focusable name='Option 1' selected=true ++++++++menuListOption focusable invisible name='Option 2' selected=false
diff --git a/content/test/data/accessibility/html/select-expected-win.txt b/content/test/data/accessibility/html/select-expected-win.txt index 14d5a78..6c111e5 100644 --- a/content/test/data/accessibility/html/select-expected-win.txt +++ b/content/test/data/accessibility/html/select-expected-win.txt
@@ -1,16 +1,16 @@ ROLE_SYSTEM_DOCUMENT READONLY FOCUSABLE ia2_hypertext='<obj0>' ++IA2_ROLE_SECTION ia2_hypertext='<obj0><obj1><obj2><obj3><obj4>' -++++ROLE_SYSTEM_COMBOBOX COLLAPSED FOCUSABLE HASPOPUP ia2_hypertext='<obj0>' +++++ROLE_SYSTEM_COMBOBOX COLLAPSED FOCUSABLE HASPOPUP haspopup:menu ia2_hypertext='<obj0>' ++++++ROLE_SYSTEM_LIST INVISIBLE ia2_hypertext='<obj0><obj1><obj2>' ++++++++ROLE_SYSTEM_LISTITEM name='Placeholder option' SELECTED FOCUSABLE SELECTABLE ia2_hypertext='Placeholder option' ++++++++ROLE_SYSTEM_LISTITEM name='Option 1' INVISIBLE FOCUSABLE SELECTABLE ia2_hypertext='Option 1' ++++++++ROLE_SYSTEM_LISTITEM name='Option 2' INVISIBLE FOCUSABLE SELECTABLE ia2_hypertext='Option 2' -++++ROLE_SYSTEM_COMBOBOX COLLAPSED FOCUSABLE HASPOPUP ia2_hypertext='<obj0>' +++++ROLE_SYSTEM_COMBOBOX COLLAPSED FOCUSABLE HASPOPUP haspopup:menu ia2_hypertext='<obj0>' ++++++ROLE_SYSTEM_LIST INVISIBLE ia2_hypertext='<obj0><obj1><obj2>' ++++++++ROLE_SYSTEM_LISTITEM name='Option 1' INVISIBLE FOCUSABLE SELECTABLE ia2_hypertext='Option 1' ++++++++ROLE_SYSTEM_LISTITEM name='Option 2' SELECTED FOCUSABLE SELECTABLE ia2_hypertext='Option 2' ++++++++ROLE_SYSTEM_LISTITEM name='Option 3' INVISIBLE FOCUSABLE SELECTABLE ia2_hypertext='Option 3' -++++ROLE_SYSTEM_COMBOBOX COLLAPSED FOCUSABLE HASPOPUP IA2_STATE_REQUIRED ia2_hypertext='<obj0>' +++++ROLE_SYSTEM_COMBOBOX COLLAPSED FOCUSABLE HASPOPUP IA2_STATE_REQUIRED haspopup:menu ia2_hypertext='<obj0>' ++++++ROLE_SYSTEM_LIST INVISIBLE ia2_hypertext='<obj0><obj1><obj2>' ++++++++ROLE_SYSTEM_LISTITEM name='Option 1' SELECTED FOCUSABLE SELECTABLE ia2_hypertext='Option 1' ++++++++ROLE_SYSTEM_LISTITEM name='Option 2' INVISIBLE FOCUSABLE SELECTABLE ia2_hypertext='Option 2'
diff --git a/content/test/data/accessibility/html/select.html b/content/test/data/accessibility/html/select.html index 7ee955e..17d690e 100644 --- a/content/test/data/accessibility/html/select.html +++ b/content/test/data/accessibility/html/select.html
@@ -1,6 +1,7 @@ <!-- @MAC-ALLOW:AXRoleDescription=* @WIN-ALLOW:HASPOPUP +@WIN-ALLOW:haspopup* @WIN-ALLOW:ia2_hypertext=* @WIN-ALLOW:MULTISELECTABLE @WIN-ALLOW:EXTSELECTABLE @@ -9,6 +10,7 @@ @BLINK-ALLOW:select* @BLINK-ALLOW:setSize* @BLINK-ALLOW:posInSet* +@BLINK-ALLOW:haspopup* --> <html> <body>
diff --git a/content/test/data/devtools/control_navigations/iframe_navigation.html b/content/test/data/devtools/control_navigations/iframe_navigation.html deleted file mode 100644 index b6b7954..0000000 --- a/content/test/data/devtools/control_navigations/iframe_navigation.html +++ /dev/null
@@ -1,7 +0,0 @@ -<html> -<body> -Dummy page. -<iframe src="/cross-site/a.com/devtools/control_navigations/meta_tag.html"></iframe> -<iframe src="/cross-site/b.com/devtools/control_navigations/meta_tag.html"></iframe> -</body> -</html>
diff --git a/content/test/data/devtools/control_navigations/meta_tag.html b/content/test/data/devtools/control_navigations/meta_tag.html deleted file mode 100644 index 74d2cac..0000000 --- a/content/test/data/devtools/control_navigations/meta_tag.html +++ /dev/null
@@ -1,8 +0,0 @@ -<html> -<head> -<meta http-equiv="refresh" content="0; url=/devtools/navigation.html"> -</head> -<body> -Dummy page, can't stay for long! -</body> -</html>
diff --git a/content/test/data/site_isolation/js-html-polyglot.html b/content/test/data/site_isolation/js-html-polyglot.html new file mode 100644 index 0000000..0707d74 --- /dev/null +++ b/content/test/data/site_isolation/js-html-polyglot.html
@@ -0,0 +1,9 @@ +<!--/*--><html><body><script type="text/javascript"><!--//*/ + +// This is a regression test for https://crbug.com/839425 +// which found out that some script resources are served +// with text/html content-type and with a body that is +// both a valid html and a valid javascript. +var blah = 123; + +//--></script></body></html>
diff --git a/content/test/renderer_audio_output_stream_factory_context_impl_unittest.cc b/content/test/renderer_audio_output_stream_factory_context_impl_unittest.cc index 8932e6a3..bcdb75f 100644 --- a/content/test/renderer_audio_output_stream_factory_context_impl_unittest.cc +++ b/content/test/renderer_audio_output_stream_factory_context_impl_unittest.cc
@@ -50,7 +50,6 @@ const int kChannels = 1; const int kBuffers = 1000; const int kSampleFrequency = 44100; -const int kBitsPerSample = 16; const int kSamplesPerBuffer = kSampleFrequency / 100; std::unique_ptr<media::AudioOutputStream::AudioSourceCallback> @@ -62,7 +61,7 @@ media::AudioParameters GetTestAudioParameters() { return media::AudioParameters(media::AudioParameters::AUDIO_PCM_LOW_LATENCY, media::CHANNEL_LAYOUT_MONO, kSampleFrequency, - kBitsPerSample, kSamplesPerBuffer); + kSamplesPerBuffer); } void SyncWith(scoped_refptr<base::SingleThreadTaskRunner> task_runner) {
diff --git a/device/fido/fido_request_handler_base.cc b/device/fido/fido_request_handler_base.cc index 156f61c..bcfd85a 100644 --- a/device/fido/fido_request_handler_base.cc +++ b/device/fido/fido_request_handler_base.cc
@@ -24,7 +24,6 @@ continue; } discovery->set_observer(this); - discovery->Start(); discoveries_.push_back(std::move(discovery)); } } @@ -46,6 +45,12 @@ } } +void FidoRequestHandlerBase::Start() { + for (const auto& discovery : discoveries_) { + discovery->Start(); + } +} + void FidoRequestHandlerBase::DiscoveryStarted(FidoDiscovery* discovery, bool success) {}
diff --git a/device/fido/fido_request_handler_base.h b/device/fido/fido_request_handler_base.h index 8c010f01..34e381b6 100644 --- a/device/fido/fido_request_handler_base.h +++ b/device/fido/fido_request_handler_base.h
@@ -56,6 +56,7 @@ protected: virtual std::unique_ptr<FidoTask> CreateTaskForNewDevice(FidoDevice*) = 0; + void Start(); TaskMap& ongoing_tasks() { return ongoing_tasks_; }
diff --git a/device/fido/fido_request_handler_unittest.cc b/device/fido/fido_request_handler_unittest.cc index f96a7bf..ba663e74 100644 --- a/device/fido/fido_request_handler_unittest.cc +++ b/device/fido/fido_request_handler_unittest.cc
@@ -90,7 +90,9 @@ : FidoRequestHandler(nullptr /* connector */, protocols, std::move(callback)), - weak_factory_(this) {} + weak_factory_(this) { + Start(); + } ~FakeFidoRequestHandler() override = default; std::unique_ptr<FidoTask> CreateTaskForNewDevice(
diff --git a/device/fido/get_assertion_request_handler.cc b/device/fido/get_assertion_request_handler.cc index 119a417b..26c6d21 100644 --- a/device/fido/get_assertion_request_handler.cc +++ b/device/fido/get_assertion_request_handler.cc
@@ -20,7 +20,9 @@ SignResponseCallback completion_callback) : FidoRequestHandler(connector, protocols, std::move(completion_callback)), request_(std::move(request)), - weak_factory_(this) {} + weak_factory_(this) { + Start(); +} GetAssertionRequestHandler::~GetAssertionRequestHandler() = default;
diff --git a/device/fido/make_credential_request_handler.cc b/device/fido/make_credential_request_handler.cc index fe72f26a..ea94dbd4 100644 --- a/device/fido/make_credential_request_handler.cc +++ b/device/fido/make_credential_request_handler.cc
@@ -24,7 +24,9 @@ request_parameter_(std::move(request_parameter)), authenticator_selection_criteria_( std::move(authenticator_selection_criteria)), - weak_factory_(this) {} + weak_factory_(this) { + Start(); +} MakeCredentialRequestHandler::~MakeCredentialRequestHandler() = default;
diff --git a/docs/gpu/gpu_testing_bot_details.md b/docs/gpu/gpu_testing_bot_details.md index c37fd97..434f282 100644 --- a/docs/gpu/gpu_testing_bot_details.md +++ b/docs/gpu/gpu_testing_bot_details.md
@@ -291,23 +291,6 @@ 1. Get this reviewed and landed. This step associates the VM with the bot's name on the waterfall. -1. Create a CL in the [`tools/build`][tools/build] workspace which does the - following. Here's an [example CL](https://chromium-review.googlesource.com/1041145). - 1. Adds the new VMs to [`chromium_gpu_fyi.py`][chromium_gpu_fyi.py] in - `scripts/slave/recipe_modules/chromium_tests/`. Make sure to set the - `serialize_tests` property to `True`. This is specified for waterfall - bots, but not trybots, and helps avoid overloading the physical - hardware. Double-check the `BUILD_CONFIG` and `parent_buildername` - properties for each. They must match the Release/Debug flavor of the - builder, like `GPU FYI Win Builder` vs. `GPU FYI Win Builder (dbg)`. - 1. Get this reviewed and landed. This step tells the Chromium recipe about - the newly-deployed waterfall bot. In the next CL we will generate the - JSON files which run tests on the bot. - 1. It used to be necessary to retrain recipe expectations - (`scripts/slave/recipes.py --use-bootstrap test train`). This doesn't - appear to be necessary any more, but it's something to watch out for if - your CL fails presubmit for some reason. - 1. Create a CL in the Chromium workspace which does the following. Here's an [example CL](https://chromium-review.googlesource.com/1041164). 1. Adds the new machines to @@ -355,9 +338,36 @@ organization. 1. If you were adding a new builder, you would need to also add the new machine to [`src/tools/mb/mb_config.pyl`][mb_config.pyl]. -1. After the Chromium-side CL lands it will take some time for all of the - configuration changes to be picked up by the system. The bot might be in a - purple state until that's happened, but it will recover. + +1. After the Chromium-side CL lands it will take some time for all of + the configuration changes to be picked up by the system. The bot + will be in a red or purple state, claiming that it can't find its + configuration. + +1. *After* the Chromium-side CL lands and the bot is on the console, but purple, + create a CL in the [`tools/build`][tools/build] workspace which does the + following. Here's an [example + CL](https://chromium-review.googlesource.com/1041145). + 1. Adds the new VMs to [`chromium_gpu_fyi.py`][chromium_gpu_fyi.py] in + `scripts/slave/recipe_modules/chromium_tests/`. Make sure to set the + `serialize_tests` property to `True`. This is specified for waterfall + bots, but not trybots, and helps avoid overloading the physical + hardware. Double-check the `BUILD_CONFIG` and `parent_buildername` + properties for each. They must match the Release/Debug flavor of the + builder, like `GPU FYI Win Builder` vs. `GPU FYI Win Builder (dbg)`. + 1. Get this reviewed and landed. This step tells the Chromium recipe about + the newly-deployed waterfall bot, so it knows which JSON file to load + out of src/testing/buildbot and which entry to look at. + 1. It used to be necessary to retrain recipe expectations + (`scripts/slave/recipes.py --use-bootstrap test train`). This doesn't + appear to be necessary any more, but it's something to watch out for if + your CL fails presubmit for some reason. + +1. Note that it is crucial that the bot be deployed (and be red/purple) before + hooking it up in the tools/build workspace. In the new LUCI world, if the + parent builder can't find its child testers to trigger, that's a hard error + on the parent. You can and should prepare the tools/build CL in advance, but + make sure it doesn't land until the bot's on the console. [bots.cfg]: https://chrome-internal.googlesource.com/infradata/config/+/master/configs/chromium-swarm/bots.cfg [infradata/config]: https://chrome-internal.googlesource.com/infradata/config/
diff --git a/extensions/browser/extension_event_histogram_value.h b/extensions/browser/extension_event_histogram_value.h index 42363543..11bc707 100644 --- a/extensions/browser/extension_event_histogram_value.h +++ b/extensions/browser/extension_event_histogram_value.h
@@ -437,6 +437,7 @@ SAFE_BROWSING_PRIVATE_ON_SECURITY_INTERSTITIAL_SHOWN, SAFE_BROWSING_PRIVATE_ON_SECURITY_INTERSTITIAL_PROCEEDED, ACCESSIBILITY_PRIVATE_ON_SELECT_TO_SPEAK_STATE_CHANGE_REQUESTED, + INPUT_METHOD_PRIVATE_ON_FOCUS, // Last entry: Add new entries above, then run: // python tools/metrics/histograms/update_extension_histograms.py ENUM_BOUNDARY
diff --git a/extensions/common/api/runtime.json b/extensions/common/api/runtime.json index 84476bce..ec5b97f7 100644 --- a/extensions/common/api/runtime.json +++ b/extensions/common/api/runtime.json
@@ -71,14 +71,14 @@ { "id": "PlatformArch", "type": "string", - "enum": ["arm", "x86-32", "x86-64"], + "enum": ["arm", "x86-32", "x86-64", "mips", "mips64"], "description": "The machine's processor architecture." }, { "id": "PlatformNaclArch", "description": "The native client architecture. This may be different from arch on some platforms.", "type": "string", - "enum": ["arm", "x86-32", "x86-64"] + "enum": ["arm", "x86-32", "x86-64", "mips", "mips64"] }, { "id": "PlatformInfo",
diff --git a/extensions/renderer/api/display_source/wifi_display/wifi_display_audio_encoder_lpcm.cc b/extensions/renderer/api/display_source/wifi_display/wifi_display_audio_encoder_lpcm.cc index 4daefa3..da067e1d 100644 --- a/extensions/renderer/api/display_source/wifi_display/wifi_display_audio_encoder_lpcm.cc +++ b/extensions/renderer/api/display_source/wifi_display/wifi_display_audio_encoder_lpcm.cc
@@ -31,8 +31,6 @@ private media::AudioConverter::InputCallback { public: enum { - kOutputBitsPerSample = 16, - kOutputBytesPerSample = kOutputBitsPerSample / 8, kOutputChannels = 2 }; @@ -155,8 +153,8 @@ data.resize(sample_count * sizeof(uint16_t)); uint16_t* encoded_samples = reinterpret_cast<uint16_t*>(base::string_as_array(&data)); - fifo_bus_->ToInterleaved(fifo_bus_->frames(), kOutputBytesPerSample, - encoded_samples); + fifo_bus_->ToInterleaved<media::SignedInt16SampleTypeTraits>( + fifo_bus_->frames(), encoded_samples); for (int i = 0; i < sample_count; ++i) encoded_samples[i] = base::HostToNet16(encoded_samples[i]); fifo_end_frame_ = 0; @@ -180,7 +178,7 @@ if (output_sample_rate_ != input_params_.sample_rate()) { const media::AudioParameters output_params( media::AudioParameters::AUDIO_PCM_LOW_LATENCY, - media::CHANNEL_LAYOUT_STEREO, output_sample_rate_, kOutputBitsPerSample, + media::CHANNEL_LAYOUT_STEREO, output_sample_rate_, WiFiDisplayMediaPacketizer::LPCM::kChannelSamplesPerUnit); DVLOG(2) << "Setting up audio resampling: " << input_params_.sample_rate() << " Hz --> "
diff --git a/ios/chrome/browser/metrics/ios_chrome_stability_metrics_provider.mm b/ios/chrome/browser/metrics/ios_chrome_stability_metrics_provider.mm index c2253ce1..e42a2c2f 100644 --- a/ios/chrome/browser/metrics/ios_chrome_stability_metrics_provider.mm +++ b/ios/chrome/browser/metrics/ios_chrome_stability_metrics_provider.mm
@@ -55,7 +55,7 @@ int dummy_termination_code = 105; helper_.LogRendererCrash(false /* not an extension process */, base::TERMINATION_STATUS_ABNORMAL_TERMINATION, - dummy_termination_code); + dummy_termination_code, base::nullopt); } void IOSChromeStabilityMetricsProvider::WebStateDidStartLoading(
diff --git a/ios/chrome/browser/ui/bookmarks/BUILD.gn b/ios/chrome/browser/ui/bookmarks/BUILD.gn index 5835553..c00ef051 100644 --- a/ios/chrome/browser/ui/bookmarks/BUILD.gn +++ b/ios/chrome/browser/ui/bookmarks/BUILD.gn
@@ -106,6 +106,8 @@ "//ios/chrome/browser/ui/material_components", "//ios/chrome/browser/ui/ntp", "//ios/chrome/browser/ui/signin_interaction/public", + "//ios/chrome/browser/ui/table_view", + "//ios/chrome/browser/ui/table_view:styler", "//ios/chrome/browser/ui/util", "//ios/chrome/browser/undo", "//ios/public/provider/chrome/browser",
diff --git a/ios/chrome/browser/ui/bookmarks/bookmark_table_view.mm b/ios/chrome/browser/ui/bookmarks/bookmark_table_view.mm index 0ec69ba6..ed5976e 100644 --- a/ios/chrome/browser/ui/bookmarks/bookmark_table_view.mm +++ b/ios/chrome/browser/ui/bookmarks/bookmark_table_view.mm
@@ -5,6 +5,7 @@ #import "ios/chrome/browser/ui/bookmarks/bookmark_table_view.h" #include "base/mac/bind_objc_block.h" +#include "base/mac/foundation_util.h" #include "base/strings/sys_string_conversions.h" #include "components/bookmarks/browser/bookmark_model.h" #include "components/favicon/core/fallback_url_util.h" @@ -27,6 +28,8 @@ #import "ios/chrome/browser/ui/bookmarks/cells/bookmark_table_cell.h" #import "ios/chrome/browser/ui/bookmarks/cells/bookmark_table_signin_promo_cell.h" #import "ios/chrome/browser/ui/commands/application_commands.h" +#import "ios/chrome/browser/ui/table_view/chrome_table_view_styler.h" +#import "ios/chrome/browser/ui/table_view/table_view_model.h" #include "ios/chrome/grit/ios_strings.h" #import "ios/third_party/material_components_ios/src/components/FlexibleHeader/src/MDCFlexibleHeaderView.h" #include "skia/ext/skia_utils_ios.h" @@ -74,6 +77,16 @@ } )"); +typedef NS_ENUM(NSInteger, SectionIdentifier) { + SectionIdentifierPromo = kSectionIdentifierEnumZero, + SectionIdentifierBookmarks, +}; + +typedef NS_ENUM(NSInteger, ItemType) { + ItemTypePromo = kItemTypeEnumZero, + ItemTypeBookmark, +}; + } // namespace using bookmarks::BookmarkNode; @@ -82,15 +95,79 @@ // collections. using IntegerPair = std::pair<NSInteger, NSInteger>; +@interface BookmarkNodeItem : TableViewItem + +@property(nonatomic, readwrite, assign) const BookmarkNode* bookmarkNode; + +- (instancetype)initWithType:(NSInteger)type + bookmarkNode:(const BookmarkNode*)node + NS_DESIGNATED_INITIALIZER; + +- (instancetype)initWithType:(NSInteger)type NS_UNAVAILABLE; + +@end + +@implementation BookmarkNodeItem +@synthesize bookmarkNode = _bookmarkNode; + +- (instancetype)initWithType:(NSInteger)type + bookmarkNode:(const BookmarkNode*)node { + if ((self = [super initWithType:type])) { + self.cellClass = [BookmarkTableCell class]; + _bookmarkNode = node; + } + return self; +} + +- (void)configureCell:(UITableViewCell*)cell + withStyler:(ChromeTableViewStyler*)styler { + [super configureCell:cell withStyler:styler]; + BookmarkTableCell* bookmarkCell = + base::mac::ObjCCastStrict<BookmarkTableCell>(cell); + [bookmarkCell setNode:self.bookmarkNode]; +} + +@end + +@interface BookmarkPromoItem : TableViewItem + +@property(nonatomic, weak) id<BookmarkTableViewDelegate> mediatorProvider; + +@end + +@implementation BookmarkPromoItem +@synthesize mediatorProvider = _mediatorProvider; + +- (instancetype)initWithType:(NSInteger)type { + if ((self = [super initWithType:type])) { + self.cellClass = [BookmarkTableSigninPromoCell class]; + } + return self; +} + +- (void)configureCell:(UITableViewCell*)cell + withStyler:(ChromeTableViewStyler*)styler { + [super configureCell:cell withStyler:styler]; + BookmarkTableSigninPromoCell* signinPromoCell = + base::mac::ObjCCastStrict<BookmarkTableSigninPromoCell>(cell); + SigninPromoViewMediator* mediator = + self.mediatorProvider.signinPromoViewMediator; + + signinPromoCell.signinPromoView.delegate = mediator; + [[mediator createConfigurator] + configureSigninPromoView:signinPromoCell.signinPromoView]; + signinPromoCell.selectionStyle = UITableViewCellSelectionStyleNone; + [mediator signinPromoViewVisible]; +} + +@end + @interface BookmarkTableView ()<BookmarkModelBridgeObserver, BookmarkTableCellTitleEditDelegate, SyncedSessionsObserver, UIGestureRecognizerDelegate, UITableViewDataSource, UITableViewDelegate> { - // A vector of bookmark nodes to display in the table view. - std::vector<const BookmarkNode*> _bookmarkItems; - // The current root node of this table view. const BookmarkNode* _currentRootNode; @@ -118,6 +195,8 @@ std::set<const bookmarks::BookmarkNode*> _editNodes; } +// The model backing the table view. +@property(nonatomic, strong) TableViewModel* tableViewModel; // The model holding bookmark data. @property(nonatomic, assign) bookmarks::BookmarkModel* bookmarkModel; // The browser state. @@ -133,11 +212,6 @@ // Presenter for showing signin UI. @property(nonatomic, readonly, weak) id<SigninPresenter> presenter; -// Section indices. -@property(nonatomic, readonly, assign) NSInteger promoSection; -@property(nonatomic, readonly, assign) NSInteger bookmarksSection; -@property(nonatomic, readonly, assign) NSInteger sectionCount; - // If a new folder is being added currently. @property(nonatomic, assign) BOOL addingNewFolder; @@ -154,6 +228,7 @@ @implementation BookmarkTableView @synthesize tableView = _tableView; +@synthesize tableViewModel = _tableViewModel; @synthesize headerView = _headerView; @synthesize bookmarkModel = _bookmarkModel; @synthesize browserState = _browserState; @@ -190,6 +265,8 @@ std::make_unique<synced_sessions::SyncedSessionsObserverBridge>( self, _browserState); + // Create and populate the model. + _tableViewModel = [[TableViewModel alloc] init]; [self computeBookmarkTableViewData]; // Set promo state before the tableview is created. @@ -246,15 +323,30 @@ if (promoVisible == _promoVisible) { return; } - _promoVisible = promoVisible; + + SigninPromoViewMediator* mediator = self.delegate.signinPromoViewMediator; if (_promoVisible) { - [self.delegate.signinPromoViewMediator signinPromoViewVisible]; - } else if (![self.delegate - .signinPromoViewMediator isInvalidClosedOrNeverVisible]) { - // When the sign-in view is closed, the promo state changes, but - // -[SigninPromoViewMediator signinPromoViewHidden] should not be called. - [self.delegate.signinPromoViewMediator signinPromoViewHidden]; + DCHECK(![self.tableViewModel + hasSectionForSectionIdentifier:SectionIdentifierPromo]); + [self.tableViewModel insertSectionWithIdentifier:SectionIdentifierPromo + atIndex:0]; + BookmarkPromoItem* item = + [[BookmarkPromoItem alloc] initWithType:ItemTypePromo]; + item.mediatorProvider = self.delegate; + [self.tableViewModel addItem:item + toSectionWithIdentifier:SectionIdentifierPromo]; + [mediator signinPromoViewVisible]; + } else { + if (![mediator isInvalidClosedOrNeverVisible]) { + // When the sign-in view is closed, the promo state changes, but + // -[SigninPromoViewMediator signinPromoViewHidden] should not be called. + [mediator signinPromoViewHidden]; + } + + DCHECK([self.tableViewModel + hasSectionForSectionIdentifier:SectionIdentifierPromo]); + [self.tableViewModel removeSectionWithIdentifier:SectionIdentifierPromo]; } [self.tableView reloadData]; } @@ -262,10 +354,16 @@ - (void)configureSigninPromoWithConfigurator: (SigninPromoViewConfigurator*)configurator identityChanged:(BOOL)identityChanged { + if (![self.tableViewModel + hasSectionForSectionIdentifier:SectionIdentifierPromo]) { + return; + } + NSIndexPath* indexPath = - [NSIndexPath indexPathForRow:0 inSection:self.promoSection]; + [self.tableViewModel indexPathForItemType:ItemTypePromo + sectionIdentifier:SectionIdentifierPromo]; BookmarkTableSigninPromoCell* signinPromoCell = - static_cast<BookmarkTableSigninPromoCell*>( + base::mac::ObjCCast<BookmarkTableSigninPromoCell>( [self.tableView cellForRowAtIndexPath:indexPath]); if (!signinPromoCell) { return; @@ -275,7 +373,7 @@ [configurator configureSigninPromoView:signinPromoCell.signinPromoView]; if (identityChanged) { // The section should be reload to update the cell height. - NSIndexSet* indexSet = [NSIndexSet indexSetWithIndex:self.promoSection]; + NSIndexSet* indexSet = [NSIndexSet indexSetWithIndex:indexPath.section]; [self.tableView reloadSections:indexSet withRowAnimation:UITableViewRowAnimationNone]; } @@ -292,12 +390,15 @@ _editingFolderNode = self.bookmarkModel->AddFolder( _currentRootNode, _currentRootNode->child_count(), folderTitle); - _bookmarkItems.push_back(_editingFolderNode); + BookmarkNodeItem* nodeItem = + [[BookmarkNodeItem alloc] initWithType:ItemTypeBookmark + bookmarkNode:_editingFolderNode]; + [self.tableViewModel addItem:nodeItem + toSectionWithIdentifier:SectionIdentifierBookmarks]; // Insert the new folder cell at the end of the table. NSIndexPath* newRowIndexPath = - [NSIndexPath indexPathForRow:_bookmarkItems.size() - 1 - inSection:self.bookmarksSection]; + [self.tableViewModel indexPathForItem:nodeItem]; NSMutableArray* newRowIndexPaths = [[NSMutableArray alloc] initWithObjects:newRowIndexPath, nil]; [self.tableView beginUpdates]; @@ -380,92 +481,79 @@ #pragma mark - UITableViewDataSource - (NSInteger)numberOfSectionsInTableView:(UITableView*)tableView { - return self.sectionCount; + return [self.tableViewModel numberOfSections]; } - (NSInteger)tableView:(UITableView*)tableView numberOfRowsInSection:(NSInteger)section { - if (section == self.bookmarksSection) { - return _bookmarkItems.size(); - } - if (section == self.promoSection) { - return 1; - } - - NOTREACHED(); - return -1; + return [self.tableViewModel numberOfItemsInSection:section]; } - (UITableViewCell*)tableView:(UITableView*)tableView cellForRowAtIndexPath:(NSIndexPath*)indexPath { - if (indexPath.section == self.promoSection) { - BookmarkTableSigninPromoCell* signinPromoCell = [self.tableView - dequeueReusableCellWithIdentifier:[BookmarkTableSigninPromoCell - reuseIdentifier]]; - if (signinPromoCell == nil) { - signinPromoCell = - [[BookmarkTableSigninPromoCell alloc] initWithFrame:CGRectZero]; + TableViewItem* item = [self.tableViewModel itemAtIndexPath:indexPath]; + Class cellClass = [item cellClass]; + NSString* reuseIdentifier = NSStringFromClass(cellClass); + [self.tableView registerClass:cellClass + forCellReuseIdentifier:reuseIdentifier]; + UITableViewCell* cell = + [self.tableView dequeueReusableCellWithIdentifier:reuseIdentifier + forIndexPath:indexPath]; + [item configureCell:cell withStyler:[[ChromeTableViewStyler alloc] init]]; + + if (item.type == ItemTypeBookmark) { + BookmarkNodeItem* nodeItem = + base::mac::ObjCCastStrict<BookmarkNodeItem>(item); + BookmarkTableCell* tableCell = + base::mac::ObjCCastStrict<BookmarkTableCell>(cell); + if (nodeItem.bookmarkNode == _editingFolderNode) { + // Delay starting edit, so that the cell is fully created. + dispatch_async(dispatch_get_main_queue(), ^{ + self.editingFolderCell = tableCell; + [tableCell startEdit]; + tableCell.textDelegate = self; + }); } - signinPromoCell.signinPromoView.delegate = - self.delegate.signinPromoViewMediator; - [[self.delegate.signinPromoViewMediator createConfigurator] - configureSigninPromoView:signinPromoCell.signinPromoView]; - signinPromoCell.selectionStyle = UITableViewCellSelectionStyleNone; - [self.delegate.signinPromoViewMediator signinPromoViewVisible]; - return signinPromoCell; + + // Cancel previous load attempts. + [self cancelLoadingFaviconAtIndexPath:indexPath]; + // Load the favicon from cache. If not found, try fetching it from a Google + // Server. + [self loadFaviconAtIndexPath:indexPath continueToGoogleServer:YES]; } - const BookmarkNode* node = [self nodeAtIndexPath:indexPath]; - BookmarkTableCell* cell = [tableView - dequeueReusableCellWithIdentifier:[BookmarkTableCell reuseIdentifier]]; - - if (cell == nil) { - cell = [[BookmarkTableCell alloc] - initWithReuseIdentifier:[BookmarkTableCell reuseIdentifier]]; - } - [cell setNode:node]; - - if (node == _editingFolderNode) { - // Delay starting edit, so that the cell is fully created. - dispatch_async(dispatch_get_main_queue(), ^{ - self.editingFolderCell = cell; - [cell startEdit]; - cell.textDelegate = self; - }); - } - - // Cancel previous load attempts. - [self cancelLoadingFaviconAtIndexPath:indexPath]; - // Load the favicon from cache. If not found, try fetching it from a Google - // Server. - [self loadFaviconAtIndexPath:indexPath continueToGoogleServer:YES]; - return cell; } - (BOOL)tableView:(UITableView*)tableView canEditRowAtIndexPath:(NSIndexPath*)indexPath { - if (indexPath.section == self.promoSection) { - // Ignore promo section edit. + TableViewItem* item = [self.tableViewModel itemAtIndexPath:indexPath]; + if (item.type != ItemTypeBookmark) { + // Can only edit bookmarks. return NO; } - // We enable the swipe-to-delete gesture and reordering control for nodes of - // type URL or Folder, and not the permanent ones. - const BookmarkNode* node = [self nodeAtIndexPath:indexPath]; + // Enable the swipe-to-delete gesture and reordering control for nodes of + // type URL or Folder, but not the permanent ones. + BookmarkNodeItem* nodeItem = + base::mac::ObjCCastStrict<BookmarkNodeItem>(item); + const BookmarkNode* node = nodeItem.bookmarkNode; return [self isUrlOrFolder:node]; } - (void)tableView:(UITableView*)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath*)indexPath { - if (indexPath.section == self.promoSection) { - // Ignore promo section editing style. + TableViewItem* item = [self.tableViewModel itemAtIndexPath:indexPath]; + if (item.type != ItemTypeBookmark) { + // Can only commit edits for bookmarks. return; } if (editingStyle == UITableViewCellEditingStyleDelete) { - const BookmarkNode* node = [self nodeAtIndexPath:indexPath]; + BookmarkNodeItem* nodeItem = + base::mac::ObjCCastStrict<BookmarkNodeItem>(item); + const BookmarkNode* node = nodeItem.bookmarkNode; std::set<const BookmarkNode*> nodes; nodes.insert(node); [self.delegate bookmarkTableView:self selectedNodesForDeletion:nodes]; @@ -474,8 +562,9 @@ - (BOOL)tableView:(UITableView*)tableView canMoveRowAtIndexPath:(NSIndexPath*)indexPath { - if (indexPath.section == self.promoSection) { - // Ignore promo section. + TableViewItem* item = [self.tableViewModel itemAtIndexPath:indexPath]; + if (item.type != ItemTypeBookmark) { + // Can only move bookmarks. return NO; } @@ -507,7 +596,9 @@ - (CGFloat)tableView:(UITableView*)tableView heightForRowAtIndexPath:(NSIndexPath*)indexPath { - if (indexPath.section == self.bookmarksSection) { + NSInteger sectionIdentifier = + [self.tableViewModel sectionIdentifierForSection:indexPath.section]; + if (sectionIdentifier == SectionIdentifierBookmarks) { return kCellHeightPt; } return UITableViewAutomaticDimension; @@ -517,7 +608,9 @@ - (void)tableView:(UITableView*)tableView didSelectRowAtIndexPath:(NSIndexPath*)indexPath { - if (indexPath.section == self.bookmarksSection) { + NSInteger sectionIdentifier = + [self.tableViewModel sectionIdentifierForSection:indexPath.section]; + if (sectionIdentifier == SectionIdentifierBookmarks) { const BookmarkNode* node = [self nodeAtIndexPath:indexPath]; DCHECK(node); // If table is in edit mode, record all the nodes added to edit set. @@ -541,7 +634,9 @@ - (void)tableView:(UITableView*)tableView didDeselectRowAtIndexPath:(NSIndexPath*)indexPath { - if (indexPath.section == self.bookmarksSection && self.editing) { + NSInteger sectionIdentifier = + [self.tableViewModel sectionIdentifierForSection:indexPath.section]; + if (sectionIdentifier == SectionIdentifierBookmarks && self.editing) { const BookmarkNode* node = [self nodeAtIndexPath:indexPath]; DCHECK(node); _editNodes.erase(node); @@ -566,8 +661,7 @@ } // A specific cell changed. Reload, if currently shown. - if (std::find(_bookmarkItems.begin(), _bookmarkItems.end(), bookmarkNode) != - _bookmarkItems.end()) { + if ([self itemForNode:bookmarkNode] != nil) { [self refreshContents]; } } @@ -613,13 +707,13 @@ DCHECK(bookmarkNode->is_url()); // Update image of corresponding cell. - NSIndexPath* indexPath = [self indexPathForNode:bookmarkNode]; - - if (!indexPath) { + BookmarkNodeItem* nodeItem = [self itemForNode:bookmarkNode]; + if (!nodeItem) { return; } // Check that this cell is visible. + NSIndexPath* indexPath = [self.tableViewModel indexPathForItem:nodeItem]; NSArray* visiblePaths = [self.tableView indexPathsForVisibleRows]; if (![visiblePaths containsObject:indexPath]) { return; @@ -629,20 +723,6 @@ [self loadFaviconAtIndexPath:indexPath continueToGoogleServer:NO]; } -#pragma mark - Sections - -- (NSInteger)promoSection { - return [self shouldShowPromoCell] ? 0 : -1; -} - -- (NSInteger)bookmarksSection { - return [self shouldShowPromoCell] ? 1 : 0; -} - -- (NSInteger)sectionCount { - return [self shouldShowPromoCell] ? 2 : 1; -} - #pragma mark - Gesture recognizer - (BOOL)gestureRecognizer:(UIGestureRecognizer*)gestureRecognizer @@ -663,7 +743,9 @@ } CGPoint touchPoint = [gestureRecognizer locationInView:self.tableView]; NSIndexPath* indexPath = [self.tableView indexPathForRowAtPoint:touchPoint]; - if (indexPath == nil || indexPath.section != self.bookmarksSection) { + if (indexPath == nil || + [self.tableViewModel sectionIdentifierForSection:indexPath.section] != + SectionIdentifierBookmarks) { return; } @@ -694,17 +776,19 @@ // Add selected nodes to editNodes only if they are not removed (still exist // in the table). - for (size_t index = 0; index < _bookmarkItems.size(); ++index) { - const BookmarkNode* node = _bookmarkItems[index]; + NSArray<TableViewItem*>* items = [self.tableViewModel + itemsInSectionWithIdentifier:SectionIdentifierBookmarks]; + for (TableViewItem* item in items) { + BookmarkNodeItem* nodeItem = + base::mac::ObjCCastStrict<BookmarkNodeItem>(item); + const BookmarkNode* node = nodeItem.bookmarkNode; if (_editNodes.find(node) != _editNodes.end()) { newEditNodes.insert(node); // Reselect the row of this node. - [self.tableView - selectRowAtIndexPath:[NSIndexPath - indexPathForRow:index - inSection:self.bookmarksSection] - animated:NO - scrollPosition:UITableViewScrollPositionNone]; + NSIndexPath* itemPath = [self.tableViewModel indexPathForItem:nodeItem]; + [self.tableView selectRowAtIndexPath:itemPath + animated:NO + scrollPosition:UITableViewScrollPositionNone]; } } @@ -733,8 +817,12 @@ // Returns the bookmark node associated with |indexPath|. - (const BookmarkNode*)nodeAtIndexPath:(NSIndexPath*)indexPath { - if (indexPath.section == self.bookmarksSection) { - return _bookmarkItems[indexPath.row]; + TableViewItem* item = [self.tableViewModel itemAtIndexPath:indexPath]; + + if (item.type == ItemTypeBookmark) { + BookmarkNodeItem* nodeItem = + base::mac::ObjCCastStrict<BookmarkNodeItem>(item); + return nodeItem.bookmarkNode; } NOTREACHED(); @@ -744,7 +832,12 @@ // Computes the bookmarks table view based on the current root node. - (void)computeBookmarkTableViewData { // Regenerate the list of all bookmarks. - _bookmarkItems.clear(); + if ([self.tableViewModel + hasSectionForSectionIdentifier:SectionIdentifierBookmarks]) { + [self.tableViewModel + removeSectionWithIdentifier:SectionIdentifierBookmarks]; + } + [self.tableViewModel addSectionWithIdentifier:SectionIdentifierBookmarks]; if (!self.bookmarkModel->loaded() || !_currentRootNode) { return; @@ -766,7 +859,11 @@ int childCount = _currentRootNode->child_count(); for (int i = 0; i < childCount; ++i) { const BookmarkNode* node = _currentRootNode->GetChild(i); - _bookmarkItems.push_back(node); + BookmarkNodeItem* nodeItem = + [[BookmarkNodeItem alloc] initWithType:ItemTypeBookmark + bookmarkNode:node]; + [self.tableViewModel addItem:nodeItem + toSectionWithIdentifier:SectionIdentifierBookmarks]; } } @@ -774,17 +871,30 @@ // root. - (void)generateTableViewDataForRootNode { // Add "Mobile Bookmarks" to the table. - _bookmarkItems.push_back(self.bookmarkModel->mobile_node()); + const BookmarkNode* mobileNode = self.bookmarkModel->mobile_node(); + BookmarkNodeItem* mobileItem = + [[BookmarkNodeItem alloc] initWithType:ItemTypeBookmark + bookmarkNode:mobileNode]; + [self.tableViewModel addItem:mobileItem + toSectionWithIdentifier:SectionIdentifierBookmarks]; // Add "Bookmarks Bar" and "Other Bookmarks" only when they are not empty. const BookmarkNode* bookmarkBar = self.bookmarkModel->bookmark_bar_node(); if (!bookmarkBar->empty()) { - _bookmarkItems.push_back(bookmarkBar); + BookmarkNodeItem* barItem = + [[BookmarkNodeItem alloc] initWithType:ItemTypeBookmark + bookmarkNode:bookmarkBar]; + [self.tableViewModel addItem:barItem + toSectionWithIdentifier:SectionIdentifierBookmarks]; } const BookmarkNode* otherBookmarks = self.bookmarkModel->other_node(); if (!otherBookmarks->empty()) { - _bookmarkItems.push_back(otherBookmarks); + BookmarkNodeItem* otherItem = + [[BookmarkNodeItem alloc] initWithType:ItemTypeBookmark + bookmarkNode:otherBookmarks]; + [self.tableViewModel addItem:otherItem + toSectionWithIdentifier:SectionIdentifierBookmarks]; } } @@ -851,16 +961,19 @@ self.tableView.backgroundView = self.emptyTableBackgroundView; } -- (NSIndexPath*)indexPathForNode:(const bookmarks::BookmarkNode*)bookmarkNode { - NSIndexPath* indexPath = nil; - std::vector<const BookmarkNode*>::iterator it = - std::find(_bookmarkItems.begin(), _bookmarkItems.end(), bookmarkNode); - if (it != _bookmarkItems.end()) { - ptrdiff_t index = std::distance(_bookmarkItems.begin(), it); - indexPath = - [NSIndexPath indexPathForRow:index inSection:self.bookmarksSection]; +- (BookmarkNodeItem*)itemForNode:(const bookmarks::BookmarkNode*)bookmarkNode { + NSArray<TableViewItem*>* items = [self.tableViewModel + itemsInSectionWithIdentifier:SectionIdentifierBookmarks]; + for (TableViewItem* item in items) { + if (item.type == ItemTypeBookmark) { + BookmarkNodeItem* nodeItem = + base::mac::ObjCCastStrict<BookmarkNodeItem>(item); + if (nodeItem.bookmarkNode == bookmarkNode) { + return nodeItem; + } + } } - return indexPath; + return nil; } - (void)updateCellAtIndexPath:(NSIndexPath*)indexPath
diff --git a/ios/chrome/browser/ui/bookmarks/cells/bookmark_table_cell.h b/ios/chrome/browser/ui/bookmarks/cells/bookmark_table_cell.h index 19182f78..fa1bc1f 100644 --- a/ios/chrome/browser/ui/bookmarks/cells/bookmark_table_cell.h +++ b/ios/chrome/browser/ui/bookmarks/cells/bookmark_table_cell.h
@@ -33,11 +33,9 @@ @interface BookmarkTableCell : UITableViewCell -- (instancetype)initWithReuseIdentifier:(NSString*)bookmarkCellIdentifier - NS_DESIGNATED_INITIALIZER; - - (instancetype)initWithStyle:(UITableViewCellStyle)style - reuseIdentifier:(NSString*)reuseIdentifier NS_UNAVAILABLE; + reuseIdentifier:(NSString*)reuseIdentifier + NS_DESIGNATED_INITIALIZER; - (instancetype)initWithCoder:(NSCoder*)aDecoder NS_UNAVAILABLE;
diff --git a/ios/chrome/browser/ui/bookmarks/cells/bookmark_table_cell.mm b/ios/chrome/browser/ui/bookmarks/cells/bookmark_table_cell.mm index 774c7a2a..a76bc5c 100644 --- a/ios/chrome/browser/ui/bookmarks/cells/bookmark_table_cell.mm +++ b/ios/chrome/browser/ui/bookmarks/cells/bookmark_table_cell.mm
@@ -55,9 +55,9 @@ #pragma mark - Initializer -- (instancetype)initWithReuseIdentifier:(NSString*)bookmarkCellIdentifier { - self = [super initWithStyle:UITableViewCellStyleDefault - reuseIdentifier:bookmarkCellIdentifier]; +- (instancetype)initWithStyle:(UITableViewCellStyle)style + reuseIdentifier:(NSString*)bookmarkCellIdentifier { + self = [super initWithStyle:style reuseIdentifier:bookmarkCellIdentifier]; if (self) { _titleText = [[UITextField alloc] initWithFrame:CGRectZero]; _titleText.textColor = [[MDCPalette greyPalette] tint900];
diff --git a/ios/chrome/browser/ui/bookmarks/cells/bookmark_table_signin_promo_cell.mm b/ios/chrome/browser/ui/bookmarks/cells/bookmark_table_signin_promo_cell.mm index 7cd4ee1..2eef92b17 100644 --- a/ios/chrome/browser/ui/bookmarks/cells/bookmark_table_signin_promo_cell.mm +++ b/ios/chrome/browser/ui/bookmarks/cells/bookmark_table_signin_promo_cell.mm
@@ -33,8 +33,9 @@ return YES; } -- (instancetype)initWithFrame:(CGRect)frame { - self = [super initWithFrame:frame]; +- (instancetype)initWithStyle:(UITableViewCellStyle)style + reuseIdentifier:(NSString*)reuseIdentifier { + self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]; if (self) { UIView* contentView = self.contentView; _signinPromoView = [[SigninPromoView alloc] initWithFrame:self.bounds];
diff --git a/ios/third_party/material_components_ios/README.chromium b/ios/third_party/material_components_ios/README.chromium index 5ad7ace..a4c98a4 100644 --- a/ios/third_party/material_components_ios/README.chromium +++ b/ios/third_party/material_components_ios/README.chromium
@@ -1,7 +1,7 @@ Name: Material Components for iOS URL: https://github.com/material-components/material-components-ios Version: 0 -Revision: 942163f2be5c76ca5c67f6449941a777f839c15a +Revision: 3bf34975f12b71ddefc170b0e207e79b604034e1 License: Apache 2.0 License File: LICENSE Security Critical: yes
diff --git a/media/BUILD.gn b/media/BUILD.gn index e605723..2127862 100644 --- a/media/BUILD.gn +++ b/media/BUILD.gn
@@ -248,6 +248,8 @@ "base/channel_layout.h", "base/limits.h", "base/media_shmem_export.h", + "base/sample_format.cc", + "base/sample_format.h", "base/vector_math.cc", "base/vector_math.h", "base/vector_math_testing.h",
diff --git a/media/audio/alsa/alsa_input.cc b/media/audio/alsa/alsa_input.cc index 6b11b688..81a9649 100644 --- a/media/audio/alsa/alsa_input.cc +++ b/media/audio/alsa/alsa_input.cc
@@ -19,6 +19,9 @@ namespace media { +static const SampleFormat kSampleFormat = kSampleFormatS16; +static const snd_pcm_format_t kAlsaSampleFormat = SND_PCM_FORMAT_S16; + static const int kNumPacketsInRingBuffer = 3; static const char kDefaultDevice1[] = "default"; @@ -33,8 +36,7 @@ : audio_manager_(audio_manager), device_name_(device_name), params_(params), - bytes_per_buffer_(params.frames_per_buffer() * - (params.channels() * params.bits_per_sample()) / 8), + bytes_per_buffer_(params.GetBytesPerBuffer(kSampleFormat)), wrapper_(wrapper), buffer_duration_(base::TimeDelta::FromMicroseconds( params.frames_per_buffer() * base::Time::kMicrosecondsPerSecond / @@ -54,14 +56,6 @@ if (device_handle_) return false; // Already open. - snd_pcm_format_t pcm_format = alsa_util::BitsToFormat( - params_.bits_per_sample()); - if (pcm_format == SND_PCM_FORMAT_UNKNOWN) { - LOG(WARNING) << "Unsupported bits per sample: " - << params_.bits_per_sample(); - return false; - } - uint32_t latency_us = buffer_duration_.InMicroseconds() * kNumPacketsInRingBuffer; @@ -72,8 +66,8 @@ const char* device_names[] = { kDefaultDevice1, kDefaultDevice2 }; for (size_t i = 0; i < arraysize(device_names); ++i) { device_handle_ = alsa_util::OpenCaptureDevice( - wrapper_, device_names[i], params_.channels(), - params_.sample_rate(), pcm_format, latency_us); + wrapper_, device_names[i], params_.channels(), params_.sample_rate(), + kAlsaSampleFormat, latency_us); if (device_handle_) { device_name_ = device_names[i]; @@ -81,11 +75,9 @@ } } } else { - device_handle_ = alsa_util::OpenCaptureDevice(wrapper_, - device_name_.c_str(), - params_.channels(), - params_.sample_rate(), - pcm_format, latency_us); + device_handle_ = alsa_util::OpenCaptureDevice( + wrapper_, device_name_.c_str(), params_.channels(), + params_.sample_rate(), kAlsaSampleFormat, latency_us); } if (device_handle_) { @@ -214,8 +206,9 @@ int frames_read = wrapper_->PcmReadi(device_handle_, audio_buffer_.get(), params_.frames_per_buffer()); if (frames_read == params_.frames_per_buffer()) { - audio_bus_->FromInterleaved(audio_buffer_.get(), audio_bus_->frames(), - params_.bits_per_sample() / 8); + audio_bus_->FromInterleaved<SignedInt16SampleTypeTraits>( + reinterpret_cast<int16_t*>(audio_buffer_.get()), + audio_bus_->frames()); // TODO(dalecurtis): This should probably use snd_pcm_htimestamp() so that // we can have |capture_time| directly instead of computing it as
diff --git a/media/audio/alsa/alsa_output.cc b/media/audio/alsa/alsa_output.cc index 02ac80e..a957846 100644 --- a/media/audio/alsa/alsa_output.cc +++ b/media/audio/alsa/alsa_output.cc
@@ -132,6 +132,9 @@ return os; } +static const SampleFormat kSampleFormat = kSampleFormatS16; +static const snd_pcm_format_t kAlsaSampleFormat = SND_PCM_FORMAT_S16; + const char AlsaPcmOutputStream::kDefaultDevice[] = "default"; const char AlsaPcmOutputStream::kAutoSelectDevice[] = ""; const char AlsaPcmOutputStream::kPlugPrefix[] = "plug:"; @@ -145,13 +148,13 @@ AlsaWrapper* wrapper, AudioManagerBase* manager) : requested_device_name_(device_name), - pcm_format_(alsa_util::BitsToFormat(params.bits_per_sample())), + pcm_format_(kAlsaSampleFormat), channels_(params.channels()), channel_layout_(params.channel_layout()), sample_rate_(params.sample_rate()), - bytes_per_sample_(params.bits_per_sample() / 8), - bytes_per_frame_(params.GetBytesPerFrame()), - packet_size_(params.GetBytesPerBuffer()), + bytes_per_sample_(SampleFormatToBytesPerChannel(kSampleFormat)), + bytes_per_frame_(params.GetBytesPerFrame(kSampleFormat)), + packet_size_(params.GetBytesPerBuffer(kSampleFormat)), latency_(std::max( base::TimeDelta::FromMicroseconds(kMinLatencyMicros), AudioTimestampHelper::FramesToTime(params.frames_per_buffer() * 2, @@ -178,11 +181,6 @@ LOG(WARNING) << "Unsupported audio parameters."; TransitionTo(kInError); } - - if (pcm_format_ == SND_PCM_FORMAT_UNKNOWN) { - LOG(WARNING) << "Unsupported bits per sample: " << params.bits_per_sample(); - TransitionTo(kInError); - } } AlsaPcmOutputStream::~AlsaPcmOutputStream() { @@ -418,8 +416,8 @@ // Note: If this ever changes to output raw float the data must be clipped // and sanitized since it may come from an untrusted source such as NaCl. output_bus->Scale(volume_); - output_bus->ToInterleaved( - frames_filled, bytes_per_sample_, packet->writable_data()); + output_bus->ToInterleaved<SignedInt16SampleTypeTraits>( + frames_filled, reinterpret_cast<int16_t*>(packet->writable_data())); if (packet_size > 0) { packet->set_data_size(packet_size);
diff --git a/media/audio/alsa/alsa_output_unittest.cc b/media/audio/alsa/alsa_output_unittest.cc index c63dd8f..8150c329 100644 --- a/media/audio/alsa/alsa_output_unittest.cc +++ b/media/audio/alsa/alsa_output_unittest.cc
@@ -126,7 +126,7 @@ AlsaPcmOutputStream* CreateStream(ChannelLayout layout, int32_t samples_per_packet) { AudioParameters params(kTestFormat, layout, kTestSampleRate, - kTestBitsPerSample, samples_per_packet); + samples_per_packet); return new AlsaPcmOutputStream(kTestDeviceName, params, &mock_alsa_wrapper_, @@ -188,7 +188,7 @@ CHANNEL_LAYOUT_STEREO; const int AlsaPcmOutputStreamTest::kTestSampleRate = AudioParameters::kAudioCDSampleRate; -const int AlsaPcmOutputStreamTest::kTestBitsPerSample = 8; +const int AlsaPcmOutputStreamTest::kTestBitsPerSample = 16; const int AlsaPcmOutputStreamTest::kTestBytesPerFrame = AlsaPcmOutputStreamTest::kTestBitsPerSample / 8 * ChannelLayoutToChannelCount(AlsaPcmOutputStreamTest::kTestChannelLayout); @@ -234,17 +234,6 @@ test_stream = CreateStream(CHANNEL_LAYOUT_SURROUND); EXPECT_EQ(AlsaPcmOutputStream::kCreated, test_stream->state()); test_stream->Close(); - - // Bad bits per sample. - AudioParameters bad_bps_params(kTestFormat, kTestChannelLayout, - kTestSampleRate, kTestBitsPerSample - 1, - kTestFramesPerPacket); - test_stream = new AlsaPcmOutputStream(kTestDeviceName, - bad_bps_params, - &mock_alsa_wrapper_, - mock_manager_.get()); - EXPECT_EQ(AlsaPcmOutputStream::kInError, test_stream->state()); - test_stream->Close(); } TEST_F(AlsaPcmOutputStreamTest, LatencyFloor) { @@ -322,13 +311,10 @@ SND_PCM_NONBLOCK)) .WillOnce(DoAll(SetArgPointee<0>(kFakeHandle), Return(0))); EXPECT_CALL(mock_alsa_wrapper_, - PcmSetParams(kFakeHandle, - SND_PCM_FORMAT_U8, + PcmSetParams(kFakeHandle, SND_PCM_FORMAT_S16_LE, SND_PCM_ACCESS_RW_INTERLEAVED, ChannelLayoutToChannelCount(kTestChannelLayout), - kTestSampleRate, - 1, - expected_micros)) + kTestSampleRate, 1, expected_micros)) .WillOnce(Return(0)); EXPECT_CALL(mock_alsa_wrapper_, PcmGetParams(kFakeHandle, _, _)) .WillOnce(DoAll(SetArgPointee<1>(kTestFramesPerPacket),
diff --git a/media/audio/alsa/alsa_util.cc b/media/audio/alsa/alsa_util.cc index b94cd17..127e1719 100644 --- a/media/audio/alsa/alsa_util.cc +++ b/media/audio/alsa/alsa_util.cc
@@ -62,25 +62,6 @@ return control_name; } -snd_pcm_format_t BitsToFormat(int bits_per_sample) { - switch (bits_per_sample) { - case 8: - return SND_PCM_FORMAT_U8; - - case 16: - return SND_PCM_FORMAT_S16; - - case 24: - return SND_PCM_FORMAT_S24; - - case 32: - return SND_PCM_FORMAT_S32; - - default: - return SND_PCM_FORMAT_UNKNOWN; - } -} - int CloseDevice(media::AlsaWrapper* wrapper, snd_pcm_t* handle) { std::string device_name = wrapper->PcmName(handle); int error = wrapper->PcmClose(handle);
diff --git a/media/audio/alsa/alsa_util.h b/media/audio/alsa/alsa_util.h index a23ab31..d24584a 100644 --- a/media/audio/alsa/alsa_util.h +++ b/media/audio/alsa/alsa_util.h
@@ -14,8 +14,6 @@ namespace alsa_util { -snd_pcm_format_t BitsToFormat(int bits_per_sample); - snd_pcm_t* OpenCaptureDevice(media::AlsaWrapper* wrapper, const char* device_name, int channels,
diff --git a/media/audio/alsa/audio_manager_alsa.cc b/media/audio/alsa/audio_manager_alsa.cc index 5f5bc6d..91108f0 100644 --- a/media/audio/alsa/audio_manager_alsa.cc +++ b/media/audio/alsa/audio_manager_alsa.cc
@@ -77,9 +77,9 @@ const std::string& device_id) { static const int kDefaultInputBufferSize = 1024; - return AudioParameters( - AudioParameters::AUDIO_PCM_LOW_LATENCY, CHANNEL_LAYOUT_STEREO, - kDefaultSampleRate, 16, kDefaultInputBufferSize); + return AudioParameters(AudioParameters::AUDIO_PCM_LOW_LATENCY, + CHANNEL_LAYOUT_STEREO, kDefaultSampleRate, + kDefaultInputBufferSize); } const char* AudioManagerAlsa::GetName() { @@ -280,7 +280,6 @@ ChannelLayout channel_layout = CHANNEL_LAYOUT_STEREO; int sample_rate = kDefaultSampleRate; int buffer_size = kDefaultOutputBufferSize; - int bits_per_sample = 16; if (input_params.IsValid()) { // Some clients, such as WebRTC, have a more limited use case and work // acceptably with a smaller buffer size. The check below allows clients @@ -288,7 +287,6 @@ // TODO(dalecurtis): This should include bits per channel and channel layout // eventually. sample_rate = input_params.sample_rate(); - bits_per_sample = input_params.bits_per_sample(); channel_layout = input_params.channel_layout(); buffer_size = std::min(input_params.frames_per_buffer(), buffer_size); } @@ -298,7 +296,7 @@ buffer_size = user_buffer_size; return AudioParameters(AudioParameters::AUDIO_PCM_LOW_LATENCY, channel_layout, - sample_rate, bits_per_sample, buffer_size); + sample_rate, buffer_size); } AudioOutputStream* AudioManagerAlsa::MakeOutputStream(
diff --git a/media/audio/android/audio_android_unittest.cc b/media/audio/android/audio_android_unittest.cc index fff5747..92eb8b6 100644 --- a/media/audio/android/audio_android_unittest.cc +++ b/media/audio/android/audio_android_unittest.cc
@@ -54,8 +54,8 @@ const char kSpeechFile_16b_m_44k[] = "speech_16b_mono_44kHz.raw"; const float kCallbackTestTimeMs = 2000.0; -const int kBitsPerSample = 16; -const int kBytesPerSample = kBitsPerSample / 8; +const int kBytesPerSample = 2; +const SampleFormat kSampleFormat = kSampleFormatS16; // Converts AudioParameters::Format enumerator to readable string. std::string FormatToString(AudioParameters::Format format) { @@ -142,15 +142,16 @@ std::ostream& operator<<(std::ostream& os, const AudioParameters& params) { using std::endl; - os << endl << "format: " << FormatToString(params.format()) << endl + os << endl + << "format: " << FormatToString(params.format()) << endl << "channel layout: " << LayoutToString(params.channel_layout()) << endl << "sample rate: " << params.sample_rate() << endl - << "bits per sample: " << params.bits_per_sample() << endl << "frames per buffer: " << params.frames_per_buffer() << endl << "channels: " << params.channels() << endl - << "bytes per buffer: " << params.GetBytesPerBuffer() << endl - << "bytes per second: " << params.GetBytesPerSecond() << endl - << "bytes per frame: " << params.GetBytesPerFrame() << endl + << "bytes per buffer: " << params.GetBytesPerBuffer(kSampleFormat) << endl + << "bytes per second: " + << params.sample_rate() * params.GetBytesPerFrame(kSampleFormat) << endl + << "bytes per frame: " << params.GetBytesPerFrame(kSampleFormat) << endl << "chunk size in ms: " << ExpectedTimeBetweenCallbacks(params) << endl << "echo_canceller: " << (params.effects() & AudioParameters::ECHO_CANCELLER); @@ -242,7 +243,8 @@ const std::string& file_name) : event_(event), params_(params) { // Allocate space for ~10 seconds of data. - const int kMaxBufferSize = 10 * params.GetBytesPerSecond(); + const int kMaxBufferSize = + 10 * params.sample_rate() * params.GetBytesPerFrame(kSampleFormat); buffer_.reset(new media::SeekableBuffer(0, kMaxBufferSize)); // Open up the binary file which will be written to in the destructor. @@ -314,8 +316,9 @@ started_(false) { // Start with a reasonably small FIFO size. It will be increased // dynamically during the test if required. - fifo_.reset(new media::SeekableBuffer(0, 2 * params.GetBytesPerBuffer())); - buffer_.reset(new uint8_t[params_.GetBytesPerBuffer()]); + size_t buffer_size = params.GetBytesPerBuffer(kSampleFormat); + fifo_.reset(new media::SeekableBuffer(0, 2 * buffer_size)); + buffer_.reset(new uint8_t[buffer_size]); } ~FullDuplexAudioSinkSource() override {} @@ -327,7 +330,6 @@ const base::TimeTicks now_time = base::TimeTicks::Now(); const int diff = (now_time - previous_time_).InMilliseconds(); - EXPECT_EQ(params_.bits_per_sample(), 16); const int num_samples = src->frames() * src->channels(); std::unique_ptr<int16_t> interleaved(new int16_t[num_samples]); const int bytes_per_sample = sizeof(*interleaved); @@ -368,8 +370,8 @@ int /* prior_frames_skipped */, AudioBus* dest) override { const int size_in_bytes = - (params_.bits_per_sample() / 8) * dest->frames() * dest->channels(); - EXPECT_EQ(size_in_bytes, params_.GetBytesPerBuffer()); + kBytesPerSample * dest->frames() * dest->channels(); + EXPECT_EQ(size_in_bytes, params_.GetBytesPerBuffer(kSampleFormat)); base::AutoLock lock(lock_); @@ -387,8 +389,8 @@ dest->Zero(); } else { fifo_->Read(buffer_.get(), size_in_bytes); - dest->FromInterleaved( - buffer_.get(), dest->frames(), params_.bits_per_sample() / 8); + dest->FromInterleaved<SignedInt16SampleTypeTraits>( + reinterpret_cast<int16_t*>(buffer_.get()), dest->frames()); } return dest->frames(); @@ -398,7 +400,7 @@ // Converts from bytes to milliseconds given number of bytes and existing // audio parameters. double BytesToMilliseconds(int bytes) const { - const int frames = bytes / params_.GetBytesPerFrame(); + const int frames = bytes / params_.GetBytesPerFrame(kSampleFormat); return (base::TimeDelta::FromMicroseconds( frames * base::Time::kMicrosecondsPerSecond / static_cast<double>(params_.sample_rate()))).InMillisecondsF(); @@ -835,7 +837,6 @@ AudioParameters params(audio_output_parameters().format(), CHANNEL_LAYOUT_MONO, audio_output_parameters().sample_rate(), - audio_output_parameters().bits_per_sample(), audio_output_parameters().sample_rate() / 100); StartOutputStreamCallbacks(params); }
diff --git a/media/audio/android/audio_manager_android.cc b/media/audio/android/audio_manager_android.cc index 0128988..45287af 100644 --- a/media/audio/android/audio_manager_android.cc +++ b/media/audio/android/audio_manager_android.cc
@@ -156,7 +156,7 @@ buffer_size = user_buffer_size; AudioParameters params(AudioParameters::AUDIO_PCM_LOW_LATENCY, channel_layout, - GetNativeOutputSampleRate(), 16, buffer_size); + GetNativeOutputSampleRate(), buffer_size); params.set_effects(effects); return params; } @@ -326,11 +326,9 @@ ChannelLayout channel_layout = CHANNEL_LAYOUT_STEREO; int sample_rate = GetNativeOutputSampleRate(); int buffer_size = GetOptimalOutputFrameSize(sample_rate, 2); - int bits_per_sample = 16; if (input_params.IsValid()) { // Use the client's input parameters if they are valid. sample_rate = input_params.sample_rate(); - bits_per_sample = input_params.bits_per_sample(); // Pre-Lollipop devices don't support > stereo OpenSLES output and the // AudioManager APIs for GetOptimalOutputFrameSize() don't support channel @@ -359,7 +357,7 @@ buffer_size = user_buffer_size; return AudioParameters(AudioParameters::AUDIO_PCM_LOW_LATENCY, channel_layout, - sample_rate, bits_per_sample, buffer_size); + sample_rate, buffer_size); } bool AudioManagerAndroid::HasNoAudioInputStreams() {
diff --git a/media/audio/android/audio_record_input.cc b/media/audio/android/audio_record_input.cc index 657a1982..0ddea78 100644 --- a/media/audio/android/audio_record_input.cc +++ b/media/audio/android/audio_record_input.cc
@@ -13,6 +13,8 @@ namespace media { +constexpr SampleFormat kSampleFormat = kSampleFormatS16; + AudioRecordInputStream::AudioRecordInputStream( AudioManagerAndroid* audio_manager, const AudioParameters& params) @@ -20,18 +22,14 @@ callback_(NULL), direct_buffer_address_(NULL), audio_bus_(media::AudioBus::Create(params)), - bytes_per_sample_(params.bits_per_sample() / 8) { + bytes_per_sample_(SampleFormatToBytesPerChannel(kSampleFormat)) { DVLOG(2) << __PRETTY_FUNCTION__; DCHECK(params.IsValid()); - j_audio_record_.Reset( - Java_AudioRecordInput_createAudioRecordInput( - base::android::AttachCurrentThread(), - reinterpret_cast<intptr_t>(this), - params.sample_rate(), - params.channels(), - params.bits_per_sample(), - params.GetBytesPerBuffer(), - params.effects() & AudioParameters::ECHO_CANCELLER)); + j_audio_record_.Reset(Java_AudioRecordInput_createAudioRecordInput( + base::android::AttachCurrentThread(), reinterpret_cast<intptr_t>(this), + params.sample_rate(), params.channels(), bytes_per_sample_ * 8, + params.GetBytesPerBuffer(kSampleFormat), + params.effects() & AudioParameters::ECHO_CANCELLER)); } AudioRecordInputStream::~AudioRecordInputStream() {
diff --git a/media/audio/android/opensles_input.cc b/media/audio/android/opensles_input.cc index 22d9384c..0addcc6 100644 --- a/media/audio/android/opensles_input.cc +++ b/media/audio/android/opensles_input.cc
@@ -32,16 +32,19 @@ started_(false), audio_bus_(media::AudioBus::Create(params)) { DVLOG(2) << __PRETTY_FUNCTION__; + + const SampleFormat kSampleFormat = kSampleFormatS16; + format_.formatType = SL_DATAFORMAT_PCM; format_.numChannels = static_cast<SLuint32>(params.channels()); // Provides sampling rate in milliHertz to OpenSLES. format_.samplesPerSec = static_cast<SLuint32>(params.sample_rate() * 1000); - format_.bitsPerSample = params.bits_per_sample(); - format_.containerSize = params.bits_per_sample(); + format_.bitsPerSample = format_.containerSize = + SampleFormatToBitsPerChannel(kSampleFormat); format_.endianness = SL_BYTEORDER_LITTLEENDIAN; format_.channelMask = ChannelCountToSLESChannelMask(params.channels()); - buffer_size_bytes_ = params.GetBytesPerBuffer(); + buffer_size_bytes_ = params.GetBytesPerBuffer(kSampleFormat); hardware_delay_ = base::TimeDelta::FromSecondsD( params.frames_per_buffer() / static_cast<double>(params.sample_rate())); @@ -302,9 +305,9 @@ TRACE_EVENT0("audio", "OpenSLESOutputStream::ReadBufferQueue"); // Convert from interleaved format to deinterleaved audio bus format. - audio_bus_->FromInterleaved(audio_data_[active_buffer_index_], - audio_bus_->frames(), - format_.bitsPerSample / 8); + audio_bus_->FromInterleaved<SignedInt16SampleTypeTraits>( + reinterpret_cast<int16_t*>(audio_data_[active_buffer_index_]), + audio_bus_->frames()); // TODO(henrika): Investigate if it is possible to get an accurate // delay estimation.
diff --git a/media/audio/android/opensles_output.cc b/media/audio/android/opensles_output.cc index b4893925..4f01757 100644 --- a/media/audio/android/opensles_output.cc +++ b/media/audio/android/opensles_output.cc
@@ -39,19 +39,18 @@ muted_(false), volume_(1.0), samples_per_second_(params.sample_rate()), - have_float_output_( - base::android::BuildInfo::GetInstance()->sdk_int() >= - base::android::SDK_VERSION_LOLLIPOP && - // See http://crbug.com/737188; still shipping Lollipop in 2017, so no - // idea if later phones will be glitch free; thus blacklist all. - !base::EqualsCaseInsensitiveASCII( - base::android::BuildInfo::GetInstance()->manufacturer(), - "vivo")), - bytes_per_frame_(have_float_output_ ? params.channels() * sizeof(float) - : params.GetBytesPerFrame()), - buffer_size_bytes_(have_float_output_ - ? bytes_per_frame_ * params.frames_per_buffer() - : params.GetBytesPerBuffer()), + sample_format_( + (base::android::BuildInfo::GetInstance()->sdk_int() >= + base::android::SDK_VERSION_LOLLIPOP && + // See http://crbug.com/737188; still shipping Lollipop in 2017, so + // no idea if later phones will be glitch free; thus blacklist all. + !base::EqualsCaseInsensitiveASCII( + base::android::BuildInfo::GetInstance()->manufacturer(), + "vivo")) + ? kSampleFormatF32 + : kSampleFormatS16), + bytes_per_frame_(params.GetBytesPerFrame(sample_format_)), + buffer_size_bytes_(params.GetBytesPerBuffer(sample_format_)), performance_mode_(SL_ANDROID_PERFORMANCE_NONE), delay_calculator_(samples_per_second_) { DVLOG(2) << "OpenSLESOutputStream::OpenSLESOutputStream(" @@ -66,14 +65,14 @@ audio_bus_ = AudioBus::Create(params); - if (have_float_output_) { + if (sample_format_ == kSampleFormatF32) { float_format_.formatType = SL_ANDROID_DATAFORMAT_PCM_EX; float_format_.numChannels = static_cast<SLuint32>(params.channels()); // Despite the name, this field is actually the sampling rate in millihertz. float_format_.sampleRate = static_cast<SLuint32>(samples_per_second_ * 1000); - float_format_.bitsPerSample = 32; - float_format_.containerSize = 32; + float_format_.bitsPerSample = float_format_.containerSize = + SampleFormatToBitsPerChannel(sample_format_); float_format_.endianness = SL_BYTEORDER_LITTLEENDIAN; float_format_.channelMask = ChannelCountToSLESChannelMask(params.channels()); @@ -85,8 +84,8 @@ format_.numChannels = static_cast<SLuint32>(params.channels()); // Despite the name, this field is actually the sampling rate in millihertz :| format_.samplesPerSec = static_cast<SLuint32>(samples_per_second_ * 1000); - format_.bitsPerSample = params.bits_per_sample(); - format_.containerSize = params.bits_per_sample(); + format_.bitsPerSample = format_.containerSize = + SampleFormatToBitsPerChannel(sample_format_); format_.endianness = SL_BYTEORDER_LITTLEENDIAN; format_.channelMask = ChannelCountToSLESChannelMask(params.channels()); } @@ -281,7 +280,7 @@ SL_DATALOCATOR_ANDROIDSIMPLEBUFFERQUEUE, static_cast<SLuint32>(kMaxNumOfBuffersInQueue)}; SLDataSource audio_source; - if (have_float_output_) + if (sample_format_ == kSampleFormatF32) audio_source = {&simple_buffer_queue, &float_format_}; else audio_source = {&simple_buffer_queue, &format_}; @@ -424,10 +423,12 @@ // raw float, the data must be clipped and sanitized since it may come // from an untrusted source such as NaCl. audio_bus_->Scale(muted_ ? 0.0f : volume_); - if (!have_float_output_) { - audio_bus_->ToInterleaved(frames_filled, format_.bitsPerSample / 8, - audio_data_[active_buffer_index_]); + if (sample_format_ == kSampleFormatS16) { + audio_bus_->ToInterleaved<SignedInt16SampleTypeTraits>( + frames_filled, + reinterpret_cast<int16_t*>(audio_data_[active_buffer_index_])); } else { + DCHECK_EQ(sample_format_, kSampleFormatF32); audio_bus_->ToInterleaved<Float32SampleTypeTraits>( frames_filled, reinterpret_cast<float*>(audio_data_[active_buffer_index_]));
diff --git a/media/audio/android/opensles_output.h b/media/audio/android/opensles_output.h index 86d5a852..6de0991 100644 --- a/media/audio/android/opensles_output.h +++ b/media/audio/android/opensles_output.h
@@ -122,8 +122,9 @@ int samples_per_second_; - // On Android 5.0+ we can output directly to float instead of in integer. - bool have_float_output_; + // On Android 5.0+ we can output directly to float instead of in integer, so + // there we'll use kSampleFormatF32. If not, this will be kSampleFormatS16. + SampleFormat sample_format_; int bytes_per_frame_; size_t buffer_size_bytes_;
diff --git a/media/audio/audio_debug_file_writer_unittest.cc b/media/audio/audio_debug_file_writer_unittest.cc index eaa026b..5d2474a 100644 --- a/media/audio/audio_debug_file_writer_unittest.cc +++ b/media/audio/audio_debug_file_writer_unittest.cc
@@ -57,7 +57,6 @@ params_(AudioParameters::Format::AUDIO_PCM_LINEAR, std::get<0>(GetParam()), std::get<1>(GetParam()), - kBytesPerSample * 8, std::get<2>(GetParam())), writes_(std::get<3>(GetParam())), source_samples_(params_.frames_per_buffer() * params_.channels() *
diff --git a/media/audio/audio_debug_recording_helper_unittest.cc b/media/audio/audio_debug_recording_helper_unittest.cc index a96f633..9bd581d8 100644 --- a/media/audio/audio_debug_recording_helper_unittest.cc +++ b/media/audio/audio_debug_recording_helper_unittest.cc
@@ -202,7 +202,7 @@ // AudioBus, the other parameters are ignored. const int number_of_frames = 100; const AudioParameters params(AudioParameters::AUDIO_PCM_LINEAR, - ChannelLayout::CHANNEL_LAYOUT_STEREO, 0, 0, + ChannelLayout::CHANNEL_LAYOUT_STEREO, 0, number_of_frames); // Setup some data.
diff --git a/media/audio/audio_input_controller_unittest.cc b/media/audio/audio_input_controller_unittest.cc index 96a23fb2..1b169f1 100644 --- a/media/audio/audio_input_controller_unittest.cc +++ b/media/audio/audio_input_controller_unittest.cc
@@ -28,7 +28,6 @@ namespace { const int kSampleRate = AudioParameters::kAudioCDSampleRate; -const int kBitsPerSample = 16; const ChannelLayout kChannelLayout = CHANNEL_LAYOUT_STEREO; const int kSamplesPerPacket = kSampleRate / 10; @@ -120,7 +119,6 @@ params_(AudioParameters::AUDIO_FAKE, kChannelLayout, kSampleRate, - kBitsPerSample, kSamplesPerPacket) {} ~AudioInputControllerTest() override {
diff --git a/media/audio/audio_input_device.cc b/media/audio/audio_input_device.cc index 41e077e..4d55f44 100644 --- a/media/audio/audio_input_device.cc +++ b/media/audio/audio_input_device.cc
@@ -68,7 +68,6 @@ private: const base::TimeTicks start_time_; bool no_callbacks_received_; - const double bytes_per_ms_; size_t current_segment_id_; uint32_t last_buffer_id_; std::vector<std::unique_ptr<const media::AudioBus>> audio_buses_; @@ -319,8 +318,6 @@ total_segments), start_time_(base::TimeTicks::Now()), no_callbacks_received_(true), - bytes_per_ms_(static_cast<double>(audio_parameters.GetBytesPerSecond()) / - base::Time::kMillisecondsPerSecond), current_segment_id_(0u), last_buffer_id_(UINT32_MAX), capture_callback_(capture_callback),
diff --git a/media/audio/audio_input_device_unittest.cc b/media/audio/audio_input_device_unittest.cc index e94f62c5..35f1b2a 100644 --- a/media/audio/audio_input_device_unittest.cc +++ b/media/audio/audio_input_device_unittest.cc
@@ -76,7 +76,7 @@ // Verify that we get an OnCaptureError() callback if CreateStream fails. TEST(AudioInputDeviceTest, FailToCreateStream) { AudioParameters params(AudioParameters::AUDIO_PCM_LOW_LATENCY, - CHANNEL_LAYOUT_STEREO, 48000, 16, 480); + CHANNEL_LAYOUT_STEREO, 48000, 480); MockCaptureCallback callback; MockAudioInputIPC* input_ipc = new MockAudioInputIPC(); @@ -97,7 +97,7 @@ TEST(AudioInputDeviceTest, CreateStream) { AudioParameters params(AudioParameters::AUDIO_PCM_LOW_LATENCY, - CHANNEL_LAYOUT_STEREO, 48000, 16, 480); + CHANNEL_LAYOUT_STEREO, 48000, 480); SharedMemory shared_memory; CancelableSyncSocket browser_socket; CancelableSyncSocket renderer_socket;
diff --git a/media/audio/audio_input_sync_writer_unittest.cc b/media/audio/audio_input_sync_writer_unittest.cc index 61e01d6c..8f4a0c4 100644 --- a/media/audio/audio_input_sync_writer_unittest.cc +++ b/media/audio/audio_input_sync_writer_unittest.cc
@@ -107,10 +107,9 @@ AudioInputSyncWriterTest() { const int sampling_frequency_hz = 16000; const int frames = sampling_frequency_hz / 100; // 10 ms - const int bits_per_sample = 16; - const AudioParameters audio_params( - AudioParameters::AUDIO_FAKE, CHANNEL_LAYOUT_MONO, sampling_frequency_hz, - bits_per_sample, frames); + const AudioParameters audio_params(AudioParameters::AUDIO_FAKE, + CHANNEL_LAYOUT_MONO, + sampling_frequency_hz, frames); const uint32_t data_size = ComputeAudioInputBufferSize(audio_params, kSegments);
diff --git a/media/audio/audio_low_latency_input_output_unittest.cc b/media/audio/audio_low_latency_input_output_unittest.cc index 9ab51de..c264b5b1 100644 --- a/media/audio/audio_low_latency_input_output_unittest.cc +++ b/media/audio/audio_low_latency_input_output_unittest.cc
@@ -279,15 +279,14 @@ typedef typename StreamTraits::StreamType StreamType; explicit StreamWrapper(AudioManager* audio_manager) - : - audio_manager_(audio_manager), + : audio_manager_(audio_manager), format_(AudioParameters::AUDIO_PCM_LOW_LATENCY), #if defined(OS_ANDROID) - channel_layout_(CHANNEL_LAYOUT_MONO), + channel_layout_(CHANNEL_LAYOUT_MONO) #else - channel_layout_(CHANNEL_LAYOUT_STEREO), + channel_layout_(CHANNEL_LAYOUT_STEREO) #endif - bits_per_sample_(16) { + { // Use the preferred sample rate. const AudioParameters& params = StreamTraits::GetDefaultAudioStreamParameters(audio_manager_); @@ -309,15 +308,14 @@ int channels() const { return ChannelLayoutToChannelCount(channel_layout_); } - int bits_per_sample() const { return bits_per_sample_; } int sample_rate() const { return sample_rate_; } int samples_per_packet() const { return samples_per_packet_; } private: StreamType* CreateStream() { - StreamType* stream = StreamTraits::CreateStream(audio_manager_, - AudioParameters(format_, channel_layout_, sample_rate_, - bits_per_sample_, samples_per_packet_)); + StreamType* stream = StreamTraits::CreateStream( + audio_manager_, AudioParameters(format_, channel_layout_, sample_rate_, + samples_per_packet_)); EXPECT_TRUE(stream); return stream; } @@ -325,7 +323,6 @@ AudioManager* audio_manager_; AudioParameters::Format format_; ChannelLayout channel_layout_; - int bits_per_sample_; int sample_rate_; int samples_per_packet_; }; @@ -364,8 +361,7 @@ // buffer sizes for input and output. if (aisw.sample_rate() != aosw.sample_rate() || aisw.samples_per_packet() != aosw.samples_per_packet() || - aisw.channels()!= aosw.channels() || - aisw.bits_per_sample() != aosw.bits_per_sample()) { + aisw.channels() != aosw.channels()) { LOG(ERROR) << "This test requires symmetric input and output parameters. " "Ensure that sample rate and number of channels are identical in " "both directions";
diff --git a/media/audio/audio_manager.h b/media/audio/audio_manager.h index 12d9e0c..6376261 100644 --- a/media/audio/audio_manager.h +++ b/media/audio/audio_manager.h
@@ -132,7 +132,6 @@ // Factory to create audio recording streams. // |channels| can be 1 or 2. // |sample_rate| is in hertz and can be any value supported by the platform. - // |bits_per_sample| can be any value supported by the platform. // |samples_per_packet| is in hertz as well and can be 0 to |sample_rate|, // with 0 suggesting that the implementation use a default value for that // platform.
diff --git a/media/audio/audio_manager_base.cc b/media/audio/audio_manager_base.cc index d9dbf26..22a1d56 100644 --- a/media/audio/audio_manager_base.cc +++ b/media/audio/audio_manager_base.cc
@@ -366,11 +366,7 @@ // output device based on the input parameters. This may happen if the OS // provided us junk values for the hardware configuration. LOG(ERROR) << "Invalid audio output parameters received; using fake " - << "audio path. Channels: " << output_params.channels() << ", " - << "Sample Rate: " << output_params.sample_rate() << ", " - << "Bits Per Sample: " << output_params.bits_per_sample() - << ", Frames Per Buffer: " - << output_params.frames_per_buffer(); + << "audio path: " << output_params.AsHumanReadableString(); // Tell the AudioManager to create a fake output device. output_params = params;
diff --git a/media/audio/audio_manager_unittest.cc b/media/audio/audio_manager_unittest.cc index 71db2ec..3f768e8 100644 --- a/media/audio/audio_manager_unittest.cc +++ b/media/audio/audio_manager_unittest.cc
@@ -218,7 +218,7 @@ public: void HandleDefaultDeviceIDsTest() { AudioParameters params(AudioParameters::AUDIO_PCM_LOW_LATENCY, - CHANNEL_LAYOUT_STEREO, 48000, 16, 2048); + CHANNEL_LAYOUT_STEREO, 48000, 2048); // Create a stream with the default device id "". AudioOutputStream* stream =
diff --git a/media/audio/audio_output_controller_unittest.cc b/media/audio/audio_output_controller_unittest.cc index 99e82bd8..5847d48 100644 --- a/media/audio/audio_output_controller_unittest.cc +++ b/media/audio/audio_output_controller_unittest.cc
@@ -46,7 +46,6 @@ namespace media { static const int kSampleRate = AudioParameters::kAudioCDSampleRate; -static const int kBitsPerSample = 16; static const ChannelLayout kChannelLayout = CHANNEL_LAYOUT_STEREO; static const int kSamplesPerPacket = kSampleRate / 1000; static const double kTestVolume = 0.25; @@ -54,7 +53,7 @@ AudioParameters AOCTestParams() { return AudioParameters(AudioParameters::AUDIO_FAKE, kChannelLayout, - kSampleRate, kBitsPerSample, kSamplesPerPacket); + kSampleRate, kSamplesPerPacket); } class MockAudioOutputControllerEventHandler
diff --git a/media/audio/audio_output_device_unittest.cc b/media/audio/audio_output_device_unittest.cc index 37f2305..7fbd906 100644 --- a/media/audio/audio_output_device_unittest.cc +++ b/media/audio/audio_output_device_unittest.cc
@@ -121,7 +121,7 @@ AudioOutputDeviceTest::AudioOutputDeviceTest() : device_status_(OUTPUT_DEVICE_STATUS_ERROR_INTERNAL) { default_audio_parameters_.Reset(AudioParameters::AUDIO_PCM_LINEAR, - CHANNEL_LAYOUT_STEREO, 48000, 16, 1024); + CHANNEL_LAYOUT_STEREO, 48000, 1024); SetDevice(kDefaultDeviceId); } @@ -465,8 +465,7 @@ const int kAudioParameterFrames = 4321; AudioParameters params(AudioParameters::AUDIO_BITSTREAM_EAC3, - CHANNEL_LAYOUT_STEREO, 48000, 16, - kAudioParameterFrames); + CHANNEL_LAYOUT_STEREO, 48000, kAudioParameterFrames); TestEnvironment env(params); auto* ipc = new MockAudioOutputIPC(); // owned by |audio_device|.
diff --git a/media/audio/audio_output_proxy_unittest.cc b/media/audio/audio_output_proxy_unittest.cc index 2053a20..ff493b6 100644 --- a/media/audio/audio_output_proxy_unittest.cc +++ b/media/audio/audio_output_proxy_unittest.cc
@@ -171,7 +171,7 @@ // FakeAudioOutputStream will keep the message loop busy indefinitely; i.e., // RunUntilIdle() will never terminate. params_ = AudioParameters(AudioParameters::AUDIO_PCM_LINEAR, - CHANNEL_LAYOUT_STEREO, 8000, 16, 2048); + CHANNEL_LAYOUT_STEREO, 8000, 2048); InitDispatcher(base::TimeDelta::FromMilliseconds(kTestCloseDelayMs)); } @@ -501,9 +501,8 @@ // Use a low sample rate and large buffer size when testing otherwise the // FakeAudioOutputStream will keep the message loop busy indefinitely; i.e., // RunUntilIdle() will never terminate. - resampler_params_ = AudioParameters( - AudioParameters::AUDIO_PCM_LOW_LATENCY, CHANNEL_LAYOUT_STEREO, - 16000, 16, 1024); + resampler_params_ = AudioParameters(AudioParameters::AUDIO_PCM_LOW_LATENCY, + CHANNEL_LAYOUT_STEREO, 16000, 1024); resampler_ = std::make_unique<AudioOutputResampler>( &manager(), params_, resampler_params_, std::string(), close_delay, base::BindRepeating(&RegisterDebugRecording));
diff --git a/media/audio/audio_output_resampler.cc b/media/audio/audio_output_resampler.cc index 7da0eb67..b516c61 100644 --- a/media/audio/audio_output_resampler.cc +++ b/media/audio/audio_output_resampler.cc
@@ -60,10 +60,6 @@ // AudioConverter::InputCallback implementation. double ProvideInput(AudioBus* audio_bus, uint32_t frames_delayed) override; - // Ratio of input bytes to output bytes used to correct playback delay with - // regard to buffering and resampling. - const double io_ratio_; - // Source callback. AudioOutputStream::AudioSourceCallback* source_callback_; @@ -96,9 +92,6 @@ // Record UMA statistics for hardware output configuration. static void RecordStats(const AudioParameters& output_params) { - UMA_HISTOGRAM_EXACT_LINEAR("Media.HardwareAudioBitsPerChannel", - output_params.bits_per_sample(), - static_cast<int>(limits::kMaxBitsPerSample)); UMA_HISTOGRAM_ENUMERATION( "Media.HardwareAudioChannelLayout", output_params.channel_layout(), CHANNEL_LAYOUT_MAX + 1); @@ -120,9 +113,6 @@ // Record UMA statistics for hardware output configuration after fallback. static void RecordFallbackStats(const AudioParameters& output_params) { UMA_HISTOGRAM_BOOLEAN("Media.FallbackToHighLatencyAudioPath", true); - UMA_HISTOGRAM_EXACT_LINEAR("Media.FallbackHardwareAudioBitsPerChannel", - output_params.bits_per_sample(), - static_cast<int>(limits::kMaxBitsPerSample)); UMA_HISTOGRAM_ENUMERATION( "Media.FallbackHardwareAudioChannelLayout", output_params.channel_layout(), CHANNEL_LAYOUT_MAX + 1); @@ -211,7 +201,6 @@ return AudioParameters(AudioParameters::AUDIO_PCM_LINEAR, original_output_params.channel_layout(), original_output_params.sample_rate(), - original_output_params.bits_per_sample(), frames_per_buffer); } #endif @@ -503,9 +492,7 @@ const AudioParameters& input_params, const AudioParameters& output_params, std::unique_ptr<AudioDebugRecorder> debug_recorder) - : io_ratio_(static_cast<double>(input_params.GetBytesPerSecond()) / - output_params.GetBytesPerSecond()), - source_callback_(nullptr), + : source_callback_(nullptr), input_samples_per_second_(input_params.sample_rate()), audio_converter_(input_params, output_params, false), error_occurred_(false),
diff --git a/media/audio/audio_sync_reader_unittest.cc b/media/audio/audio_sync_reader_unittest.cc index 14101691..ed73ab9 100644 --- a/media/audio/audio_sync_reader_unittest.cc +++ b/media/audio/audio_sync_reader_unittest.cc
@@ -53,11 +53,9 @@ TEST_P(AudioSyncReaderBitstreamTest, BitstreamBufferOverflow_DoesNotWriteOOB) { const int kSampleRate = 44100; - const int kBitsPerSample = 32; const int kFramesPerBuffer = 1; AudioParameters params(AudioParameters::AUDIO_BITSTREAM_AC3, - CHANNEL_LAYOUT_STEREO, kSampleRate, kBitsPerSample, - kFramesPerBuffer); + CHANNEL_LAYOUT_STEREO, kSampleRate, kFramesPerBuffer); auto socket = std::make_unique<base::CancelableSyncSocket>(); std::unique_ptr<AudioBus> output_bus = AudioBus::Create(params);
diff --git a/media/audio/audio_system_test_util.h b/media/audio/audio_system_test_util.h index 65a62726..22201531 100644 --- a/media/audio/audio_system_test_util.h +++ b/media/audio/audio_system_test_util.h
@@ -99,15 +99,15 @@ T::SetUp(); input_params_ = AudioParameters(AudioParameters::AUDIO_PCM_LINEAR, CHANNEL_LAYOUT_MONO, - AudioParameters::kTelephoneSampleRate, 16, + AudioParameters::kTelephoneSampleRate, AudioParameters::kTelephoneSampleRate / 10); output_params_ = AudioParameters(AudioParameters::AUDIO_PCM_LINEAR, CHANNEL_LAYOUT_MONO, - AudioParameters::kTelephoneSampleRate, 16, + AudioParameters::kTelephoneSampleRate, AudioParameters::kTelephoneSampleRate / 20); default_output_params_ = AudioParameters(AudioParameters::AUDIO_PCM_LINEAR, CHANNEL_LAYOUT_MONO, - AudioParameters::kTelephoneSampleRate, 16, + AudioParameters::kTelephoneSampleRate, AudioParameters::kTelephoneSampleRate / 30); audio_manager()->SetInputStreamParameters(input_params_); audio_manager()->SetOutputStreamParameters(output_params_);
diff --git a/media/audio/cras/audio_manager_cras.cc b/media/audio/cras/audio_manager_cras.cc index a4794c44..be5235270 100644 --- a/media/audio/cras/audio_manager_cras.cc +++ b/media/audio/cras/audio_manager_cras.cc
@@ -179,7 +179,7 @@ // TODO(hshi): Fine-tune audio parameters based on |device_id|. The optimal // parameters for the loopback stream may differ from the default. AudioParameters params(AudioParameters::AUDIO_PCM_LOW_LATENCY, - CHANNEL_LAYOUT_STEREO, kDefaultSampleRate, 16, + CHANNEL_LAYOUT_STEREO, kDefaultSampleRate, buffer_size); chromeos::AudioDeviceList devices; GetAudioDevices(&devices); @@ -316,10 +316,8 @@ ChannelLayout channel_layout = CHANNEL_LAYOUT_STEREO; int sample_rate = kDefaultSampleRate; int buffer_size = GetDefaultOutputBufferSizePerBoard(); - int bits_per_sample = 16; if (input_params.IsValid()) { sample_rate = input_params.sample_rate(); - bits_per_sample = input_params.bits_per_sample(); channel_layout = input_params.channel_layout(); buffer_size = std::min(static_cast<int>(limits::kMaxAudioBufferSize), @@ -332,7 +330,7 @@ buffer_size = user_buffer_size; return AudioParameters(AudioParameters::AUDIO_PCM_LOW_LATENCY, channel_layout, - sample_rate, bits_per_sample, buffer_size); + sample_rate, buffer_size); } AudioOutputStream* AudioManagerCras::MakeOutputStream( @@ -346,21 +344,6 @@ return new CrasInputStream(params, this, device_id); } -snd_pcm_format_t AudioManagerCras::BitsToFormat(int bits_per_sample) { - switch (bits_per_sample) { - case 8: - return SND_PCM_FORMAT_U8; - case 16: - return SND_PCM_FORMAT_S16; - case 24: - return SND_PCM_FORMAT_S24; - case 32: - return SND_PCM_FORMAT_S32; - default: - return SND_PCM_FORMAT_UNKNOWN; - } -} - bool AudioManagerCras::IsDefault(const std::string& device_id, bool is_input) { AudioDeviceNames device_names; GetAudioDeviceNamesImpl(is_input, &device_names);
diff --git a/media/audio/cras/audio_manager_cras.h b/media/audio/cras/audio_manager_cras.h index c3215ed..2bce9b0 100644 --- a/media/audio/cras/audio_manager_cras.h +++ b/media/audio/cras/audio_manager_cras.h
@@ -58,8 +58,6 @@ const std::string& device_id, const LogCallback& log_callback) override; - static snd_pcm_format_t BitsToFormat(int bits_per_sample); - // Checks if |device_id| corresponds to the default device. // Set |is_input| to true for capture devices, false for output. bool IsDefault(const std::string& device_id, bool is_input);
diff --git a/media/audio/cras/cras_input.cc b/media/audio/cras/cras_input.cc index d13facf5..d78743f1 100644 --- a/media/audio/cras/cras_input.cc +++ b/media/audio/cras/cras_input.cc
@@ -62,13 +62,6 @@ return false; } - snd_pcm_format_t pcm_format = - AudioManagerCras::BitsToFormat(params_.bits_per_sample()); - if (pcm_format == SND_PCM_FORMAT_UNKNOWN) { - DLOG(WARNING) << "Unsupported bits/sample: " << params_.bits_per_sample(); - return false; - } - // Create the client and connect to the CRAS server. if (cras_client_create(&client_) < 0) { DLOG(WARNING) << "Couldn't create CRAS client.\n"; @@ -161,9 +154,7 @@ // Prepare |audio_format| and |stream_params| for the stream we // will create. cras_audio_format* audio_format = cras_audio_format_create( - AudioManagerCras::BitsToFormat(params_.bits_per_sample()), - params_.sample_rate(), - params_.channels()); + SND_PCM_FORMAT_S16, params_.sample_rate(), params_.channels()); if (!audio_format) { DLOG(WARNING) << "Error setting up audio parameters."; callback_->OnError(); @@ -300,8 +291,8 @@ DCHECK_EQ(base::TimeTicks::GetClock(), base::TimeTicks::Clock::LINUX_CLOCK_MONOTONIC); - audio_bus_->FromInterleaved(buffer, audio_bus_->frames(), - params_.bits_per_sample() / 8); + audio_bus_->FromInterleaved<SignedInt16SampleTypeTraits>( + reinterpret_cast<int16_t*>(buffer), audio_bus_->frames()); callback_->OnData(audio_bus_.get(), capture_time, normalized_volume); }
diff --git a/media/audio/cras/cras_input_unittest.cc b/media/audio/cras/cras_input_unittest.cc index 8b1db70db..acaa675 100644 --- a/media/audio/cras/cras_input_unittest.cc +++ b/media/audio/cras/cras_input_unittest.cc
@@ -90,7 +90,6 @@ AudioParameters params(kTestFormat, layout, kTestSampleRate, - kTestBitsPerSample, samples_per_packet); return new CrasInputStream(params, mock_manager_.get(), device_id); } @@ -121,7 +120,6 @@ test_stream->Close(); } - static const unsigned int kTestBitsPerSample; static const unsigned int kTestCaptureDurationMs; static const ChannelLayout kTestChannelLayout; static const AudioParameters::Format kTestFormat; @@ -135,7 +133,6 @@ DISALLOW_COPY_AND_ASSIGN(CrasInputStreamTest); }; -const unsigned int CrasInputStreamTest::kTestBitsPerSample = 16; const unsigned int CrasInputStreamTest::kTestCaptureDurationMs = 250; const ChannelLayout CrasInputStreamTest::kTestChannelLayout = CHANNEL_LAYOUT_STEREO; @@ -156,24 +153,10 @@ test_stream->Close(); } -TEST_F(CrasInputStreamTest, BadBitsPerSample) { - AudioParameters bad_bps_params(kTestFormat, - kTestChannelLayout, - kTestSampleRate, - kTestBitsPerSample - 1, - kTestFramesPerPacket); - CrasInputStream* test_stream = - new CrasInputStream(bad_bps_params, mock_manager_.get(), - AudioDeviceDescription::kDefaultDeviceId); - EXPECT_FALSE(test_stream->Open()); - test_stream->Close(); -} - TEST_F(CrasInputStreamTest, BadSampleRate) { AudioParameters bad_rate_params(kTestFormat, kTestChannelLayout, 0, - kTestBitsPerSample, kTestFramesPerPacket); CrasInputStream* test_stream = new CrasInputStream(bad_rate_params, mock_manager_.get(), @@ -208,7 +191,6 @@ AudioParameters params_mono(kTestFormat, CHANNEL_LAYOUT_MONO, rates[i], - kTestBitsPerSample, kTestFramesPerPacket); CaptureSomeFrames(params_mono, kTestCaptureDurationMs); } @@ -218,7 +200,6 @@ AudioParameters params_stereo(kTestFormat, CHANNEL_LAYOUT_STEREO, rates[i], - kTestBitsPerSample, kTestFramesPerPacket); CaptureSomeFrames(params_stereo, kTestCaptureDurationMs); }
diff --git a/media/audio/cras/cras_unified.cc b/media/audio/cras/cras_unified.cc index e829561..9687e63 100644 --- a/media/audio/cras/cras_unified.cc +++ b/media/audio/cras/cras_unified.cc
@@ -94,12 +94,6 @@ return false; } - if (AudioManagerCras::BitsToFormat(params_.bits_per_sample()) == - SND_PCM_FORMAT_UNKNOWN) { - LOG(WARNING) << "Unsupported pcm format"; - return false; - } - // Create the client and connect to the CRAS server. if (cras_client_create(&client_)) { LOG(WARNING) << "Couldn't create CRAS client.\n"; @@ -165,9 +159,7 @@ // Prepare |audio_format| and |stream_params| for the stream we // will create. cras_audio_format* audio_format = cras_audio_format_create( - AudioManagerCras::BitsToFormat(params_.bits_per_sample()), - params_.sample_rate(), - params_.channels()); + SND_PCM_FORMAT_S16, params_.sample_rate(), params_.channels()); if (!audio_format) { LOG(WARNING) << "Error setting up audio parameters."; callback->OnError(); @@ -315,8 +307,8 @@ // Note: If this ever changes to output raw float the data must be clipped and // sanitized since it may come from an untrusted source such as NaCl. - output_bus_->ToInterleaved( - frames_filled, bytes_per_frame_ / params_.channels(), buffer); + output_bus_->ToInterleaved<SignedInt16SampleTypeTraits>( + frames_filled, reinterpret_cast<int16_t*>(buffer)); return frames_filled; }
diff --git a/media/audio/cras/cras_unified_unittest.cc b/media/audio/cras/cras_unified_unittest.cc index b47b469..486550c8 100644 --- a/media/audio/cras/cras_unified_unittest.cc +++ b/media/audio/cras/cras_unified_unittest.cc
@@ -77,7 +77,7 @@ CrasUnifiedStream* CreateStream(ChannelLayout layout, int32_t samples_per_packet) { AudioParameters params(kTestFormat, layout, kTestSampleRate, - kTestBitsPerSample, samples_per_packet); + samples_per_packet); return new CrasUnifiedStream(params, mock_manager_.get(), AudioDeviceDescription::kDefaultDeviceId); } @@ -88,7 +88,6 @@ static const ChannelLayout kTestChannelLayout; static const int kTestSampleRate; - static const int kTestBitsPerSample; static const AudioParameters::Format kTestFormat; static const uint32_t kTestFramesPerPacket; @@ -103,7 +102,6 @@ CHANNEL_LAYOUT_STEREO; const int CrasUnifiedStreamTest::kTestSampleRate = AudioParameters::kAudioCDSampleRate; -const int CrasUnifiedStreamTest::kTestBitsPerSample = 16; const AudioParameters::Format CrasUnifiedStreamTest::kTestFormat = AudioParameters::AUDIO_PCM_LINEAR; const uint32_t CrasUnifiedStreamTest::kTestFramesPerPacket = 1000; @@ -123,18 +121,9 @@ EXPECT_TRUE(test_stream->Open()); test_stream->Close(); - // Bad bits per sample. - AudioParameters bad_bps_params(kTestFormat, kTestChannelLayout, - kTestSampleRate, kTestBitsPerSample - 1, - kTestFramesPerPacket); - test_stream = new CrasUnifiedStream(bad_bps_params, mock_manager_.get(), - AudioDeviceDescription::kDefaultDeviceId); - EXPECT_FALSE(test_stream->Open()); - test_stream->Close(); - // Bad sample rate. - AudioParameters bad_rate_params(kTestFormat, kTestChannelLayout, - 0, kTestBitsPerSample, kTestFramesPerPacket); + AudioParameters bad_rate_params(kTestFormat, kTestChannelLayout, 0, + kTestFramesPerPacket); test_stream = new CrasUnifiedStream(bad_rate_params, mock_manager_.get(), AudioDeviceDescription::kDefaultDeviceId); EXPECT_FALSE(test_stream->Open());
diff --git a/media/audio/fake_audio_manager.cc b/media/audio/fake_audio_manager.cc index 7460a012..cc6ea93 100644 --- a/media/audio/fake_audio_manager.cc +++ b/media/audio/fake_audio_manager.cc
@@ -67,23 +67,21 @@ ChannelLayout channel_layout = CHANNEL_LAYOUT_STEREO; int sample_rate = kDefaultSampleRate; int buffer_size = kDefaultOutputBufferSize; - int bits_per_sample = 16; if (input_params.IsValid()) { sample_rate = input_params.sample_rate(); - bits_per_sample = input_params.bits_per_sample(); channel_layout = input_params.channel_layout(); buffer_size = std::min(input_params.frames_per_buffer(), buffer_size); } return AudioParameters(AudioParameters::AUDIO_PCM_LOW_LATENCY, channel_layout, - sample_rate, bits_per_sample, buffer_size); + sample_rate, buffer_size); } AudioParameters FakeAudioManager::GetInputStreamParameters( const std::string& device_id) { - return AudioParameters( - AudioParameters::AUDIO_PCM_LOW_LATENCY, CHANNEL_LAYOUT_STEREO, - kDefaultSampleRate, 16, kDefaultInputBufferSize); + return AudioParameters(AudioParameters::AUDIO_PCM_LOW_LATENCY, + CHANNEL_LAYOUT_STEREO, kDefaultSampleRate, + kDefaultInputBufferSize); } } // namespace media
diff --git a/media/audio/fuchsia/audio_manager_fuchsia.cc b/media/audio/fuchsia/audio_manager_fuchsia.cc index 05b9f8dd..45d7ed0 100644 --- a/media/audio/fuchsia/audio_manager_fuchsia.cc +++ b/media/audio/fuchsia/audio_manager_fuchsia.cc
@@ -103,7 +103,7 @@ return AudioParameters(AudioParameters::AUDIO_PCM_LOW_LATENCY, GuessChannelLayout(device_params.num_channels), - sample_rate, 24, device_params.buffer_size); + sample_rate, device_params.buffer_size); } const char* AudioManagerFuchsia::GetName() {
diff --git a/media/audio/mac/audio_input_mac.cc b/media/audio/mac/audio_input_mac.cc index b7b341e..6b3fb2c 100644 --- a/media/audio/mac/audio_input_mac.cc +++ b/media/audio/mac/audio_input_mac.cc
@@ -38,21 +38,24 @@ audio_bus_(media::AudioBus::Create(params)) { // We must have a manager. DCHECK(manager_); + + const SampleFormat kSampleFormat = kSampleFormatS16; + // A frame is one sample across all channels. In interleaved audio the per // frame fields identify the set of n |channels|. In uncompressed audio, a // packet is always one frame. format_.mSampleRate = params.sample_rate(); format_.mFormatID = kAudioFormatLinearPCM; - format_.mFormatFlags = kLinearPCMFormatFlagIsPacked | - kLinearPCMFormatFlagIsSignedInteger; - format_.mBitsPerChannel = params.bits_per_sample(); + format_.mFormatFlags = + kLinearPCMFormatFlagIsPacked | kLinearPCMFormatFlagIsSignedInteger; + format_.mBitsPerChannel = SampleFormatToBitsPerChannel(kSampleFormat); format_.mChannelsPerFrame = params.channels(); format_.mFramesPerPacket = 1; - format_.mBytesPerPacket = (params.bits_per_sample() * params.channels()) / 8; - format_.mBytesPerFrame = format_.mBytesPerPacket; + format_.mBytesPerPacket = format_.mBytesPerFrame = + params.GetBytesPerFrame(kSampleFormat); format_.mReserved = 0; - buffer_size_bytes_ = params.GetBytesPerBuffer(); + buffer_size_bytes_ = params.GetBytesPerBuffer(kSampleFormat); } PCMQueueInAudioInputStream::~PCMQueueInAudioInputStream() { @@ -272,8 +275,9 @@ : base::TimeTicks::Now(); uint8_t* audio_data = reinterpret_cast<uint8_t*>(audio_buffer->mAudioData); - audio_bus_->FromInterleaved(audio_data, audio_bus_->frames(), - format_.mBitsPerChannel / 8); + DCHECK_EQ(format_.mBitsPerChannel, 16u); + audio_bus_->FromInterleaved<SignedInt16SampleTypeTraits>( + reinterpret_cast<int16_t*>(audio_data), audio_bus_->frames()); callback_->OnData(audio_bus_.get(), capture_time, 0.0); last_fill_ = base::TimeTicks::Now();
diff --git a/media/audio/mac/audio_low_latency_input_mac.cc b/media/audio/mac/audio_low_latency_input_mac.cc index 173167b..31997a9 100644 --- a/media/audio/mac/audio_low_latency_input_mac.cc +++ b/media/audio/mac/audio_low_latency_input_mac.cc
@@ -197,18 +197,19 @@ DCHECK(input_params.channels() == 1 || input_params.channels() == 2); } + const SampleFormat kSampleFormat = kSampleFormatS16; + // Set up the desired (output) format specified by the client. format_.mSampleRate = input_params.sample_rate(); format_.mFormatID = kAudioFormatLinearPCM; format_.mFormatFlags = kLinearPCMFormatFlagIsPacked | kLinearPCMFormatFlagIsSignedInteger; DCHECK(FormatIsInterleaved(format_.mFormatFlags)); - format_.mBitsPerChannel = input_params.bits_per_sample(); + format_.mBitsPerChannel = SampleFormatToBitsPerChannel(kSampleFormat); format_.mChannelsPerFrame = input_params.channels(); format_.mFramesPerPacket = 1; // uncompressed audio - format_.mBytesPerPacket = - (format_.mBitsPerChannel * input_params.channels()) / 8; - format_.mBytesPerFrame = format_.mBytesPerPacket; + format_.mBytesPerPacket = format_.mBytesPerFrame = + input_params.GetBytesPerFrame(kSampleFormat); format_.mReserved = 0; DVLOG(1) << "ctor";
diff --git a/media/audio/mac/audio_low_latency_input_mac_unittest.cc b/media/audio/mac/audio_low_latency_input_mac_unittest.cc index 8e3348eb..2deeb87 100644 --- a/media/audio/mac/audio_low_latency_input_mac_unittest.cc +++ b/media/audio/mac/audio_low_latency_input_mac_unittest.cc
@@ -133,7 +133,7 @@ int samples_per_packet = fs / 100; AudioInputStream* ais = audio_manager_->MakeAudioInputStream( AudioParameters(AudioParameters::AUDIO_PCM_LOW_LATENCY, - CHANNEL_LAYOUT_STEREO, fs, 16, samples_per_packet), + CHANNEL_LAYOUT_STEREO, fs, samples_per_packet), AudioDeviceDescription::kDefaultDeviceId, base::Bind(&MacAudioInputTest::OnLogMessage, base::Unretained(this))); EXPECT_TRUE(ais); @@ -147,7 +147,7 @@ int samples_per_packet = fs / 100; AudioInputStream* ais = audio_manager_->MakeAudioInputStream( AudioParameters(AudioParameters::AUDIO_PCM_LOW_LATENCY, channel_layout, - fs, 16, samples_per_packet), + fs, samples_per_packet), AudioDeviceDescription::kDefaultDeviceId, base::Bind(&MacAudioInputTest::OnLogMessage, base::Unretained(this))); EXPECT_TRUE(ais);
diff --git a/media/audio/mac/audio_manager_mac.cc b/media/audio/mac/audio_manager_mac.cc index c46b9dd..2527a20cb 100644 --- a/media/audio/mac/audio_manager_mac.cc +++ b/media/audio/mac/audio_manager_mac.cc
@@ -614,7 +614,7 @@ if (device == kAudioObjectUnknown) { DLOG(ERROR) << "Invalid device " << device_id; return AudioParameters(AudioParameters::AUDIO_PCM_LOW_LATENCY, - CHANNEL_LAYOUT_STEREO, kFallbackSampleRate, 16, + CHANNEL_LAYOUT_STEREO, kFallbackSampleRate, ChooseBufferSize(true, kFallbackSampleRate)); } @@ -638,7 +638,7 @@ // TODO(grunell): query the native channel layout for the specific device. AudioParameters params(AudioParameters::AUDIO_PCM_LOW_LATENCY, channel_layout, - sample_rate, 16, buffer_size); + sample_rate, buffer_size); if (DeviceSupportsAmbientNoiseReduction(device)) { params.set_effects(AudioParameters::NOISE_SUPPRESSION); @@ -827,9 +827,11 @@ const AudioDeviceID device = GetAudioDeviceIdByUId(false, output_device_id); if (device == kAudioObjectUnknown) { DLOG(ERROR) << "Invalid output device " << output_device_id; - return input_params.IsValid() ? input_params : AudioParameters( - AudioParameters::AUDIO_PCM_LOW_LATENCY, CHANNEL_LAYOUT_STEREO, - kFallbackSampleRate, 16, ChooseBufferSize(false, kFallbackSampleRate)); + return input_params.IsValid() + ? input_params + : AudioParameters(AudioParameters::AUDIO_PCM_LOW_LATENCY, + CHANNEL_LAYOUT_STEREO, kFallbackSampleRate, + ChooseBufferSize(false, kFallbackSampleRate)); } const bool has_valid_input_params = input_params.IsValid(); @@ -868,7 +870,7 @@ } AudioParameters params(AudioParameters::AUDIO_PCM_LOW_LATENCY, channel_layout, - hardware_sample_rate, 16, buffer_size); + hardware_sample_rate, buffer_size); params.set_channels_for_discrete(output_channels); return params; }
diff --git a/media/audio/pulse/audio_manager_pulse.cc b/media/audio/pulse/audio_manager_pulse.cc index c14078b..fc0ec5d 100644 --- a/media/audio/pulse/audio_manager_pulse.cc +++ b/media/audio/pulse/audio_manager_pulse.cc
@@ -108,7 +108,7 @@ // TODO(xians): add support for querying native channel layout for pulse. UpdateNativeAudioHardwareInfo(); return AudioParameters(AudioParameters::AUDIO_PCM_LOW_LATENCY, - CHANNEL_LAYOUT_STEREO, native_input_sample_rate_, 16, + CHANNEL_LAYOUT_STEREO, native_input_sample_rate_, buffer_size); } @@ -156,7 +156,6 @@ VLOG_IF(0, !output_device_id.empty()) << "Not implemented!"; int buffer_size = kMinimumOutputBufferSize; - int bits_per_sample = 16; // Query native parameters where applicable; Pulse does not require these to // be respected though, so prefer the input parameters for channel count. @@ -165,8 +164,6 @@ ChannelLayout channel_layout = GuessChannelLayout(native_channel_count_); if (input_params.IsValid()) { - bits_per_sample = input_params.bits_per_sample(); - // Use the system's output channel count for the DISCRETE layout. This is to // avoid a crash due to the lack of support on the multi-channel beyond 8 in // the PulseAudio layer. @@ -183,7 +180,7 @@ buffer_size = user_buffer_size; return AudioParameters(AudioParameters::AUDIO_PCM_LOW_LATENCY, channel_layout, - sample_rate, bits_per_sample, buffer_size); + sample_rate, buffer_size); } AudioOutputStream* AudioManagerPulse::MakeOutputStream(
diff --git a/media/audio/pulse/pulse_input.cc b/media/audio/pulse/pulse_input.cc index 3a0aa4d..f16365f 100644 --- a/media/audio/pulse/pulse_input.cc +++ b/media/audio/pulse/pulse_input.cc
@@ -295,17 +295,20 @@ if (!data || length == 0) break; - const int number_of_frames = length / params_.GetBytesPerFrame(); + const int number_of_frames = + length / params_.GetBytesPerFrame(pulse::kInputSampleFormat); if (number_of_frames > fifo_.GetUnfilledFrames()) { // Dynamically increase capacity to the FIFO to handle larger buffer got // from Pulse. - const int increase_blocks_of_buffer = static_cast<int>( - (number_of_frames - fifo_.GetUnfilledFrames()) / - params_.frames_per_buffer()) + 1; + const int increase_blocks_of_buffer = + static_cast<int>((number_of_frames - fifo_.GetUnfilledFrames()) / + params_.frames_per_buffer()) + + 1; fifo_.IncreaseCapacity(increase_blocks_of_buffer); } - fifo_.Push(data, number_of_frames, params_.bits_per_sample() / 8); + fifo_.Push(data, number_of_frames, + SampleFormatToBytesPerChannel(pulse::kInputSampleFormat)); // Checks if we still have data. pa_stream_drop(handle_);
diff --git a/media/audio/pulse/pulse_output.cc b/media/audio/pulse/pulse_output.cc index a6ff39c..ca1181d 100644 --- a/media/audio/pulse/pulse_output.cc +++ b/media/audio/pulse/pulse_output.cc
@@ -47,10 +47,6 @@ : params_(AudioParameters(params.format(), params.channel_layout(), params.sample_rate(), - // Ignore the given bits per sample. We - // want 32 because we're outputting - // floats. - 32, params.frames_per_buffer())), device_id_(device_id), manager_(manager), @@ -58,7 +54,8 @@ pa_mainloop_(NULL), pa_stream_(NULL), volume_(1.0f), - source_callback_(NULL) { + source_callback_(NULL), + buffer_size_(params_.GetBytesPerBuffer(kSampleFormatF32)) { CHECK(params_.IsValid()); audio_bus_ = AudioBus::Create(params_); } @@ -131,7 +128,7 @@ int bytes_remaining = requested_bytes; while (bytes_remaining > 0) { void* pa_buffer = nullptr; - size_t pa_buffer_size = params_.GetBytesPerBuffer(); + size_t pa_buffer_size = buffer_size_; CHECK_GE(pa_stream_begin_write(pa_stream_, &pa_buffer, &pa_buffer_size), 0); if (!source_callback_) { @@ -155,7 +152,7 @@ audio_bus_->Scale(volume_); - size_t frame_size = params_.GetBytesPerBuffer() / unwritten_frames_in_bus; + size_t frame_size = buffer_size_ / unwritten_frames_in_bus; size_t frames_to_copy = pa_buffer_size / frame_size; size_t frame_offset_in_bus = 0; do {
diff --git a/media/audio/pulse/pulse_output.h b/media/audio/pulse/pulse_output.h index 8e86b04..3a7b3fe 100644 --- a/media/audio/pulse/pulse_output.h +++ b/media/audio/pulse/pulse_output.h
@@ -93,6 +93,8 @@ // Container for retrieving data from AudioSourceCallback::OnMoreData(). std::unique_ptr<AudioBus> audio_bus_; + const size_t buffer_size_; + base::ThreadChecker thread_checker_; DISALLOW_COPY_AND_ASSIGN(PulseAudioOutputStream);
diff --git a/media/audio/pulse/pulse_util.cc b/media/audio/pulse/pulse_util.cc index 8d7d5f3..372e73d 100644 --- a/media/audio/pulse/pulse_util.cc +++ b/media/audio/pulse/pulse_util.cc
@@ -11,7 +11,6 @@ #include "base/macros.h" #include "base/memory/ptr_util.h" #include "media/audio/audio_device_description.h" -#include "media/base/audio_parameters.h" #include "media/base/audio_timestamp_helper.h" #if defined(DLOPEN_PULSEAUDIO) @@ -193,22 +192,6 @@ pa_threaded_mainloop_signal(pa_mainloop, 0); } -pa_sample_format_t BitsToPASampleFormat(int bits_per_sample) { - switch (bits_per_sample) { - case 8: - return PA_SAMPLE_U8; - case 16: - return PA_SAMPLE_S16LE; - case 24: - return PA_SAMPLE_S24LE; - case 32: - return PA_SAMPLE_S32LE; - default: - NOTREACHED() << "Invalid bits per sample: " << bits_per_sample; - return PA_SAMPLE_INVALID; - } -} - pa_channel_map ChannelLayoutToPAChannelMap(ChannelLayout channel_layout) { pa_channel_map channel_map; if (channel_layout == CHANNEL_LAYOUT_MONO) { @@ -279,8 +262,12 @@ // Set sample specifications. pa_sample_spec sample_specifications; - sample_specifications.format = BitsToPASampleFormat( - params.bits_per_sample()); + + // FIXME: This should be PA_SAMPLE_FLOAT32, but there is more work needed in + // PulseAudioInputStream to support this. + static_assert(kInputSampleFormat == kSampleFormatS16, + "Only 16-bit input supported."); + sample_specifications.format = PA_SAMPLE_S16LE; sample_specifications.rate = params.sample_rate(); sample_specifications.channels = params.channels(); @@ -306,7 +293,7 @@ // values should be chosen can be found at // freedesktop.org/software/pulseaudio/doxygen/structpa__buffer__attr.html. pa_buffer_attr buffer_attributes; - const unsigned int buffer_size = params.GetBytesPerBuffer(); + const unsigned int buffer_size = params.GetBytesPerBuffer(kInputSampleFormat); buffer_attributes.maxlength = static_cast<uint32_t>(-1); buffer_attributes.tlength = buffer_size; buffer_attributes.minreq = buffer_size; @@ -424,11 +411,12 @@ // Setting |minreq| to the exact buffer size leads to more callbacks than // necessary, so we've clipped it to half the buffer size. Regardless of the // requested amount, we'll always fill |params.GetBytesPerBuffer()| though. + size_t buffer_size = params.GetBytesPerBuffer(kSampleFormatF32); pa_buffer_attr pa_buffer_attributes; pa_buffer_attributes.maxlength = static_cast<uint32_t>(-1); - pa_buffer_attributes.minreq = params.GetBytesPerBuffer() / 2; + pa_buffer_attributes.minreq = buffer_size / 2; pa_buffer_attributes.prebuf = static_cast<uint32_t>(-1); - pa_buffer_attributes.tlength = params.GetBytesPerBuffer() * 3; + pa_buffer_attributes.tlength = buffer_size * 3; pa_buffer_attributes.fragsize = static_cast<uint32_t>(-1); // Connect playback stream. Like pa_buffer_attr, the pa_stream_flags have a
diff --git a/media/audio/pulse/pulse_util.h b/media/audio/pulse/pulse_util.h index 2edb432..678fc82d 100644 --- a/media/audio/pulse/pulse_util.h +++ b/media/audio/pulse/pulse_util.h
@@ -12,6 +12,7 @@ #include "base/macros.h" #include "base/time/time.h" #include "media/audio/audio_device_name.h" +#include "media/base/audio_parameters.h" #include "media/base/channel_layout.h" namespace media { @@ -45,8 +46,6 @@ void StreamSuccessCallback(pa_stream* s, int error, void* mainloop); void ContextStateCallback(pa_context* context, void* mainloop); -pa_sample_format_t BitsToPASampleFormat(int bits_per_sample); - pa_channel_map ChannelLayoutToPAChannelMap(ChannelLayout channel_layout); void WaitForOperationCompletion(pa_threaded_mainloop* mainloop, @@ -54,6 +53,8 @@ base::TimeDelta GetHardwareLatency(pa_stream* stream); +constexpr SampleFormat kInputSampleFormat = kSampleFormatS16; + // Create a recording stream for the threaded mainloop, return true if success, // otherwise false. |mainloop| and |context| have to be from a valid Pulse // threaded mainloop and the handle of the created stream will be returned by
diff --git a/media/audio/simple_sources.cc b/media/audio/simple_sources.cc index ca9bf98b..1eebf239 100644 --- a/media/audio/simple_sources.cc +++ b/media/audio/simple_sources.cc
@@ -193,8 +193,7 @@ AudioParameters file_audio_slice( AudioParameters::AUDIO_PCM_LOW_LATENCY, GuessChannelLayout(wav_audio_handler_->num_channels()), - wav_audio_handler_->sample_rate(), wav_audio_handler_->bits_per_sample(), - params_.frames_per_buffer()); + wav_audio_handler_->sample_rate(), params_.frames_per_buffer()); file_audio_converter_.reset( new AudioConverter(file_audio_slice, params_, false)); @@ -244,14 +243,13 @@ void FileSource::OnError() {} BeepingSource::BeepingSource(const AudioParameters& params) - : buffer_size_(params.GetBytesPerBuffer()), + : buffer_size_(params.GetBytesPerBuffer(kSampleFormatU8)), buffer_(new uint8_t[buffer_size_]), params_(params), last_callback_time_(base::TimeTicks::Now()), beep_duration_in_buffers_(kBeepDurationMilliseconds * params.sample_rate() / - params.frames_per_buffer() / - 1000), + params.frames_per_buffer() / 1000), beep_generated_in_buffers_(0), beep_period_in_frames_(params.sample_rate() / kBeepFrequency) {} @@ -283,10 +281,9 @@ // generate a beep sound. if (should_beep || beep_generated_in_buffers_) { // Compute the number of frames to output high value. Then compute the - // number of bytes based on channels and bits per channel. + // number of bytes based on channels. int high_frames = beep_period_in_frames_ / 2; - int high_bytes = high_frames * params_.bits_per_sample() * - params_.channels() / 8; + int high_bytes = high_frames * params_.channels(); // Separate high and low with the same number of bytes to generate a // square wave. @@ -304,8 +301,8 @@ } last_callback_time_ = base::TimeTicks::Now(); - dest->FromInterleaved(buffer_.get(), dest->frames(), - params_.bits_per_sample() / 8); + dest->FromInterleaved<UnsignedInt8SampleTypeTraits>(buffer_.get(), + dest->frames()); return dest->frames(); }
diff --git a/media/audio/simple_sources_unittest.cc b/media/audio/simple_sources_unittest.cc index bd7ce42e..0bab509 100644 --- a/media/audio/simple_sources_unittest.cc +++ b/media/audio/simple_sources_unittest.cc
@@ -23,12 +23,10 @@ // Validate that the SineWaveAudioSource writes the expected values. TEST(SimpleSources, SineWaveAudioSource) { static const uint32_t samples = 1024; - static const uint32_t bytes_per_sample = 2; static const int freq = 200; - AudioParameters params( - AudioParameters::AUDIO_PCM_LINEAR, CHANNEL_LAYOUT_MONO, - AudioParameters::kTelephoneSampleRate, bytes_per_sample * 8, samples); + AudioParameters params(AudioParameters::AUDIO_PCM_LINEAR, CHANNEL_LAYOUT_MONO, + AudioParameters::kTelephoneSampleRate, samples); SineWaveAudioSource source(1, freq, params.sample_rate()); std::unique_ptr<AudioBus> audio_bus = AudioBus::Create(params); @@ -125,7 +123,7 @@ // Create AudioParameters which match those in the WAV data. AudioParameters params(AudioParameters::AUDIO_PCM_LINEAR, - CHANNEL_LAYOUT_STEREO, 48000, 16, kNumFrames); + CHANNEL_LAYOUT_STEREO, 48000, kNumFrames); std::unique_ptr<AudioBus> audio_bus = AudioBus::Create(2, kNumFrames); audio_bus->Zero(); @@ -163,7 +161,7 @@ // Create AudioParameters which match those in the WAV data. AudioParameters params(AudioParameters::AUDIO_PCM_LINEAR, - CHANNEL_LAYOUT_STEREO, 48000, 16, kNumFrames); + CHANNEL_LAYOUT_STEREO, 48000, kNumFrames); std::unique_ptr<AudioBus> audio_bus = AudioBus::Create(2, kNumFrames); audio_bus->Zero(); @@ -182,7 +180,7 @@ TEST(SimpleSources, BadFilePathFails) { AudioParameters params(AudioParameters::AUDIO_PCM_LINEAR, - CHANNEL_LAYOUT_STEREO, 48000, 16, 10); + CHANNEL_LAYOUT_STEREO, 48000, 10); std::unique_ptr<AudioBus> audio_bus = AudioBus::Create(2, 10); audio_bus->Zero(); @@ -222,7 +220,7 @@ // Create AudioParameters which match those in the WAV data. AudioParameters params(AudioParameters::AUDIO_PCM_LINEAR, - CHANNEL_LAYOUT_STEREO, 48000, 16, kNumFrames); + CHANNEL_LAYOUT_STEREO, 48000, kNumFrames); std::unique_ptr<AudioBus> audio_bus = AudioBus::Create(2, kNumFrames); audio_bus->Zero();
diff --git a/media/audio/sounds/audio_stream_handler.cc b/media/audio/sounds/audio_stream_handler.cc index fd42e86..90ff6a0 100644 --- a/media/audio/sounds/audio_stream_handler.cc +++ b/media/audio/sounds/audio_stream_handler.cc
@@ -62,8 +62,7 @@ const AudioParameters params( AudioParameters::AUDIO_PCM_LOW_LATENCY, GuessChannelLayout(wav_audio_->num_channels()), - wav_audio_->sample_rate(), wav_audio_->bits_per_sample(), - kDefaultFrameCount); + wav_audio_->sample_rate(), kDefaultFrameCount); stream_ = audio_manager_->MakeAudioOutputStreamProxy(params, std::string()); if (!stream_ || !stream_->Open()) { @@ -182,10 +181,9 @@ return; } - const AudioParameters params( - AudioParameters::AUDIO_PCM_LOW_LATENCY, - GuessChannelLayout(wav_audio->num_channels()), wav_audio->sample_rate(), - wav_audio->bits_per_sample(), kDefaultFrameCount); + const AudioParameters params(AudioParameters::AUDIO_PCM_LOW_LATENCY, + GuessChannelLayout(wav_audio->num_channels()), + wav_audio->sample_rate(), kDefaultFrameCount); if (!params.IsValid()) { LOG(ERROR) << "Audio params are invalid."; return;
diff --git a/media/audio/virtual_audio_input_stream_unittest.cc b/media/audio/virtual_audio_input_stream_unittest.cc index 004870c..63d3fc6 100644 --- a/media/audio/virtual_audio_input_stream_unittest.cc +++ b/media/audio/virtual_audio_input_stream_unittest.cc
@@ -29,8 +29,10 @@ namespace { -const AudioParameters kParams( - AudioParameters::AUDIO_PCM_LOW_LATENCY, CHANNEL_LAYOUT_STEREO, 8000, 8, 10); +const AudioParameters kParams(AudioParameters::AUDIO_PCM_LOW_LATENCY, + CHANNEL_LAYOUT_STEREO, + 8000, + 10); class MockInputCallback : public AudioInputStream::AudioInputCallback { public:
diff --git a/media/audio/virtual_audio_output_stream_unittest.cc b/media/audio/virtual_audio_output_stream_unittest.cc index 11cce9c..569e238 100644 --- a/media/audio/virtual_audio_output_stream_unittest.cc +++ b/media/audio/virtual_audio_output_stream_unittest.cc
@@ -21,8 +21,10 @@ namespace media { namespace { -const AudioParameters kParams( - AudioParameters::AUDIO_PCM_LOW_LATENCY, CHANNEL_LAYOUT_MONO, 8000, 8, 128); +const AudioParameters kParams(AudioParameters::AUDIO_PCM_LOW_LATENCY, + CHANNEL_LAYOUT_MONO, + 8000, + 128); } class MockVirtualAudioInputStream : public VirtualAudioInputStream {
diff --git a/media/audio/win/audio_low_latency_input_win.cc b/media/audio/win/audio_low_latency_input_win.cc index 8c83554d..1624f2a 100644 --- a/media/audio/win/audio_low_latency_input_win.cc +++ b/media/audio/win/audio_low_latency_input_win.cc
@@ -83,11 +83,13 @@ bool avrt_init = avrt::Initialize(); DCHECK(avrt_init) << "Failed to load the Avrt.dll"; + const SampleFormat kSampleFormat = kSampleFormatS16; + // Set up the desired output format specified by the client. output_format_.wFormatTag = WAVE_FORMAT_PCM; output_format_.nChannels = params.channels(); output_format_.nSamplesPerSec = params.sample_rate(); - output_format_.wBitsPerSample = params.bits_per_sample(); + output_format_.wBitsPerSample = SampleFormatToBitsPerChannel(kSampleFormat); output_format_.nBlockAlign = (output_format_.wBitsPerSample / 8) * output_format_.nChannels; output_format_.nAvgBytesPerSec = @@ -103,8 +105,8 @@ // Store size of audio packets which we expect to get from the audio // endpoint device in each capture event. - packet_size_frames_ = params.GetBytesPerBuffer() / input_format_.nBlockAlign; - packet_size_bytes_ = params.GetBytesPerBuffer(); + packet_size_bytes_ = params.GetBytesPerBuffer(kSampleFormat); + packet_size_frames_ = packet_size_bytes_ / input_format_.nBlockAlign; DVLOG(1) << "Number of bytes per audio frame : " << frame_size_; DVLOG(1) << "Number of audio frames per packet: " << packet_size_frames_; @@ -741,12 +743,10 @@ const AudioParameters input(AudioParameters::AUDIO_PCM_LOW_LATENCY, input_layout, input_format_.nSamplesPerSec, - input_format_.wBitsPerSample, static_cast<int>(new_frames_per_buffer)); const AudioParameters output(AudioParameters::AUDIO_PCM_LOW_LATENCY, output_layout, output_format_.nSamplesPerSec, - output_format_.wBitsPerSample, packet_size_frames_); converter_.reset(new AudioConverter(input, output, false));
diff --git a/media/audio/win/audio_low_latency_input_win_unittest.cc b/media/audio/win/audio_low_latency_input_win_unittest.cc index 3a25097d..2aeaac3 100644 --- a/media/audio/win/audio_low_latency_input_win_unittest.cc +++ b/media/audio/win/audio_low_latency_input_win_unittest.cc
@@ -43,6 +43,8 @@ namespace { +constexpr SampleFormat kSampleFormat = kSampleFormatS16; + void LogCallbackDummy(const std::string& /* message */) {} } // namespace @@ -101,17 +103,14 @@ // 2 bytes per sample, 2 channels, 10ms @ 48kHz, 10 seconds <=> 1920000 bytes. static const size_t kMaxBufferSize = 2 * 2 * 480 * 100 * 10; - explicit WriteToFileAudioSink(const char* file_name, int bits_per_sample) - : bits_per_sample_(bits_per_sample), - buffer_(0, kMaxBufferSize), - bytes_to_write_(0) { + explicit WriteToFileAudioSink(const char* file_name) + : buffer_(0, kMaxBufferSize), bytes_to_write_(0) { base::FilePath file_path; EXPECT_TRUE(PathService::Get(base::DIR_EXE, &file_path)); file_path = file_path.AppendASCII(file_name); binary_file_ = base::OpenFile(file_path, "wb"); DLOG_IF(ERROR, !binary_file_) << "Failed to open binary PCM data file."; VLOG(0) << ">> Output file: " << file_path.value() << " has been created."; - VLOG(0) << ">> bits_per_sample_:" << bits_per_sample_; } ~WriteToFileAudioSink() override { @@ -136,11 +135,11 @@ void OnData(const AudioBus* src, base::TimeTicks capture_time, double volume) override { - EXPECT_EQ(bits_per_sample_, 16); const int num_samples = src->frames() * src->channels(); auto interleaved = std::make_unique<int16_t[]>(num_samples); const int bytes_per_sample = sizeof(interleaved[0]); - src->ToInterleaved(src->frames(), bytes_per_sample, interleaved.get()); + src->ToInterleaved<SignedInt16SampleTypeTraits>(src->frames(), + interleaved.get()); // Store data data in a temporary buffer to avoid making blocking // fwrite() calls in the audio callback. The complete buffer will be @@ -154,7 +153,6 @@ void OnError() override {} private: - int bits_per_sample_; media::SeekableBuffer buffer_; FILE* binary_file_; size_t bytes_to_write_; @@ -203,7 +201,6 @@ int channels() const { return ChannelLayoutToChannelCount(default_params_.channel_layout()); } - int bits_per_sample() const { return default_params_.bits_per_sample(); } int sample_rate() const { return default_params_.sample_rate(); } int frames_per_buffer() const { return frames_per_buffer_; } @@ -377,8 +374,8 @@ MockAudioInputCallback sink; // Derive the expected size in bytes of each recorded packet. - uint32_t bytes_per_packet = - aisw.channels() * aisw.frames_per_buffer() * (aisw.bits_per_sample() / 8); + uint32_t bytes_per_packet = aisw.channels() * aisw.frames_per_buffer() * + SampleFormatToBytesPerChannel(kSampleFormat); { // We use 10ms packets and will run the test until ten packets are received. @@ -405,8 +402,8 @@ count = 0; ais.Reset(aisw.Create(2 * frames_per_buffer_10ms)); EXPECT_TRUE(ais->Open()); - bytes_per_packet = - aisw.channels() * aisw.frames_per_buffer() * (aisw.bits_per_sample() / 8); + bytes_per_packet = aisw.channels() * aisw.frames_per_buffer() * + SampleFormatToBytesPerChannel(kSampleFormat); { base::RunLoop run_loop; @@ -426,8 +423,8 @@ count = 0; ais.Reset(aisw.Create(frames_per_buffer_10ms / 2)); EXPECT_TRUE(ais->Open()); - bytes_per_packet = - aisw.channels() * aisw.frames_per_buffer() * (aisw.bits_per_sample() / 8); + bytes_per_packet = aisw.channels() * aisw.frames_per_buffer() * + SampleFormatToBytesPerChannel(kSampleFormat); { base::RunLoop run_loop; @@ -491,7 +488,7 @@ ASSERT_TRUE(ais->Open()); VLOG(0) << ">> Sample rate: " << aisw.sample_rate() << " [Hz]"; - WriteToFileAudioSink file_sink(file_name, aisw.bits_per_sample()); + WriteToFileAudioSink file_sink(file_name); VLOG(0) << ">> Speak into the default microphone while recording."; ais->Start(&file_sink); base::PlatformThread::Sleep(TestTimeouts::action_timeout()); @@ -534,8 +531,7 @@ // 44.1kHz. // Otherwise (e.g. 44.1kHz, 22.05kHz etc) we convert to 48kHz. const int hw_sample_rate = params.sample_rate(); - params.Reset(params.format(), test.layout, test.rate, - params.bits_per_sample(), test.frames); + params.Reset(params.format(), test.layout, test.rate, test.frames); std::string file_name(base::StringPrintf( "resampled_10sec_%i_to_%i_%s.pcm", hw_sample_rate, params.sample_rate(), @@ -548,7 +544,7 @@ VLOG(0) << ">> Resampled rate will be: " << aisw.sample_rate() << " [Hz]"; VLOG(0) << ">> New layout will be: " << ChannelLayoutToString(params.channel_layout()); - WriteToFileAudioSink file_sink(file_name.c_str(), aisw.bits_per_sample()); + WriteToFileAudioSink file_sink(file_name.c_str()); VLOG(0) << ">> Speak into the default microphone while recording."; ais->Start(&file_sink); base::PlatformThread::Sleep(TestTimeouts::action_timeout());
diff --git a/media/audio/win/audio_low_latency_output_win.cc b/media/audio/win/audio_low_latency_output_win.cc index accbacb..eae42366 100644 --- a/media/audio/win/audio_low_latency_output_win.cc +++ b/media/audio/win/audio_low_latency_output_win.cc
@@ -71,14 +71,7 @@ bool avrt_init = avrt::Initialize(); DCHECK(avrt_init) << "Failed to load the avrt.dll"; - // New set that appropriate for float output. - AudioParameters float_params( - params.format(), params.channel_layout(), params.sample_rate(), - // Ignore the given bits per sample because we're outputting - // floats. - sizeof(float) * CHAR_BIT, params.frames_per_buffer()); - - audio_bus_ = AudioBus::Create(float_params); + audio_bus_ = AudioBus::Create(params); // Set up the desired render format specified by the client. We use the // WAVE_FORMAT_EXTENSIBLE structure to ensure that multiple channel ordering @@ -87,27 +80,27 @@ // Begin with the WAVEFORMATEX structure that specifies the basic format. WAVEFORMATEX* format = &format_.Format; format->wFormatTag = WAVE_FORMAT_EXTENSIBLE; - format->nChannels = float_params.channels(); - format->nSamplesPerSec = float_params.sample_rate(); - format->wBitsPerSample = float_params.bits_per_sample(); + format->nChannels = params.channels(); + format->nSamplesPerSec = params.sample_rate(); + format->wBitsPerSample = sizeof(float) * 8; format->nBlockAlign = (format->wBitsPerSample / 8) * format->nChannels; format->nAvgBytesPerSec = format->nSamplesPerSec * format->nBlockAlign; format->cbSize = sizeof(WAVEFORMATEXTENSIBLE) - sizeof(WAVEFORMATEX); // Add the parts which are unique to WAVE_FORMAT_EXTENSIBLE. - format_.Samples.wValidBitsPerSample = float_params.bits_per_sample(); + format_.Samples.wValidBitsPerSample = format->wBitsPerSample; format_.dwChannelMask = CoreAudioUtil::GetChannelConfig(device_id, eRender); format_.SubFormat = KSDATAFORMAT_SUBTYPE_IEEE_FLOAT; // Store size (in different units) of audio packets which we expect to // get from the audio endpoint device in each render event. - packet_size_frames_ = float_params.frames_per_buffer(); - packet_size_bytes_ = float_params.GetBytesPerBuffer(); + packet_size_frames_ = params.frames_per_buffer(); + packet_size_bytes_ = params.GetBytesPerBuffer(kSampleFormatF32); DVLOG(1) << "Number of bytes per audio frame : " << format->nBlockAlign; DVLOG(1) << "Number of audio frames per packet: " << packet_size_frames_; DVLOG(1) << "Number of bytes per packet : " << packet_size_bytes_; DVLOG(1) << "Number of milliseconds per packet: " - << float_params.GetBufferDuration().InMillisecondsF(); + << params.GetBufferDuration().InMillisecondsF(); // All events are auto-reset events and non-signaled initially.
diff --git a/media/audio/win/audio_low_latency_output_win_unittest.cc b/media/audio/win/audio_low_latency_output_win_unittest.cc index a57ec87..693caf3 100644 --- a/media/audio/win/audio_low_latency_output_win_unittest.cc +++ b/media/audio/win/audio_low_latency_output_win_unittest.cc
@@ -171,8 +171,7 @@ public: explicit AudioOutputStreamWrapper(AudioManager* audio_manager) : audio_man_(audio_manager), - format_(AudioParameters::AUDIO_PCM_LOW_LATENCY), - bits_per_sample_(kBitsPerSample) { + format_(AudioParameters::AUDIO_PCM_LOW_LATENCY) { AudioParameters preferred_params; EXPECT_TRUE(SUCCEEDED(CoreAudioUtil::GetPreferredAudioParameters( AudioDeviceDescription::kDefaultDeviceId, true, &preferred_params))); @@ -205,7 +204,6 @@ AudioParameters::Format format() const { return format_; } int channels() const { return ChannelLayoutToChannelCount(channel_layout_); } - int bits_per_sample() const { return bits_per_sample_; } int sample_rate() const { return sample_rate_; } int samples_per_packet() const { return samples_per_packet_; } @@ -213,7 +211,7 @@ AudioOutputStream* CreateOutputStream() { AudioOutputStream* aos = audio_man_->MakeAudioOutputStream( AudioParameters(format_, channel_layout_, sample_rate_, - bits_per_sample_, samples_per_packet_), + samples_per_packet_), std::string(), AudioManager::LogCallback()); EXPECT_TRUE(aos); return aos; @@ -222,7 +220,6 @@ AudioManager* audio_man_; AudioParameters::Format format_; ChannelLayout channel_layout_; - int bits_per_sample_; int sample_rate_; int samples_per_packet_; }; @@ -422,7 +419,6 @@ DVLOG(0) << "File name : " << file_name.c_str(); DVLOG(0) << "Sample rate : " << aosw.sample_rate(); - DVLOG(0) << "Bits per sample: " << aosw.bits_per_sample(); DVLOG(0) << "#channels : " << aosw.channels(); DVLOG(0) << "File size : " << file_source.file_size(); DVLOG(0) << "#file segments : " << kNumFileSegments;
diff --git a/media/audio/win/audio_manager_win.cc b/media/audio/win/audio_manager_win.cc index 7cb31a4..6d18786d 100644 --- a/media/audio/win/audio_manager_win.cc +++ b/media/audio/win/audio_manager_win.cc
@@ -171,7 +171,7 @@ // code path somehow for a configuration - e.g. tab capture). parameters = AudioParameters(AudioParameters::AUDIO_PCM_LINEAR, - CHANNEL_LAYOUT_STEREO, 48000, 16, kFallbackBufferSize); + CHANNEL_LAYOUT_STEREO, 48000, kFallbackBufferSize); } int user_buffer_size = GetUserBufferSize(); @@ -274,7 +274,6 @@ ChannelLayout channel_layout = CHANNEL_LAYOUT_STEREO; int sample_rate = 48000; int buffer_size = kFallbackBufferSize; - int bits_per_sample = 16; int effects = AudioParameters::NO_EFFECTS; // TODO(henrika): Remove kEnableExclusiveAudio and related code. It doesn't @@ -306,7 +305,6 @@ return AudioParameters(); } - bits_per_sample = params.bits_per_sample(); buffer_size = params.frames_per_buffer(); channel_layout = params.channel_layout(); sample_rate = params.sample_rate(); @@ -349,7 +347,7 @@ buffer_size = user_buffer_size; AudioParameters params(AudioParameters::AUDIO_PCM_LOW_LATENCY, channel_layout, - sample_rate, bits_per_sample, buffer_size); + sample_rate, buffer_size); params.set_effects(effects); return params; }
diff --git a/media/audio/win/audio_output_win_unittest.cc b/media/audio/win/audio_output_win_unittest.cc index 30f808d7..73ea9ca 100644 --- a/media/audio/win/audio_output_win_unittest.cc +++ b/media/audio/win/audio_output_win_unittest.cc
@@ -183,7 +183,7 @@ AudioOutputStream* oas = audio_manager_->MakeAudioOutputStream( AudioParameters(AudioParameters::AUDIO_PCM_LINEAR, CHANNEL_LAYOUT_STEREO, - 8000, 16, 256), + 8000, 256), std::string(), AudioManager::LogCallback()); ASSERT_TRUE(NULL != oas); oas->Close(); @@ -194,40 +194,34 @@ ABORT_AUDIO_TEST_IF_NOT(audio_manager_device_info_->HasAudioOutputDevices()); AudioParameters::Format fmt = AudioParameters::AUDIO_PCM_LINEAR; - EXPECT_TRUE( - NULL == - audio_manager_->MakeAudioOutputStream( - AudioParameters(fmt, CHANNEL_LAYOUT_UNSUPPORTED, 8000, 16, 256), - std::string(), AudioManager::LogCallback())); - EXPECT_TRUE( - NULL == - audio_manager_->MakeAudioOutputStream( - AudioParameters(fmt, CHANNEL_LAYOUT_MONO, 1024 * 1024, 16, 256), - std::string(), AudioManager::LogCallback())); EXPECT_TRUE(NULL == audio_manager_->MakeAudioOutputStream( - AudioParameters(fmt, CHANNEL_LAYOUT_STEREO, 8000, 80, 256), - std::string(), AudioManager::LogCallback())); - EXPECT_TRUE( - NULL == - audio_manager_->MakeAudioOutputStream( - AudioParameters(fmt, CHANNEL_LAYOUT_UNSUPPORTED, 8000, 16, 256), - std::string(), AudioManager::LogCallback())); - EXPECT_TRUE(NULL == - audio_manager_->MakeAudioOutputStream( - AudioParameters(fmt, CHANNEL_LAYOUT_STEREO, -8000, 16, 256), + AudioParameters(fmt, CHANNEL_LAYOUT_UNSUPPORTED, 8000, 256), std::string(), AudioManager::LogCallback())); EXPECT_TRUE(NULL == audio_manager_->MakeAudioOutputStream( - AudioParameters(fmt, CHANNEL_LAYOUT_MONO, 8000, 16, -100), + AudioParameters(fmt, CHANNEL_LAYOUT_MONO, 1024 * 1024, 256), + std::string(), AudioManager::LogCallback())); + EXPECT_TRUE(NULL == audio_manager_->MakeAudioOutputStream( + AudioParameters(fmt, CHANNEL_LAYOUT_STEREO, 0, 256), + std::string(), AudioManager::LogCallback())); + EXPECT_TRUE(NULL == + audio_manager_->MakeAudioOutputStream( + AudioParameters(fmt, CHANNEL_LAYOUT_UNSUPPORTED, 8000, 256), std::string(), AudioManager::LogCallback())); EXPECT_TRUE(NULL == audio_manager_->MakeAudioOutputStream( - AudioParameters(fmt, CHANNEL_LAYOUT_MONO, 8000, 16, 0), + AudioParameters(fmt, CHANNEL_LAYOUT_STEREO, -8000, 256), std::string(), AudioManager::LogCallback())); + EXPECT_TRUE(NULL == audio_manager_->MakeAudioOutputStream( + AudioParameters(fmt, CHANNEL_LAYOUT_MONO, 8000, -100), + std::string(), AudioManager::LogCallback())); + EXPECT_TRUE(NULL == audio_manager_->MakeAudioOutputStream( + AudioParameters(fmt, CHANNEL_LAYOUT_MONO, 8000, 0), + std::string(), AudioManager::LogCallback())); EXPECT_TRUE(NULL == audio_manager_->MakeAudioOutputStream( - AudioParameters(fmt, CHANNEL_LAYOUT_MONO, 8000, 16, + AudioParameters(fmt, CHANNEL_LAYOUT_MONO, 8000, media::limits::kMaxSamplesPerPacket + 1), std::string(), AudioManager::LogCallback())); } @@ -238,7 +232,7 @@ AudioOutputStream* oas = audio_manager_->MakeAudioOutputStream( AudioParameters(AudioParameters::AUDIO_PCM_LINEAR, CHANNEL_LAYOUT_STEREO, - 8000, 16, 256), + 8000, 256), std::string(), AudioManager::LogCallback()); ASSERT_TRUE(NULL != oas); EXPECT_TRUE(oas->Open()); @@ -251,7 +245,7 @@ AudioOutputStream* oas = audio_manager_->MakeAudioOutputStream( AudioParameters(AudioParameters::AUDIO_PCM_LINEAR, CHANNEL_LAYOUT_STEREO, - 8000, 16, 1024 * 1024 * 1024), + 8000, 1024 * 1024 * 1024), std::string(), AudioManager::LogCallback()); EXPECT_TRUE(NULL == oas); if (oas) @@ -266,7 +260,7 @@ AudioOutputStream* oas = audio_manager_->MakeAudioOutputStream( AudioParameters(AudioParameters::AUDIO_PCM_LINEAR, CHANNEL_LAYOUT_MONO, - 16000, 16, 256), + 16000, 256), std::string(), AudioManager::LogCallback()); ASSERT_TRUE(NULL != oas); TestSourceLaggy test_laggy(90); @@ -291,7 +285,7 @@ uint32_t samples_100_ms = AudioParameters::kAudioCDSampleRate / 10; AudioOutputStream* oas = audio_manager_->MakeAudioOutputStream( AudioParameters(AudioParameters::AUDIO_PCM_LINEAR, CHANNEL_LAYOUT_MONO, - AudioParameters::kAudioCDSampleRate, 16, samples_100_ms), + AudioParameters::kAudioCDSampleRate, samples_100_ms), std::string(), AudioManager::LogCallback()); ASSERT_TRUE(NULL != oas); @@ -321,7 +315,7 @@ uint32_t samples_100_ms = AudioParameters::kAudioCDSampleRate / 10; AudioOutputStream* oas = audio_manager_->MakeAudioOutputStream( AudioParameters(AudioParameters::AUDIO_PCM_LINEAR, CHANNEL_LAYOUT_MONO, - AudioParameters::kAudioCDSampleRate, 16, samples_100_ms), + AudioParameters::kAudioCDSampleRate, samples_100_ms), std::string(), AudioManager::LogCallback()); ASSERT_TRUE(NULL != oas); @@ -345,8 +339,7 @@ uint32_t samples_100_ms = AudioParameters::kAudioCDSampleRate / 20; AudioOutputStream* oas = audio_manager_->MakeAudioOutputStream( AudioParameters(AudioParameters::AUDIO_PCM_LINEAR, CHANNEL_LAYOUT_MONO, - AudioParameters::kAudioCDSampleRate / 2, 16, - samples_100_ms), + AudioParameters::kAudioCDSampleRate / 2, samples_100_ms), std::string(), AudioManager::LogCallback()); ASSERT_TRUE(NULL != oas); @@ -382,7 +375,7 @@ AudioOutputStream* oas = audio_manager_->MakeAudioOutputStream( AudioParameters(AudioParameters::AUDIO_PCM_LINEAR, CHANNEL_LAYOUT_MONO, - kSampleRate, 16, kSamples100ms), + kSampleRate, kSamples100ms), std::string(), AudioManager::LogCallback()); ASSERT_TRUE(NULL != oas); @@ -415,7 +408,7 @@ uint32_t samples_100_ms = AudioParameters::kAudioCDSampleRate / 10; AudioOutputStream* oas = audio_manager_->MakeAudioOutputStream( AudioParameters(AudioParameters::AUDIO_PCM_LINEAR, CHANNEL_LAYOUT_MONO, - AudioParameters::kAudioCDSampleRate, 16, samples_100_ms), + AudioParameters::kAudioCDSampleRate, samples_100_ms), std::string(), AudioManager::LogCallback()); ASSERT_TRUE(NULL != oas); @@ -453,7 +446,7 @@ uint32_t samples_10_ms = sample_rate / 100; AudioOutputStream* oas = audio_manager_->MakeAudioOutputStream( AudioParameters(AudioParameters::AUDIO_PCM_LOW_LATENCY, - CHANNEL_LAYOUT_MONO, sample_rate, 16, samples_10_ms), + CHANNEL_LAYOUT_MONO, sample_rate, samples_10_ms), std::string(), AudioManager::LogCallback()); ASSERT_TRUE(NULL != oas); @@ -483,7 +476,7 @@ uint32_t samples_100_ms = AudioParameters::kAudioCDSampleRate / 10; AudioOutputStream* oas = audio_manager_->MakeAudioOutputStream( AudioParameters(AudioParameters::AUDIO_PCM_LINEAR, CHANNEL_LAYOUT_MONO, - AudioParameters::kAudioCDSampleRate, 16, samples_100_ms), + AudioParameters::kAudioCDSampleRate, samples_100_ms), std::string(), AudioManager::LogCallback()); ASSERT_TRUE(NULL != oas); @@ -629,8 +622,8 @@ static const int sample_rate = AudioParameters::kAudioCDSampleRate; static const uint32_t kSamples20ms = sample_rate / 50; - AudioParameters params(AudioParameters::AUDIO_PCM_LINEAR, - CHANNEL_LAYOUT_MONO, sample_rate, 16, kSamples20ms); + AudioParameters params(AudioParameters::AUDIO_PCM_LINEAR, CHANNEL_LAYOUT_MONO, + sample_rate, kSamples20ms); AudioOutputStream* oas = audio_manager_->MakeAudioOutputStream( params, std::string(), AudioManager::LogCallback());
diff --git a/media/audio/win/core_audio_util_win.cc b/media/audio/win/core_audio_util_win.cc index 5541849..7ed34be 100644 --- a/media/audio/win/core_audio_util_win.cc +++ b/media/audio/win/core_audio_util_win.cc
@@ -405,11 +405,6 @@ // Preferred sample rate. int sample_rate = mix_format.Format.nSamplesPerSec; - // TODO(henrika): possibly use format.Format.wBitsPerSample here instead. - // We use a hard-coded value of 16 bits per sample today even if most audio - // engines does the actual mixing in 32 bits per sample. - int bits_per_sample = 16; - // We are using the native device period to derive the smallest possible // buffer size in shared mode. Note that the actual endpoint buffer will be // larger than this size but it will be possible to fill it up in two calls. @@ -420,8 +415,7 @@ 0.5); AudioParameters audio_params(AudioParameters::AUDIO_PCM_LOW_LATENCY, - channel_layout, sample_rate, bits_per_sample, - frames_per_buffer); + channel_layout, sample_rate, frames_per_buffer); *params = audio_params; DVLOG(1) << params->AsHumanReadableString(); @@ -793,8 +787,7 @@ // need to do the same thing? if (params->channels() != 1) { params->Reset(params->format(), CHANNEL_LAYOUT_STEREO, - params->sample_rate(), params->bits_per_sample(), - params->frames_per_buffer()); + params->sample_rate(), params->frames_per_buffer()); } return hr;
diff --git a/media/audio/win/waveout_output_win.cc b/media/audio/win/waveout_output_win.cc index 8119306..70d830f 100644 --- a/media/audio/win/waveout_output_win.cc +++ b/media/audio/win/waveout_output_win.cc
@@ -72,6 +72,8 @@ return reinterpret_cast<WAVEHDR*>(&buffers_[n * BufferSize()]); } +constexpr SampleFormat kSampleFormat = kSampleFormatS16; + PCMWaveOutAudioOutputStream::PCMWaveOutAudioOutputStream( AudioManagerWin* manager, const AudioParameters& params, @@ -81,7 +83,7 @@ manager_(manager), callback_(NULL), num_buffers_(num_buffers), - buffer_size_(params.GetBytesPerBuffer()), + buffer_size_(params.GetBytesPerBuffer(kSampleFormat)), volume_(1), channels_(params.channels()), pending_bytes_(0), @@ -92,7 +94,7 @@ format_.Format.wFormatTag = WAVE_FORMAT_EXTENSIBLE; format_.Format.nChannels = params.channels(); format_.Format.nSamplesPerSec = params.sample_rate(); - format_.Format.wBitsPerSample = params.bits_per_sample(); + format_.Format.wBitsPerSample = SampleFormatToBitsPerChannel(kSampleFormat); format_.Format.cbSize = sizeof(format_) - sizeof(WAVEFORMATEX); // The next are computed from above. format_.Format.nBlockAlign = (format_.Format.nChannels * @@ -105,7 +107,7 @@ format_.dwChannelMask = kChannelsToMask[params.channels()]; } format_.SubFormat = KSDATAFORMAT_SUBTYPE_PCM; - format_.Samples.wValidBitsPerSample = params.bits_per_sample(); + format_.Samples.wValidBitsPerSample = format_.Format.wBitsPerSample; } PCMWaveOutAudioOutputStream::~PCMWaveOutAudioOutputStream() {
diff --git a/media/base/BUILD.gn b/media/base/BUILD.gn index c08d003..971cb27 100644 --- a/media/base/BUILD.gn +++ b/media/base/BUILD.gn
@@ -141,6 +141,8 @@ "encryption_scheme.h", "fake_audio_worker.cc", "fake_audio_worker.h", + "fallback_video_decoder.cc", + "fallback_video_decoder.h", "feedback_signal_accumulator.h", "hdr_metadata.cc", "hdr_metadata.h", @@ -215,8 +217,6 @@ "renderer_factory_selector.cc", "renderer_factory_selector.h", "routing_token_callback.h", - "sample_format.cc", - "sample_format.h", "sample_rates.cc", "sample_rates.h", "seekable_buffer.cc", @@ -471,6 +471,7 @@ "djb2_unittest.cc", "fake_audio_worker_unittest.cc", "fake_demuxer_stream_unittest.cc", + "fallback_video_decoder_unittest.cc", "feedback_signal_accumulator_unittest.cc", "gmock_callback_support_unittest.cc", "key_systems_unittest.cc",
diff --git a/media/base/audio_buffer_converter.cc b/media/base/audio_buffer_converter.cc index d5cee38..4026a2c9 100644 --- a/media/base/audio_buffer_converter.cc +++ b/media/base/audio_buffer_converter.cc
@@ -143,7 +143,6 @@ input_params_.format(), buffer->channel_layout(), buffer->sample_rate(), - input_params_.bits_per_sample(), // If resampling is needed and the FIFO disabled, the AudioConverter will // always request SincResampler::kDefaultRequestSize frames. Otherwise it // will use the output frame size.
diff --git a/media/base/audio_buffer_converter_unittest.cc b/media/base/audio_buffer_converter_unittest.cc index 506ea28e..06d88ec 100644 --- a/media/base/audio_buffer_converter_unittest.cc +++ b/media/base/audio_buffer_converter_unittest.cc
@@ -40,7 +40,6 @@ output_params_(AudioParameters::AUDIO_PCM_LOW_LATENCY, kOutChannelLayout, kOutSampleRate, - 16, kOutFrameSize) { audio_buffer_converter_.reset(new AudioBufferConverter(output_params_)); } @@ -208,7 +207,7 @@ TEST_F(AudioBufferConverterTest, DiscreteChannelLayout) { output_params_ = AudioParameters(AudioParameters::AUDIO_PCM_LOW_LATENCY, - CHANNEL_LAYOUT_DISCRETE, kOutSampleRate, 16, 512); + CHANNEL_LAYOUT_DISCRETE, kOutSampleRate, 512); output_params_.set_channels_for_discrete(2); audio_buffer_converter_.reset(new AudioBufferConverter(output_params_)); AddInput(MakeTestBuffer(kOutSampleRate, CHANNEL_LAYOUT_STEREO, 2, 512)); @@ -219,7 +218,6 @@ output_params_ = AudioParameters(AudioParameters::AUDIO_PCM_LOW_LATENCY, kOutChannelLayout, kOutSampleRate, - 16, 2048); audio_buffer_converter_.reset(new AudioBufferConverter(output_params_));
diff --git a/media/base/audio_bus.cc b/media/base/audio_bus.cc index b490718a..c21c6c9 100644 --- a/media/base/audio_bus.cc +++ b/media/base/audio_bus.cc
@@ -14,7 +14,6 @@ #include "base/memory/ptr_util.h" #include "base/numerics/safe_conversions.h" #include "media/base/audio_parameters.h" -#include "media/base/audio_sample_types.h" #include "media/base/limits.h" #include "media/base/vector_math.h"
diff --git a/media/base/audio_bus.h b/media/base/audio_bus.h index b78eabc..5e55b5c 100644 --- a/media/base/audio_bus.h +++ b/media/base/audio_bus.h
@@ -12,6 +12,7 @@ #include "base/macros.h" #include "base/memory/aligned_memory.h" +#include "media/base/audio_sample_types.h" #include "media/base/media_shmem_export.h" namespace media {
diff --git a/media/base/audio_bus_unittest.cc b/media/base/audio_bus_unittest.cc index a7e12f3..39f2f42 100644 --- a/media/base/audio_bus_unittest.cc +++ b/media/base/audio_bus_unittest.cc
@@ -139,7 +139,7 @@ TEST_F(AudioBusTest, CreateUsingAudioParameters) { std::unique_ptr<AudioBus> bus = AudioBus::Create( AudioParameters(AudioParameters::AUDIO_PCM_LINEAR, kChannelLayout, - kSampleRate, 32, kFrameCount)); + kSampleRate, kFrameCount)); VerifyChannelAndFrameCount(bus.get()); VerifyReadWriteAndAlignment(bus.get()); } @@ -176,9 +176,8 @@ // Verify an AudioBus created via wrapping a memory block works as advertised. TEST_F(AudioBusTest, WrapMemory) { - AudioParameters params( - AudioParameters::AUDIO_PCM_LINEAR, kChannelLayout, kSampleRate, 32, - kFrameCount); + AudioParameters params(AudioParameters::AUDIO_PCM_LINEAR, kChannelLayout, + kSampleRate, kFrameCount); int data_size = AudioBus::CalculateMemorySize(params); std::unique_ptr<float, base::AlignedFreeDeleter> data(static_cast<float*>( base::AlignedAlloc(data_size, AudioBus::kChannelAlignment))); @@ -205,9 +204,8 @@ TEST_F(AudioBusTest, CopyTo) { // Create one bus with AudioParameters and the other through direct values to // test for parity between the Create() functions. - AudioParameters params( - AudioParameters::AUDIO_PCM_LINEAR, kChannelLayout, kSampleRate, 32, - kFrameCount); + AudioParameters params(AudioParameters::AUDIO_PCM_LINEAR, kChannelLayout, + kSampleRate, kFrameCount); std::unique_ptr<AudioBus> bus1 = AudioBus::Create(kChannels, kFrameCount); std::unique_ptr<AudioBus> bus2 = AudioBus::Create(params);
diff --git a/media/base/audio_converter_perftest.cc b/media/base/audio_converter_perftest.cc index 34ec050..7ed529a1 100644 --- a/media/base/audio_converter_perftest.cc +++ b/media/base/audio_converter_perftest.cc
@@ -53,10 +53,10 @@ TEST(AudioConverterPerfTest, ConvertBenchmark) { // Create input and output parameters to convert between the two most common // sets of parameters (as indicated via UMA data). - AudioParameters input_params( - AudioParameters::AUDIO_PCM_LINEAR, CHANNEL_LAYOUT_MONO, 48000, 16, 2048); - AudioParameters output_params( - AudioParameters::AUDIO_PCM_LINEAR, CHANNEL_LAYOUT_STEREO, 44100, 16, 440); + AudioParameters input_params(AudioParameters::AUDIO_PCM_LINEAR, + CHANNEL_LAYOUT_MONO, 48000, 2048); + AudioParameters output_params(AudioParameters::AUDIO_PCM_LINEAR, + CHANNEL_LAYOUT_STEREO, 44100, 440); RunConvertBenchmark(input_params, output_params, false, "convert"); } @@ -67,10 +67,9 @@ AudioParameters input_params(AudioParameters::AUDIO_PCM_LINEAR, CHANNEL_LAYOUT_STEREO, 44100, - 16, 2048); - AudioParameters output_params( - AudioParameters::AUDIO_PCM_LINEAR, CHANNEL_LAYOUT_STEREO, 44100, 16, 440); + AudioParameters output_params(AudioParameters::AUDIO_PCM_LINEAR, + CHANNEL_LAYOUT_STEREO, 44100, 440); RunConvertBenchmark(input_params, output_params, true, "convert_fifo_only"); RunConvertBenchmark(input_params, output_params, false,
diff --git a/media/base/audio_converter_unittest.cc b/media/base/audio_converter_unittest.cc index dabc5ea..d05d8d0 100644 --- a/media/base/audio_converter_unittest.cc +++ b/media/base/audio_converter_unittest.cc
@@ -23,7 +23,6 @@ static const int kConvertCycles = 3; // Parameters used for testing. -static const int kBitsPerChannel = 32; static const ChannelLayout kChannelLayout = CHANNEL_LAYOUT_STEREO; static const int kHighLatencyBufferSize = 2048; static const int kLowLatencyBufferSize = 256; @@ -39,12 +38,12 @@ public: AudioConverterTest() : epsilon_(std::get<3>(GetParam())) { // Create input and output parameters based on test parameters. - input_parameters_ = AudioParameters( - AudioParameters::AUDIO_PCM_LINEAR, kChannelLayout, - std::get<0>(GetParam()), kBitsPerChannel, kHighLatencyBufferSize); + input_parameters_ = + AudioParameters(AudioParameters::AUDIO_PCM_LINEAR, kChannelLayout, + std::get<0>(GetParam()), kHighLatencyBufferSize); output_parameters_ = AudioParameters( AudioParameters::AUDIO_PCM_LOW_LATENCY, std::get<2>(GetParam()), - std::get<1>(GetParam()), 16, kLowLatencyBufferSize); + std::get<1>(GetParam()), kLowLatencyBufferSize); converter_.reset(new AudioConverter( input_parameters_, output_parameters_, false)); @@ -201,11 +200,11 @@ // multiple calls to fill the buffer. AudioParameters input_parameters(AudioParameters::AUDIO_PCM_LINEAR, CHANNEL_LAYOUT_DISCRETE, kSampleRate, - kBitsPerChannel, kLowLatencyBufferSize); + kLowLatencyBufferSize); input_parameters.set_channels_for_discrete(10); AudioParameters output_parameters(AudioParameters::AUDIO_PCM_LINEAR, CHANNEL_LAYOUT_DISCRETE, kSampleRate * 2, - kBitsPerChannel, kHighLatencyBufferSize); + kHighLatencyBufferSize); output_parameters.set_channels_for_discrete(5); AudioConverter converter(input_parameters, output_parameters, false);
diff --git a/media/base/audio_parameters.cc b/media/base/audio_parameters.cc index b8dcb49..bacbef8a 100644 --- a/media/base/audio_parameters.cc +++ b/media/base/audio_parameters.cc
@@ -56,16 +56,14 @@ } AudioParameters::AudioParameters() - : AudioParameters(AUDIO_PCM_LINEAR, CHANNEL_LAYOUT_NONE, 0, 0, 0) {} + : AudioParameters(AUDIO_PCM_LINEAR, CHANNEL_LAYOUT_NONE, 0, 0) {} AudioParameters::AudioParameters(Format format, ChannelLayout channel_layout, int sample_rate, - int bits_per_sample, int frames_per_buffer) : latency_tag_(AudioLatency::LATENCY_COUNT) { - Reset(format, channel_layout, sample_rate, bits_per_sample, - frames_per_buffer); + Reset(format, channel_layout, sample_rate, frames_per_buffer); } AudioParameters::~AudioParameters() = default; @@ -76,13 +74,11 @@ void AudioParameters::Reset(Format format, ChannelLayout channel_layout, int sample_rate, - int bits_per_sample, int frames_per_buffer) { format_ = format; channel_layout_ = channel_layout; channels_ = ChannelLayoutToChannelCount(channel_layout); sample_rate_ = sample_rate; - bits_per_sample_ = bits_per_sample; frames_per_buffer_ = frames_per_buffer; effects_ = NO_EFFECTS; mic_positions_.clear(); @@ -93,8 +89,6 @@ (channel_layout_ > CHANNEL_LAYOUT_UNSUPPORTED) && (sample_rate_ >= media::limits::kMinSampleRate) && (sample_rate_ <= media::limits::kMaxSampleRate) && - (bits_per_sample_ > 0) && - (bits_per_sample_ <= media::limits::kMaxBitsPerSample) && (frames_per_buffer_ > 0) && (frames_per_buffer_ <= media::limits::kMaxSamplesPerPacket) && (channel_layout_ == CHANNEL_LAYOUT_DISCRETE || @@ -105,23 +99,18 @@ std::ostringstream s; s << "format: " << format() << " channel_layout: " << channel_layout() << " channels: " << channels() << " sample_rate: " << sample_rate() - << " bits_per_sample: " << bits_per_sample() << " frames_per_buffer: " << frames_per_buffer() << " effects: " << effects() << " mic_positions: " << PointsToString(mic_positions_); return s.str(); } -int AudioParameters::GetBytesPerBuffer() const { - return frames_per_buffer_ * GetBytesPerFrame(); +int AudioParameters::GetBytesPerBuffer(SampleFormat fmt) const { + return GetBytesPerFrame(fmt) * frames_per_buffer_; } -int AudioParameters::GetBytesPerSecond() const { - return sample_rate_ * GetBytesPerFrame(); -} - -int AudioParameters::GetBytesPerFrame() const { - return channels_ * bits_per_sample_ / 8; +int AudioParameters::GetBytesPerFrame(SampleFormat fmt) const { + return channels_ * SampleFormatToBytesPerChannel(fmt); } double AudioParameters::GetMicrosecondsPerFrame() const { @@ -138,7 +127,6 @@ return format_ == other.format() && sample_rate_ == other.sample_rate() && channel_layout_ == other.channel_layout() && channels_ == other.channels() && - bits_per_sample_ == other.bits_per_sample() && frames_per_buffer_ == other.frames_per_buffer() && effects_ == other.effects() && mic_positions_ == other.mic_positions_; } @@ -154,7 +142,7 @@ // significantly differs from 10 ms used there, see http://crbug/701000. return media::AudioParameters( media::AudioParameters::AUDIO_FAKE, media::CHANNEL_LAYOUT_STEREO, - media::AudioParameters::kAudioCDSampleRate, 16, + media::AudioParameters::kAudioCDSampleRate, media::AudioParameters::kAudioCDSampleRate / 100); }
diff --git a/media/base/audio_parameters.h b/media/base/audio_parameters.h index ee0f0cf..de18c65 100644 --- a/media/base/audio_parameters.h +++ b/media/base/audio_parameters.h
@@ -18,6 +18,7 @@ #include "media/base/audio_point.h" #include "media/base/channel_layout.h" #include "media/base/media_shmem_export.h" +#include "media/base/sample_format.h" namespace media { @@ -149,7 +150,6 @@ AudioParameters(Format format, ChannelLayout channel_layout, int sample_rate, - int bits_per_sample, int frames_per_buffer); ~AudioParameters(); @@ -158,7 +158,6 @@ void Reset(Format format, ChannelLayout channel_layout, int sample_rate, - int bits_per_sample, int frames_per_buffer); // Checks that all values are in the expected range. All limits are specified @@ -169,14 +168,12 @@ // output only. std::string AsHumanReadableString() const; - // Returns size of audio buffer in bytes. - int GetBytesPerBuffer() const; + // Returns size of audio buffer in bytes when using |fmt| for samples. + int GetBytesPerBuffer(SampleFormat fmt) const; - // Returns the number of bytes representing one second of audio. - int GetBytesPerSecond() const; - - // Returns the number of bytes representing a frame of audio. - int GetBytesPerFrame() const; + // Returns the number of bytes representing a frame of audio when using |fmt| + // for samples. + int GetBytesPerFrame(SampleFormat fmt) const; // Returns the number of microseconds per frame of audio. Intentionally // reported as a double to surface of partial microseconds per frame, which @@ -212,11 +209,6 @@ void set_sample_rate(int sample_rate) { sample_rate_ = sample_rate; } int sample_rate() const { return sample_rate_; } - void set_bits_per_sample(int bits_per_sample) { - bits_per_sample_ = bits_per_sample; - } - int bits_per_sample() const { return bits_per_sample_; } - void set_frames_per_buffer(int frames_per_buffer) { frames_per_buffer_ = frames_per_buffer; } @@ -247,7 +239,6 @@ int channels_; // Number of channels. Value set based on // |channel_layout|. int sample_rate_; // Sampling frequency/rate. - int bits_per_sample_; // Number of bits per sample. int frames_per_buffer_; // Number of frames in a buffer. int effects_; // Bitmask using PlatformEffectsMask. @@ -277,8 +268,6 @@ return a.channels() < b.channels(); if (a.sample_rate() != b.sample_rate()) return a.sample_rate() < b.sample_rate(); - if (a.bits_per_sample() != b.bits_per_sample()) - return a.bits_per_sample() < b.bits_per_sample(); return a.frames_per_buffer() < b.frames_per_buffer(); }
diff --git a/media/base/audio_parameters_unittest.cc b/media/base/audio_parameters_unittest.cc index b07d710..d3ecf4b 100644 --- a/media/base/audio_parameters_unittest.cc +++ b/media/base/audio_parameters_unittest.cc
@@ -13,7 +13,6 @@ TEST(AudioParameters, Constructor_Default) { AudioParameters::Format expected_format = AudioParameters::AUDIO_PCM_LINEAR; - int expected_bits = 0; int expected_channels = 0; ChannelLayout expected_channel_layout = CHANNEL_LAYOUT_NONE; int expected_rate = 0; @@ -25,7 +24,6 @@ AudioParameters params; EXPECT_EQ(expected_format, params.format()); - EXPECT_EQ(expected_bits, params.bits_per_sample()); EXPECT_EQ(expected_channels, params.channels()); EXPECT_EQ(expected_channel_layout, params.channel_layout()); EXPECT_EQ(expected_rate, params.sample_rate()); @@ -37,17 +35,15 @@ TEST(AudioParameters, Constructor_ParameterValues) { AudioParameters::Format expected_format = AudioParameters::AUDIO_PCM_LOW_LATENCY; - int expected_bits = 16; int expected_channels = 6; ChannelLayout expected_channel_layout = CHANNEL_LAYOUT_5_1; int expected_rate = 44100; int expected_samples = 880; AudioParameters params(expected_format, expected_channel_layout, - expected_rate, expected_bits, expected_samples); + expected_rate, expected_samples); EXPECT_EQ(expected_format, params.format()); - EXPECT_EQ(expected_bits, params.bits_per_sample()); EXPECT_EQ(expected_channels, params.channels()); EXPECT_EQ(expected_channel_layout, params.channel_layout()); EXPECT_EQ(expected_rate, params.sample_rate()); @@ -56,147 +52,81 @@ TEST(AudioParameters, GetBytesPerBuffer) { EXPECT_EQ(100, AudioParameters(AudioParameters::AUDIO_PCM_LINEAR, - CHANNEL_LAYOUT_MONO, 1000, 8, 100) - .GetBytesPerBuffer()); + CHANNEL_LAYOUT_MONO, 1000, 100) + .GetBytesPerBuffer(kSampleFormatU8)); EXPECT_EQ(200, AudioParameters(AudioParameters::AUDIO_PCM_LINEAR, - CHANNEL_LAYOUT_MONO, 1000, 16, 100) - .GetBytesPerBuffer()); + CHANNEL_LAYOUT_MONO, 1000, 100) + .GetBytesPerBuffer(kSampleFormatS16)); EXPECT_EQ(200, AudioParameters(AudioParameters::AUDIO_PCM_LINEAR, - CHANNEL_LAYOUT_STEREO, 1000, 8, 100) - .GetBytesPerBuffer()); + CHANNEL_LAYOUT_STEREO, 1000, 100) + .GetBytesPerBuffer(kSampleFormatU8)); EXPECT_EQ(200, AudioParameters(AudioParameters::AUDIO_PCM_LINEAR, - CHANNEL_LAYOUT_MONO, 1000, 8, 200) - .GetBytesPerBuffer()); + CHANNEL_LAYOUT_MONO, 1000, 200) + .GetBytesPerBuffer(kSampleFormatU8)); EXPECT_EQ(800, AudioParameters(AudioParameters::AUDIO_PCM_LINEAR, - CHANNEL_LAYOUT_STEREO, 1000, 16, 200) - .GetBytesPerBuffer()); - EXPECT_EQ( - 300, AudioParameters(AudioParameters::AUDIO_PCM_LINEAR, - CHANNEL_LAYOUT_STEREO_AND_KEYBOARD_MIC, 1000, 8, 100) - .GetBytesPerBuffer()); -} - -TEST(AudioParameters, GetBytesPerSecond) { - EXPECT_EQ(0, AudioParameters(AudioParameters::AUDIO_PCM_LINEAR, - CHANNEL_LAYOUT_NONE, 0, 0, 0) - .GetBytesPerSecond()); - EXPECT_EQ(0, AudioParameters(AudioParameters::AUDIO_PCM_LINEAR, - CHANNEL_LAYOUT_STEREO, 0, 0, 0) - .GetBytesPerSecond()); - EXPECT_EQ(0, AudioParameters(AudioParameters::AUDIO_PCM_LINEAR, - CHANNEL_LAYOUT_NONE, 100, 0, 0) - .GetBytesPerSecond()); - EXPECT_EQ(0, AudioParameters(AudioParameters::AUDIO_PCM_LINEAR, - CHANNEL_LAYOUT_NONE, 0, 8, 0) - .GetBytesPerSecond()); - EXPECT_EQ(200, AudioParameters(AudioParameters::AUDIO_PCM_LINEAR, - CHANNEL_LAYOUT_STEREO, 100, 8, 0) - .GetBytesPerSecond()); + CHANNEL_LAYOUT_STEREO, 1000, 200) + .GetBytesPerBuffer(kSampleFormatS16)); + EXPECT_EQ(300, + AudioParameters(AudioParameters::AUDIO_PCM_LINEAR, + CHANNEL_LAYOUT_STEREO_AND_KEYBOARD_MIC, 1000, 100) + .GetBytesPerBuffer(kSampleFormatU8)); } TEST(AudioParameters, Compare) { AudioParameters values[] = { AudioParameters(AudioParameters::AUDIO_PCM_LINEAR, CHANNEL_LAYOUT_MONO, - 1000, 8, 100), + 1000, 100), AudioParameters(AudioParameters::AUDIO_PCM_LINEAR, CHANNEL_LAYOUT_MONO, - 1000, 8, 200), + 1000, 200), AudioParameters(AudioParameters::AUDIO_PCM_LINEAR, CHANNEL_LAYOUT_MONO, - 1000, 16, 100), + 2000, 100), AudioParameters(AudioParameters::AUDIO_PCM_LINEAR, CHANNEL_LAYOUT_MONO, - 1000, 16, 200), - AudioParameters(AudioParameters::AUDIO_PCM_LINEAR, CHANNEL_LAYOUT_MONO, - 2000, 8, 100), - AudioParameters(AudioParameters::AUDIO_PCM_LINEAR, CHANNEL_LAYOUT_MONO, - 2000, 8, 200), - AudioParameters(AudioParameters::AUDIO_PCM_LINEAR, CHANNEL_LAYOUT_MONO, - 2000, 16, 100), - AudioParameters(AudioParameters::AUDIO_PCM_LINEAR, CHANNEL_LAYOUT_MONO, - 2000, 16, 200), + 2000, 200), AudioParameters(AudioParameters::AUDIO_PCM_LINEAR, CHANNEL_LAYOUT_STEREO, - 1000, 8, 100), + 1000, 100), AudioParameters(AudioParameters::AUDIO_PCM_LINEAR, CHANNEL_LAYOUT_STEREO, - 1000, 8, 200), + 1000, 200), AudioParameters(AudioParameters::AUDIO_PCM_LINEAR, CHANNEL_LAYOUT_STEREO, - 1000, 16, 100), + 2000, 100), AudioParameters(AudioParameters::AUDIO_PCM_LINEAR, CHANNEL_LAYOUT_STEREO, - 1000, 16, 200), - AudioParameters(AudioParameters::AUDIO_PCM_LINEAR, CHANNEL_LAYOUT_STEREO, - 2000, 8, 100), - AudioParameters(AudioParameters::AUDIO_PCM_LINEAR, CHANNEL_LAYOUT_STEREO, - 2000, 8, 200), - AudioParameters(AudioParameters::AUDIO_PCM_LINEAR, CHANNEL_LAYOUT_STEREO, - 2000, 16, 100), - AudioParameters(AudioParameters::AUDIO_PCM_LINEAR, CHANNEL_LAYOUT_STEREO, - 2000, 16, 200), + 2000, 200), AudioParameters(AudioParameters::AUDIO_PCM_LINEAR, - CHANNEL_LAYOUT_STEREO_AND_KEYBOARD_MIC, 1000, 8, 100), + CHANNEL_LAYOUT_STEREO_AND_KEYBOARD_MIC, 1000, 100), AudioParameters(AudioParameters::AUDIO_PCM_LINEAR, - CHANNEL_LAYOUT_STEREO_AND_KEYBOARD_MIC, 1000, 8, 200), + CHANNEL_LAYOUT_STEREO_AND_KEYBOARD_MIC, 1000, 200), AudioParameters(AudioParameters::AUDIO_PCM_LINEAR, - CHANNEL_LAYOUT_STEREO_AND_KEYBOARD_MIC, 1000, 16, 100), + CHANNEL_LAYOUT_STEREO_AND_KEYBOARD_MIC, 2000, 100), AudioParameters(AudioParameters::AUDIO_PCM_LINEAR, - CHANNEL_LAYOUT_STEREO_AND_KEYBOARD_MIC, 1000, 16, 200), - AudioParameters(AudioParameters::AUDIO_PCM_LINEAR, - CHANNEL_LAYOUT_STEREO_AND_KEYBOARD_MIC, 2000, 8, 100), - AudioParameters(AudioParameters::AUDIO_PCM_LINEAR, - CHANNEL_LAYOUT_STEREO_AND_KEYBOARD_MIC, 2000, 8, 200), - AudioParameters(AudioParameters::AUDIO_PCM_LINEAR, - CHANNEL_LAYOUT_STEREO_AND_KEYBOARD_MIC, 2000, 16, 100), - AudioParameters(AudioParameters::AUDIO_PCM_LINEAR, - CHANNEL_LAYOUT_STEREO_AND_KEYBOARD_MIC, 2000, 16, 200), + CHANNEL_LAYOUT_STEREO_AND_KEYBOARD_MIC, 2000, 200), AudioParameters(AudioParameters::AUDIO_PCM_LOW_LATENCY, - CHANNEL_LAYOUT_MONO, 1000, 8, 100), + CHANNEL_LAYOUT_MONO, 1000, 100), AudioParameters(AudioParameters::AUDIO_PCM_LOW_LATENCY, - CHANNEL_LAYOUT_MONO, 1000, 8, 200), + CHANNEL_LAYOUT_MONO, 1000, 200), AudioParameters(AudioParameters::AUDIO_PCM_LOW_LATENCY, - CHANNEL_LAYOUT_MONO, 1000, 16, 100), + CHANNEL_LAYOUT_MONO, 2000, 100), AudioParameters(AudioParameters::AUDIO_PCM_LOW_LATENCY, - CHANNEL_LAYOUT_MONO, 1000, 16, 200), - AudioParameters(AudioParameters::AUDIO_PCM_LOW_LATENCY, - CHANNEL_LAYOUT_MONO, 2000, 8, 100), - AudioParameters(AudioParameters::AUDIO_PCM_LOW_LATENCY, - CHANNEL_LAYOUT_MONO, 2000, 8, 200), - AudioParameters(AudioParameters::AUDIO_PCM_LOW_LATENCY, - CHANNEL_LAYOUT_MONO, 2000, 16, 100), - AudioParameters(AudioParameters::AUDIO_PCM_LOW_LATENCY, - CHANNEL_LAYOUT_MONO, 2000, 16, 200), + CHANNEL_LAYOUT_MONO, 2000, 200), AudioParameters(AudioParameters::AUDIO_PCM_LOW_LATENCY, - CHANNEL_LAYOUT_STEREO, 1000, 8, 100), + CHANNEL_LAYOUT_STEREO, 1000, 100), AudioParameters(AudioParameters::AUDIO_PCM_LOW_LATENCY, - CHANNEL_LAYOUT_STEREO, 1000, 8, 200), + CHANNEL_LAYOUT_STEREO, 1000, 200), AudioParameters(AudioParameters::AUDIO_PCM_LOW_LATENCY, - CHANNEL_LAYOUT_STEREO, 1000, 16, 100), + CHANNEL_LAYOUT_STEREO, 2000, 100), AudioParameters(AudioParameters::AUDIO_PCM_LOW_LATENCY, - CHANNEL_LAYOUT_STEREO, 1000, 16, 200), - AudioParameters(AudioParameters::AUDIO_PCM_LOW_LATENCY, - CHANNEL_LAYOUT_STEREO, 2000, 8, 100), - AudioParameters(AudioParameters::AUDIO_PCM_LOW_LATENCY, - CHANNEL_LAYOUT_STEREO, 2000, 8, 200), - AudioParameters(AudioParameters::AUDIO_PCM_LOW_LATENCY, - CHANNEL_LAYOUT_STEREO, 2000, 16, 100), - AudioParameters(AudioParameters::AUDIO_PCM_LOW_LATENCY, - CHANNEL_LAYOUT_STEREO, 2000, 16, 200), + CHANNEL_LAYOUT_STEREO, 2000, 200), AudioParameters(AudioParameters::AUDIO_PCM_LOW_LATENCY, - CHANNEL_LAYOUT_STEREO_AND_KEYBOARD_MIC, 1000, 8, 100), + CHANNEL_LAYOUT_STEREO_AND_KEYBOARD_MIC, 1000, 100), AudioParameters(AudioParameters::AUDIO_PCM_LOW_LATENCY, - CHANNEL_LAYOUT_STEREO_AND_KEYBOARD_MIC, 1000, 8, 200), + CHANNEL_LAYOUT_STEREO_AND_KEYBOARD_MIC, 1000, 200), AudioParameters(AudioParameters::AUDIO_PCM_LOW_LATENCY, - CHANNEL_LAYOUT_STEREO_AND_KEYBOARD_MIC, 1000, 16, 100), + CHANNEL_LAYOUT_STEREO_AND_KEYBOARD_MIC, 2000, 100), AudioParameters(AudioParameters::AUDIO_PCM_LOW_LATENCY, - CHANNEL_LAYOUT_STEREO_AND_KEYBOARD_MIC, 1000, 16, 200), - AudioParameters(AudioParameters::AUDIO_PCM_LOW_LATENCY, - CHANNEL_LAYOUT_STEREO_AND_KEYBOARD_MIC, 2000, 8, 100), - AudioParameters(AudioParameters::AUDIO_PCM_LOW_LATENCY, - CHANNEL_LAYOUT_STEREO_AND_KEYBOARD_MIC, 2000, 8, 200), - AudioParameters(AudioParameters::AUDIO_PCM_LOW_LATENCY, - CHANNEL_LAYOUT_STEREO_AND_KEYBOARD_MIC, 2000, 16, 100), - AudioParameters(AudioParameters::AUDIO_PCM_LOW_LATENCY, - CHANNEL_LAYOUT_STEREO_AND_KEYBOARD_MIC, 2000, 16, 200), + CHANNEL_LAYOUT_STEREO_AND_KEYBOARD_MIC, 2000, 200), }; for (size_t i = 0; i < arraysize(values); ++i) { @@ -216,7 +146,7 @@ ChannelLayout expected_layout = CHANNEL_LAYOUT_DISCRETE; AudioParameters params(AudioParameters::AUDIO_PCM_LOW_LATENCY, - expected_layout, 44100, 16, 880); + expected_layout, 44100, 880); params.set_channels_for_discrete(expected_channels); EXPECT_EQ(expected_channels, params.channels()); EXPECT_EQ(expected_layout, params.channel_layout());
diff --git a/media/base/audio_renderer_mixer_input_unittest.cc b/media/base/audio_renderer_mixer_input_unittest.cc index e6735a2..7b6013c8 100644 --- a/media/base/audio_renderer_mixer_input_unittest.cc +++ b/media/base/audio_renderer_mixer_input_unittest.cc
@@ -25,7 +25,6 @@ namespace media { -static const int kBitsPerChannel = 16; static const int kSampleRate = 48000; static const int kBufferSize = 8192; static const int kRenderFrameId = 42; @@ -39,9 +38,9 @@ AudioRendererMixerPool { public: AudioRendererMixerInputTest() { - audio_parameters_ = AudioParameters( - AudioParameters::AUDIO_PCM_LINEAR, kChannelLayout, kSampleRate, - kBitsPerChannel, kBufferSize); + audio_parameters_ = + AudioParameters(AudioParameters::AUDIO_PCM_LINEAR, kChannelLayout, + kSampleRate, kBufferSize); CreateMixerInput(kDefaultDeviceId); fake_callback_.reset(new FakeAudioRenderCallback(0, kSampleRate));
diff --git a/media/base/audio_renderer_mixer_unittest.cc b/media/base/audio_renderer_mixer_unittest.cc index f45f608..3e615bc 100644 --- a/media/base/audio_renderer_mixer_unittest.cc +++ b/media/base/audio_renderer_mixer_unittest.cc
@@ -36,7 +36,6 @@ const int kMixerCycles = 3; // Parameters used for testing. -const int kBitsPerChannel = 32; const ChannelLayout kChannelLayout = CHANNEL_LAYOUT_STEREO; const int kHighLatencyBufferSize = 8192; const int kLowLatencyBufferSize = 256; @@ -64,14 +63,14 @@ const int* const sample_rates = std::get<0>(GetParam()); size_t sample_rates_count = std::get<1>(GetParam()); for (size_t i = 0; i < sample_rates_count; ++i) - input_parameters_.push_back(AudioParameters( - AudioParameters::AUDIO_PCM_LINEAR, kChannelLayout, sample_rates[i], - kBitsPerChannel, kHighLatencyBufferSize)); + input_parameters_.push_back( + AudioParameters(AudioParameters::AUDIO_PCM_LINEAR, kChannelLayout, + sample_rates[i], kHighLatencyBufferSize)); // Create output parameters based on test parameters. output_parameters_ = AudioParameters(AudioParameters::AUDIO_PCM_LOW_LATENCY, kChannelLayout, - std::get<2>(GetParam()), 16, kLowLatencyBufferSize); + std::get<2>(GetParam()), kLowLatencyBufferSize); sink_ = new MockAudioRendererSink(); EXPECT_CALL(*sink_.get(), Start());
diff --git a/media/base/channel_mixer_unittest.cc b/media/base/channel_mixer_unittest.cc index 250f9995..56977ae 100644 --- a/media/base/channel_mixer_unittest.cc +++ b/media/base/channel_mixer_unittest.cc
@@ -104,7 +104,7 @@ std::unique_ptr<AudioBus> input_bus = AudioBus::Create(input_channels, kFrames); AudioParameters input_audio(AudioParameters::AUDIO_PCM_LINEAR, input_layout, - AudioParameters::kAudioCDSampleRate, 16, kFrames); + AudioParameters::kAudioCDSampleRate, kFrames); if (input_layout == CHANNEL_LAYOUT_DISCRETE) input_audio.set_channels_for_discrete(input_channels); @@ -113,8 +113,7 @@ std::unique_ptr<AudioBus> output_bus = AudioBus::Create(output_channels, kFrames); AudioParameters output_audio(AudioParameters::AUDIO_PCM_LINEAR, output_layout, - AudioParameters::kAudioCDSampleRate, 16, - kFrames); + AudioParameters::kAudioCDSampleRate, kFrames); if (output_layout == CHANNEL_LAYOUT_DISCRETE) output_audio.set_channels_for_discrete(output_channels);
diff --git a/media/base/fake_audio_renderer_sink.cc b/media/base/fake_audio_renderer_sink.cc index 06bbf7d8..e80a0f81 100644 --- a/media/base/fake_audio_renderer_sink.cc +++ b/media/base/fake_audio_renderer_sink.cc
@@ -15,7 +15,6 @@ AudioParameters(AudioParameters::AUDIO_FAKE, CHANNEL_LAYOUT_STEREO, AudioParameters::kTelephoneSampleRate, - 16, 1)) {} FakeAudioRendererSink::FakeAudioRendererSink(
diff --git a/media/base/fake_audio_worker_unittest.cc b/media/base/fake_audio_worker_unittest.cc index dee4453e..44e48d6 100644 --- a/media/base/fake_audio_worker_unittest.cc +++ b/media/base/fake_audio_worker_unittest.cc
@@ -22,7 +22,6 @@ : params_(AudioParameters::AUDIO_FAKE, CHANNEL_LAYOUT_STEREO, 44100, - 8, 128), fake_worker_(message_loop_.task_runner(), params_), seen_callbacks_(0) {
diff --git a/media/base/fallback_video_decoder.cc b/media/base/fallback_video_decoder.cc new file mode 100644 index 0000000..50568e5 --- /dev/null +++ b/media/base/fallback_video_decoder.cc
@@ -0,0 +1,102 @@ +// Copyright 2018 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 <utility> + +#include "base/bind.h" +#include "media/base/decoder_buffer.h" +#include "media/base/fallback_video_decoder.h" +#include "media/base/video_decoder_config.h" + +namespace media { + +FallbackVideoDecoder::FallbackVideoDecoder( + std::unique_ptr<VideoDecoder> preferred, + std::unique_ptr<VideoDecoder> fallback) + : preferred_decoder_(std::move(preferred)), + fallback_decoder_(std::move(fallback)), + weak_factory_(this) {} + +void FallbackVideoDecoder::Initialize( + const VideoDecoderConfig& config, + bool low_delay, + CdmContext* cdm_context, + const InitCB& init_cb, + const OutputCB& output_cb, + const WaitingForDecryptionKeyCB& waiting_for_decryption_key_cb) { + // If we've already fallen back, just reinitialize the selected decoder. + if (selected_decoder_ && did_fallback_) { + selected_decoder_->Initialize(config, low_delay, cdm_context, init_cb, + output_cb, waiting_for_decryption_key_cb); + return; + } + + InitCB fallback_initialize_cb = base::BindRepeating( + &FallbackVideoDecoder::FallbackInitialize, weak_factory_.GetWeakPtr(), + config, low_delay, cdm_context, init_cb, output_cb, + waiting_for_decryption_key_cb); + + preferred_decoder_->Initialize(config, low_delay, cdm_context, + std::move(fallback_initialize_cb), output_cb, + waiting_for_decryption_key_cb); +} + +void FallbackVideoDecoder::FallbackInitialize( + const VideoDecoderConfig& config, + bool low_delay, + CdmContext* cdm_context, + const InitCB& init_cb, + const OutputCB& output_cb, + const WaitingForDecryptionKeyCB& waiting_for_decryption_key_cb, + bool success) { + // The preferred decoder was successfully initialized. + if (success) { + selected_decoder_ = preferred_decoder_.get(); + init_cb.Run(true); + return; + } + + did_fallback_ = true; + preferred_decoder_.reset(); + selected_decoder_ = fallback_decoder_.get(); + fallback_decoder_->Initialize(config, low_delay, cdm_context, init_cb, + output_cb, waiting_for_decryption_key_cb); +} + +void FallbackVideoDecoder::Decode(scoped_refptr<DecoderBuffer> buffer, + const DecodeCB& decode_cb) { + DCHECK(selected_decoder_); + selected_decoder_->Decode(std::move(buffer), decode_cb); +} + +void FallbackVideoDecoder::Reset(const base::RepeatingClosure& reset_cb) { + DCHECK(selected_decoder_); + selected_decoder_->Reset(reset_cb); +} + +bool FallbackVideoDecoder::NeedsBitstreamConversion() const { + DCHECK(selected_decoder_); + return selected_decoder_->NeedsBitstreamConversion(); +} + +bool FallbackVideoDecoder::CanReadWithoutStalling() const { + DCHECK(selected_decoder_); + return selected_decoder_->CanReadWithoutStalling(); +} + +int FallbackVideoDecoder::GetMaxDecodeRequests() const { + DCHECK(selected_decoder_); + return selected_decoder_->GetMaxDecodeRequests(); +} + +std::string FallbackVideoDecoder::GetDisplayName() const { + // MojoVideoDecoder always identifies itself as such, and never asks for the + // name of the underlying decoder. + NOTREACHED(); + return "FallbackVideoDecoder"; +} + +FallbackVideoDecoder::~FallbackVideoDecoder() = default; + +} // namespace media
diff --git a/media/base/fallback_video_decoder.h b/media/base/fallback_video_decoder.h new file mode 100644 index 0000000..ed7bcd3d --- /dev/null +++ b/media/base/fallback_video_decoder.h
@@ -0,0 +1,63 @@ +// Copyright 2018 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 MEDIA_BASE_FALLBACK_VIDEO_DECODER_H_ +#define MEDIA_BASE_FALLBACK_VIDEO_DECODER_H_ + +#include <memory> +#include <string> + +#include "base/memory/weak_ptr.h" +#include "media/base/video_decoder.h" + +namespace media { + +// A Wrapper VideoDecoder which supports a fallback and a preferred decoder. +class MEDIA_EXPORT FallbackVideoDecoder : public VideoDecoder { + public: + FallbackVideoDecoder(std::unique_ptr<VideoDecoder> preferred, + std::unique_ptr<VideoDecoder> fallback); + + // media::VideoDecoder implementation. + std::string GetDisplayName() const override; + void Initialize( + const VideoDecoderConfig& config, + bool low_delay, + CdmContext* cdm_context, + const InitCB& init_cb, + const OutputCB& output_cb, + const WaitingForDecryptionKeyCB& waiting_for_decryption_key_cb) override; + void Decode(scoped_refptr<DecoderBuffer> buffer, + const DecodeCB& decode_cb) override; + void Reset(const base::RepeatingClosure& reset_cb) override; + bool NeedsBitstreamConversion() const override; + bool CanReadWithoutStalling() const override; + int GetMaxDecodeRequests() const override; + + protected: + ~FallbackVideoDecoder() override; + + private: + void FallbackInitialize( + const VideoDecoderConfig& config, + bool low_delay, + CdmContext* cdm_context, + const InitCB& init_cb, + const OutputCB& output_cb, + const WaitingForDecryptionKeyCB& waiting_for_decryption_key_cb, + bool success); + + std::unique_ptr<media::VideoDecoder> preferred_decoder_; + std::unique_ptr<media::VideoDecoder> fallback_decoder_; + media::VideoDecoder* selected_decoder_ = nullptr; + bool did_fallback_ = false; + + base::WeakPtrFactory<FallbackVideoDecoder> weak_factory_; + + DISALLOW_COPY_AND_ASSIGN(FallbackVideoDecoder); +}; + +} // namespace media + +#endif // MEDIA_BASE_FALLBACK_VIDEO_DECODER_H_
diff --git a/media/base/fallback_video_decoder_unittest.cc b/media/base/fallback_video_decoder_unittest.cc new file mode 100644 index 0000000..ca4bcbce --- /dev/null +++ b/media/base/fallback_video_decoder_unittest.cc
@@ -0,0 +1,160 @@ +// Copyright 2018 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 <tuple> + +#include "base/bind.h" +#include "base/bind_helpers.h" +#include "base/run_loop.h" +#include "media/base/decoder_buffer.h" +#include "media/base/fallback_video_decoder.h" +#include "media/base/gmock_callback_support.h" +#include "media/base/mock_filters.h" +#include "media/base/test_helpers.h" +#include "media/base/video_decoder.h" +#include "media/base/video_decoder_config.h" +#include "testing/gmock/include/gmock/gmock.h" +#include "testing/gtest/include/gtest/gtest-param-test.h" +#include "testing/gtest/include/gtest/gtest.h" + +using ::testing::StrictMock; +using ::testing::_; + +namespace media { + +class FallbackVideoDecoderUnittest : public ::testing::TestWithParam<bool> { + public: + FallbackVideoDecoderUnittest() + : backup_decoder_(nullptr), + preferred_decoder_(nullptr), + fallback_decoder_(nullptr) {} + + ~FallbackVideoDecoderUnittest() override { Destroy(); } + + std::unique_ptr<VideoDecoder> MakeMockDecoderWithExpectations( + bool is_fallback, + bool preferred_should_succeed) { + std::string n = is_fallback ? "Fallback" : "Preferred"; + StrictMock<MockVideoDecoder>* result = new StrictMock<MockVideoDecoder>(n); + + if (is_fallback && !preferred_should_succeed) { + EXPECT_CALL(*result, Initialize(_, _, _, _, _, _)) + .WillOnce(RunCallback<3>(true)); + } + + if (!is_fallback) { + preferred_decoder_ = result; + EXPECT_CALL(*result, Initialize(_, _, _, _, _, _)) + .WillOnce(RunCallback<3>(preferred_should_succeed)); + } else { + backup_decoder_ = result; + } + + return std::unique_ptr<VideoDecoder>(result); + } + + void Initialize(bool preferred_should_succeed) { + fallback_decoder_ = new FallbackVideoDecoder( + MakeMockDecoderWithExpectations(false, preferred_should_succeed), + MakeMockDecoderWithExpectations(true, preferred_should_succeed)); + + fallback_decoder_->Initialize( + video_decoder_config_, false, nullptr, + base::BindRepeating([](bool success) { EXPECT_TRUE(success); }), + base::DoNothing(), base::DoNothing()); + } + + protected: + void Destroy() { std::default_delete<VideoDecoder>()(fallback_decoder_); } + + bool PreferredShouldSucceed() { return GetParam(); } + + StrictMock<MockVideoDecoder>* backup_decoder_; + StrictMock<MockVideoDecoder>* preferred_decoder_; + VideoDecoder* fallback_decoder_; + VideoDecoderConfig video_decoder_config_; + + private: + DISALLOW_COPY_AND_ASSIGN(FallbackVideoDecoderUnittest); +}; + +INSTANTIATE_TEST_CASE_P(DoesPreferredInitFail, + FallbackVideoDecoderUnittest, + testing::ValuesIn({true, false})); + +#define EXPECT_ON_CORRECT_DECODER(method) \ + if (PreferredShouldSucceed()) \ + EXPECT_CALL(*preferred_decoder_, method); \ + else \ + EXPECT_CALL(*backup_decoder_, method) // Intentionally leave off semicolon. + +// Do not test the name lookup; it is NOTREACHED. +TEST_P(FallbackVideoDecoderUnittest, MethodsRedirectedAsExpected) { + Initialize(PreferredShouldSucceed()); + + EXPECT_ON_CORRECT_DECODER(Decode(_, _)); + fallback_decoder_->Decode(nullptr, base::DoNothing()); + + EXPECT_ON_CORRECT_DECODER(Reset(_)); + fallback_decoder_->Reset(base::DoNothing()); + + EXPECT_ON_CORRECT_DECODER(NeedsBitstreamConversion()); + fallback_decoder_->NeedsBitstreamConversion(); + + EXPECT_ON_CORRECT_DECODER(CanReadWithoutStalling()); + fallback_decoder_->CanReadWithoutStalling(); + + EXPECT_ON_CORRECT_DECODER(GetMaxDecodeRequests()); + fallback_decoder_->GetMaxDecodeRequests(); +} + +// │ first initialization │ second initialization │ +// preferred │ preferred │ backup │ preferred │ backup │ +// will succeed │ init called │ init called │ init called │ init called │ +//───────────────┼─────────────┼─────────────┼─────────────┼─────────────┤ +// false │ ✓ │ ✓ │ x │ ✓ │ +// true │ ✓ │ x │ ✓ │ ✓ │ +TEST_P(FallbackVideoDecoderUnittest, ReinitializeWithPreferredFailing) { + Initialize(PreferredShouldSucceed()); + + // If we succeedd the first time, it should still be alive. + if (PreferredShouldSucceed()) { + EXPECT_CALL(*preferred_decoder_, Initialize(_, _, _, _, _, _)) + .WillOnce(RunCallback<3>(false)); // fail initialization + } + EXPECT_CALL(*backup_decoder_, Initialize(_, _, _, _, _, _)) + .WillOnce(RunCallback<3>(true)); + + fallback_decoder_->Initialize( + video_decoder_config_, false, nullptr, + base::BindRepeating([](bool success) { EXPECT_TRUE(success); }), + base::DoNothing(), base::DoNothing()); +} + +// │ first initialization │ second initialization │ +// preferred │ preferred │ backup │ preferred │ backup │ +// will succeed │ init called │ init called │ init called │ init called │ +//───────────────┼─────────────┼─────────────┼─────────────┼─────────────┤ +// false │ ✓ │ ✓ │ x │ ✓ │ +// true │ ✓ │ x │ ✓ │ x │ +TEST_P(FallbackVideoDecoderUnittest, ReinitializeWithPreferredSuccessful) { + Initialize(PreferredShouldSucceed()); + + // If we succeedd the first time, it should still be alive. + if (PreferredShouldSucceed()) { + EXPECT_CALL(*preferred_decoder_, Initialize(_, _, _, _, _, _)) + .WillOnce(RunCallback<3>(true)); // pass initialization + } else { + // Otherwise, preferred was deleted, and we only backup still exists. + EXPECT_CALL(*backup_decoder_, Initialize(_, _, _, _, _, _)) + .WillOnce(RunCallback<3>(true)); + } + + fallback_decoder_->Initialize( + video_decoder_config_, false, nullptr, + base::BindRepeating([](bool success) { EXPECT_TRUE(success); }), + base::DoNothing(), base::DoNothing()); +} + +} // namespace media
diff --git a/media/base/ipc/media_param_traits.cc b/media/base/ipc/media_param_traits.cc index 6f5e321..9967314 100644 --- a/media/base/ipc/media_param_traits.cc +++ b/media/base/ipc/media_param_traits.cc
@@ -26,7 +26,6 @@ WriteParam(m, p.format()); WriteParam(m, p.channel_layout()); WriteParam(m, p.sample_rate()); - WriteParam(m, p.bits_per_sample()); WriteParam(m, p.frames_per_buffer()); WriteParam(m, p.channels()); WriteParam(m, p.effects()); @@ -39,13 +38,12 @@ AudioParameters* r) { AudioParameters::Format format; ChannelLayout channel_layout; - int sample_rate, bits_per_sample, frames_per_buffer, channels, effects; + int sample_rate, frames_per_buffer, channels, effects; std::vector<media::Point> mic_positions; AudioLatency::LatencyType latency_tag; if (!ReadParam(m, iter, &format) || !ReadParam(m, iter, &channel_layout) || !ReadParam(m, iter, &sample_rate) || - !ReadParam(m, iter, &bits_per_sample) || !ReadParam(m, iter, &frames_per_buffer) || !ReadParam(m, iter, &channels) || !ReadParam(m, iter, &effects) || !ReadParam(m, iter, &mic_positions) || @@ -53,7 +51,7 @@ return false; } - AudioParameters params(format, channel_layout, sample_rate, bits_per_sample, + AudioParameters params(format, channel_layout, sample_rate, frames_per_buffer); params.set_channels_for_discrete(channels); params.set_effects(effects);
diff --git a/media/base/mock_audio_renderer_sink.cc b/media/base/mock_audio_renderer_sink.cc index 3549516..b3596819 100644 --- a/media/base/mock_audio_renderer_sink.cc +++ b/media/base/mock_audio_renderer_sink.cc
@@ -19,7 +19,6 @@ AudioParameters(AudioParameters::AUDIO_FAKE, CHANNEL_LAYOUT_STEREO, AudioParameters::kTelephoneSampleRate, - 16, 1)) {} MockAudioRendererSink::MockAudioRendererSink(
diff --git a/media/base/mock_filters.h b/media/base/mock_filters.h index ce059ee..41f90d6 100644 --- a/media/base/mock_filters.h +++ b/media/base/mock_filters.h
@@ -207,6 +207,7 @@ MOCK_METHOD1(Reset, void(const base::Closure&)); MOCK_CONST_METHOD0(GetMaxDecodeRequests, int()); MOCK_CONST_METHOD0(CanReadWithoutStalling, bool()); + MOCK_CONST_METHOD0(NeedsBitstreamConversion, bool()); private: std::string decoder_name_;
diff --git a/media/base/sample_format.cc b/media/base/sample_format.cc index e6141a69..361f5d9 100644 --- a/media/base/sample_format.cc +++ b/media/base/sample_format.cc
@@ -31,6 +31,10 @@ return 0; } +int SampleFormatToBitsPerChannel(SampleFormat sample_format) { + return SampleFormatToBytesPerChannel(sample_format) * 8; +} + const char* SampleFormatToString(SampleFormat sample_format) { switch(sample_format) { case kUnknownSampleFormat:
diff --git a/media/base/sample_format.h b/media/base/sample_format.h index 121b9831..ab9a731 100644 --- a/media/base/sample_format.h +++ b/media/base/sample_format.h
@@ -5,7 +5,7 @@ #ifndef MEDIA_BASE_SAMPLE_FORMAT_H_ #define MEDIA_BASE_SAMPLE_FORMAT_H_ -#include "media/base/media_export.h" +#include "media/base/media_shmem_export.h" namespace media { @@ -32,19 +32,21 @@ // Returns the number of bytes used per channel for the specified // |sample_format|. -MEDIA_EXPORT int SampleFormatToBytesPerChannel(SampleFormat sample_format); +MEDIA_SHMEM_EXPORT int SampleFormatToBytesPerChannel( + SampleFormat sample_format); +MEDIA_SHMEM_EXPORT int SampleFormatToBitsPerChannel(SampleFormat sample_format); // Returns the name of the sample format as a string -MEDIA_EXPORT const char* SampleFormatToString(SampleFormat sample_format); +MEDIA_SHMEM_EXPORT const char* SampleFormatToString(SampleFormat sample_format); // Returns true if |sample_format| is planar, false otherwise. -MEDIA_EXPORT bool IsPlanar(SampleFormat sample_format); +MEDIA_SHMEM_EXPORT bool IsPlanar(SampleFormat sample_format); // Returns true if |sample_format| is interleaved, false otherwise. -MEDIA_EXPORT bool IsInterleaved(SampleFormat sample_format); +MEDIA_SHMEM_EXPORT bool IsInterleaved(SampleFormat sample_format); // Returns true if |sample_format| is compressed bitstream, false otherwise. -MEDIA_EXPORT bool IsBitstream(SampleFormat sample_format); +MEDIA_SHMEM_EXPORT bool IsBitstream(SampleFormat sample_format); } // namespace media
diff --git a/media/base/silent_sink_suspender_unittest.cc b/media/base/silent_sink_suspender_unittest.cc index 50a7c13..1e0c2c9 100644 --- a/media/base/silent_sink_suspender_unittest.cc +++ b/media/base/silent_sink_suspender_unittest.cc
@@ -22,7 +22,6 @@ : params_(AudioParameters::AUDIO_FAKE, CHANNEL_LAYOUT_MONO, 44100, - 8, 128), mock_sink_(new testing::StrictMock<MockAudioRendererSink>()), fake_callback_(0.1, params_.sample_rate()),
diff --git a/media/base/test_helpers.cc b/media/base/test_helpers.cc index c4a349b..36e6965 100644 --- a/media/base/test_helpers.cc +++ b/media/base/test_helpers.cc
@@ -203,7 +203,7 @@ // static AudioParameters TestAudioParameters::Normal() { return AudioParameters(AudioParameters::AUDIO_PCM_LOW_LATENCY, - CHANNEL_LAYOUT_STEREO, 48000, 16, 2048); + CHANNEL_LAYOUT_STEREO, 48000, 2048); } template <class T>
diff --git a/media/blink/webaudiosourceprovider_impl_unittest.cc b/media/blink/webaudiosourceprovider_impl_unittest.cc index a9f735c..7f8178bb 100644 --- a/media/blink/webaudiosourceprovider_impl_unittest.cc +++ b/media/blink/webaudiosourceprovider_impl_unittest.cc
@@ -66,7 +66,6 @@ : params_(AudioParameters::AUDIO_PCM_LINEAR, CHANNEL_LAYOUT_STEREO, kSampleRate, - 16, 64), fake_callback_(0.1, kSampleRate), mock_sink_(CreateWaspMockSink(GetParam())),
diff --git a/media/blink/webmediaplayer_impl.cc b/media/blink/webmediaplayer_impl.cc index 3c82b7f..5f55d6a 100644 --- a/media/blink/webmediaplayer_impl.cc +++ b/media/blink/webmediaplayer_impl.cc
@@ -781,12 +781,14 @@ if (!pip_surface_id_.is_valid()) return; - pip_surface_info_cb_.Run(pip_surface_id_, pipeline_metadata_.natural_size); - // Updates the MediaWebContentsObserver with |delegate_id_| to track which // media player is in Picture-in-Picture mode. + // This must be called before |pip_surface_info_cb_| to ensure the + // Picture-in-Picture media player id is set before the controller is set up. delegate_->DidPictureInPictureSourceChange(delegate_id_); + pip_surface_info_cb_.Run(pip_surface_id_, pipeline_metadata_.natural_size); + if (client_) client_->PictureInPictureStarted(); }
diff --git a/media/capture/video/video_capture_device_unittest.cc b/media/capture/video/video_capture_device_unittest.cc index a390e052..5122a188 100644 --- a/media/capture/video/video_capture_device_unittest.cc +++ b/media/capture/video/video_capture_device_unittest.cc
@@ -61,11 +61,13 @@ #define MAYBE_CaptureMjpeg DISABLED_CaptureMjpeg #define MAYBE_TakePhoto TakePhoto #define MAYBE_GetPhotoState GetPhotoState +#define MAYBE_CaptureWithSize CaptureWithSize #elif defined(OS_WIN) #define MAYBE_AllocateBadSize AllocateBadSize #define MAYBE_CaptureMjpeg CaptureMjpeg #define MAYBE_TakePhoto TakePhoto #define MAYBE_GetPhotoState GetPhotoState +#define MAYBE_CaptureWithSize CaptureWithSize #elif defined(OS_ANDROID) #define MAYBE_AllocateBadSize AllocateBadSize #define MAYBE_CaptureMjpeg CaptureMjpeg @@ -79,19 +81,24 @@ #define MAYBE_GetPhotoState GetPhotoState #define MAYBE_CaptureWithSize CaptureWithSize #elif defined(OS_LINUX) +// All tests are flaky on Linux: https://crbug.com/831514. Note: the stuff in +// the next comment is a separate issue. + // AllocateBadSize will hang when a real camera is attached and if more than one // test is trying to use the camera (even across processes). Do NOT renable // this test without fixing the many bugs associated with it: // http://crbug.com/94134 http://crbug.com/137260 http://crbug.com/417824 #define MAYBE_AllocateBadSize DISABLED_AllocateBadSize -#define MAYBE_CaptureMjpeg CaptureMjpeg -#define MAYBE_TakePhoto TakePhoto -#define MAYBE_GetPhotoState GetPhotoState +#define MAYBE_CaptureMjpeg DISABLED_CaptureMjpeg +#define MAYBE_TakePhoto DISABLED_TakePhoto +#define MAYBE_GetPhotoState DISABLED_GetPhotoState +#define MAYBE_CaptureWithSize DISABLED_CaptureWithSize #else #define MAYBE_AllocateBadSize AllocateBadSize #define MAYBE_CaptureMjpeg CaptureMjpeg #define MAYBE_TakePhoto DISABLED_TakePhoto #define MAYBE_GetPhotoState DISABLED_GetPhotoState +#define MAYBE_CaptureWithSize CaptureWithSize #endif // Wrap the TEST_P macro into another one to allow to preprocess |test_name| @@ -489,7 +496,7 @@ } // Allocates the first enumerated device, and expects a frame. -WRAPPED_TEST_P(VideoCaptureDeviceTest, CaptureWithSize) { +WRAPPED_TEST_P(VideoCaptureDeviceTest, MAYBE_CaptureWithSize) { const auto descriptor = FindUsableDeviceDescriptor(); if (!descriptor) return;
diff --git a/media/cast/test/fake_media_source.cc b/media/cast/test/fake_media_source.cc index 679c7cb0..31d5ebe1 100644 --- a/media/cast/test/fake_media_source.cc +++ b/media/cast/test/fake_media_source.cc
@@ -79,7 +79,6 @@ output_audio_params_(AudioParameters::AUDIO_PCM_LINEAR, media::GuessChannelLayout(audio_config.channels), audio_config.rtp_timebase, - 32, audio_config.rtp_timebase / kAudioPacketsPerSecond), video_config_(video_config), keep_frames_(keep_frames), @@ -180,7 +179,6 @@ source_audio_params_.Reset( AudioParameters::AUDIO_PCM_LINEAR, layout, av_audio_context_->sample_rate, - 8 * av_get_bytes_per_sample(av_audio_context_->sample_fmt), av_audio_context_->sample_rate / kAudioPacketsPerSecond); source_audio_params_.set_channels_for_discrete( av_audio_context_->channels);
diff --git a/media/cast/test/receiver.cc b/media/cast/test/receiver.cc index f6f8c04..9edfe1c 100644 --- a/media/cast/test/receiver.cc +++ b/media/cast/test/receiver.cc
@@ -164,7 +164,7 @@ const int samples_in_10ms = config.rtp_timebase / 100; return AudioParameters(AudioParameters::AUDIO_PCM_LOW_LATENCY, GuessChannelLayout(config.channels), - config.rtp_timebase, 32, samples_in_10ms); + config.rtp_timebase, samples_in_10ms); } // An InProcessReceiver that renders video frames to a LinuxOutputWindow and
diff --git a/media/filters/audio_renderer_algorithm_unittest.cc b/media/filters/audio_renderer_algorithm_unittest.cc index c7c50156..e496653d 100644 --- a/media/filters/audio_renderer_algorithm_unittest.cc +++ b/media/filters/audio_renderer_algorithm_unittest.cc
@@ -115,7 +115,7 @@ format = media::AudioParameters::AUDIO_BITSTREAM_EAC3; AudioParameters params(format, channel_layout, samples_per_second, - bytes_per_sample_ * 8, frames_per_buffer); + frames_per_buffer); bool is_encrypted = false; algorithm_.Initialize(params, is_encrypted); algorithm_.SetChannelMask(std::move(channel_mask)); @@ -259,12 +259,11 @@ void WsolaTest(double playback_rate) { const int kSampleRateHz = 48000; const ChannelLayout kChannelLayout = CHANNEL_LAYOUT_STEREO; - const int kBytesPerSample = 2; const int kNumFrames = kSampleRateHz / 100; // 10 milliseconds. channels_ = ChannelLayoutToChannelCount(kChannelLayout); AudioParameters params(AudioParameters::AUDIO_PCM_LINEAR, kChannelLayout, - kSampleRateHz, kBytesPerSample * 8, kNumFrames); + kSampleRateHz, kNumFrames); bool is_encrypted = false; algorithm_.Initialize(params, is_encrypted);
diff --git a/media/media_options.gni b/media/media_options.gni index d3244b1..07c5551 100644 --- a/media/media_options.gni +++ b/media/media_options.gni
@@ -58,9 +58,9 @@ enable_mse_mpeg2ts_stream_parser = (proprietary_codecs && is_chromecast) || use_fuzzing_engine - # Enable support for the 'cbcs' encryption scheme added by MPEG Common + # Enable parsing for the 'cbcs' encryption scheme added by MPEG Common # Encryption 3rd Edition (ISO/IEC 23001-7), published 02/15/2016. - enable_cbcs_encryption_scheme = is_chromecast + enable_cbcs_encryption_scheme = is_chromecast || is_mac || is_win || is_linux # Enable HEVC/H265 demuxing. Actual decoding must be provided by the # platform. Enable by default for Chromecast.
diff --git a/media/muxers/webm_muxer.cc b/media/muxers/webm_muxer.cc index bb05c845..e281d6c3 100644 --- a/media/muxers/webm_muxer.cc +++ b/media/muxers/webm_muxer.cc
@@ -293,7 +293,9 @@ DCHECK(audio_track); DCHECK_EQ(params.sample_rate(), audio_track->sample_rate()); DCHECK_EQ(params.channels(), static_cast<int>(audio_track->channels())); - audio_track->set_bit_depth(static_cast<uint64_t>(params.bits_per_sample())); + + // Audio data is always pcm_f32le. + audio_track->set_bit_depth(32u); if (audio_codec_ == kCodecOpus) { audio_track->set_codec_id(mkvmuxer::Tracks::kOpusCodecId); @@ -308,8 +310,6 @@ // http://www.webmproject.org/docs/container/#muxer-guidelines DCHECK_EQ(1000000ull, segment_.GetSegmentInfo()->timecode_scale()); } else if (audio_codec_ == kCodecPCM) { - DCHECK_EQ(static_cast<uint64_t>(params.bits_per_sample()), - audio_track->bit_depth()); audio_track->set_codec_id(kPcmCodecId); } }
diff --git a/media/muxers/webm_muxer_fuzzertest.cc b/media/muxers/webm_muxer_fuzzertest.cc index 604761f..d92e7862 100644 --- a/media/muxers/webm_muxer_fuzzertest.cc +++ b/media/muxers/webm_muxer_fuzzertest.cc
@@ -87,7 +87,7 @@ const AudioParameters params( media::AudioParameters::AUDIO_PCM_LOW_LATENCY, layout, sample_rate, - 16 /* bits_per_sample */, 60 * sample_rate); + 60 * sample_rate); muxer.OnEncodedAudio(params, std::make_unique<std::string>(str), base::TimeTicks()); base::RunLoop run_loop;
diff --git a/media/muxers/webm_muxer_unittest.cc b/media/muxers/webm_muxer_unittest.cc index e81c9e6..71eb083 100644 --- a/media/muxers/webm_muxer_unittest.cc +++ b/media/muxers/webm_muxer_unittest.cc
@@ -213,12 +213,10 @@ return; const int sample_rate = 48000; - const int bits_per_sample = 16; const int frames_per_buffer = 480; media::AudioParameters audio_params( media::AudioParameters::Format::AUDIO_PCM_LOW_LATENCY, - media::CHANNEL_LAYOUT_MONO, sample_rate, bits_per_sample, - frames_per_buffer); + media::CHANNEL_LAYOUT_MONO, sample_rate, frames_per_buffer); const std::string encoded_data("abcdefghijklmnopqrstuvwxyz"); @@ -288,12 +286,10 @@ } const int sample_rate = 48000; - const int bits_per_sample = 16; const int frames_per_buffer = 480; media::AudioParameters audio_params( media::AudioParameters::Format::AUDIO_PCM_LOW_LATENCY, - media::CHANNEL_LAYOUT_MONO, sample_rate, bits_per_sample, - frames_per_buffer); + media::CHANNEL_LAYOUT_MONO, sample_rate, frames_per_buffer); const std::string encoded_audio("thisisanencodedaudiopacket"); // Force one libwebm error and verify OnEncodedAudio() fails.
diff --git a/media/renderers/audio_renderer_impl.cc b/media/renderers/audio_renderer_impl.cc index e2e0962..2737cde 100644 --- a/media/renderers/audio_renderer_impl.cc +++ b/media/renderers/audio_renderer_impl.cc
@@ -443,14 +443,12 @@ audio_parameters_.Reset( format, stream->audio_decoder_config().channel_layout(), - stream->audio_decoder_config().samples_per_second(), - stream->audio_decoder_config().bits_per_channel(), buffer_size); + stream->audio_decoder_config().samples_per_second(), buffer_size); buffer_converter_.reset(); } else if (use_stream_params) { audio_parameters_.Reset(AudioParameters::AUDIO_PCM_LOW_LATENCY, stream->audio_decoder_config().channel_layout(), stream->audio_decoder_config().samples_per_second(), - stream->audio_decoder_config().bits_per_channel(), preferred_buffer_size); audio_parameters_.set_channels_for_discrete( stream->audio_decoder_config().channels()); @@ -514,7 +512,7 @@ : stream->audio_decoder_config().channel_layout(); audio_parameters_.Reset(hw_params.format(), renderer_channel_layout, - sample_rate, hw_params.bits_per_sample(), + sample_rate, media::AudioLatency::GetHighLatencyBufferSize( sample_rate, preferred_buffer_size)); }
diff --git a/media/renderers/audio_renderer_impl_unittest.cc b/media/renderers/audio_renderer_impl_unittest.cc index e938c6d..9f27429 100644 --- a/media/renderers/audio_renderer_impl_unittest.cc +++ b/media/renderers/audio_renderer_impl_unittest.cc
@@ -113,7 +113,6 @@ : hardware_params_(AudioParameters::AUDIO_PCM_LOW_LATENCY, kChannelLayout, kOutputSamplesPerSecond, - SampleFormatToBytesPerChannel(kSampleFormat) * 8, 512), sink_(new FakeAudioRendererSink(hardware_params_)), demuxer_stream_(DemuxerStream::AUDIO), @@ -130,7 +129,6 @@ AudioParameters out_params(AudioParameters::AUDIO_PCM_LOW_LATENCY, kChannelLayout, kOutputSamplesPerSecond, - SampleFormatToBytesPerChannel(kSampleFormat) * 8, 512); renderer_.reset(new AudioRendererImpl( message_loop_.task_runner(), sink_.get(), @@ -218,7 +216,7 @@ SetMediaClient(&media_client_); hardware_params_.Reset(AudioParameters::AUDIO_BITSTREAM_EAC3, - kChannelLayout, kOutputSamplesPerSecond, 1024, 512); + kChannelLayout, kOutputSamplesPerSecond, 512); sink_ = new FakeAudioRendererSink(hardware_params_); AudioDecoderConfig audio_config(kCodecAC3, kSampleFormatEac3, kChannelLayout, kInputSamplesPerSecond, @@ -722,10 +720,9 @@ EXPECT_GT(buffer_capacity().value, hardware_params_.frames_per_buffer()); // Verify in the no-config-changes-expected case. - ConfigureBasicRenderer(AudioParameters( - AudioParameters::AUDIO_PCM_LOW_LATENCY, kChannelLayout, - kOutputSamplesPerSecond, SampleFormatToBytesPerChannel(kSampleFormat) * 8, - 1024 * 15)); + ConfigureBasicRenderer(AudioParameters(AudioParameters::AUDIO_PCM_LOW_LATENCY, + kChannelLayout, + kOutputSamplesPerSecond, 1024 * 15)); Initialize(); EXPECT_GT(buffer_capacity().value, hardware_params_.frames_per_buffer()); @@ -736,12 +733,10 @@ TEST_F(AudioRendererImplTest, ChannelMask) { AudioParameters hw_params(AudioParameters::AUDIO_PCM_LOW_LATENCY, CHANNEL_LAYOUT_7_1, kOutputSamplesPerSecond, - SampleFormatToBytesPerChannel(kSampleFormat) * 8, 1024); ConfigureConfigChangeRenderer( AudioParameters(AudioParameters::AUDIO_PCM_LOW_LATENCY, - CHANNEL_LAYOUT_STEREO, kOutputSamplesPerSecond, - SampleFormatToBytesPerChannel(kSampleFormat) * 8, 1024), + CHANNEL_LAYOUT_STEREO, kOutputSamplesPerSecond, 1024), hw_params); Initialize(); std::vector<bool> mask = channel_mask();
diff --git a/media/test/pipeline_integration_test_base.cc b/media/test/pipeline_integration_test_base.cc index de84694..68a688fe 100644 --- a/media/test/pipeline_integration_test_base.cc +++ b/media/test/pipeline_integration_test_base.cc
@@ -477,7 +477,7 @@ clockless_audio_sink_ = new ClocklessAudioSink( OutputDeviceInfo("", OUTPUT_DEVICE_STATUS_OK, AudioParameters(AudioParameters::AUDIO_PCM_LOW_LATENCY, - output_layout, 44100, 16, 512))); + output_layout, 44100, 512))); // Say "not optimized for hardware parameters" to disallow renderer // resampling. Hashed tests need this avoid platform dependent floating
diff --git a/net/disk_cache/simple/simple_entry_impl.cc b/net/disk_cache/simple/simple_entry_impl.cc index 594e50f..a77fc91 100644 --- a/net/disk_cache/simple/simple_entry_impl.cc +++ b/net/disk_cache/simple/simple_entry_impl.cc
@@ -619,7 +619,15 @@ SimpleEntryImpl::~SimpleEntryImpl() { DCHECK(io_thread_checker_.CalledOnValidThread()); DCHECK_EQ(0U, pending_operations_.size()); - DCHECK(state_ == STATE_UNINITIALIZED || state_ == STATE_FAILURE); + + // STATE_IO_PENDING is possible here in one corner case: the entry had + // dispatched the final Close() operation to SimpleSynchronousEntry, and the + // only thing keeping |this| alive were the callbacks for that + // PostTaskAndReply. If at that point the message loop is shut down, all + // outstanding tasks get destroyed, dropping the last reference without + // CloseOperationComplete ever getting to run to exit from IO_PENDING. + DCHECK(state_ == STATE_UNINITIALIZED || state_ == STATE_FAILURE || + state_ == STATE_IO_PENDING); DCHECK(!synchronous_entry_); net_log_.EndEvent(net::NetLogEventType::SIMPLE_CACHE_ENTRY); }
diff --git a/net/http/http_auth_cache.cc b/net/http/http_auth_cache.cc index d534d3d..ada6a91 100644 --- a/net/http/http_auth_cache.cc +++ b/net/http/http_auth_cache.cc
@@ -253,13 +253,6 @@ return false; } -void HttpAuthCache::ClearEntriesAddedWithin(base::TimeDelta duration) { - base::TimeTicks begin_time = tick_clock_->NowTicks() - duration; - base::EraseIf(entries_, [begin_time](const Entry& entry) { - return entry.creation_time_ticks_ >= begin_time; - }); -} - void HttpAuthCache::ClearEntriesAddedSince(base::Time begin_time) { if (begin_time.is_null()) { ClearAllEntries();
diff --git a/net/http/http_auth_cache.h b/net/http/http_auth_cache.h index 8c4426a..8698fb78 100644 --- a/net/http/http_auth_cache.h +++ b/net/http/http_auth_cache.h
@@ -165,9 +165,6 @@ HttpAuth::Scheme scheme, const AuthCredentials& credentials); - // Clears cache entries created within |duration| of base::TimeTicks::Now(). - void ClearEntriesAddedWithin(base::TimeDelta duration); - // Clears cache entries added since |begin_time| or all entries if // |begin_time| is null. void ClearEntriesAddedSince(base::Time begin_time);
diff --git a/net/http/http_auth_cache_unittest.cc b/net/http/http_auth_cache_unittest.cc index 38cce36..ccc16725 100644 --- a/net/http/http_auth_cache_unittest.cc +++ b/net/http/http_auth_cache_unittest.cc
@@ -379,55 +379,6 @@ EXPECT_FALSE(NULL == entry); } -TEST(HttpAuthCacheTest, ClearEntriesAddedWithin) { - GURL origin("http://foobar.com"); - - base::SimpleTestTickClock test_clock; - test_clock.SetNowTicks(base::TimeTicks::Now()); - - HttpAuthCache cache; - cache.set_tick_clock_for_testing(&test_clock); - - cache.Add(origin, kRealm1, HttpAuth::AUTH_SCHEME_BASIC, "basic realm=Realm1", - AuthCredentials(kAlice, k123), "/"); - cache.Add(origin, kRealm2, HttpAuth::AUTH_SCHEME_BASIC, "basic realm=Realm2", - AuthCredentials(kRoot, kWileCoyote), "/"); - - test_clock.Advance(base::TimeDelta::FromSeconds(10)); - cache.Add(origin, kRealm3, HttpAuth::AUTH_SCHEME_BASIC, "basic realm=Realm3", - AuthCredentials(kAlice2, k1234), "/"); - cache.Add(origin, kRealm4, HttpAuth::AUTH_SCHEME_BASIC, "basic realm=Realm4", - AuthCredentials(kUsername, kPassword), "/"); - // Add path to existing entry. - cache.Add(origin, kRealm2, HttpAuth::AUTH_SCHEME_BASIC, "basic realm=Realm2", - AuthCredentials(kAdmin, kPassword), "/baz/"); - - test_clock.Advance(base::TimeDelta::FromSeconds(55)); - cache.ClearEntriesAddedWithin(base::TimeDelta::FromMinutes(1)); - - // Realms 1 and 2 are 65 seconds old and should be not cleared. - EXPECT_NE(nullptr, - cache.Lookup(origin, kRealm1, HttpAuth::AUTH_SCHEME_BASIC)); - EXPECT_NE(nullptr, - cache.Lookup(origin, kRealm2, HttpAuth::AUTH_SCHEME_BASIC)); - // Creation time is set for a whole entry rather than for a particular path. - // Path added within the requested duration isn't be removed. - EXPECT_NE(nullptr, cache.LookupByPath(origin, "/baz/")); - - // Realms 3 and 4 are 55 seconds old and should be cleared. - EXPECT_EQ(nullptr, - cache.Lookup(origin, kRealm3, HttpAuth::AUTH_SCHEME_BASIC)); - EXPECT_EQ(nullptr, - cache.Lookup(origin, kRealm4, HttpAuth::AUTH_SCHEME_BASIC)); - - cache.ClearEntriesAddedWithin(base::TimeDelta::FromSeconds(70)); - EXPECT_EQ(nullptr, - cache.Lookup(origin, kRealm1, HttpAuth::AUTH_SCHEME_BASIC)); - EXPECT_EQ(nullptr, - cache.Lookup(origin, kRealm2, HttpAuth::AUTH_SCHEME_BASIC)); - EXPECT_EQ(nullptr, cache.LookupByPath(origin, "/baz/")); -} - TEST(HttpAuthCacheTest, ClearEntriesAddedSince) { GURL origin("http://foobar.com");
diff --git a/services/audio/output_controller_unittest.cc b/services/audio/output_controller_unittest.cc index 5f581687..03a9026 100644 --- a/services/audio/output_controller_unittest.cc +++ b/services/audio/output_controller_unittest.cc
@@ -58,7 +58,6 @@ namespace { constexpr int kSampleRate = AudioParameters::kAudioCDSampleRate; -constexpr int kBitsPerSample = 16; constexpr media::ChannelLayout kChannelLayout = media::CHANNEL_LAYOUT_STEREO; constexpr int kSamplesPerPacket = kSampleRate / 1000; constexpr double kTestVolume = 0.25; @@ -69,7 +68,7 @@ // behind-the-scenes. So, the use of PCM_LOW_LATENCY won't actually result in // any real system audio output during these tests. return AudioParameters(AudioParameters::AUDIO_PCM_LOW_LATENCY, kChannelLayout, - kSampleRate, kBitsPerSample, kSamplesPerPacket); + kSampleRate, kSamplesPerPacket); } class MockOutputControllerEventHandler : public OutputController::EventHandler {
diff --git a/services/audio/sync_reader_unittest.cc b/services/audio/sync_reader_unittest.cc index a313deba..2785794 100644 --- a/services/audio/sync_reader_unittest.cc +++ b/services/audio/sync_reader_unittest.cc
@@ -58,11 +58,10 @@ TEST_P(SyncReaderBitstreamTest, BitstreamBufferOverflow_DoesNotWriteOOB) { const int kSampleRate = 44100; - const int kBitsPerSample = 32; const int kFramesPerBuffer = 1; AudioParameters params(AudioParameters::AUDIO_BITSTREAM_AC3, media::CHANNEL_LAYOUT_STEREO, kSampleRate, - kBitsPerSample, kFramesPerBuffer); + kFramesPerBuffer); auto socket = std::make_unique<base::CancelableSyncSocket>(); SyncReader reader(base::BindRepeating(&NoLog), params, socket.get());
diff --git a/services/identity/public/cpp/identity_manager.h b/services/identity/public/cpp/identity_manager.h index 7409dbd8..abadf7f2 100644 --- a/services/identity/public/cpp/identity_manager.h +++ b/services/identity/public/cpp/identity_manager.h
@@ -17,6 +17,11 @@ #endif // Necessary to declare this class as a friend. +namespace arc { +class ArcTermsOfServiceDefaultNegotiatorTest; +} + +// Necessary to declare this class as a friend. namespace browser_sync { class ProfileSyncServiceStartupCrosTest; } @@ -33,6 +38,7 @@ } // Necessary to declare these classes as friends. +class ArcSupportHostTest; class MultiProfileDownloadNotificationTest; class ProfileSyncServiceHarness; @@ -125,6 +131,8 @@ friend file_manager::MultiProfileFileManagerBrowserTest; // These clients needs to call SetPrimaryAccountSynchronously(). + friend ArcSupportHostTest; + friend arc::ArcTermsOfServiceDefaultNegotiatorTest; friend chromeos::ChromeSessionManager; friend chromeos::UserSessionManager; friend browser_sync::ProfileSyncServiceStartupCrosTest;
diff --git a/services/network/cross_origin_read_blocking.cc b/services/network/cross_origin_read_blocking.cc index 89e71850..d63e63e6 100644 --- a/services/network/cross_origin_read_blocking.cc +++ b/services/network/cross_origin_read_blocking.cc
@@ -85,6 +85,88 @@ return CrossOriginReadBlocking::kNo; } +// Checks if |data| starts with an HTML comment (i.e. with "<!-- ... -->"). +// - If there is a valid, terminated comment then returns kYes. +// - If there is a start of a comment, but the comment is not completed (e.g. +// |data| == "<!-" or |data| == "<!-- not terminated yet") then returns +// kMaybe. +// - Returns kNo otherwise. +// +// Mutates |data| to advance past the comment when returning kYes. +// +// Additionally, if the body of the HTML comment (e.g. normally the kYes and +// kMaybe cases) contains javascript-like comments (e.g. |data| == "<!--/*-->"), +// then kNo will be returned (and |data| won't be mutated). This helps avoid +// CORB blocking of the html/js polyglots identified in +// https://crbug.com/839425. +SniffingResult MaybeSkipHtmlComment(StringPiece* data) { + static const StringPiece kBeginCommentSignature = "<!--"; + if (!data->starts_with(kBeginCommentSignature)) { + if (kBeginCommentSignature.starts_with(*data)) + return CrossOriginReadBlocking::kMaybe; + return CrossOriginReadBlocking::kNo; + } + + enum State { + kNothingSpecial, + kAfterDash, + kAfterDashDash, + kAfterSlash, + } state = kNothingSpecial; + for (size_t i = kBeginCommentSignature.length(); i < data->length(); i++) { + char c = (*data)[i]; + switch (state) { + case kNothingSpecial: + if (c == '-') + state = kAfterDash; + else if (c == '/') + state = kAfterSlash; + else + DCHECK_EQ(kNothingSpecial, state); + break; + + case kAfterDash: + if (c == '-') + state = kAfterDashDash; + else if (c == '/') + state = kAfterSlash; + else + state = kNothingSpecial; + break; + + case kAfterDashDash: + if (c == '>') { + // Found the end of the HTML comment. + data->remove_prefix(i + 1); // Advance past the comment. + return CrossOriginReadBlocking::kYes; + } else if (c == '-') { + state = kAfterDashDash; + } else if (c == '/') { + state = kAfterSlash; + } else { + state = kNothingSpecial; + } + break; + + case kAfterSlash: + if (c == '/' || c == '*') { + // html/js polyglot - let's report that this is not HTML, to avoid + // blocking what may be a valid Javascript. + return CrossOriginReadBlocking::kNo; + } + if (c == '/') + state = kAfterSlash; + else if (c == '-') + state = kAfterDash; + else + state = kNothingSpecial; + break; + } + } + + return CrossOriginReadBlocking::kMaybe; +} + // Headers from // https://fetch.spec.whatwg.org/#cors-safelisted-response-header-name. // @@ -238,21 +320,9 @@ if (signature_match != kNo) return signature_match; - // "<!--" (the HTML comment syntax) is a special case, since it's valid JS - // as well. Skip over them. - static const StringPiece kBeginCommentSignature[] = {"<!--"}; - SniffingResult comment_match = MatchesSignature( - &data, kBeginCommentSignature, arraysize(kBeginCommentSignature), - base::CompareCase::SENSITIVE); + SniffingResult comment_match = MaybeSkipHtmlComment(&data); if (comment_match != kYes) return comment_match; - - // Look for an end comment. - static const StringPiece kEndComment = "-->"; - size_t comment_end = data.find(kEndComment); - if (comment_end == base::StringPiece::npos) - return kMaybe; // Hit end of data with open comment. - data.remove_prefix(comment_end + kEndComment.length()); } // All of |data| was consumed, without a clear determination.
diff --git a/services/network/cross_origin_read_blocking_explainer.md b/services/network/cross_origin_read_blocking_explainer.md index 7de724d..2ed45a0 100644 --- a/services/network/cross_origin_read_blocking_explainer.md +++ b/services/network/cross_origin_read_blocking_explainer.md
@@ -252,10 +252,26 @@ but otherwise HTML documents can only be loaded by fetch() and XHR, both of which require CORS. HTML sniffing is already well-understood, so (unlike JSON) it is relatively easy to identify HTML -resources with high confidence. Only one ambiguous polyglot case has been +resources with high confidence. + +One ambiguous polyglot case has been identified that CORB needs to handle conservatively: HTML-style comments, which -are part of the JavaScript syntax. CORB handles these by skipping over HTML -comment blocks when sniffing to confirm a HTML content type. +are [part of the JavaScript syntax](https://www.ecma-international.org/ecma-262/8.0/index.html#sec-html-like-comments). +* CORB skips over HTML comment blocks when sniffing to + confirm a HTML content type. This means that (unlike in + [normal HTML sniffing](https://mimesniff.spec.whatwg.org/#identifying-a-resource-with-an-unknown-mime-type)) + presence of "`<!--`" string doesn't immediately confirm that the sniffed resource is a + HTML document - the HTML comment still has to be followed by a valid HTML tag. +* Additionally if the HTML-style comment contains Javascript-style comments + (i.e. either "`/*`" or "`//`" substrings), + then CORB conservatively assumes that the resource is not a HTML document. + This helps avoid blocking html/javascript polyglots which have been observed + in use on real websites - see the example below: +```js +<!--/*--><html><body><script type="text/javascript"><!--//*/ +var x = "This is both valid html and valid javascript"; +//--></script></body></html> +``` ### Protecting XML
diff --git a/services/network/cross_origin_read_blocking_unittest.cc b/services/network/cross_origin_read_blocking_unittest.cc index f45c503..7722ca2 100644 --- a/services/network/cross_origin_read_blocking_unittest.cc +++ b/services/network/cross_origin_read_blocking_unittest.cc
@@ -50,34 +50,58 @@ } TEST(CrossOriginReadBlockingTest, SniffForHTML) { - StringPiece html_data(" \t\r\n <HtMladfokadfkado"); - StringPiece comment_html_data(" <!-- this is comment --> <html><body>"); - StringPiece two_comments_html_data( - "<!-- this is comment -->\n<!-- this is comment --><html><body>"); - StringPiece commented_out_html_tag_data("<!-- <html> <?xml> \n<html>--><b"); - StringPiece mixed_comments_html_data( - "<!-- this is comment <!-- --> <script></script>"); - StringPiece non_html_data(" var name=window.location;\nadfadf"); - StringPiece comment_js_data( - " <!-- this is comment\n document.write(1);\n// -->window.open()"); - StringPiece empty_data(""); + using CORB = CrossOriginReadBlocking; + // Something that technically matches the start of a valid HTML tag. EXPECT_EQ(SniffingResult::kYes, - CrossOriginReadBlocking::SniffForHTML(html_data)); + CORB::SniffForHTML(" \t\r\n <HtMladfokadfkado")); + + // HTML comment followed by whitespace and valid HTML tags. EXPECT_EQ(SniffingResult::kYes, - CrossOriginReadBlocking::SniffForHTML(comment_html_data)); + CORB::SniffForHTML(" <!-- this is comment --> <html><body>")); + + // HTML comment, whitespace, more HTML comments, HTML tags. + EXPECT_EQ( + SniffingResult::kYes, + CORB::SniffForHTML( + "<!-- this is comment -->\n<!-- this is comment --><html><body>")); + + // HTML comment followed by valid HTML tag. + EXPECT_EQ( + SniffingResult::kYes, + CORB::SniffForHTML("<!-- this is comment <!-- --><script></script>")); + + // Whitespace followed by valid Javascript. + EXPECT_EQ(SniffingResult::kNo, + CORB::SniffForHTML(" var name=window.location;\nadfadf")); + + // HTML comment followed by valid Javascript. + EXPECT_EQ( + SniffingResult::kNo, + CORB::SniffForHTML( + " <!-- this is comment\n document.write(1);\n// -->window.open()")); + + // HTML/Javascript polyglot should return kNo. + EXPECT_EQ(SniffingResult::kNo, + CORB::SniffForHTML( + "<!--/*--><html><body><script type='text/javascript'><!--//*/\n" + "var blah = 123;\n" + "//--></script></body></html>")); + + // Tests to cover more of the state machine inside MaybeSkipHtmlComment. + EXPECT_EQ(SniffingResult::kNo, CORB::SniffForHTML("<!-- -/* --><html>")); + EXPECT_EQ(SniffingResult::kNo, CORB::SniffForHTML("<!-- --/* --><html>")); + EXPECT_EQ(SniffingResult::kYes, CORB::SniffForHTML("<!----><html>")); EXPECT_EQ(SniffingResult::kYes, - CrossOriginReadBlocking::SniffForHTML(two_comments_html_data)); - EXPECT_EQ(SniffingResult::kYes, + CORB::SniffForHTML("<!-- ---/--> <html><body>")); + + // Commented out html tag followed by non-html (" x"). + StringPiece commented_out_html_tag_data("<!-- <html> <?xml> \n<html>--> x"); + EXPECT_EQ(SniffingResult::kNo, CrossOriginReadBlocking::SniffForHTML(commented_out_html_tag_data)); - EXPECT_EQ(SniffingResult::kYes, - CrossOriginReadBlocking::SniffForHTML(mixed_comments_html_data)); - EXPECT_EQ(SniffingResult::kNo, - CrossOriginReadBlocking::SniffForHTML(non_html_data)); - EXPECT_EQ(SniffingResult::kNo, - CrossOriginReadBlocking::SniffForHTML(comment_js_data)); // Prefixes of |commented_out_html_tag_data| should be indeterminate. + // This covers testing "<!-" as well as "<!-- not terminated yet...". StringPiece almost_html = commented_out_html_tag_data; while (!almost_html.empty()) { almost_html.remove_suffix(1); @@ -85,6 +109,13 @@ CrossOriginReadBlocking::SniffForHTML(almost_html)) << almost_html; } + + // Explicit tests for an unfinished comment (some also covered by the prefix + // tests above). + EXPECT_EQ(SniffingResult::kMaybe, CORB::SniffForHTML("")); + EXPECT_EQ(SniffingResult::kMaybe, CORB::SniffForHTML("<!")); + EXPECT_EQ(SniffingResult::kMaybe, CORB::SniffForHTML("<!-- unterminated...")); + EXPECT_EQ(SniffingResult::kNo, CORB::SniffForHTML("<!-- /* js ")); } TEST(CrossOriginReadBlockingTest, SniffForXML) {
diff --git a/services/network/proxy_resolving_client_socket_factory.cc b/services/network/proxy_resolving_client_socket_factory.cc index 8eaa859..eb4ca6de 100644 --- a/services/network/proxy_resolving_client_socket_factory.cc +++ b/services/network/proxy_resolving_client_socket_factory.cc
@@ -76,8 +76,7 @@ // might have since entered proxy credentials. Clear the http auth of // |network_session_| and copy over the data from |request_context|'s auth // cache. - network_session_->http_auth_cache()->ClearEntriesAddedWithin( - base::Time::Now() - base::Time()); + network_session_->http_auth_cache()->ClearAllEntries(); net::HttpAuthCache* other_auth_cache = request_context_->http_transaction_factory() ->GetSession()
diff --git a/services/network/public/cpp/BUILD.gn b/services/network/public/cpp/BUILD.gn index 3fd0ef42e..5c31b7e2 100644 --- a/services/network/public/cpp/BUILD.gn +++ b/services/network/public/cpp/BUILD.gn
@@ -75,8 +75,8 @@ "http_raw_request_response_info.h", "mutable_network_traffic_annotation_tag_mojom_traits.h", "mutable_partial_network_traffic_annotation_tag_mojom_traits.h", - "network_param_ipc_traits.cc", - "network_param_ipc_traits.h", + "network_ipc_param_traits.cc", + "network_ipc_param_traits.h", "proxy_config_mojom_traits.cc", "proxy_config_mojom_traits.h", "proxy_config_with_annotation_mojom_traits.cc",
diff --git a/services/network/public/cpp/OWNERS b/services/network/public/cpp/OWNERS index 2471a0020..1102a33 100644 --- a/services/network/public/cpp/OWNERS +++ b/services/network/public/cpp/OWNERS
@@ -1,7 +1,7 @@ per-file *.mojom=set noparent per-file *.mojom=file://ipc/SECURITY_OWNERS -per-file *_ipc_traits*.*=set noparent -per-file *_ipc_traits*.*=file://ipc/SECURITY_OWNERS +per-file *_param_traits*.*=set noparent +per-file *_param_traits*.*=file://ipc/SECURITY_OWNERS per-file *_mojom_traits*.*=set noparent per-file *_mojom_traits*.*=file://ipc/SECURITY_OWNERS per-file *.typemap=set noparent
diff --git a/services/network/public/cpp/cors_error_status.typemap b/services/network/public/cpp/cors_error_status.typemap index 235ccc9c..89e83ff 100644 --- a/services/network/public/cpp/cors_error_status.typemap +++ b/services/network/public/cpp/cors_error_status.typemap
@@ -4,7 +4,7 @@ mojom = "//services/network/public/mojom/url_loader.mojom" public_headers = [ "//services/network/public/cpp/cors/cors_error_status.h" ] -traits_headers = [ "//services/network/public/cpp/network_param_ipc_traits.h" ] +traits_headers = [ "//services/network/public/cpp/network_ipc_param_traits.h" ] deps = [ "//net", ]
diff --git a/services/network/public/cpp/network_param_ipc_traits.cc b/services/network/public/cpp/network_ipc_param_traits.cc similarity index 97% rename from services/network/public/cpp/network_param_ipc_traits.cc rename to services/network/public/cpp/network_ipc_param_traits.cc index d5df8c2..fa2f368 100644 --- a/services/network/public/cpp/network_param_ipc_traits.cc +++ b/services/network/public/cpp/network_ipc_param_traits.cc
@@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "services/network/public/cpp/network_param_ipc_traits.h" +#include "services/network/public/cpp/network_ipc_param_traits.h" #include "ipc/ipc_message_utils.h" #include "ipc/ipc_mojo_param_traits.h" @@ -750,32 +750,32 @@ // Generation of IPC definitions. // Generate constructors. -#undef SERVICES_NETWORK_PUBLIC_CPP_NETWORK_PARAM_IPC_TRAITS_H_ +#undef SERVICES_NETWORK_PUBLIC_CPP_NETWORK_IPC_PARAM_TRAITS_H_ #include "ipc/struct_constructor_macros.h" -#include "network_param_ipc_traits.h" +#include "network_ipc_param_traits.h" // Generate destructors. -#undef SERVICES_NETWORK_PUBLIC_CPP_NETWORK_PARAM_IPC_TRAITS_H_ +#undef SERVICES_NETWORK_PUBLIC_CPP_NETWORK_IPC_PARAM_TRAITS_H_ #include "ipc/struct_destructor_macros.h" -#include "network_param_ipc_traits.h" +#include "network_ipc_param_traits.h" // Generate param traits write methods. -#undef SERVICES_NETWORK_PUBLIC_CPP_NETWORK_PARAM_IPC_TRAITS_H_ +#undef SERVICES_NETWORK_PUBLIC_CPP_NETWORK_IPC_PARAM_TRAITS_H_ #include "ipc/param_traits_write_macros.h" namespace IPC { -#include "network_param_ipc_traits.h" +#include "network_ipc_param_traits.h" } // namespace IPC // Generate param traits read methods. -#undef SERVICES_NETWORK_PUBLIC_CPP_NETWORK_PARAM_IPC_TRAITS_H_ +#undef SERVICES_NETWORK_PUBLIC_CPP_NETWORK_IPC_PARAM_TRAITS_H_ #include "ipc/param_traits_read_macros.h" namespace IPC { -#include "network_param_ipc_traits.h" +#include "network_ipc_param_traits.h" } // namespace IPC // Generate param traits log methods. -#undef SERVICES_NETWORK_PUBLIC_CPP_NETWORK_PARAM_IPC_TRAITS_H_ +#undef SERVICES_NETWORK_PUBLIC_CPP_NETWORK_IPC_PARAM_TRAITS_H_ #include "ipc/param_traits_log_macros.h" namespace IPC { -#include "network_param_ipc_traits.h" +#include "network_ipc_param_traits.h" } // namespace IPC
diff --git a/services/network/public/cpp/network_param_ipc_traits.h b/services/network/public/cpp/network_ipc_param_traits.h similarity index 97% rename from services/network/public/cpp/network_param_ipc_traits.h rename to services/network/public/cpp/network_ipc_param_traits.h index 7240179..61d2619f 100644 --- a/services/network/public/cpp/network_param_ipc_traits.h +++ b/services/network/public/cpp/network_ipc_param_traits.h
@@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef SERVICES_NETWORK_PUBLIC_CPP_NETWORK_PARAM_IPC_TRAITS_H_ -#define SERVICES_NETWORK_PUBLIC_CPP_NETWORK_PARAM_IPC_TRAITS_H_ +#ifndef SERVICES_NETWORK_PUBLIC_CPP_NETWORK_IPC_PARAM_TRAITS_H_ +#define SERVICES_NETWORK_PUBLIC_CPP_NETWORK_IPC_PARAM_TRAITS_H_ #include <string> @@ -35,8 +35,8 @@ #include "url/ipc/url_param_traits.h" #include "url/origin.h" -#ifndef INTERNAL_SERVICES_NETWORK_PUBLIC_CPP_NETWORK_PARAM_IPC_TRAITS_H_ -#define INTERNAL_SERVICES_NETWORK_PUBLIC_CPP_NETWORK_PARAM_IPC_TRAITS_H_ +#ifndef INTERNAL_SERVICES_NETWORK_PUBLIC_CPP_NETWORK_IPC_PARAM_TRAITS_H_ +#define INTERNAL_SERVICES_NETWORK_PUBLIC_CPP_NETWORK_IPC_PARAM_TRAITS_H_ #undef IPC_MESSAGE_EXPORT #define IPC_MESSAGE_EXPORT COMPONENT_EXPORT(NETWORK_CPP_BASE) @@ -226,7 +226,7 @@ } // namespace IPC -#endif // INTERNAL_SERVICES_NETWORK_PUBLIC_CPP_NETWORK_PARAM_IPC_TRAITS_H_ +#endif // INTERNAL_SERVICES_NETWORK_PUBLIC_CPP_NETWORK_IPC_PARAM_TRAITS_H_ IPC_ENUM_TRAITS_MAX_VALUE( net::ct::CTPolicyCompliance, @@ -402,4 +402,4 @@ IPC_STRUCT_TRAITS_MEMBER(response_start) IPC_STRUCT_TRAITS_END() -#endif // SERVICES_NETWORK_PUBLIC_CPP_NETWORK_PARAM_IPC_TRAITS_H_ +#endif // SERVICES_NETWORK_PUBLIC_CPP_NETWORK_IPC_PARAM_TRAITS_H_
diff --git a/services/network/public/cpp/network_param.typemap b/services/network/public/cpp/network_param.typemap index 823f1d12..0e1745e 100644 --- a/services/network/public/cpp/network_param.typemap +++ b/services/network/public/cpp/network_param.typemap
@@ -12,7 +12,7 @@ "//net/ssl/ssl_cert_request_info.h", "//net/ssl/ssl_info.h", ] -traits_headers = [ "//services/network/public/cpp/network_param_ipc_traits.h" ] +traits_headers = [ "//services/network/public/cpp/network_ipc_param_traits.h" ] public_deps = [ "//net", ]
diff --git a/services/network/public/cpp/network_types.typemap b/services/network/public/cpp/network_types.typemap index 066bf78..0f4ba2f 100644 --- a/services/network/public/cpp/network_types.typemap +++ b/services/network/public/cpp/network_types.typemap
@@ -7,7 +7,7 @@ "//net", ] public_headers = [ "//net/nqe/effective_connection_type.h" ] -traits_headers = [ "//services/network/public/cpp/network_param_ipc_traits.h" ] +traits_headers = [ "//services/network/public/cpp/network_ipc_param_traits.h" ] deps = [ "//services/network/public/cpp:cpp_base", ]
diff --git a/services/network/public/cpp/url_loader_completion_status.h b/services/network/public/cpp/url_loader_completion_status.h index 60efd7e..61f93fb 100644 --- a/services/network/public/cpp/url_loader_completion_status.h +++ b/services/network/public/cpp/url_loader_completion_status.h
@@ -18,7 +18,7 @@ namespace network { // NOTE: When adding/removing fields to this struct, don't forget to -// update services/network/public/cpp/network_param_ipc_traits.h. +// update services/network/public/cpp/network_ipc_param_traits.h. struct COMPONENT_EXPORT(NETWORK_CPP_BASE) URLLoaderCompletionStatus { URLLoaderCompletionStatus();
diff --git a/services/network/public/cpp/url_loader_completion_status.typemap b/services/network/public/cpp/url_loader_completion_status.typemap index 1ac83e8..70884e3 100644 --- a/services/network/public/cpp/url_loader_completion_status.typemap +++ b/services/network/public/cpp/url_loader_completion_status.typemap
@@ -5,7 +5,7 @@ mojom = "//services/network/public/mojom/url_loader.mojom" public_headers = [ "//services/network/public/cpp/url_loader_completion_status.h" ] -traits_headers = [ "//services/network/public/cpp/network_param_ipc_traits.h" ] +traits_headers = [ "//services/network/public/cpp/network_ipc_param_traits.h" ] deps = [ "//net", ]
diff --git a/services/network/public/cpp/url_request.typemap b/services/network/public/cpp/url_request.typemap index f4046a4..00e3bc1 100644 --- a/services/network/public/cpp/url_request.typemap +++ b/services/network/public/cpp/url_request.typemap
@@ -5,7 +5,7 @@ mojom = "//services/network/public/mojom/url_loader.mojom" public_headers = [ "//services/network/public/cpp/resource_request.h" ] traits_headers = [ - "//services/network/public/cpp/network_param_ipc_traits.h", + "//services/network/public/cpp/network_ipc_param_traits.h", "//services/network/public/cpp/url_request_mojom_traits.h", ] public_deps = [
diff --git a/services/network/public/cpp/url_request_redirect_info.typemap b/services/network/public/cpp/url_request_redirect_info.typemap index a8162bf..d6cd0336 100644 --- a/services/network/public/cpp/url_request_redirect_info.typemap +++ b/services/network/public/cpp/url_request_redirect_info.typemap
@@ -4,7 +4,7 @@ mojom = "//services/network/public/mojom/url_loader.mojom" public_headers = [ "//net/url_request/redirect_info.h" ] -traits_headers = [ "//services/network/public/cpp/network_param_ipc_traits.h" ] +traits_headers = [ "//services/network/public/cpp/network_ipc_param_traits.h" ] public_deps = [ "//net:net", ]
diff --git a/services/network/public/cpp/url_response_head.typemap b/services/network/public/cpp/url_response_head.typemap index 7987df1..dda595a 100644 --- a/services/network/public/cpp/url_response_head.typemap +++ b/services/network/public/cpp/url_response_head.typemap
@@ -4,7 +4,7 @@ mojom = "//services/network/public/mojom/url_loader.mojom" public_headers = [ "//services/network/public/cpp/resource_response.h" ] -traits_headers = [ "//services/network/public/cpp/network_param_ipc_traits.h" ] +traits_headers = [ "//services/network/public/cpp/network_ipc_param_traits.h" ] public_deps = [ "//services/network/public/cpp:cpp_base", ]
diff --git a/services/ui/test_ws/test_ws.cc b/services/ui/test_ws/test_ws.cc index b925ed6..2be5a9d 100644 --- a/services/ui/test_ws/test_ws.cc +++ b/services/ui/test_ws/test_ws.cc
@@ -16,6 +16,7 @@ #include "services/service_manager/public/cpp/service_context.h" #include "services/service_manager/public/cpp/service_runner.h" #include "services/ui/public/interfaces/window_tree_host_factory.mojom.h" +#include "services/ui/ws2/gpu_support.h" #include "services/ui/ws2/window_service.h" #include "services/ui/ws2/window_service_client.h" #include "services/ui/ws2/window_service_client_binding.h" @@ -138,7 +139,7 @@ gfx::RegisterPathProvider(); ui::RegisterPathProvider(); - window_service_ = std::make_unique<ws2::WindowService>(this); + window_service_ = std::make_unique<ws2::WindowService>(this, nullptr); ui::ContextFactory* context_factory = nullptr; ui::ContextFactoryPrivate* context_factory_private = nullptr;
diff --git a/services/ui/ws2/BUILD.gn b/services/ui/ws2/BUILD.gn index 5eb6356..ea5a19cb 100644 --- a/services/ui/ws2/BUILD.gn +++ b/services/ui/ws2/BUILD.gn
@@ -19,6 +19,7 @@ # TODO: client_root should be internal and moved to a different target. "client_root.cc", "client_root.h", + "gpu_support.h", "ids.h", # TODO: window_data should be internal and moved to a different target. @@ -38,7 +39,9 @@ ] public_deps = [ + "//components/discardable_memory/public/interfaces", "//components/viz/host", + "//services/service_manager/public/cpp", "//services/ui/common:mus_common", "//services/ui/public/interfaces", "//ui/aura",
diff --git a/services/ui/ws2/README.md b/services/ui/ws2/README.md index 67d1837..d8df403 100644 --- a/services/ui/ws2/README.md +++ b/services/ui/ws2/README.md
@@ -1,37 +1,5 @@ This directory contains the code for building a Window Service -implementation on top of an existing Aura hierarchy. There are two -distinct ways of attaching clients to the WindowService: - -+ With a WindowTreeFactory. This class provides an implementation of - mojom::WindowTreeFactory that internally creates - WindowServiceClientBindings for each mojom::WindowTreeRequest. The - following shows how to do this: - -```cpp -WindowService window_service; -WindowTreeFactory window_tree_factory(&window_service); -service_manager::BinderRegistry registry; -registry.AddInterface<mojom::WindowTreeFactory>( - base::BindRepeating(&WindowTreeFactory::AddBinding, - base::Unretained(&window_tree_factory))); -``` - -+ Create a WindowServiceClientBinding to embed a client in a - Window. This is useful when obtaining mojom::WindowTreeClient - through some other means (perhaps another mojo api): -```cpp -WindowService window_service; -aura::Window* window_to_embed_client_in; -mojom::WindowTreeClientPtr window_tree_client; -WindowServiceClientBinding binding; -// This is Run() when the connection to the client is lost. Typically this -// signal is used to delete the WindowServiceClientBinding. -base::Closure connection_lost_callback; -binding.InitForEmbed(&window_service, - std::move(window_tree_client), - window_to_embed_client_in, - std::move(connection_lost_callback)); -``` +implementation on top of an existing Aura hierarchy. Each client is managed by a WindowServiceClient. WindowServiceClient implements the WindowTree implementation that is passed to the @@ -40,4 +8,4 @@ window requests. Clients use the WindowService by configuring Aura with a mode of -mus. See aura::Env::Mode for details. +MUS. See aura::Env::Mode for details.
diff --git a/services/ui/ws2/gpu_support.h b/services/ui/ws2/gpu_support.h new file mode 100644 index 0000000..303584a --- /dev/null +++ b/services/ui/ws2/gpu_support.h
@@ -0,0 +1,42 @@ +// Copyright 2018 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef SERVICES_UI_WS2_GPU_SUPPORT_H_ +#define SERVICES_UI_WS2_GPU_SUPPORT_H_ + +#include "base/component_export.h" +#include "base/memory/scoped_refptr.h" +#include "components/discardable_memory/public/interfaces/discardable_shared_memory_manager.mojom.h" +#include "services/ui/public/interfaces/gpu.mojom.h" + +namespace base { +class SingleThreadTaskRunner; +} + +namespace ui { +namespace ws2 { + +// GpuSupport provides the functions needed for gpu related functionality. It is +// expected this class is bound to functions in content that do this. Once Viz +// moves out of content, this class can be removed. +class COMPONENT_EXPORT(WINDOW_SERVICE) GpuSupport { + public: + virtual ~GpuSupport() {} + + // Returns the task runner used to bind gpu related interfaces on. This is + // typically the io-thread. + virtual scoped_refptr<base::SingleThreadTaskRunner> GetGpuTaskRunner() = 0; + + // The Bind functions are called when a client requests a gpu related + // interface. + virtual void BindDiscardableSharedMemoryManagerOnGpuTaskRunner( + discardable_memory::mojom::DiscardableSharedMemoryManagerRequest + request) = 0; + virtual void BindGpuRequestOnGpuTaskRunner(ui::mojom::GpuRequest request) = 0; +}; + +} // namespace ws2 +} // namespace ui + +#endif // SERVICES_UI_WS2_GPU_SUPPORT_H_
diff --git a/services/ui/ws2/window_service.cc b/services/ui/ws2/window_service.cc index 4604213..7f3613cc 100644 --- a/services/ui/ws2/window_service.cc +++ b/services/ui/ws2/window_service.cc
@@ -4,14 +4,20 @@ #include "services/ui/ws2/window_service.h" +#include "base/bind.h" +#include "base/single_thread_task_runner.h" +#include "services/ui/ws2/gpu_support.h" #include "services/ui/ws2/window_data.h" #include "services/ui/ws2/window_service_client.h" +#include "services/ui/ws2/window_service_delegate.h" +#include "services/ui/ws2/window_tree_factory.h" namespace ui { namespace ws2 { -WindowService::WindowService(WindowServiceDelegate* delegate) - : delegate_(delegate) {} +WindowService::WindowService(WindowServiceDelegate* delegate, + std::unique_ptr<GpuSupport> gpu_support) + : delegate_(delegate), gpu_support_(std::move(gpu_support)) {} WindowService::~WindowService() {} @@ -36,5 +42,59 @@ this, client_id, window_tree_client, intercepts_events); } +void WindowService::OnStart() { + window_tree_factory_ = std::make_unique<WindowTreeFactory>(this); + + registry_.AddInterface(base::BindRepeating( + &WindowService::BindClipboardRequest, base::Unretained(this))); + registry_.AddInterface(base::BindRepeating( + &WindowService::BindDisplayManagerRequest, base::Unretained(this))); + registry_.AddInterface(base::BindRepeating( + &WindowService::BindImeDriverRequest, base::Unretained(this))); + registry_.AddInterface(base::BindRepeating( + &WindowService::BindWindowTreeFactoryRequest, base::Unretained(this))); + + // |gpu_support_| may be null in tests. + if (gpu_support_) { + registry_.AddInterface( + base::BindRepeating( + &GpuSupport::BindDiscardableSharedMemoryManagerOnGpuTaskRunner, + base::Unretained(gpu_support_.get())), + gpu_support_->GetGpuTaskRunner()); + registry_.AddInterface( + base::BindRepeating(&GpuSupport::BindGpuRequestOnGpuTaskRunner, + base::Unretained(gpu_support_.get())), + gpu_support_->GetGpuTaskRunner()); + } +} + +void WindowService::OnBindInterface( + const service_manager::BindSourceInfo& remote_info, + const std::string& interface_name, + mojo::ScopedMessagePipeHandle handle) { + registry_.BindInterface(interface_name, std::move(handle)); +} + +void WindowService::BindClipboardRequest(mojom::ClipboardRequest request) { + // TODO: https://crbug.com/839591. + NOTIMPLEMENTED(); +} + +void WindowService::BindDisplayManagerRequest( + mojom::DisplayManagerRequest request) { + // TODO: https://crbug.com/839592. + NOTIMPLEMENTED(); +} + +void WindowService::BindImeDriverRequest(mojom::IMEDriverRequest request) { + // TODO: https://crbug.com/837710. + NOTIMPLEMENTED(); +} + +void WindowService::BindWindowTreeFactoryRequest( + ui::mojom::WindowTreeFactoryRequest request) { + window_tree_factory_->AddBinding(std::move(request)); +} + } // namespace ws2 } // namespace ui
diff --git a/services/ui/ws2/window_service.h b/services/ui/ws2/window_service.h index 0b48566..e9b647f 100644 --- a/services/ui/ws2/window_service.h +++ b/services/ui/ws2/window_service.h
@@ -9,6 +9,12 @@ #include "base/component_export.h" #include "base/macros.h" +#include "services/service_manager/public/cpp/binder_registry.h" +#include "services/service_manager/public/cpp/service.h" +#include "services/ui/public/interfaces/clipboard.mojom.h" +#include "services/ui/public/interfaces/display_manager.mojom.h" +#include "services/ui/public/interfaces/ime/ime.mojom.h" +#include "services/ui/public/interfaces/window_tree.mojom.h" #include "services/ui/ws2/ids.h" namespace aura { @@ -23,19 +29,23 @@ namespace ws2 { +class GpuSupport; class WindowData; class WindowServiceClient; class WindowServiceDelegate; +class WindowTreeFactory; // WindowService is the entry point into providing an implementation of // the ui::mojom::WindowTree related mojoms on top of an aura Window hierarchy. // A WindowServiceClient is created for each client. Typically you'll // also create a WindowTreeFactory to handle incoming // mojom::WindowTreeFactoryRequests. -class COMPONENT_EXPORT(WINDOW_SERVICE) WindowService { +class COMPONENT_EXPORT(WINDOW_SERVICE) WindowService + : public service_manager::Service { public: - explicit WindowService(WindowServiceDelegate* delegate); - ~WindowService(); + WindowService(WindowServiceDelegate* delegate, + std::unique_ptr<GpuSupport> gpu_support); + ~WindowService() override; // Gets the WindowData for |window|, creating if necessary. WindowData* GetWindowDataForWindowCreateIfNecessary(aura::Window* window); @@ -48,15 +58,33 @@ WindowServiceDelegate* delegate() { return delegate_; } + // service_manager::Service: + void OnStart() override; + void OnBindInterface(const service_manager::BindSourceInfo& remote_info, + const std::string& interface_name, + mojo::ScopedMessagePipeHandle handle) override; + private: + void BindClipboardRequest(mojom::ClipboardRequest request); + void BindDisplayManagerRequest(mojom::DisplayManagerRequest request); + void BindImeDriverRequest(mojom::IMEDriverRequest request); + void BindWindowTreeFactoryRequest( + ui::mojom::WindowTreeFactoryRequest request); + + WindowServiceDelegate* delegate_; + + std::unique_ptr<GpuSupport> gpu_support_; + + service_manager::BinderRegistry registry_; + + std::unique_ptr<WindowTreeFactory> window_tree_factory_; + // Id for the next WindowServiceClient. ClientSpecificId next_client_id_ = kWindowServerClientId + 1; // Id used for the next window created locally that is exposed to clients. ClientSpecificId next_window_id_ = 1; - WindowServiceDelegate* delegate_; - DISALLOW_COPY_AND_ASSIGN(WindowService); };
diff --git a/services/ui/ws2/window_service_client_unittest.cc b/services/ui/ws2/window_service_client_unittest.cc index 1ceafbb..2193c25 100644 --- a/services/ui/ws2/window_service_client_unittest.cc +++ b/services/ui/ws2/window_service_client_unittest.cc
@@ -8,6 +8,7 @@ #include <stdint.h> #include "base/test/scoped_task_environment.h" +#include "services/ui/ws2/gpu_support.h" #include "services/ui/ws2/test_window_service_delegate.h" #include "services/ui/ws2/test_window_tree_client.h" #include "services/ui/ws2/window_service.h" @@ -49,7 +50,7 @@ base::test::ScopedTaskEnvironment::MainThreadType::UI}; aura::test::AuraTestHelper aura_test_helper_; TestWindowServiceDelegate delegate_; - WindowService service_{&delegate_}; + WindowService service_{&delegate_, nullptr}; DISALLOW_COPY_AND_ASSIGN(WindowServiceTestHelper); };
diff --git a/services/video_capture/BUILD.gn b/services/video_capture/BUILD.gn index 815abe3..c205814a 100644 --- a/services/video_capture/BUILD.gn +++ b/services/video_capture/BUILD.gn
@@ -39,12 +39,14 @@ "scoped_access_permission_media_to_mojo_adapter.h", "service_impl.cc", "service_impl.h", + "shared_memory_virtual_device_mojo_adapter.cc", + "shared_memory_virtual_device_mojo_adapter.h", "testing_controls_impl.cc", "testing_controls_impl.h", + "texture_virtual_device_mojo_adapter.cc", + "texture_virtual_device_mojo_adapter.h", "virtual_device_enabled_device_factory.cc", "virtual_device_enabled_device_factory.h", - "virtual_device_mojo_adapter.cc", - "virtual_device_mojo_adapter.h", ] public_deps = [ @@ -89,6 +91,7 @@ "test/mock_receiver.cc", "test/mock_receiver.h", "test/virtual_device_unittest.cc", + "texture_virtual_device_mojo_adapter_unittest.cc", ] deps = [
diff --git a/services/video_capture/device_factory_media_to_mojo_adapter.cc b/services/video_capture/device_factory_media_to_mojo_adapter.cc index 1a83bb7..d8bdb0b8 100644 --- a/services/video_capture/device_factory_media_to_mojo_adapter.cc +++ b/services/video_capture/device_factory_media_to_mojo_adapter.cc
@@ -130,10 +130,16 @@ base::Passed(&create_and_add_new_device_cb))); } -void DeviceFactoryMediaToMojoAdapter::AddVirtualDevice( +void DeviceFactoryMediaToMojoAdapter::AddSharedMemoryVirtualDevice( const media::VideoCaptureDeviceInfo& device_info, mojom::ProducerPtr producer, - mojom::VirtualDeviceRequest virtual_device_request) { + mojom::SharedMemoryVirtualDeviceRequest virtual_device_request) { + NOTIMPLEMENTED(); +} + +void DeviceFactoryMediaToMojoAdapter::AddTextureVirtualDevice( + const media::VideoCaptureDeviceInfo& device_info, + mojom::TextureVirtualDeviceRequest virtual_device_request) { NOTIMPLEMENTED(); }
diff --git a/services/video_capture/device_factory_media_to_mojo_adapter.h b/services/video_capture/device_factory_media_to_mojo_adapter.h index 6216dc7..46c2206 100644 --- a/services/video_capture/device_factory_media_to_mojo_adapter.h +++ b/services/video_capture/device_factory_media_to_mojo_adapter.h
@@ -35,9 +35,13 @@ void CreateDevice(const std::string& device_id, mojom::DeviceRequest device_request, CreateDeviceCallback callback) override; - void AddVirtualDevice(const media::VideoCaptureDeviceInfo& device_info, - mojom::ProducerPtr producer, - mojom::VirtualDeviceRequest virtual_device) override; + void AddSharedMemoryVirtualDevice( + const media::VideoCaptureDeviceInfo& device_info, + mojom::ProducerPtr producer, + mojom::SharedMemoryVirtualDeviceRequest virtual_device) override; + void AddTextureVirtualDevice( + const media::VideoCaptureDeviceInfo& device_info, + mojom::TextureVirtualDeviceRequest virtual_device) override; private: struct ActiveDeviceEntry {
diff --git a/services/video_capture/public/mojom/BUILD.gn b/services/video_capture/public/mojom/BUILD.gn index 934ab39..6948edf 100644 --- a/services/video_capture/public/mojom/BUILD.gn +++ b/services/video_capture/public/mojom/BUILD.gn
@@ -11,6 +11,7 @@ "device_factory_provider.mojom", "producer.mojom", "receiver.mojom", + "scoped_access_permission.mojom", "testing_controls.mojom", "virtual_device.mojom", ]
diff --git a/services/video_capture/public/mojom/device_factory.mojom b/services/video_capture/public/mojom/device_factory.mojom index 73f548b..3a39bb1 100644 --- a/services/video_capture/public/mojom/device_factory.mojom +++ b/services/video_capture/public/mojom/device_factory.mojom
@@ -46,8 +46,15 @@ // appear to clients of the device as if they were produced by the device. // The virtual device is removed either when the caller releases // |virtual_device| or the given |producer| is closed. - AddVirtualDevice( + AddSharedMemoryVirtualDevice( media.mojom.VideoCaptureDeviceInfo device_info, Producer producer, - VirtualDevice& virtual_device); + SharedMemoryVirtualDevice& virtual_device); + + // Similar to AddSharedMemoryVirtualDevice() but for virtual devices that + // are fed with textures (via MailboxHolders) allocated by the caller instead + // of shared memory buffers provided by the service on demand. + AddTextureVirtualDevice( + media.mojom.VideoCaptureDeviceInfo device_info, + TextureVirtualDevice& virtual_device); };
diff --git a/services/video_capture/public/mojom/receiver.mojom b/services/video_capture/public/mojom/receiver.mojom index abcd62d5..7c3ff55 100644 --- a/services/video_capture/public/mojom/receiver.mojom +++ b/services/video_capture/public/mojom/receiver.mojom
@@ -5,9 +5,7 @@ module video_capture.mojom; import "media/capture/mojom/video_capture_types.mojom"; - -// Empty interface for encapsulating scoped access permission to a Buffer. -interface ScopedAccessPermission {}; +import "services/video_capture/public/mojom/scoped_access_permission.mojom"; // Callback interface for receiving data and messages from a started // video_capture.mojom.Device.
diff --git a/services/video_capture/public/mojom/scoped_access_permission.mojom b/services/video_capture/public/mojom/scoped_access_permission.mojom new file mode 100644 index 0000000..3e5677a8 --- /dev/null +++ b/services/video_capture/public/mojom/scoped_access_permission.mojom
@@ -0,0 +1,8 @@ +// Copyright 2018 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +module video_capture.mojom; + +// Empty interface for encapsulating scoped access permission to a Buffer. +interface ScopedAccessPermission {};
diff --git a/services/video_capture/public/mojom/virtual_device.mojom b/services/video_capture/public/mojom/virtual_device.mojom index bc474a2..18559a8 100644 --- a/services/video_capture/public/mojom/virtual_device.mojom +++ b/services/video_capture/public/mojom/virtual_device.mojom
@@ -6,6 +6,7 @@ import "media/capture/mojom/video_capture_types.mojom"; import "services/video_capture/public/mojom/producer.mojom"; +import "services/video_capture/public/mojom/scoped_access_permission.mojom"; import "ui/gfx/geometry/mojo/geometry.mojom"; // Interface for a producer to feed video frames into a virtual @@ -23,7 +24,7 @@ // request, a separate interface |Producer| is used for notifying the // producer with the buffer information changes. It is producer's // responsibility for caching the buffer information. -interface VirtualDevice { +interface SharedMemoryVirtualDevice { // This is used by the producer for requesting a buffer to store frame // data. The frame can subsequently be pushed via |OnFrameReadyInBuffer|. // An invalid buffer ID |Constants.kInvalidBufferId| will be returned @@ -42,3 +43,22 @@ OnFrameReadyInBuffer(int32 buffer_id, media.mojom.VideoFrameInfo frame_info); }; + +// Similar to SharedMemoryVirtualDevice but uses MailboxHolders instead of +// shared memory for transporting frames. The MailboxHolders are to be +// provided by the caller. +interface TextureVirtualDevice { + // Registers a new set of mailbox holders for subsequent transport of + // frames. + OnNewMailboxHolderBufferHandle( + int32 buffer_id, media.mojom.MailboxBufferHandleSet mailbox_handles); + // The invoker must guarantee that the textures with |buffer_id| stay valid + // until |access_permission| is released by the invocation target. + OnFrameReadyInBuffer(int32 buffer_id, + ScopedAccessPermission access_permission, + media.mojom.VideoFrameInfo frame_info); + // Unregisters a set of mailbox holders previously registered via + // OnNewMailboxHolderBufferHandle(). Note, that this should not be called + // while the corresponding buffer is still in use via OnFrameReadyInBuffer(). + OnBufferRetired(int32 buffer_id); +};
diff --git a/services/video_capture/virtual_device_mojo_adapter.cc b/services/video_capture/shared_memory_virtual_device_mojo_adapter.cc similarity index 79% rename from services/video_capture/virtual_device_mojo_adapter.cc rename to services/video_capture/shared_memory_virtual_device_mojo_adapter.cc index a30f4006..41bdc25 100644 --- a/services/video_capture/virtual_device_mojo_adapter.cc +++ b/services/video_capture/shared_memory_virtual_device_mojo_adapter.cc
@@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "services/video_capture/virtual_device_mojo_adapter.h" +#include "services/video_capture/shared_memory_virtual_device_mojo_adapter.h" #include "base/logging.h" #include "media/base/bind_to_current_loop.h" @@ -17,7 +17,8 @@ namespace { void OnNewBufferHandleAcknowleged( - video_capture::mojom::VirtualDevice::RequestFrameBufferCallback callback, + video_capture::mojom::SharedMemoryVirtualDevice::RequestFrameBufferCallback + callback, int32_t buffer_id) { std::move(callback).Run(buffer_id); } @@ -26,22 +27,20 @@ namespace video_capture { -VirtualDeviceMojoAdapter::VirtualDeviceMojoAdapter( +SharedMemoryVirtualDeviceMojoAdapter::SharedMemoryVirtualDeviceMojoAdapter( std::unique_ptr<service_manager::ServiceContextRef> service_ref, - const media::VideoCaptureDeviceInfo& device_info, mojom::ProducerPtr producer) : service_ref_(std::move(service_ref)), - device_info_(device_info), producer_(std::move(producer)), buffer_pool_(new media::VideoCaptureBufferPoolImpl( std::make_unique<media::VideoCaptureBufferTrackerFactoryImpl>(), max_buffer_pool_buffer_count())) {} -VirtualDeviceMojoAdapter::~VirtualDeviceMojoAdapter() { +SharedMemoryVirtualDeviceMojoAdapter::~SharedMemoryVirtualDeviceMojoAdapter() { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); } -int VirtualDeviceMojoAdapter::max_buffer_pool_buffer_count() { +int SharedMemoryVirtualDeviceMojoAdapter::max_buffer_pool_buffer_count() { // The maximum number of video frame buffers in-flight at any one time // If all buffers are still in use by consumers when new frames are produced // those frames get dropped. @@ -50,7 +49,7 @@ return kMaxBufferCount; } -void VirtualDeviceMojoAdapter::RequestFrameBuffer( +void SharedMemoryVirtualDeviceMojoAdapter::RequestFrameBuffer( const gfx::Size& dimension, media::VideoPixelFormat pixel_format, RequestFrameBufferCallback callback) { @@ -85,7 +84,7 @@ media::mojom::VideoBufferHandle::New(); buffer_handle->set_shared_buffer_handle( buffer_pool_->GetHandleForInterProcessTransit(buffer_id, - true /* read_only */)); + true /*read_only*/)); receiver_->OnNewBuffer(buffer_id, std::move(buffer_handle)); } known_buffer_ids_.push_back(buffer_id); @@ -106,7 +105,7 @@ std::move(callback).Run(buffer_id); } -void VirtualDeviceMojoAdapter::OnFrameReadyInBuffer( +void SharedMemoryVirtualDeviceMojoAdapter::OnFrameReadyInBuffer( int32_t buffer_id, ::media::mojom::VideoFrameInfoPtr frame_info) { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); @@ -133,13 +132,13 @@ buffer_pool_->RelinquishProducerReservation(buffer_id); } -void VirtualDeviceMojoAdapter::Start( +void SharedMemoryVirtualDeviceMojoAdapter::Start( const media::VideoCaptureParams& requested_settings, mojom::ReceiverPtr receiver) { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); - receiver.set_connection_error_handler( - base::Bind(&VirtualDeviceMojoAdapter::OnReceiverConnectionErrorOrClose, - base::Unretained(this))); + receiver.set_connection_error_handler(base::BindOnce( + &SharedMemoryVirtualDeviceMojoAdapter::OnReceiverConnectionErrorOrClose, + base::Unretained(this))); receiver_ = std::move(receiver); receiver_->OnStarted(); @@ -149,54 +148,56 @@ media::mojom::VideoBufferHandle::New(); buffer_handle->set_shared_buffer_handle( buffer_pool_->GetHandleForInterProcessTransit(buffer_id, - true /* read_only */)); + true /*read_only*/)); receiver_->OnNewBuffer(buffer_id, std::move(buffer_handle)); } } -void VirtualDeviceMojoAdapter::OnReceiverReportingUtilization( +void SharedMemoryVirtualDeviceMojoAdapter::OnReceiverReportingUtilization( int32_t frame_feedback_id, double utilization) { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); } -void VirtualDeviceMojoAdapter::RequestRefreshFrame() { +void SharedMemoryVirtualDeviceMojoAdapter::RequestRefreshFrame() { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); } -void VirtualDeviceMojoAdapter::MaybeSuspend() { +void SharedMemoryVirtualDeviceMojoAdapter::MaybeSuspend() { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); } -void VirtualDeviceMojoAdapter::Resume() { +void SharedMemoryVirtualDeviceMojoAdapter::Resume() { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); } -void VirtualDeviceMojoAdapter::GetPhotoState(GetPhotoStateCallback callback) { +void SharedMemoryVirtualDeviceMojoAdapter::GetPhotoState( + GetPhotoStateCallback callback) { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); std::move(callback).Run(nullptr); } -void VirtualDeviceMojoAdapter::SetPhotoOptions( +void SharedMemoryVirtualDeviceMojoAdapter::SetPhotoOptions( media::mojom::PhotoSettingsPtr settings, SetPhotoOptionsCallback callback) { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); } -void VirtualDeviceMojoAdapter::TakePhoto(TakePhotoCallback callback) { +void SharedMemoryVirtualDeviceMojoAdapter::TakePhoto( + TakePhotoCallback callback) { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); } -void VirtualDeviceMojoAdapter::Stop() { +void SharedMemoryVirtualDeviceMojoAdapter::Stop() { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); if (!receiver_.is_bound()) return; // Unsubscribe from connection error callbacks. - receiver_.set_connection_error_handler(base::Closure()); + receiver_.set_connection_error_handler(base::OnceClosure()); receiver_.reset(); } -void VirtualDeviceMojoAdapter::OnReceiverConnectionErrorOrClose() { +void SharedMemoryVirtualDeviceMojoAdapter::OnReceiverConnectionErrorOrClose() { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); Stop(); }
diff --git a/services/video_capture/virtual_device_mojo_adapter.h b/services/video_capture/shared_memory_virtual_device_mojo_adapter.h similarity index 74% rename from services/video_capture/virtual_device_mojo_adapter.h rename to services/video_capture/shared_memory_virtual_device_mojo_adapter.h index 57e6e4c..7416c32 100644 --- a/services/video_capture/virtual_device_mojo_adapter.h +++ b/services/video_capture/shared_memory_virtual_device_mojo_adapter.h
@@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef SERVICES_VIDEO_CAPTURE_VIRTUAL_DEVICE_MOJO_ADAPTER_H_ -#define SERVICES_VIDEO_CAPTURE_VIRTUAL_DEVICE_MOJO_ADAPTER_H_ +#ifndef SERVICES_VIDEO_CAPTURE_SHARED_MEMORY_VIRTUAL_DEVICE_MOJO_ADAPTER_H_ +#define SERVICES_VIDEO_CAPTURE_SHARED_MEMORY_VIRTUAL_DEVICE_MOJO_ADAPTER_H_ #include "base/sequence_checker.h" #include "media/capture/video/video_capture_buffer_pool.h" @@ -15,17 +15,16 @@ namespace video_capture { -// Implementation of mojom::Device backed by mojom::VirtualDevice. -class VirtualDeviceMojoAdapter : public mojom::VirtualDevice, - public mojom::Device { +class SharedMemoryVirtualDeviceMojoAdapter + : public mojom::SharedMemoryVirtualDevice, + public mojom::Device { public: - VirtualDeviceMojoAdapter( + SharedMemoryVirtualDeviceMojoAdapter( std::unique_ptr<service_manager::ServiceContextRef> service_ref, - const media::VideoCaptureDeviceInfo& device_info, mojom::ProducerPtr producer); - ~VirtualDeviceMojoAdapter() override; + ~SharedMemoryVirtualDeviceMojoAdapter() override; - // mojom::VirtualDevice implementation. + // mojom::SharedMemoryVirtualDevice implementation. void RequestFrameBuffer(const gfx::Size& dimension, media::VideoPixelFormat pixel_format, RequestFrameBufferCallback callback) override; @@ -48,10 +47,6 @@ void Stop(); - const media::VideoCaptureDeviceInfo& device_info() const { - return device_info_; - } - // Returns the fixed maximum number of buffers passed to the constructor // of VideoCaptureBufferPoolImpl. static int max_buffer_pool_buffer_count(); @@ -60,16 +55,15 @@ void OnReceiverConnectionErrorOrClose(); const std::unique_ptr<service_manager::ServiceContextRef> service_ref_; - const media::VideoCaptureDeviceInfo device_info_; mojom::ReceiverPtr receiver_; mojom::ProducerPtr producer_; scoped_refptr<media::VideoCaptureBufferPool> buffer_pool_; std::vector<int> known_buffer_ids_; SEQUENCE_CHECKER(sequence_checker_); - DISALLOW_COPY_AND_ASSIGN(VirtualDeviceMojoAdapter); + DISALLOW_COPY_AND_ASSIGN(SharedMemoryVirtualDeviceMojoAdapter); }; } // namespace video_capture -#endif // SERVICES_VIDEO_CAPTURE_VIRTUAL_DEVICE_MOJO_ADAPTER_H_ +#endif // SERVICES_VIDEO_CAPTURE_SHARED_MEMORY_VIRTUAL_DEVICE_MOJO_ADAPTER_H_
diff --git a/services/video_capture/test/device_factory_provider_unittest.cc b/services/video_capture/test/device_factory_provider_unittest.cc index ea96cf0..7f2e8ff 100644 --- a/services/video_capture/test/device_factory_provider_unittest.cc +++ b/services/video_capture/test/device_factory_provider_unittest.cc
@@ -10,8 +10,8 @@ #include "services/video_capture/test/device_factory_provider_test.h" #include "services/video_capture/test/mock_producer.h" -using testing::Exactly; using testing::_; +using testing::Exactly; using testing::Invoke; using testing::InvokeWithoutArgs; @@ -60,7 +60,7 @@ const std::string virtual_device_id = "/virtual/device"; media::VideoCaptureDeviceInfo info; info.descriptor.device_id = virtual_device_id; - mojom::VirtualDevicePtr virtual_device_proxy; + mojom::SharedMemoryVirtualDevicePtr virtual_device_proxy; mojom::ProducerPtr producer_proxy; MockProducer producer(mojo::MakeRequest(&producer_proxy)); EXPECT_CALL(device_info_receiver_, Run(_)) @@ -78,8 +78,9 @@ EXPECT_TRUE(virtual_device_enumerated); wait_loop.Quit(); })); - factory_->AddVirtualDevice(info, std::move(producer_proxy), - mojo::MakeRequest(&virtual_device_proxy)); + factory_->AddSharedMemoryVirtualDevice( + info, std::move(producer_proxy), + mojo::MakeRequest(&virtual_device_proxy)); factory_->GetDeviceInfos(device_info_receiver_.Get()); wait_loop.Run(); } @@ -113,7 +114,7 @@ media::VideoCaptureDeviceInfo info; info.descriptor.device_id = virtual_device_id; mojom::DevicePtr device_proxy; - mojom::VirtualDevicePtr virtual_device_proxy; + mojom::SharedMemoryVirtualDevicePtr virtual_device_proxy; mojom::ProducerPtr producer_proxy; MockProducer producer(mojo::MakeRequest(&producer_proxy)); base::MockCallback<mojom::DeviceFactory::CreateDeviceCallback> @@ -122,8 +123,9 @@ Run(mojom::DeviceAccessResultCode::SUCCESS)) .Times(1) .WillOnce(InvokeWithoutArgs([&wait_loop]() { wait_loop.Quit(); })); - factory_->AddVirtualDevice(info, std::move(producer_proxy), - mojo::MakeRequest(&virtual_device_proxy)); + factory_->AddSharedMemoryVirtualDevice( + info, std::move(producer_proxy), + mojo::MakeRequest(&virtual_device_proxy)); factory_->CreateDevice(virtual_device_id, mojo::MakeRequest(&device_proxy), create_device_proxy_callback.Get()); wait_loop.Run();
diff --git a/services/video_capture/test/virtual_device_unittest.cc b/services/video_capture/test/virtual_device_unittest.cc index 2658ad9..7f05e6a 100644 --- a/services/video_capture/test/virtual_device_unittest.cc +++ b/services/video_capture/test/virtual_device_unittest.cc
@@ -8,9 +8,9 @@ #include "base/test/mock_callback.h" #include "media/capture/video/video_capture_device_info.h" #include "services/service_manager/public/cpp/service_context_ref.h" +#include "services/video_capture/shared_memory_virtual_device_mojo_adapter.h" #include "services/video_capture/test/mock_producer.h" #include "services/video_capture/test/mock_receiver.h" -#include "services/video_capture/virtual_device_mojo_adapter.h" #include "testing/gtest/include/gtest/gtest.h" using testing::_; @@ -40,8 +40,8 @@ mojom::ProducerPtr producer_proxy; producer_ = std::make_unique<MockProducer>(mojo::MakeRequest(&producer_proxy)); - device_adapter_ = std::make_unique<VirtualDeviceMojoAdapter>( - ref_factory_.CreateRef(), device_info_, std::move(producer_proxy)); + device_adapter_ = std::make_unique<SharedMemoryVirtualDeviceMojoAdapter>( + ref_factory_.CreateRef(), std::move(producer_proxy)); } void OnFrameBufferReceived(bool valid_buffer_expected, int32_t buffer_id) { @@ -57,7 +57,8 @@ void VerifyAndGetMaxFrameBuffers() { base::RunLoop wait_loop; EXPECT_CALL(*producer_, DoOnNewBufferHandle(_, _, _)) - .Times(VirtualDeviceMojoAdapter::max_buffer_pool_buffer_count()) + .Times(SharedMemoryVirtualDeviceMojoAdapter:: + max_buffer_pool_buffer_count()) .WillRepeatedly( Invoke([](int32_t buffer_id, mojo::ScopedSharedBufferHandle* handle, mojom::Producer::OnNewBufferHandleCallback& callback) { @@ -65,7 +66,9 @@ })); // Should receive valid buffer for up to the maximum buffer count. for (int i = 0; - i < VirtualDeviceMojoAdapter::max_buffer_pool_buffer_count(); i++) { + i < + SharedMemoryVirtualDeviceMojoAdapter::max_buffer_pool_buffer_count(); + i++) { device_adapter_->RequestFrameBuffer( kTestFrameSize, kTestPixelFormat, base::Bind(&VirtualDeviceTest::OnFrameBufferReceived, @@ -80,12 +83,13 @@ wait_loop.RunUntilIdle(); Mock::VerifyAndClearExpectations(producer_.get()); - EXPECT_EQ(VirtualDeviceMojoAdapter::max_buffer_pool_buffer_count(), - static_cast<int>(received_buffer_ids_.size())); + EXPECT_EQ( + SharedMemoryVirtualDeviceMojoAdapter::max_buffer_pool_buffer_count(), + static_cast<int>(received_buffer_ids_.size())); } protected: - std::unique_ptr<VirtualDeviceMojoAdapter> device_adapter_; + std::unique_ptr<SharedMemoryVirtualDeviceMojoAdapter> device_adapter_; // ID of buffers received and owned by the producer. std::vector<int> received_buffer_ids_; std::unique_ptr<MockProducer> producer_; @@ -96,12 +100,6 @@ media::VideoCaptureDeviceInfo device_info_; }; -TEST_F(VirtualDeviceTest, VerifyDeviceInfo) { - EXPECT_EQ(kTestDeviceId, device_adapter_->device_info().descriptor.device_id); - EXPECT_EQ(kTestDeviceName, - device_adapter_->device_info().descriptor.display_name()); -} - TEST_F(VirtualDeviceTest, OnFrameReadyInBufferWithoutReceiver) { // Obtain maximum number of buffers. VerifyAndGetMaxFrameBuffers(); @@ -135,9 +133,11 @@ MockReceiver receiver(mojo::MakeRequest(&receiver_proxy)); EXPECT_CALL(receiver, OnStarted()); EXPECT_CALL(receiver, DoOnNewBuffer(_, _)) - .Times(VirtualDeviceMojoAdapter::max_buffer_pool_buffer_count()); + .Times( + SharedMemoryVirtualDeviceMojoAdapter::max_buffer_pool_buffer_count()); EXPECT_CALL(receiver, DoOnFrameReadyInBuffer(_, _, _, _)) - .Times(VirtualDeviceMojoAdapter::max_buffer_pool_buffer_count()); + .Times( + SharedMemoryVirtualDeviceMojoAdapter::max_buffer_pool_buffer_count()); device_adapter_->Start(media::VideoCaptureParams(), std::move(receiver_proxy)); for (auto buffer_id : received_buffer_ids_) { @@ -152,7 +152,8 @@ // the available buffer in the pool. base::RunLoop wait_loop2; EXPECT_CALL(*producer_, DoOnNewBufferHandle(_, _, _)).Times(0); - base::MockCallback<mojom::VirtualDevice::RequestFrameBufferCallback> + base::MockCallback< + mojom::SharedMemoryVirtualDevice::RequestFrameBufferCallback> request_frame_buffer_callback; EXPECT_CALL(request_frame_buffer_callback, Run(_)) .Times(1)
diff --git a/services/video_capture/texture_virtual_device_mojo_adapter.cc b/services/video_capture/texture_virtual_device_mojo_adapter.cc new file mode 100644 index 0000000..884d561 --- /dev/null +++ b/services/video_capture/texture_virtual_device_mojo_adapter.cc
@@ -0,0 +1,136 @@ +// Copyright 2018 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "services/video_capture/texture_virtual_device_mojo_adapter.h" + +#include "base/logging.h" +#include "base/memory/ptr_util.h" +#include "media/base/bind_to_current_loop.h" +#include "mojo/public/cpp/bindings/callback_helpers.h" +#include "mojo/public/cpp/bindings/strong_binding.h" +#include "services/video_capture/public/mojom/constants.mojom.h" + +namespace video_capture { + +TextureVirtualDeviceMojoAdapter::TextureVirtualDeviceMojoAdapter( + std::unique_ptr<service_manager::ServiceContextRef> service_ref) + : service_ref_(std::move(service_ref)) {} + +TextureVirtualDeviceMojoAdapter::~TextureVirtualDeviceMojoAdapter() { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); +} + +void TextureVirtualDeviceMojoAdapter::SetReceiverDisconnectedCallback( + base::OnceClosure callback) { + optional_receiver_disconnected_callback_ = std::move(callback); +} + +void TextureVirtualDeviceMojoAdapter::OnNewMailboxHolderBufferHandle( + int32_t buffer_id, + media::mojom::MailboxBufferHandleSetPtr mailbox_handles) { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + // Keep track of the buffer handles in order to be able to forward them to + // the Receiver when it connects. This includes cases where a new Receiver + // connects after a previous one has disconnected. + known_buffer_handles_.insert( + std::make_pair(buffer_id, mailbox_handles->Clone())); + + if (!receiver_.is_bound()) + return; + media::mojom::VideoBufferHandlePtr buffer_handle = + media::mojom::VideoBufferHandle::New(); + buffer_handle->set_mailbox_handles(std::move(mailbox_handles)); + receiver_->OnNewBuffer(buffer_id, std::move(buffer_handle)); +} + +void TextureVirtualDeviceMojoAdapter::OnFrameReadyInBuffer( + int32_t buffer_id, + mojom::ScopedAccessPermissionPtr access_permission, + media::mojom::VideoFrameInfoPtr frame_info) { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + if (!receiver_.is_bound()) + return; + receiver_->OnFrameReadyInBuffer(buffer_id, 0 /* frame_feedback_id */, + std::move(access_permission), + std::move(frame_info)); +} + +void TextureVirtualDeviceMojoAdapter::OnBufferRetired(int buffer_id) { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + known_buffer_handles_.erase(buffer_id); + if (!receiver_.is_bound()) + return; + receiver_->OnBufferRetired(buffer_id); +} + +void TextureVirtualDeviceMojoAdapter::Start( + const media::VideoCaptureParams& requested_settings, + mojom::ReceiverPtr receiver) { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + receiver.set_connection_error_handler(base::BindOnce( + &TextureVirtualDeviceMojoAdapter::OnReceiverConnectionErrorOrClose, + base::Unretained(this))); + receiver_ = std::move(receiver); + receiver_->OnStarted(); + + // Notify receiver of known buffer handles */ + for (auto& entry : known_buffer_handles_) { + media::mojom::VideoBufferHandlePtr buffer_handle = + media::mojom::VideoBufferHandle::New(); + buffer_handle->set_mailbox_handles(entry.second->Clone()); + receiver_->OnNewBuffer(entry.first, std::move(buffer_handle)); + } +} + +void TextureVirtualDeviceMojoAdapter::OnReceiverReportingUtilization( + int32_t frame_feedback_id, + double utilization) { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); +} + +void TextureVirtualDeviceMojoAdapter::RequestRefreshFrame() { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); +} + +void TextureVirtualDeviceMojoAdapter::MaybeSuspend() { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); +} + +void TextureVirtualDeviceMojoAdapter::Resume() { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); +} + +void TextureVirtualDeviceMojoAdapter::GetPhotoState( + GetPhotoStateCallback callback) { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + std::move(callback).Run(nullptr); +} + +void TextureVirtualDeviceMojoAdapter::SetPhotoOptions( + media::mojom::PhotoSettingsPtr settings, + SetPhotoOptionsCallback callback) { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); +} + +void TextureVirtualDeviceMojoAdapter::TakePhoto(TakePhotoCallback callback) { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); +} + +void TextureVirtualDeviceMojoAdapter::Stop() { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + if (!receiver_.is_bound()) + return; + // Unsubscribe from connection error callbacks. + receiver_.set_connection_error_handler(base::OnceClosure()); + receiver_.reset(); +} + +void TextureVirtualDeviceMojoAdapter::OnReceiverConnectionErrorOrClose() { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + Stop(); + if (optional_receiver_disconnected_callback_) + std::move(optional_receiver_disconnected_callback_).Run(); +} + +} // namespace video_capture
diff --git a/services/video_capture/texture_virtual_device_mojo_adapter.h b/services/video_capture/texture_virtual_device_mojo_adapter.h new file mode 100644 index 0000000..0381730 --- /dev/null +++ b/services/video_capture/texture_virtual_device_mojo_adapter.h
@@ -0,0 +1,67 @@ +// Copyright 2018 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef SERVICES_VIDEO_CAPTURE_TEXTURE_VIRTUAL_DEVICE_MOJO_ADAPTER_H_ +#define SERVICES_VIDEO_CAPTURE_TEXTURE_VIRTUAL_DEVICE_MOJO_ADAPTER_H_ + +#include "base/sequence_checker.h" +#include "media/capture/video/video_capture_buffer_pool.h" +#include "media/capture/video_capture_types.h" +#include "services/service_manager/public/cpp/service_context_ref.h" +#include "services/video_capture/public/mojom/device.mojom.h" +#include "services/video_capture/public/mojom/producer.mojom.h" +#include "services/video_capture/public/mojom/virtual_device.mojom.h" + +namespace video_capture { + +class TextureVirtualDeviceMojoAdapter : public mojom::TextureVirtualDevice, + public mojom::Device { + public: + explicit TextureVirtualDeviceMojoAdapter( + std::unique_ptr<service_manager::ServiceContextRef> service_ref); + ~TextureVirtualDeviceMojoAdapter() override; + + void SetReceiverDisconnectedCallback(base::OnceClosure callback); + + // mojom::TextureVirtualDevice implementation. + void OnNewMailboxHolderBufferHandle( + int32_t buffer_id, + media::mojom::MailboxBufferHandleSetPtr mailbox_handles) override; + void OnFrameReadyInBuffer( + int32_t buffer_id, + mojom::ScopedAccessPermissionPtr access_permission, + media::mojom::VideoFrameInfoPtr frame_info) override; + void OnBufferRetired(int buffer_id) override; + + // mojom::Device implementation. + void Start(const media::VideoCaptureParams& requested_settings, + mojom::ReceiverPtr receiver) override; + void OnReceiverReportingUtilization(int32_t frame_feedback_id, + double utilization) override; + void RequestRefreshFrame() override; + void MaybeSuspend() override; + void Resume() override; + void GetPhotoState(GetPhotoStateCallback callback) override; + void SetPhotoOptions(media::mojom::PhotoSettingsPtr settings, + SetPhotoOptionsCallback callback) override; + void TakePhoto(TakePhotoCallback callback) override; + + void Stop(); + + private: + void OnReceiverConnectionErrorOrClose(); + + const std::unique_ptr<service_manager::ServiceContextRef> service_ref_; + base::OnceClosure optional_receiver_disconnected_callback_; + mojom::ReceiverPtr receiver_; + std::unordered_map<int32_t, media::mojom::MailboxBufferHandleSetPtr> + known_buffer_handles_; + SEQUENCE_CHECKER(sequence_checker_); + + DISALLOW_COPY_AND_ASSIGN(TextureVirtualDeviceMojoAdapter); +}; + +} // namespace video_capture + +#endif // SERVICES_VIDEO_CAPTURE_TEXTURE_VIRTUAL_DEVICE_MOJO_ADAPTER_H_
diff --git a/services/video_capture/texture_virtual_device_mojo_adapter_unittest.cc b/services/video_capture/texture_virtual_device_mojo_adapter_unittest.cc new file mode 100644 index 0000000..4753d2b --- /dev/null +++ b/services/video_capture/texture_virtual_device_mojo_adapter_unittest.cc
@@ -0,0 +1,110 @@ +// Copyright 2018 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "services/video_capture/texture_virtual_device_mojo_adapter.h" + +#include "base/run_loop.h" +#include "base/test/scoped_task_environment.h" +#include "services/video_capture/test/mock_receiver.h" +#include "testing/gmock/include/gmock/gmock.h" +#include "testing/gtest/include/gtest/gtest.h" + +using testing::InvokeWithoutArgs; +using testing::_; + +namespace video_capture { + +class TextureVirtualDeviceMojoAdapterTest : public ::testing::Test { + public: + TextureVirtualDeviceMojoAdapterTest() : ref_factory_(base::DoNothing()) {} + + void SetUp() override { + mock_receiver_1_ = + std::make_unique<MockReceiver>(mojo::MakeRequest(&receiver_1_)); + mock_receiver_2_ = + std::make_unique<MockReceiver>(mojo::MakeRequest(&receiver_2_)); + adapter_ = std::make_unique<TextureVirtualDeviceMojoAdapter>( + ref_factory_.CreateRef()); + } + + protected: + void ProducerSharesBufferHandle(int32_t buffer_id) { + auto dummy_buffer_handle = media::mojom::MailboxBufferHandleSet::New(); + dummy_buffer_handle->mailbox_holder.resize(media::VideoFrame::kMaxPlanes); + adapter_->OnNewMailboxHolderBufferHandle(buffer_id, + std::move(dummy_buffer_handle)); + } + + void ProducerRetiresBufferHandle(int32_t buffer_id) { + adapter_->OnBufferRetired(buffer_id); + } + + void Receiver1Connects() { + const media::VideoCaptureParams kArbitraryRequestedSettings; + adapter_->Start(kArbitraryRequestedSettings, std::move(receiver_1_)); + } + + void Receiver2Connects() { + const media::VideoCaptureParams kArbitraryRequestedSettings; + adapter_->Start(kArbitraryRequestedSettings, std::move(receiver_2_)); + } + + void Receiver1Disconnects() { + base::RunLoop wait_loop; + adapter_->SetReceiverDisconnectedCallback(wait_loop.QuitClosure()); + mock_receiver_1_.reset(); + wait_loop.Run(); + } + + std::unique_ptr<MockReceiver> mock_receiver_1_; + std::unique_ptr<MockReceiver> mock_receiver_2_; + + private: + base::test::ScopedTaskEnvironment task_environment_; + service_manager::ServiceContextRefFactory ref_factory_; + std::unique_ptr<TextureVirtualDeviceMojoAdapter> adapter_; + mojom::ReceiverPtr receiver_1_; + mojom::ReceiverPtr receiver_2_; +}; + +// Tests that when buffer handles are shared by the producer before a receiver +// has connected, these buffer handles get shared with the receiver as soon as +// it connects. +TEST_F(TextureVirtualDeviceMojoAdapterTest, + BufferHandlesAreSharedWithReceiverConnectingLate) { + const int kArbitraryBufferId1 = 1; + const int kArbitraryBufferId2 = 2; + ProducerSharesBufferHandle(kArbitraryBufferId1); + ProducerSharesBufferHandle(kArbitraryBufferId2); + + base::RunLoop wait_loop; + EXPECT_CALL(*mock_receiver_1_, DoOnNewBuffer(kArbitraryBufferId1, _)); + EXPECT_CALL(*mock_receiver_1_, DoOnNewBuffer(kArbitraryBufferId2, _)) + .WillOnce(InvokeWithoutArgs([&wait_loop]() { wait_loop.Quit(); })); + Receiver1Connects(); + wait_loop.Run(); +} + +// Tests that when a receiver disconnects and a new receiver connects, the +// virtual device adapter shares all valid buffer handles with it. +TEST_F(TextureVirtualDeviceMojoAdapterTest, + BufferHandlesAreSharedWithSecondReceiver) { + const int kArbitraryBufferId1 = 1; + const int kArbitraryBufferId2 = 2; + + Receiver1Connects(); + ProducerSharesBufferHandle(kArbitraryBufferId1); + ProducerSharesBufferHandle(kArbitraryBufferId2); + Receiver1Disconnects(); + + ProducerRetiresBufferHandle(kArbitraryBufferId1); + + base::RunLoop wait_loop; + EXPECT_CALL(*mock_receiver_2_, DoOnNewBuffer(kArbitraryBufferId2, _)) + .WillOnce(InvokeWithoutArgs([&wait_loop]() { wait_loop.Quit(); })); + Receiver2Connects(); + wait_loop.Run(); +} + +} // namespace video_capture
diff --git a/services/video_capture/virtual_device_enabled_device_factory.cc b/services/video_capture/virtual_device_enabled_device_factory.cc index 4dbaa9813f..db663bf8 100644 --- a/services/video_capture/virtual_device_enabled_device_factory.cc +++ b/services/video_capture/virtual_device_enabled_device_factory.cc
@@ -6,22 +6,82 @@ #include "base/logging.h" #include "media/capture/video/video_capture_device_info.h" -#include "services/video_capture/virtual_device_mojo_adapter.h" +#include "services/video_capture/shared_memory_virtual_device_mojo_adapter.h" +#include "services/video_capture/texture_virtual_device_mojo_adapter.h" namespace video_capture { -VirtualDeviceEnabledDeviceFactory::VirtualDeviceEntry::VirtualDeviceEntry() = - default; +class VirtualDeviceEnabledDeviceFactory::VirtualDeviceEntry { + public: + VirtualDeviceEntry( + const media::VideoCaptureDeviceInfo& device_info, + std::unique_ptr<SharedMemoryVirtualDeviceMojoAdapter> device, + std::unique_ptr<mojo::Binding<mojom::SharedMemoryVirtualDevice>> + producer_binding) + : device_info_(device_info), + device_type_(DeviceType::kSharedMemory), + shared_memory_device_(std::move(device)), + shared_memory_producer_binding_(std::move(producer_binding)) {} -VirtualDeviceEnabledDeviceFactory::VirtualDeviceEntry::~VirtualDeviceEntry() = - default; + VirtualDeviceEntry(const media::VideoCaptureDeviceInfo& device_info, + std::unique_ptr<TextureVirtualDeviceMojoAdapter> device, + std::unique_ptr<mojo::Binding<mojom::TextureVirtualDevice>> + producer_binding) + : device_info_(device_info), + device_type_(DeviceType::kTexture), + texture_device_(std::move(device)), + texture_producer_binding_(std::move(producer_binding)) {} -VirtualDeviceEnabledDeviceFactory::VirtualDeviceEntry::VirtualDeviceEntry( - VirtualDeviceEnabledDeviceFactory::VirtualDeviceEntry&& other) = default; + VirtualDeviceEntry(VirtualDeviceEntry&& other) = default; + VirtualDeviceEntry& operator=(VirtualDeviceEntry&& other) = default; -VirtualDeviceEnabledDeviceFactory::VirtualDeviceEntry& -VirtualDeviceEnabledDeviceFactory::VirtualDeviceEntry::operator=( - VirtualDeviceEnabledDeviceFactory::VirtualDeviceEntry&& other) = default; + bool HasConsumerBinding() { return consumer_binding_ != nullptr; } + + void EstablishConsumerBinding(mojom::DeviceRequest device_request, + base::OnceClosure connection_error_handler) { + switch (device_type_) { + case DeviceType::kSharedMemory: + consumer_binding_ = std::make_unique<mojo::Binding<mojom::Device>>( + shared_memory_device_.get(), std::move(device_request)); + break; + case DeviceType::kTexture: + consumer_binding_ = std::make_unique<mojo::Binding<mojom::Device>>( + texture_device_.get(), std::move(device_request)); + break; + } + consumer_binding_->set_connection_error_handler( + std::move(connection_error_handler)); + } + + void ResetConsumerBinding() { consumer_binding_.reset(); } + + void StopDevice() { + if (shared_memory_device_) + shared_memory_device_->Stop(); + else + texture_device_->Stop(); + } + + media::VideoCaptureDeviceInfo device_info() const { return device_info_; } + + private: + enum class DeviceType { kSharedMemory, kTexture }; + + media::VideoCaptureDeviceInfo device_info_; + DeviceType device_type_; + + // Only valid for |device_type_ == kSharedMemory| + std::unique_ptr<SharedMemoryVirtualDeviceMojoAdapter> shared_memory_device_; + std::unique_ptr<mojo::Binding<mojom::SharedMemoryVirtualDevice>> + shared_memory_producer_binding_; + + // Only valid for |device_type_ == kTexture| + std::unique_ptr<TextureVirtualDeviceMojoAdapter> texture_device_; + std::unique_ptr<mojo::Binding<mojom::TextureVirtualDevice>> + texture_producer_binding_; + + std::unique_ptr<mojo::Binding<mojom::Device>> consumer_binding_; +}; VirtualDeviceEnabledDeviceFactory::VirtualDeviceEnabledDeviceFactory( std::unique_ptr<service_manager::ServiceContextRef> service_ref, @@ -47,16 +107,14 @@ auto virtual_device_iter = virtual_devices_by_id_.find(device_id); if (virtual_device_iter != virtual_devices_by_id_.end()) { VirtualDeviceEntry& device_entry = virtual_device_iter->second; - if (device_entry.consumer_binding) { + if (device_entry.HasConsumerBinding()) { // The requested virtual device is already used by another client. // Revoke the access for the current client, then bind to the new request. - device_entry.consumer_binding.reset(); - device_entry.device->Stop(); + device_entry.ResetConsumerBinding(); + device_entry.StopDevice(); } - device_entry.consumer_binding = - std::make_unique<mojo::Binding<mojom::Device>>( - device_entry.device.get(), std::move(device_request)); - device_entry.consumer_binding->set_connection_error_handler( + device_entry.EstablishConsumerBinding( + std::move(device_request), base::Bind(&VirtualDeviceEnabledDeviceFactory:: OnVirtualDeviceConsumerConnectionErrorOrClose, base::Unretained(this), device_id)); @@ -68,10 +126,10 @@ std::move(callback)); } -void VirtualDeviceEnabledDeviceFactory::AddVirtualDevice( +void VirtualDeviceEnabledDeviceFactory::AddSharedMemoryVirtualDevice( const media::VideoCaptureDeviceInfo& device_info, mojom::ProducerPtr producer, - mojom::VirtualDeviceRequest virtual_device_request) { + mojom::SharedMemoryVirtualDeviceRequest virtual_device_request) { auto device_id = device_info.descriptor.device_id; auto virtual_device_iter = virtual_devices_by_id_.find(device_id); if (virtual_device_iter != virtual_devices_by_id_.end()) { @@ -80,21 +138,49 @@ virtual_devices_by_id_.erase(virtual_device_iter); } - VirtualDeviceEntry device_entry; producer.set_connection_error_handler( base::Bind(&VirtualDeviceEnabledDeviceFactory:: OnVirtualDeviceProducerConnectionErrorOrClose, base::Unretained(this), device_id)); - device_entry.device = std::make_unique<VirtualDeviceMojoAdapter>( - service_ref_->Clone(), device_info, std::move(producer)); - device_entry.producer_binding = - std::make_unique<mojo::Binding<mojom::VirtualDevice>>( - device_entry.device.get(), std::move(virtual_device_request)); - device_entry.producer_binding->set_connection_error_handler( + auto device = std::make_unique<SharedMemoryVirtualDeviceMojoAdapter>( + service_ref_->Clone(), std::move(producer)); + auto producer_binding = + std::make_unique<mojo::Binding<mojom::SharedMemoryVirtualDevice>>( + device.get(), std::move(virtual_device_request)); + producer_binding->set_connection_error_handler( base::Bind(&VirtualDeviceEnabledDeviceFactory:: OnVirtualDeviceProducerConnectionErrorOrClose, base::Unretained(this), device_id)); - virtual_devices_by_id_[device_id] = std::move(device_entry); + VirtualDeviceEntry device_entry(device_info, std::move(device), + std::move(producer_binding)); + virtual_devices_by_id_.insert( + std::make_pair(device_id, std::move(device_entry))); +} + +void VirtualDeviceEnabledDeviceFactory::AddTextureVirtualDevice( + const media::VideoCaptureDeviceInfo& device_info, + mojom::TextureVirtualDeviceRequest virtual_device_request) { + auto device_id = device_info.descriptor.device_id; + auto virtual_device_iter = virtual_devices_by_id_.find(device_id); + if (virtual_device_iter != virtual_devices_by_id_.end()) { + // Revoke the access for the current producer and consumer by + // removing it from the list. + virtual_devices_by_id_.erase(virtual_device_iter); + } + + auto device = + std::make_unique<TextureVirtualDeviceMojoAdapter>(service_ref_->Clone()); + auto producer_binding = + std::make_unique<mojo::Binding<mojom::TextureVirtualDevice>>( + device.get(), std::move(virtual_device_request)); + producer_binding->set_connection_error_handler( + base::BindOnce(&VirtualDeviceEnabledDeviceFactory:: + OnVirtualDeviceProducerConnectionErrorOrClose, + base::Unretained(this), device_id)); + VirtualDeviceEntry device_entry(device_info, std::move(device), + std::move(producer_binding)); + virtual_devices_by_id_.insert( + std::make_pair(device_id, std::move(device_entry))); } void VirtualDeviceEnabledDeviceFactory::OnGetDeviceInfos( @@ -102,7 +188,7 @@ const std::vector<media::VideoCaptureDeviceInfo>& device_infos) { std::vector<media::VideoCaptureDeviceInfo> all_device_infos; for (const auto& device_entry : virtual_devices_by_id_) { - all_device_infos.push_back(device_entry.second.device->device_info()); + all_device_infos.push_back(device_entry.second.device_info()); } all_device_infos.insert(std::end(all_device_infos), std::begin(device_infos), std::end(device_infos)); @@ -112,14 +198,14 @@ void VirtualDeviceEnabledDeviceFactory:: OnVirtualDeviceProducerConnectionErrorOrClose( const std::string& device_id) { - virtual_devices_by_id_[device_id].device->Stop(); + virtual_devices_by_id_.at(device_id).StopDevice(); virtual_devices_by_id_.erase(device_id); } void VirtualDeviceEnabledDeviceFactory:: OnVirtualDeviceConsumerConnectionErrorOrClose( const std::string& device_id) { - virtual_devices_by_id_[device_id].device->Stop(); + virtual_devices_by_id_.at(device_id).StopDevice(); } } // namespace video_capture
diff --git a/services/video_capture/virtual_device_enabled_device_factory.h b/services/video_capture/virtual_device_enabled_device_factory.h index 4f95ced0..bcc96e9 100644 --- a/services/video_capture/virtual_device_enabled_device_factory.h +++ b/services/video_capture/virtual_device_enabled_device_factory.h
@@ -15,8 +15,6 @@ namespace video_capture { -class VirtualDeviceMojoAdapter; - // Decorator that adds support for virtual devices to a given // mojom::DeviceFactory. class VirtualDeviceEnabledDeviceFactory : public mojom::DeviceFactory { @@ -31,21 +29,16 @@ void CreateDevice(const std::string& device_id, mojom::DeviceRequest device_request, CreateDeviceCallback callback) override; - void AddVirtualDevice(const media::VideoCaptureDeviceInfo& device_info, - mojom::ProducerPtr producer, - mojom::VirtualDeviceRequest virtual_device) override; + void AddSharedMemoryVirtualDevice( + const media::VideoCaptureDeviceInfo& device_info, + mojom::ProducerPtr producer, + mojom::SharedMemoryVirtualDeviceRequest virtual_device) override; + void AddTextureVirtualDevice( + const media::VideoCaptureDeviceInfo& device_info, + mojom::TextureVirtualDeviceRequest virtual_device) override; private: - struct VirtualDeviceEntry { - VirtualDeviceEntry(); - ~VirtualDeviceEntry(); - VirtualDeviceEntry(VirtualDeviceEntry&& other); - VirtualDeviceEntry& operator=(VirtualDeviceEntry&& other); - - std::unique_ptr<VirtualDeviceMojoAdapter> device; - std::unique_ptr<mojo::Binding<mojom::VirtualDevice>> producer_binding; - std::unique_ptr<mojo::Binding<mojom::Device>> consumer_binding; - }; + class VirtualDeviceEntry; void OnGetDeviceInfos( GetDeviceInfosCallback callback,
diff --git a/testing/buildbot/chromium.fyi.json b/testing/buildbot/chromium.fyi.json index a6fce1e..78ca377 100644 --- a/testing/buildbot/chromium.fyi.json +++ b/testing/buildbot/chromium.fyi.json
@@ -8089,6 +8089,29 @@ }, "test": "url_unittests" } + ], + "isolated_scripts": [ + { + "args": [ + "--browser=cros-chrome", + "--remote=127.0.0.1", + "--remote-ssh-port=9222", + "--xvfb" + ], + "isolate_name": "telemetry_perf_unittests", + "name": "telemetry_perf_unittests", + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "kvm": "1", + "os": "Ubuntu-14.04" + } + ], + "hard_timeout": 960, + "shards": 12 + } + } ] }, "linux-annotator-rel": {
diff --git a/testing/buildbot/chromium.win.json b/testing/buildbot/chromium.win.json index 90e2344..268b702 100644 --- a/testing/buildbot/chromium.win.json +++ b/testing/buildbot/chromium.win.json
@@ -1200,25 +1200,6 @@ }, { "swarming": { - "can_use_on_swarming_builders": true, - "shards": 10 - }, - "test": "browser_tests" - }, - { - "args": [ - "--enable-features=VizDisplayCompositor", - "--test-launcher-filter-file=../../testing/buildbot/filters/viz.browser_tests.filter" - ], - "name": "viz_browser_tests", - "swarming": { - "can_use_on_swarming_builders": true, - "shards": 10 - }, - "test": "browser_tests" - }, - { - "swarming": { "can_use_on_swarming_builders": true }, "test": "cacheinvalidation_unittests" @@ -1591,12 +1572,6 @@ "swarming": { "can_use_on_swarming_builders": true }, - "test": "service_manager_unittests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, "test": "services_unittests" }, { @@ -1650,12 +1625,6 @@ "swarming": { "can_use_on_swarming_builders": true }, - "test": "unit_tests" - }, - { - "swarming": { - "can_use_on_swarming_builders": true - }, "test": "url_unittests" }, { @@ -1730,26 +1699,6 @@ } }, { - "isolate_name": "telemetry_perf_unittests", - "name": "telemetry_perf_unittests", - "swarming": { - "can_use_on_swarming_builders": true, - "hard_timeout": 960, - "shards": 12 - } - }, - { - "args": [ - "--jobs=1" - ], - "isolate_name": "telemetry_unittests", - "name": "telemetry_unittests", - "swarming": { - "can_use_on_swarming_builders": true, - "shards": 4 - } - }, - { "isolate_name": "views_perftests", "name": "views_perftests", "swarming": { @@ -1757,28 +1706,6 @@ } }, { - "args": [ - "--zero-tests-executed-ok", - "--debug", - "--target", - "Debug_x64" - ], - "isolate_name": "webkit_layout_tests_exparchive", - "merge": { - "args": [ - "--verbose" - ], - "script": "//third_party/blink/tools/merge_web_test_results.py" - }, - "name": "webkit_layout_tests", - "only_retry_failed_tests": true, - "results_handler": "layout tests", - "swarming": { - "can_use_on_swarming_builders": true, - "shards": 12 - } - }, - { "isolate_name": "webkit_python_tests", "name": "webkit_python_tests", "swarming": {
diff --git a/testing/buildbot/filters/mojo.fyi.network_content_browsertests.filter b/testing/buildbot/filters/mojo.fyi.network_content_browsertests.filter index 89311505..672ef54 100644 --- a/testing/buildbot/filters/mojo.fyi.network_content_browsertests.filter +++ b/testing/buildbot/filters/mojo.fyi.network_content_browsertests.filter
@@ -40,7 +40,6 @@ -NavigationHandleImplBrowserTest.RedirectToRendererDebugUrl -AsyncResourceHandlerBrowserTest/AsyncResourceHandlerBrowserTest.UploadProgress* --IsolatedDevToolsProtocolTest.ControlNavigationsChildFrames -NavigationHandleImplBrowserTest.ErrorCodeOnRedirect -WebContentsImplBrowserTest.DownloadImage_Deny_FileImage
diff --git a/testing/buildbot/test_suite_exceptions.pyl b/testing/buildbot/test_suite_exceptions.pyl index 3281b07d..3c65044 100644 --- a/testing/buildbot/test_suite_exceptions.pyl +++ b/testing/buildbot/test_suite_exceptions.pyl
@@ -253,6 +253,8 @@ 'UBSanVptr Linux', # chromium.memory 'Linux TSan Tests', # https://crbug.com/368525 + # chromium.win + 'Win10 Tests x64 (dbg)', ], 'modifications': { # chromium.chromiumos @@ -2524,6 +2526,8 @@ 'Mac10.13 Tests (dbg)', 'Win7 Tests (dbg)(1)', 'Win10 Tests x64', + # chromium.win + 'Win10 Tests x64 (dbg)', ], }, 'services_unittests': { @@ -2923,6 +2927,8 @@ 'Mac10.13 Tests (dbg)', # client.v8.chromium 'Linux - Future (dbg)', + # chromium.win + 'Win10 Tests x64 (dbg)', ], }, 'telemetry_unittests': { @@ -2933,6 +2939,10 @@ }, }, }, + 'remove_from': [ + # chromium.win + 'Win10 Tests x64 (dbg)', + ], }, 'traffic_annotation_auditor_unittests': { 'modifications': { @@ -3002,6 +3012,8 @@ # On chromium.linux, unclear why these aren't run on Cast. 'Cast Audio Linux', 'Cast Linux', + # chromium.win + 'Win10 Tests x64 (dbg)', ], 'modifications': { # chromium.android @@ -3132,6 +3144,7 @@ 'Win10 Tests x64', 'Win7 Tests (1)', 'Win7 Tests (dbg)(1)', + 'Win10 Tests x64 (dbg)', ], }, 'viz_unittests': { @@ -3281,6 +3294,7 @@ # chromium.win 'Win 7 Tests x64 (1)', 'Win10 Tests x64', + 'Win10 Tests x64 (dbg)', ], 'modifications': { # chromium.fyi
diff --git a/testing/buildbot/test_suites.pyl b/testing/buildbot/test_suites.pyl index 994ecf17..ffa97f28 100644 --- a/testing/buildbot/test_suites.pyl +++ b/testing/buildbot/test_suites.pyl
@@ -336,6 +336,7 @@ 'test_traffic_annotation_auditor_script': { 'test_traffic_annotation_auditor': { 'hard_timeout': 14400, + 'io_timeout': 14400, 'script': 'test_traffic_annotation_auditor.py', }, }, @@ -372,6 +373,22 @@ 'url_unittests': {}, }, + 'chromeos_isolated_scripts': { + 'telemetry_perf_unittests': { + 'args': [ + '--browser=cros-chrome', + # By default, CrOS VMs' ssh servers listen on local port 9222. + '--remote=127.0.0.1', + '--remote-ssh-port=9222', + '--xvfb', + ], + 'swarming': { + 'hard_timeout': 960, + 'shards': 12, + }, + }, + }, + 'chromeos_remote_device_isolated_tests': { 'telemetry_perf_unittests': { 'args': [
diff --git a/testing/buildbot/waterfalls.pyl b/testing/buildbot/waterfalls.pyl index 979b9db..938aa52 100644 --- a/testing/buildbot/waterfalls.pyl +++ b/testing/buildbot/waterfalls.pyl
@@ -1383,6 +1383,7 @@ ], 'test_suites': { 'gtest_tests': 'chromeos_gtests', + 'isolated_scripts': 'chromeos_isolated_scripts', }, 'swarming': { 'dimension_sets': [
diff --git a/third_party/WebKit/LayoutTests/FlagExpectations/site-per-process b/third_party/WebKit/LayoutTests/FlagExpectations/site-per-process index b5d59bb..34b8779 100644 --- a/third_party/WebKit/LayoutTests/FlagExpectations/site-per-process +++ b/third_party/WebKit/LayoutTests/FlagExpectations/site-per-process
@@ -9,9 +9,6 @@ crbug.com/793127 http/tests/security/upgrade-insecure-requests/iframe-upgrade.https.html [ Crash ] crbug.com/793127 external/wpt/content-security-policy/securitypolicyviolation/upgrade-insecure-requests-reporting.https.html [ Crash ] -# https://crbug.com/769502: PlzNavigate-related, not-yet-investigated timeout. -crbug.com/769502 fast/loader/recursive-before-unload-crash.html [ Timeout ] - # https://crbug.com/769508: PlzNavigate-related, not-yet-investigated failures. crbug.com/769508 fast/css/acid2.html [ Failure ]
diff --git a/third_party/WebKit/LayoutTests/TestExpectations b/third_party/WebKit/LayoutTests/TestExpectations index 13f23fb..b2be050 100644 --- a/third_party/WebKit/LayoutTests/TestExpectations +++ b/third_party/WebKit/LayoutTests/TestExpectations
@@ -2527,6 +2527,7 @@ # Fails with leak detector. crbug.com/733494 [ Linux ] media/autoplay/document-user-activation.html [ Skip ] +crbug.com/733494 [ Linux ] virtual/video-surface-layer/media/autoplay/document-user-activation.html [ Skip ] crbug.com/769885 [ Linux ] virtual/android/fullscreen/full-screen-frameset.html [ Skip ] @@ -4685,3 +4686,7 @@ crbug.com/838254 virtual/video-surface-layer/media/webkit-media-controls-webkit-appearance.html [ Failure ] crbug.com/839332 [ Mac ] virtual/video-surface-layer/media/video-no-audio.html [ Pass Failure ] + +# Sheriff 2018-05-04 +crbug.com/839734 [ Linux ] paint/invalidation/table/table-hover-on-link.html [ Pass Failure ] +crbug.com/839734 [ Linux ] virtual/disable-spv175/paint/invalidation/table/table-hover-on-link.html [ Pass Failure ]
diff --git a/third_party/WebKit/LayoutTests/accessibility/aom-string-properties.html b/third_party/WebKit/LayoutTests/accessibility/aom-string-properties.html index 552dea35..4514c217 100644 --- a/third_party/WebKit/LayoutTests/accessibility/aom-string-properties.html +++ b/third_party/WebKit/LayoutTests/accessibility/aom-string-properties.html
@@ -61,17 +61,15 @@ }, "AccessibleNode.current"); </script> -<div role="textbox" id="hasPopUp"></div> +<div role="textbox" id="hasPopUp" aria-haspopup="false"></div> <script> test(function(t) { var node = document.getElementById("hasPopUp"); var axNode = accessibilityController.accessibleElementById("hasPopUp"); - assert_equals(axNode.hasPopup, false); - node.accessibleNode.hasPopUp = true; - assert_equals(axNode.hasPopup, true); - // TODO(dmazzoni): Test support for ARIA 1.1 values like "dialog", "tree", etc. - // when those are mapped through to platform APIs. + assert_equals(axNode.hasPopup, ""); + node.accessibleNode.hasPopUp = "dialog"; + assert_equals(axNode.hasPopup, "dialog"); }, "AccessibleNode.hasPopUp"); </script>
diff --git a/third_party/WebKit/LayoutTests/accessibility/aria-activedescendant.html b/third_party/WebKit/LayoutTests/accessibility/aria-activedescendant.html index 06fac8c..bbac724 100644 --- a/third_party/WebKit/LayoutTests/accessibility/aria-activedescendant.html +++ b/third_party/WebKit/LayoutTests/accessibility/aria-activedescendant.html
@@ -3,7 +3,7 @@ <script src="../resources/testharnessreport.js"></script> <div id="contenteditable-combobox" role="combobox" contenteditable="true" - aria-expanded="true" aria-haspopup="true" aria-autocomplete="list" + aria-expanded="true" aria-haspopup="menu" aria-autocomplete="list" aria-activedescendant="list1-option1"> <ul id="list1" role="listbox" style="display: none;"> <li id="list1-option1" role="option">Option 1</li> @@ -13,7 +13,7 @@ </div> <input id="input-combobox" role="combobox" type="text" aria-expanded="true" - aria-haspopup="true" aria-autocomplete="list" + aria-haspopup="menu" aria-autocomplete="list" aria-activedescendant="list2-option1" aria-owns="list2"> <ul id="list2" role="listbox" style="display: none;"> @@ -23,7 +23,7 @@ </ul> <input id="input-searchbox" role="combobox" type="search" aria-expanded="true" - aria-haspopup="true" aria-autocomplete="list" + aria-haspopup="menu" aria-autocomplete="list" aria-activedescendant="list3-option1" aria-owns="list3"> <ul id="list3" role="listbox" style="display: none;"> @@ -33,7 +33,7 @@ </ul> <textarea id="textarea-combobox" role="combobox" aria-expanded="true" - aria-haspopup="true" aria-autocomplete="list" + aria-haspopup="menu" aria-autocomplete="list" aria-activedescendant="list4-option1" aria-owns="list4"></textarea> <ul id="list4" role="listbox" style="display: none;"> @@ -43,7 +43,7 @@ </ul> <div id="combobox-composite-widget" role="combobox" aria-expanded="true" - aria-haspopup="true" aria-autocomplete="list"> + aria-haspopup="menu" aria-autocomplete="list"> <input id="input-type-text" type="text" aria-controls="list5" aria-activedescendant="list5-option1"> </div> @@ -69,8 +69,8 @@ var option2 = accessibilityController.accessibleElementById(listboxId + "-option2"); var option3 = accessibilityController.accessibleElementById(listboxId + "-option3"); - assert_true(axWidget.isExpanded, widgetId + ".isExpanded"); - assert_true(axWidget.hasPopup, widgetId + ".hasPopup"); + assert_true(axWidget.isExpanded, widgetId + ".isExpanded"); + assert_equals(axWidget.hasPopup, "menu"); assert_true(option1.isFocusable, listboxId + "-option1.isFocusable"); assert_true(option1.isSelectable, listboxId + "-option1.isSelectable");
diff --git a/third_party/WebKit/LayoutTests/compositing/squashing/add-remove-squashed-layers-expected.txt b/third_party/WebKit/LayoutTests/compositing/squashing/add-remove-squashed-layers-expected.txt index 615687f..a79dfb2 100644 --- a/third_party/WebKit/LayoutTests/compositing/squashing/add-remove-squashed-layers-expected.txt +++ b/third_party/WebKit/LayoutTests/compositing/squashing/add-remove-squashed-layers-expected.txt
@@ -89,7 +89,7 @@ { "object": "LayoutBlockFlow (positioned) DIV id='C' class='overlap3'", "rect": [160, 160, 100, 100], - "reason": "appeared" + "reason": "chunk appeared" } ] } @@ -152,7 +152,7 @@ { "object": "LayoutBlockFlow (positioned) DIV id='B' class='overlap2'", "rect": [80, 80, 100, 100], - "reason": "disappeared" + "reason": "chunk disappeared" } ] } @@ -209,7 +209,7 @@ { "object": "LayoutBlockFlow (positioned) DIV id='A' class='overlap1'", "rect": [0, 0, 100, 100], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutBlockFlow (positioned) DIV id='C' class='overlap3'", @@ -282,7 +282,7 @@ { "object": "LayoutBlockFlow (positioned) DIV id='B' class='overlap2'", "rect": [0, 0, 100, 100], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutBlockFlow (positioned) DIV id='C' class='overlap3'", @@ -359,12 +359,12 @@ { "object": "LayoutBlockFlow (positioned) DIV id='C' class='overlap3'", "rect": [80, 80, 100, 100], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutBlockFlow (positioned) DIV id='A' class='overlap1'", "rect": [0, 0, 100, 100], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutBlockFlow (positioned) DIV id='B' class='overlap2'",
diff --git a/third_party/WebKit/LayoutTests/compositing/squashing/squash-above-fixed-1-expected.txt b/third_party/WebKit/LayoutTests/compositing/squashing/squash-above-fixed-1-expected.txt index b580213c..4bf3a9d 100644 --- a/third_party/WebKit/LayoutTests/compositing/squashing/squash-above-fixed-1-expected.txt +++ b/third_party/WebKit/LayoutTests/compositing/squashing/squash-above-fixed-1-expected.txt
@@ -81,12 +81,12 @@ { "object": "LayoutBlockFlow (relative positioned) DIV id='paragraph-f' class='overlapping lime'", "rect": [0, 500, 200, 100], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutBlockFlow (relative positioned) DIV id='paragraph-b' class='overlapping lime'", "rect": [0, 100, 200, 100], - "reason": "appeared" + "reason": "chunk appeared" } ], "transform": 1 @@ -264,12 +264,12 @@ { "object": "LayoutBlockFlow (relative positioned) DIV id='paragraph-g' class='overlapping cyan'", "rect": [0, 600, 200, 100], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutBlockFlow (relative positioned) DIV id='paragraph-c' class='overlapping cyan'", "rect": [0, 200, 200, 100], - "reason": "appeared" + "reason": "chunk appeared" } ], "transform": 1
diff --git a/third_party/WebKit/LayoutTests/compositing/squashing/squashed-layer-loses-graphicslayer-expected.txt b/third_party/WebKit/LayoutTests/compositing/squashing/squashed-layer-loses-graphicslayer-expected.txt index 96f7131..b0915ad 100644 --- a/third_party/WebKit/LayoutTests/compositing/squashing/squashed-layer-loses-graphicslayer-expected.txt +++ b/third_party/WebKit/LayoutTests/compositing/squashing/squashed-layer-loses-graphicslayer-expected.txt
@@ -73,22 +73,22 @@ { "object": "LayoutBlockFlow (positioned) DIV id='C' class='overlap3'", "rect": [300, 300, 100, 100], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutBlockFlow (positioned) DIV id='B' class='overlap2'", "rect": [220, 220, 100, 100], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutBlockFlow (positioned) DIV id='A' class='overlap1'", "rect": [140, 140, 100, 100], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutBlockFlow (positioned) DIV id='forceComposited' class='underneath'", "rect": [60, 60, 100, 100], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/external/WPT_BASE_MANIFEST.json b/third_party/WebKit/LayoutTests/external/WPT_BASE_MANIFEST.json index da304c2..30c5ca0 100644 --- a/third_party/WebKit/LayoutTests/external/WPT_BASE_MANIFEST.json +++ b/third_party/WebKit/LayoutTests/external/WPT_BASE_MANIFEST.json
@@ -9339,6 +9339,18 @@ {} ] ], + "css/CSS2/floats/floats-in-table-caption-001.html": [ + [ + "/css/CSS2/floats/floats-in-table-caption-001.html", + [ + [ + "/css/CSS2/floats/floats-in-table-caption-001-ref.html", + "==" + ] + ], + {} + ] + ], "css/CSS2/floats/floats-placement-vertical-001a.xht": [ [ "/css/CSS2/floats/floats-placement-vertical-001a.xht", @@ -15403,6 +15415,30 @@ {} ] ], + "css/CSS2/normal-flow/margin-collapsing-in-table-caption-001.html": [ + [ + "/css/CSS2/normal-flow/margin-collapsing-in-table-caption-001.html", + [ + [ + "/css/reference/ref-filled-green-100px-square-only.html", + "==" + ] + ], + {} + ] + ], + "css/CSS2/normal-flow/margin-collapsing-in-table-caption-002.html": [ + [ + "/css/CSS2/normal-flow/margin-collapsing-in-table-caption-002.html", + [ + [ + "/css/reference/ref-filled-green-100px-square-only.html", + "==" + ] + ], + {} + ] + ], "css/CSS2/normal-flow/max-height-001.xht": [ [ "/css/CSS2/normal-flow/max-height-001.xht", @@ -33208,7 +33244,7 @@ "/css/css-color/lab-004.html", [ [ - "/css/css-color/blacktext-ref.html", + "/css/css-color/lab-004-ref.html", "==" ] ], @@ -33220,7 +33256,7 @@ "/css/css-color/lab-005.html", [ [ - "/css/css-color/blacktext-ref.html", + "/css/css-color/lab-005-ref.html", "==" ] ], @@ -33232,7 +33268,7 @@ "/css/css-color/lab-006.html", [ [ - "/css/css-color/blacktext-ref.html", + "/css/css-color/lab-006-ref.html", "==" ] ], @@ -33244,7 +33280,7 @@ "/css/css-color/lab-007.html", [ [ - "/css/css-color/blacktext-ref.html", + "/css/css-color/lab-007-ref.html", "==" ] ], @@ -33292,7 +33328,7 @@ "/css/css-color/lch-004.html", [ [ - "/css/css-color/blacktext-ref.html", + "/css/css-color/lab-004-ref.html", "==" ] ], @@ -33304,7 +33340,7 @@ "/css/css-color/lch-005.html", [ [ - "/css/css-color/blacktext-ref.html", + "/css/css-color/lab-005-ref.html", "==" ] ], @@ -33316,7 +33352,7 @@ "/css/css-color/lch-006.html", [ [ - "/css/css-color/blacktext-ref.html", + "/css/css-color/lab-006-ref.html", "==" ] ], @@ -33328,7 +33364,7 @@ "/css/css-color/lch-007.html", [ [ - "/css/css-color/blacktext-ref.html", + "/css/css-color/lab-007-ref.html", "==" ] ], @@ -104345,6 +104381,11 @@ {} ] ], + "css/CSS2/floats/floats-in-table-caption-001-ref.html": [ + [ + {} + ] + ], "css/CSS2/floats/floats-placement-vertical-001-ref.xht": [ [ {} @@ -108855,6 +108896,26 @@ {} ] ], + "css/css-color/lab-004-ref.html": [ + [ + {} + ] + ], + "css/css-color/lab-005-ref.html": [ + [ + {} + ] + ], + "css/css-color/lab-006-ref.html": [ + [ + {} + ] + ], + "css/css-color/lab-007-ref.html": [ + [ + {} + ] + ], "css/css-color/rebeccapurple-ref.html": [ [ {} @@ -182259,6 +182320,12 @@ {} ] ], + "css/css-animations/animationevent-pseudoelement.html": [ + [ + "/css/css-animations/animationevent-pseudoelement.html", + {} + ] + ], "css/css-animations/animationevent-types.html": [ [ "/css/css-animations/animationevent-types.html", @@ -236573,6 +236640,24 @@ {} ] ], + "webaudio/the-audio-api/the-audiobuffer-interface/audiobuffer-copy-channel.html": [ + [ + "/webaudio/the-audio-api/the-audiobuffer-interface/audiobuffer-copy-channel.html", + {} + ] + ], + "webaudio/the-audio-api/the-audiobuffer-interface/audiobuffer-getChannelData.html": [ + [ + "/webaudio/the-audio-api/the-audiobuffer-interface/audiobuffer-getChannelData.html", + {} + ] + ], + "webaudio/the-audio-api/the-audiobuffer-interface/audiobuffer.html": [ + [ + "/webaudio/the-audio-api/the-audiobuffer-interface/audiobuffer.html", + {} + ] + ], "webaudio/the-audio-api/the-audiobuffer-interface/ctor-audiobuffer.html": [ [ "/webaudio/the-audio-api/the-audiobuffer-interface/ctor-audiobuffer.html", @@ -264768,6 +264853,14 @@ "4081cd8860323434f2461673c39c872f7e9c55e2", "reftest" ], + "css/CSS2/floats/floats-in-table-caption-001-ref.html": [ + "546c22da7607f4c26a951e7c614b29dc6a7c9331", + "support" + ], + "css/CSS2/floats/floats-in-table-caption-001.html": [ + "f9b30873ba1da1309d17f2ae6f0777656521e5b2", + "reftest" + ], "css/CSS2/floats/floats-placement-vertical-001-ref.xht": [ "219c3d13a6859b58907f35df0a5602ba215a0335", "support" @@ -268180,6 +268273,14 @@ "33e6e180ed6e9896b7aeb3fcd9060bedb162291c", "reftest" ], + "css/CSS2/normal-flow/margin-collapsing-in-table-caption-001.html": [ + "97c8c6cd37568dfa52dea1538ac851e7357797fe", + "reftest" + ], + "css/CSS2/normal-flow/margin-collapsing-in-table-caption-002.html": [ + "920cfd35cdf213169ec6c4d0078abb812815bec8", + "reftest" + ], "css/CSS2/normal-flow/max-height-001.xht": [ "34a501cb70b591b6998234f3366361c33a064a18", "reftest" @@ -276821,11 +276922,15 @@ "testharness" ], "css/css-animations/animationevent-interface.js": [ - "91d95ca5ee8f917ec3961e1cf29dc2a78b7acee8", + "d756058c7e5d9e2e1302d96b2b148c034bde8981", "support" ], + "css/css-animations/animationevent-pseudoelement.html": [ + "827d8eab74c277830749364b3497fad36613be05", + "testharness" + ], "css/css-animations/animationevent-types.html": [ - "168107b4c1e2aeb7c3329911bb0e5e68b61002ac", + "15d495003fa9616fc54a4f6072e531341d51185f", "testharness" ], "css/css-animations/animationstart-and-animationend-events.html": [ @@ -280520,24 +280625,40 @@ "0723ed9d6c7414565e3dfed19b133f8450d6c092", "reftest" ], + "css/css-color/lab-004-ref.html": [ + "673330aa247dd4335b409f363d981bce2c98eafe", + "support" + ], "css/css-color/lab-004.html": [ - "51f4804db8a2f9e0e388c81cb1fee589e1bbdd28", + "5c2ba8f9a9e2210ba71cfab41ca8a7ca5c6df45c", "reftest" ], + "css/css-color/lab-005-ref.html": [ + "0e33a3d9f01ce838cceefb300ce285e3fa8b2614", + "support" + ], "css/css-color/lab-005.html": [ - "db07745d8a25a48ea3bcf1b8d3ea56c58cdbc9af", + "c36f72b1e4eb01643e215a4ce1fb13d771f78fd8", "reftest" ], + "css/css-color/lab-006-ref.html": [ + "3c8201581df26de61485477f74abc00d1012ba67", + "support" + ], "css/css-color/lab-006.html": [ - "eea09960176bb28aba7a05bde9acacb1960db649", + "8bfc2f23db0e166283116007f3e0e2c8bc4f515b", "reftest" ], + "css/css-color/lab-007-ref.html": [ + "e94b776e6fc00524cf2895cc50e3af2906ebc778", + "support" + ], "css/css-color/lab-007.html": [ - "c65ede9c328ddf85fc607a5ac78fd4897d25c926", + "ef6727c026766145a40ae1ddddc462771a7b19e0", "reftest" ], "css/css-color/lch-001.html": [ - "5b18f33c3947d8d9be59b886442f6e51248c5db6", + "56db2e10683be4fa459c657dc709f96903bef6aa", "reftest" ], "css/css-color/lch-002.html": [ @@ -280549,19 +280670,19 @@ "reftest" ], "css/css-color/lch-004.html": [ - "5e3588caa84df218f959bcf3fa98908e7a97c5a2", + "ecbee5e5b0394dc3bc8c4d09e6741c2a3fcf0aeb", "reftest" ], "css/css-color/lch-005.html": [ - "9ed500d2841d09b3db270f4c4c6624e231fa5915", + "d91d0e536685e4bb57a3e8a9b2795f0c4d3b75b8", "reftest" ], "css/css-color/lch-006.html": [ - "7eb1d1e686a1bc99621e2ecaa3b691eb7b81915b", + "50cfea9e95c16a2bd220c067b6ad9b78545fdb5f", "reftest" ], "css/css-color/lch-007.html": [ - "597f775935650c4259de1cdc85afdacb496aa3bb", + "217195f6a5931c9008d10da1cb16756a59ecda8c", "reftest" ], "css/css-color/named-001.html": [ @@ -334705,7 +334826,7 @@ "support" ], "fetch/api/abort/serviceworker-intercepted.https.html": [ - "ee3512098bed44d034d9a0e6f2ccdbd5a07c7e42", + "b5169e88b2146712ee98cd2c6f7575ce3f2999a3", "testharness" ], "fetch/api/basic/accept-header.any.js": [ @@ -358325,7 +358446,7 @@ "testharness" ], "mediacapture-streams/MediaStreamTrack-getSettings.https.html": [ - "013d31ba196d5a6f1506ceb8eab088e629dfd59b", + "e73c53bfd0c77c91f2f736cb5bb723856c2d1501", "testharness" ], "mediacapture-streams/MediaStreamTrack-id.https.html": [ @@ -384040,6 +384161,18 @@ "da39a3ee5e6b4b0d3255bfef95601890afd80709", "support" ], + "webaudio/the-audio-api/the-audiobuffer-interface/audiobuffer-copy-channel.html": [ + "b9edb1bd4139c0a045936942d35ac8c763460f5b", + "testharness" + ], + "webaudio/the-audio-api/the-audiobuffer-interface/audiobuffer-getChannelData.html": [ + "cf04a13efacb1fe79856999db3ef1831749b4af0", + "testharness" + ], + "webaudio/the-audio-api/the-audiobuffer-interface/audiobuffer.html": [ + "938459ceae37c527140f30d9fc793536b4290c4b", + "testharness" + ], "webaudio/the-audio-api/the-audiobuffer-interface/ctor-audiobuffer.html": [ "34d9e7ccb333ce23c838126a4e84918321292d33", "testharness"
diff --git a/third_party/WebKit/LayoutTests/external/wpt/async-local-storage/storage-smoke-test.https.tentative.html b/third_party/WebKit/LayoutTests/external/wpt/async-local-storage/storage-smoke-test.https.tentative.html new file mode 100644 index 0000000..b4d66da --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/async-local-storage/storage-smoke-test.https.tentative.html
@@ -0,0 +1,46 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>Async local storage storage export smoke test</title> + +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> + +<script type="module"> +import { storage } from "std:async-local-storage"; + +test(() => { + const { backingStore } = storage; + assert_array_equals(Object.keys(backingStore), ["database", "store", "version"]); + assert_own_property(backingStore, "database"); + assert_own_property(backingStore, "store"); + assert_own_property(backingStore, "version"); + assert_equals(Object.getPrototypeOf(backingStore), Object.prototype); + + assert_equals(backingStore.database, "async-local-storage:default"); + assert_equals(backingStore.store, "store"); + assert_equals(backingStore.version, 1); +}, "backingStore returns the correct object"); + +promise_test(async (t) => { + t.add_cleanup(async () => { + await storage.clear(); + }); + + assert_equals(await storage.set("key", "value"), undefined); + + assert_equals(await storage.get("key"), "value"); + assert_equals(await storage.has("key"), true); + assert_array_equals(await storage.keys(), ["key"]); + assert_array_equals(await storage.values(), ["value"]); + + const entries = await storage.entries(); + assert_true(Array.isArray(entries)); + assert_equals(entries.length, 1); + assert_array_equals(entries[0], ["key", "value"]); + + assert_equals(await storage.delete("key"), undefined); + + assert_equals(await storage.get("key"), undefined); + assert_equals(await storage.has("key"), false); +}, "storage methods work, at least for one entry with string key and value"); +</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-color/lab-004-ref.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-color/lab-004-ref.html new file mode 100644 index 0000000..1919ab4e --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-color/lab-004-ref.html
@@ -0,0 +1,11 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS Color 4: Specifying Lab and LCH</title> +<style> + .match { color: rgb(75.62% 30.45% 47.56%)} /* lab(50 50 0) converted to sRGB */ +</style> +<body> + <p>Test passes if the two lines of filler text are the same color.</p> + <p class="match">Filler text. Filler text. Filler text. </p> + <p class="match">Filler text. Filler text. Filler text. </p> +</body>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-color/lab-004.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-color/lab-004.html index 0037a1e7..2cd327f 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/css/css-color/lab-004.html +++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-color/lab-004.html
@@ -3,12 +3,12 @@ <title>CSS Color 4: Specifying Lab and LCH</title> <link rel="author" title="Chris Lilley" href="mailto:chris@w3.org"> <link rel="help" href="https://drafts.csswg.org/css-color-4/#specifying-lab-lch"> -<link rel="match" href="blacktext-ref.html"> +<link rel="match" href="lab-004-ref.html"> <meta name="assert" content="lab() with no alpha, positive a axis"> <style> .test { color: red; } .test { color: lab(50 50 0)} - .match { color: rgb(75.62%, 30.45%, 47.56%)} /* lab(50,0,0) converted to sRGB */ + .match { color: rgb(75.62%, 30.45%, 47.56%)} /* lab(50 50 0) converted to sRGB */ </style> <body> <p>Test passes if the two lines of filler text are the same color.</p>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-color/lab-005-ref.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-color/lab-005-ref.html new file mode 100644 index 0000000..207973e3 --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-color/lab-005-ref.html
@@ -0,0 +1,11 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS Color 4: Specifying Lab and LCH</title> +<style> + .match { color: rgb(10.79%, 75.55%, 66.40%)} /* lab(70 -45 0) converted to sRGB */ +</style> +<body> + <p>Test passes if the two lines of filler text are the same color.</p> + <p class="match">Filler text. Filler text. Filler text. </p> + <p class="match">Filler text. Filler text. Filler text. </p> +</body>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-color/lab-005.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-color/lab-005.html index 366cd1bc..846430f 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/css/css-color/lab-005.html +++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-color/lab-005.html
@@ -3,12 +3,12 @@ <title>CSS Color 4: Specifying Lab and LCH</title> <link rel="author" title="Chris Lilley" href="mailto:chris@w3.org"> <link rel="help" href="https://drafts.csswg.org/css-color-4/#specifying-lab-lch"> -<link rel="match" href="blacktext-ref.html"> +<link rel="match" href="lab-005-ref.html"> <meta name="assert" content="lab() with no alpha, negative a axis"> <style> .test { color: red; } .test { color: lab(70 -45 0)} - .match { color: rgb(10.79%, 75.55%, 66.40%)} /* lab(70,-45,0) converted to sRGB */ + .match { color: rgb(10.79%, 75.55%, 66.40%)} /* lab(70 -45 0) converted to sRGB */ </style> <body> <p>Test passes if the two lines of filler text are the same color.</p>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-color/lab-006-ref.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-color/lab-006-ref.html new file mode 100644 index 0000000..8747c97b --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-color/lab-006-ref.html
@@ -0,0 +1,11 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS Color 4: Specifying Lab and LCH</title> +<style> + .match { color: rgb(76.62%, 66.36%, 5.58%)} /* lab(70 0 70) converted to sRGB */ +</style> +<body> + <p>Test passes if the two lines of filler text are the same color.</p> + <p class="match">Filler text. Filler text. Filler text. </p> + <p class="match">Filler text. Filler text. Filler text. </p> +</body>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-color/lab-006.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-color/lab-006.html index 079c379..926c1f08 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/css/css-color/lab-006.html +++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-color/lab-006.html
@@ -3,12 +3,12 @@ <title>CSS Color 4: Specifying Lab and LCH</title> <link rel="author" title="Chris Lilley" href="mailto:chris@w3.org"> <link rel="help" href="https://drafts.csswg.org/css-color-4/#specifying-lab-lch"> -<link rel="match" href="blacktext-ref.html"> +<link rel="match" href="lab-006-ref.html"> <meta name="assert" content="lab() with no alpha, positive b axis"> <style> .test { color: red; } .test { color: lab(70 0 70)} - .match { color: rgb(76.62%, 66.36%, 5.58%)} /* lab(70,0,70) converted to sRGB */ + .match { color: rgb(76.62%, 66.36%, 5.58%)} /* lab(70 0 70) converted to sRGB */ </style> <body> <p>Test passes if the two lines of filler text are the same color.</p>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-color/lab-007-ref.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-color/lab-007-ref.html new file mode 100644 index 0000000..00bdb09 --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-color/lab-007-ref.html
@@ -0,0 +1,11 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS Color 4: Specifying Lab and LCH</title> +<style> + .match { color: rgb(12.81%, 53.10%, 92.76%)} /* lab(55 0 -60) converted to sRGB */ +</style> +<body> + <p>Test passes if the two lines of filler text are the same color.</p> + <p class="match">Filler text. Filler text. Filler text. </p> + <p class="match">Filler text. Filler text. Filler text. </p> +</body>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-color/lab-007.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-color/lab-007.html index 4cdb3578..917bc1a3 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/css/css-color/lab-007.html +++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-color/lab-007.html
@@ -3,12 +3,12 @@ <title>CSS Color 4: Specifying Lab and LCH</title> <link rel="author" title="Chris Lilley" href="mailto:chris@w3.org"> <link rel="help" href="https://drafts.csswg.org/css-color-4/#specifying-lab-lch"> -<link rel="match" href="blacktext-ref.html"> +<link rel="match" href="lab-007-ref.html"> <meta name="assert" content="lab() with no alpha, negative b axis"> <style> .test { color: red; } .test { color: lab(55 0 -60)} - .match { color: rgb(12.81%, 53.10%, 92.76%)} /* lab(55,0,-60) converted to sRGB */ + .match { color: rgb(12.81%, 53.10%, 92.76%)} /* lab(55 0 -60) converted to sRGB */ </style> <body> <p>Test passes if the two lines of filler text are the same color.</p>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-color/lch-001.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-color/lch-001.html index 966e1fd40..3b0b5af 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/css/css-color/lch-001.html +++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-color/lch-001.html
@@ -6,7 +6,7 @@ <link rel="match" href="greentext-ref.html"> <meta name="assert" content="lch() with no alpha"> <style> - .test {color: lab(46.277 -67.989 134.391)} /* green (sRGB #008000) converted to LCH */ + .test {color: lch(46.277 67.945 134.427)} /* green (sRGB #008000) converted to LCH */ </style> <body> <p class="test">Test passes if this text is green</p>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-color/lch-004.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-color/lch-004.html index 46ac7d39..0db243c 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/css/css-color/lch-004.html +++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-color/lch-004.html
@@ -3,12 +3,12 @@ <title>CSS Color 4: Specifying Lab and LCH</title> <link rel="author" title="Chris Lilley" href="mailto:chris@w3.org"> <link rel="help" href="https://drafts.csswg.org/css-color-4/#specifying-lab-lch"> -<link rel="match" href="blacktext-ref.html"> +<link rel="match" href="lab-004-ref.html"> <meta name="assert" content="lch() with no alpha, positive a axis"> <style> .test { color: red; } .test { color: lch(50 50 0)} - .match { color: rgb(75.62%, 30.45%, 47.56%)} /* lch(50,0,0) converted to sRGB */ + .match { color: rgb(75.62%, 30.45%, 47.56%)} /* lch(50 50 0) converted to sRGB (happens to be the same as lab(50 50 0)*/ </style> <body> <p>Test passes if the two lines of filler text are the same color.</p>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-color/lch-005.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-color/lch-005.html index 789d4b2..c16d02b 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/css/css-color/lch-005.html +++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-color/lch-005.html
@@ -3,12 +3,12 @@ <title>CSS Color 4: Specifying Lab and LCH</title> <link rel="author" title="Chris Lilley" href="mailto:chris@w3.org"> <link rel="help" href="https://drafts.csswg.org/css-color-4/#specifying-lab-lch"> -<link rel="match" href="blacktext-ref.html"> +<link rel="match" href="lab-005-ref.html"> <meta name="assert" content="lch() with no alpha, negative a axis"> <style> .test { color: red; } - .test { color: lab(70 45 180)} - .match { color: rgb(10.79%, 75.55%, 66.40%)} /* lch(70,45,180) converted to sRGB */ + .test { color: lch(70 45 -180)} + .match { color: rgb(10.79%, 75.55%, 66.40%)} /* lch(70 45 180) converted to sRGB */ </style> <body> <p>Test passes if the two lines of filler text are the same color.</p>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-color/lch-006.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-color/lch-006.html index 760362c..c3bbd14f 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/css/css-color/lch-006.html +++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-color/lch-006.html
@@ -3,12 +3,12 @@ <title>CSS Color 4: Specifying Lab and LCH</title> <link rel="author" title="Chris Lilley" href="mailto:chris@w3.org"> <link rel="help" href="https://drafts.csswg.org/css-color-4/#specifying-lab-lch"> -<link rel="match" href="blacktext-ref.html"> +<link rel="match" href="lab-006-ref.html"> <meta name="assert" content="lch() with no alpha, positive b axis"> <style> .test { color: red; } - .test { color: lab(70 70 90)} - .match { color: rgb(76.62%, 66.36%, 5.58%)} /* lch(70,70,90) converted to sRGB */ + .test { color: lch(70 70 90)} + .match { color: rgb(76.62%, 66.36%, 5.58%)} /* lch(70 70 90) converted to sRGB */ </style> <body> <p>Test passes if the two lines of filler text are the same color.</p>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-color/lch-007.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-color/lch-007.html index 7b8c41f..4646bc9 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/css/css-color/lch-007.html +++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-color/lch-007.html
@@ -3,12 +3,12 @@ <title>CSS Color 4: Specifying Lab and LCH</title> <link rel="author" title="Chris Lilley" href="mailto:chris@w3.org"> <link rel="help" href="https://drafts.csswg.org/css-color-4/#specifying-lab-lch"> -<link rel="match" href="blacktext-ref.html"> +<link rel="match" href="lab-007-ref.html"> <meta name="assert" content="lab() with no alpha, negative b axis"> <style> .test { color: red; } - .test { color: lch(55 60 270)} - .match { color: rgb(12.81%, 53.10%, 92.76%)} /* lch(55,60,270) converted to sRGB */ + .test { color: lch(56 58 275)} + .match { color: rgb(12.81%, 53.10%, 92.76%)} /* lch(56 58 275) converted to sRGB */ </style> <body> <p>Test passes if the two lines of filler text are the same color.</p>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/fetch/api/abort/serviceworker-intercepted.https.html b/third_party/WebKit/LayoutTests/external/wpt/fetch/api/abort/serviceworker-intercepted.https.html index 6df6aef2..623036d 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/fetch/api/abort/serviceworker-intercepted.https.html +++ b/third_party/WebKit/LayoutTests/external/wpt/fetch/api/abort/serviceworker-intercepted.https.html
@@ -13,25 +13,18 @@ const SCOPE = '../resources/basic.html'; const BODY_METHODS = ['arrayBuffer', 'blob', 'formData', 'json', 'text']; - async function cleanup() { - for (const iframe of document.querySelectorAll('.test-iframe')) { - iframe.parentNode.removeChild(iframe); - } - - const reg = await navigator.serviceWorker.getRegistration(SCOPE); - if (reg) await reg.unregister(); - } - - async function setupRegistration(t) { - await cleanup(); - const reg = await navigator.serviceWorker.register('../resources/sw-intercept.js', { scope: SCOPE }); + async function setupRegistration(t, scope) { + const reg = await navigator.serviceWorker.register('../resources/sw-intercept.js', { scope }); await wait_for_state(t, reg.installing, 'activated'); + add_completion_callback(_ => reg.unregister()); return reg; } promise_test(async t => { - await setupRegistration(t); - const iframe = await with_iframe(SCOPE); + const scope = SCOPE + "?q=aborted-not-intercepted"; + await setupRegistration(t, scope); + const iframe = await with_iframe(scope); + add_completion_callback(_ => iframe.remove()); const w = iframe.contentWindow; const controller = new w.AbortController(); @@ -56,8 +49,10 @@ for (const bodyMethod of BODY_METHODS) { promise_test(async t => { - await setupRegistration(t); - const iframe = await with_iframe(SCOPE); + const scope = SCOPE + "?q=aborted-" + bodyMethod + "-rejects"; + await setupRegistration(t, scope); + const iframe = await with_iframe(scope); + add_completion_callback(_ => iframe.remove()); const w = iframe.contentWindow; const controller = new w.AbortController(); @@ -82,8 +77,10 @@ } promise_test(async t => { - await setupRegistration(t); - const iframe = await with_iframe(SCOPE); + const scope = SCOPE + "?q=aborted-stream-errors"; + await setupRegistration(t, scope); + const iframe = await with_iframe(scope); + add_completion_callback(_ => iframe.remove()); const w = iframe.contentWindow; const controller = new w.AbortController();
diff --git a/third_party/WebKit/LayoutTests/external/wpt/fetch/corb/resources/html-js-polyglot.js b/third_party/WebKit/LayoutTests/external/wpt/fetch/corb/resources/html-js-polyglot.js new file mode 100644 index 0000000..deeeaa0 --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/fetch/corb/resources/html-js-polyglot.js
@@ -0,0 +1,9 @@ +<!--/*--><html><body><script type="text/javascript"><!--//*/ + +// This is a regression test for https://crbug.com/839425 +// which found out that some script resources are served +// with text/html content-type and with a body that is +// both a valid html and a valid javascript. +window.polyglot = 123; + +//--></script></body></html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/fetch/corb/resources/html-js-polyglot.js.headers b/third_party/WebKit/LayoutTests/external/wpt/fetch/corb/resources/html-js-polyglot.js.headers new file mode 100644 index 0000000..156209f9 --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/fetch/corb/resources/html-js-polyglot.js.headers
@@ -0,0 +1 @@ +Content-Type: text/html
diff --git a/third_party/WebKit/LayoutTests/external/wpt/fetch/corb/script-html-js-polyglot.sub.html b/third_party/WebKit/LayoutTests/external/wpt/fetch/corb/script-html-js-polyglot.sub.html new file mode 100644 index 0000000..8395901 --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/fetch/corb/script-html-js-polyglot.sub.html
@@ -0,0 +1,29 @@ +<!DOCTYPE html> +<!-- Test verifies that CORB won't block a polyglot script that is + both a valid HTML document and also valid Javascript. +--> +<meta charset="utf-8"> +<script src=/resources/testharness.js></script> +<script src=/resources/testharnessreport.js></script> +<div id=log></div> +<script> +async_test(function(t) { + var script = document.createElement("script") + + script.onload = t.step_func_done(function(){ + // Verify that html-js-polyglot.js wasn't blocked - that script + // should have set window.polyglot to 123. + assert_equals(window.polyglot, 123); + }) + addEventListener("error",function(e) { + t.step(function() { + assert_unreached("No errors are expected with or without CORB."); + t.done(); + }) + }); + + // www1 is cross-origin, so the HTTP response is CORB-eligible. + script.src = "http://{{domains[www1]}}:{{ports[http][0]}}/fetch/corb/resources/html-js-polyglot.js" + document.body.appendChild(script) +}); +</script>
diff --git a/third_party/WebKit/LayoutTests/fast/loader/recursive-before-unload-crash.html b/third_party/WebKit/LayoutTests/fast/loader/recursive-before-unload-crash.html deleted file mode 100644 index 01855353..0000000 --- a/third_party/WebKit/LayoutTests/fast/loader/recursive-before-unload-crash.html +++ /dev/null
@@ -1,47 +0,0 @@ -<script> -if (window.testRunner) { - testRunner.waitUntilDone(); - testRunner.dumpAsText(); -} - -var haveAddedIFrame = false; - -window.onbeforeunload = function() { - if (!haveAddedIFrame) - alert("onbeforeunload called, and iframe hasn't been added yet."); - var a = document.createEvent("MouseEvents"); - a.initEvent("click", true, true); - var d = document.createElement("a"); - d.href = "http://localhost:1234/"; - d.dispatchEvent(a); -} - -function clicked() { - window.location.href="http://127.0.0.1:1234/"; -} - -function addiframe() { - alert("Adding iframe"); - var frame = document.createElement("iframe"); - frame.src = "http://localhost:1234/" - document.body.appendChild(frame); - haveAddedIFrame = true; - if (window.testRunner) - testRunner.notifyDone(); -} - -function runTest() { - clicked(); - setTimeout("addiframe();", 0); -} - -</script> -<body onload="runTest();"> -This test demonstrates a problem with our handling of the beforeunload event.<br> -If a script manages to try and navigate the frame from beforeunload - when a navigation is already pending - we end up blowing out the stack by recursively consulting the policy delegate then running onbeforeunload repeatedly.<br> -After this happens, the FrameLoader is in a bogus state where it thinks it is in the middle of a provisional load, but it doesn't have a provisional document loader.<br> -In this state, the frame is very difficult to navigate anywhere else, and attempts to load new things within the frame can result in a crash.<br> -This was reproducibly identified on sears.com following a bizarre Safari specific code path.<br> -<a href="javascript:void(clicked())">Click here to run the beforeunload test and blow out the stack</a><br> -<a href="javascript:void(addiframe())">Click here to append an iframe and crash</a><br> -</body>
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/paint-invalidation-with-reparent-across-frame-boundaries-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/paint-invalidation-with-reparent-across-frame-boundaries-expected.txt index 2ae021b..22730f5 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/paint-invalidation-with-reparent-across-frame-boundaries-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/paint-invalidation-with-reparent-across-frame-boundaries-expected.txt
@@ -20,12 +20,12 @@ { "object": "NGPaintFragment", "rect": [8, 147, 768, 59], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "NGPaintFragment", "rect": [8, 147, 768, 39], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutIFrame IFRAME id='iframe'", @@ -35,7 +35,7 @@ { "object": "LayoutNGBlockFlow HTML", "rect": [18, 18, 22, 19], - "reason": "disappeared" + "reason": "chunk disappeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/resize-iframe-text-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/resize-iframe-text-expected.txt index 37b6d45..5c7646d 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/resize-iframe-text-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/resize-iframe-text-expected.txt
@@ -35,12 +35,12 @@ { "object": "LayoutNGBlockFlow HTML", "rect": [8, 300, 60, 22], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutView #document", "rect": [485, 0, 15, 200], - "reason": "disappeared" + "reason": "chunk disappeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/subtree-root-skipped-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/subtree-root-skipped-expected.txt index e812a51..9f88ed2 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/subtree-root-skipped-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/subtree-root-skipped-expected.txt
@@ -25,12 +25,12 @@ { "object": "NGPaintFragment", "rect": [8, 30, 103, 19], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "NGPaintFragment", "rect": [8, 30, 103, 19], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "InlineTextBox 'PASS'",
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/svg/embedded-svg-size-changes-no-layout-triggers-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/svg/embedded-svg-size-changes-no-layout-triggers-expected.txt index 055f095a..4d472dd 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/svg/embedded-svg-size-changes-no-layout-triggers-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/svg/embedded-svg-size-changes-no-layout-triggers-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutNGBlockFlow HTML", "rect": [0, 0, 402, 202], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGRect rect",
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/svg/nested-embedded-svg-size-changes-no-layout-triggers-1-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/svg/nested-embedded-svg-size-changes-no-layout-triggers-1-expected.txt index fe7592a..127334a2 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/svg/nested-embedded-svg-size-changes-no-layout-triggers-1-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/svg/nested-embedded-svg-size-changes-no-layout-triggers-1-expected.txt
@@ -20,12 +20,12 @@ { "object": "LayoutNGBlockFlow HTML", "rect": [0, 0, 402, 202], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutView #document", "rect": [0, 0, 300, 150], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGRect rect",
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/svg/nested-embedded-svg-size-changes-no-layout-triggers-2-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/svg/nested-embedded-svg-size-changes-no-layout-triggers-2-expected.txt index fe7592a..127334a2 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/svg/nested-embedded-svg-size-changes-no-layout-triggers-2-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/svg/nested-embedded-svg-size-changes-no-layout-triggers-2-expected.txt
@@ -20,12 +20,12 @@ { "object": "LayoutNGBlockFlow HTML", "rect": [0, 0, 402, 202], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutView #document", "rect": [0, 0, 300, 150], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGRect rect",
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/svg/use-setAttribute-crash-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/svg/use-setAttribute-crash-expected.txt index 8b4633b..7cc1c8e 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/svg/use-setAttribute-crash-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/paint/invalidation/svg/use-setAttribute-crash-expected.txt
@@ -20,12 +20,12 @@ { "object": "LayoutSVGEllipse svg:circle id='circle'", "rect": [27, 27, 62, 62], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGEllipse svg:circle id='circle'", "rect": [51, 51, 14, 14], - "reason": "disappeared" + "reason": "chunk disappeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/background/view-background-from-body-2-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/background/view-background-from-body-2-expected.txt index 6225413..484fec8 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/background/view-background-from-body-2-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/background/view-background-from-body-2-expected.txt
@@ -14,7 +14,7 @@ { "object": "LayoutBlockFlow HTML", "rect": [50, 50, 700, 500], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/bugzilla-6473-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/bugzilla-6473-expected.txt index 19213601..4003748 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/bugzilla-6473-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/bugzilla-6473-expected.txt
@@ -9,7 +9,7 @@ { "object": "LayoutBlockFlow (relative positioned) P", "rect": [8, 152, 784, 20], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutBlockFlow (relative positioned) P",
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/caret-subpixel-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/caret-subpixel-expected.txt index d688375..d0bb307 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/caret-subpixel-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/caret-subpixel-expected.txt
@@ -14,7 +14,7 @@ { "object": "LayoutBlockFlow DIV", "rect": [209, 11, 2, 16], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/clip/control-clip-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/clip/control-clip-expected.txt index c6f5e10..7907ad5 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/clip/control-clip-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/clip/control-clip-expected.txt
@@ -9,7 +9,7 @@ { "object": "InlineTextBox 'SUCCESS'", "rect": [76, 117, 64, 16], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox 'SUCCESS'", @@ -19,7 +19,7 @@ { "object": "InlineTextBox 'FAILURE'", "rect": [81, 117, 54, 16], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "InlineTextBox 'FAILURE'",
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/clip/outline-clip-change-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/clip/outline-clip-change-expected.txt index 1a48ca1..d0a4c59 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/clip/outline-clip-change-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/clip/outline-clip-change-expected.txt
@@ -9,7 +9,7 @@ { "object": "LayoutBlockFlow (positioned) A id='link' class='updated'", "rect": [48, 108, 90, 25], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox 'Lorem Ipsum'",
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/clip/resize-with-border-clipped-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/clip/resize-with-border-clipped-expected.txt index 08aa731..4609d1745 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/clip/resize-with-border-clipped-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/clip/resize-with-border-clipped-expected.txt
@@ -9,7 +9,7 @@ { "object": "LayoutBlockFlow (positioned) DIV id='container'", "rect": [100, 100, 200, 200], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutBlockFlow DIV id='target'",
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/compositing/compositing-reason-removed-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/compositing/compositing-reason-removed-expected.txt index ca95ca1..f13322d5 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/compositing/compositing-reason-removed-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/compositing/compositing-reason-removed-expected.txt
@@ -9,7 +9,7 @@ { "object": "LayoutBlockFlow (relative positioned) DIV id='square'", "rect": [8, 8, 30, 30], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/compositing/containing-block-added-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/compositing/containing-block-added-expected.txt index 7a22eb1..74aed88 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/compositing/containing-block-added-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/compositing/containing-block-added-expected.txt
@@ -9,7 +9,7 @@ { "object": "LayoutBlockFlow (positioned) DIV class='fixed'", "rect": [50, 50, 75, 75], - "reason": "disappeared" + "reason": "chunk disappeared" } ] }, @@ -22,7 +22,7 @@ { "object": "LayoutBlockFlow (positioned) DIV class='fixed'", "rect": [50, 50, 75, 75], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/compositing/containing-block-added-individual-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/compositing/containing-block-added-individual-expected.txt index 7a22eb1..74aed88 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/compositing/containing-block-added-individual-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/compositing/containing-block-added-individual-expected.txt
@@ -9,7 +9,7 @@ { "object": "LayoutBlockFlow (positioned) DIV class='fixed'", "rect": [50, 50, 75, 75], - "reason": "disappeared" + "reason": "chunk disappeared" } ] }, @@ -22,7 +22,7 @@ { "object": "LayoutBlockFlow (positioned) DIV class='fixed'", "rect": [50, 50, 75, 75], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/compositing/containing-block-removed-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/compositing/containing-block-removed-expected.txt index 6df2399e..29d00c1 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/compositing/containing-block-removed-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/compositing/containing-block-removed-expected.txt
@@ -9,7 +9,7 @@ { "object": "LayoutBlockFlow (positioned) DIV class='fixed'", "rect": [50, 50, 75, 75], - "reason": "appeared" + "reason": "chunk appeared" } ] }, @@ -23,7 +23,7 @@ { "object": "LayoutBlockFlow (positioned) DIV class='fixed'", "rect": [50, 50, 75, 75], - "reason": "disappeared" + "reason": "chunk disappeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/compositing/containing-block-removed-individual-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/compositing/containing-block-removed-individual-expected.txt index bb7844a..02d7535 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/compositing/containing-block-removed-individual-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/compositing/containing-block-removed-individual-expected.txt
@@ -10,7 +10,7 @@ { "object": "LayoutBlockFlow (positioned) DIV class='fixed'", "rect": [50, 50, 75, 75], - "reason": "appeared" + "reason": "chunk appeared" } ] }, @@ -24,7 +24,7 @@ { "object": "LayoutBlockFlow (positioned) DIV class='fixed'", "rect": [50, 50, 75, 75], - "reason": "disappeared" + "reason": "chunk disappeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/cull-rect-change-crash-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/cull-rect-change-crash-expected.txt index 4171b8e..dece0b78 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/cull-rect-change-crash-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/cull-rect-change-crash-expected.txt
@@ -9,7 +9,7 @@ { "object": "LayoutSVGForeignObject foreignObject", "rect": [0, 8, 1, 1], - "reason": "disappeared" + "reason": "chunk disappeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/filters/effect-reference-repaint-lighting-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/filters/effect-reference-repaint-lighting-expected.txt index 02780bf..f076d4c 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/filters/effect-reference-repaint-lighting-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/filters/effect-reference-repaint-lighting-expected.txt
@@ -9,12 +9,12 @@ { "object": "LayoutBlockFlow DIV class='before box'", "rect": [78, 70, 100, 100], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutBlockFlow DIV class='box'", "rect": [78, 70, 100, 100], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/filters/filter-invalidation-with-composited-container-change-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/filters/filter-invalidation-with-composited-container-change-expected.txt index 62bda85..c70f30e 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/filters/filter-invalidation-with-composited-container-change-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/filters/filter-invalidation-with-composited-container-change-expected.txt
@@ -9,7 +9,7 @@ { "object": "LayoutBlockFlow DIV id='box' class='green drop-shadowed box'", "rect": [8, 8, 330, 330], - "reason": "disappeared" + "reason": "chunk disappeared" } ] },
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/flexbox/repaint-opacity-change-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/flexbox/repaint-opacity-change-expected.txt index c020f3f..8ca5007 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/flexbox/repaint-opacity-change-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/flexbox/repaint-opacity-change-expected.txt
@@ -9,12 +9,12 @@ { "object": "LayoutBlockFlow DIV id='target' class='item'", "rect": [18, 18, 764, 20], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutBlockFlow HTML", "rect": [18, 18, 764, 20], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/float-in-new-block-with-layout-delta-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/float-in-new-block-with-layout-delta-expected.txt index 4bef6d9..32c124c 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/float-in-new-block-with-layout-delta-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/float-in-new-block-with-layout-delta-expected.txt
@@ -9,7 +9,7 @@ { "object": "LayoutBlockFlow HTML", "rect": [8, 108, 100, 100], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/insert-frame-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/insert-frame-expected.txt index 33805ab..42d77f6 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/insert-frame-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/insert-frame-expected.txt
@@ -9,7 +9,7 @@ { "object": "LayoutBlockFlow HTML", "rect": [0, 0, 104, 104], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/invalidate-invisible-element-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/invalidate-invisible-element-expected.txt index 277217b..1af9813 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/invalidate-invisible-element-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/invalidate-invisible-element-expected.txt
@@ -9,7 +9,7 @@ { "object": "LayoutBlockFlow (positioned) DIV id='target'", "rect": [200, 300, 200, 200], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/invalidation-with-zero-size-object-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/invalidation-with-zero-size-object-expected.txt index 46ad1bd1..d7d89bb2 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/invalidation-with-zero-size-object-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/invalidation-with-zero-size-object-expected.txt
@@ -9,7 +9,7 @@ { "object": "LayoutBlockFlow HTML", "rect": [8, 8, 200, 200], - "reason": "disappeared" + "reason": "chunk disappeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/make-children-non-inline-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/make-children-non-inline-expected.txt index 33c0e8cd..7396f2ae 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/make-children-non-inline-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/make-children-non-inline-expected.txt
@@ -9,12 +9,12 @@ { "object": "LayoutBlockFlow HTML", "rect": [8, 8, 765, 335], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutBlockFlow HTML", "rect": [8, 8, 765, 235], - "reason": "disappeared" + "reason": "chunk disappeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/multicol/multicol-with-abspos-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/multicol/multicol-with-abspos-expected.txt index 5a0f1e3..591ed0c 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/multicol/multicol-with-abspos-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/multicol/multicol-with-abspos-expected.txt
@@ -9,7 +9,7 @@ { "object": "LayoutBlockFlow (positioned) DIV id='target'", "rect": [0, 580, 80, 20], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/multicol/multicol-with-block-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/multicol/multicol-with-block-expected.txt index 6a2db090..d500dd2 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/multicol/multicol-with-block-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/multicol/multicol-with-block-expected.txt
@@ -9,7 +9,7 @@ { "object": "LayoutMultiColumnFlowThread (anonymous)", "rect": [488, 8, 80, 20], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/multicol/multicol-with-relpos-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/multicol/multicol-with-relpos-expected.txt index 42721fa..2bcff34 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/multicol/multicol-with-relpos-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/multicol/multicol-with-relpos-expected.txt
@@ -9,7 +9,7 @@ { "object": "LayoutBlockFlow (relative positioned) DIV id='target'", "rect": [508, 28, 150, 20], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/opacity-from-zero-to-non-zero-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/opacity-from-zero-to-non-zero-expected.txt index e7fea51..5875cfe 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/opacity-from-zero-to-non-zero-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/opacity-from-zero-to-non-zero-expected.txt
@@ -9,7 +9,7 @@ { "object": "LayoutBlockFlow DIV id='target'", "rect": [8, 8, 100, 100], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/overflow/erase-overflow-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/overflow/erase-overflow-expected.txt index 1b45a672..71f44218 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/overflow/erase-overflow-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/overflow/erase-overflow-expected.txt
@@ -9,12 +9,12 @@ { "object": "LayoutBlockFlow HTML", "rect": [8, 8, 100, 200], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutBlockFlow DIV id='target' class='square'", "rect": [8, 8, 100, 100], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/overflow/overflow-delete-line-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/overflow/overflow-delete-line-expected.txt index b4ce382a..b308331 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/overflow/overflow-delete-line-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/overflow/overflow-delete-line-expected.txt
@@ -14,7 +14,7 @@ { "object": "LayoutBlockFlow DIV id='dv'", "rect": [8, 74, 46, 36], - "reason": "disappeared" + "reason": "chunk disappeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/overhanging-float-detach-repaint-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/overhanging-float-detach-repaint-expected.txt index 02e7f29..3db23d82 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/overhanging-float-detach-repaint-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/overhanging-float-detach-repaint-expected.txt
@@ -9,7 +9,7 @@ { "object": "LayoutBlockFlow HTML", "rect": [8, 68, 100, 100], - "reason": "disappeared" + "reason": "chunk disappeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/position/absolute-position-change-containing-block-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/position/absolute-position-change-containing-block-expected.txt index 13630628..23a2e6a 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/position/absolute-position-change-containing-block-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/position/absolute-position-change-containing-block-expected.txt
@@ -9,7 +9,7 @@ { "object": "LayoutBlockFlow HTML", "rect": [8, 8, 192, 192], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/position/absolute-position-moved-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/position/absolute-position-moved-expected.txt index 0be323b3..e9c2ec0d 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/position/absolute-position-moved-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/position/absolute-position-moved-expected.txt
@@ -9,7 +9,7 @@ { "object": "LayoutBlockFlow (positioned) DIV id='absoluteDiv' class='absolute green'", "rect": [100, 100, 100, 100], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/remove-inline-layer-after-layout-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/remove-inline-layer-after-layout-expected.txt index 894ac636..336741d 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/remove-inline-layer-after-layout-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/remove-inline-layer-after-layout-expected.txt
@@ -9,7 +9,7 @@ { "object": "LayoutInline SPAN id='target'", "rect": [112, 193, 178, 19], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutBlockFlow DIV",
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/resize-iframe-text-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/resize-iframe-text-expected.txt index 4241380..21619c00 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/resize-iframe-text-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/resize-iframe-text-expected.txt
@@ -14,7 +14,7 @@ { "object": "LayoutBlockFlow HTML", "rect": [8, 300, 60, 22], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/scroll/overflow-hidden-in-overflow-hidden-scrolled-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/scroll/overflow-hidden-in-overflow-hidden-scrolled-expected.txt index c325f758..d9b4b39 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/scroll/overflow-hidden-in-overflow-hidden-scrolled-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/scroll/overflow-hidden-in-overflow-hidden-scrolled-expected.txt
@@ -9,12 +9,12 @@ { "object": "LayoutBlockFlow DIV class='innerWrapper'", "rect": [8, 18, 100, 190], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutBlockFlow DIV class='innerWrapper'", "rect": [8, 18, 100, 190], - "reason": "disappeared" + "reason": "chunk disappeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/scroll/scroll-in-clipped-layer-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/scroll/scroll-in-clipped-layer-expected.txt index 65ce730b..c779f04 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/scroll/scroll-in-clipped-layer-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/scroll/scroll-in-clipped-layer-expected.txt
@@ -9,12 +9,12 @@ { "object": "LayoutBlockFlow (positioned) DIV class='absolute red'", "rect": [100, 150, 100, 100], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutBlockFlow (relative positioned) DIV class='relative green'", "rect": [100, 150, 100, 100], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/search-field-cancel-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/search-field-cancel-expected.txt index 8f1e97c..772fd2c 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/search-field-cancel-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/search-field-cancel-expected.txt
@@ -9,7 +9,7 @@ { "object": "LayoutBlockFlow DIV", "rect": [11, 47, 58, 16], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/add-background-property-on-root-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/add-background-property-on-root-expected.txt index 0677859e..643d0fb 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/add-background-property-on-root-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/add-background-property-on-root-expected.txt
@@ -14,7 +14,7 @@ { "object": "LayoutSVGRoot svg", "rect": [8, 8, 100, 100], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/add-border-property-on-root-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/add-border-property-on-root-expected.txt index 8baeb15..adeef4e 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/add-border-property-on-root-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/add-border-property-on-root-expected.txt
@@ -9,7 +9,7 @@ { "object": "LayoutSVGRoot (positioned) svg", "rect": [8, 8, 120, 120], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/add-outline-property-on-root-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/add-outline-property-on-root-expected.txt index 938cac4..636a466 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/add-outline-property-on-root-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/add-outline-property-on-root-expected.txt
@@ -9,7 +9,7 @@ { "object": "LayoutSVGRoot svg", "rect": [0, 0, 118, 118], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/clip-path-href-changes-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/clip-path-href-changes-expected.txt index d3c7802..e5638a4e 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/clip-path-href-changes-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/clip-path-href-changes-expected.txt
@@ -9,12 +9,12 @@ { "object": "LayoutSVGRoot svg", "rect": [0, 0, 200, 200], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGContainer g", "rect": [0, 0, 100, 100], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/clip-path-id-changes-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/clip-path-id-changes-expected.txt index c0e7c7c..6f7d0a11 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/clip-path-id-changes-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/clip-path-id-changes-expected.txt
@@ -9,12 +9,12 @@ { "object": "LayoutSVGRoot svg", "rect": [0, 0, 200, 200], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGContainer g", "rect": [0, 0, 100, 100], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/embedded-svg-size-changes-no-layout-triggers-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/embedded-svg-size-changes-no-layout-triggers-expected.txt index 3b54e63..f2f7e35 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/embedded-svg-size-changes-no-layout-triggers-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/embedded-svg-size-changes-no-layout-triggers-expected.txt
@@ -9,7 +9,7 @@ { "object": "LayoutBlockFlow HTML", "rect": [0, 0, 402, 202], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGRect rect",
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/ems-display-none-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/ems-display-none-expected.txt index 4e05afb..8b21832 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/ems-display-none-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/ems-display-none-expected.txt
@@ -9,7 +9,7 @@ { "object": "LayoutSVGRoot svg", "rect": [50, 54, 571, 86], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/exs-display-none-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/exs-display-none-expected.txt index 5275f90..813d692 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/exs-display-none-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/exs-display-none-expected.txt
@@ -9,7 +9,7 @@ { "object": "LayoutSVGRoot svg", "rect": [50, 52, 571, 84], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/hairline-stroke-squarecap-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/hairline-stroke-squarecap-expected.txt index e48917b1..251e8ec 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/hairline-stroke-squarecap-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/hairline-stroke-squarecap-expected.txt
@@ -9,12 +9,12 @@ { "object": "LayoutSVGPath path id='path'", "rect": [197, 197, 107, 107], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGRoot svg", "rect": [97, 97, 106, 106], - "reason": "disappeared" + "reason": "chunk disappeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/image-with-clip-path-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/image-with-clip-path-expected.txt index b37227f..eb71779 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/image-with-clip-path-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/image-with-clip-path-expected.txt
@@ -9,7 +9,7 @@ { "object": "LayoutSVGImage image", "rect": [20, 20, 60, 60], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGImage image",
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/inner-svg-change-viewPort-relative-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/inner-svg-change-viewPort-relative-expected.txt index 832926ee..489beaa 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/inner-svg-change-viewPort-relative-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/inner-svg-change-viewPort-relative-expected.txt
@@ -14,7 +14,7 @@ { "object": "InlineTextBox 'right-aligned text'", "rect": [93, 85, 107, 19], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGViewportContainer svg id='inner'", @@ -24,7 +24,7 @@ { "object": "InlineTextBox 'right-aligned text'", "rect": [0, 85, 100, 19], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGContainer use",
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/js-late-clipPath-and-object-creation-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/js-late-clipPath-and-object-creation-expected.txt index 159a840..f553e928 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/js-late-clipPath-and-object-creation-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/js-late-clipPath-and-object-creation-expected.txt
@@ -9,17 +9,17 @@ { "object": "LayoutSVGContainer g id='content'", "rect": [16, 40, 784, 173], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer g id='content'", "rect": [16, 40, 784, 173], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [16, 40, 318, 173], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/js-late-clipPath-creation-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/js-late-clipPath-creation-expected.txt index 7a1eaa6d..7552690 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/js-late-clipPath-creation-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/js-late-clipPath-creation-expected.txt
@@ -9,12 +9,12 @@ { "object": "LayoutSVGContainer g id='content'", "rect": [16, 40, 784, 173], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [16, 40, 318, 173], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/js-late-gradient-and-object-creation-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/js-late-gradient-and-object-creation-expected.txt index 7252134..4d10764 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/js-late-gradient-and-object-creation-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/js-late-gradient-and-object-creation-expected.txt
@@ -9,7 +9,7 @@ { "object": "LayoutSVGRoot svg id='svg-root'", "rect": [0, 15, 757, 365], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/js-late-marker-and-object-creation-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/js-late-marker-and-object-creation-expected.txt index 533216d25..2c1d561 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/js-late-marker-and-object-creation-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/js-late-marker-and-object-creation-expected.txt
@@ -14,7 +14,7 @@ { "object": "LayoutSVGRoot svg id='svg-root'", "rect": [189, 197, 139, 139], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/js-late-pattern-and-object-creation-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/js-late-pattern-and-object-creation-expected.txt index 0384fc9..d35b286a 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/js-late-pattern-and-object-creation-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/js-late-pattern-and-object-creation-expected.txt
@@ -9,7 +9,7 @@ { "object": "LayoutSVGRoot svg id='svg-root'", "rect": [0, 15, 682, 365], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/js-repaint-rect-on-path-with-stroke-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/js-repaint-rect-on-path-with-stroke-expected.txt index 9e34d81..c612504 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/js-repaint-rect-on-path-with-stroke-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/js-repaint-rect-on-path-with-stroke-expected.txt
@@ -9,7 +9,7 @@ { "object": "LayoutSVGPath path id='path'", "rect": [29, 29, 142, 92], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGPath path id='path'",
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/js-update-container-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/js-update-container-expected.txt index 789fd5b..2c36d860 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/js-update-container-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/js-update-container-expected.txt
@@ -9,12 +9,12 @@ { "object": "LayoutSVGRoot svg", "rect": [0, 0, 76, 76], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGContainer g id='group'", "rect": [0, 0, 41, 41], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/js-update-image-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/js-update-image-expected.txt index 68066e8..6319c34f 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/js-update-image-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/js-update-image-expected.txt
@@ -9,7 +9,7 @@ { "object": "LayoutSVGRoot svg", "rect": [0, 0, 75, 75], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/js-update-transform-addition-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/js-update-transform-addition-expected.txt index 6a71dc2..00ccdc3 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/js-update-transform-addition-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/js-update-transform-addition-expected.txt
@@ -9,7 +9,7 @@ { "object": "LayoutSVGRoot svg", "rect": [253, 208, 184, 129], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/js-update-transform-changes-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/js-update-transform-changes-expected.txt index 6a71dc2..00ccdc3 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/js-update-transform-changes-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/js-update-transform-changes-expected.txt
@@ -9,7 +9,7 @@ { "object": "LayoutSVGRoot svg", "rect": [253, 208, 184, 129], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/modify-inserted-listitem-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/modify-inserted-listitem-expected.txt index 71854c4..2418aef 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/modify-inserted-listitem-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/modify-inserted-listitem-expected.txt
@@ -9,7 +9,7 @@ { "object": "LayoutSVGRect rect id='move'", "rect": [28, 38, 10, 10], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGRect rect id='move'",
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/overflow-repaint-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/overflow-repaint-expected.txt index a66218f..bf4e055 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/overflow-repaint-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/overflow-repaint-expected.txt
@@ -9,7 +9,7 @@ { "object": "LayoutSVGRoot svg id='svg'", "rect": [8, 108, 100, 100], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/relative-sized-document-scrollbars-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/relative-sized-document-scrollbars-expected.txt index 3d72472..3a47980a 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/relative-sized-document-scrollbars-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/relative-sized-document-scrollbars-expected.txt
@@ -14,12 +14,12 @@ { "object": "LayoutSVGRoot svg", "rect": [6, 2, 788, 595], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGRoot svg", "rect": [6, 4, 788, 592], - "reason": "disappeared" + "reason": "chunk disappeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/remove-background-property-on-root-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/remove-background-property-on-root-expected.txt index 1f2e95e..0866b2c 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/remove-background-property-on-root-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/remove-background-property-on-root-expected.txt
@@ -14,7 +14,7 @@ { "object": "LayoutSVGRoot svg", "rect": [8, 8, 100, 100], - "reason": "disappeared" + "reason": "chunk disappeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/remove-border-property-on-root-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/remove-border-property-on-root-expected.txt index 43d788c..da264f9 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/remove-border-property-on-root-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/remove-border-property-on-root-expected.txt
@@ -9,7 +9,7 @@ { "object": "LayoutSVGRoot (positioned) svg", "rect": [8, 8, 120, 120], - "reason": "disappeared" + "reason": "chunk disappeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/remove-outline-property-on-root-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/remove-outline-property-on-root-expected.txt index bd317f0e..c6afc23 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/remove-outline-property-on-root-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/remove-outline-property-on-root-expected.txt
@@ -9,7 +9,7 @@ { "object": "LayoutSVGRoot svg", "rect": [0, 0, 118, 118], - "reason": "disappeared" + "reason": "chunk disappeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/shape-transform-change-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/shape-transform-change-expected.txt index 9cd952f..64b499b3 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/shape-transform-change-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/shape-transform-change-expected.txt
@@ -9,7 +9,7 @@ { "object": "LayoutSVGRect rect", "rect": [8, 8, 200, 200], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGRect rect",
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/text-repaint-including-stroke-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/text-repaint-including-stroke-expected.txt index eab97c8..573a243 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/text-repaint-including-stroke-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/text-repaint-including-stroke-expected.txt
@@ -9,12 +9,12 @@ { "object": "LayoutSVGText text id='bounce'", "rect": [80, 0, 553, 117], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGRoot svg", "rect": [30, 0, 404, 59], - "reason": "disappeared" + "reason": "chunk disappeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/text-rescale-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/text-rescale-expected.txt index f16e5f4f..7327297 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/text-rescale-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/text-rescale-expected.txt
@@ -9,12 +9,12 @@ { "object": "InlineTextBox 'PASS '", "rect": [0, 114, 192, 46], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGRoot (positioned) svg", "rect": [0, 14, 192, 46], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGViewportContainer svg", @@ -24,7 +24,7 @@ { "object": "LayoutSVGViewportContainer svg", "rect": [310, 14, 91, 46], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGForeignObject foreignObject", @@ -39,7 +39,7 @@ { "object": "LayoutSVGContainer g id='text3g'", "rect": [0, 3, 8, 3], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGViewportContainer svg",
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/transform-text-element-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/transform-text-element-expected.txt index 9cfe745..6ba7251 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/transform-text-element-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/transform-text-element-expected.txt
@@ -9,12 +9,12 @@ { "object": "LayoutSVGText text", "rect": [8, 58, 400, 100], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGRoot svg", "rect": [8, 8, 400, 100], - "reason": "disappeared" + "reason": "chunk disappeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/use-setAttribute-crash-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/use-setAttribute-crash-expected.txt index 96f4342..da3fadf 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/use-setAttribute-crash-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/use-setAttribute-crash-expected.txt
@@ -9,12 +9,12 @@ { "object": "LayoutSVGEllipse svg:circle id='circle'", "rect": [27, 27, 62, 62], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGEllipse svg:circle id='circle'", "rect": [51, 51, 14, 14], - "reason": "disappeared" + "reason": "chunk disappeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/window-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/window-expected.txt index f981e6b6..0ce771a 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/window-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/window-expected.txt
@@ -9,22 +9,22 @@ { "object": "LayoutSVGContainer g id='bigWindow'", "rect": [37, 142, 551, 394], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGRect rect id='titleBarbigWindow'", "rect": [37, 142, 551, 17], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer g id='nestedWindow'", "rect": [76, 181, 316, 238], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGRect rect id='titleBarnestedWindow'", "rect": [76, 181, 316, 17], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGRect rect id='decoGroupMinimizednavWindow'", @@ -34,27 +34,27 @@ { "object": "LayoutSVGContainer g id='navWindow'", "rect": [623, 91, 176, 160], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer g id='colourPickerWindow'", "rect": [76, 194, 176, 144], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer g id='smallWindow'", "rect": [311, 376, 160, 145], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer g id='statusWindow'", "rect": [248, 343, 144, 66], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer g id='minimalWindow'", "rect": [38, 475, 121, 50], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGRect rect", @@ -64,7 +64,7 @@ { "object": "LayoutSVGText text", "rect": [615, 153, 14, 81], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer use id='closeButtonnavWindow'", @@ -74,7 +74,7 @@ { "object": "LayoutSVGContainer use id='closeButtonnavWindow'", "rect": [782, 94, 12, 11], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer use id='closeButtonnavWindow'", @@ -94,32 +94,32 @@ { "object": "LayoutSVGContainer use id='closeButtonbigWindow'", "rect": [571, 145, 12, 11], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer use id='minimizeButtonnestedWindow'", "rect": [349, 184, 12, 11], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer use id='closeButtoncolourPickerWindow'", "rect": [235, 197, 12, 11], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer use id='maximizeButtonstatusWindow'", "rect": [376, 345, 11, 12], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer use id='minimizeButtonstatusWindow'", "rect": [363, 345, 11, 12], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer use id='maximizeButtonnavWindow'", "rect": [769, 94, 11, 11], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer use id='maximizeButtonnavWindow'", @@ -129,7 +129,7 @@ { "object": "LayoutSVGContainer use id='minimizeButtonnavWindow'", "rect": [756, 94, 11, 11], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer use id='minimizeButtonnavWindow'", @@ -139,47 +139,47 @@ { "object": "LayoutSVGContainer use id='maximizeButtonbigWindow'", "rect": [558, 145, 11, 11], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer use id='minimizeButtonbigWindow'", "rect": [545, 145, 11, 11], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer use id='closeButtonsmallWindow'", "rect": [454, 379, 11, 11], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer use id='maximizeButtonsmallWindow'", "rect": [441, 379, 11, 11], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer use id='minimizeButtonsmallWindow'", "rect": [428, 379, 11, 11], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer use id='closeButtonnestedWindow'", "rect": [376, 184, 11, 11], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer use id='maximizeButtonnestedWindow'", "rect": [363, 184, 11, 11], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer use id='maximizeButtoncolourPickerWindow'", "rect": [222, 197, 11, 11], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer use id='minimizeButtoncolourPickerWindow'", "rect": [209, 197, 11, 11], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/table/composited-table-background-initial-empty-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/table/composited-table-background-initial-empty-expected.txt index 08ca3c25..c953de4 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/table/composited-table-background-initial-empty-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/table/composited-table-background-initial-empty-expected.txt
@@ -9,12 +9,12 @@ { "object": "LayoutBlockFlow HTML", "rect": [8, 8, 523, 152], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutBlockFlow HTML", "rect": [8, 8, 523, 129], - "reason": "disappeared" + "reason": "chunk disappeared" } ] },
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/table/row-change-background-rowspan-cell-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/table/row-change-background-rowspan-cell-expected.txt index e5c2f07..9a044c3 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/table/row-change-background-rowspan-cell-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/table/row-change-background-rowspan-cell-expected.txt
@@ -9,12 +9,12 @@ { "object": "LayoutTable (relative positioned) TABLE", "rect": [8, 206, 110, 198], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutTable (relative positioned) TABLE", "rect": [11, 206, 74, 181], - "reason": "disappeared" + "reason": "chunk disappeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/transform/change-transform-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/transform/change-transform-expected.txt index 66ff555..fb40f46 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/transform/change-transform-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/transform/change-transform-expected.txt
@@ -9,22 +9,22 @@ { "object": "LayoutBlockFlow HTML", "rect": [10, 10, 774, 191], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutBlockFlow HTML", "rect": [10, 126, 774, 75], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutBlockFlow (positioned) DIV id='overlay'", "rect": [35, 35, 50, 50], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutBlockFlow DIV id='square'", "rect": [35, 35, 50, 50], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/transform/transform-inline-layered-child-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/transform/transform-inline-layered-child-expected.txt index c17d83a..e729dcca 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/transform/transform-inline-layered-child-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/transform/transform-inline-layered-child-expected.txt
@@ -9,7 +9,7 @@ { "object": "LayoutInline (relative positioned) SPAN id='child'", "rect": [135, 361, 159, 195], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox 'A B C'",
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/transform/transform-rotate-and-remove-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/transform/transform-rotate-and-remove-expected.txt index 59cd8237..7d7342f 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/transform/transform-rotate-and-remove-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/transform/transform-rotate-and-remove-expected.txt
@@ -9,12 +9,12 @@ { "object": "LayoutBlockFlow HTML", "rect": [8, 8, 220, 70], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutBlockFlow DIV id='rel' class='rotated'", "rect": [20, 0, 196, 150], - "reason": "disappeared" + "reason": "chunk disappeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/navigation-blocking-expected.txt b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/navigation-blocking-expected.txt new file mode 100644 index 0000000..1e62a30 --- /dev/null +++ b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/navigation-blocking-expected.txt
@@ -0,0 +1,5 @@ +Tests that top-frame navigations are correctly blocked when intercepted. +intercepted: http://127.0.0.1:8000/inspector-protocol/resources/meta-tag.html, continuing +intercepted: http://127.0.0.1:8000/inspector-protocol/resources/test-page.html, cancelling +location.href = http://127.0.0.1:8000/inspector-protocol/resources/meta-tag.html +
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/navigation-blocking-xorigin-iframe-expected.txt b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/navigation-blocking-xorigin-iframe-expected.txt new file mode 100644 index 0000000..180ac80 --- /dev/null +++ b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/navigation-blocking-xorigin-iframe-expected.txt
@@ -0,0 +1,16 @@ +Tests that navigations in cross-origin subframes are correctly blocked when intercepted. +Interceptions: +[ + [0] : http://127.0.0.1:8000/inspector-protocol/resources/iframe-navigation.html + [1] : http://devtools.oopif-a.test:8000/inspector-protocol/resources/meta-tag.html + [2] : http://devtools.oopif-a.test:8000/inspector-protocol/resources/test-page.html + [3] : http://devtools.oopif-b.test:8000/inspector-protocol/resources/meta-tag.html + [4] : http://devtools.oopif-b.test:8000/inspector-protocol/resources/test-page.html: Aborted +] +Frames in page: +[ + [0] : http://127.0.0.1:8000/inspector-protocol/resources/iframe-navigation.html + [1] : http://devtools.oopif-a.test:8000/inspector-protocol/resources/test-page.html + [2] : http://devtools.oopif-b.test:8000/inspector-protocol/resources/meta-tag.html +] +
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/navigation-blocking-xorigin-iframe.js b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/navigation-blocking-xorigin-iframe.js new file mode 100644 index 0000000..739ddd96 --- /dev/null +++ b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/navigation-blocking-xorigin-iframe.js
@@ -0,0 +1,62 @@ +(async function(testRunner) { + var {page, session, dp} = await testRunner.startBlank( + `Tests that navigations in cross-origin subframes are correctly blocked when intercepted.`); + + await session.protocol.Network.clearBrowserCache(); + await session.protocol.Network.setCacheDisabled({cacheDisabled: true}); + await dp.Target.setAutoAttach({autoAttach: true, waitForDebuggerOnStart: true}); + + let interceptionLog = []; + function onRequestIntercepted(dp, e) { + const response = {interceptionId: e.params.interceptionId}; + + if (e.params.request.url === 'http://devtools.oopif-b.test:8000/inspector-protocol/resources/test-page.html') + response.errorReason = 'Aborted'; + interceptionLog.push(e.params.request.url + (response.errorReason ? `: ${response.errorReason}` : '')); + + dp.Network.continueInterceptedRequest(response); + } + + let loadCount = 5; + let loadCallback; + const loadPromise = new Promise(fulfill => loadCallback = fulfill); + + const allTargets = []; + function initalizeTarget(dp) { + allTargets.push(dp); + dp.Network.setRequestInterception({patterns: [{}]}); + dp.Network.onRequestIntercepted(onRequestIntercepted.bind(this, dp)); + dp.Network.enable(); + dp.Page.enable(); + dp.Page.onFrameStoppedLoading(e => { + if (!--loadCount) + loadCallback(); + }); + dp.Runtime.runIfWaitingForDebugger(); + } + + initalizeTarget(dp); + dp.Target.onAttachedToTarget(e => { + const targetProtocol = session.createChild(e.params.sessionId).protocol; + initalizeTarget(targetProtocol); + }); + + dp.Page.navigate({url: 'http://127.0.0.1:8000/inspector-protocol/resources/iframe-navigation.html'}); + + let urls = []; + function getURLsRecursively(frameTree) { + urls.push(frameTree.frame.url); + (frameTree.childFrames || []).forEach(getURLsRecursively); + } + + await loadPromise; + let trees = await Promise.all(allTargets.map(target => target.Page.getFrameTree())); + trees.map(result => result.result.frameTree).forEach(getURLsRecursively); + + testRunner.log('Interceptions:'); + testRunner.log(interceptionLog.sort()); + testRunner.log('Frames in page:'); + testRunner.log(urls.sort()); + + testRunner.completeTest(); +})
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/navigation-blocking.js b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/navigation-blocking.js new file mode 100644 index 0000000..ee1de3c --- /dev/null +++ b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/navigation-blocking.js
@@ -0,0 +1,26 @@ +(async function(testRunner) { + var {page, session, dp} = await testRunner.startBlank( + `Tests that top-frame navigations are correctly blocked when intercepted.`); + + await session.protocol.Network.clearBrowserCache(); + await session.protocol.Network.setCacheDisabled({cacheDisabled: true}); + await session.protocol.Network.enable(); + await session.protocol.Runtime.enable(); + + await dp.Network.setRequestInterception({patterns: [{}]}); + + dp.Page.navigate({url: 'http://127.0.0.1:8000/inspector-protocol/resources/meta-tag.html'}); + const frame1 = (await dp.Network.onceRequestIntercepted()).params; + testRunner.log(`intercepted: ${frame1.request.url}, continuing`); + dp.Network.continueInterceptedRequest({interceptionId: frame1.interceptionId}); + + const frame2 = (await dp.Network.onceRequestIntercepted()).params; + testRunner.log(`intercepted: ${frame2.request.url}, cancelling`); + dp.Network.continueInterceptedRequest({interceptionId: frame2.interceptionId, errorReason: 'Aborted'}); + + const location = await session.evaluate('location.href'); + + testRunner.log(`location.href = ${location}`); + + testRunner.completeTest(); +})
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/page/page-stop-loading-expected.txt b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/page/page-stop-loading-expected.txt new file mode 100644 index 0000000..ed5acb5 --- /dev/null +++ b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/page/page-stop-loading-expected.txt
@@ -0,0 +1,3 @@ +Tests that Page.stopLoading cancels navigation +navigation finished +
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/page/page-stop-loading.js b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/page/page-stop-loading.js new file mode 100644 index 0000000..feaf589 --- /dev/null +++ b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/page/page-stop-loading.js
@@ -0,0 +1,15 @@ +(async function(testRunner) { + var {page, session, dp} = await testRunner.startBlank( + 'Tests that Page.stopLoading cancels navigation'); + + await dp.Page.enable(); + await dp.Runtime.enable(); + await dp.Network.enable(); + + await dp.Network.setRequestInterception({patterns: [{}]}); + const navigatePromise = dp.Page.navigate({url: testRunner.url('../resources/inspector-protocol-page.html')}); + dp.Page.stopLoading(); + await navigatePromise; + testRunner.log('navigation finished'); + testRunner.completeTest(); +}) \ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/resources/iframe-navigation.html b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/resources/iframe-navigation.html new file mode 100644 index 0000000..ff019a81 --- /dev/null +++ b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/resources/iframe-navigation.html
@@ -0,0 +1,7 @@ +<html> +<body> +Dummy page. +<iframe src="http://devtools.oopif-a.test:8000/inspector-protocol/resources/meta-tag.html"></iframe> +<iframe src="http://devtools.oopif-b.test:8000/inspector-protocol/resources/meta-tag.html"></iframe> +</body> +</html>
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/resources/meta-tag.html b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/resources/meta-tag.html new file mode 100644 index 0000000..344316a5 --- /dev/null +++ b/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/resources/meta-tag.html
@@ -0,0 +1,8 @@ +<html> +<head> +<meta http-equiv="refresh" content="0; url=/inspector-protocol/resources/test-page.html"> +</head> +<body> +Dummy page, can't stay for long! +</body> +</html>
diff --git a/third_party/WebKit/LayoutTests/http/tests/media/video-controls-overflow-menu-download-button.html b/third_party/WebKit/LayoutTests/http/tests/media/video-controls-overflow-menu-download-button.html index 7badd4f..a0b2479 100644 --- a/third_party/WebKit/LayoutTests/http/tests/media/video-controls-overflow-menu-download-button.html +++ b/third_party/WebKit/LayoutTests/http/tests/media/video-controls-overflow-menu-download-button.html
@@ -16,6 +16,7 @@ var video = document.querySelector("video"); video.src = "resources/test.ogv"; video.setAttribute("width", "60"); + video.setAttribute("height", "100"); var controlID = "-internal-media-controls-download-button"; var downloadButton = mediaControlsElement(internals.shadowRoot(video).firstChild, controlID);
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/emulation/performance-return-real-time-expected.txt b/third_party/WebKit/LayoutTests/inspector-protocol/emulation/performance-return-real-time-expected.txt new file mode 100644 index 0000000..645644c --- /dev/null +++ b/third_party/WebKit/LayoutTests/inspector-protocol/emulation/performance-return-real-time-expected.txt
@@ -0,0 +1,5 @@ +Tests that perf metrics return real time even if there is a virtual time override in place. +Does real time advance? true. +Does virtual time advance? false. +Is script duration increased? true. +
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/emulation/performance-return-real-time.js b/third_party/WebKit/LayoutTests/inspector-protocol/emulation/performance-return-real-time.js new file mode 100644 index 0000000..47fcfa4c --- /dev/null +++ b/third_party/WebKit/LayoutTests/inspector-protocol/emulation/performance-return-real-time.js
@@ -0,0 +1,41 @@ +(async function(testRunner) { + let {page, session, dp} = await testRunner.startHTML(` + <script> + function f(x) { return x > 1 ? f(x-1) + x : 1; } + // Function returns true if the JavaScript time does advance during the + // computation. + function doesJavaScriptTimeAdvance() { + let event = new Event('test'); + let rv = false; + addEventListener('test', () => { + start = Date.now(); + for (let x = 0; x < 10000; x++) { f(1000); } + rv = Date.now() > start; + }, false); + dispatchEvent(event); + return rv; + } + </script> + `, 'Tests that perf metrics return real time even if there is a virtual time override in place.'); + + let v = await session.evaluate("doesJavaScriptTimeAdvance()"); + testRunner.log(`Does real time advance? ${v}.`); + + await dp.Performance.enable(); + await dp.Emulation.setVirtualTimePolicy( + {policy: 'advance', initialVirtualTime: 1234567890}); + let before = await getScriptDuration(); + v = await session.evaluate("doesJavaScriptTimeAdvance()"); + testRunner.log(`Does virtual time advance? ${v}.`); + let after = await getScriptDuration(); + testRunner.log(`Is script duration increased? ${after > before}.`); + + async function getScriptDuration() { + const {result:{metrics}} = await dp.Performance.getMetrics(); + //testRunner.log(metrics); + const metric = metrics.find(metric => metric.name === "ScriptDuration"); + return metric.value; + } + + testRunner.completeTest(); +})
diff --git a/third_party/WebKit/LayoutTests/media/video-controls-overflow-menu-closed-captions-button.html b/third_party/WebKit/LayoutTests/media/video-controls-overflow-menu-closed-captions-button.html index f1c3212..aa22213 100644 --- a/third_party/WebKit/LayoutTests/media/video-controls-overflow-menu-closed-captions-button.html +++ b/third_party/WebKit/LayoutTests/media/video-controls-overflow-menu-closed-captions-button.html
@@ -14,6 +14,7 @@ var video = document.querySelector("video"); video.src = "content/test.ogv"; video.setAttribute("width", "60"); + video.setAttribute("height", "100"); // Add two captions. video.addTextTrack("captions"); video.addTextTrack("captions");
diff --git a/third_party/WebKit/LayoutTests/media/video-controls-overflow-menu-closed-captions-list-hide-on-click-outside.html b/third_party/WebKit/LayoutTests/media/video-controls-overflow-menu-closed-captions-list-hide-on-click-outside.html index 06f75c2..593794a 100644 --- a/third_party/WebKit/LayoutTests/media/video-controls-overflow-menu-closed-captions-list-hide-on-click-outside.html +++ b/third_party/WebKit/LayoutTests/media/video-controls-overflow-menu-closed-captions-list-hide-on-click-outside.html
@@ -14,6 +14,7 @@ var video = document.querySelector("video"); video.src = "content/test.ogv"; video.setAttribute("width", "60"); + video.setAttribute("height", "100"); // Add captions var track = video.addTextTrack("captions");
diff --git a/third_party/WebKit/LayoutTests/media/video-controls-overflow-menu-fullscreen-button.html b/third_party/WebKit/LayoutTests/media/video-controls-overflow-menu-fullscreen-button.html index 9969bcfc..f9a4e86 100644 --- a/third_party/WebKit/LayoutTests/media/video-controls-overflow-menu-fullscreen-button.html +++ b/third_party/WebKit/LayoutTests/media/video-controls-overflow-menu-fullscreen-button.html
@@ -14,6 +14,7 @@ var video = document.querySelector("video"); video.src = "content/test.ogv"; video.setAttribute("width", "60"); + video.setAttribute("height", "100"); window.addEventListener("load", t.step_func(function() { var overflowList = getOverflowList(video);
diff --git a/third_party/WebKit/LayoutTests/media/video-controls-overflow-menu-mute-button.html b/third_party/WebKit/LayoutTests/media/video-controls-overflow-menu-mute-button.html index e0e2e41..5e3d1a99 100644 --- a/third_party/WebKit/LayoutTests/media/video-controls-overflow-menu-mute-button.html +++ b/third_party/WebKit/LayoutTests/media/video-controls-overflow-menu-mute-button.html
@@ -14,6 +14,7 @@ var video = document.querySelector("video"); video.src = "content/test.ogv"; video.setAttribute("width", "60"); + video.setAttribute("height", "100"); video.onloadeddata = t.step_func_done(function() { var overflowList = getOverflowList(video);
diff --git a/third_party/WebKit/LayoutTests/media/video-controls-overflow-menu-play-button.html b/third_party/WebKit/LayoutTests/media/video-controls-overflow-menu-play-button.html index 874d194..c3ee7235 100644 --- a/third_party/WebKit/LayoutTests/media/video-controls-overflow-menu-play-button.html +++ b/third_party/WebKit/LayoutTests/media/video-controls-overflow-menu-play-button.html
@@ -14,6 +14,7 @@ var video = document.querySelector("video"); video.src = "content/test.ogv"; video.setAttribute("width", "60"); + video.setAttribute("height", "100"); video.onloadeddata = t.step_func_done(function() { var overflowList = getOverflowList(video);
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/background/background-image-paint-invalidation-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/background/background-image-paint-invalidation-expected.txt index 0a25eed7..a3c063a 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/background/background-image-paint-invalidation-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/background/background-image-paint-invalidation-expected.txt
@@ -25,7 +25,7 @@ { "object": "LayoutBlockFlow HTML", "rect": [8, 8, 800, 2000], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/background/view-background-from-body-2-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/background/view-background-from-body-2-expected.txt index 2797a4e..27af9144 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/background/view-background-from-body-2-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/background/view-background-from-body-2-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutBlockFlow HTML", "rect": [50, 50, 700, 500], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/clip/resize-with-border-clipped-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/clip/resize-with-border-clipped-expected.txt index 18341271..7a541da2 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/clip/resize-with-border-clipped-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/clip/resize-with-border-clipped-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutBlockFlow (positioned) DIV id='container'", "rect": [100, 100, 200, 200], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutBlockFlow DIV id='target'",
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/compositing/compositing-reason-removed-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/compositing/compositing-reason-removed-expected.txt index 6fde455..198b6644 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/compositing/compositing-reason-removed-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/compositing/compositing-reason-removed-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutBlockFlow HTML", "rect": [8, 8, 30, 30], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/compositing/containing-block-added-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/compositing/containing-block-added-expected.txt index fa52f833..6d27dfd 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/compositing/containing-block-added-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/compositing/containing-block-added-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutBlockFlow (positioned) DIV class='fixed'", "rect": [50, 50, 75, 75], - "reason": "disappeared" + "reason": "chunk disappeared" } ] }, @@ -38,7 +38,7 @@ { "object": "LayoutBlockFlow (positioned) DIV class='fixed'", "rect": [50, 50, 75, 75], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/compositing/containing-block-added-individual-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/compositing/containing-block-added-individual-expected.txt index fa52f833..6d27dfd 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/compositing/containing-block-added-individual-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/compositing/containing-block-added-individual-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutBlockFlow (positioned) DIV class='fixed'", "rect": [50, 50, 75, 75], - "reason": "disappeared" + "reason": "chunk disappeared" } ] }, @@ -38,7 +38,7 @@ { "object": "LayoutBlockFlow (positioned) DIV class='fixed'", "rect": [50, 50, 75, 75], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/compositing/containing-block-removed-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/compositing/containing-block-removed-expected.txt index 8de49bd..8bd9687 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/compositing/containing-block-removed-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/compositing/containing-block-removed-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutBlockFlow (positioned) DIV class='fixed'", "rect": [50, 50, 75, 75], - "reason": "appeared" + "reason": "chunk appeared" } ] }, @@ -39,7 +39,7 @@ { "object": "LayoutBlockFlow (positioned) DIV class='fixed'", "rect": [50, 50, 75, 75], - "reason": "disappeared" + "reason": "chunk disappeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/compositing/containing-block-removed-individual-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/compositing/containing-block-removed-individual-expected.txt index a6a7eaf..9ae6599c 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/compositing/containing-block-removed-individual-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/compositing/containing-block-removed-individual-expected.txt
@@ -21,7 +21,7 @@ { "object": "LayoutBlockFlow (positioned) DIV class='fixed'", "rect": [50, 50, 75, 75], - "reason": "appeared" + "reason": "chunk appeared" } ] }, @@ -40,7 +40,7 @@ { "object": "LayoutBlockFlow (positioned) DIV class='fixed'", "rect": [50, 50, 75, 75], - "reason": "disappeared" + "reason": "chunk disappeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/compositing/new-stacking-context-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/compositing/new-stacking-context-expected.txt index fec0b18c..1bf2111 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/compositing/new-stacking-context-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/compositing/new-stacking-context-expected.txt
@@ -36,7 +36,7 @@ { "object": "LayoutBlockFlow DIV", "rect": [0, 0, 200, 200], - "reason": "disappeared" + "reason": "chunk disappeared" } ] },
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/compositing/pointer-events-composited-scrolling-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/compositing/pointer-events-composited-scrolling-expected.txt index ad3b4fb..a98dfa32 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/compositing/pointer-events-composited-scrolling-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/compositing/pointer-events-composited-scrolling-expected.txt
@@ -30,7 +30,7 @@ { "object": "LayoutBlockFlow DIV id='target'", "rect": [0, 30, 50, 50], - "reason": "appeared" + "reason": "chunk appeared" } ] },
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/cull-rect-change-crash-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/cull-rect-change-crash-expected.txt index 1ab94f3d..8c09ed5 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/cull-rect-change-crash-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/cull-rect-change-crash-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutSVGForeignObject foreignObject", "rect": [0, 8, 1, 1], - "reason": "disappeared" + "reason": "chunk disappeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/filters/effect-reference-repaint-lighting-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/filters/effect-reference-repaint-lighting-expected.txt index 4534bfba..f389ddd 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/filters/effect-reference-repaint-lighting-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/filters/effect-reference-repaint-lighting-expected.txt
@@ -20,12 +20,12 @@ { "object": "LayoutBlockFlow DIV class='before box'", "rect": [78, 70, 100, 100], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutBlockFlow DIV class='box'", "rect": [78, 70, 100, 100], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/filters/filter-invalidation-after-display-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/filters/filter-invalidation-after-display-expected.txt index 996884b..a725d31 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/filters/filter-invalidation-after-display-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/filters/filter-invalidation-after-display-expected.txt
@@ -20,12 +20,12 @@ { "object": "LayoutBlockFlow (positioned) DIV id='box' class='green drop-shadowed box'", "rect": [300, 8, 330, 330], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutBlockFlow HTML", "rect": [300, 8, 200, 200], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/filters/filter-invalidation-with-composited-container-change-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/filters/filter-invalidation-with-composited-container-change-expected.txt index 88a81447..298b543 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/filters/filter-invalidation-with-composited-container-change-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/filters/filter-invalidation-with-composited-container-change-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutBlockFlow DIV id='box' class='green drop-shadowed box'", "rect": [8, 8, 330, 330], - "reason": "disappeared" + "reason": "chunk disappeared" } ] },
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/flexbox/repaint-on-layout-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/flexbox/repaint-on-layout-expected.txt index ca83169..e6ba1ca 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/flexbox/repaint-on-layout-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/flexbox/repaint-on-layout-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutBlockFlow HTML", "rect": [712, 8, 80, 20], - "reason": "disappeared" + "reason": "chunk disappeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/flexbox/repaint-opacity-change-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/flexbox/repaint-opacity-change-expected.txt index 4269864..7a9afc4a 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/flexbox/repaint-opacity-change-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/flexbox/repaint-opacity-change-expected.txt
@@ -20,12 +20,12 @@ { "object": "LayoutBlockFlow DIV id='target' class='item'", "rect": [18, 18, 764, 20], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutBlockFlow HTML", "rect": [18, 18, 764, 20], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/float-in-new-block-with-layout-delta-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/float-in-new-block-with-layout-delta-expected.txt index 60870ad14..a13107e2 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/float-in-new-block-with-layout-delta-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/float-in-new-block-with-layout-delta-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutBlockFlow HTML", "rect": [8, 108, 100, 100], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/insert-frame-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/insert-frame-expected.txt index 5fd19e9..63e8f6c 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/insert-frame-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/insert-frame-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutBlockFlow HTML", "rect": [0, 0, 104, 104], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/invalidate-descendants-when-receiving-paint-layer-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/invalidate-descendants-when-receiving-paint-layer-expected.txt index 13ea705..d89ca37 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/invalidate-descendants-when-receiving-paint-layer-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/invalidate-descendants-when-receiving-paint-layer-expected.txt
@@ -25,7 +25,7 @@ { "object": "LayoutBlockFlow DIV id='target'", "rect": [9, 9, 100, 100], - "reason": "appeared" + "reason": "chunk appeared" } ] },
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/invalidate-invisible-element-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/invalidate-invisible-element-expected.txt index 14468de..8707cf9 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/invalidate-invisible-element-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/invalidate-invisible-element-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutBlockFlow HTML", "rect": [200, 300, 200, 200], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/invalidation-with-zero-size-object-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/invalidation-with-zero-size-object-expected.txt index c6ce225..7cde740 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/invalidation-with-zero-size-object-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/invalidation-with-zero-size-object-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutBlockFlow HTML", "rect": [8, 8, 200, 200], - "reason": "disappeared" + "reason": "chunk disappeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/mix-blend-mode-separate-stacking-context-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/mix-blend-mode-separate-stacking-context-expected.txt index 4609607..035ced64 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/mix-blend-mode-separate-stacking-context-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/mix-blend-mode-separate-stacking-context-expected.txt
@@ -35,12 +35,12 @@ { "object": "LayoutBlockFlow (relative positioned) (floating) DIV id='fourth'", "rect": [328, 28, 60, 60], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutBlockFlow HTML", "rect": [328, 28, 60, 60], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutBlockFlow (floating) DIV id='third'", @@ -55,7 +55,7 @@ { "object": "LayoutBlockFlow (floating) DIV id='second'", "rect": [148, 48, 60, 60], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutBlockFlow (relative positioned) (floating) DIV", @@ -65,7 +65,7 @@ { "object": "LayoutBlockFlow (floating) DIV id='first'", "rect": [48, 48, 60, 60], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutBlockFlow (relative positioned) (floating) DIV",
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/multicol/multicol-with-block-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/multicol/multicol-with-block-expected.txt index 0b031bce..195483f8 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/multicol/multicol-with-block-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/multicol/multicol-with-block-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutMultiColumnFlowThread (anonymous)", "rect": [488, 8, 80, 20], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/multicol/multicol-with-inline-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/multicol/multicol-with-inline-expected.txt index 0de7eec..f2afc38 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/multicol/multicol-with-inline-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/multicol/multicol-with-inline-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutMultiColumnFlowThread (anonymous)", "rect": [483, 8, 85, 80], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/multicol/multicol-with-text-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/multicol/multicol-with-text-expected.txt index 09f29e92..bb60464 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/multicol/multicol-with-text-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/multicol/multicol-with-text-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutMultiColumnFlowThread (anonymous)", "rect": [483, 8, 85, 80], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/opacity-from-zero-to-non-zero-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/opacity-from-zero-to-non-zero-expected.txt index 4bd0fc5f..d55fc348 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/opacity-from-zero-to-non-zero-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/opacity-from-zero-to-non-zero-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutBlockFlow DIV id='target'", "rect": [8, 8, 100, 100], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/overflow/erase-overflow-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/overflow/erase-overflow-expected.txt index d9e4cdbf..5c43938 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/overflow/erase-overflow-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/overflow/erase-overflow-expected.txt
@@ -20,12 +20,12 @@ { "object": "LayoutBlockFlow HTML", "rect": [8, 8, 100, 200], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutBlockFlow DIV id='target' class='square'", "rect": [8, 8, 100, 100], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/overflow/fixed-position-transparency-with-overflow-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/overflow/fixed-position-transparency-with-overflow-expected.txt index e34a6ff7..98f1a7f60 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/overflow/fixed-position-transparency-with-overflow-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/overflow/fixed-position-transparency-with-overflow-expected.txt
@@ -20,12 +20,12 @@ { "object": "LayoutBlockFlow (relative positioned) DIV id='container' class='relative blue'", "rect": [8, 208, 200, 200], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutBlockFlow HTML", "rect": [8, 208, 200, 200], - "reason": "disappeared" + "reason": "chunk disappeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/overflow/overflow-changed-on-child-of-composited-layer-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/overflow/overflow-changed-on-child-of-composited-layer-expected.txt index fe0836a..6a19777 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/overflow/overflow-changed-on-child-of-composited-layer-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/overflow/overflow-changed-on-child-of-composited-layer-expected.txt
@@ -29,7 +29,7 @@ { "object": "LayoutBlockFlow DIV id='parent'", "rect": [0, 0, 102, 102], - "reason": "appeared" + "reason": "chunk appeared" } ], "transform": 1
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/overflow/vertical-overflow-child-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/overflow/vertical-overflow-child-expected.txt index 7e30485..f9ec626 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/overflow/vertical-overflow-child-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/overflow/vertical-overflow-child-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutBlockFlow DIV class='container'", "rect": [214, 21, 100, 100], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/overflow/vertical-overflow-parent-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/overflow/vertical-overflow-parent-expected.txt index 72814bd..590f92c 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/overflow/vertical-overflow-parent-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/overflow/vertical-overflow-parent-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutBlockFlow DIV class='container'", "rect": [29, 29, 100, 100], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/overflow/vertical-overflow-same-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/overflow/vertical-overflow-same-expected.txt index 516e5a7..5b19dc73 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/overflow/vertical-overflow-same-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/overflow/vertical-overflow-same-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutBlockFlow DIV class='vertical-rl container'", "rect": [29, 21, 100, 100], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/paint-invalidation-with-opacity-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/paint-invalidation-with-opacity-expected.txt index ec494572..ede8268 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/paint-invalidation-with-opacity-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/paint-invalidation-with-opacity-expected.txt
@@ -20,12 +20,12 @@ { "object": "LayoutBlockFlow DIV id='target'", "rect": [8, 8, 100, 100], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutBlockFlow HTML", "rect": [8, 8, 100, 100], - "reason": "disappeared" + "reason": "chunk disappeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/position/absolute-position-change-containing-block-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/position/absolute-position-change-containing-block-expected.txt index 6166fa7..9359ac9c 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/position/absolute-position-change-containing-block-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/position/absolute-position-change-containing-block-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutBlockFlow HTML", "rect": [8, 8, 192, 192], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/position/absolute-position-moved-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/position/absolute-position-moved-expected.txt index fd7a317..4dc5c6c 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/position/absolute-position-moved-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/position/absolute-position-moved-expected.txt
@@ -25,7 +25,7 @@ { "object": "LayoutBlockFlow (positioned) DIV id='absoluteDiv' class='absolute green'", "rect": [100, 100, 100, 100], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/position/fixed-to-relative-position-with-absolute-child-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/position/fixed-to-relative-position-with-absolute-child-expected.txt index 6b18ec3..46d1e7a 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/position/fixed-to-relative-position-with-absolute-child-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/position/fixed-to-relative-position-with-absolute-child-expected.txt
@@ -20,12 +20,12 @@ { "object": "LayoutBlockFlow HTML", "rect": [8, 208, 200, 200], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutBlockFlow (positioned) DIV id='container' class='fixed blue'", "rect": [8, 200, 200, 200], - "reason": "disappeared" + "reason": "chunk disappeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/position/layout-state-only-positioned-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/position/layout-state-only-positioned-expected.txt index 494925f..c37c7420 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/position/layout-state-only-positioned-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/position/layout-state-only-positioned-expected.txt
@@ -20,12 +20,12 @@ { "object": "LayoutBlockFlow (positioned) DIV", "rect": [0, 50, 106, 106], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutBlockFlow HTML", "rect": [0, 50, 106, 106], - "reason": "disappeared" + "reason": "chunk disappeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/reflection/reflection-invalidation-after-display-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/reflection/reflection-invalidation-after-display-expected.txt index 1e04dea..992d0e0 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/reflection/reflection-invalidation-after-display-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/reflection/reflection-invalidation-after-display-expected.txt
@@ -20,12 +20,12 @@ { "object": "LayoutBlockFlow (positioned) DIV id='box' class='green reflected box'", "rect": [300, 8, 450, 200], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutBlockFlow HTML", "rect": [300, 8, 200, 200], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/scroll/destroy-overlay-scrollbar-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/scroll/destroy-overlay-scrollbar-expected.txt index 7687112..b6fe3c7 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/scroll/destroy-overlay-scrollbar-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/scroll/destroy-overlay-scrollbar-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutBlockFlow (positioned) DIV", "rect": [193, 100, 7, 200], - "reason": "disappeared" + "reason": "chunk disappeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/scroll/destroy-scrollbar-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/scroll/destroy-scrollbar-expected.txt index d91ea50..04383306 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/scroll/destroy-scrollbar-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/scroll/destroy-scrollbar-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutBlockFlow (positioned) DIV", "rect": [185, 100, 15, 200], - "reason": "disappeared" + "reason": "chunk disappeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/scroll/fixed-and-absolute-position-scrolled-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/scroll/fixed-and-absolute-position-scrolled-expected.txt index 4b8190f7..6ed35a77 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/scroll/fixed-and-absolute-position-scrolled-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/scroll/fixed-and-absolute-position-scrolled-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutBlockFlow (positioned) DIV id='absoluteDiv' class='absolute green'", "rect": [100, 700, 100, 100], - "reason": "appeared" + "reason": "chunk appeared" } ], "transform": 1
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/scroll/fixed-under-composited-fixed-scrolled-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/scroll/fixed-under-composited-fixed-scrolled-expected.txt index 363eb18..b312d0f 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/scroll/fixed-under-composited-fixed-scrolled-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/scroll/fixed-under-composited-fixed-scrolled-expected.txt
@@ -29,7 +29,7 @@ { "object": "LayoutBlockFlow (positioned) DIV id='fixed'", "rect": [100, 100, 200, 200], - "reason": "disappeared" + "reason": "chunk disappeared" } ], "transform": 1
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/scroll/overflow-hidden-in-overflow-hidden-scrolled-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/scroll/overflow-hidden-in-overflow-hidden-scrolled-expected.txt index 892b20f8..c971603 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/scroll/overflow-hidden-in-overflow-hidden-scrolled-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/scroll/overflow-hidden-in-overflow-hidden-scrolled-expected.txt
@@ -20,12 +20,12 @@ { "object": "LayoutBlockFlow DIV class='innerWrapper'", "rect": [8, 18, 100, 190], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutBlockFlow DIV class='innerWrapper'", "rect": [8, 18, 100, 190], - "reason": "disappeared" + "reason": "chunk disappeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/scroll/overflow-hidden-yet-scrolled-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/scroll/overflow-hidden-yet-scrolled-expected.txt index 6008b215..33e32fc 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/scroll/overflow-hidden-yet-scrolled-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/scroll/overflow-hidden-yet-scrolled-expected.txt
@@ -31,7 +31,7 @@ { "object": "LayoutBlockFlow DIV id='scroller'", "rect": [1, 201, 100, 100], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/scroll/overflow-hidden-yet-scrolled-with-custom-scrollbar-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/scroll/overflow-hidden-yet-scrolled-with-custom-scrollbar-expected.txt index 347e983..88e6b62 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/scroll/overflow-hidden-yet-scrolled-with-custom-scrollbar-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/scroll/overflow-hidden-yet-scrolled-with-custom-scrollbar-expected.txt
@@ -31,7 +31,7 @@ { "object": "LayoutBlockFlow DIV id='target'", "rect": [1, 201, 100, 100], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/scroll/scroll-fixed-layer-with-no-visible-content-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/scroll/scroll-fixed-layer-with-no-visible-content-expected.txt index 7cbe20dc..66187c02 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/scroll/scroll-fixed-layer-with-no-visible-content-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/scroll/scroll-fixed-layer-with-no-visible-content-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutBlockFlow (positioned) DIV class='absolute green'", "rect": [100, 1150, 100, 100], - "reason": "appeared" + "reason": "chunk appeared" } ], "transform": 1
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/scroll/scroll-fixed-layer-with-transformed-parent-layer-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/scroll/scroll-fixed-layer-with-transformed-parent-layer-expected.txt index 6bfd056..958284e 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/scroll/scroll-fixed-layer-with-transformed-parent-layer-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/scroll/scroll-fixed-layer-with-transformed-parent-layer-expected.txt
@@ -20,12 +20,12 @@ { "object": "LayoutBlockFlow (positioned) DIV class='absolute green'", "rect": [93, 234, 142, 143], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutBlockFlow (positioned) DIV class='absolute red'", "rect": [93, 234, 142, 143], - "reason": "disappeared" + "reason": "chunk disappeared" } ], "transform": 1
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/scroll/scroll-in-clipped-layer-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/scroll/scroll-in-clipped-layer-expected.txt index a8554f6..511b1aa 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/scroll/scroll-in-clipped-layer-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/scroll/scroll-in-clipped-layer-expected.txt
@@ -20,12 +20,12 @@ { "object": "LayoutBlockFlow (positioned) DIV class='absolute red'", "rect": [100, 150, 100, 100], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutBlockFlow (relative positioned) DIV class='relative green'", "rect": [100, 150, 100, 100], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/scroll/scroll-in-fixed-layer-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/scroll/scroll-in-fixed-layer-expected.txt index 5c8000c..63c5448 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/scroll/scroll-in-fixed-layer-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/scroll/scroll-in-fixed-layer-expected.txt
@@ -20,12 +20,12 @@ { "object": "LayoutBlockFlow (positioned) DIV class='absolute green'", "rect": [100, 1150, 100, 100], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutBlockFlow (positioned) DIV class='absolute red'", "rect": [100, 1150, 100, 100], - "reason": "disappeared" + "reason": "chunk disappeared" } ], "transform": 1
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/scroll/scroll-in-transformed-layer-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/scroll/scroll-in-transformed-layer-expected.txt index f60b4f2..7dc14b5 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/scroll/scroll-in-transformed-layer-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/scroll/scroll-in-transformed-layer-expected.txt
@@ -20,12 +20,12 @@ { "object": "LayoutBlockFlow (positioned) DIV class='absolute green'", "rect": [79, 129, 142, 142], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutBlockFlow (positioned) DIV class='absolute red'", "rect": [100, 150, 100, 100], - "reason": "disappeared" + "reason": "chunk disappeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/scroll/scroll-with-transformed-parent-layer-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/scroll/scroll-with-transformed-parent-layer-expected.txt index 7cbe9ee..2b950e5f 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/scroll/scroll-with-transformed-parent-layer-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/scroll/scroll-with-transformed-parent-layer-expected.txt
@@ -20,12 +20,12 @@ { "object": "LayoutBlockFlow (positioned) DIV class='absolute green'", "rect": [79, 129, 142, 142], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutBlockFlow (positioned) DIV class='absolute red'", "rect": [79, 129, 142, 142], - "reason": "disappeared" + "reason": "chunk disappeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/svg/absolute-sized-document-no-scrollbars-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/svg/absolute-sized-document-no-scrollbars-expected.txt index 6491007..cb50729a 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/svg/absolute-sized-document-no-scrollbars-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/svg/absolute-sized-document-no-scrollbars-expected.txt
@@ -25,12 +25,12 @@ { "object": "LayoutSVGRoot svg", "rect": [0, 0, 577, 433], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGRoot svg", "rect": [0, 0, 481, 361], - "reason": "disappeared" + "reason": "chunk disappeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/svg/add-background-property-on-root-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/svg/add-background-property-on-root-expected.txt index 28b9b68..d1be5f9 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/svg/add-background-property-on-root-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/svg/add-background-property-on-root-expected.txt
@@ -25,7 +25,7 @@ { "object": "LayoutSVGRoot svg", "rect": [8, 8, 100, 100], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/svg/add-border-property-on-root-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/svg/add-border-property-on-root-expected.txt index c18eafa6..1d1b968 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/svg/add-border-property-on-root-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/svg/add-border-property-on-root-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutSVGRoot (positioned) svg", "rect": [8, 8, 120, 120], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/svg/add-outline-property-on-root-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/svg/add-outline-property-on-root-expected.txt index 207c36f..eabfd48 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/svg/add-outline-property-on-root-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/svg/add-outline-property-on-root-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutSVGRoot svg", "rect": [0, 0, 118, 118], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/svg/clip-path-href-changes-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/svg/clip-path-href-changes-expected.txt index c91e60a3..a51bb5c 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/svg/clip-path-href-changes-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/svg/clip-path-href-changes-expected.txt
@@ -20,12 +20,12 @@ { "object": "LayoutSVGRoot svg", "rect": [0, 0, 200, 200], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGContainer g", "rect": [0, 0, 100, 100], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/svg/clip-path-id-changes-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/svg/clip-path-id-changes-expected.txt index 3a04368..5447e49 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/svg/clip-path-id-changes-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/svg/clip-path-id-changes-expected.txt
@@ -20,12 +20,12 @@ { "object": "LayoutSVGRoot svg", "rect": [0, 0, 200, 200], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGContainer g", "rect": [0, 0, 100, 100], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/svg/embedded-svg-size-changes-no-layout-triggers-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/svg/embedded-svg-size-changes-no-layout-triggers-expected.txt index c3329d3..291439f3 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/svg/embedded-svg-size-changes-no-layout-triggers-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/svg/embedded-svg-size-changes-no-layout-triggers-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutBlockFlow HTML", "rect": [0, 0, 402, 202], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGRect rect",
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/svg/hairline-stroke-squarecap-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/svg/hairline-stroke-squarecap-expected.txt index 18fe826..099fe65 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/svg/hairline-stroke-squarecap-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/svg/hairline-stroke-squarecap-expected.txt
@@ -20,12 +20,12 @@ { "object": "LayoutSVGPath path id='path'", "rect": [197, 197, 107, 107], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGRoot svg", "rect": [97, 97, 106, 106], - "reason": "disappeared" + "reason": "chunk disappeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/svg/image-with-clip-path-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/svg/image-with-clip-path-expected.txt index 033f935..131e182 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/svg/image-with-clip-path-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/svg/image-with-clip-path-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutSVGImage image", "rect": [20, 20, 60, 60], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGImage image",
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/svg/js-late-marker-and-object-creation-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/svg/js-late-marker-and-object-creation-expected.txt index 6131ba3..fa7601d 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/svg/js-late-marker-and-object-creation-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/svg/js-late-marker-and-object-creation-expected.txt
@@ -25,7 +25,7 @@ { "object": "LayoutSVGRoot svg id='svg-root'", "rect": [189, 197, 139, 139], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/svg/js-late-mask-and-object-creation-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/svg/js-late-mask-and-object-creation-expected.txt index 3bad3f8..208c8a7e 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/svg/js-late-mask-and-object-creation-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/svg/js-late-mask-and-object-creation-expected.txt
@@ -20,22 +20,22 @@ { "object": "LayoutSVGRect rect", "rect": [0, 100, 800, 100], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGRect rect", "rect": [0, 100, 800, 100], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGRoot svg id='svg-root'", "rect": [0, 100, 800, 100], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGRoot svg id='svg-root'", "rect": [0, 100, 800, 100], - "reason": "disappeared" + "reason": "chunk disappeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/svg/js-late-mask-creation-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/svg/js-late-mask-creation-expected.txt index 4105ab3c..411372b7 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/svg/js-late-mask-creation-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/svg/js-late-mask-creation-expected.txt
@@ -20,17 +20,17 @@ { "object": "LayoutSVGRect rect", "rect": [0, 100, 800, 100], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGRect rect", "rect": [0, 100, 800, 100], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGRoot svg id='svg-root'", "rect": [0, 100, 800, 100], - "reason": "disappeared" + "reason": "chunk disappeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/svg/js-repaint-rect-on-path-with-stroke-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/svg/js-repaint-rect-on-path-with-stroke-expected.txt index ecad79a..ee5e8c2 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/svg/js-repaint-rect-on-path-with-stroke-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/svg/js-repaint-rect-on-path-with-stroke-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutSVGPath path id='path'", "rect": [29, 29, 142, 92], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGPath path id='path'",
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/svg/js-update-bounce-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/svg/js-update-bounce-expected.txt index 251f266..3dfc0745 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/svg/js-update-bounce-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/svg/js-update-bounce-expected.txt
@@ -20,12 +20,12 @@ { "object": "LayoutSVGEllipse circle id='bounce'", "rect": [101, 101, 68, 68], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGRoot svg", "rect": [1, 1, 68, 68], - "reason": "disappeared" + "reason": "chunk disappeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/svg/js-update-container-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/svg/js-update-container-expected.txt index a606aaef..ac71ebce 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/svg/js-update-container-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/svg/js-update-container-expected.txt
@@ -20,12 +20,12 @@ { "object": "LayoutSVGRoot svg", "rect": [0, 0, 76, 76], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGContainer g id='group'", "rect": [0, 0, 41, 41], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/svg/js-update-image-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/svg/js-update-image-expected.txt index dc5b460..e245f02 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/svg/js-update-image-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/svg/js-update-image-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutSVGRoot svg", "rect": [0, 0, 75, 75], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/svg/js-update-transform-addition-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/svg/js-update-transform-addition-expected.txt index 65ead2f..7335daa 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/svg/js-update-transform-addition-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/svg/js-update-transform-addition-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutSVGRoot svg", "rect": [253, 208, 184, 129], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/svg/js-update-transform-changes-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/svg/js-update-transform-changes-expected.txt index 65ead2f..7335daa 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/svg/js-update-transform-changes-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/svg/js-update-transform-changes-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutSVGRoot svg", "rect": [253, 208, 184, 129], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/svg/mask-clip-target-transform-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/svg/mask-clip-target-transform-expected.txt index 5ce4622c..1e80439b 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/svg/mask-clip-target-transform-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/svg/mask-clip-target-transform-expected.txt
@@ -25,17 +25,17 @@ { "object": "LayoutSVGRect rect id='masker'", "rect": [150, 50, 100, 100], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGRect rect id='clipper'", "rect": [50, 150, 100, 100], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer g", "rect": [150, 50, 100, 50], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGContainer g", @@ -45,7 +45,7 @@ { "object": "LayoutSVGContainer g", "rect": [100, 150, 50, 100], - "reason": "disappeared" + "reason": "chunk disappeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/svg/mask-invalidation-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/svg/mask-invalidation-expected.txt index e6aa39b6..5c613ca 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/svg/mask-invalidation-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/svg/mask-invalidation-expected.txt
@@ -20,22 +20,22 @@ { "object": "LayoutSVGRect rect", "rect": [50, 50, 453, 299], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGRect rect", "rect": [50, 50, 453, 299], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGRect rect", "rect": [100, 100, 403, 249], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGRect rect", "rect": [100, 100, 403, 249], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/svg/modify-inserted-listitem-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/svg/modify-inserted-listitem-expected.txt index cc865919..bb14bfe5 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/svg/modify-inserted-listitem-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/svg/modify-inserted-listitem-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutSVGRect rect id='move'", "rect": [28, 38, 10, 10], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGRect rect id='move'",
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/svg/nested-embedded-svg-size-changes-no-layout-triggers-1-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/svg/nested-embedded-svg-size-changes-no-layout-triggers-1-expected.txt index c660d4b..89a50bd7 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/svg/nested-embedded-svg-size-changes-no-layout-triggers-1-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/svg/nested-embedded-svg-size-changes-no-layout-triggers-1-expected.txt
@@ -20,12 +20,12 @@ { "object": "LayoutBlockFlow HTML", "rect": [0, 0, 402, 202], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutView #document", "rect": [0, 0, 300, 150], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGRect rect",
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/svg/nested-embedded-svg-size-changes-no-layout-triggers-2-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/svg/nested-embedded-svg-size-changes-no-layout-triggers-2-expected.txt index c660d4b..89a50bd7 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/svg/nested-embedded-svg-size-changes-no-layout-triggers-2-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/svg/nested-embedded-svg-size-changes-no-layout-triggers-2-expected.txt
@@ -20,12 +20,12 @@ { "object": "LayoutBlockFlow HTML", "rect": [0, 0, 402, 202], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutView #document", "rect": [0, 0, 300, 150], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGRect rect",
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/svg/overflow-repaint-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/svg/overflow-repaint-expected.txt index e041271..100de931 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/svg/overflow-repaint-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/svg/overflow-repaint-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutSVGRoot svg id='svg'", "rect": [8, 108, 100, 100], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/svg/relative-sized-document-scrollbars-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/svg/relative-sized-document-scrollbars-expected.txt index 47915326..5a8bcc54 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/svg/relative-sized-document-scrollbars-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/svg/relative-sized-document-scrollbars-expected.txt
@@ -25,12 +25,12 @@ { "object": "LayoutSVGRoot svg", "rect": [6, 2, 788, 595], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGRoot svg", "rect": [6, 4, 788, 592], - "reason": "disappeared" + "reason": "chunk disappeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/svg/remove-background-property-on-root-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/svg/remove-background-property-on-root-expected.txt index 9d6f5c3..6bbc541 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/svg/remove-background-property-on-root-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/svg/remove-background-property-on-root-expected.txt
@@ -25,7 +25,7 @@ { "object": "LayoutSVGRoot svg", "rect": [8, 8, 100, 100], - "reason": "disappeared" + "reason": "chunk disappeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/svg/remove-border-property-on-root-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/svg/remove-border-property-on-root-expected.txt index 5529a70..65082cc 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/svg/remove-border-property-on-root-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/svg/remove-border-property-on-root-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutSVGRoot (positioned) svg", "rect": [8, 8, 120, 120], - "reason": "disappeared" + "reason": "chunk disappeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/svg/remove-outline-property-on-root-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/svg/remove-outline-property-on-root-expected.txt index 061c8017..3bf8527 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/svg/remove-outline-property-on-root-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/svg/remove-outline-property-on-root-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutSVGRoot svg", "rect": [0, 0, 118, 118], - "reason": "disappeared" + "reason": "chunk disappeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/svg/resize-svg-invalidate-children-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/svg/resize-svg-invalidate-children-expected.txt index f289398..2badce7 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/svg/resize-svg-invalidate-children-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/svg/resize-svg-invalidate-children-expected.txt
@@ -20,12 +20,12 @@ { "object": "LayoutSVGRoot svg", "rect": [58, 58, 100, 100], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGRoot svg", "rect": [33, 33, 50, 50], - "reason": "disappeared" + "reason": "chunk disappeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/svg/shape-transform-change-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/svg/shape-transform-change-expected.txt index 920d9c67..b3fd00c 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/svg/shape-transform-change-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/svg/shape-transform-change-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutSVGRect rect", "rect": [8, 8, 200, 200], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGRect rect",
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/svg/transform-text-element-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/svg/transform-text-element-expected.txt index 67758d0..c07a4a7 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/svg/transform-text-element-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/svg/transform-text-element-expected.txt
@@ -20,12 +20,12 @@ { "object": "LayoutSVGText text", "rect": [8, 58, 400, 100], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGRoot svg", "rect": [8, 8, 400, 100], - "reason": "disappeared" + "reason": "chunk disappeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/svg/use-detach-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/svg/use-detach-expected.txt index 34a8b774..ea61ff8 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/svg/use-detach-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/svg/use-detach-expected.txt
@@ -20,17 +20,17 @@ { "object": "LayoutSVGContainer g", "rect": [209, 57, 46, 66], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer g", "rect": [209, 57, 46, 66], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer g", "rect": [209, 57, 46, 66], - "reason": "disappeared" + "reason": "chunk disappeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/svg/use-setAttribute-crash-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/svg/use-setAttribute-crash-expected.txt index 758fbc97..5ea416b6 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/svg/use-setAttribute-crash-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/svg/use-setAttribute-crash-expected.txt
@@ -20,12 +20,12 @@ { "object": "LayoutSVGEllipse svg:circle id='circle'", "rect": [27, 27, 62, 62], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGEllipse svg:circle id='circle'", "rect": [51, 51, 14, 14], - "reason": "disappeared" + "reason": "chunk disappeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/table/fixed-table-cell-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/table/fixed-table-cell-expected.txt index f8f12df1..8ea963e 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/table/fixed-table-cell-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/table/fixed-table-cell-expected.txt
@@ -25,7 +25,7 @@ { "object": "LayoutBlockFlow (positioned) TD id='moveMe' class='fixed'", "rect": [50, 200, 100, 100], - "reason": "appeared" + "reason": "chunk appeared" } ], "transform": 1
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/table/fixed-table-overflow-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/table/fixed-table-overflow-expected.txt index c6a65580..e390417 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/table/fixed-table-overflow-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/table/fixed-table-overflow-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutBlockFlow (positioned) TD id='moveMe' class='fixed'", "rect": [0, 100, 200, 100], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutTableCell TD id='moveMe'",
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/table/fixed-table-overflow-zindex-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/table/fixed-table-overflow-zindex-expected.txt index 6d74902b..5ad911e 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/table/fixed-table-overflow-zindex-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/table/fixed-table-overflow-zindex-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutBlockFlow (positioned) TD id='moveMe' class='fixed'", "rect": [100, 100, 100, 100], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutTableCell TD id='moveMe'",
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/transform/change-transform-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/transform/change-transform-expected.txt index 41fc1c53..1c12b28c 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/transform/change-transform-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/transform/change-transform-expected.txt
@@ -25,17 +25,17 @@ { "object": "LayoutBlockFlow (positioned) DIV id='overlay'", "rect": [35, 35, 50, 50], - "reason": "appeared" + "reason": "disappeared" }, { "object": "LayoutBlockFlow (positioned) DIV id='overlay'", "rect": [35, 35, 50, 50], - "reason": "disappeared" + "reason": "chunk appeared" }, { "object": "LayoutBlockFlow DIV id='square'", "rect": [35, 35, 50, 50], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/transform/transform-rotate-and-remove-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/transform/transform-rotate-and-remove-expected.txt index 234f24d..ab8ad4ca 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/transform/transform-rotate-and-remove-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/transform/transform-rotate-and-remove-expected.txt
@@ -20,12 +20,12 @@ { "object": "LayoutBlockFlow HTML", "rect": [8, 8, 220, 70], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutBlockFlow DIV id='rel' class='rotated'", "rect": [20, 0, 196, 150], - "reason": "disappeared" + "reason": "chunk disappeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/linux/compositing/video/video-controls-layer-creation-expected.png b/third_party/WebKit/LayoutTests/platform/linux/compositing/video/video-controls-layer-creation-expected.png index 8c773c4..22694d89a 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/compositing/video/video-controls-layer-creation-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/compositing/video/video-controls-layer-creation-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/overflow/overflow-of-video-outline-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/overflow/overflow-of-video-outline-expected.png index 7d390287..0e2a0fb 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/overflow/overflow-of-video-outline-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/overflow/overflow-of-video-outline-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/http/tests/media/video-buffered-range-contains-currentTime-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/http/tests/media/video-buffered-range-contains-currentTime-expected.txt index 80b30a9..5942709d 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/http/tests/media/video-buffered-range-contains-currentTime-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/http/tests/media/video-buffered-range-contains-currentTime-expected.txt
@@ -13,8 +13,6 @@ layer at (8,104) size 300x54 scrollHeight 55 LayoutFlexibleBox {DIV} at (0,0) size 300x54 LayoutButton {INPUT} at (10,11) size 32x32 - LayoutSlider {INPUT} at (115,-1) size 111x56 [color=#9D968E] - LayoutFlexibleBox {DIV} at (16,26) size 79x4 LayoutButton {INPUT} at (226,11) size 32x32 LayoutButton {INPUT} at (258,11) size 32x32 layer at (55,123) size 28x16 transparent @@ -25,6 +23,9 @@ LayoutBlockFlow {DIV} at (79,19) size 36x16 LayoutText {#text} at (0,0) size 36x16 text run at (0,0) width 36: "/ 0:07" +layer at (123,103) size 111x56 backgroundClip at (8,104) size 300x54 clip at (8,104) size 300x54 + LayoutSlider {INPUT} at (115,-1) size 111x56 [color=#9D968E] + LayoutFlexibleBox {DIV} at (16,26) size 79x4 layer at (139,129) size 79x4 LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 79x4 [bgcolor=#00000033] layer at (206,125) size 12x12
diff --git a/third_party/WebKit/LayoutTests/platform/linux/media/controls-after-reload-expected.png b/third_party/WebKit/LayoutTests/platform/linux/media/controls-after-reload-expected.png index ec7b114..31308ae1 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/media/controls-after-reload-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/media/controls-after-reload-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/media/controls-after-reload-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/media/controls-after-reload-expected.txt index ef908778..ddb5efa 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/media/controls-after-reload-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/media/controls-after-reload-expected.txt
@@ -16,30 +16,31 @@ LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,44) size 320x240 LayoutFlexibleBox {DIV} at (0,0) size 320x240 - LayoutSlider {INPUT} at (0,214) size 320x26 [color=#9D968E] - LayoutFlexibleBox {DIV} at (16,5) size 288x4 -layer at (8,44) size 320x222 clip at (10,46) size 316x218 - LayoutButton (relative positioned) {INPUT} at (0,0) size 320x222 [border: (2px outset #C0C0C0)] - LayoutFlexibleBox (anonymous) at (8,83) size 304x56 +layer at (8,44) size 320x221 clip at (10,46) size 316x217 + LayoutButton (relative positioned) {INPUT} at (0,0) size 320x221 [border: (2px outset #C0C0C0)] + LayoutFlexibleBox (anonymous) at (8,82.50) size 304x56 LayoutBlockFlow {DIV} at (124,0) size 56x56 [bgcolor=#FFFFFFE6] -layer at (8,226) size 320x32 - LayoutFlexibleBox (relative positioned) {DIV} at (0,182) size 320x32 - LayoutBlockFlow {DIV} at (16,2) size 28x30 [color=#FFFFFF] +layer at (8,204) size 320x48 + LayoutFlexibleBox (relative positioned) {DIV} at (0,160) size 320x48 + LayoutBlockFlow {DIV} at (16,18) size 28x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 28x16 text run at (0,7) width 28: "0:00" - LayoutBlockFlow {DIV} at (48,2) size 36x30 [color=#FFFFFF] + LayoutBlockFlow {DIV} at (48,18) size 36x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 36x16 text run at (0,7) width 36: "/ 0:06" - LayoutBlockFlow {DIV} at (84,32) size 162x0 - LayoutButton {INPUT} at (246,0) size 32x32 - LayoutButton {INPUT} at (278,0) size 32x32 -layer at (24,263) size 288x4 + LayoutBlockFlow {DIV} at (84,48) size 130x0 + LayoutButton {INPUT} at (214,0) size 48x48 + LayoutButton {INPUT} at (262,0) size 48x48 +layer at (8,252) size 320x32 + LayoutSlider {INPUT} at (0,208) size 320x32 [color=#9D968E] + LayoutFlexibleBox {DIV} at (16,16) size 288x4 +layer at (24,268) size 288x4 LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF4D] -layer at (24,259) size 12x12 +layer at (24,264) size 12x12 LayoutBlockFlow (relative positioned) {DIV} at (0,-4) size 12x12 [bgcolor=#FFFFFF] -layer at (24,263) size 288x4 +layer at (24,268) size 288x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 -layer at (24,263) size 0x4 +layer at (24,268) size 0x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF] -layer at (24,263) size 288x4 +layer at (24,268) size 288x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF8A]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/media/controls-layout-direction-expected.png b/third_party/WebKit/LayoutTests/platform/linux/media/controls-layout-direction-expected.png index 9ee479bb..59a1c4d 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/media/controls-layout-direction-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/media/controls-layout-direction-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/media/controls-strict-expected.png b/third_party/WebKit/LayoutTests/platform/linux/media/controls-strict-expected.png index 68d37c64..8987903 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/media/controls-strict-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/media/controls-strict-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/media/controls-strict-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/media/controls-strict-expected.txt index f5d434a4..77d31bf 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/media/controls-strict-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/media/controls-strict-expected.txt
@@ -16,30 +16,31 @@ LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,52) size 320x240 LayoutFlexibleBox {DIV} at (0,0) size 320x240 - LayoutSlider {INPUT} at (0,214) size 320x26 [color=#9D968E] - LayoutFlexibleBox {DIV} at (16,5) size 288x4 -layer at (8,52) size 320x222 clip at (10,54) size 316x218 - LayoutButton (relative positioned) {INPUT} at (0,0) size 320x222 [border: (2px outset #C0C0C0)] - LayoutFlexibleBox (anonymous) at (8,83) size 304x56 +layer at (8,52) size 320x221 clip at (10,54) size 316x217 + LayoutButton (relative positioned) {INPUT} at (0,0) size 320x221 [border: (2px outset #C0C0C0)] + LayoutFlexibleBox (anonymous) at (8,82.50) size 304x56 LayoutBlockFlow {DIV} at (124,0) size 56x56 [bgcolor=#FFFFFFE6] -layer at (8,234) size 320x32 - LayoutFlexibleBox (relative positioned) {DIV} at (0,182) size 320x32 - LayoutBlockFlow {DIV} at (16,2) size 28x30 [color=#FFFFFF] +layer at (8,212) size 320x48 + LayoutFlexibleBox (relative positioned) {DIV} at (0,160) size 320x48 + LayoutBlockFlow {DIV} at (16,18) size 28x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 28x16 text run at (0,7) width 28: "0:00" - LayoutBlockFlow {DIV} at (48,2) size 36x30 [color=#FFFFFF] + LayoutBlockFlow {DIV} at (48,18) size 36x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 36x16 text run at (0,7) width 36: "/ 0:06" - LayoutBlockFlow {DIV} at (84,32) size 162x0 - LayoutButton {INPUT} at (246,0) size 32x32 - LayoutButton {INPUT} at (278,0) size 32x32 -layer at (24,271) size 288x4 + LayoutBlockFlow {DIV} at (84,48) size 130x0 + LayoutButton {INPUT} at (214,0) size 48x48 + LayoutButton {INPUT} at (262,0) size 48x48 +layer at (8,260) size 320x32 + LayoutSlider {INPUT} at (0,208) size 320x32 [color=#9D968E] + LayoutFlexibleBox {DIV} at (16,16) size 288x4 +layer at (24,276) size 288x4 LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF4D] -layer at (24,267) size 12x12 +layer at (24,272) size 12x12 LayoutBlockFlow (relative positioned) {DIV} at (0,-4) size 12x12 [bgcolor=#FFFFFF] -layer at (24,271) size 288x4 +layer at (24,276) size 288x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 -layer at (24,271) size 0x4 +layer at (24,276) size 0x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF] -layer at (24,271) size 288x4 +layer at (24,276) size 288x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF8A]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/media/controls-styling-expected.png b/third_party/WebKit/LayoutTests/platform/linux/media/controls-styling-expected.png index 022681b..7f7412a 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/media/controls-styling-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/media/controls-styling-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/media/controls-styling-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/media/controls-styling-expected.txt index 425177c..5e38d85a 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/media/controls-styling-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/media/controls-styling-expected.txt
@@ -20,32 +20,33 @@ LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (18,44) size 320x240 LayoutFlexibleBox {DIV} at (0,0) size 320x240 - LayoutSlider {INPUT} at (0,214) size 320x26 [color=#9D968E] - LayoutFlexibleBox {DIV} at (16,5) size 288x4 -layer at (18,44) size 320x222 clip at (20,46) size 316x218 - LayoutButton (relative positioned) {INPUT} at (0,0) size 320x222 [border: (2px outset #C0C0C0)] - LayoutFlexibleBox (anonymous) at (8,83) size 304x56 +layer at (18,44) size 320x221 clip at (20,46) size 316x217 + LayoutButton (relative positioned) {INPUT} at (0,0) size 320x221 [border: (2px outset #C0C0C0)] + LayoutFlexibleBox (anonymous) at (8,82.50) size 304x56 LayoutBlockFlow {DIV} at (124,0) size 56x56 [bgcolor=#FFFFFFE6] -layer at (18,226) size 320x32 - LayoutFlexibleBox (relative positioned) {DIV} at (0,182) size 320x32 - LayoutBlockFlow {DIV} at (16,2) size 28x30 [color=#FFFFFF] +layer at (18,204) size 320x48 + LayoutFlexibleBox (relative positioned) {DIV} at (0,160) size 320x48 + LayoutBlockFlow {DIV} at (16,18) size 28x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 28x16 text run at (0,7) width 28: "0:00" - LayoutBlockFlow {DIV} at (48,2) size 66x30 [color=#FFFFFF] + LayoutBlockFlow {DIV} at (48,18) size 66x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 66x16 text run at (0,7) width 66: "/ 0:06" - LayoutBlockFlow {DIV} at (114,32) size 132x0 - LayoutButton {INPUT} at (246,0) size 32x32 - LayoutButton {INPUT} at (278,0) size 32x32 -layer at (34,263) size 288x4 + LayoutBlockFlow {DIV} at (114,48) size 100x0 + LayoutButton {INPUT} at (214,0) size 48x48 + LayoutButton {INPUT} at (262,0) size 48x48 +layer at (18,252) size 320x32 + LayoutSlider {INPUT} at (0,208) size 320x32 [color=#9D968E] + LayoutFlexibleBox {DIV} at (16,16) size 288x4 +layer at (34,268) size 288x4 LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF4D] -layer at (34,259) size 12x12 +layer at (34,264) size 12x12 LayoutBlockFlow (relative positioned) {DIV} at (0,-4) size 12x12 [bgcolor=#FFFFFF] -layer at (34,263) size 288x4 +layer at (34,268) size 288x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 -layer at (34,263) size 0x4 +layer at (34,268) size 0x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF] -layer at (34,263) size 288x4 +layer at (34,268) size 288x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF8A] layer at (8,284) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 @@ -53,30 +54,31 @@ LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,284) size 320x240 LayoutFlexibleBox {DIV} at (0,0) size 320x240 - LayoutSlider {INPUT} at (0,214) size 320x26 [color=#9D968E] - LayoutFlexibleBox {DIV} at (16,5) size 288x4 -layer at (8,284) size 320x222 clip at (10,286) size 316x218 - LayoutButton (relative positioned) {INPUT} at (0,0) size 320x222 [border: (2px outset #C0C0C0)] - LayoutFlexibleBox (anonymous) at (8,83) size 304x56 +layer at (8,284) size 320x221 clip at (10,286) size 316x217 + LayoutButton (relative positioned) {INPUT} at (0,0) size 320x221 [border: (2px outset #C0C0C0)] + LayoutFlexibleBox (anonymous) at (8,82.50) size 304x56 LayoutBlockFlow {DIV} at (124,0) size 56x56 [bgcolor=#FFFFFFE6] -layer at (8,466) size 320x32 - LayoutFlexibleBox (relative positioned) {DIV} at (0,182) size 320x32 - LayoutBlockFlow {DIV} at (16,2) size 28x30 [color=#FFFFFF] +layer at (8,444) size 320x48 + LayoutFlexibleBox (relative positioned) {DIV} at (0,160) size 320x48 + LayoutBlockFlow {DIV} at (16,18) size 28x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 28x16 text run at (0,7) width 28: "0:00" - LayoutBlockFlow {DIV} at (48,2) size 36x30 [color=#FFFFFF] + LayoutBlockFlow {DIV} at (48,18) size 36x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 36x16 text run at (0,7) width 36: "/ 0:06" - LayoutBlockFlow {DIV} at (84,32) size 162x0 - LayoutButton {INPUT} at (246,0) size 32x32 - LayoutButton {INPUT} at (278,0) size 32x32 -layer at (24,503) size 288x4 + LayoutBlockFlow {DIV} at (84,48) size 130x0 + LayoutButton {INPUT} at (214,0) size 48x48 + LayoutButton {INPUT} at (262,0) size 48x48 +layer at (8,492) size 320x32 + LayoutSlider {INPUT} at (0,208) size 320x32 [color=#9D968E] + LayoutFlexibleBox {DIV} at (16,16) size 288x4 +layer at (24,508) size 288x4 LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF4D] -layer at (24,499) size 12x12 +layer at (24,504) size 12x12 LayoutBlockFlow (relative positioned) {DIV} at (0,-4) size 12x12 [bgcolor=#FFFFFF] -layer at (24,503) size 288x4 +layer at (24,508) size 288x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 -layer at (24,503) size 0x4 +layer at (24,508) size 0x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF] -layer at (24,503) size 288x4 +layer at (24,508) size 288x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF8A]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/media/controls-styling-strict-expected.png b/third_party/WebKit/LayoutTests/platform/linux/media/controls-styling-strict-expected.png index a30683bb..c97d94704 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/media/controls-styling-strict-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/media/controls-styling-strict-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/media/controls-styling-strict-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/media/controls-styling-strict-expected.txt index f98760c..c0b237bae 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/media/controls-styling-strict-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/media/controls-styling-strict-expected.txt
@@ -20,32 +20,33 @@ LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,52) size 320x240 LayoutFlexibleBox {DIV} at (0,0) size 320x240 - LayoutSlider {INPUT} at (0,214) size 320x26 [color=#9D968E] - LayoutFlexibleBox {DIV} at (16,5) size 288x4 -layer at (8,52) size 320x222 clip at (10,54) size 316x218 - LayoutButton (relative positioned) {INPUT} at (0,0) size 320x222 [border: (2px outset #C0C0C0)] - LayoutFlexibleBox (anonymous) at (8,83) size 304x56 +layer at (8,52) size 320x221 clip at (10,54) size 316x217 + LayoutButton (relative positioned) {INPUT} at (0,0) size 320x221 [border: (2px outset #C0C0C0)] + LayoutFlexibleBox (anonymous) at (8,82.50) size 304x56 LayoutBlockFlow {DIV} at (124,0) size 56x56 [bgcolor=#FFFFFFE6] -layer at (8,234) size 320x32 - LayoutFlexibleBox (relative positioned) {DIV} at (0,182) size 320x32 - LayoutBlockFlow {DIV} at (16,2) size 28x30 [color=#FFFFFF] +layer at (8,212) size 320x48 + LayoutFlexibleBox (relative positioned) {DIV} at (0,160) size 320x48 + LayoutBlockFlow {DIV} at (16,18) size 28x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 28x16 text run at (0,7) width 28: "0:00" - LayoutBlockFlow {DIV} at (48,2) size 36x30 [color=#FFFFFF] + LayoutBlockFlow {DIV} at (48,18) size 36x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 36x16 text run at (0,7) width 36: "/ 0:06" - LayoutBlockFlow {DIV} at (84,32) size 162x0 - LayoutButton {INPUT} at (246,0) size 32x32 - LayoutButton {INPUT} at (278,0) size 32x32 -layer at (24,271) size 288x4 + LayoutBlockFlow {DIV} at (84,48) size 130x0 + LayoutButton {INPUT} at (214,0) size 48x48 + LayoutButton {INPUT} at (262,0) size 48x48 +layer at (8,260) size 320x32 + LayoutSlider {INPUT} at (0,208) size 320x32 [color=#9D968E] + LayoutFlexibleBox {DIV} at (16,16) size 288x4 +layer at (24,276) size 288x4 LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF4D] -layer at (24,267) size 12x12 +layer at (24,272) size 12x12 LayoutBlockFlow (relative positioned) {DIV} at (0,-4) size 12x12 [bgcolor=#FFFFFF] -layer at (24,271) size 288x4 +layer at (24,276) size 288x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 -layer at (24,271) size 0x4 +layer at (24,276) size 0x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF] -layer at (24,271) size 288x4 +layer at (24,276) size 288x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF8A] layer at (332,52) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 @@ -53,30 +54,31 @@ LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (332,52) size 320x240 LayoutFlexibleBox {DIV} at (0,0) size 320x240 - LayoutSlider {INPUT} at (0,214) size 320x26 [color=#9D968E] - LayoutFlexibleBox {DIV} at (16,5) size 288x4 -layer at (332,52) size 320x222 clip at (334,54) size 316x218 - LayoutButton (relative positioned) {INPUT} at (0,0) size 320x222 [border: (2px outset #C0C0C0)] - LayoutFlexibleBox (anonymous) at (8,83) size 304x56 +layer at (332,52) size 320x221 clip at (334,54) size 316x217 + LayoutButton (relative positioned) {INPUT} at (0,0) size 320x221 [border: (2px outset #C0C0C0)] + LayoutFlexibleBox (anonymous) at (8,82.50) size 304x56 LayoutBlockFlow {DIV} at (124,0) size 56x56 [bgcolor=#FFFFFFE6] -layer at (332,234) size 320x32 - LayoutFlexibleBox (relative positioned) {DIV} at (0,182) size 320x32 - LayoutBlockFlow {DIV} at (16,2) size 28x30 [color=#FFFFFF] +layer at (332,212) size 320x48 + LayoutFlexibleBox (relative positioned) {DIV} at (0,160) size 320x48 + LayoutBlockFlow {DIV} at (16,18) size 28x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 28x16 text run at (0,7) width 28: "0:00" - LayoutBlockFlow {DIV} at (48,2) size 36x30 [color=#FFFFFF] + LayoutBlockFlow {DIV} at (48,18) size 36x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 36x16 text run at (0,7) width 36: "/ 0:06" - LayoutBlockFlow {DIV} at (84,32) size 162x0 - LayoutButton {INPUT} at (246,0) size 32x32 - LayoutButton {INPUT} at (278,0) size 32x32 -layer at (348,271) size 288x4 + LayoutBlockFlow {DIV} at (84,48) size 130x0 + LayoutButton {INPUT} at (214,0) size 48x48 + LayoutButton {INPUT} at (262,0) size 48x48 +layer at (332,260) size 320x32 + LayoutSlider {INPUT} at (0,208) size 320x32 [color=#9D968E] + LayoutFlexibleBox {DIV} at (16,16) size 288x4 +layer at (348,276) size 288x4 LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF4D] -layer at (348,267) size 12x12 +layer at (348,272) size 12x12 LayoutBlockFlow (relative positioned) {DIV} at (0,-4) size 12x12 [bgcolor=#FFFFFF] -layer at (348,271) size 288x4 +layer at (348,276) size 288x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 -layer at (348,271) size 0x4 +layer at (348,276) size 0x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF] -layer at (348,271) size 288x4 +layer at (348,276) size 288x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF8A]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/media/controls-without-preload-expected.png b/third_party/WebKit/LayoutTests/platform/linux/media/controls-without-preload-expected.png index 7aebdb1..f43b5425 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/media/controls-without-preload-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/media/controls-without-preload-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/media/controls-without-preload-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/media/controls-without-preload-expected.txt index 5971185..2047619 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/media/controls-without-preload-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/media/controls-without-preload-expected.txt
@@ -16,30 +16,31 @@ LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,44) size 320x240 LayoutFlexibleBox {DIV} at (0,0) size 320x240 - LayoutSlider {INPUT} at (0,214) size 320x26 [color=#9D968E] - LayoutFlexibleBox {DIV} at (16,5) size 288x4 -layer at (8,44) size 320x222 clip at (10,46) size 316x218 - LayoutButton (relative positioned) {INPUT} at (0,0) size 320x222 [border: (2px outset #C0C0C0)] - LayoutFlexibleBox (anonymous) at (8,83) size 304x56 +layer at (8,44) size 320x221 clip at (10,46) size 316x217 + LayoutButton (relative positioned) {INPUT} at (0,0) size 320x221 [border: (2px outset #C0C0C0)] + LayoutFlexibleBox (anonymous) at (8,82.50) size 304x56 LayoutBlockFlow {DIV} at (124,0) size 56x56 [bgcolor=#FFFFFFE6] -layer at (8,226) size 320x32 - LayoutFlexibleBox (relative positioned) {DIV} at (0,182) size 320x32 - LayoutBlockFlow {DIV} at (16,2) size 28x30 [color=#FFFFFF] +layer at (8,204) size 320x48 + LayoutFlexibleBox (relative positioned) {DIV} at (0,160) size 320x48 + LayoutBlockFlow {DIV} at (16,18) size 28x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 28x16 text run at (0,7) width 28: "0:00" - LayoutBlockFlow {DIV} at (48,2) size 36x30 [color=#FFFFFF] + LayoutBlockFlow {DIV} at (48,18) size 36x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 36x16 text run at (0,7) width 36: "/ 0:06" - LayoutBlockFlow {DIV} at (84,32) size 162x0 - LayoutButton {INPUT} at (246,0) size 32x32 - LayoutButton {INPUT} at (278,0) size 32x32 -layer at (24,263) size 288x4 + LayoutBlockFlow {DIV} at (84,48) size 130x0 + LayoutButton {INPUT} at (214,0) size 48x48 + LayoutButton {INPUT} at (262,0) size 48x48 +layer at (8,252) size 320x32 + LayoutSlider {INPUT} at (0,208) size 320x32 [color=#9D968E] + LayoutFlexibleBox {DIV} at (16,16) size 288x4 +layer at (24,268) size 288x4 LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF4D] -layer at (24,259) size 12x12 +layer at (24,264) size 12x12 LayoutBlockFlow (relative positioned) {DIV} at (0,-4) size 12x12 [bgcolor=#FFFFFF] -layer at (24,263) size 288x4 +layer at (24,268) size 288x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 -layer at (24,263) size 0x4 +layer at (24,268) size 0x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF] -layer at (24,263) size 288x4 +layer at (24,268) size 288x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF8A]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.png b/third_party/WebKit/LayoutTests/platform/linux/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.png index 4ab1598..b5b7b519 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.txt index 56f85d9..9e606dc 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.txt
@@ -12,31 +12,32 @@ LayoutFlexibleBox {DIV} at (0,0) size 400x327.27 layer at (8,8) size 400x327 LayoutFlexibleBox {DIV} at (0,0) size 400x327.27 - LayoutSlider {INPUT} at (0,301.27) size 400x26 [color=#9D968E] - LayoutFlexibleBox {DIV} at (16,5) size 368x4 -layer at (8,8) size 400x309 clip at (10,10) size 396x305 - LayoutButton (relative positioned) {INPUT} at (0,0) size 400x309.27 [border: (2px outset #C0C0C0)] - LayoutFlexibleBox (anonymous) at (8,126.63) size 384x56 +layer at (8,8) size 400x308 clip at (10,10) size 396x304 + LayoutButton (relative positioned) {INPUT} at (0,0) size 400x308.27 [border: (2px outset #C0C0C0)] + LayoutFlexibleBox (anonymous) at (8,126.13) size 384x56 LayoutBlockFlow {DIV} at (164,0) size 56x56 [bgcolor=#FFFFFFE6] -layer at (8,277) size 400x32 - LayoutFlexibleBox (relative positioned) {DIV} at (0,269.27) size 400x32 - LayoutBlockFlow {DIV} at (16,2) size 28x30 [color=#FFFFFF] +layer at (8,255) size 400x48 + LayoutFlexibleBox (relative positioned) {DIV} at (0,247.27) size 400x48 + LayoutBlockFlow {DIV} at (16,18) size 28x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 28x16 text run at (0,7) width 28: "0:00" - LayoutBlockFlow {DIV} at (48,2) size 36x30 [color=#FFFFFF] + LayoutBlockFlow {DIV} at (48,18) size 36x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 36x16 text run at (0,7) width 36: "/ 0:09" - LayoutBlockFlow {DIV} at (84,32) size 242x0 - LayoutButton {INPUT} at (358,0) size 32x32 -layer at (334,277) size 32x32 transparent - LayoutButton {INPUT} at (326,0) size 32x32 [color=#808080] -layer at (24,314) size 368x4 + LayoutBlockFlow {DIV} at (84,48) size 210x0 + LayoutButton {INPUT} at (342,0) size 48x48 +layer at (302,255) size 48x48 transparent + LayoutButton {INPUT} at (294,0) size 48x48 [color=#808080] +layer at (8,303) size 400x32 + LayoutSlider {INPUT} at (0,295.27) size 400x32 [color=#9D968E] + LayoutFlexibleBox {DIV} at (16,16) size 368x4 +layer at (24,319) size 368x4 LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 368x4 [bgcolor=#FFFFFF4D] -layer at (24,310) size 12x12 +layer at (24,315) size 12x12 LayoutBlockFlow (relative positioned) {DIV} at (0,-4) size 12x12 [bgcolor=#FFFFFF] -layer at (24,314) size 368x4 +layer at (24,319) size 368x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 368x4 -layer at (24,314) size 0x4 +layer at (24,319) size 0x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF] -layer at (24,314) size 368x4 +layer at (24,319) size 368x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 368x4 [bgcolor=#FFFFFF8A]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/media/controls/paint-controls-webkit-appearance-none-expected.png b/third_party/WebKit/LayoutTests/platform/linux/media/controls/paint-controls-webkit-appearance-none-expected.png index 4ab1598..b5b7b519 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/media/controls/paint-controls-webkit-appearance-none-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/media/controls/paint-controls-webkit-appearance-none-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/media/controls/paint-controls-webkit-appearance-none-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/media/controls/paint-controls-webkit-appearance-none-expected.txt index 56f85d9..9e606dc 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/media/controls/paint-controls-webkit-appearance-none-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/media/controls/paint-controls-webkit-appearance-none-expected.txt
@@ -12,31 +12,32 @@ LayoutFlexibleBox {DIV} at (0,0) size 400x327.27 layer at (8,8) size 400x327 LayoutFlexibleBox {DIV} at (0,0) size 400x327.27 - LayoutSlider {INPUT} at (0,301.27) size 400x26 [color=#9D968E] - LayoutFlexibleBox {DIV} at (16,5) size 368x4 -layer at (8,8) size 400x309 clip at (10,10) size 396x305 - LayoutButton (relative positioned) {INPUT} at (0,0) size 400x309.27 [border: (2px outset #C0C0C0)] - LayoutFlexibleBox (anonymous) at (8,126.63) size 384x56 +layer at (8,8) size 400x308 clip at (10,10) size 396x304 + LayoutButton (relative positioned) {INPUT} at (0,0) size 400x308.27 [border: (2px outset #C0C0C0)] + LayoutFlexibleBox (anonymous) at (8,126.13) size 384x56 LayoutBlockFlow {DIV} at (164,0) size 56x56 [bgcolor=#FFFFFFE6] -layer at (8,277) size 400x32 - LayoutFlexibleBox (relative positioned) {DIV} at (0,269.27) size 400x32 - LayoutBlockFlow {DIV} at (16,2) size 28x30 [color=#FFFFFF] +layer at (8,255) size 400x48 + LayoutFlexibleBox (relative positioned) {DIV} at (0,247.27) size 400x48 + LayoutBlockFlow {DIV} at (16,18) size 28x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 28x16 text run at (0,7) width 28: "0:00" - LayoutBlockFlow {DIV} at (48,2) size 36x30 [color=#FFFFFF] + LayoutBlockFlow {DIV} at (48,18) size 36x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 36x16 text run at (0,7) width 36: "/ 0:09" - LayoutBlockFlow {DIV} at (84,32) size 242x0 - LayoutButton {INPUT} at (358,0) size 32x32 -layer at (334,277) size 32x32 transparent - LayoutButton {INPUT} at (326,0) size 32x32 [color=#808080] -layer at (24,314) size 368x4 + LayoutBlockFlow {DIV} at (84,48) size 210x0 + LayoutButton {INPUT} at (342,0) size 48x48 +layer at (302,255) size 48x48 transparent + LayoutButton {INPUT} at (294,0) size 48x48 [color=#808080] +layer at (8,303) size 400x32 + LayoutSlider {INPUT} at (0,295.27) size 400x32 [color=#9D968E] + LayoutFlexibleBox {DIV} at (16,16) size 368x4 +layer at (24,319) size 368x4 LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 368x4 [bgcolor=#FFFFFF4D] -layer at (24,310) size 12x12 +layer at (24,315) size 12x12 LayoutBlockFlow (relative positioned) {DIV} at (0,-4) size 12x12 [bgcolor=#FFFFFF] -layer at (24,314) size 368x4 +layer at (24,319) size 368x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 368x4 -layer at (24,314) size 0x4 +layer at (24,319) size 0x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF] -layer at (24,314) size 368x4 +layer at (24,319) size 368x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 368x4 [bgcolor=#FFFFFF8A]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/media/controls/video-controls-with-cast-rendering-expected.png b/third_party/WebKit/LayoutTests/platform/linux/media/controls/video-controls-with-cast-rendering-expected.png index ca2494bd..ed7fcdc 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/media/controls/video-controls-with-cast-rendering-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/media/controls/video-controls-with-cast-rendering-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/media/controls/video-controls-with-cast-rendering-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/media/controls/video-controls-with-cast-rendering-expected.txt index 5bebcdd..6e28da8 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/media/controls/video-controls-with-cast-rendering-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/media/controls/video-controls-with-cast-rendering-expected.txt
@@ -21,33 +21,34 @@ LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,52) size 320x240 LayoutFlexibleBox {DIV} at (0,0) size 320x240 - LayoutSlider {INPUT} at (0,214) size 320x26 [color=#9D968E] - LayoutFlexibleBox {DIV} at (16,5) size 288x4 -layer at (8,52) size 320x222 clip at (10,54) size 316x218 - LayoutButton (relative positioned) {INPUT} at (0,0) size 320x222 [border: (2px outset #C0C0C0)] - LayoutFlexibleBox (anonymous) at (8,83) size 304x56 +layer at (8,52) size 320x221 clip at (10,54) size 316x217 + LayoutButton (relative positioned) {INPUT} at (0,0) size 320x221 [border: (2px outset #C0C0C0)] + LayoutFlexibleBox (anonymous) at (8,82.50) size 304x56 LayoutBlockFlow {DIV} at (124,0) size 56x56 [bgcolor=#FFFFFFE6] -layer at (8,234) size 320x32 - LayoutFlexibleBox (relative positioned) {DIV} at (0,182) size 320x32 - LayoutBlockFlow {DIV} at (16,2) size 28x30 [color=#FFFFFF] +layer at (8,212) size 320x48 + LayoutFlexibleBox (relative positioned) {DIV} at (0,160) size 320x48 + LayoutBlockFlow {DIV} at (16,18) size 28x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 28x16 text run at (0,7) width 28: "0:00" - LayoutBlockFlow {DIV} at (48,2) size 36x30 [color=#FFFFFF] + LayoutBlockFlow {DIV} at (48,18) size 36x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 36x16 text run at (0,7) width 36: "/ 0:06" - LayoutBlockFlow {DIV} at (84,32) size 130x0 - LayoutButton {INPUT} at (214,0) size 32x32 - LayoutButton {INPUT} at (246,0) size 32x32 - LayoutButton {INPUT} at (278,0) size 32x32 -layer at (24,271) size 288x4 + LayoutBlockFlow {DIV} at (84,48) size 82x0 + LayoutButton {INPUT} at (166,0) size 48x48 + LayoutButton {INPUT} at (214,0) size 48x48 + LayoutButton {INPUT} at (262,0) size 48x48 +layer at (8,260) size 320x32 + LayoutSlider {INPUT} at (0,208) size 320x32 [color=#9D968E] + LayoutFlexibleBox {DIV} at (16,16) size 288x4 +layer at (24,276) size 288x4 LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF4D] -layer at (24,267) size 12x12 +layer at (24,272) size 12x12 LayoutBlockFlow (relative positioned) {DIV} at (0,-4) size 12x12 [bgcolor=#FFFFFF] -layer at (24,271) size 288x4 +layer at (24,276) size 288x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 -layer at (24,271) size 0x4 +layer at (24,276) size 0x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF] -layer at (24,271) size 288x4 +layer at (24,276) size 288x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF8A] layer at (8,297) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 @@ -55,33 +56,34 @@ LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,297) size 320x240 LayoutFlexibleBox {DIV} at (0,0) size 320x240 - LayoutSlider {INPUT} at (0,214) size 320x26 [color=#9D968E] - LayoutFlexibleBox {DIV} at (16,5) size 288x4 -layer at (8,297) size 320x222 clip at (10,299) size 316x218 - LayoutButton (relative positioned) {INPUT} at (0,0) size 320x222 [border: (2px outset #C0C0C0)] - LayoutFlexibleBox (anonymous) at (8,83) size 304x56 +layer at (8,297) size 320x221 clip at (10,299) size 316x217 + LayoutButton (relative positioned) {INPUT} at (0,0) size 320x221 [border: (2px outset #C0C0C0)] + LayoutFlexibleBox (anonymous) at (8,82.50) size 304x56 LayoutBlockFlow {DIV} at (124,0) size 56x56 [bgcolor=#FFFFFFE6] -layer at (8,479) size 320x32 - LayoutFlexibleBox (relative positioned) {DIV} at (0,182) size 320x32 - LayoutBlockFlow {DIV} at (16,2) size 28x30 [color=#FFFFFF] +layer at (8,457) size 320x48 + LayoutFlexibleBox (relative positioned) {DIV} at (0,160) size 320x48 + LayoutBlockFlow {DIV} at (16,18) size 28x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 28x16 text run at (0,7) width 28: "0:00" - LayoutBlockFlow {DIV} at (48,2) size 36x30 [color=#FFFFFF] + LayoutBlockFlow {DIV} at (48,18) size 36x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 36x16 text run at (0,7) width 36: "/ 0:06" - LayoutBlockFlow {DIV} at (84,32) size 130x0 - LayoutButton {INPUT} at (214,0) size 32x32 - LayoutButton {INPUT} at (246,0) size 32x32 - LayoutButton {INPUT} at (278,0) size 32x32 -layer at (24,516) size 288x4 + LayoutBlockFlow {DIV} at (84,48) size 82x0 + LayoutButton {INPUT} at (166,0) size 48x48 + LayoutButton {INPUT} at (214,0) size 48x48 + LayoutButton {INPUT} at (262,0) size 48x48 +layer at (8,505) size 320x32 + LayoutSlider {INPUT} at (0,208) size 320x32 [color=#9D968E] + LayoutFlexibleBox {DIV} at (16,16) size 288x4 +layer at (24,521) size 288x4 LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF4D] -layer at (24,512) size 12x12 +layer at (24,517) size 12x12 LayoutBlockFlow (relative positioned) {DIV} at (0,-4) size 12x12 [bgcolor=#FFFFFF] -layer at (24,516) size 288x4 +layer at (24,521) size 288x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 -layer at (24,516) size 0x4 +layer at (24,521) size 0x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF] -layer at (24,516) size 288x4 +layer at (24,521) size 288x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF8A] layer at (8,542) size 320x240 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 LayoutVideo (positioned) {VIDEO} at (8,542) size 320x240 @@ -91,31 +93,32 @@ LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,542) size 320x240 backgroundClip at (8,542) size 320x58 clip at (8,542) size 320x58 LayoutFlexibleBox {DIV} at (0,0) size 320x240 - LayoutSlider {INPUT} at (0,214) size 320x26 [color=#9D968E] - LayoutFlexibleBox {DIV} at (16,5) size 288x4 -layer at (8,542) size 320x222 backgroundClip at (8,542) size 320x58 clip at (10,544) size 316x56 - LayoutButton (relative positioned) {INPUT} at (0,0) size 320x222 [border: (2px outset #C0C0C0)] - LayoutFlexibleBox (anonymous) at (8,83) size 304x56 +layer at (8,542) size 320x221 backgroundClip at (8,542) size 320x58 clip at (10,544) size 316x56 + LayoutButton (relative positioned) {INPUT} at (0,0) size 320x221 [border: (2px outset #C0C0C0)] + LayoutFlexibleBox (anonymous) at (8,82.50) size 304x56 LayoutBlockFlow {DIV} at (124,0) size 56x56 [bgcolor=#FFFFFFE6] -layer at (8,724) size 320x32 backgroundClip at (0,0) size 0x0 clip at (0,0) size 0x0 - LayoutFlexibleBox (relative positioned) {DIV} at (0,182) size 320x32 - LayoutBlockFlow {DIV} at (16,2) size 28x30 [color=#FFFFFF] +layer at (8,702) size 320x48 backgroundClip at (0,0) size 0x0 clip at (0,0) size 0x0 + LayoutFlexibleBox (relative positioned) {DIV} at (0,160) size 320x48 + LayoutBlockFlow {DIV} at (16,18) size 28x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 28x16 text run at (0,7) width 28: "0:00" - LayoutBlockFlow {DIV} at (48,2) size 36x30 [color=#FFFFFF] + LayoutBlockFlow {DIV} at (48,18) size 36x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 36x16 text run at (0,7) width 36: "/ 0:06" - LayoutBlockFlow {DIV} at (84,32) size 130x0 - LayoutButton {INPUT} at (214,0) size 32x32 - LayoutButton {INPUT} at (246,0) size 32x32 - LayoutButton {INPUT} at (278,0) size 32x32 -layer at (24,761) size 288x4 backgroundClip at (8,542) size 320x58 clip at (8,542) size 320x58 + LayoutBlockFlow {DIV} at (84,48) size 82x0 + LayoutButton {INPUT} at (166,0) size 48x48 + LayoutButton {INPUT} at (214,0) size 48x48 + LayoutButton {INPUT} at (262,0) size 48x48 +layer at (8,750) size 320x32 backgroundClip at (8,542) size 320x58 clip at (8,542) size 320x58 + LayoutSlider {INPUT} at (0,208) size 320x32 [color=#9D968E] + LayoutFlexibleBox {DIV} at (16,16) size 288x4 +layer at (24,766) size 288x4 backgroundClip at (8,542) size 320x58 clip at (8,542) size 320x58 LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF4D] -layer at (24,757) size 12x12 backgroundClip at (8,542) size 320x58 clip at (8,542) size 320x58 +layer at (24,762) size 12x12 backgroundClip at (8,542) size 320x58 clip at (8,542) size 320x58 LayoutBlockFlow (relative positioned) {DIV} at (0,-4) size 12x12 [bgcolor=#FFFFFF] -layer at (24,761) size 288x4 backgroundClip at (0,0) size 0x0 clip at (0,0) size 0x0 +layer at (24,766) size 288x4 backgroundClip at (0,0) size 0x0 clip at (0,0) size 0x0 LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 -layer at (24,761) size 0x4 +layer at (24,766) size 0x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF] -layer at (24,761) size 288x4 backgroundClip at (0,0) size 0x0 clip at (0,0) size 0x0 +layer at (24,766) size 288x4 backgroundClip at (0,0) size 0x0 clip at (0,0) size 0x0 LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF8A]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/media/media-controls-clone-expected.png b/third_party/WebKit/LayoutTests/platform/linux/media/media-controls-clone-expected.png index 82ee1954..32fb128c 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/media/media-controls-clone-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/media/media-controls-clone-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/media/media-controls-clone-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/media/media-controls-clone-expected.txt index 116b30b4..080a019 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/media/media-controls-clone-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/media/media-controls-clone-expected.txt
@@ -19,20 +19,21 @@ LayoutFlexibleBox {DIV} at (0,0) size 300x150 layer at (8,8) size 300x150 LayoutFlexibleBox {DIV} at (0,0) size 300x150 - LayoutSlider {INPUT} at (0,124) size 300x26 [color=#9D968E] - LayoutFlexibleBox {DIV} at (16,5) size 268x4 -layer at (8,100) size 300x32 - LayoutFlexibleBox (relative positioned) {DIV} at (0,92) size 300x32 - LayoutBlockFlow {DIV} at (16,32) size 242x0 -layer at (266,100) size 32x32 transparent - LayoutButton {INPUT} at (258,0) size 32x32 [color=#808080] -layer at (24,137) size 268x4 +layer at (8,78) size 300x48 + LayoutFlexibleBox (relative positioned) {DIV} at (0,70) size 300x48 + LayoutBlockFlow {DIV} at (16,48) size 226x0 +layer at (250,78) size 48x48 transparent + LayoutButton {INPUT} at (242,0) size 48x48 [color=#808080] +layer at (8,126) size 300x32 + LayoutSlider {INPUT} at (0,118) size 300x32 [color=#9D968E] + LayoutFlexibleBox {DIV} at (16,16) size 268x4 +layer at (24,142) size 268x4 LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 268x4 [bgcolor=#FFFFFF4D] -layer at (24,137) size 268x4 +layer at (24,142) size 268x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 268x4 -layer at (24,137) size 0x4 +layer at (24,142) size 0x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF] -layer at (24,137) size 0x4 +layer at (24,142) size 0x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF8A] layer at (308,104) size 300x54 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 300x54 @@ -57,20 +58,21 @@ LayoutFlexibleBox {DIV} at (0,0) size 300x150 layer at (8,163) size 300x150 LayoutFlexibleBox {DIV} at (0,0) size 300x150 - LayoutSlider {INPUT} at (0,124) size 300x26 [color=#9D968E] - LayoutFlexibleBox {DIV} at (16,5) size 268x4 -layer at (8,255) size 300x32 - LayoutFlexibleBox (relative positioned) {DIV} at (0,92) size 300x32 - LayoutBlockFlow {DIV} at (16,32) size 242x0 -layer at (266,255) size 32x32 transparent - LayoutButton {INPUT} at (258,0) size 32x32 [color=#808080] -layer at (24,292) size 268x4 +layer at (8,233) size 300x48 + LayoutFlexibleBox (relative positioned) {DIV} at (0,70) size 300x48 + LayoutBlockFlow {DIV} at (16,48) size 226x0 +layer at (250,233) size 48x48 transparent + LayoutButton {INPUT} at (242,0) size 48x48 [color=#808080] +layer at (8,281) size 300x32 + LayoutSlider {INPUT} at (0,118) size 300x32 [color=#9D968E] + LayoutFlexibleBox {DIV} at (16,16) size 268x4 +layer at (24,297) size 268x4 LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 268x4 [bgcolor=#FFFFFF4D] -layer at (24,292) size 268x4 +layer at (24,297) size 268x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 268x4 -layer at (24,292) size 0x4 +layer at (24,297) size 0x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF] -layer at (24,292) size 0x4 +layer at (24,297) size 0x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF8A] layer at (308,259) size 300x54 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 300x54
diff --git a/third_party/WebKit/LayoutTests/platform/linux/media/media-controls-grey-scrubber-expected.png b/third_party/WebKit/LayoutTests/platform/linux/media/media-controls-grey-scrubber-expected.png index efce969..d9b0890 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/media/media-controls-grey-scrubber-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/media/media-controls-grey-scrubber-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/media/media-controls-grey-scrubber-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/media/media-controls-grey-scrubber-expected.txt index 4a489dab..0a277a3 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/media/media-controls-grey-scrubber-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/media/media-controls-grey-scrubber-expected.txt
@@ -12,29 +12,30 @@ LayoutFlexibleBox {DIV} at (0,0) size 300x150 layer at (8,8) size 300x150 LayoutFlexibleBox {DIV} at (0,0) size 300x150 - LayoutSlider {INPUT} at (0,124) size 300x26 [color=#9D968E] - LayoutFlexibleBox {DIV} at (16,5) size 268x4 -layer at (8,8) size 300x132 clip at (10,10) size 296x128 - LayoutButton (relative positioned) {INPUT} at (0,0) size 300x132 [border: (2px outset #C0C0C0)] - LayoutFlexibleBox (anonymous) at (8,38) size 284x56 +layer at (8,8) size 300x131 clip at (10,10) size 296x127 + LayoutButton (relative positioned) {INPUT} at (0,0) size 300x131 [border: (2px outset #C0C0C0)] + LayoutFlexibleBox (anonymous) at (8,37.50) size 284x56 LayoutBlockFlow {DIV} at (114,0) size 56x56 [bgcolor=#FFFFFFE6] -layer at (8,100) size 300x32 - LayoutFlexibleBox (relative positioned) {DIV} at (0,92) size 300x32 - LayoutBlockFlow {DIV} at (16,2) size 28x30 [color=#FFFFFF] +layer at (8,78) size 300x48 + LayoutFlexibleBox (relative positioned) {DIV} at (0,70) size 300x48 + LayoutBlockFlow {DIV} at (16,18) size 28x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 28x16 text run at (0,7) width 28: "0:00" - LayoutBlockFlow {DIV} at (44,32) size 182x0 -layer at (234,100) size 32x32 transparent - LayoutButton {INPUT} at (226,0) size 32x32 [color=#808080] -layer at (266,100) size 32x32 transparent - LayoutButton {INPUT} at (258,0) size 32x32 [color=#808080] -layer at (24,137) size 268x4 + LayoutBlockFlow {DIV} at (44,48) size 150x0 +layer at (202,78) size 48x48 transparent + LayoutButton {INPUT} at (194,0) size 48x48 [color=#808080] +layer at (250,78) size 48x48 transparent + LayoutButton {INPUT} at (242,0) size 48x48 [color=#808080] +layer at (8,126) size 300x32 + LayoutSlider {INPUT} at (0,118) size 300x32 [color=#9D968E] + LayoutFlexibleBox {DIV} at (16,16) size 268x4 +layer at (24,142) size 268x4 LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 268x4 [bgcolor=#FFFFFF4D] -layer at (24,133) size 12x12 +layer at (24,138) size 12x12 LayoutBlockFlow (relative positioned) {DIV} at (0,-4) size 12x12 [bgcolor=#FFFFFF] -layer at (24,137) size 268x4 +layer at (24,142) size 268x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 268x4 -layer at (24,137) size 0x4 +layer at (24,142) size 0x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF] -layer at (24,137) size 0x4 +layer at (24,142) size 0x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF8A]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/media/media-document-audio-repaint-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/media/media-document-audio-repaint-expected.txt index ec0879e..244b3d5 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/media/media-document-audio-repaint-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/media/media-document-audio-repaint-expected.txt
@@ -25,8 +25,6 @@ layer at (40,186) size 300x54 scrollHeight 55 LayoutFlexibleBox {DIV} at (0,0) size 300x54 LayoutButton {INPUT} at (10,11) size 32x32 - LayoutSlider {INPUT} at (115,-1) size 143x56 [color=#9D968E] - LayoutFlexibleBox {DIV} at (16,26) size 111x4 LayoutButton {INPUT} at (258,11) size 32x32 layer at (87,205) size 28x16 transparent LayoutBlockFlow {DIV} at (47,19) size 28x16 @@ -36,6 +34,9 @@ LayoutBlockFlow {DIV} at (79,19) size 36x16 LayoutText {#text} at (0,0) size 36x16 text run at (0,0) width 36: "/ 0:01" + layer at (155,185) size 143x56 backgroundClip at (40,186) size 300x54 clip at (40,186) size 300x54 + LayoutSlider {INPUT} at (115,-1) size 143x56 [color=#9D968E] + LayoutFlexibleBox {DIV} at (16,26) size 111x4 layer at (171,211) size 111x4 LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 111x4 [bgcolor=#00000033] layer at (220,207) size 12x12
diff --git a/third_party/WebKit/LayoutTests/platform/linux/media/video-controls-rendering-expected.png b/third_party/WebKit/LayoutTests/platform/linux/media/video-controls-rendering-expected.png index e1de545..ebf37ea 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/media/video-controls-rendering-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/media/video-controls-rendering-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/media/video-controls-rendering-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/media/video-controls-rendering-expected.txt index c8877ae..27adb7f 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/media/video-controls-rendering-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/media/video-controls-rendering-expected.txt
@@ -21,32 +21,33 @@ LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,44) size 320x240 LayoutFlexibleBox {DIV} at (0,0) size 320x240 - LayoutSlider {INPUT} at (0,214) size 320x26 [color=#9D968E] - LayoutFlexibleBox {DIV} at (16,5) size 288x4 -layer at (8,44) size 320x222 clip at (10,46) size 316x218 - LayoutButton (relative positioned) {INPUT} at (0,0) size 320x222 [border: (2px outset #C0C0C0)] - LayoutFlexibleBox (anonymous) at (8,83) size 304x56 +layer at (8,44) size 320x221 clip at (10,46) size 316x217 + LayoutButton (relative positioned) {INPUT} at (0,0) size 320x221 [border: (2px outset #C0C0C0)] + LayoutFlexibleBox (anonymous) at (8,82.50) size 304x56 LayoutBlockFlow {DIV} at (124,0) size 56x56 [bgcolor=#FFFFFFE6] -layer at (8,226) size 320x32 - LayoutFlexibleBox (relative positioned) {DIV} at (0,182) size 320x32 - LayoutBlockFlow {DIV} at (16,2) size 28x30 [color=#FFFFFF] +layer at (8,204) size 320x48 + LayoutFlexibleBox (relative positioned) {DIV} at (0,160) size 320x48 + LayoutBlockFlow {DIV} at (16,18) size 28x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 28x16 text run at (0,7) width 28: "0:00" - LayoutBlockFlow {DIV} at (48,2) size 36x30 [color=#FFFFFF] + LayoutBlockFlow {DIV} at (48,18) size 36x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 36x16 text run at (0,7) width 36: "/ 0:06" - LayoutBlockFlow {DIV} at (84,32) size 162x0 - LayoutButton {INPUT} at (246,0) size 32x32 - LayoutButton {INPUT} at (278,0) size 32x32 -layer at (24,263) size 288x4 + LayoutBlockFlow {DIV} at (84,48) size 130x0 + LayoutButton {INPUT} at (214,0) size 48x48 + LayoutButton {INPUT} at (262,0) size 48x48 +layer at (8,252) size 320x32 + LayoutSlider {INPUT} at (0,208) size 320x32 [color=#9D968E] + LayoutFlexibleBox {DIV} at (16,16) size 288x4 +layer at (24,268) size 288x4 LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF4D] -layer at (24,259) size 12x12 +layer at (24,264) size 12x12 LayoutBlockFlow (relative positioned) {DIV} at (0,-4) size 12x12 [bgcolor=#FFFFFF] -layer at (24,263) size 288x4 +layer at (24,268) size 288x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 -layer at (24,263) size 0x4 +layer at (24,268) size 0x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF] -layer at (24,263) size 288x4 +layer at (24,268) size 288x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF8A] layer at (8,284) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 @@ -54,32 +55,33 @@ LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,284) size 320x240 LayoutFlexibleBox {DIV} at (0,0) size 320x240 - LayoutSlider {INPUT} at (0,214) size 320x26 [color=#9D968E] - LayoutFlexibleBox {DIV} at (16,5) size 288x4 -layer at (8,284) size 320x222 clip at (10,286) size 316x218 - LayoutButton (relative positioned) {INPUT} at (0,0) size 320x222 [border: (2px outset #C0C0C0)] - LayoutFlexibleBox (anonymous) at (8,83) size 304x56 +layer at (8,284) size 320x221 clip at (10,286) size 316x217 + LayoutButton (relative positioned) {INPUT} at (0,0) size 320x221 [border: (2px outset #C0C0C0)] + LayoutFlexibleBox (anonymous) at (8,82.50) size 304x56 LayoutBlockFlow {DIV} at (124,0) size 56x56 [bgcolor=#FFFFFFE6] -layer at (8,466) size 320x32 - LayoutFlexibleBox (relative positioned) {DIV} at (0,182) size 320x32 - LayoutBlockFlow {DIV} at (16,2) size 28x30 [color=#FFFFFF] +layer at (8,444) size 320x48 + LayoutFlexibleBox (relative positioned) {DIV} at (0,160) size 320x48 + LayoutBlockFlow {DIV} at (16,18) size 28x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 28x16 text run at (0,7) width 28: "0:00" - LayoutBlockFlow {DIV} at (48,2) size 36x30 [color=#FFFFFF] + LayoutBlockFlow {DIV} at (48,18) size 36x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 36x16 text run at (0,7) width 36: "/ 0:06" - LayoutBlockFlow {DIV} at (84,32) size 162x0 - LayoutButton {INPUT} at (246,0) size 32x32 - LayoutButton {INPUT} at (278,0) size 32x32 -layer at (24,503) size 288x4 + LayoutBlockFlow {DIV} at (84,48) size 130x0 + LayoutButton {INPUT} at (214,0) size 48x48 + LayoutButton {INPUT} at (262,0) size 48x48 +layer at (8,492) size 320x32 + LayoutSlider {INPUT} at (0,208) size 320x32 [color=#9D968E] + LayoutFlexibleBox {DIV} at (16,16) size 288x4 +layer at (24,508) size 288x4 LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF4D] -layer at (24,499) size 12x12 +layer at (24,504) size 12x12 LayoutBlockFlow (relative positioned) {DIV} at (0,-4) size 12x12 [bgcolor=#FFFFFF] -layer at (24,503) size 288x4 +layer at (24,508) size 288x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 -layer at (24,503) size 0x4 +layer at (24,508) size 0x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF] -layer at (24,503) size 288x4 +layer at (24,508) size 288x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF8A] layer at (8,524) size 320x240 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 LayoutVideo (positioned) {VIDEO} at (8,524) size 320x240 @@ -89,30 +91,31 @@ LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,524) size 320x240 backgroundClip at (8,524) size 320x76 clip at (8,524) size 320x76 LayoutFlexibleBox {DIV} at (0,0) size 320x240 - LayoutSlider {INPUT} at (0,214) size 320x26 [color=#9D968E] - LayoutFlexibleBox {DIV} at (16,5) size 288x4 -layer at (8,524) size 320x222 backgroundClip at (8,524) size 320x76 clip at (10,526) size 316x74 - LayoutButton (relative positioned) {INPUT} at (0,0) size 320x222 [border: (2px outset #C0C0C0)] - LayoutFlexibleBox (anonymous) at (8,83) size 304x56 +layer at (8,524) size 320x221 backgroundClip at (8,524) size 320x76 clip at (10,526) size 316x74 + LayoutButton (relative positioned) {INPUT} at (0,0) size 320x221 [border: (2px outset #C0C0C0)] + LayoutFlexibleBox (anonymous) at (8,82.50) size 304x56 LayoutBlockFlow {DIV} at (124,0) size 56x56 [bgcolor=#FFFFFFE6] -layer at (8,706) size 320x32 backgroundClip at (0,0) size 0x0 clip at (0,0) size 0x0 - LayoutFlexibleBox (relative positioned) {DIV} at (0,182) size 320x32 - LayoutBlockFlow {DIV} at (16,2) size 28x30 [color=#FFFFFF] +layer at (8,684) size 320x48 backgroundClip at (0,0) size 0x0 clip at (0,0) size 0x0 + LayoutFlexibleBox (relative positioned) {DIV} at (0,160) size 320x48 + LayoutBlockFlow {DIV} at (16,18) size 28x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 28x16 text run at (0,7) width 28: "0:00" - LayoutBlockFlow {DIV} at (48,2) size 36x30 [color=#FFFFFF] + LayoutBlockFlow {DIV} at (48,18) size 36x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 36x16 text run at (0,7) width 36: "/ 0:06" - LayoutBlockFlow {DIV} at (84,32) size 162x0 - LayoutButton {INPUT} at (246,0) size 32x32 - LayoutButton {INPUT} at (278,0) size 32x32 -layer at (24,743) size 288x4 backgroundClip at (8,524) size 320x76 clip at (8,524) size 320x76 + LayoutBlockFlow {DIV} at (84,48) size 130x0 + LayoutButton {INPUT} at (214,0) size 48x48 + LayoutButton {INPUT} at (262,0) size 48x48 +layer at (8,732) size 320x32 backgroundClip at (8,524) size 320x76 clip at (8,524) size 320x76 + LayoutSlider {INPUT} at (0,208) size 320x32 [color=#9D968E] + LayoutFlexibleBox {DIV} at (16,16) size 288x4 +layer at (24,748) size 288x4 backgroundClip at (8,524) size 320x76 clip at (8,524) size 320x76 LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF4D] -layer at (24,739) size 12x12 backgroundClip at (8,524) size 320x76 clip at (8,524) size 320x76 +layer at (24,744) size 12x12 backgroundClip at (8,524) size 320x76 clip at (8,524) size 320x76 LayoutBlockFlow (relative positioned) {DIV} at (0,-4) size 12x12 [bgcolor=#FFFFFF] -layer at (24,743) size 288x4 backgroundClip at (0,0) size 0x0 clip at (0,0) size 0x0 +layer at (24,748) size 288x4 backgroundClip at (0,0) size 0x0 clip at (0,0) size 0x0 LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 -layer at (24,743) size 0x4 +layer at (24,748) size 0x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF] -layer at (24,743) size 288x4 backgroundClip at (0,0) size 0x0 clip at (0,0) size 0x0 +layer at (24,748) size 288x4 backgroundClip at (0,0) size 0x0 clip at (0,0) size 0x0 LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF8A]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/media/video-display-toggle-expected.png b/third_party/WebKit/LayoutTests/platform/linux/media/video-display-toggle-expected.png index 9b5a861..5ceb315 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/media/video-display-toggle-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/media/video-display-toggle-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/media/video-display-toggle-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/media/video-display-toggle-expected.txt index 3847967..f7204a4 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/media/video-display-toggle-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/media/video-display-toggle-expected.txt
@@ -15,30 +15,31 @@ LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,28) size 320x240 LayoutFlexibleBox {DIV} at (0,0) size 320x240 - LayoutSlider {INPUT} at (0,214) size 320x26 [color=#9D968E] - LayoutFlexibleBox {DIV} at (16,5) size 288x4 -layer at (8,28) size 320x222 clip at (10,30) size 316x218 - LayoutButton (relative positioned) {INPUT} at (0,0) size 320x222 [border: (2px outset #C0C0C0)] - LayoutFlexibleBox (anonymous) at (8,83) size 304x56 +layer at (8,28) size 320x221 clip at (10,30) size 316x217 + LayoutButton (relative positioned) {INPUT} at (0,0) size 320x221 [border: (2px outset #C0C0C0)] + LayoutFlexibleBox (anonymous) at (8,82.50) size 304x56 LayoutBlockFlow {DIV} at (124,0) size 56x56 [bgcolor=#FFFFFFE6] -layer at (8,210) size 320x32 - LayoutFlexibleBox (relative positioned) {DIV} at (0,182) size 320x32 - LayoutBlockFlow {DIV} at (16,2) size 28x30 [color=#FFFFFF] +layer at (8,188) size 320x48 + LayoutFlexibleBox (relative positioned) {DIV} at (0,160) size 320x48 + LayoutBlockFlow {DIV} at (16,18) size 28x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 28x16 text run at (0,7) width 28: "0:00" - LayoutBlockFlow {DIV} at (48,2) size 36x30 [color=#FFFFFF] + LayoutBlockFlow {DIV} at (48,18) size 36x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 36x16 text run at (0,7) width 36: "/ 0:06" - LayoutBlockFlow {DIV} at (84,32) size 162x0 - LayoutButton {INPUT} at (246,0) size 32x32 - LayoutButton {INPUT} at (278,0) size 32x32 -layer at (24,247) size 288x4 + LayoutBlockFlow {DIV} at (84,48) size 130x0 + LayoutButton {INPUT} at (214,0) size 48x48 + LayoutButton {INPUT} at (262,0) size 48x48 +layer at (8,236) size 320x32 + LayoutSlider {INPUT} at (0,208) size 320x32 [color=#9D968E] + LayoutFlexibleBox {DIV} at (16,16) size 288x4 +layer at (24,252) size 288x4 LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF4D] -layer at (24,243) size 12x12 +layer at (24,248) size 12x12 LayoutBlockFlow (relative positioned) {DIV} at (0,-4) size 12x12 [bgcolor=#FFFFFF] -layer at (24,247) size 288x4 +layer at (24,252) size 288x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 -layer at (24,247) size 0x4 +layer at (24,252) size 0x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF] -layer at (24,247) size 288x4 +layer at (24,252) size 288x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF8A]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/media/video-empty-source-expected.png b/third_party/WebKit/LayoutTests/platform/linux/media/video-empty-source-expected.png index 35d1dad..0adf4f4b5 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/media/video-empty-source-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/media/video-empty-source-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/media/video-empty-source-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/media/video-empty-source-expected.txt index 1c1d2ea..8d1659b 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/media/video-empty-source-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/media/video-empty-source-expected.txt
@@ -16,30 +16,31 @@ LayoutFlexibleBox {DIV} at (0,0) size 300x150 layer at (9,45) size 300x150 LayoutFlexibleBox {DIV} at (0,0) size 300x150 - LayoutSlider {INPUT} at (0,124) size 300x26 [color=#9D968E] - LayoutFlexibleBox {DIV} at (16,5) size 268x4 -layer at (9,45) size 300x132 clip at (11,47) size 296x128 - LayoutButton (relative positioned) {INPUT} at (0,0) size 300x132 [border: (2px outset #C0C0C0)] - LayoutFlexibleBox (anonymous) at (8,38) size 284x56 +layer at (9,45) size 300x131 clip at (11,47) size 296x127 + LayoutButton (relative positioned) {INPUT} at (0,0) size 300x131 [border: (2px outset #C0C0C0)] + LayoutFlexibleBox (anonymous) at (8,37.50) size 284x56 layer at (131,83) size 56x56 transparent LayoutBlockFlow {DIV} at (114,0) size 56x56 [bgcolor=#FFFFFFE6] -layer at (9,137) size 300x32 - LayoutFlexibleBox (relative positioned) {DIV} at (0,92) size 300x32 - LayoutBlockFlow {DIV} at (16,2) size 28x30 [color=#FFFFFF] +layer at (9,115) size 300x48 + LayoutFlexibleBox (relative positioned) {DIV} at (0,70) size 300x48 + LayoutBlockFlow {DIV} at (16,18) size 28x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 28x16 text run at (0,7) width 28: "0:00" - LayoutBlockFlow {DIV} at (44,32) size 150x0 -layer at (203,137) size 32x32 transparent - LayoutButton {INPUT} at (194,0) size 32x32 [color=#808080] -layer at (235,137) size 32x32 transparent - LayoutButton {INPUT} at (226,0) size 32x32 [color=#808080] -layer at (267,137) size 32x32 transparent - LayoutButton {INPUT} at (258,0) size 32x32 [color=#808080] -layer at (25,174) size 268x4 + LayoutBlockFlow {DIV} at (44,48) size 102x0 +layer at (155,115) size 48x48 transparent + LayoutButton {INPUT} at (146,0) size 48x48 [color=#808080] +layer at (203,115) size 48x48 transparent + LayoutButton {INPUT} at (194,0) size 48x48 [color=#808080] +layer at (251,115) size 48x48 transparent + LayoutButton {INPUT} at (242,0) size 48x48 [color=#808080] +layer at (9,163) size 300x32 + LayoutSlider {INPUT} at (0,118) size 300x32 [color=#9D968E] + LayoutFlexibleBox {DIV} at (16,16) size 268x4 +layer at (25,179) size 268x4 LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 268x4 [bgcolor=#FFFFFF4D] -layer at (25,174) size 268x4 +layer at (25,179) size 268x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 268x4 -layer at (25,174) size 0x4 +layer at (25,179) size 0x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF] -layer at (25,174) size 0x4 +layer at (25,179) size 0x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF8A]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/media/video-no-audio-expected.png b/third_party/WebKit/LayoutTests/platform/linux/media/video-no-audio-expected.png index fcd6b3b..9fc819f3 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/media/video-no-audio-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/media/video-no-audio-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/media/video-no-audio-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/media/video-no-audio-expected.txt index a0f47cd..00215d632 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/media/video-no-audio-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/media/video-no-audio-expected.txt
@@ -16,31 +16,32 @@ LayoutFlexibleBox {DIV} at (0,0) size 352x288 layer at (8,44) size 352x288 LayoutFlexibleBox {DIV} at (0,0) size 352x288 - LayoutSlider {INPUT} at (0,262) size 352x26 [color=#9D968E] - LayoutFlexibleBox {DIV} at (16,5) size 320x4 -layer at (8,44) size 352x270 clip at (10,46) size 348x266 - LayoutButton (relative positioned) {INPUT} at (0,0) size 352x270 [border: (2px outset #C0C0C0)] - LayoutFlexibleBox (anonymous) at (8,107) size 336x56 +layer at (8,44) size 352x269 clip at (10,46) size 348x265 + LayoutButton (relative positioned) {INPUT} at (0,0) size 352x269 [border: (2px outset #C0C0C0)] + LayoutFlexibleBox (anonymous) at (8,106.50) size 336x56 LayoutBlockFlow {DIV} at (140,0) size 56x56 [bgcolor=#FFFFFFE6] -layer at (8,274) size 352x32 - LayoutFlexibleBox (relative positioned) {DIV} at (0,230) size 352x32 - LayoutBlockFlow {DIV} at (16,2) size 28x30 [color=#FFFFFF] +layer at (8,252) size 352x48 + LayoutFlexibleBox (relative positioned) {DIV} at (0,208) size 352x48 + LayoutBlockFlow {DIV} at (16,18) size 28x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 28x16 text run at (0,7) width 28: "0:00" - LayoutBlockFlow {DIV} at (48,2) size 36x30 [color=#FFFFFF] + LayoutBlockFlow {DIV} at (48,18) size 36x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 36x16 text run at (0,7) width 36: "/ 0:09" - LayoutBlockFlow {DIV} at (84,32) size 194x0 - LayoutButton {INPUT} at (310,0) size 32x32 -layer at (286,274) size 32x32 transparent - LayoutButton {INPUT} at (278,0) size 32x32 [color=#808080] -layer at (24,311) size 320x4 + LayoutBlockFlow {DIV} at (84,48) size 162x0 + LayoutButton {INPUT} at (294,0) size 48x48 +layer at (254,252) size 48x48 transparent + LayoutButton {INPUT} at (246,0) size 48x48 [color=#808080] +layer at (8,300) size 352x32 + LayoutSlider {INPUT} at (0,256) size 352x32 [color=#9D968E] + LayoutFlexibleBox {DIV} at (16,16) size 320x4 +layer at (24,316) size 320x4 LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 320x4 [bgcolor=#FFFFFF4D] -layer at (24,307) size 12x12 +layer at (24,312) size 12x12 LayoutBlockFlow (relative positioned) {DIV} at (0,-4) size 12x12 [bgcolor=#FFFFFF] -layer at (24,311) size 320x4 +layer at (24,316) size 320x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x4 -layer at (24,311) size 0x4 +layer at (24,316) size 0x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF] -layer at (24,311) size 320x4 +layer at (24,316) size 320x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x4 [bgcolor=#FFFFFF8A]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/media/video-zoom-controls-expected.png b/third_party/WebKit/LayoutTests/platform/linux/media/video-zoom-controls-expected.png index 5099c7f..8485c3b8 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/media/video-zoom-controls-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/media/video-zoom-controls-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/media/video-zoom-controls-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/media/video-zoom-controls-expected.txt index dcc2de3f..3e73ba3 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/media/video-zoom-controls-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/media/video-zoom-controls-expected.txt
@@ -14,22 +14,22 @@ LayoutFlexibleBox {DIV} at (0,0) size 240x180 layer at (57,85) size 240x180 LayoutFlexibleBox {DIV} at (0,0) size 240x180 - LayoutSlider {INPUT} at (0,141) size 240x39 [color=#9D968E] - LayoutFlexibleBox {DIV} at (24,7.50) size 192x6 -layer at (57,85) size 240x201 backgroundClip at (57,85) size 240x180 clip at (60,88) size 234x177 - LayoutButton (relative positioned) {INPUT} at (0,0) size 240x201 [border: (3px outset #C0C0C0)] - LayoutFlexibleBox (anonymous) at (12,58.50) size 216x84 +layer at (57,85) size 240x200 backgroundClip at (57,85) size 240x180 clip at (60,88) size 234x177 + LayoutButton (relative positioned) {INPUT} at (0,0) size 240x199.50 [border: (3px outset #C0C0C0)] + LayoutFlexibleBox (anonymous) at (12,57.75) size 216x84 LayoutBlockFlow {DIV} at (66,0) size 84x84 [bgcolor=#FFFFFFE6] -layer at (81,234) size 192x6 - LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 192x6 [bgcolor=#FFFFFF4D] -layer at (81,228) size 18x18 - LayoutBlockFlow (relative positioned) {DIV} at (0,-6) size 18x18 [bgcolor=#FFFFFF] -layer at (81,234) size 192x6 scrollWidth 288 - LayoutBlockFlow (positioned) {DIV} at (0,0) size 192x6 -layer at (81,234) size 0x6 - LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x6 [bgcolor=#FFFFFF] -layer at (81,234) size 288x6 backgroundClip at (81,234) size 192x6 clip at (81,234) size 192x6 - LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x6 [bgcolor=#FFFFFF8A] +layer at (57,193) size 240x72 scrollWidth 258 + LayoutFlexibleBox (relative positioned) {DIV} at (0,108) size 240x72 + LayoutBlockFlow {DIV} at (24,27) size 42x45 [color=#FFFFFF] + LayoutText {#text} at (0,10) size 42x24 + text run at (0,10) width 42: "0:00" + LayoutBlockFlow {DIV} at (72,-18) size 42x90 [color=#FFFFFF] + LayoutText {#text} at (0,10) size 42x69 + text run at (0,10) width 6: "/" + text run at (0,55) width 42: "0:06" + LayoutBlockFlow {DIV} at (114,72) size 0x0 + LayoutButton {INPUT} at (114,0) size 72x72 + LayoutButton {INPUT} at (186,0) size 72x72 layer at (57,310) size 240x180 LayoutVideo {VIDEO} at (45,298) size 240x180 layer at (57,310) size 240x180 @@ -38,19 +38,19 @@ LayoutFlexibleBox {DIV} at (0,0) size 240x180 layer at (57,310) size 240x180 LayoutFlexibleBox {DIV} at (0,0) size 240x180 - LayoutSlider {INPUT} at (0,141) size 240x39 [color=#9D968E] - LayoutFlexibleBox {DIV} at (24,7.50) size 192x6 -layer at (57,310) size 240x201 backgroundClip at (43,291) size 268x218 clip at (60,313) size 234x195 - LayoutButton (relative positioned) {INPUT} at (0,0) size 240x201 [border: (3px outset #C0C0C0)] - LayoutFlexibleBox (anonymous) at (12,58.50) size 216x84 +layer at (57,310) size 240x200 backgroundClip at (43,291) size 268x218 clip at (60,313) size 234x194 + LayoutButton (relative positioned) {INPUT} at (0,0) size 240x199.50 [border: (3px outset #C0C0C0)] + LayoutFlexibleBox (anonymous) at (12,57.75) size 216x84 LayoutBlockFlow {DIV} at (66,0) size 84x84 [bgcolor=#FFFFFFE6] -layer at (81,459) size 192x6 - LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 192x6 [bgcolor=#FFFFFF4D] -layer at (81,453) size 18x18 - LayoutBlockFlow (relative positioned) {DIV} at (0,-6) size 18x18 [bgcolor=#FFFFFF] -layer at (81,459) size 192x6 backgroundClip at (71,441) size 190x39 clip at (81,459) size 180x6 scrollWidth 288 - LayoutBlockFlow (positioned) {DIV} at (0,0) size 192x6 -layer at (81,459) size 0x6 - LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x6 [bgcolor=#FFFFFF] -layer at (81,459) size 288x6 backgroundClip at (71,441) size 190x40 clip at (71,441) size 190x40 - LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x6 [bgcolor=#FFFFFF8A] +layer at (57,418) size 240x72 backgroundClip at (43,397) size 249x112 clip at (57,418) size 235x72 scrollWidth 258 + LayoutFlexibleBox (relative positioned) {DIV} at (0,108) size 240x72 + LayoutBlockFlow {DIV} at (24,27) size 42x45 [color=#FFFFFF] + LayoutText {#text} at (0,10) size 42x24 + text run at (0,10) width 42: "0:00" + LayoutBlockFlow {DIV} at (72,-18) size 42x90 [color=#FFFFFF] + LayoutText {#text} at (0,10) size 42x69 + text run at (0,10) width 6: "/" + text run at (0,55) width 42: "0:06" + LayoutBlockFlow {DIV} at (114,72) size 0x0 + LayoutButton {INPUT} at (114,0) size 72x72 + LayoutButton {INPUT} at (186,0) size 72x72
diff --git a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/bugzilla-6473-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/bugzilla-6473-expected.txt index 478a9dec..9349e15 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/bugzilla-6473-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/bugzilla-6473-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutBlockFlow (relative positioned) P", "rect": [8, 152, 784, 20], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutBlockFlow (relative positioned) P",
diff --git a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/clip/control-clip-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/clip/control-clip-expected.txt index 13e593c7..6b4b301 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/clip/control-clip-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/clip/control-clip-expected.txt
@@ -20,7 +20,7 @@ { "object": "InlineTextBox 'SUCCESS'", "rect": [76, 117, 64, 16], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox 'SUCCESS'", @@ -30,7 +30,7 @@ { "object": "InlineTextBox 'FAILURE'", "rect": [81, 117, 54, 16], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "InlineTextBox 'FAILURE'",
diff --git a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/clip/outline-clip-change-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/clip/outline-clip-change-expected.txt index 6fa23d6..91c9e8e 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/clip/outline-clip-change-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/clip/outline-clip-change-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutBlockFlow (positioned) A id='link' class='updated'", "rect": [48, 108, 90, 25], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox 'Lorem Ipsum'",
diff --git a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/css-grid-layout/grid-item-z-index-change-repaint-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/css-grid-layout/grid-item-z-index-change-repaint-expected.txt index bcdd941..31691856 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/css-grid-layout/grid-item-z-index-change-repaint-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/css-grid-layout/grid-item-z-index-change-repaint-expected.txt
@@ -20,17 +20,17 @@ { "object": "LayoutBlockFlow HTML", "rect": [8, 16, 454, 320], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutBlockFlow HTML", "rect": [8, 16, 454, 320], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutBlockFlow DIV id='item2' class='sizedToGridArea green'", "rect": [8, 236, 200, 100], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/forms/textarea-caret-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/forms/textarea-caret-expected.txt index 09209bd..f51eb3f 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/forms/textarea-caret-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/forms/textarea-caret-expected.txt
@@ -20,22 +20,22 @@ { "object": "LayoutTextControl TEXTAREA id='editor'", "rect": [7, 7, 183, 40], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutTextControl TEXTAREA id='editor'", "rect": [7, 7, 183, 40], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutBlockFlow HTML", "rect": [8, 8, 181, 38], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutTextControl TEXTAREA id='editor'", "rect": [9, 11, 179, 16], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/invalidation-after-opacity-change-subtree-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/invalidation-after-opacity-change-subtree-expected.txt index 36eaba3..549161b 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/invalidation-after-opacity-change-subtree-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/invalidation-after-opacity-change-subtree-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutBlockFlow HTML", "rect": [8, 2046, 774, 257], - "reason": "appeared" + "reason": "chunk appeared" } ], "transform": 1
diff --git a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/multicol/multicol-with-relpos-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/multicol/multicol-with-relpos-expected.txt new file mode 100644 index 0000000..89f46c0 --- /dev/null +++ b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/multicol/multicol-with-relpos-expected.txt
@@ -0,0 +1,35 @@ +{ + "layers": [ + { + "name": "LayoutView #document", + "bounds": [800, 600], + "drawsContent": false, + "backgroundColor": "#FFFFFF" + }, + { + "name": "Scrolling Layer", + "bounds": [800, 600], + "drawsContent": false + }, + { + "name": "Scrolling Contents Layer", + "bounds": [800, 600], + "contentsOpaque": true, + "backgroundColor": "#FFFFFF", + "paintInvalidations": [ + { + "object": "LayoutBlockFlow (relative positioned) DIV id='target'", + "rect": [508, 28, 150, 20], + "reason": "chunk appeared" + } + ] + } + ], + "objectPaintInvalidations": [ + { + "object": "LayoutBlockFlow (relative positioned) DIV id='target'", + "reason": "style change" + } + ] +} +
diff --git a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/overflow/opacity-change-on-overflow-float-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/overflow/opacity-change-on-overflow-float-expected.txt index 41776cd0..338cf71 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/overflow/opacity-change-on-overflow-float-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/overflow/opacity-change-on-overflow-float-expected.txt
@@ -45,17 +45,12 @@ { "object": "LayoutBlockFlow HTML", "rect": [8, 8, 761, 59], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutBlockFlow (floating) DIV class='green'", "rect": [8, 84, 100, 100], - "reason": "disappeared" - }, - { - "object": "LayoutBlockFlow (floating) DIV class='red'", - "rect": [8, 84, 100, 100], - "reason": "appeared" + "reason": "chunk disappeared" }, { "object": "LayoutBlockFlow (floating) DIV class='red'", @@ -63,6 +58,11 @@ "reason": "disappeared" }, { + "object": "LayoutBlockFlow (floating) DIV class='red'", + "rect": [8, 84, 100, 100], + "reason": "chunk appeared" + }, + { "object": "InlineTextBox 'Repaint test for '", "rect": [8, 8, 100, 19], "reason": "disappeared"
diff --git a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/overflow/overflow-delete-line-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/overflow/overflow-delete-line-expected.txt index 64ae1d8..82f0e8f 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/overflow/overflow-delete-line-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/overflow/overflow-delete-line-expected.txt
@@ -25,7 +25,7 @@ { "object": "LayoutBlockFlow DIV id='dv'", "rect": [8, 74, 46, 36], - "reason": "disappeared" + "reason": "chunk disappeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/remove-inline-layer-after-layout-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/remove-inline-layer-after-layout-expected.txt index 54db8d4..1a4783c 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/remove-inline-layer-after-layout-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/remove-inline-layer-after-layout-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutInline SPAN id='target'", "rect": [112, 193, 178, 19], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutBlockFlow DIV",
diff --git a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/resize-iframe-text-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/resize-iframe-text-expected.txt index 8314f5dd..ffb03269 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/resize-iframe-text-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/resize-iframe-text-expected.txt
@@ -25,12 +25,12 @@ { "object": "LayoutBlockFlow HTML", "rect": [8, 300, 60, 22], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutView #document", "rect": [485, 0, 15, 200], - "reason": "disappeared" + "reason": "chunk disappeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/scroll/invalidate-caret-in-composited-scrolling-container-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/scroll/invalidate-caret-in-composited-scrolling-container-expected.txt index 0d32b6a0c..1731342 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/scroll/invalidate-caret-in-composited-scrolling-container-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/scroll/invalidate-caret-in-composited-scrolling-container-expected.txt
@@ -51,7 +51,7 @@ { "object": "Caret", "rect": [58, 4, 1, 16], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/scroll/invalidate-caret-in-non-composited-scrolling-container-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/scroll/invalidate-caret-in-non-composited-scrolling-container-expected.txt index 0d32b6a0c..1731342 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/scroll/invalidate-caret-in-non-composited-scrolling-container-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/scroll/invalidate-caret-in-non-composited-scrolling-container-expected.txt
@@ -51,7 +51,7 @@ { "object": "Caret", "rect": [58, 4, 1, 16], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/search-field-cancel-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/search-field-cancel-expected.txt index c6b5c44..eedb3b3 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/search-field-cancel-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/search-field-cancel-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutBlockFlow DIV", "rect": [11, 47, 58, 16], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/svg/ems-display-none-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/svg/ems-display-none-expected.txt index e1532be7..a149ff99b 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/svg/ems-display-none-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/svg/ems-display-none-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutSVGRoot svg", "rect": [50, 54, 571, 86], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/svg/exs-display-none-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/svg/exs-display-none-expected.txt index ac1844c..72f0aad6 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/svg/exs-display-none-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/svg/exs-display-none-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutSVGRoot svg", "rect": [50, 52, 571, 84], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/svg/inner-svg-change-viewPort-relative-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/svg/inner-svg-change-viewPort-relative-expected.txt index f5f79bff..1a649cc0 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/svg/inner-svg-change-viewPort-relative-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/svg/inner-svg-change-viewPort-relative-expected.txt
@@ -25,7 +25,7 @@ { "object": "InlineTextBox 'right-aligned text'", "rect": [93, 85, 107, 19], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGViewportContainer svg id='inner'", @@ -35,7 +35,7 @@ { "object": "InlineTextBox 'right-aligned text'", "rect": [0, 85, 100, 19], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGContainer use",
diff --git a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/svg/js-late-pattern-and-object-creation-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/svg/js-late-pattern-and-object-creation-expected.txt index d333cf3..456a8b4 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/svg/js-late-pattern-and-object-creation-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/svg/js-late-pattern-and-object-creation-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutSVGRoot svg id='svg-root'", "rect": [0, 15, 682, 365], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/svg/tabgroup-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/svg/tabgroup-expected.txt index e0ffdfe..0dd3821 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/svg/tabgroup-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/svg/tabgroup-expected.txt
@@ -20,67 +20,67 @@ { "object": "LayoutSVGContainer g", "rect": [388, 37, 318, 83], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer g", "rect": [261, 277, 305, 305], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer g", "rect": [5, 255, 240, 162], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGPath path", "rect": [5, 255, 240, 162], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGPath path", "rect": [5, 255, 240, 162], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGPath path", "rect": [5, 255, 240, 162], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer g", "rect": [505, 232, 240, 161], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox 'This is a tabgroup with triangular tab corners'", "rect": [15, 291, 211, 37], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer g id='tabgroupRect'", "rect": [37, 5, 161, 240], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGText text", "rect": [66, 257, 57, 29], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGText text", "rect": [10, 257, 50, 29], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGText text", "rect": [130, 257, 47, 29], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGText text", "rect": [183, 257, 32, 29], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/svg/text-mask-update-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/svg/text-mask-update-expected.txt index 19d1ca5..216fa78 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/svg/text-mask-update-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/svg/text-mask-update-expected.txt
@@ -20,22 +20,22 @@ { "object": "LayoutSVGRect rect", "rect": [10, 3, 45, 22], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGRect rect", "rect": [10, 3, 45, 22], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGRect rect", "rect": [10, 33, 43, 17], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGRect rect", "rect": [10, 33, 43, 17], - "reason": "disappeared" + "reason": "chunk disappeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/svg/text-repaint-including-stroke-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/svg/text-repaint-including-stroke-expected.txt index 6905db4..b6bdf6f 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/svg/text-repaint-including-stroke-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/svg/text-repaint-including-stroke-expected.txt
@@ -20,12 +20,12 @@ { "object": "LayoutSVGText text id='bounce'", "rect": [80, 0, 553, 117], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGRoot svg", "rect": [30, 0, 404, 59], - "reason": "disappeared" + "reason": "chunk disappeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/svg/text-rescale-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/svg/text-rescale-expected.txt index d397a39..646a2a7 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/svg/text-rescale-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/svg/text-rescale-expected.txt
@@ -20,12 +20,12 @@ { "object": "InlineTextBox 'PASS '", "rect": [0, 114, 192, 46], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGRoot (positioned) svg", "rect": [0, 14, 192, 46], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGViewportContainer svg", @@ -35,7 +35,7 @@ { "object": "LayoutSVGViewportContainer svg", "rect": [310, 14, 91, 46], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGForeignObject foreignObject", @@ -50,7 +50,7 @@ { "object": "LayoutSVGContainer g id='text3g'", "rect": [0, 3, 8, 3], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGViewportContainer svg",
diff --git a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/svg/text-selection-text-05-t-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/svg/text-selection-text-05-t-expected.txt index 54a2387..c041850 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/svg/text-selection-text-05-t-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/svg/text-selection-text-05-t-expected.txt
@@ -20,12 +20,12 @@ { "object": "InlineTextBox '$Revision: 1.8 $'", "rect": [0, 0, 800, 600], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text id='revision'", "rect": [0, 0, 800, 600], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox 'text-anchor'", @@ -60,62 +60,62 @@ { "object": "InlineTextBox '1'", "rect": [266, 485, 113, 29], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [266, 485, 113, 29], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox '1'", "rect": [266, 201, 113, 21], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [266, 201, 113, 21], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox '1'", "rect": [428, 485, 104, 29], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [428, 485, 104, 29], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox '1'", "rect": [428, 201, 104, 21], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [428, 201, 104, 21], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox '1'", "rect": [590, 485, 94, 29], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [590, 485, 94, 29], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox '1'", "rect": [590, 201, 94, 21], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [590, 201, 94, 21], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox 'middle'", @@ -220,92 +220,92 @@ { "object": "InlineTextBox '1'", "rect": [428, 285, 61, 54], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [428, 285, 61, 54], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox '1'", "rect": [266, 285, 61, 54], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [266, 285, 61, 54], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox '1'", "rect": [428, 435, 61, 29], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [428, 435, 61, 29], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox '1'", "rect": [266, 435, 61, 29], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [266, 435, 61, 29], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox '1'", "rect": [428, 151, 61, 21], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [428, 151, 61, 21], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox '1'", "rect": [266, 151, 61, 21], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [266, 151, 61, 21], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox '1'", "rect": [590, 285, 60, 54], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [590, 285, 60, 54], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox '1'", "rect": [590, 435, 60, 29], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [590, 435, 60, 29], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox '1'", "rect": [590, 151, 60, 21], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [590, 151, 60, 21], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox 'start'", @@ -320,32 +320,32 @@ { "object": "InlineTextBox '1'", "rect": [428, 335, 46, 54], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [428, 335, 46, 54], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox '1'", "rect": [266, 335, 46, 54], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [266, 335, 46, 54], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox '1'", "rect": [590, 335, 45, 54], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [590, 335, 45, 54], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox 'end'", @@ -360,92 +360,92 @@ { "object": "InlineTextBox '1'", "rect": [573, 235, 39, 54], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [573, 235, 39, 54], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox '1'", "rect": [411, 235, 38, 54], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [411, 235, 38, 54], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox '1234'", "rect": [546, 101, 38, 21], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [546, 101, 38, 21], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox '1'", "rect": [250, 235, 37, 54], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [250, 235, 37, 54], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox '1'", "rect": [250, 385, 37, 45], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [250, 385, 37, 45], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox '1234'", "rect": [398, 101, 37, 21], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [398, 101, 37, 21], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox '1234'", "rect": [250, 101, 37, 21], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [250, 101, 37, 21], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox '1'", "rect": [565, 385, 29, 45], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [565, 385, 29, 45], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox '1'", "rect": [411, 385, 29, 45], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [411, 385, 29, 45], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/svg/text-viewbox-rescale-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/svg/text-viewbox-rescale-expected.txt index 810863e..b730cbc 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/svg/text-viewbox-rescale-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/svg/text-viewbox-rescale-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutSVGViewportContainer svg id='inner1'", "rect": [0, 0, 200, 200], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox 'PASS '",
diff --git a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/svg/use-clipped-hit-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/svg/use-clipped-hit-expected.txt index 05ae1f1..e87feae 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/svg/use-clipped-hit-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/svg/use-clipped-hit-expected.txt
@@ -20,12 +20,12 @@ { "object": "InlineTextBox 'Unknown'", "rect": [90, 115, 64, 19], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "InlineTextBox 'Passed'", "rect": [90, 115, 43, 19], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/svg/use-detach-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/svg/use-detach-expected.txt index a5d9f10..ee11048 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/svg/use-detach-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/svg/use-detach-expected.txt
@@ -20,17 +20,17 @@ { "object": "LayoutSVGContainer g", "rect": [207, 57, 50, 66], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer g", "rect": [207, 57, 50, 66], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer g", "rect": [207, 57, 50, 66], - "reason": "disappeared" + "reason": "chunk disappeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/transform/transform-inline-layered-child-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/transform/transform-inline-layered-child-expected.txt index 5394ef0..7a20a26 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/transform/transform-inline-layered-child-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/transform/transform-inline-layered-child-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutInline (relative positioned) SPAN id='child'", "rect": [135, 361, 159, 195], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox 'A B C'",
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/android/fullscreen/full-screen-iframe-allowed-video-expected.png b/third_party/WebKit/LayoutTests/platform/linux/virtual/android/fullscreen/full-screen-iframe-allowed-video-expected.png index b2f9564..31910feb 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/android/fullscreen/full-screen-iframe-allowed-video-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/android/fullscreen/full-screen-iframe-allowed-video-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/android/fullscreen/video-controls-timeline-expected.png b/third_party/WebKit/LayoutTests/platform/linux/virtual/android/fullscreen/video-controls-timeline-expected.png index 61432ae4..fcc020f 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/android/fullscreen/video-controls-timeline-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/android/fullscreen/video-controls-timeline-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/android/fullscreen/video-scrolled-iframe-expected.png b/third_party/WebKit/LayoutTests/platform/linux/virtual/android/fullscreen/video-scrolled-iframe-expected.png index b2f9564..31910feb 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/android/fullscreen/video-scrolled-iframe-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/android/fullscreen/video-scrolled-iframe-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/disable-spv175/compositing/video/video-controls-layer-creation-expected.png b/third_party/WebKit/LayoutTests/platform/linux/virtual/disable-spv175/compositing/video/video-controls-layer-creation-expected.png index 8c773c4..22694d89a 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/disable-spv175/compositing/video/video-controls-layer-creation-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/disable-spv175/compositing/video/video-controls-layer-creation-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/layout_ng_experimental/fast/multicol/composited-layer-multiple-fragments-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/virtual/layout_ng_experimental/fast/multicol/composited-layer-multiple-fragments-expected.txt index 79b4f51..95dbcb2 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/layout_ng_experimental/fast/multicol/composited-layer-multiple-fragments-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/layout_ng_experimental/fast/multicol/composited-layer-multiple-fragments-expected.txt
@@ -26,15 +26,15 @@ LayoutNGBlockFlow {DIV} at (0,20) size 20x20 [bgcolor=#008000] LayoutNGBlockFlow {DIV} at (0,140) size 20x20 [bgcolor=#008000] LayoutNGBlockFlow {DIV} at (0,160) size 20x20 [bgcolor=#008000] -layer at (8,144) size 20x40 backgroundClip at (0,0) size 28x164 clip at (0,0) size 28x164 +layer at (8,144) size 20x40 LayoutNGBlockFlow {DIV} at (0,40) size 20x40 LayoutNGBlockFlow {DIV} at (0,0) size 20x20 [bgcolor=#008000] LayoutNGBlockFlow {DIV} at (0,20) size 20x20 [bgcolor=#008000] -layer at (28,144) size 20x40 backgroundClip at (0,0) size 28x164 clip at (0,0) size 28x164 +layer at (28,144) size 20x40 LayoutNGBlockFlow {DIV} at (0,100) size 20x40 LayoutNGBlockFlow {DIV} at (0,0) size 20x20 [bgcolor=#008000] LayoutNGBlockFlow {DIV} at (0,20) size 20x20 [bgcolor=#008000] -layer at (8,252) size 20x100 backgroundClip at (0,0) size 28x272 clip at (0,0) size 28x272 +layer at (8,252) size 20x100 LayoutNGBlockFlow {DIV} at (0,40) size 20x100 LayoutNGBlockFlow {DIV} at (0,0) size 20x20 [bgcolor=#008000] LayoutNGBlockFlow {DIV} at (0,20) size 20x20 [bgcolor=#008000]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/layout_ng_experimental/fast/multicol/composited-layer-multiple-fragments-translated-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/virtual/layout_ng_experimental/fast/multicol/composited-layer-multiple-fragments-translated-expected.txt index a81e15a..6794dea0d 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/layout_ng_experimental/fast/multicol/composited-layer-multiple-fragments-translated-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/layout_ng_experimental/fast/multicol/composited-layer-multiple-fragments-translated-expected.txt
@@ -19,7 +19,7 @@ LayoutBR {BR} at (0,0) size 0x0 LayoutBR {BR} at (0,0) size 0x0 LayoutNGBlockFlow {DIV} at (0,160) size 20x20 [bgcolor=#FF0000] -layer at (28,112) size 20x60 backgroundClip at (0,0) size 28x132 clip at (0,0) size 28x132 +layer at (28,112) size 20x60 LayoutNGBlockFlow {DIV} at (0,100) size 20x60 LayoutNGBlockFlow {DIV} at (0,0) size 20x20 [bgcolor=#008000] LayoutNGBlockFlow (anonymous) at (0,20) size 20x20
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/layout_ng_experimental/fast/multicol/composited-layer-nested-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/virtual/layout_ng_experimental/fast/multicol/composited-layer-nested-expected.txt index 210abc6c..e8b723d 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/layout_ng_experimental/fast/multicol/composited-layer-nested-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/layout_ng_experimental/fast/multicol/composited-layer-nested-expected.txt
@@ -22,30 +22,30 @@ LayoutMultiColumnSet (anonymous) at (0,0) size 60x60 layer at (8,212) size 20x180 backgroundClip at (0,0) size 28x272 clip at (0,0) size 28x272 LayoutMultiColumnFlowThread (anonymous) at (0,0) size 20x180 -layer at (8,124) size 20x80 backgroundClip at (0,0) size 28x164 clip at (0,0) size 28x164 +layer at (8,124) size 20x80 LayoutNGBlockFlow {DIV} at (0,20) size 20x80 LayoutNGBlockFlow {DIV} at (0,0) size 20x20 [bgcolor=#008000] LayoutNGBlockFlow {DIV} at (0,60) size 20x20 [bgcolor=#008000] -layer at (8,144) size 20x40 backgroundClip at (0,0) size 28x164 clip at (0,0) size 28x164 +layer at (8,144) size 20x40 LayoutNGBlockFlow {DIV} at (0,20) size 20x40 LayoutNGBlockFlow {DIV} at (0,0) size 20x20 [bgcolor=#008000] LayoutNGBlockFlow {DIV} at (0,20) size 20x20 [bgcolor=#008000] -layer at (8,212) size 20x180 backgroundClip at (0,0) size 28x272 clip at (0,0) size 28x272 +layer at (8,212) size 20x180 LayoutNGBlockFlow {DIV} at (0,0) size 20x180 LayoutNGBlockFlow {DIV} at (0,80) size 20x20 [bgcolor=#008000] -layer at (8,212) size 20x80 backgroundClip at (0,0) size 28x272 clip at (0,0) size 28x272 +layer at (8,212) size 20x80 LayoutNGBlockFlow {DIV} at (0,0) size 20x80 LayoutNGBlockFlow {DIV} at (0,0) size 20x20 [bgcolor=#008000] LayoutNGBlockFlow {DIV} at (0,20) size 20x20 [bgcolor=#008000] -layer at (8,252) size 20x40 backgroundClip at (0,0) size 28x272 clip at (0,0) size 28x272 +layer at (8,252) size 20x40 LayoutNGBlockFlow {DIV} at (0,40) size 20x40 LayoutNGBlockFlow {DIV} at (0,0) size 20x20 [bgcolor=#008000] LayoutNGBlockFlow {DIV} at (0,20) size 20x20 [bgcolor=#008000] -layer at (8,312) size 20x80 backgroundClip at (0,0) size 28x272 clip at (0,0) size 28x272 +layer at (8,312) size 20x80 LayoutNGBlockFlow {DIV} at (0,100) size 20x80 LayoutNGBlockFlow {DIV} at (0,40) size 20x20 [bgcolor=#008000] LayoutNGBlockFlow {DIV} at (0,60) size 20x20 [bgcolor=#008000] -layer at (8,312) size 20x40 backgroundClip at (0,0) size 28x272 clip at (0,0) size 28x272 +layer at (8,312) size 20x40 LayoutNGBlockFlow {DIV} at (0,0) size 20x40 LayoutNGBlockFlow {DIV} at (0,0) size 20x20 [bgcolor=#008000] LayoutNGBlockFlow {DIV} at (0,20) size 20x20 [bgcolor=#008000]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/layout_ng_experimental/fast/multicol/composited-layer-will-change-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/virtual/layout_ng_experimental/fast/multicol/composited-layer-will-change-expected.txt index dfab3f0..0ee84f905 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/layout_ng_experimental/fast/multicol/composited-layer-will-change-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/layout_ng_experimental/fast/multicol/composited-layer-will-change-expected.txt
@@ -34,11 +34,11 @@ layer at (8,104) size 20x20 LayoutNGBlockFlow {DIV} at (0,0) size 20x20 LayoutNGBlockFlow {DIV} at (0,0) size 20x20 [bgcolor=#008000] -layer at (8,144) size 20x40 backgroundClip at (0,0) size 28x164 clip at (0,0) size 28x164 +layer at (8,144) size 20x40 LayoutNGBlockFlow {DIV} at (0,40) size 20x40 LayoutNGBlockFlow {DIV} at (0,0) size 20x20 [bgcolor=#008000] LayoutNGBlockFlow {DIV} at (0,20) size 20x20 [bgcolor=#008000] -layer at (28,144) size 20x60 backgroundClip at (0,0) size 28x164 clip at (0,0) size 28x164 +layer at (28,144) size 20x60 LayoutNGBlockFlow {DIV} at (0,100) size 20x60 LayoutNGBlockFlow {DIV} at (0,0) size 20x20 [bgcolor=#008000] LayoutNGBlockFlow {DIV} at (0,20) size 20x20 [bgcolor=#008000] @@ -46,11 +46,11 @@ layer at (8,212) size 20x20 LayoutNGBlockFlow {DIV} at (0,0) size 20x20 LayoutNGBlockFlow {DIV} at (0,0) size 20x20 [bgcolor=#008000] -layer at (8,252) size 20x40 backgroundClip at (0,0) size 28x272 clip at (0,0) size 28x272 +layer at (8,252) size 20x40 LayoutNGBlockFlow {DIV} at (0,40) size 20x40 LayoutNGBlockFlow {DIV} at (0,0) size 20x20 [bgcolor=#008000] LayoutNGBlockFlow {DIV} at (0,20) size 20x20 [bgcolor=#008000] -layer at (28,252) size 20x60 backgroundClip at (0,0) size 28x272 clip at (0,0) size 28x272 +layer at (28,252) size 20x60 LayoutNGBlockFlow {DIV} at (0,100) size 20x60 LayoutNGBlockFlow {DIV} at (0,0) size 20x20 [bgcolor=#008000] LayoutNGBlockFlow {DIV} at (0,20) size 20x20 [bgcolor=#008000] @@ -58,11 +58,11 @@ layer at (8,320) size 20x20 LayoutNGBlockFlow (relative positioned) {DIV} at (0,0) size 20x20 LayoutNGBlockFlow {DIV} at (0,0) size 20x20 [bgcolor=#008000] -layer at (8,360) size 20x40 backgroundClip at (0,0) size 28x380 clip at (0,0) size 28x380 +layer at (8,360) size 20x40 LayoutNGBlockFlow (relative positioned) {DIV} at (0,40) size 20x40 LayoutNGBlockFlow {DIV} at (0,0) size 20x20 [bgcolor=#008000] LayoutNGBlockFlow {DIV} at (0,20) size 20x20 [bgcolor=#008000] -layer at (28,360) size 20x60 backgroundClip at (0,0) size 28x380 clip at (0,0) size 28x380 +layer at (28,360) size 20x60 LayoutNGBlockFlow (relative positioned) {DIV} at (0,100) size 20x60 LayoutNGBlockFlow {DIV} at (0,0) size 20x20 [bgcolor=#008000] LayoutNGBlockFlow {DIV} at (0,20) size 20x20 [bgcolor=#008000]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/new-remote-playback-pipeline/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.png b/third_party/WebKit/LayoutTests/platform/linux/virtual/new-remote-playback-pipeline/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.png index 4ab1598..b5b7b519 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/new-remote-playback-pipeline/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/new-remote-playback-pipeline/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/new-remote-playback-pipeline/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/virtual/new-remote-playback-pipeline/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.txt index 56f85d9..9e606dc 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/new-remote-playback-pipeline/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/new-remote-playback-pipeline/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.txt
@@ -12,31 +12,32 @@ LayoutFlexibleBox {DIV} at (0,0) size 400x327.27 layer at (8,8) size 400x327 LayoutFlexibleBox {DIV} at (0,0) size 400x327.27 - LayoutSlider {INPUT} at (0,301.27) size 400x26 [color=#9D968E] - LayoutFlexibleBox {DIV} at (16,5) size 368x4 -layer at (8,8) size 400x309 clip at (10,10) size 396x305 - LayoutButton (relative positioned) {INPUT} at (0,0) size 400x309.27 [border: (2px outset #C0C0C0)] - LayoutFlexibleBox (anonymous) at (8,126.63) size 384x56 +layer at (8,8) size 400x308 clip at (10,10) size 396x304 + LayoutButton (relative positioned) {INPUT} at (0,0) size 400x308.27 [border: (2px outset #C0C0C0)] + LayoutFlexibleBox (anonymous) at (8,126.13) size 384x56 LayoutBlockFlow {DIV} at (164,0) size 56x56 [bgcolor=#FFFFFFE6] -layer at (8,277) size 400x32 - LayoutFlexibleBox (relative positioned) {DIV} at (0,269.27) size 400x32 - LayoutBlockFlow {DIV} at (16,2) size 28x30 [color=#FFFFFF] +layer at (8,255) size 400x48 + LayoutFlexibleBox (relative positioned) {DIV} at (0,247.27) size 400x48 + LayoutBlockFlow {DIV} at (16,18) size 28x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 28x16 text run at (0,7) width 28: "0:00" - LayoutBlockFlow {DIV} at (48,2) size 36x30 [color=#FFFFFF] + LayoutBlockFlow {DIV} at (48,18) size 36x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 36x16 text run at (0,7) width 36: "/ 0:09" - LayoutBlockFlow {DIV} at (84,32) size 242x0 - LayoutButton {INPUT} at (358,0) size 32x32 -layer at (334,277) size 32x32 transparent - LayoutButton {INPUT} at (326,0) size 32x32 [color=#808080] -layer at (24,314) size 368x4 + LayoutBlockFlow {DIV} at (84,48) size 210x0 + LayoutButton {INPUT} at (342,0) size 48x48 +layer at (302,255) size 48x48 transparent + LayoutButton {INPUT} at (294,0) size 48x48 [color=#808080] +layer at (8,303) size 400x32 + LayoutSlider {INPUT} at (0,295.27) size 400x32 [color=#9D968E] + LayoutFlexibleBox {DIV} at (16,16) size 368x4 +layer at (24,319) size 368x4 LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 368x4 [bgcolor=#FFFFFF4D] -layer at (24,310) size 12x12 +layer at (24,315) size 12x12 LayoutBlockFlow (relative positioned) {DIV} at (0,-4) size 12x12 [bgcolor=#FFFFFF] -layer at (24,314) size 368x4 +layer at (24,319) size 368x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 368x4 -layer at (24,314) size 0x4 +layer at (24,319) size 0x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF] -layer at (24,314) size 368x4 +layer at (24,319) size 368x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 368x4 [bgcolor=#FFFFFF8A]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/new-remote-playback-pipeline/media/controls/paint-controls-webkit-appearance-none-expected.png b/third_party/WebKit/LayoutTests/platform/linux/virtual/new-remote-playback-pipeline/media/controls/paint-controls-webkit-appearance-none-expected.png index 4ab1598..b5b7b519 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/new-remote-playback-pipeline/media/controls/paint-controls-webkit-appearance-none-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/new-remote-playback-pipeline/media/controls/paint-controls-webkit-appearance-none-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/new-remote-playback-pipeline/media/controls/paint-controls-webkit-appearance-none-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/virtual/new-remote-playback-pipeline/media/controls/paint-controls-webkit-appearance-none-expected.txt index 56f85d9..9e606dc 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/new-remote-playback-pipeline/media/controls/paint-controls-webkit-appearance-none-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/new-remote-playback-pipeline/media/controls/paint-controls-webkit-appearance-none-expected.txt
@@ -12,31 +12,32 @@ LayoutFlexibleBox {DIV} at (0,0) size 400x327.27 layer at (8,8) size 400x327 LayoutFlexibleBox {DIV} at (0,0) size 400x327.27 - LayoutSlider {INPUT} at (0,301.27) size 400x26 [color=#9D968E] - LayoutFlexibleBox {DIV} at (16,5) size 368x4 -layer at (8,8) size 400x309 clip at (10,10) size 396x305 - LayoutButton (relative positioned) {INPUT} at (0,0) size 400x309.27 [border: (2px outset #C0C0C0)] - LayoutFlexibleBox (anonymous) at (8,126.63) size 384x56 +layer at (8,8) size 400x308 clip at (10,10) size 396x304 + LayoutButton (relative positioned) {INPUT} at (0,0) size 400x308.27 [border: (2px outset #C0C0C0)] + LayoutFlexibleBox (anonymous) at (8,126.13) size 384x56 LayoutBlockFlow {DIV} at (164,0) size 56x56 [bgcolor=#FFFFFFE6] -layer at (8,277) size 400x32 - LayoutFlexibleBox (relative positioned) {DIV} at (0,269.27) size 400x32 - LayoutBlockFlow {DIV} at (16,2) size 28x30 [color=#FFFFFF] +layer at (8,255) size 400x48 + LayoutFlexibleBox (relative positioned) {DIV} at (0,247.27) size 400x48 + LayoutBlockFlow {DIV} at (16,18) size 28x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 28x16 text run at (0,7) width 28: "0:00" - LayoutBlockFlow {DIV} at (48,2) size 36x30 [color=#FFFFFF] + LayoutBlockFlow {DIV} at (48,18) size 36x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 36x16 text run at (0,7) width 36: "/ 0:09" - LayoutBlockFlow {DIV} at (84,32) size 242x0 - LayoutButton {INPUT} at (358,0) size 32x32 -layer at (334,277) size 32x32 transparent - LayoutButton {INPUT} at (326,0) size 32x32 [color=#808080] -layer at (24,314) size 368x4 + LayoutBlockFlow {DIV} at (84,48) size 210x0 + LayoutButton {INPUT} at (342,0) size 48x48 +layer at (302,255) size 48x48 transparent + LayoutButton {INPUT} at (294,0) size 48x48 [color=#808080] +layer at (8,303) size 400x32 + LayoutSlider {INPUT} at (0,295.27) size 400x32 [color=#9D968E] + LayoutFlexibleBox {DIV} at (16,16) size 368x4 +layer at (24,319) size 368x4 LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 368x4 [bgcolor=#FFFFFF4D] -layer at (24,310) size 12x12 +layer at (24,315) size 12x12 LayoutBlockFlow (relative positioned) {DIV} at (0,-4) size 12x12 [bgcolor=#FFFFFF] -layer at (24,314) size 368x4 +layer at (24,319) size 368x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 368x4 -layer at (24,314) size 0x4 +layer at (24,319) size 0x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF] -layer at (24,314) size 368x4 +layer at (24,319) size 368x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 368x4 [bgcolor=#FFFFFF8A]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/new-remote-playback-pipeline/media/controls/video-controls-with-cast-rendering-expected.png b/third_party/WebKit/LayoutTests/platform/linux/virtual/new-remote-playback-pipeline/media/controls/video-controls-with-cast-rendering-expected.png index ca2494bd..ed7fcdc 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/new-remote-playback-pipeline/media/controls/video-controls-with-cast-rendering-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/new-remote-playback-pipeline/media/controls/video-controls-with-cast-rendering-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/new-remote-playback-pipeline/media/controls/video-controls-with-cast-rendering-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/virtual/new-remote-playback-pipeline/media/controls/video-controls-with-cast-rendering-expected.txt index 5bebcdd..6e28da8 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/new-remote-playback-pipeline/media/controls/video-controls-with-cast-rendering-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/new-remote-playback-pipeline/media/controls/video-controls-with-cast-rendering-expected.txt
@@ -21,33 +21,34 @@ LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,52) size 320x240 LayoutFlexibleBox {DIV} at (0,0) size 320x240 - LayoutSlider {INPUT} at (0,214) size 320x26 [color=#9D968E] - LayoutFlexibleBox {DIV} at (16,5) size 288x4 -layer at (8,52) size 320x222 clip at (10,54) size 316x218 - LayoutButton (relative positioned) {INPUT} at (0,0) size 320x222 [border: (2px outset #C0C0C0)] - LayoutFlexibleBox (anonymous) at (8,83) size 304x56 +layer at (8,52) size 320x221 clip at (10,54) size 316x217 + LayoutButton (relative positioned) {INPUT} at (0,0) size 320x221 [border: (2px outset #C0C0C0)] + LayoutFlexibleBox (anonymous) at (8,82.50) size 304x56 LayoutBlockFlow {DIV} at (124,0) size 56x56 [bgcolor=#FFFFFFE6] -layer at (8,234) size 320x32 - LayoutFlexibleBox (relative positioned) {DIV} at (0,182) size 320x32 - LayoutBlockFlow {DIV} at (16,2) size 28x30 [color=#FFFFFF] +layer at (8,212) size 320x48 + LayoutFlexibleBox (relative positioned) {DIV} at (0,160) size 320x48 + LayoutBlockFlow {DIV} at (16,18) size 28x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 28x16 text run at (0,7) width 28: "0:00" - LayoutBlockFlow {DIV} at (48,2) size 36x30 [color=#FFFFFF] + LayoutBlockFlow {DIV} at (48,18) size 36x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 36x16 text run at (0,7) width 36: "/ 0:06" - LayoutBlockFlow {DIV} at (84,32) size 130x0 - LayoutButton {INPUT} at (214,0) size 32x32 - LayoutButton {INPUT} at (246,0) size 32x32 - LayoutButton {INPUT} at (278,0) size 32x32 -layer at (24,271) size 288x4 + LayoutBlockFlow {DIV} at (84,48) size 82x0 + LayoutButton {INPUT} at (166,0) size 48x48 + LayoutButton {INPUT} at (214,0) size 48x48 + LayoutButton {INPUT} at (262,0) size 48x48 +layer at (8,260) size 320x32 + LayoutSlider {INPUT} at (0,208) size 320x32 [color=#9D968E] + LayoutFlexibleBox {DIV} at (16,16) size 288x4 +layer at (24,276) size 288x4 LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF4D] -layer at (24,267) size 12x12 +layer at (24,272) size 12x12 LayoutBlockFlow (relative positioned) {DIV} at (0,-4) size 12x12 [bgcolor=#FFFFFF] -layer at (24,271) size 288x4 +layer at (24,276) size 288x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 -layer at (24,271) size 0x4 +layer at (24,276) size 0x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF] -layer at (24,271) size 288x4 +layer at (24,276) size 288x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF8A] layer at (8,297) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 @@ -55,33 +56,34 @@ LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,297) size 320x240 LayoutFlexibleBox {DIV} at (0,0) size 320x240 - LayoutSlider {INPUT} at (0,214) size 320x26 [color=#9D968E] - LayoutFlexibleBox {DIV} at (16,5) size 288x4 -layer at (8,297) size 320x222 clip at (10,299) size 316x218 - LayoutButton (relative positioned) {INPUT} at (0,0) size 320x222 [border: (2px outset #C0C0C0)] - LayoutFlexibleBox (anonymous) at (8,83) size 304x56 +layer at (8,297) size 320x221 clip at (10,299) size 316x217 + LayoutButton (relative positioned) {INPUT} at (0,0) size 320x221 [border: (2px outset #C0C0C0)] + LayoutFlexibleBox (anonymous) at (8,82.50) size 304x56 LayoutBlockFlow {DIV} at (124,0) size 56x56 [bgcolor=#FFFFFFE6] -layer at (8,479) size 320x32 - LayoutFlexibleBox (relative positioned) {DIV} at (0,182) size 320x32 - LayoutBlockFlow {DIV} at (16,2) size 28x30 [color=#FFFFFF] +layer at (8,457) size 320x48 + LayoutFlexibleBox (relative positioned) {DIV} at (0,160) size 320x48 + LayoutBlockFlow {DIV} at (16,18) size 28x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 28x16 text run at (0,7) width 28: "0:00" - LayoutBlockFlow {DIV} at (48,2) size 36x30 [color=#FFFFFF] + LayoutBlockFlow {DIV} at (48,18) size 36x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 36x16 text run at (0,7) width 36: "/ 0:06" - LayoutBlockFlow {DIV} at (84,32) size 130x0 - LayoutButton {INPUT} at (214,0) size 32x32 - LayoutButton {INPUT} at (246,0) size 32x32 - LayoutButton {INPUT} at (278,0) size 32x32 -layer at (24,516) size 288x4 + LayoutBlockFlow {DIV} at (84,48) size 82x0 + LayoutButton {INPUT} at (166,0) size 48x48 + LayoutButton {INPUT} at (214,0) size 48x48 + LayoutButton {INPUT} at (262,0) size 48x48 +layer at (8,505) size 320x32 + LayoutSlider {INPUT} at (0,208) size 320x32 [color=#9D968E] + LayoutFlexibleBox {DIV} at (16,16) size 288x4 +layer at (24,521) size 288x4 LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF4D] -layer at (24,512) size 12x12 +layer at (24,517) size 12x12 LayoutBlockFlow (relative positioned) {DIV} at (0,-4) size 12x12 [bgcolor=#FFFFFF] -layer at (24,516) size 288x4 +layer at (24,521) size 288x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 -layer at (24,516) size 0x4 +layer at (24,521) size 0x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF] -layer at (24,516) size 288x4 +layer at (24,521) size 288x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF8A] layer at (8,542) size 320x240 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 LayoutVideo (positioned) {VIDEO} at (8,542) size 320x240 @@ -91,31 +93,32 @@ LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,542) size 320x240 backgroundClip at (8,542) size 320x58 clip at (8,542) size 320x58 LayoutFlexibleBox {DIV} at (0,0) size 320x240 - LayoutSlider {INPUT} at (0,214) size 320x26 [color=#9D968E] - LayoutFlexibleBox {DIV} at (16,5) size 288x4 -layer at (8,542) size 320x222 backgroundClip at (8,542) size 320x58 clip at (10,544) size 316x56 - LayoutButton (relative positioned) {INPUT} at (0,0) size 320x222 [border: (2px outset #C0C0C0)] - LayoutFlexibleBox (anonymous) at (8,83) size 304x56 +layer at (8,542) size 320x221 backgroundClip at (8,542) size 320x58 clip at (10,544) size 316x56 + LayoutButton (relative positioned) {INPUT} at (0,0) size 320x221 [border: (2px outset #C0C0C0)] + LayoutFlexibleBox (anonymous) at (8,82.50) size 304x56 LayoutBlockFlow {DIV} at (124,0) size 56x56 [bgcolor=#FFFFFFE6] -layer at (8,724) size 320x32 backgroundClip at (0,0) size 0x0 clip at (0,0) size 0x0 - LayoutFlexibleBox (relative positioned) {DIV} at (0,182) size 320x32 - LayoutBlockFlow {DIV} at (16,2) size 28x30 [color=#FFFFFF] +layer at (8,702) size 320x48 backgroundClip at (0,0) size 0x0 clip at (0,0) size 0x0 + LayoutFlexibleBox (relative positioned) {DIV} at (0,160) size 320x48 + LayoutBlockFlow {DIV} at (16,18) size 28x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 28x16 text run at (0,7) width 28: "0:00" - LayoutBlockFlow {DIV} at (48,2) size 36x30 [color=#FFFFFF] + LayoutBlockFlow {DIV} at (48,18) size 36x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 36x16 text run at (0,7) width 36: "/ 0:06" - LayoutBlockFlow {DIV} at (84,32) size 130x0 - LayoutButton {INPUT} at (214,0) size 32x32 - LayoutButton {INPUT} at (246,0) size 32x32 - LayoutButton {INPUT} at (278,0) size 32x32 -layer at (24,761) size 288x4 backgroundClip at (8,542) size 320x58 clip at (8,542) size 320x58 + LayoutBlockFlow {DIV} at (84,48) size 82x0 + LayoutButton {INPUT} at (166,0) size 48x48 + LayoutButton {INPUT} at (214,0) size 48x48 + LayoutButton {INPUT} at (262,0) size 48x48 +layer at (8,750) size 320x32 backgroundClip at (8,542) size 320x58 clip at (8,542) size 320x58 + LayoutSlider {INPUT} at (0,208) size 320x32 [color=#9D968E] + LayoutFlexibleBox {DIV} at (16,16) size 288x4 +layer at (24,766) size 288x4 backgroundClip at (8,542) size 320x58 clip at (8,542) size 320x58 LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF4D] -layer at (24,757) size 12x12 backgroundClip at (8,542) size 320x58 clip at (8,542) size 320x58 +layer at (24,762) size 12x12 backgroundClip at (8,542) size 320x58 clip at (8,542) size 320x58 LayoutBlockFlow (relative positioned) {DIV} at (0,-4) size 12x12 [bgcolor=#FFFFFF] -layer at (24,761) size 288x4 backgroundClip at (0,0) size 0x0 clip at (0,0) size 0x0 +layer at (24,766) size 288x4 backgroundClip at (0,0) size 0x0 clip at (0,0) size 0x0 LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 -layer at (24,761) size 0x4 +layer at (24,766) size 0x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF] -layer at (24,761) size 288x4 backgroundClip at (0,0) size 0x0 clip at (0,0) size 0x0 +layer at (24,766) size 288x4 backgroundClip at (0,0) size 0x0 clip at (0,0) size 0x0 LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF8A]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/video-zoom-controls-expected.png b/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/video-zoom-controls-expected.png index c1baf0a..272ce10b 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/video-zoom-controls-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/video-zoom-controls-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/media/controls-layout-direction-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/media/controls-layout-direction-expected.png index eea7b44e..09888f7 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/media/controls-layout-direction-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/media/controls-layout-direction-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/media/controls-styling-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/media/controls-styling-expected.png index 55a89819..a349102 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/media/controls-styling-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/media/controls-styling-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/media/media-controls-clone-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/media/media-controls-clone-expected.png index 0c48441..6df0343 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/media/media-controls-clone-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/media/media-controls-clone-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/paint/invalidation/clip/control-clip-expected.txt b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/paint/invalidation/clip/control-clip-expected.txt index b4e7509..e3ca88e 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/paint/invalidation/clip/control-clip-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/paint/invalidation/clip/control-clip-expected.txt
@@ -20,7 +20,7 @@ { "object": "InlineTextBox 'SUCCESS'", "rect": [81, 114, 54, 14], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox 'SUCCESS'", @@ -30,7 +30,7 @@ { "object": "InlineTextBox 'FAILURE'", "rect": [85, 114, 46, 14], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "InlineTextBox 'FAILURE'",
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/paint/invalidation/scroll/invalidate-caret-in-composited-scrolling-container-expected.txt b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/paint/invalidation/scroll/invalidate-caret-in-composited-scrolling-container-expected.txt index 08bfcadf..b367bce93 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/paint/invalidation/scroll/invalidate-caret-in-composited-scrolling-container-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/paint/invalidation/scroll/invalidate-caret-in-composited-scrolling-container-expected.txt
@@ -51,7 +51,7 @@ { "object": "Caret", "rect": [39, 6, 1, 13], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/paint/invalidation/scroll/invalidate-caret-in-non-composited-scrolling-container-expected.txt b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/paint/invalidation/scroll/invalidate-caret-in-non-composited-scrolling-container-expected.txt index 08bfcadf..b367bce93 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/paint/invalidation/scroll/invalidate-caret-in-non-composited-scrolling-container-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/paint/invalidation/scroll/invalidate-caret-in-non-composited-scrolling-container-expected.txt
@@ -51,7 +51,7 @@ { "object": "Caret", "rect": [39, 6, 1, 13], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/paint/invalidation/search-field-cancel-expected.txt b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/paint/invalidation/search-field-cancel-expected.txt index 3c55ac9..adfb671e 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/paint/invalidation/search-field-cancel-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/paint/invalidation/search-field-cancel-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutBlockFlow DIV", "rect": [12, 45, 50, 14], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.11/media/video-zoom-controls-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.11/media/video-zoom-controls-expected.png deleted file mode 100644 index 7ab8d348..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.11/media/video-zoom-controls-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.11/paint/invalidation/search-field-cancel-expected.txt b/third_party/WebKit/LayoutTests/platform/mac-mac10.11/paint/invalidation/search-field-cancel-expected.txt index ebd1863e..b4b8ad9 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.11/paint/invalidation/search-field-cancel-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.11/paint/invalidation/search-field-cancel-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutBlockFlow DIV", "rect": [12, 45, 51, 14], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.11/virtual/video-surface-layer/media/video-zoom-controls-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.11/virtual/video-surface-layer/media/video-zoom-controls-expected.png deleted file mode 100644 index 58c428bf..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.11/virtual/video-surface-layer/media/video-zoom-controls-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/compositing/video/video-controls-layer-creation-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/compositing/video/video-controls-layer-creation-expected.png index 8c2fcd7..4550ed1 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/compositing/video/video-controls-layer-creation-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/compositing/video/video-controls-layer-creation-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/overflow/overflow-of-video-outline-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/overflow/overflow-of-video-outline-expected.png index d818bc2..badf80b 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/overflow/overflow-of-video-outline-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/fast/overflow/overflow-of-video-outline-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/controls-after-reload-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/controls-after-reload-expected.png index eeb4b43..12750fb 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/controls-after-reload-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/controls-after-reload-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/controls-layout-direction-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/controls-layout-direction-expected.png index 98a44f7f..5265fabb 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/controls-layout-direction-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/controls-layout-direction-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/controls-strict-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/controls-strict-expected.png index 5cc8299..971d6d4 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/controls-strict-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/controls-strict-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/controls-styling-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/controls-styling-expected.png index 27940e2..401a5c01 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/controls-styling-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/controls-styling-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/controls-styling-strict-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/controls-styling-strict-expected.png index d15f6261..5d932f2 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/controls-styling-strict-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/controls-styling-strict-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/controls-without-preload-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/controls-without-preload-expected.png index a8323ec..34debd96 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/controls-without-preload-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/controls-without-preload-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.png index 272d418..6c95042 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/controls/paint-controls-webkit-appearance-none-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/controls/paint-controls-webkit-appearance-none-expected.png index 272d418..6c95042 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/controls/paint-controls-webkit-appearance-none-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/controls/paint-controls-webkit-appearance-none-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/media-controls-clone-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/media-controls-clone-expected.png index b942c391..107a0cd 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/media-controls-clone-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/media-controls-clone-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/media-controls-grey-scrubber-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/media-controls-grey-scrubber-expected.png index 9a9a17f..2968679 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/media-controls-grey-scrubber-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/media-controls-grey-scrubber-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/video-controls-rendering-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/video-controls-rendering-expected.png index dfe5b5e..4511dc3 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/video-controls-rendering-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/video-controls-rendering-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/video-display-toggle-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/video-display-toggle-expected.png index 372c11f..32e60ae 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/video-display-toggle-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/video-display-toggle-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/video-empty-source-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/video-empty-source-expected.png index 59debc27..90f704b5 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/video-empty-source-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/video-empty-source-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/video-no-audio-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/video-no-audio-expected.png index ae0220a..0b7ea631 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/video-no-audio-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/video-no-audio-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/video-zoom-controls-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/video-zoom-controls-expected.png index d1d289bd..8adc985a 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/video-zoom-controls-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/video-zoom-controls-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/multicol/multicol-with-block-expected.txt b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/multicol/multicol-with-block-expected.txt index 35560aac..ccb60b4 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/multicol/multicol-with-block-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/multicol/multicol-with-block-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutMultiColumnFlowThread (anonymous)", "rect": [488, 8, 80, 21], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/multicol/multicol-with-inline-expected.txt b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/multicol/multicol-with-inline-expected.txt index a1a7ed4..df658cb 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/multicol/multicol-with-inline-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/multicol/multicol-with-inline-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutMultiColumnFlowThread (anonymous)", "rect": [483, 8, 85, 81], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/multicol/multicol-with-text-expected.txt b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/multicol/multicol-with-text-expected.txt index 34c41b4..4785100a 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/multicol/multicol-with-text-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/multicol/multicol-with-text-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutMultiColumnFlowThread (anonymous)", "rect": [483, 8, 85, 81], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/new-remote-playback-pipeline/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/new-remote-playback-pipeline/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.png index 272d418..6c95042 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/new-remote-playback-pipeline/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/new-remote-playback-pipeline/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/new-remote-playback-pipeline/media/controls/paint-controls-webkit-appearance-none-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/new-remote-playback-pipeline/media/controls/paint-controls-webkit-appearance-none-expected.png index 272d418..6c95042 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/new-remote-playback-pipeline/media/controls/paint-controls-webkit-appearance-none-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/new-remote-playback-pipeline/media/controls/paint-controls-webkit-appearance-none-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/video-surface-layer/media/video-zoom-controls-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/video-surface-layer/media/video-zoom-controls-expected.png index a8337d9f..c7f94ff2 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/video-surface-layer/media/video-zoom-controls-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/video-surface-layer/media/video-zoom-controls-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/compositing/video/video-controls-layer-creation-expected.png b/third_party/WebKit/LayoutTests/platform/mac/compositing/video/video-controls-layer-creation-expected.png index 7349f61..2095a8e 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/compositing/video/video-controls-layer-creation-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/compositing/video/video-controls-layer-creation-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/overflow/overflow-of-video-outline-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/overflow/overflow-of-video-outline-expected.png index be8fd36..4c470df2 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/overflow/overflow-of-video-outline-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/overflow/overflow-of-video-outline-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/http/tests/media/video-buffered-range-contains-currentTime-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/http/tests/media/video-buffered-range-contains-currentTime-expected.txt index b9cba482..ddbecbf8 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/http/tests/media/video-buffered-range-contains-currentTime-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/http/tests/media/video-buffered-range-contains-currentTime-expected.txt
@@ -13,8 +13,6 @@ layer at (8,104) size 300x54 scrollHeight 55 LayoutFlexibleBox {DIV} at (0,0) size 300x54 LayoutButton {INPUT} at (10,11) size 32x32 - LayoutSlider {INPUT} at (113.28,-1) size 112.72x56 [color=#909090] - LayoutFlexibleBox {DIV} at (16,26) size 80.72x4 LayoutButton {INPUT} at (226,11) size 32x32 LayoutButton {INPUT} at (258,11) size 32x32 layer at (55,123) size 27x16 transparent @@ -25,6 +23,9 @@ LayoutBlockFlow {DIV} at (78.25,19) size 35.03x16 LayoutText {#text} at (0,0) size 36x16 text run at (0,0) width 36: "/ 0:07" +layer at (121,103) size 113x56 backgroundClip at (8,104) size 300x54 clip at (8,104) size 300x54 + LayoutSlider {INPUT} at (113.28,-1) size 112.72x56 [color=#909090] + LayoutFlexibleBox {DIV} at (16,26) size 80.72x4 layer at (137,129) size 81x4 LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 80.72x4 [bgcolor=#00000033] layer at (206,125) size 12x12
diff --git a/third_party/WebKit/LayoutTests/platform/mac/media/controls-after-reload-expected.png b/third_party/WebKit/LayoutTests/platform/mac/media/controls-after-reload-expected.png index 708cd37..fd56200 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/media/controls-after-reload-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/media/controls-after-reload-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/media/controls-after-reload-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/media/controls-after-reload-expected.txt index c4c434a..f6955fd 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/media/controls-after-reload-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/media/controls-after-reload-expected.txt
@@ -16,30 +16,31 @@ LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,42) size 320x240 LayoutFlexibleBox {DIV} at (0,0) size 320x240 - LayoutSlider {INPUT} at (0,214) size 320x26 [color=#909090] - LayoutFlexibleBox {DIV} at (16,5) size 288x4 -layer at (8,42) size 320x222 clip at (9,43) size 318x220 - LayoutButton (relative positioned) {INPUT} at (0,0) size 320x222 [border: (1px solid #D8D8D8) (1px solid #D1D1D1) (1px solid #BABABA) (1px solid #D1D1D1)] - LayoutFlexibleBox (anonymous) at (8,82.50) size 304x56 +layer at (8,42) size 320x221 clip at (9,43) size 318x219 + LayoutButton (relative positioned) {INPUT} at (0,0) size 320x221 [border: (1px solid #D8D8D8) (1px solid #D1D1D1) (1px solid #BABABA) (1px solid #D1D1D1)] + LayoutFlexibleBox (anonymous) at (8,82) size 304x56 LayoutBlockFlow {DIV} at (124,0) size 56x56 [bgcolor=#FFFFFFE6] -layer at (8,224) size 320x32 - LayoutFlexibleBox (relative positioned) {DIV} at (0,182) size 320x32 - LayoutBlockFlow {DIV} at (16,2) size 27.25x30 [color=#FFFFFF] +layer at (8,202) size 320x48 + LayoutFlexibleBox (relative positioned) {DIV} at (0,160) size 320x48 + LayoutBlockFlow {DIV} at (16,18) size 27.25x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 28x16 text run at (0,7) width 28: "0:00" - LayoutBlockFlow {DIV} at (47.25,2) size 35.03x30 [color=#FFFFFF] + LayoutBlockFlow {DIV} at (47.25,18) size 35.03x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 36x16 text run at (0,7) width 36: "/ 0:06" - LayoutBlockFlow {DIV} at (82.28,32) size 163.72x0 - LayoutButton {INPUT} at (246,0) size 32x32 - LayoutButton {INPUT} at (278,0) size 32x32 -layer at (24,261) size 288x4 + LayoutBlockFlow {DIV} at (82.28,48) size 131.72x0 + LayoutButton {INPUT} at (214,0) size 48x48 + LayoutButton {INPUT} at (262,0) size 48x48 +layer at (8,250) size 320x32 + LayoutSlider {INPUT} at (0,208) size 320x32 [color=#909090] + LayoutFlexibleBox {DIV} at (16,16) size 288x4 +layer at (24,266) size 288x4 LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF4D] -layer at (24,257) size 12x12 +layer at (24,262) size 12x12 LayoutBlockFlow (relative positioned) {DIV} at (0,-4) size 12x12 [bgcolor=#FFFFFF] -layer at (24,261) size 288x4 +layer at (24,266) size 288x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 -layer at (24,261) size 0x4 +layer at (24,266) size 0x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF] -layer at (24,261) size 288x4 +layer at (24,266) size 288x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF8A]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/media/controls-layout-direction-expected.png b/third_party/WebKit/LayoutTests/platform/mac/media/controls-layout-direction-expected.png index 79b255cf..0b6f2217 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/media/controls-layout-direction-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/media/controls-layout-direction-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/media/controls-strict-expected.png b/third_party/WebKit/LayoutTests/platform/mac/media/controls-strict-expected.png index 38c5566..a12b443 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/media/controls-strict-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/media/controls-strict-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/media/controls-strict-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/media/controls-strict-expected.txt index a5b6793..bbb2b72 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/media/controls-strict-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/media/controls-strict-expected.txt
@@ -16,30 +16,31 @@ LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,50) size 320x240 LayoutFlexibleBox {DIV} at (0,0) size 320x240 - LayoutSlider {INPUT} at (0,214) size 320x26 [color=#909090] - LayoutFlexibleBox {DIV} at (16,5) size 288x4 -layer at (8,50) size 320x222 clip at (9,51) size 318x220 - LayoutButton (relative positioned) {INPUT} at (0,0) size 320x222 [border: (1px solid #D8D8D8) (1px solid #D1D1D1) (1px solid #BABABA) (1px solid #D1D1D1)] - LayoutFlexibleBox (anonymous) at (8,82.50) size 304x56 +layer at (8,50) size 320x221 clip at (9,51) size 318x219 + LayoutButton (relative positioned) {INPUT} at (0,0) size 320x221 [border: (1px solid #D8D8D8) (1px solid #D1D1D1) (1px solid #BABABA) (1px solid #D1D1D1)] + LayoutFlexibleBox (anonymous) at (8,82) size 304x56 LayoutBlockFlow {DIV} at (124,0) size 56x56 [bgcolor=#FFFFFFE6] -layer at (8,232) size 320x32 - LayoutFlexibleBox (relative positioned) {DIV} at (0,182) size 320x32 - LayoutBlockFlow {DIV} at (16,2) size 27.25x30 [color=#FFFFFF] +layer at (8,210) size 320x48 + LayoutFlexibleBox (relative positioned) {DIV} at (0,160) size 320x48 + LayoutBlockFlow {DIV} at (16,18) size 27.25x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 28x16 text run at (0,7) width 28: "0:00" - LayoutBlockFlow {DIV} at (47.25,2) size 35.03x30 [color=#FFFFFF] + LayoutBlockFlow {DIV} at (47.25,18) size 35.03x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 36x16 text run at (0,7) width 36: "/ 0:06" - LayoutBlockFlow {DIV} at (82.28,32) size 163.72x0 - LayoutButton {INPUT} at (246,0) size 32x32 - LayoutButton {INPUT} at (278,0) size 32x32 -layer at (24,269) size 288x4 + LayoutBlockFlow {DIV} at (82.28,48) size 131.72x0 + LayoutButton {INPUT} at (214,0) size 48x48 + LayoutButton {INPUT} at (262,0) size 48x48 +layer at (8,258) size 320x32 + LayoutSlider {INPUT} at (0,208) size 320x32 [color=#909090] + LayoutFlexibleBox {DIV} at (16,16) size 288x4 +layer at (24,274) size 288x4 LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF4D] -layer at (24,265) size 12x12 +layer at (24,270) size 12x12 LayoutBlockFlow (relative positioned) {DIV} at (0,-4) size 12x12 [bgcolor=#FFFFFF] -layer at (24,269) size 288x4 +layer at (24,274) size 288x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 -layer at (24,269) size 0x4 +layer at (24,274) size 0x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF] -layer at (24,269) size 288x4 +layer at (24,274) size 288x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF8A]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/media/controls-styling-expected.png b/third_party/WebKit/LayoutTests/platform/mac/media/controls-styling-expected.png index fee3f25..77a91f3 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/media/controls-styling-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/media/controls-styling-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/media/controls-styling-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/media/controls-styling-expected.txt index 4287dd0..8e4b5b1 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/media/controls-styling-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/media/controls-styling-expected.txt
@@ -20,32 +20,33 @@ LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (18,42) size 320x240 LayoutFlexibleBox {DIV} at (0,0) size 320x240 - LayoutSlider {INPUT} at (0,214) size 320x26 [color=#909090] - LayoutFlexibleBox {DIV} at (16,5) size 288x4 -layer at (18,42) size 320x222 clip at (19,43) size 318x220 - LayoutButton (relative positioned) {INPUT} at (0,0) size 320x222 [border: (1px solid #D8D8D8) (1px solid #D1D1D1) (1px solid #BABABA) (1px solid #D1D1D1)] - LayoutFlexibleBox (anonymous) at (8,82.50) size 304x56 +layer at (18,42) size 320x221 clip at (19,43) size 318x219 + LayoutButton (relative positioned) {INPUT} at (0,0) size 320x221 [border: (1px solid #D8D8D8) (1px solid #D1D1D1) (1px solid #BABABA) (1px solid #D1D1D1)] + LayoutFlexibleBox (anonymous) at (8,82) size 304x56 LayoutBlockFlow {DIV} at (124,0) size 56x56 [bgcolor=#FFFFFFE6] -layer at (18,224) size 320x32 - LayoutFlexibleBox (relative positioned) {DIV} at (0,182) size 320x32 - LayoutBlockFlow {DIV} at (16,2) size 27.25x30 [color=#FFFFFF] +layer at (18,202) size 320x48 + LayoutFlexibleBox (relative positioned) {DIV} at (0,160) size 320x48 + LayoutBlockFlow {DIV} at (16,18) size 27.25x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 28x16 text run at (0,7) width 28: "0:00" - LayoutBlockFlow {DIV} at (47.25,2) size 65.03x30 [color=#FFFFFF] + LayoutBlockFlow {DIV} at (47.25,18) size 65.03x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 66x16 text run at (0,7) width 66: "/ 0:06" - LayoutBlockFlow {DIV} at (112.28,32) size 133.72x0 - LayoutButton {INPUT} at (246,0) size 32x32 - LayoutButton {INPUT} at (278,0) size 32x32 -layer at (34,261) size 288x4 + LayoutBlockFlow {DIV} at (112.28,48) size 101.72x0 + LayoutButton {INPUT} at (214,0) size 48x48 + LayoutButton {INPUT} at (262,0) size 48x48 +layer at (18,250) size 320x32 + LayoutSlider {INPUT} at (0,208) size 320x32 [color=#909090] + LayoutFlexibleBox {DIV} at (16,16) size 288x4 +layer at (34,266) size 288x4 LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF4D] -layer at (34,257) size 12x12 +layer at (34,262) size 12x12 LayoutBlockFlow (relative positioned) {DIV} at (0,-4) size 12x12 [bgcolor=#FFFFFF] -layer at (34,261) size 288x4 +layer at (34,266) size 288x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 -layer at (34,261) size 0x4 +layer at (34,266) size 0x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF] -layer at (34,261) size 288x4 +layer at (34,266) size 288x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF8A] layer at (8,282) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 @@ -53,30 +54,31 @@ LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,282) size 320x240 LayoutFlexibleBox {DIV} at (0,0) size 320x240 - LayoutSlider {INPUT} at (0,214) size 320x26 [color=#909090] - LayoutFlexibleBox {DIV} at (16,5) size 288x4 -layer at (8,282) size 320x222 clip at (9,283) size 318x220 - LayoutButton (relative positioned) {INPUT} at (0,0) size 320x222 [border: (1px solid #D8D8D8) (1px solid #D1D1D1) (1px solid #BABABA) (1px solid #D1D1D1)] - LayoutFlexibleBox (anonymous) at (8,82.50) size 304x56 +layer at (8,282) size 320x221 clip at (9,283) size 318x219 + LayoutButton (relative positioned) {INPUT} at (0,0) size 320x221 [border: (1px solid #D8D8D8) (1px solid #D1D1D1) (1px solid #BABABA) (1px solid #D1D1D1)] + LayoutFlexibleBox (anonymous) at (8,82) size 304x56 LayoutBlockFlow {DIV} at (124,0) size 56x56 [bgcolor=#FFFFFFE6] -layer at (8,464) size 320x32 - LayoutFlexibleBox (relative positioned) {DIV} at (0,182) size 320x32 - LayoutBlockFlow {DIV} at (16,2) size 27.25x30 [color=#FFFFFF] +layer at (8,442) size 320x48 + LayoutFlexibleBox (relative positioned) {DIV} at (0,160) size 320x48 + LayoutBlockFlow {DIV} at (16,18) size 27.25x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 28x16 text run at (0,7) width 28: "0:00" - LayoutBlockFlow {DIV} at (47.25,2) size 35.03x30 [color=#FFFFFF] + LayoutBlockFlow {DIV} at (47.25,18) size 35.03x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 36x16 text run at (0,7) width 36: "/ 0:06" - LayoutBlockFlow {DIV} at (82.28,32) size 163.72x0 - LayoutButton {INPUT} at (246,0) size 32x32 - LayoutButton {INPUT} at (278,0) size 32x32 -layer at (24,501) size 288x4 + LayoutBlockFlow {DIV} at (82.28,48) size 131.72x0 + LayoutButton {INPUT} at (214,0) size 48x48 + LayoutButton {INPUT} at (262,0) size 48x48 +layer at (8,490) size 320x32 + LayoutSlider {INPUT} at (0,208) size 320x32 [color=#909090] + LayoutFlexibleBox {DIV} at (16,16) size 288x4 +layer at (24,506) size 288x4 LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF4D] -layer at (24,497) size 12x12 +layer at (24,502) size 12x12 LayoutBlockFlow (relative positioned) {DIV} at (0,-4) size 12x12 [bgcolor=#FFFFFF] -layer at (24,501) size 288x4 +layer at (24,506) size 288x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 -layer at (24,501) size 0x4 +layer at (24,506) size 0x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF] -layer at (24,501) size 288x4 +layer at (24,506) size 288x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF8A]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/media/controls-styling-strict-expected.png b/third_party/WebKit/LayoutTests/platform/mac/media/controls-styling-strict-expected.png index 4696425..edf5cb6 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/media/controls-styling-strict-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/media/controls-styling-strict-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/media/controls-styling-strict-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/media/controls-styling-strict-expected.txt index b3639821..b6bee3b 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/media/controls-styling-strict-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/media/controls-styling-strict-expected.txt
@@ -20,32 +20,33 @@ LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,50) size 320x240 LayoutFlexibleBox {DIV} at (0,0) size 320x240 - LayoutSlider {INPUT} at (0,214) size 320x26 [color=#909090] - LayoutFlexibleBox {DIV} at (16,5) size 288x4 -layer at (8,50) size 320x222 clip at (9,51) size 318x220 - LayoutButton (relative positioned) {INPUT} at (0,0) size 320x222 [border: (1px solid #D8D8D8) (1px solid #D1D1D1) (1px solid #BABABA) (1px solid #D1D1D1)] - LayoutFlexibleBox (anonymous) at (8,82.50) size 304x56 +layer at (8,50) size 320x221 clip at (9,51) size 318x219 + LayoutButton (relative positioned) {INPUT} at (0,0) size 320x221 [border: (1px solid #D8D8D8) (1px solid #D1D1D1) (1px solid #BABABA) (1px solid #D1D1D1)] + LayoutFlexibleBox (anonymous) at (8,82) size 304x56 LayoutBlockFlow {DIV} at (124,0) size 56x56 [bgcolor=#FFFFFFE6] -layer at (8,232) size 320x32 - LayoutFlexibleBox (relative positioned) {DIV} at (0,182) size 320x32 - LayoutBlockFlow {DIV} at (16,2) size 27.25x30 [color=#FFFFFF] +layer at (8,210) size 320x48 + LayoutFlexibleBox (relative positioned) {DIV} at (0,160) size 320x48 + LayoutBlockFlow {DIV} at (16,18) size 27.25x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 28x16 text run at (0,7) width 28: "0:00" - LayoutBlockFlow {DIV} at (47.25,2) size 35.03x30 [color=#FFFFFF] + LayoutBlockFlow {DIV} at (47.25,18) size 35.03x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 36x16 text run at (0,7) width 36: "/ 0:06" - LayoutBlockFlow {DIV} at (82.28,32) size 163.72x0 - LayoutButton {INPUT} at (246,0) size 32x32 - LayoutButton {INPUT} at (278,0) size 32x32 -layer at (24,269) size 288x4 + LayoutBlockFlow {DIV} at (82.28,48) size 131.72x0 + LayoutButton {INPUT} at (214,0) size 48x48 + LayoutButton {INPUT} at (262,0) size 48x48 +layer at (8,258) size 320x32 + LayoutSlider {INPUT} at (0,208) size 320x32 [color=#909090] + LayoutFlexibleBox {DIV} at (16,16) size 288x4 +layer at (24,274) size 288x4 LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF4D] -layer at (24,265) size 12x12 +layer at (24,270) size 12x12 LayoutBlockFlow (relative positioned) {DIV} at (0,-4) size 12x12 [bgcolor=#FFFFFF] -layer at (24,269) size 288x4 +layer at (24,274) size 288x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 -layer at (24,269) size 0x4 +layer at (24,274) size 0x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF] -layer at (24,269) size 288x4 +layer at (24,274) size 288x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF8A] layer at (332,50) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 @@ -53,30 +54,31 @@ LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (332,50) size 320x240 LayoutFlexibleBox {DIV} at (0,0) size 320x240 - LayoutSlider {INPUT} at (0,214) size 320x26 [color=#909090] - LayoutFlexibleBox {DIV} at (16,5) size 288x4 -layer at (332,50) size 320x222 clip at (333,51) size 318x220 - LayoutButton (relative positioned) {INPUT} at (0,0) size 320x222 [border: (1px solid #D8D8D8) (1px solid #D1D1D1) (1px solid #BABABA) (1px solid #D1D1D1)] - LayoutFlexibleBox (anonymous) at (8,82.50) size 304x56 +layer at (332,50) size 320x221 clip at (333,51) size 318x219 + LayoutButton (relative positioned) {INPUT} at (0,0) size 320x221 [border: (1px solid #D8D8D8) (1px solid #D1D1D1) (1px solid #BABABA) (1px solid #D1D1D1)] + LayoutFlexibleBox (anonymous) at (8,82) size 304x56 LayoutBlockFlow {DIV} at (124,0) size 56x56 [bgcolor=#FFFFFFE6] -layer at (332,232) size 320x32 - LayoutFlexibleBox (relative positioned) {DIV} at (0,182) size 320x32 - LayoutBlockFlow {DIV} at (16,2) size 27.25x30 [color=#FFFFFF] +layer at (332,210) size 320x48 + LayoutFlexibleBox (relative positioned) {DIV} at (0,160) size 320x48 + LayoutBlockFlow {DIV} at (16,18) size 27.25x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 28x16 text run at (0,7) width 28: "0:00" - LayoutBlockFlow {DIV} at (47.25,2) size 35.03x30 [color=#FFFFFF] + LayoutBlockFlow {DIV} at (47.25,18) size 35.03x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 36x16 text run at (0,7) width 36: "/ 0:06" - LayoutBlockFlow {DIV} at (82.28,32) size 163.72x0 - LayoutButton {INPUT} at (246,0) size 32x32 - LayoutButton {INPUT} at (278,0) size 32x32 -layer at (348,269) size 288x4 + LayoutBlockFlow {DIV} at (82.28,48) size 131.72x0 + LayoutButton {INPUT} at (214,0) size 48x48 + LayoutButton {INPUT} at (262,0) size 48x48 +layer at (332,258) size 320x32 + LayoutSlider {INPUT} at (0,208) size 320x32 [color=#909090] + LayoutFlexibleBox {DIV} at (16,16) size 288x4 +layer at (348,274) size 288x4 LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF4D] -layer at (348,265) size 12x12 +layer at (348,270) size 12x12 LayoutBlockFlow (relative positioned) {DIV} at (0,-4) size 12x12 [bgcolor=#FFFFFF] -layer at (348,269) size 288x4 +layer at (348,274) size 288x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 -layer at (348,269) size 0x4 +layer at (348,274) size 0x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF] -layer at (348,269) size 288x4 +layer at (348,274) size 288x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF8A]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/media/controls-without-preload-expected.png b/third_party/WebKit/LayoutTests/platform/mac/media/controls-without-preload-expected.png index b3882fa..a93d7e20 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/media/controls-without-preload-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/media/controls-without-preload-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/media/controls-without-preload-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/media/controls-without-preload-expected.txt index e5f9361d..9259923 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/media/controls-without-preload-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/media/controls-without-preload-expected.txt
@@ -16,30 +16,31 @@ LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,42) size 320x240 LayoutFlexibleBox {DIV} at (0,0) size 320x240 - LayoutSlider {INPUT} at (0,214) size 320x26 [color=#909090] - LayoutFlexibleBox {DIV} at (16,5) size 288x4 -layer at (8,42) size 320x222 clip at (9,43) size 318x220 - LayoutButton (relative positioned) {INPUT} at (0,0) size 320x222 [border: (1px solid #D8D8D8) (1px solid #D1D1D1) (1px solid #BABABA) (1px solid #D1D1D1)] - LayoutFlexibleBox (anonymous) at (8,82.50) size 304x56 +layer at (8,42) size 320x221 clip at (9,43) size 318x219 + LayoutButton (relative positioned) {INPUT} at (0,0) size 320x221 [border: (1px solid #D8D8D8) (1px solid #D1D1D1) (1px solid #BABABA) (1px solid #D1D1D1)] + LayoutFlexibleBox (anonymous) at (8,82) size 304x56 LayoutBlockFlow {DIV} at (124,0) size 56x56 [bgcolor=#FFFFFFE6] -layer at (8,224) size 320x32 - LayoutFlexibleBox (relative positioned) {DIV} at (0,182) size 320x32 - LayoutBlockFlow {DIV} at (16,2) size 27.25x30 [color=#FFFFFF] +layer at (8,202) size 320x48 + LayoutFlexibleBox (relative positioned) {DIV} at (0,160) size 320x48 + LayoutBlockFlow {DIV} at (16,18) size 27.25x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 28x16 text run at (0,7) width 28: "0:00" - LayoutBlockFlow {DIV} at (47.25,2) size 35.03x30 [color=#FFFFFF] + LayoutBlockFlow {DIV} at (47.25,18) size 35.03x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 36x16 text run at (0,7) width 36: "/ 0:06" - LayoutBlockFlow {DIV} at (82.28,32) size 163.72x0 - LayoutButton {INPUT} at (246,0) size 32x32 - LayoutButton {INPUT} at (278,0) size 32x32 -layer at (24,261) size 288x4 + LayoutBlockFlow {DIV} at (82.28,48) size 131.72x0 + LayoutButton {INPUT} at (214,0) size 48x48 + LayoutButton {INPUT} at (262,0) size 48x48 +layer at (8,250) size 320x32 + LayoutSlider {INPUT} at (0,208) size 320x32 [color=#909090] + LayoutFlexibleBox {DIV} at (16,16) size 288x4 +layer at (24,266) size 288x4 LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF4D] -layer at (24,257) size 12x12 +layer at (24,262) size 12x12 LayoutBlockFlow (relative positioned) {DIV} at (0,-4) size 12x12 [bgcolor=#FFFFFF] -layer at (24,261) size 288x4 +layer at (24,266) size 288x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 -layer at (24,261) size 0x4 +layer at (24,266) size 0x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF] -layer at (24,261) size 288x4 +layer at (24,266) size 288x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF8A]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.png b/third_party/WebKit/LayoutTests/platform/mac/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.png index 2d01f98..0d3f487b 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.txt index 17cd423c..ada2009d 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.txt
@@ -12,31 +12,32 @@ LayoutFlexibleBox {DIV} at (0,0) size 400x327.27 layer at (8,8) size 400x327 LayoutFlexibleBox {DIV} at (0,0) size 400x327.27 - LayoutSlider {INPUT} at (0,301.27) size 400x26 [color=#909090] - LayoutFlexibleBox {DIV} at (16,5) size 368x4 -layer at (8,8) size 400x309 clip at (9,9) size 398x307 - LayoutButton (relative positioned) {INPUT} at (0,0) size 400x309.27 [border: (1px solid #D8D8D8) (1px solid #D1D1D1) (1px solid #BABABA) (1px solid #D1D1D1)] - LayoutFlexibleBox (anonymous) at (8,126.13) size 384x56 +layer at (8,8) size 400x308 clip at (9,9) size 398x306 + LayoutButton (relative positioned) {INPUT} at (0,0) size 400x308.27 [border: (1px solid #D8D8D8) (1px solid #D1D1D1) (1px solid #BABABA) (1px solid #D1D1D1)] + LayoutFlexibleBox (anonymous) at (8,125.63) size 384x56 LayoutBlockFlow {DIV} at (164,0) size 56x56 [bgcolor=#FFFFFFE6] -layer at (8,277) size 400x32 - LayoutFlexibleBox (relative positioned) {DIV} at (0,269.27) size 400x32 - LayoutBlockFlow {DIV} at (16,2) size 27.25x30 [color=#FFFFFF] +layer at (8,255) size 400x48 + LayoutFlexibleBox (relative positioned) {DIV} at (0,247.27) size 400x48 + LayoutBlockFlow {DIV} at (16,18) size 27.25x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 28x16 text run at (0,7) width 28: "0:00" - LayoutBlockFlow {DIV} at (47.25,2) size 35.03x30 [color=#FFFFFF] + LayoutBlockFlow {DIV} at (47.25,18) size 35.03x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 36x16 text run at (0,7) width 36: "/ 0:09" - LayoutBlockFlow {DIV} at (82.28,32) size 243.72x0 - LayoutButton {INPUT} at (358,0) size 32x32 -layer at (334,277) size 32x32 transparent - LayoutButton {INPUT} at (326,0) size 32x32 [color=#7F7F7F] -layer at (24,314) size 368x4 + LayoutBlockFlow {DIV} at (82.28,48) size 211.72x0 + LayoutButton {INPUT} at (342,0) size 48x48 +layer at (302,255) size 48x48 transparent + LayoutButton {INPUT} at (294,0) size 48x48 [color=#7F7F7F] +layer at (8,303) size 400x32 + LayoutSlider {INPUT} at (0,295.27) size 400x32 [color=#909090] + LayoutFlexibleBox {DIV} at (16,16) size 368x4 +layer at (24,319) size 368x4 LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 368x4 [bgcolor=#FFFFFF4D] -layer at (24,310) size 12x12 +layer at (24,315) size 12x12 LayoutBlockFlow (relative positioned) {DIV} at (0,-4) size 12x12 [bgcolor=#FFFFFF] -layer at (24,314) size 368x4 +layer at (24,319) size 368x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 368x4 -layer at (24,314) size 0x4 +layer at (24,319) size 0x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF] -layer at (24,314) size 368x4 +layer at (24,319) size 368x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 368x4 [bgcolor=#FFFFFF8A]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/media/controls/paint-controls-webkit-appearance-none-expected.png b/third_party/WebKit/LayoutTests/platform/mac/media/controls/paint-controls-webkit-appearance-none-expected.png index 2d01f98..0d3f487b 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/media/controls/paint-controls-webkit-appearance-none-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/media/controls/paint-controls-webkit-appearance-none-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/media/controls/paint-controls-webkit-appearance-none-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/media/controls/paint-controls-webkit-appearance-none-expected.txt index 17cd423c..ada2009d 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/media/controls/paint-controls-webkit-appearance-none-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/media/controls/paint-controls-webkit-appearance-none-expected.txt
@@ -12,31 +12,32 @@ LayoutFlexibleBox {DIV} at (0,0) size 400x327.27 layer at (8,8) size 400x327 LayoutFlexibleBox {DIV} at (0,0) size 400x327.27 - LayoutSlider {INPUT} at (0,301.27) size 400x26 [color=#909090] - LayoutFlexibleBox {DIV} at (16,5) size 368x4 -layer at (8,8) size 400x309 clip at (9,9) size 398x307 - LayoutButton (relative positioned) {INPUT} at (0,0) size 400x309.27 [border: (1px solid #D8D8D8) (1px solid #D1D1D1) (1px solid #BABABA) (1px solid #D1D1D1)] - LayoutFlexibleBox (anonymous) at (8,126.13) size 384x56 +layer at (8,8) size 400x308 clip at (9,9) size 398x306 + LayoutButton (relative positioned) {INPUT} at (0,0) size 400x308.27 [border: (1px solid #D8D8D8) (1px solid #D1D1D1) (1px solid #BABABA) (1px solid #D1D1D1)] + LayoutFlexibleBox (anonymous) at (8,125.63) size 384x56 LayoutBlockFlow {DIV} at (164,0) size 56x56 [bgcolor=#FFFFFFE6] -layer at (8,277) size 400x32 - LayoutFlexibleBox (relative positioned) {DIV} at (0,269.27) size 400x32 - LayoutBlockFlow {DIV} at (16,2) size 27.25x30 [color=#FFFFFF] +layer at (8,255) size 400x48 + LayoutFlexibleBox (relative positioned) {DIV} at (0,247.27) size 400x48 + LayoutBlockFlow {DIV} at (16,18) size 27.25x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 28x16 text run at (0,7) width 28: "0:00" - LayoutBlockFlow {DIV} at (47.25,2) size 35.03x30 [color=#FFFFFF] + LayoutBlockFlow {DIV} at (47.25,18) size 35.03x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 36x16 text run at (0,7) width 36: "/ 0:09" - LayoutBlockFlow {DIV} at (82.28,32) size 243.72x0 - LayoutButton {INPUT} at (358,0) size 32x32 -layer at (334,277) size 32x32 transparent - LayoutButton {INPUT} at (326,0) size 32x32 [color=#7F7F7F] -layer at (24,314) size 368x4 + LayoutBlockFlow {DIV} at (82.28,48) size 211.72x0 + LayoutButton {INPUT} at (342,0) size 48x48 +layer at (302,255) size 48x48 transparent + LayoutButton {INPUT} at (294,0) size 48x48 [color=#7F7F7F] +layer at (8,303) size 400x32 + LayoutSlider {INPUT} at (0,295.27) size 400x32 [color=#909090] + LayoutFlexibleBox {DIV} at (16,16) size 368x4 +layer at (24,319) size 368x4 LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 368x4 [bgcolor=#FFFFFF4D] -layer at (24,310) size 12x12 +layer at (24,315) size 12x12 LayoutBlockFlow (relative positioned) {DIV} at (0,-4) size 12x12 [bgcolor=#FFFFFF] -layer at (24,314) size 368x4 +layer at (24,319) size 368x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 368x4 -layer at (24,314) size 0x4 +layer at (24,319) size 0x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF] -layer at (24,314) size 368x4 +layer at (24,319) size 368x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 368x4 [bgcolor=#FFFFFF8A]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/media/media-controls-clone-expected.png b/third_party/WebKit/LayoutTests/platform/mac/media/media-controls-clone-expected.png index 77cc19d..4a2107b 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/media/media-controls-clone-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/media/media-controls-clone-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/media/media-controls-clone-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/media/media-controls-clone-expected.txt index b1bc068..4381766 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/media/media-controls-clone-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/media/media-controls-clone-expected.txt
@@ -19,20 +19,21 @@ LayoutFlexibleBox {DIV} at (0,0) size 300x150 layer at (8,8) size 300x150 LayoutFlexibleBox {DIV} at (0,0) size 300x150 - LayoutSlider {INPUT} at (0,124) size 300x26 [color=#909090] - LayoutFlexibleBox {DIV} at (16,5) size 268x4 -layer at (8,100) size 300x32 - LayoutFlexibleBox (relative positioned) {DIV} at (0,92) size 300x32 - LayoutBlockFlow {DIV} at (16,32) size 242x0 -layer at (266,100) size 32x32 transparent - LayoutButton {INPUT} at (258,0) size 32x32 [color=#7F7F7F] -layer at (24,137) size 268x4 +layer at (8,78) size 300x48 + LayoutFlexibleBox (relative positioned) {DIV} at (0,70) size 300x48 + LayoutBlockFlow {DIV} at (16,48) size 226x0 +layer at (250,78) size 48x48 transparent + LayoutButton {INPUT} at (242,0) size 48x48 [color=#7F7F7F] +layer at (8,126) size 300x32 + LayoutSlider {INPUT} at (0,118) size 300x32 [color=#909090] + LayoutFlexibleBox {DIV} at (16,16) size 268x4 +layer at (24,142) size 268x4 LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 268x4 [bgcolor=#FFFFFF4D] -layer at (24,137) size 268x4 +layer at (24,142) size 268x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 268x4 -layer at (24,137) size 0x4 +layer at (24,142) size 0x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF] -layer at (24,137) size 0x4 +layer at (24,142) size 0x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF8A] layer at (308,104) size 300x54 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 300x54 @@ -57,20 +58,21 @@ LayoutFlexibleBox {DIV} at (0,0) size 300x150 layer at (8,162) size 300x150 LayoutFlexibleBox {DIV} at (0,0) size 300x150 - LayoutSlider {INPUT} at (0,124) size 300x26 [color=#909090] - LayoutFlexibleBox {DIV} at (16,5) size 268x4 -layer at (8,254) size 300x32 - LayoutFlexibleBox (relative positioned) {DIV} at (0,92) size 300x32 - LayoutBlockFlow {DIV} at (16,32) size 242x0 -layer at (266,254) size 32x32 transparent - LayoutButton {INPUT} at (258,0) size 32x32 [color=#7F7F7F] -layer at (24,291) size 268x4 +layer at (8,232) size 300x48 + LayoutFlexibleBox (relative positioned) {DIV} at (0,70) size 300x48 + LayoutBlockFlow {DIV} at (16,48) size 226x0 +layer at (250,232) size 48x48 transparent + LayoutButton {INPUT} at (242,0) size 48x48 [color=#7F7F7F] +layer at (8,280) size 300x32 + LayoutSlider {INPUT} at (0,118) size 300x32 [color=#909090] + LayoutFlexibleBox {DIV} at (16,16) size 268x4 +layer at (24,296) size 268x4 LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 268x4 [bgcolor=#FFFFFF4D] -layer at (24,291) size 268x4 +layer at (24,296) size 268x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 268x4 -layer at (24,291) size 0x4 +layer at (24,296) size 0x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF] -layer at (24,291) size 0x4 +layer at (24,296) size 0x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF8A] layer at (308,258) size 300x54 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 300x54
diff --git a/third_party/WebKit/LayoutTests/platform/mac/media/media-controls-grey-scrubber-expected.png b/third_party/WebKit/LayoutTests/platform/mac/media/media-controls-grey-scrubber-expected.png index 82b2701..612a06b 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/media/media-controls-grey-scrubber-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/media/media-controls-grey-scrubber-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/media/media-controls-grey-scrubber-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/media/media-controls-grey-scrubber-expected.txt index 3dcd90bf..4b47570 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/media/media-controls-grey-scrubber-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/media/media-controls-grey-scrubber-expected.txt
@@ -12,29 +12,30 @@ LayoutFlexibleBox {DIV} at (0,0) size 300x150 layer at (8,8) size 300x150 LayoutFlexibleBox {DIV} at (0,0) size 300x150 - LayoutSlider {INPUT} at (0,124) size 300x26 [color=#909090] - LayoutFlexibleBox {DIV} at (16,5) size 268x4 -layer at (8,8) size 300x132 clip at (9,9) size 298x130 - LayoutButton (relative positioned) {INPUT} at (0,0) size 300x132 [border: (1px solid #D8D8D8) (1px solid #D1D1D1) (1px solid #BABABA) (1px solid #D1D1D1)] - LayoutFlexibleBox (anonymous) at (8,37.50) size 284x56 +layer at (8,8) size 300x131 clip at (9,9) size 298x129 + LayoutButton (relative positioned) {INPUT} at (0,0) size 300x131 [border: (1px solid #D8D8D8) (1px solid #D1D1D1) (1px solid #BABABA) (1px solid #D1D1D1)] + LayoutFlexibleBox (anonymous) at (8,37) size 284x56 LayoutBlockFlow {DIV} at (114,0) size 56x56 [bgcolor=#FFFFFFE6] -layer at (8,100) size 300x32 - LayoutFlexibleBox (relative positioned) {DIV} at (0,92) size 300x32 - LayoutBlockFlow {DIV} at (16,2) size 27.25x30 [color=#FFFFFF] +layer at (8,78) size 300x48 + LayoutFlexibleBox (relative positioned) {DIV} at (0,70) size 300x48 + LayoutBlockFlow {DIV} at (16,18) size 27.25x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 28x16 text run at (0,7) width 28: "0:00" - LayoutBlockFlow {DIV} at (43.25,32) size 182.75x0 -layer at (234,100) size 32x32 transparent - LayoutButton {INPUT} at (226,0) size 32x32 [color=#7F7F7F] -layer at (266,100) size 32x32 transparent - LayoutButton {INPUT} at (258,0) size 32x32 [color=#7F7F7F] -layer at (24,137) size 268x4 + LayoutBlockFlow {DIV} at (43.25,48) size 150.75x0 +layer at (202,78) size 48x48 transparent + LayoutButton {INPUT} at (194,0) size 48x48 [color=#7F7F7F] +layer at (250,78) size 48x48 transparent + LayoutButton {INPUT} at (242,0) size 48x48 [color=#7F7F7F] +layer at (8,126) size 300x32 + LayoutSlider {INPUT} at (0,118) size 300x32 [color=#909090] + LayoutFlexibleBox {DIV} at (16,16) size 268x4 +layer at (24,142) size 268x4 LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 268x4 [bgcolor=#FFFFFF4D] -layer at (24,133) size 12x12 +layer at (24,138) size 12x12 LayoutBlockFlow (relative positioned) {DIV} at (0,-4) size 12x12 [bgcolor=#FFFFFF] -layer at (24,137) size 268x4 +layer at (24,142) size 268x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 268x4 -layer at (24,137) size 0x4 +layer at (24,142) size 0x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF] -layer at (24,137) size 0x4 +layer at (24,142) size 0x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF8A]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/media/media-document-audio-repaint-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/media/media-document-audio-repaint-expected.txt index cea89273..8d4791ce 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/media/media-document-audio-repaint-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/media/media-document-audio-repaint-expected.txt
@@ -25,8 +25,6 @@ layer at (40,186) size 300x54 scrollHeight 55 LayoutFlexibleBox {DIV} at (0,0) size 300x54 LayoutButton {INPUT} at (10,11) size 32x32 - LayoutSlider {INPUT} at (113.28,-1) size 144.72x56 [color=#909090] - LayoutFlexibleBox {DIV} at (16,26) size 112.72x4 LayoutButton {INPUT} at (258,11) size 32x32 layer at (87,205) size 27x16 transparent LayoutBlockFlow {DIV} at (47,19) size 27.25x16 @@ -36,6 +34,9 @@ LayoutBlockFlow {DIV} at (78.25,19) size 35.03x16 LayoutText {#text} at (0,0) size 36x16 text run at (0,0) width 36: "/ 0:01" + layer at (153,185) size 145x56 backgroundClip at (40,186) size 300x54 clip at (40,186) size 300x54 + LayoutSlider {INPUT} at (113.28,-1) size 144.72x56 [color=#909090] + LayoutFlexibleBox {DIV} at (16,26) size 112.72x4 layer at (169,211) size 113x4 LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 112.72x4 [bgcolor=#00000033] layer at (220,207) size 12x12
diff --git a/third_party/WebKit/LayoutTests/platform/mac/media/video-controls-rendering-expected.png b/third_party/WebKit/LayoutTests/platform/mac/media/video-controls-rendering-expected.png index 900c6ad..50943d8 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/media/video-controls-rendering-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/media/video-controls-rendering-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/media/video-controls-rendering-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/media/video-controls-rendering-expected.txt index 76f712f..3d0c99d0 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/media/video-controls-rendering-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/media/video-controls-rendering-expected.txt
@@ -21,32 +21,33 @@ LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,42) size 320x240 LayoutFlexibleBox {DIV} at (0,0) size 320x240 - LayoutSlider {INPUT} at (0,214) size 320x26 [color=#909090] - LayoutFlexibleBox {DIV} at (16,5) size 288x4 -layer at (8,42) size 320x222 clip at (9,43) size 318x220 - LayoutButton (relative positioned) {INPUT} at (0,0) size 320x222 [border: (1px solid #D8D8D8) (1px solid #D1D1D1) (1px solid #BABABA) (1px solid #D1D1D1)] - LayoutFlexibleBox (anonymous) at (8,82.50) size 304x56 +layer at (8,42) size 320x221 clip at (9,43) size 318x219 + LayoutButton (relative positioned) {INPUT} at (0,0) size 320x221 [border: (1px solid #D8D8D8) (1px solid #D1D1D1) (1px solid #BABABA) (1px solid #D1D1D1)] + LayoutFlexibleBox (anonymous) at (8,82) size 304x56 LayoutBlockFlow {DIV} at (124,0) size 56x56 [bgcolor=#FFFFFFE6] -layer at (8,224) size 320x32 - LayoutFlexibleBox (relative positioned) {DIV} at (0,182) size 320x32 - LayoutBlockFlow {DIV} at (16,2) size 27.25x30 [color=#FFFFFF] +layer at (8,202) size 320x48 + LayoutFlexibleBox (relative positioned) {DIV} at (0,160) size 320x48 + LayoutBlockFlow {DIV} at (16,18) size 27.25x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 28x16 text run at (0,7) width 28: "0:00" - LayoutBlockFlow {DIV} at (47.25,2) size 35.03x30 [color=#FFFFFF] + LayoutBlockFlow {DIV} at (47.25,18) size 35.03x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 36x16 text run at (0,7) width 36: "/ 0:06" - LayoutBlockFlow {DIV} at (82.28,32) size 163.72x0 - LayoutButton {INPUT} at (246,0) size 32x32 - LayoutButton {INPUT} at (278,0) size 32x32 -layer at (24,261) size 288x4 + LayoutBlockFlow {DIV} at (82.28,48) size 131.72x0 + LayoutButton {INPUT} at (214,0) size 48x48 + LayoutButton {INPUT} at (262,0) size 48x48 +layer at (8,250) size 320x32 + LayoutSlider {INPUT} at (0,208) size 320x32 [color=#909090] + LayoutFlexibleBox {DIV} at (16,16) size 288x4 +layer at (24,266) size 288x4 LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF4D] -layer at (24,257) size 12x12 +layer at (24,262) size 12x12 LayoutBlockFlow (relative positioned) {DIV} at (0,-4) size 12x12 [bgcolor=#FFFFFF] -layer at (24,261) size 288x4 +layer at (24,266) size 288x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 -layer at (24,261) size 0x4 +layer at (24,266) size 0x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF] -layer at (24,261) size 288x4 +layer at (24,266) size 288x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF8A] layer at (8,282) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 @@ -54,32 +55,33 @@ LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,282) size 320x240 LayoutFlexibleBox {DIV} at (0,0) size 320x240 - LayoutSlider {INPUT} at (0,214) size 320x26 [color=#909090] - LayoutFlexibleBox {DIV} at (16,5) size 288x4 -layer at (8,282) size 320x222 clip at (9,283) size 318x220 - LayoutButton (relative positioned) {INPUT} at (0,0) size 320x222 [border: (1px solid #D8D8D8) (1px solid #D1D1D1) (1px solid #BABABA) (1px solid #D1D1D1)] - LayoutFlexibleBox (anonymous) at (8,82.50) size 304x56 +layer at (8,282) size 320x221 clip at (9,283) size 318x219 + LayoutButton (relative positioned) {INPUT} at (0,0) size 320x221 [border: (1px solid #D8D8D8) (1px solid #D1D1D1) (1px solid #BABABA) (1px solid #D1D1D1)] + LayoutFlexibleBox (anonymous) at (8,82) size 304x56 LayoutBlockFlow {DIV} at (124,0) size 56x56 [bgcolor=#FFFFFFE6] -layer at (8,464) size 320x32 - LayoutFlexibleBox (relative positioned) {DIV} at (0,182) size 320x32 - LayoutBlockFlow {DIV} at (16,2) size 27.25x30 [color=#FFFFFF] +layer at (8,442) size 320x48 + LayoutFlexibleBox (relative positioned) {DIV} at (0,160) size 320x48 + LayoutBlockFlow {DIV} at (16,18) size 27.25x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 28x16 text run at (0,7) width 28: "0:00" - LayoutBlockFlow {DIV} at (47.25,2) size 35.03x30 [color=#FFFFFF] + LayoutBlockFlow {DIV} at (47.25,18) size 35.03x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 36x16 text run at (0,7) width 36: "/ 0:06" - LayoutBlockFlow {DIV} at (82.28,32) size 163.72x0 - LayoutButton {INPUT} at (246,0) size 32x32 - LayoutButton {INPUT} at (278,0) size 32x32 -layer at (24,501) size 288x4 + LayoutBlockFlow {DIV} at (82.28,48) size 131.72x0 + LayoutButton {INPUT} at (214,0) size 48x48 + LayoutButton {INPUT} at (262,0) size 48x48 +layer at (8,490) size 320x32 + LayoutSlider {INPUT} at (0,208) size 320x32 [color=#909090] + LayoutFlexibleBox {DIV} at (16,16) size 288x4 +layer at (24,506) size 288x4 LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF4D] -layer at (24,497) size 12x12 +layer at (24,502) size 12x12 LayoutBlockFlow (relative positioned) {DIV} at (0,-4) size 12x12 [bgcolor=#FFFFFF] -layer at (24,501) size 288x4 +layer at (24,506) size 288x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 -layer at (24,501) size 0x4 +layer at (24,506) size 0x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF] -layer at (24,501) size 288x4 +layer at (24,506) size 288x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF8A] layer at (8,522) size 320x240 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 LayoutVideo (positioned) {VIDEO} at (8,522) size 320x240 @@ -89,30 +91,31 @@ LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,522) size 320x240 backgroundClip at (8,522) size 320x78 clip at (8,522) size 320x78 LayoutFlexibleBox {DIV} at (0,0) size 320x240 - LayoutSlider {INPUT} at (0,214) size 320x26 [color=#909090] - LayoutFlexibleBox {DIV} at (16,5) size 288x4 -layer at (8,522) size 320x222 backgroundClip at (8,522) size 320x78 clip at (9,523) size 318x77 - LayoutButton (relative positioned) {INPUT} at (0,0) size 320x222 [border: (1px solid #D8D8D8) (1px solid #D1D1D1) (1px solid #BABABA) (1px solid #D1D1D1)] - LayoutFlexibleBox (anonymous) at (8,82.50) size 304x56 +layer at (8,522) size 320x221 backgroundClip at (8,522) size 320x78 clip at (9,523) size 318x77 + LayoutButton (relative positioned) {INPUT} at (0,0) size 320x221 [border: (1px solid #D8D8D8) (1px solid #D1D1D1) (1px solid #BABABA) (1px solid #D1D1D1)] + LayoutFlexibleBox (anonymous) at (8,82) size 304x56 LayoutBlockFlow {DIV} at (124,0) size 56x56 [bgcolor=#FFFFFFE6] -layer at (8,704) size 320x32 backgroundClip at (0,0) size 0x0 clip at (0,0) size 0x0 - LayoutFlexibleBox (relative positioned) {DIV} at (0,182) size 320x32 - LayoutBlockFlow {DIV} at (16,2) size 27.25x30 [color=#FFFFFF] +layer at (8,682) size 320x48 backgroundClip at (0,0) size 0x0 clip at (0,0) size 0x0 + LayoutFlexibleBox (relative positioned) {DIV} at (0,160) size 320x48 + LayoutBlockFlow {DIV} at (16,18) size 27.25x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 28x16 text run at (0,7) width 28: "0:00" - LayoutBlockFlow {DIV} at (47.25,2) size 35.03x30 [color=#FFFFFF] + LayoutBlockFlow {DIV} at (47.25,18) size 35.03x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 36x16 text run at (0,7) width 36: "/ 0:06" - LayoutBlockFlow {DIV} at (82.28,32) size 163.72x0 - LayoutButton {INPUT} at (246,0) size 32x32 - LayoutButton {INPUT} at (278,0) size 32x32 -layer at (24,741) size 288x4 backgroundClip at (8,522) size 320x78 clip at (8,522) size 320x78 + LayoutBlockFlow {DIV} at (82.28,48) size 131.72x0 + LayoutButton {INPUT} at (214,0) size 48x48 + LayoutButton {INPUT} at (262,0) size 48x48 +layer at (8,730) size 320x32 backgroundClip at (8,522) size 320x78 clip at (8,522) size 320x78 + LayoutSlider {INPUT} at (0,208) size 320x32 [color=#909090] + LayoutFlexibleBox {DIV} at (16,16) size 288x4 +layer at (24,746) size 288x4 backgroundClip at (8,522) size 320x78 clip at (8,522) size 320x78 LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF4D] -layer at (24,737) size 12x12 backgroundClip at (8,522) size 320x78 clip at (8,522) size 320x78 +layer at (24,742) size 12x12 backgroundClip at (8,522) size 320x78 clip at (8,522) size 320x78 LayoutBlockFlow (relative positioned) {DIV} at (0,-4) size 12x12 [bgcolor=#FFFFFF] -layer at (24,741) size 288x4 backgroundClip at (0,0) size 0x0 clip at (0,0) size 0x0 +layer at (24,746) size 288x4 backgroundClip at (0,0) size 0x0 clip at (0,0) size 0x0 LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 -layer at (24,741) size 0x4 +layer at (24,746) size 0x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF] -layer at (24,741) size 288x4 backgroundClip at (0,0) size 0x0 clip at (0,0) size 0x0 +layer at (24,746) size 288x4 backgroundClip at (0,0) size 0x0 clip at (0,0) size 0x0 LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF8A]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/media/video-display-toggle-expected.png b/third_party/WebKit/LayoutTests/platform/mac/media/video-display-toggle-expected.png index 044678f..cb3c1943 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/media/video-display-toggle-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/media/video-display-toggle-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/media/video-display-toggle-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/media/video-display-toggle-expected.txt index 57d3b0c2..a760471 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/media/video-display-toggle-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/media/video-display-toggle-expected.txt
@@ -15,30 +15,31 @@ LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,26) size 320x240 LayoutFlexibleBox {DIV} at (0,0) size 320x240 - LayoutSlider {INPUT} at (0,214) size 320x26 [color=#909090] - LayoutFlexibleBox {DIV} at (16,5) size 288x4 -layer at (8,26) size 320x222 clip at (9,27) size 318x220 - LayoutButton (relative positioned) {INPUT} at (0,0) size 320x222 [border: (1px solid #D8D8D8) (1px solid #D1D1D1) (1px solid #BABABA) (1px solid #D1D1D1)] - LayoutFlexibleBox (anonymous) at (8,82.50) size 304x56 +layer at (8,26) size 320x221 clip at (9,27) size 318x219 + LayoutButton (relative positioned) {INPUT} at (0,0) size 320x221 [border: (1px solid #D8D8D8) (1px solid #D1D1D1) (1px solid #BABABA) (1px solid #D1D1D1)] + LayoutFlexibleBox (anonymous) at (8,82) size 304x56 LayoutBlockFlow {DIV} at (124,0) size 56x56 [bgcolor=#FFFFFFE6] -layer at (8,208) size 320x32 - LayoutFlexibleBox (relative positioned) {DIV} at (0,182) size 320x32 - LayoutBlockFlow {DIV} at (16,2) size 27.25x30 [color=#FFFFFF] +layer at (8,186) size 320x48 + LayoutFlexibleBox (relative positioned) {DIV} at (0,160) size 320x48 + LayoutBlockFlow {DIV} at (16,18) size 27.25x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 28x16 text run at (0,7) width 28: "0:00" - LayoutBlockFlow {DIV} at (47.25,2) size 35.03x30 [color=#FFFFFF] + LayoutBlockFlow {DIV} at (47.25,18) size 35.03x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 36x16 text run at (0,7) width 36: "/ 0:06" - LayoutBlockFlow {DIV} at (82.28,32) size 163.72x0 - LayoutButton {INPUT} at (246,0) size 32x32 - LayoutButton {INPUT} at (278,0) size 32x32 -layer at (24,245) size 288x4 + LayoutBlockFlow {DIV} at (82.28,48) size 131.72x0 + LayoutButton {INPUT} at (214,0) size 48x48 + LayoutButton {INPUT} at (262,0) size 48x48 +layer at (8,234) size 320x32 + LayoutSlider {INPUT} at (0,208) size 320x32 [color=#909090] + LayoutFlexibleBox {DIV} at (16,16) size 288x4 +layer at (24,250) size 288x4 LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF4D] -layer at (24,241) size 12x12 +layer at (24,246) size 12x12 LayoutBlockFlow (relative positioned) {DIV} at (0,-4) size 12x12 [bgcolor=#FFFFFF] -layer at (24,245) size 288x4 +layer at (24,250) size 288x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 -layer at (24,245) size 0x4 +layer at (24,250) size 0x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF] -layer at (24,245) size 288x4 +layer at (24,250) size 288x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF8A]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/media/video-empty-source-expected.png b/third_party/WebKit/LayoutTests/platform/mac/media/video-empty-source-expected.png index 3b540226..c12dab2 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/media/video-empty-source-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/media/video-empty-source-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/media/video-empty-source-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/media/video-empty-source-expected.txt index 90c1316c..7a4eba4 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/media/video-empty-source-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/media/video-empty-source-expected.txt
@@ -16,30 +16,31 @@ LayoutFlexibleBox {DIV} at (0,0) size 300x150 layer at (9,43) size 300x150 LayoutFlexibleBox {DIV} at (0,0) size 300x150 - LayoutSlider {INPUT} at (0,124) size 300x26 [color=#909090] - LayoutFlexibleBox {DIV} at (16,5) size 268x4 -layer at (9,43) size 300x132 clip at (10,44) size 298x130 - LayoutButton (relative positioned) {INPUT} at (0,0) size 300x132 [border: (1px solid #D8D8D8) (1px solid #D1D1D1) (1px solid #BABABA) (1px solid #D1D1D1)] - LayoutFlexibleBox (anonymous) at (8,37.50) size 284x56 -layer at (131,81) size 56x56 transparent +layer at (9,43) size 300x131 clip at (10,44) size 298x129 + LayoutButton (relative positioned) {INPUT} at (0,0) size 300x131 [border: (1px solid #D8D8D8) (1px solid #D1D1D1) (1px solid #BABABA) (1px solid #D1D1D1)] + LayoutFlexibleBox (anonymous) at (8,37) size 284x56 +layer at (131,80) size 56x56 transparent LayoutBlockFlow {DIV} at (114,0) size 56x56 [bgcolor=#FFFFFFE6] -layer at (9,135) size 300x32 - LayoutFlexibleBox (relative positioned) {DIV} at (0,92) size 300x32 - LayoutBlockFlow {DIV} at (16,2) size 27.25x30 [color=#FFFFFF] +layer at (9,113) size 300x48 + LayoutFlexibleBox (relative positioned) {DIV} at (0,70) size 300x48 + LayoutBlockFlow {DIV} at (16,18) size 27.25x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 28x16 text run at (0,7) width 28: "0:00" - LayoutBlockFlow {DIV} at (43.25,32) size 150.75x0 -layer at (203,135) size 32x32 transparent - LayoutButton {INPUT} at (194,0) size 32x32 [color=#7F7F7F] -layer at (235,135) size 32x32 transparent - LayoutButton {INPUT} at (226,0) size 32x32 [color=#7F7F7F] -layer at (267,135) size 32x32 transparent - LayoutButton {INPUT} at (258,0) size 32x32 [color=#7F7F7F] -layer at (25,172) size 268x4 + LayoutBlockFlow {DIV} at (43.25,48) size 102.75x0 +layer at (155,113) size 48x48 transparent + LayoutButton {INPUT} at (146,0) size 48x48 [color=#7F7F7F] +layer at (203,113) size 48x48 transparent + LayoutButton {INPUT} at (194,0) size 48x48 [color=#7F7F7F] +layer at (251,113) size 48x48 transparent + LayoutButton {INPUT} at (242,0) size 48x48 [color=#7F7F7F] +layer at (9,161) size 300x32 + LayoutSlider {INPUT} at (0,118) size 300x32 [color=#909090] + LayoutFlexibleBox {DIV} at (16,16) size 268x4 +layer at (25,177) size 268x4 LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 268x4 [bgcolor=#FFFFFF4D] -layer at (25,172) size 268x4 +layer at (25,177) size 268x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 268x4 -layer at (25,172) size 0x4 +layer at (25,177) size 0x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF] -layer at (25,172) size 0x4 +layer at (25,177) size 0x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF8A]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/media/video-no-audio-expected.png b/third_party/WebKit/LayoutTests/platform/mac/media/video-no-audio-expected.png index ce9719f9..eadbb7b 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/media/video-no-audio-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/media/video-no-audio-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/media/video-no-audio-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/media/video-no-audio-expected.txt index f674ff0b..ce09183 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/media/video-no-audio-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/media/video-no-audio-expected.txt
@@ -16,31 +16,32 @@ LayoutFlexibleBox {DIV} at (0,0) size 352x288 layer at (8,42) size 352x288 LayoutFlexibleBox {DIV} at (0,0) size 352x288 - LayoutSlider {INPUT} at (0,262) size 352x26 [color=#909090] - LayoutFlexibleBox {DIV} at (16,5) size 320x4 -layer at (8,42) size 352x270 clip at (9,43) size 350x268 - LayoutButton (relative positioned) {INPUT} at (0,0) size 352x270 [border: (1px solid #D8D8D8) (1px solid #D1D1D1) (1px solid #BABABA) (1px solid #D1D1D1)] - LayoutFlexibleBox (anonymous) at (8,106.50) size 336x56 +layer at (8,42) size 352x269 clip at (9,43) size 350x267 + LayoutButton (relative positioned) {INPUT} at (0,0) size 352x269 [border: (1px solid #D8D8D8) (1px solid #D1D1D1) (1px solid #BABABA) (1px solid #D1D1D1)] + LayoutFlexibleBox (anonymous) at (8,106) size 336x56 LayoutBlockFlow {DIV} at (140,0) size 56x56 [bgcolor=#FFFFFFE6] -layer at (8,272) size 352x32 - LayoutFlexibleBox (relative positioned) {DIV} at (0,230) size 352x32 - LayoutBlockFlow {DIV} at (16,2) size 27.25x30 [color=#FFFFFF] +layer at (8,250) size 352x48 + LayoutFlexibleBox (relative positioned) {DIV} at (0,208) size 352x48 + LayoutBlockFlow {DIV} at (16,18) size 27.25x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 28x16 text run at (0,7) width 28: "0:00" - LayoutBlockFlow {DIV} at (47.25,2) size 35.03x30 [color=#FFFFFF] + LayoutBlockFlow {DIV} at (47.25,18) size 35.03x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 36x16 text run at (0,7) width 36: "/ 0:09" - LayoutBlockFlow {DIV} at (82.28,32) size 195.72x0 - LayoutButton {INPUT} at (310,0) size 32x32 -layer at (286,272) size 32x32 transparent - LayoutButton {INPUT} at (278,0) size 32x32 [color=#7F7F7F] -layer at (24,309) size 320x4 + LayoutBlockFlow {DIV} at (82.28,48) size 163.72x0 + LayoutButton {INPUT} at (294,0) size 48x48 +layer at (254,250) size 48x48 transparent + LayoutButton {INPUT} at (246,0) size 48x48 [color=#7F7F7F] +layer at (8,298) size 352x32 + LayoutSlider {INPUT} at (0,256) size 352x32 [color=#909090] + LayoutFlexibleBox {DIV} at (16,16) size 320x4 +layer at (24,314) size 320x4 LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 320x4 [bgcolor=#FFFFFF4D] -layer at (24,305) size 12x12 +layer at (24,310) size 12x12 LayoutBlockFlow (relative positioned) {DIV} at (0,-4) size 12x12 [bgcolor=#FFFFFF] -layer at (24,309) size 320x4 +layer at (24,314) size 320x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x4 -layer at (24,309) size 0x4 +layer at (24,314) size 0x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF] -layer at (24,309) size 320x4 +layer at (24,314) size 320x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x4 [bgcolor=#FFFFFF8A]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/media/video-zoom-controls-expected.png b/third_party/WebKit/LayoutTests/platform/mac/media/video-zoom-controls-expected.png index 8214c862..74825fd 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/media/video-zoom-controls-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/media/video-zoom-controls-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/media/video-zoom-controls-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/media/video-zoom-controls-expected.txt index 8939c09..a06eb74b 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/media/video-zoom-controls-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/media/video-zoom-controls-expected.txt
@@ -14,21 +14,23 @@ LayoutFlexibleBox {DIV} at (0,0) size 240x180 layer at (57,85) size 240x180 LayoutFlexibleBox {DIV} at (0,0) size 240x180 -layer at (57,85) size 240x192 backgroundClip at (57,85) size 240x180 clip at (59,87) size 237x178 - LayoutButton (relative positioned) {INPUT} at (0,0) size 240x192 [border: (1.50px solid #D8D8D8) (1.50px solid #D1D1D1) (1.50px solid #BABABA) (1.50px solid #D1D1D1)] - LayoutFlexibleBox (anonymous) at (12,53.25) size 216x84 +layer at (57,85) size 240x224 backgroundClip at (57,85) size 240x180 clip at (59,87) size 237x178 + LayoutButton (relative positioned) {INPUT} at (0,0) size 240x223.50 [border: (1.50px solid #D8D8D8) (1.50px solid #D1D1D1) (1.50px solid #BABABA) (1.50px solid #D1D1D1)] + LayoutFlexibleBox (anonymous) at (12,69) size 216x84 LayoutBlockFlow {DIV} at (66,0) size 84x84 [bgcolor=#FFFFFFE6] layer at (57,217) size 240x48 - LayoutFlexibleBox (relative positioned) {DIV} at (0,132) size 240x48 - LayoutBlockFlow {DIV} at (24,3) size 40.88x45 [color=#FFFFFF] - LayoutText {#text} at (0,10) size 41x24 - text run at (0,10) width 41: "0:00" - LayoutBlockFlow {DIV} at (70.88,3) size 52.55x45 [color=#FFFFFF] - LayoutText {#text} at (0,10) size 53x24 - text run at (0,10) width 53: "/ 0:06" - LayoutBlockFlow {DIV} at (123.42,48) size 5.58x0 - LayoutButton {INPUT} at (129,0) size 48x48 - LayoutButton {INPUT} at (177,0) size 48x48 + LayoutSlider {INPUT} at (0,132) size 240x48 [color=#909090] + LayoutFlexibleBox {DIV} at (24,24) size 192x6 +layer at (81,241) size 192x6 + LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 192x6 [bgcolor=#FFFFFF4D] +layer at (81,235) size 18x18 + LayoutBlockFlow (relative positioned) {DIV} at (0,-6) size 18x18 [bgcolor=#FFFFFF] +layer at (81,241) size 192x6 scrollWidth 288 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 192x6 +layer at (81,241) size 0x6 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x6 [bgcolor=#FFFFFF] +layer at (81,241) size 288x6 backgroundClip at (81,241) size 192x6 clip at (81,241) size 192x6 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x6 [bgcolor=#FFFFFF8A] layer at (57,310) size 240x180 LayoutVideo {VIDEO} at (45,298) size 240x180 layer at (57,310) size 240x180 @@ -37,18 +39,20 @@ LayoutFlexibleBox {DIV} at (0,0) size 240x180 layer at (57,310) size 240x180 LayoutFlexibleBox {DIV} at (0,0) size 240x180 -layer at (57,310) size 240x192 clip at (59,312) size 237x189 - LayoutButton (relative positioned) {INPUT} at (0,0) size 240x192 [border: (1.50px solid #D8D8D8) (1.50px solid #D1D1D1) (1.50px solid #BABABA) (1.50px solid #D1D1D1)] - LayoutFlexibleBox (anonymous) at (12,53.25) size 216x84 +layer at (57,310) size 240x224 backgroundClip at (43,291) size 268x218 clip at (59,312) size 237x197 + LayoutButton (relative positioned) {INPUT} at (0,0) size 240x223.50 [border: (1.50px solid #D8D8D8) (1.50px solid #D1D1D1) (1.50px solid #BABABA) (1.50px solid #D1D1D1)] + LayoutFlexibleBox (anonymous) at (12,69) size 216x84 LayoutBlockFlow {DIV} at (66,0) size 84x84 [bgcolor=#FFFFFFE6] -layer at (57,442) size 240x48 backgroundClip at (43,421) size 245x88 clip at (57,442) size 231x48 - LayoutFlexibleBox (relative positioned) {DIV} at (0,132) size 240x48 - LayoutBlockFlow {DIV} at (24,3) size 40.88x45 [color=#FFFFFF] - LayoutText {#text} at (0,10) size 41x24 - text run at (0,10) width 41: "0:00" - LayoutBlockFlow {DIV} at (70.88,3) size 52.55x45 [color=#FFFFFF] - LayoutText {#text} at (0,10) size 53x24 - text run at (0,10) width 53: "/ 0:06" - LayoutBlockFlow {DIV} at (123.42,48) size 5.58x0 - LayoutButton {INPUT} at (129,0) size 48x48 - LayoutButton {INPUT} at (177,0) size 48x48 +layer at (57,442) size 240x48 + LayoutSlider {INPUT} at (0,132) size 240x48 [color=#909090] + LayoutFlexibleBox {DIV} at (24,24) size 192x6 +layer at (81,466) size 192x6 + LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 192x6 [bgcolor=#FFFFFF4D] +layer at (81,460) size 18x18 + LayoutBlockFlow (relative positioned) {DIV} at (0,-6) size 18x18 [bgcolor=#FFFFFF] +layer at (81,466) size 192x6 backgroundClip at (70,448) size 190x40 clip at (81,466) size 179x6 scrollWidth 288 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 192x6 +layer at (81,466) size 0x6 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x6 [bgcolor=#FFFFFF] +layer at (81,466) size 288x6 backgroundClip at (70,448) size 190x40 clip at (70,448) size 190x40 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x6 [bgcolor=#FFFFFF8A]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/bugzilla-6473-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/bugzilla-6473-expected.txt index ac44acd..21d3b9b2 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/bugzilla-6473-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/bugzilla-6473-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutBlockFlow (relative positioned) P", "rect": [8, 146, 784, 18], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutBlockFlow (relative positioned) P",
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/caret-subpixel-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/caret-subpixel-expected.txt index 6d854b7..0fb0c10c 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/caret-subpixel-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/caret-subpixel-expected.txt
@@ -25,7 +25,7 @@ { "object": "LayoutBlockFlow DIV", "rect": [210, 11, 2, 13], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/clip/clip-with-layout-delta-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/clip/clip-with-layout-delta-expected.txt index aa851b7..3ddcaf8 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/clip/clip-with-layout-delta-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/clip/clip-with-layout-delta-expected.txt
@@ -20,12 +20,12 @@ { "object": "LayoutBlockFlow (relative positioned) DIV", "rect": [108, 8, 100, 100], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutBlockFlow (relative positioned) DIV", "rect": [108, 8, 100, 100], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutBlockFlow DIV", @@ -35,7 +35,7 @@ { "object": "LayoutBlockFlow DIV", "rect": [8, 8, 100, 100], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "InlineTextBox '\u00A0'",
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/clip/control-clip-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/clip/control-clip-expected.txt index 76e837b..0ad4cae 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/clip/control-clip-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/clip/control-clip-expected.txt
@@ -20,7 +20,7 @@ { "object": "InlineTextBox 'SUCCESS'", "rect": [82, 114, 52, 14], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox 'SUCCESS'", @@ -30,7 +30,7 @@ { "object": "InlineTextBox 'FAILURE'", "rect": [85, 114, 46, 14], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "InlineTextBox 'FAILURE'",
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/clip/outline-clip-change-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/clip/outline-clip-change-expected.txt index bc7410f9..67ff9b13 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/clip/outline-clip-change-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/clip/outline-clip-change-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutBlockFlow (positioned) A id='link' class='updated'", "rect": [48, 102, 92, 23], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox 'Lorem Ipsum'",
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/compositing/iframe-inside-squashed-layer-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/compositing/iframe-inside-squashed-layer-expected.txt index ebbe7d8..f767d77 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/compositing/iframe-inside-squashed-layer-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/compositing/iframe-inside-squashed-layer-expected.txt
@@ -46,7 +46,7 @@ { "object": "LayoutView #document", "rect": [285, 500, 15, 150], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/create-layer-repaint-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/create-layer-repaint-expected.txt index de1a1d0..59dac7f 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/create-layer-repaint-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/create-layer-repaint-expected.txt
@@ -25,7 +25,7 @@ { "object": "LayoutBlockFlow DIV id='test' class='stretchy'", "rect": [28, 54, 250, 50], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/css-grid-layout/grid-item-z-index-change-repaint-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/css-grid-layout/grid-item-z-index-change-repaint-expected.txt index a835b1a..e963134 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/css-grid-layout/grid-item-z-index-change-repaint-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/css-grid-layout/grid-item-z-index-change-repaint-expected.txt
@@ -20,17 +20,17 @@ { "object": "LayoutBlockFlow HTML", "rect": [8, 16, 464, 320], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutBlockFlow HTML", "rect": [8, 16, 464, 320], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutBlockFlow DIV id='item2' class='sizedToGridArea green'", "rect": [8, 236, 200, 100], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/forms/textarea-caret-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/forms/textarea-caret-expected.txt index 6e88c1b3..727b9b4 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/forms/textarea-caret-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/forms/textarea-caret-expected.txt
@@ -20,22 +20,22 @@ { "object": "LayoutTextControl TEXTAREA id='editor'", "rect": [5, 5, 147, 38], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutTextControl TEXTAREA id='editor'", "rect": [5, 5, 147, 38], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutBlockFlow HTML", "rect": [8, 8, 141, 32], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutTextControl TEXTAREA id='editor'", "rect": [9, 11, 124, 13], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/invalidation-after-opacity-change-subtree-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/invalidation-after-opacity-change-subtree-expected.txt index 7376f287..c25a949 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/invalidation-after-opacity-change-subtree-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/invalidation-after-opacity-change-subtree-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutBlockFlow HTML", "rect": [8, 2045, 774, 259], - "reason": "appeared" + "reason": "chunk appeared" } ], "transform": 1
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/line-flow-with-floats-9-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/line-flow-with-floats-9-expected.txt index fbfef89..f95da14 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/line-flow-with-floats-9-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/line-flow-with-floats-9-expected.txt
@@ -405,7 +405,7 @@ { "object": "LayoutView #document", "rect": [485, 0, 15, 600], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/multicol/multicol-with-abspos-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/multicol/multicol-with-abspos-expected.txt index 3e54f8c..6a6d834e 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/multicol/multicol-with-abspos-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/multicol/multicol-with-abspos-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutBlockFlow (positioned) DIV id='target'", "rect": [0, 579, 80, 21], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/multicol/multicol-with-relpos-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/multicol/multicol-with-relpos-expected.txt new file mode 100644 index 0000000..89f46c0 --- /dev/null +++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/multicol/multicol-with-relpos-expected.txt
@@ -0,0 +1,35 @@ +{ + "layers": [ + { + "name": "LayoutView #document", + "bounds": [800, 600], + "drawsContent": false, + "backgroundColor": "#FFFFFF" + }, + { + "name": "Scrolling Layer", + "bounds": [800, 600], + "drawsContent": false + }, + { + "name": "Scrolling Contents Layer", + "bounds": [800, 600], + "contentsOpaque": true, + "backgroundColor": "#FFFFFF", + "paintInvalidations": [ + { + "object": "LayoutBlockFlow (relative positioned) DIV id='target'", + "rect": [508, 28, 150, 20], + "reason": "chunk appeared" + } + ] + } + ], + "objectPaintInvalidations": [ + { + "object": "LayoutBlockFlow (relative positioned) DIV id='target'", + "reason": "style change" + } + ] +} +
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/offset-change-wrong-invalidation-with-float-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/offset-change-wrong-invalidation-with-float-expected.txt index edbcbf8..63aff4c 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/offset-change-wrong-invalidation-with-float-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/offset-change-wrong-invalidation-with-float-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutBlockFlow (positioned) UL id='submenu'", "rect": [48, 92, 40, 18], - "reason": "disappeared" + "reason": "chunk disappeared" } ] },
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/overflow/opacity-change-on-overflow-float-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/overflow/opacity-change-on-overflow-float-expected.txt index 712cb20b0..4bfa6ba 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/overflow/opacity-change-on-overflow-float-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/overflow/opacity-change-on-overflow-float-expected.txt
@@ -45,7 +45,7 @@ { "object": "LayoutBlockFlow HTML", "rect": [8, 8, 779, 54], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox 'Repaint test for '", @@ -55,17 +55,17 @@ { "object": "LayoutBlockFlow (floating) DIV class='green'", "rect": [8, 78, 100, 100], - "reason": "disappeared" - }, - { - "object": "LayoutBlockFlow (floating) DIV class='red'", - "rect": [8, 78, 100, 100], - "reason": "appeared" + "reason": "chunk disappeared" }, { "object": "LayoutBlockFlow (floating) DIV class='red'", "rect": [8, 78, 100, 100], "reason": "disappeared" + }, + { + "object": "LayoutBlockFlow (floating) DIV class='red'", + "rect": [8, 78, 100, 100], + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/overhanging-float-detach-repaint-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/overhanging-float-detach-repaint-expected.txt index 8615c92..bc9d917 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/overhanging-float-detach-repaint-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/overhanging-float-detach-repaint-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutBlockFlow HTML", "rect": [8, 62, 100, 100], - "reason": "disappeared" + "reason": "chunk disappeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/paint-invalidation-with-reparent-across-frame-boundaries-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/paint-invalidation-with-reparent-across-frame-boundaries-expected.txt index 4416ff4..ab790a63 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/paint-invalidation-with-reparent-across-frame-boundaries-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/paint-invalidation-with-reparent-across-frame-boundaries-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutBlockFlow HTML", "rect": [18, 18, 23, 18], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "InlineTextBox 'abc'",
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/position/shift-relative-positioned-container-with-image-addition-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/position/shift-relative-positioned-container-with-image-addition-expected.txt index a9982ba..5530a00 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/position/shift-relative-positioned-container-with-image-addition-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/position/shift-relative-positioned-container-with-image-addition-expected.txt
@@ -30,7 +30,7 @@ { "object": "LayoutBlockFlow HTML", "rect": [58, 230, 489, 537], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutImage IMG",
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/position/shift-relative-positioned-container-with-image-removal-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/position/shift-relative-positioned-container-with-image-removal-expected.txt index 5b236a2..0cbfd1ba 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/position/shift-relative-positioned-container-with-image-removal-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/position/shift-relative-positioned-container-with-image-removal-expected.txt
@@ -25,7 +25,7 @@ { "object": "LayoutBlockFlow HTML", "rect": [58, 234, 489, 537], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutImage IMG",
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/remove-inline-layer-after-layout-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/remove-inline-layer-after-layout-expected.txt index e152a14d..56880b4 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/remove-inline-layer-after-layout-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/remove-inline-layer-after-layout-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutInline SPAN id='target'", "rect": [112, 194, 181, 18], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutBlockFlow DIV",
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/resize-iframe-text-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/resize-iframe-text-expected.txt index 0598ddc7..4aed49e 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/resize-iframe-text-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/resize-iframe-text-expected.txt
@@ -25,12 +25,12 @@ { "object": "LayoutBlockFlow HTML", "rect": [8, 299, 61, 23], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutView #document", "rect": [485, 0, 15, 200], - "reason": "disappeared" + "reason": "chunk disappeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/scroll/caret-with-composited-scroll-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/scroll/caret-with-composited-scroll-expected.txt index 5f0adfd8..c1206e93 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/scroll/caret-with-composited-scroll-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/scroll/caret-with-composited-scroll-expected.txt
@@ -36,17 +36,17 @@ { "object": "LayoutTextControl INPUT id='text'", "rect": [0, 997, 205, 22], - "reason": "appeared" + "reason": "subtree" }, { "object": "LayoutTextControl INPUT id='text'", "rect": [0, 997, 205, 22], - "reason": "subtree" + "reason": "chunk appeared" }, { "object": "LayoutBlockFlow DIV", "rect": [3, 1003, 1, 13], - "reason": "appeared" + "reason": "chunk appeared" } ], "transform": 1
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/scroll/invalidate-caret-in-composited-scrolling-container-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/scroll/invalidate-caret-in-composited-scrolling-container-expected.txt index f64dac8..666b819d 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/scroll/invalidate-caret-in-composited-scrolling-container-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/scroll/invalidate-caret-in-composited-scrolling-container-expected.txt
@@ -51,7 +51,7 @@ { "object": "Caret", "rect": [39, 6, 1, 13], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/scroll/invalidate-caret-in-non-composited-scrolling-container-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/scroll/invalidate-caret-in-non-composited-scrolling-container-expected.txt index f64dac8..666b819d 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/scroll/invalidate-caret-in-non-composited-scrolling-container-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/scroll/invalidate-caret-in-non-composited-scrolling-container-expected.txt
@@ -51,7 +51,7 @@ { "object": "Caret", "rect": [39, 6, 1, 13], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/search-field-cancel-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/search-field-cancel-expected.txt index bf44145..88f5638 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/search-field-cancel-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/search-field-cancel-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutBlockFlow DIV", "rect": [12, 45, 52, 14], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/ems-display-none-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/ems-display-none-expected.txt index e1532be7..a149ff99b 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/ems-display-none-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/ems-display-none-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutSVGRoot svg", "rect": [50, 54, 571, 86], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/exs-display-none-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/exs-display-none-expected.txt index 74df34c3..7fc51b81 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/exs-display-none-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/exs-display-none-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutSVGRoot svg", "rect": [50, 50, 571, 82], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/inner-svg-change-viewPort-relative-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/inner-svg-change-viewPort-relative-expected.txt index 1237710a..f106aeb 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/inner-svg-change-viewPort-relative-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/inner-svg-change-viewPort-relative-expected.txt
@@ -25,7 +25,7 @@ { "object": "InlineTextBox 'right-aligned text'", "rect": [89, 86, 111, 18], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGViewportContainer svg id='inner'", @@ -35,7 +35,7 @@ { "object": "InlineTextBox 'right-aligned text'", "rect": [0, 86, 100, 18], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGContainer use",
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/js-late-clipPath-and-object-creation-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/js-late-clipPath-and-object-creation-expected.txt index 30ae84d..6cf3b15 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/js-late-clipPath-and-object-creation-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/js-late-clipPath-and-object-creation-expected.txt
@@ -20,17 +20,17 @@ { "object": "LayoutSVGContainer g id='content'", "rect": [16, 37, 784, 178], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer g id='content'", "rect": [16, 37, 784, 178], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [16, 37, 318, 178], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/js-late-clipPath-creation-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/js-late-clipPath-creation-expected.txt index 3e887a9..73f007d 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/js-late-clipPath-creation-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/js-late-clipPath-creation-expected.txt
@@ -20,12 +20,12 @@ { "object": "LayoutSVGContainer g id='content'", "rect": [16, 37, 784, 178], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [16, 37, 318, 178], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/js-late-gradient-and-object-creation-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/js-late-gradient-and-object-creation-expected.txt index 393f2625..60d700d 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/js-late-gradient-and-object-creation-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/js-late-gradient-and-object-creation-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutSVGRoot svg id='svg-root'", "rect": [0, 13, 754, 367], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/js-late-pattern-and-object-creation-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/js-late-pattern-and-object-creation-expected.txt index 5eb356c5..420a587 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/js-late-pattern-and-object-creation-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/js-late-pattern-and-object-creation-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutSVGRoot svg id='svg-root'", "rect": [0, 13, 679, 367], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/tabgroup-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/tabgroup-expected.txt index 66164b7..f1c5a32 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/tabgroup-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/tabgroup-expected.txt
@@ -20,67 +20,67 @@ { "object": "LayoutSVGContainer g", "rect": [388, 37, 318, 83], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer g", "rect": [261, 277, 305, 305], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer g", "rect": [5, 255, 240, 162], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGPath path", "rect": [5, 255, 240, 162], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGPath path", "rect": [5, 255, 240, 162], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGPath path", "rect": [5, 255, 240, 162], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer g", "rect": [505, 232, 240, 161], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox 'This is a tabgroup with triangular tab corners'", "rect": [15, 292, 212, 35], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer g id='tabgroupRect'", "rect": [37, 5, 161, 240], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGText text", "rect": [64, 257, 54, 29], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGText text", "rect": [11, 257, 46, 29], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGText text", "rect": [124, 257, 45, 29], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGText text", "rect": [174, 257, 32, 29], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/text-mask-update-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/text-mask-update-expected.txt index 930d4cd..8fcb3e37 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/text-mask-update-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/text-mask-update-expected.txt
@@ -20,22 +20,22 @@ { "object": "LayoutSVGRect rect", "rect": [10, 2, 46, 23], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGRect rect", "rect": [10, 2, 46, 23], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGRect rect", "rect": [10, 32, 43, 18], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGRect rect", "rect": [10, 32, 43, 18], - "reason": "disappeared" + "reason": "chunk disappeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/text-repaint-including-stroke-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/text-repaint-including-stroke-expected.txt index bfddf49..0254857 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/text-repaint-including-stroke-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/text-repaint-including-stroke-expected.txt
@@ -20,12 +20,12 @@ { "object": "LayoutSVGText text id='bounce'", "rect": [80, 0, 551, 118], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGRoot svg", "rect": [30, 0, 404, 60], - "reason": "disappeared" + "reason": "chunk disappeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/text-rescale-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/text-rescale-expected.txt index 5d47139..e82bac33 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/text-rescale-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/text-rescale-expected.txt
@@ -20,12 +20,12 @@ { "object": "InlineTextBox 'PASS '", "rect": [0, 114, 194, 46], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGRoot (positioned) svg", "rect": [0, 14, 194, 46], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGViewportContainer svg", @@ -35,7 +35,7 @@ { "object": "LayoutSVGViewportContainer svg", "rect": [310, 14, 92, 46], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGForeignObject foreignObject", @@ -50,7 +50,7 @@ { "object": "LayoutSVGContainer g id='text3g'", "rect": [0, 3, 6, 2], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGViewportContainer svg",
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/text-selection-text-05-t-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/text-selection-text-05-t-expected.txt index e415aae..061a2d1 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/text-selection-text-05-t-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/text-selection-text-05-t-expected.txt
@@ -20,12 +20,12 @@ { "object": "InlineTextBox '$Revision: 1.8 $'", "rect": [0, 0, 800, 600], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text id='revision'", "rect": [0, 0, 800, 600], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox 'text-anchor'", @@ -60,62 +60,62 @@ { "object": "InlineTextBox '1'", "rect": [266, 485, 109, 29], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [266, 485, 109, 29], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox '1'", "rect": [266, 201, 109, 21], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [266, 201, 109, 21], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox '1'", "rect": [428, 485, 102, 29], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [428, 485, 102, 29], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox '1'", "rect": [428, 201, 102, 21], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [428, 201, 102, 21], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox '1'", "rect": [591, 485, 93, 29], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [591, 485, 93, 29], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox '1'", "rect": [591, 201, 93, 21], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [591, 201, 93, 21], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox 'middle'", @@ -220,92 +220,92 @@ { "object": "InlineTextBox '1'", "rect": [428, 285, 61, 54], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [428, 285, 61, 54], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox '1'", "rect": [428, 435, 61, 29], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [428, 435, 61, 29], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox '1'", "rect": [428, 151, 61, 21], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [428, 151, 61, 21], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox '1'", "rect": [591, 285, 59, 54], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [591, 285, 59, 54], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox '1'", "rect": [266, 285, 59, 54], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [266, 285, 59, 54], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox '1'", "rect": [591, 435, 59, 29], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [591, 435, 59, 29], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox '1'", "rect": [266, 435, 59, 29], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [266, 435, 59, 29], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox '1'", "rect": [591, 151, 59, 21], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [591, 151, 59, 21], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox '1'", "rect": [266, 151, 59, 21], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [266, 151, 59, 21], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox 'start'", @@ -320,32 +320,32 @@ { "object": "InlineTextBox '1'", "rect": [428, 335, 44, 54], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [428, 335, 44, 54], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox '1'", "rect": [591, 335, 43, 54], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [591, 335, 43, 54], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox '1'", "rect": [266, 335, 43, 54], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [266, 335, 43, 54], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox 'end'", @@ -360,92 +360,92 @@ { "object": "InlineTextBox '1'", "rect": [411, 235, 36, 54], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [411, 235, 36, 54], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox '1'", "rect": [575, 235, 34, 54], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [575, 235, 34, 54], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox '1'", "rect": [250, 235, 34, 54], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [250, 235, 34, 54], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox '1'", "rect": [250, 385, 34, 45], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [250, 385, 34, 45], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox '1234'", "rect": [550, 101, 34, 21], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [550, 101, 34, 21], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox '1234'", "rect": [400, 101, 34, 21], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [400, 101, 34, 21], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox '1234'", "rect": [250, 101, 34, 21], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [250, 101, 34, 21], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox '1'", "rect": [411, 385, 28, 45], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [411, 385, 28, 45], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox '1'", "rect": [566, 385, 26, 45], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [566, 385, 26, 45], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/text-viewbox-rescale-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/text-viewbox-rescale-expected.txt index cac55a0c..bdee471 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/text-viewbox-rescale-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/text-viewbox-rescale-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutSVGViewportContainer svg id='inner1'", "rect": [0, 0, 200, 200], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox 'PASS '",
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/use-clipped-hit-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/use-clipped-hit-expected.txt index b115190..cbbe0728 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/use-clipped-hit-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/use-clipped-hit-expected.txt
@@ -20,12 +20,12 @@ { "object": "InlineTextBox 'Unknown'", "rect": [90, 116, 64, 18], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "InlineTextBox 'Passed'", "rect": [90, 116, 44, 18], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/window-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/window-expected.txt index d9360cae..acba3ca 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/window-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/window-expected.txt
@@ -20,22 +20,22 @@ { "object": "LayoutSVGContainer g id='bigWindow'", "rect": [37, 142, 551, 394], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGRect rect id='titleBarbigWindow'", "rect": [37, 142, 551, 17], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer g id='nestedWindow'", "rect": [76, 181, 316, 238], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGRect rect id='titleBarnestedWindow'", "rect": [76, 181, 316, 17], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGRect rect id='decoGroupMinimizednavWindow'", @@ -45,27 +45,27 @@ { "object": "LayoutSVGContainer g id='navWindow'", "rect": [623, 91, 176, 160], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer g id='colourPickerWindow'", "rect": [76, 194, 176, 144], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer g id='smallWindow'", "rect": [311, 376, 160, 145], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer g id='statusWindow'", "rect": [248, 343, 144, 66], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer g id='minimalWindow'", "rect": [38, 475, 121, 50], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGRect rect", @@ -75,7 +75,7 @@ { "object": "LayoutSVGText text", "rect": [616, 153, 12, 81], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer use id='closeButtonnavWindow'", @@ -85,7 +85,7 @@ { "object": "LayoutSVGContainer use id='closeButtonnavWindow'", "rect": [782, 94, 12, 11], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer use id='closeButtonnavWindow'", @@ -105,32 +105,32 @@ { "object": "LayoutSVGContainer use id='closeButtonbigWindow'", "rect": [571, 145, 12, 11], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer use id='minimizeButtonnestedWindow'", "rect": [349, 184, 12, 11], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer use id='closeButtoncolourPickerWindow'", "rect": [235, 197, 12, 11], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer use id='maximizeButtonstatusWindow'", "rect": [376, 345, 11, 12], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer use id='minimizeButtonstatusWindow'", "rect": [363, 345, 11, 12], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer use id='maximizeButtonnavWindow'", "rect": [769, 94, 11, 11], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer use id='maximizeButtonnavWindow'", @@ -140,7 +140,7 @@ { "object": "LayoutSVGContainer use id='minimizeButtonnavWindow'", "rect": [756, 94, 11, 11], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer use id='minimizeButtonnavWindow'", @@ -150,47 +150,47 @@ { "object": "LayoutSVGContainer use id='maximizeButtonbigWindow'", "rect": [558, 145, 11, 11], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer use id='minimizeButtonbigWindow'", "rect": [545, 145, 11, 11], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer use id='closeButtonsmallWindow'", "rect": [454, 379, 11, 11], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer use id='maximizeButtonsmallWindow'", "rect": [441, 379, 11, 11], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer use id='minimizeButtonsmallWindow'", "rect": [428, 379, 11, 11], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer use id='closeButtonnestedWindow'", "rect": [376, 184, 11, 11], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer use id='maximizeButtonnestedWindow'", "rect": [363, 184, 11, 11], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer use id='maximizeButtoncolourPickerWindow'", "rect": [222, 197, 11, 11], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer use id='minimizeButtoncolourPickerWindow'", "rect": [209, 197, 11, 11], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/transform/transform-inline-layered-child-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/transform/transform-inline-layered-child-expected.txt index 1b66c0f..164d223 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/transform/transform-inline-layered-child-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/transform/transform-inline-layered-child-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutInline (relative positioned) SPAN id='child'", "rect": [138, 359, 152, 182], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox 'A B C'",
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/layout_ng_experimental/fast/multicol/composited-layer-multiple-fragments-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/virtual/layout_ng_experimental/fast/multicol/composited-layer-multiple-fragments-expected.txt index a5b595c..724413f 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/layout_ng_experimental/fast/multicol/composited-layer-multiple-fragments-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/layout_ng_experimental/fast/multicol/composited-layer-multiple-fragments-expected.txt
@@ -26,15 +26,15 @@ LayoutNGBlockFlow {DIV} at (0,20) size 20x20 [bgcolor=#008000] LayoutNGBlockFlow {DIV} at (0,140) size 20x20 [bgcolor=#008000] LayoutNGBlockFlow {DIV} at (0,160) size 20x20 [bgcolor=#008000] -layer at (8,140) size 20x40 backgroundClip at (0,0) size 28x160 clip at (0,0) size 28x160 +layer at (8,140) size 20x40 LayoutNGBlockFlow {DIV} at (0,40) size 20x40 LayoutNGBlockFlow {DIV} at (0,0) size 20x20 [bgcolor=#008000] LayoutNGBlockFlow {DIV} at (0,20) size 20x20 [bgcolor=#008000] -layer at (28,140) size 20x40 backgroundClip at (0,0) size 28x160 clip at (0,0) size 28x160 +layer at (28,140) size 20x40 LayoutNGBlockFlow {DIV} at (0,100) size 20x40 LayoutNGBlockFlow {DIV} at (0,0) size 20x20 [bgcolor=#008000] LayoutNGBlockFlow {DIV} at (0,20) size 20x20 [bgcolor=#008000] -layer at (8,248) size 20x100 backgroundClip at (0,0) size 28x268 clip at (0,0) size 28x268 +layer at (8,248) size 20x100 LayoutNGBlockFlow {DIV} at (0,40) size 20x100 LayoutNGBlockFlow {DIV} at (0,0) size 20x20 [bgcolor=#008000] LayoutNGBlockFlow {DIV} at (0,20) size 20x20 [bgcolor=#008000]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/layout_ng_experimental/fast/multicol/composited-layer-multiple-fragments-translated-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/virtual/layout_ng_experimental/fast/multicol/composited-layer-multiple-fragments-translated-expected.txt index c5e2845..8b832a2 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/layout_ng_experimental/fast/multicol/composited-layer-multiple-fragments-translated-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/layout_ng_experimental/fast/multicol/composited-layer-multiple-fragments-translated-expected.txt
@@ -19,7 +19,7 @@ LayoutBR {BR} at (0,0) size 0x0 LayoutBR {BR} at (0,0) size 0x0 LayoutNGBlockFlow {DIV} at (0,160) size 20x20 [bgcolor=#FF0000] -layer at (28,108) size 20x60 backgroundClip at (0,0) size 28x128 clip at (0,0) size 28x128 +layer at (28,108) size 20x60 LayoutNGBlockFlow {DIV} at (0,100) size 20x60 LayoutNGBlockFlow {DIV} at (0,0) size 20x20 [bgcolor=#008000] LayoutNGBlockFlow (anonymous) at (0,20) size 20x20
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/layout_ng_experimental/fast/multicol/composited-layer-nested-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/virtual/layout_ng_experimental/fast/multicol/composited-layer-nested-expected.txt index febd0d0..708973f5 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/layout_ng_experimental/fast/multicol/composited-layer-nested-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/layout_ng_experimental/fast/multicol/composited-layer-nested-expected.txt
@@ -22,30 +22,30 @@ LayoutMultiColumnSet (anonymous) at (0,0) size 60x60 layer at (8,208) size 20x180 backgroundClip at (0,0) size 28x268 clip at (0,0) size 28x268 LayoutMultiColumnFlowThread (anonymous) at (0,0) size 20x180 -layer at (8,120) size 20x80 backgroundClip at (0,0) size 28x160 clip at (0,0) size 28x160 +layer at (8,120) size 20x80 LayoutNGBlockFlow {DIV} at (0,20) size 20x80 LayoutNGBlockFlow {DIV} at (0,0) size 20x20 [bgcolor=#008000] LayoutNGBlockFlow {DIV} at (0,60) size 20x20 [bgcolor=#008000] -layer at (8,140) size 20x40 backgroundClip at (0,0) size 28x160 clip at (0,0) size 28x160 +layer at (8,140) size 20x40 LayoutNGBlockFlow {DIV} at (0,20) size 20x40 LayoutNGBlockFlow {DIV} at (0,0) size 20x20 [bgcolor=#008000] LayoutNGBlockFlow {DIV} at (0,20) size 20x20 [bgcolor=#008000] -layer at (8,208) size 20x180 backgroundClip at (0,0) size 28x268 clip at (0,0) size 28x268 +layer at (8,208) size 20x180 LayoutNGBlockFlow {DIV} at (0,0) size 20x180 LayoutNGBlockFlow {DIV} at (0,80) size 20x20 [bgcolor=#008000] -layer at (8,208) size 20x80 backgroundClip at (0,0) size 28x268 clip at (0,0) size 28x268 +layer at (8,208) size 20x80 LayoutNGBlockFlow {DIV} at (0,0) size 20x80 LayoutNGBlockFlow {DIV} at (0,0) size 20x20 [bgcolor=#008000] LayoutNGBlockFlow {DIV} at (0,20) size 20x20 [bgcolor=#008000] -layer at (8,248) size 20x40 backgroundClip at (0,0) size 28x268 clip at (0,0) size 28x268 +layer at (8,248) size 20x40 LayoutNGBlockFlow {DIV} at (0,40) size 20x40 LayoutNGBlockFlow {DIV} at (0,0) size 20x20 [bgcolor=#008000] LayoutNGBlockFlow {DIV} at (0,20) size 20x20 [bgcolor=#008000] -layer at (8,308) size 20x80 backgroundClip at (0,0) size 28x268 clip at (0,0) size 28x268 +layer at (8,308) size 20x80 LayoutNGBlockFlow {DIV} at (0,100) size 20x80 LayoutNGBlockFlow {DIV} at (0,40) size 20x20 [bgcolor=#008000] LayoutNGBlockFlow {DIV} at (0,60) size 20x20 [bgcolor=#008000] -layer at (8,308) size 20x40 backgroundClip at (0,0) size 28x268 clip at (0,0) size 28x268 +layer at (8,308) size 20x40 LayoutNGBlockFlow {DIV} at (0,0) size 20x40 LayoutNGBlockFlow {DIV} at (0,0) size 20x20 [bgcolor=#008000] LayoutNGBlockFlow {DIV} at (0,20) size 20x20 [bgcolor=#008000]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/layout_ng_experimental/fast/multicol/composited-layer-will-change-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/virtual/layout_ng_experimental/fast/multicol/composited-layer-will-change-expected.txt index fa628f2..b525a62d 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/layout_ng_experimental/fast/multicol/composited-layer-will-change-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/layout_ng_experimental/fast/multicol/composited-layer-will-change-expected.txt
@@ -34,11 +34,11 @@ layer at (8,100) size 20x20 LayoutNGBlockFlow {DIV} at (0,0) size 20x20 LayoutNGBlockFlow {DIV} at (0,0) size 20x20 [bgcolor=#008000] -layer at (8,140) size 20x40 backgroundClip at (0,0) size 28x160 clip at (0,0) size 28x160 +layer at (8,140) size 20x40 LayoutNGBlockFlow {DIV} at (0,40) size 20x40 LayoutNGBlockFlow {DIV} at (0,0) size 20x20 [bgcolor=#008000] LayoutNGBlockFlow {DIV} at (0,20) size 20x20 [bgcolor=#008000] -layer at (28,140) size 20x60 backgroundClip at (0,0) size 28x160 clip at (0,0) size 28x160 +layer at (28,140) size 20x60 LayoutNGBlockFlow {DIV} at (0,100) size 20x60 LayoutNGBlockFlow {DIV} at (0,0) size 20x20 [bgcolor=#008000] LayoutNGBlockFlow {DIV} at (0,20) size 20x20 [bgcolor=#008000] @@ -46,11 +46,11 @@ layer at (8,208) size 20x20 LayoutNGBlockFlow {DIV} at (0,0) size 20x20 LayoutNGBlockFlow {DIV} at (0,0) size 20x20 [bgcolor=#008000] -layer at (8,248) size 20x40 backgroundClip at (0,0) size 28x268 clip at (0,0) size 28x268 +layer at (8,248) size 20x40 LayoutNGBlockFlow {DIV} at (0,40) size 20x40 LayoutNGBlockFlow {DIV} at (0,0) size 20x20 [bgcolor=#008000] LayoutNGBlockFlow {DIV} at (0,20) size 20x20 [bgcolor=#008000] -layer at (28,248) size 20x60 backgroundClip at (0,0) size 28x268 clip at (0,0) size 28x268 +layer at (28,248) size 20x60 LayoutNGBlockFlow {DIV} at (0,100) size 20x60 LayoutNGBlockFlow {DIV} at (0,0) size 20x20 [bgcolor=#008000] LayoutNGBlockFlow {DIV} at (0,20) size 20x20 [bgcolor=#008000] @@ -58,11 +58,11 @@ layer at (8,316) size 20x20 LayoutNGBlockFlow (relative positioned) {DIV} at (0,0) size 20x20 LayoutNGBlockFlow {DIV} at (0,0) size 20x20 [bgcolor=#008000] -layer at (8,356) size 20x40 backgroundClip at (0,0) size 28x376 clip at (0,0) size 28x376 +layer at (8,356) size 20x40 LayoutNGBlockFlow (relative positioned) {DIV} at (0,40) size 20x40 LayoutNGBlockFlow {DIV} at (0,0) size 20x20 [bgcolor=#008000] LayoutNGBlockFlow {DIV} at (0,20) size 20x20 [bgcolor=#008000] -layer at (28,356) size 20x60 backgroundClip at (0,0) size 28x376 clip at (0,0) size 28x376 +layer at (28,356) size 20x60 LayoutNGBlockFlow (relative positioned) {DIV} at (0,100) size 20x60 LayoutNGBlockFlow {DIV} at (0,0) size 20x20 [bgcolor=#008000] LayoutNGBlockFlow {DIV} at (0,20) size 20x20 [bgcolor=#008000]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/video-surface-layer/media/video-zoom-controls-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/video-surface-layer/media/video-zoom-controls-expected.png index 43632c7..f385512 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/video-surface-layer/media/video-zoom-controls-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/video-surface-layer/media/video-zoom-controls-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/overflow/overflow-of-video-outline-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/overflow/overflow-of-video-outline-expected.png index 001f137..06b05c2 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/overflow/overflow-of-video-outline-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/overflow/overflow-of-video-outline-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/http/tests/media/video-buffered-range-contains-currentTime-expected.txt b/third_party/WebKit/LayoutTests/platform/win/http/tests/media/video-buffered-range-contains-currentTime-expected.txt index 530e7ea..b5ec188 100644 --- a/third_party/WebKit/LayoutTests/platform/win/http/tests/media/video-buffered-range-contains-currentTime-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/http/tests/media/video-buffered-range-contains-currentTime-expected.txt
@@ -13,8 +13,6 @@ layer at (8,104) size 300x54 scrollHeight 55 LayoutFlexibleBox {DIV} at (0,0) size 300x54 LayoutButton {INPUT} at (10,11) size 32x32 - LayoutSlider {INPUT} at (115,-1) size 111x56 [color=#C4C4C4] - LayoutFlexibleBox {DIV} at (16,26) size 79x4 LayoutButton {INPUT} at (226,11) size 32x32 LayoutButton {INPUT} at (258,11) size 32x32 layer at (55,123) size 28x16 transparent @@ -25,6 +23,9 @@ LayoutBlockFlow {DIV} at (79,19) size 36x16 LayoutText {#text} at (0,0) size 36x16 text run at (0,0) width 36: "/ 0:07" +layer at (123,103) size 111x56 backgroundClip at (8,104) size 300x54 clip at (8,104) size 300x54 + LayoutSlider {INPUT} at (115,-1) size 111x56 [color=#C4C4C4] + LayoutFlexibleBox {DIV} at (16,26) size 79x4 layer at (139,129) size 79x4 LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 79x4 [bgcolor=#00000033] layer at (206,125) size 12x12
diff --git a/third_party/WebKit/LayoutTests/platform/win/media/controls-after-reload-expected.png b/third_party/WebKit/LayoutTests/platform/win/media/controls-after-reload-expected.png index 025bcb47..b1fe6ff 100644 --- a/third_party/WebKit/LayoutTests/platform/win/media/controls-after-reload-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/media/controls-after-reload-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/media/controls-after-reload-expected.txt b/third_party/WebKit/LayoutTests/platform/win/media/controls-after-reload-expected.txt index 48f1628c..255d7e18 100644 --- a/third_party/WebKit/LayoutTests/platform/win/media/controls-after-reload-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/media/controls-after-reload-expected.txt
@@ -16,30 +16,31 @@ LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,44) size 320x240 LayoutFlexibleBox {DIV} at (0,0) size 320x240 - LayoutSlider {INPUT} at (0,214) size 320x26 [color=#C4C4C4] - LayoutFlexibleBox {DIV} at (16,5) size 288x4 -layer at (8,44) size 320x222 clip at (10,46) size 316x218 - LayoutButton (relative positioned) {INPUT} at (0,0) size 320x222 [border: (2px outset #C0C0C0)] - LayoutFlexibleBox (anonymous) at (8,83) size 304x56 +layer at (8,44) size 320x221 clip at (10,46) size 316x217 + LayoutButton (relative positioned) {INPUT} at (0,0) size 320x221 [border: (2px outset #C0C0C0)] + LayoutFlexibleBox (anonymous) at (8,82.50) size 304x56 LayoutBlockFlow {DIV} at (124,0) size 56x56 [bgcolor=#FFFFFFE6] -layer at (8,226) size 320x32 - LayoutFlexibleBox (relative positioned) {DIV} at (0,182) size 320x32 - LayoutBlockFlow {DIV} at (16,2) size 28x30 [color=#FFFFFF] +layer at (8,204) size 320x48 + LayoutFlexibleBox (relative positioned) {DIV} at (0,160) size 320x48 + LayoutBlockFlow {DIV} at (16,18) size 28x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 28x16 text run at (0,7) width 28: "0:00" - LayoutBlockFlow {DIV} at (48,2) size 36x30 [color=#FFFFFF] + LayoutBlockFlow {DIV} at (48,18) size 36x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 36x16 text run at (0,7) width 36: "/ 0:06" - LayoutBlockFlow {DIV} at (84,32) size 162x0 - LayoutButton {INPUT} at (246,0) size 32x32 - LayoutButton {INPUT} at (278,0) size 32x32 -layer at (24,263) size 288x4 + LayoutBlockFlow {DIV} at (84,48) size 130x0 + LayoutButton {INPUT} at (214,0) size 48x48 + LayoutButton {INPUT} at (262,0) size 48x48 +layer at (8,252) size 320x32 + LayoutSlider {INPUT} at (0,208) size 320x32 [color=#C4C4C4] + LayoutFlexibleBox {DIV} at (16,16) size 288x4 +layer at (24,268) size 288x4 LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF4D] -layer at (24,259) size 12x12 +layer at (24,264) size 12x12 LayoutBlockFlow (relative positioned) {DIV} at (0,-4) size 12x12 [bgcolor=#FFFFFF] -layer at (24,263) size 288x4 +layer at (24,268) size 288x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 -layer at (24,263) size 0x4 +layer at (24,268) size 0x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF] -layer at (24,263) size 288x4 +layer at (24,268) size 288x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF8A]
diff --git a/third_party/WebKit/LayoutTests/platform/win/media/controls-layout-direction-expected.png b/third_party/WebKit/LayoutTests/platform/win/media/controls-layout-direction-expected.png index 50d19ae..e986ac72 100644 --- a/third_party/WebKit/LayoutTests/platform/win/media/controls-layout-direction-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/media/controls-layout-direction-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/media/controls-strict-expected.png b/third_party/WebKit/LayoutTests/platform/win/media/controls-strict-expected.png index 96028f1..68bd018 100644 --- a/third_party/WebKit/LayoutTests/platform/win/media/controls-strict-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/media/controls-strict-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/media/controls-strict-expected.txt b/third_party/WebKit/LayoutTests/platform/win/media/controls-strict-expected.txt index 21e4e77e0..002d79f 100644 --- a/third_party/WebKit/LayoutTests/platform/win/media/controls-strict-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/media/controls-strict-expected.txt
@@ -16,30 +16,31 @@ LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,52) size 320x240 LayoutFlexibleBox {DIV} at (0,0) size 320x240 - LayoutSlider {INPUT} at (0,214) size 320x26 [color=#C4C4C4] - LayoutFlexibleBox {DIV} at (16,5) size 288x4 -layer at (8,52) size 320x222 clip at (10,54) size 316x218 - LayoutButton (relative positioned) {INPUT} at (0,0) size 320x222 [border: (2px outset #C0C0C0)] - LayoutFlexibleBox (anonymous) at (8,83) size 304x56 +layer at (8,52) size 320x221 clip at (10,54) size 316x217 + LayoutButton (relative positioned) {INPUT} at (0,0) size 320x221 [border: (2px outset #C0C0C0)] + LayoutFlexibleBox (anonymous) at (8,82.50) size 304x56 LayoutBlockFlow {DIV} at (124,0) size 56x56 [bgcolor=#FFFFFFE6] -layer at (8,234) size 320x32 - LayoutFlexibleBox (relative positioned) {DIV} at (0,182) size 320x32 - LayoutBlockFlow {DIV} at (16,2) size 28x30 [color=#FFFFFF] +layer at (8,212) size 320x48 + LayoutFlexibleBox (relative positioned) {DIV} at (0,160) size 320x48 + LayoutBlockFlow {DIV} at (16,18) size 28x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 28x16 text run at (0,7) width 28: "0:00" - LayoutBlockFlow {DIV} at (48,2) size 36x30 [color=#FFFFFF] + LayoutBlockFlow {DIV} at (48,18) size 36x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 36x16 text run at (0,7) width 36: "/ 0:06" - LayoutBlockFlow {DIV} at (84,32) size 162x0 - LayoutButton {INPUT} at (246,0) size 32x32 - LayoutButton {INPUT} at (278,0) size 32x32 -layer at (24,271) size 288x4 + LayoutBlockFlow {DIV} at (84,48) size 130x0 + LayoutButton {INPUT} at (214,0) size 48x48 + LayoutButton {INPUT} at (262,0) size 48x48 +layer at (8,260) size 320x32 + LayoutSlider {INPUT} at (0,208) size 320x32 [color=#C4C4C4] + LayoutFlexibleBox {DIV} at (16,16) size 288x4 +layer at (24,276) size 288x4 LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF4D] -layer at (24,267) size 12x12 +layer at (24,272) size 12x12 LayoutBlockFlow (relative positioned) {DIV} at (0,-4) size 12x12 [bgcolor=#FFFFFF] -layer at (24,271) size 288x4 +layer at (24,276) size 288x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 -layer at (24,271) size 0x4 +layer at (24,276) size 0x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF] -layer at (24,271) size 288x4 +layer at (24,276) size 288x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF8A]
diff --git a/third_party/WebKit/LayoutTests/platform/win/media/controls-styling-expected.png b/third_party/WebKit/LayoutTests/platform/win/media/controls-styling-expected.png index 80f2184..eea7378 100644 --- a/third_party/WebKit/LayoutTests/platform/win/media/controls-styling-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/media/controls-styling-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/media/controls-styling-expected.txt b/third_party/WebKit/LayoutTests/platform/win/media/controls-styling-expected.txt index 6e3926b4..9188535 100644 --- a/third_party/WebKit/LayoutTests/platform/win/media/controls-styling-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/media/controls-styling-expected.txt
@@ -20,32 +20,33 @@ LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (18,44) size 320x240 LayoutFlexibleBox {DIV} at (0,0) size 320x240 - LayoutSlider {INPUT} at (0,214) size 320x26 [color=#C4C4C4] - LayoutFlexibleBox {DIV} at (16,5) size 288x4 -layer at (18,44) size 320x222 clip at (20,46) size 316x218 - LayoutButton (relative positioned) {INPUT} at (0,0) size 320x222 [border: (2px outset #C0C0C0)] - LayoutFlexibleBox (anonymous) at (8,83) size 304x56 +layer at (18,44) size 320x221 clip at (20,46) size 316x217 + LayoutButton (relative positioned) {INPUT} at (0,0) size 320x221 [border: (2px outset #C0C0C0)] + LayoutFlexibleBox (anonymous) at (8,82.50) size 304x56 LayoutBlockFlow {DIV} at (124,0) size 56x56 [bgcolor=#FFFFFFE6] -layer at (18,226) size 320x32 - LayoutFlexibleBox (relative positioned) {DIV} at (0,182) size 320x32 - LayoutBlockFlow {DIV} at (16,2) size 28x30 [color=#FFFFFF] +layer at (18,204) size 320x48 + LayoutFlexibleBox (relative positioned) {DIV} at (0,160) size 320x48 + LayoutBlockFlow {DIV} at (16,18) size 28x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 28x16 text run at (0,7) width 28: "0:00" - LayoutBlockFlow {DIV} at (48,2) size 66x30 [color=#FFFFFF] + LayoutBlockFlow {DIV} at (48,18) size 66x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 66x16 text run at (0,7) width 66: "/ 0:06" - LayoutBlockFlow {DIV} at (114,32) size 132x0 - LayoutButton {INPUT} at (246,0) size 32x32 - LayoutButton {INPUT} at (278,0) size 32x32 -layer at (34,263) size 288x4 + LayoutBlockFlow {DIV} at (114,48) size 100x0 + LayoutButton {INPUT} at (214,0) size 48x48 + LayoutButton {INPUT} at (262,0) size 48x48 +layer at (18,252) size 320x32 + LayoutSlider {INPUT} at (0,208) size 320x32 [color=#C4C4C4] + LayoutFlexibleBox {DIV} at (16,16) size 288x4 +layer at (34,268) size 288x4 LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF4D] -layer at (34,259) size 12x12 +layer at (34,264) size 12x12 LayoutBlockFlow (relative positioned) {DIV} at (0,-4) size 12x12 [bgcolor=#FFFFFF] -layer at (34,263) size 288x4 +layer at (34,268) size 288x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 -layer at (34,263) size 0x4 +layer at (34,268) size 0x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF] -layer at (34,263) size 288x4 +layer at (34,268) size 288x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF8A] layer at (8,284) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 @@ -53,30 +54,31 @@ LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,284) size 320x240 LayoutFlexibleBox {DIV} at (0,0) size 320x240 - LayoutSlider {INPUT} at (0,214) size 320x26 [color=#C4C4C4] - LayoutFlexibleBox {DIV} at (16,5) size 288x4 -layer at (8,284) size 320x222 clip at (10,286) size 316x218 - LayoutButton (relative positioned) {INPUT} at (0,0) size 320x222 [border: (2px outset #C0C0C0)] - LayoutFlexibleBox (anonymous) at (8,83) size 304x56 +layer at (8,284) size 320x221 clip at (10,286) size 316x217 + LayoutButton (relative positioned) {INPUT} at (0,0) size 320x221 [border: (2px outset #C0C0C0)] + LayoutFlexibleBox (anonymous) at (8,82.50) size 304x56 LayoutBlockFlow {DIV} at (124,0) size 56x56 [bgcolor=#FFFFFFE6] -layer at (8,466) size 320x32 - LayoutFlexibleBox (relative positioned) {DIV} at (0,182) size 320x32 - LayoutBlockFlow {DIV} at (16,2) size 28x30 [color=#FFFFFF] +layer at (8,444) size 320x48 + LayoutFlexibleBox (relative positioned) {DIV} at (0,160) size 320x48 + LayoutBlockFlow {DIV} at (16,18) size 28x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 28x16 text run at (0,7) width 28: "0:00" - LayoutBlockFlow {DIV} at (48,2) size 36x30 [color=#FFFFFF] + LayoutBlockFlow {DIV} at (48,18) size 36x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 36x16 text run at (0,7) width 36: "/ 0:06" - LayoutBlockFlow {DIV} at (84,32) size 162x0 - LayoutButton {INPUT} at (246,0) size 32x32 - LayoutButton {INPUT} at (278,0) size 32x32 -layer at (24,503) size 288x4 + LayoutBlockFlow {DIV} at (84,48) size 130x0 + LayoutButton {INPUT} at (214,0) size 48x48 + LayoutButton {INPUT} at (262,0) size 48x48 +layer at (8,492) size 320x32 + LayoutSlider {INPUT} at (0,208) size 320x32 [color=#C4C4C4] + LayoutFlexibleBox {DIV} at (16,16) size 288x4 +layer at (24,508) size 288x4 LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF4D] -layer at (24,499) size 12x12 +layer at (24,504) size 12x12 LayoutBlockFlow (relative positioned) {DIV} at (0,-4) size 12x12 [bgcolor=#FFFFFF] -layer at (24,503) size 288x4 +layer at (24,508) size 288x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 -layer at (24,503) size 0x4 +layer at (24,508) size 0x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF] -layer at (24,503) size 288x4 +layer at (24,508) size 288x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF8A]
diff --git a/third_party/WebKit/LayoutTests/platform/win/media/controls-styling-strict-expected.png b/third_party/WebKit/LayoutTests/platform/win/media/controls-styling-strict-expected.png index f9afb933..21b2bc4 100644 --- a/third_party/WebKit/LayoutTests/platform/win/media/controls-styling-strict-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/media/controls-styling-strict-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/media/controls-styling-strict-expected.txt b/third_party/WebKit/LayoutTests/platform/win/media/controls-styling-strict-expected.txt index ec4c98b3..24b27a9b 100644 --- a/third_party/WebKit/LayoutTests/platform/win/media/controls-styling-strict-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/media/controls-styling-strict-expected.txt
@@ -20,32 +20,33 @@ LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,52) size 320x240 LayoutFlexibleBox {DIV} at (0,0) size 320x240 - LayoutSlider {INPUT} at (0,214) size 320x26 [color=#C4C4C4] - LayoutFlexibleBox {DIV} at (16,5) size 288x4 -layer at (8,52) size 320x222 clip at (10,54) size 316x218 - LayoutButton (relative positioned) {INPUT} at (0,0) size 320x222 [border: (2px outset #C0C0C0)] - LayoutFlexibleBox (anonymous) at (8,83) size 304x56 +layer at (8,52) size 320x221 clip at (10,54) size 316x217 + LayoutButton (relative positioned) {INPUT} at (0,0) size 320x221 [border: (2px outset #C0C0C0)] + LayoutFlexibleBox (anonymous) at (8,82.50) size 304x56 LayoutBlockFlow {DIV} at (124,0) size 56x56 [bgcolor=#FFFFFFE6] -layer at (8,234) size 320x32 - LayoutFlexibleBox (relative positioned) {DIV} at (0,182) size 320x32 - LayoutBlockFlow {DIV} at (16,2) size 28x30 [color=#FFFFFF] +layer at (8,212) size 320x48 + LayoutFlexibleBox (relative positioned) {DIV} at (0,160) size 320x48 + LayoutBlockFlow {DIV} at (16,18) size 28x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 28x16 text run at (0,7) width 28: "0:00" - LayoutBlockFlow {DIV} at (48,2) size 36x30 [color=#FFFFFF] + LayoutBlockFlow {DIV} at (48,18) size 36x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 36x16 text run at (0,7) width 36: "/ 0:06" - LayoutBlockFlow {DIV} at (84,32) size 162x0 - LayoutButton {INPUT} at (246,0) size 32x32 - LayoutButton {INPUT} at (278,0) size 32x32 -layer at (24,271) size 288x4 + LayoutBlockFlow {DIV} at (84,48) size 130x0 + LayoutButton {INPUT} at (214,0) size 48x48 + LayoutButton {INPUT} at (262,0) size 48x48 +layer at (8,260) size 320x32 + LayoutSlider {INPUT} at (0,208) size 320x32 [color=#C4C4C4] + LayoutFlexibleBox {DIV} at (16,16) size 288x4 +layer at (24,276) size 288x4 LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF4D] -layer at (24,267) size 12x12 +layer at (24,272) size 12x12 LayoutBlockFlow (relative positioned) {DIV} at (0,-4) size 12x12 [bgcolor=#FFFFFF] -layer at (24,271) size 288x4 +layer at (24,276) size 288x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 -layer at (24,271) size 0x4 +layer at (24,276) size 0x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF] -layer at (24,271) size 288x4 +layer at (24,276) size 288x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF8A] layer at (332,52) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 @@ -53,30 +54,31 @@ LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (332,52) size 320x240 LayoutFlexibleBox {DIV} at (0,0) size 320x240 - LayoutSlider {INPUT} at (0,214) size 320x26 [color=#C4C4C4] - LayoutFlexibleBox {DIV} at (16,5) size 288x4 -layer at (332,52) size 320x222 clip at (334,54) size 316x218 - LayoutButton (relative positioned) {INPUT} at (0,0) size 320x222 [border: (2px outset #C0C0C0)] - LayoutFlexibleBox (anonymous) at (8,83) size 304x56 +layer at (332,52) size 320x221 clip at (334,54) size 316x217 + LayoutButton (relative positioned) {INPUT} at (0,0) size 320x221 [border: (2px outset #C0C0C0)] + LayoutFlexibleBox (anonymous) at (8,82.50) size 304x56 LayoutBlockFlow {DIV} at (124,0) size 56x56 [bgcolor=#FFFFFFE6] -layer at (332,234) size 320x32 - LayoutFlexibleBox (relative positioned) {DIV} at (0,182) size 320x32 - LayoutBlockFlow {DIV} at (16,2) size 28x30 [color=#FFFFFF] +layer at (332,212) size 320x48 + LayoutFlexibleBox (relative positioned) {DIV} at (0,160) size 320x48 + LayoutBlockFlow {DIV} at (16,18) size 28x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 28x16 text run at (0,7) width 28: "0:00" - LayoutBlockFlow {DIV} at (48,2) size 36x30 [color=#FFFFFF] + LayoutBlockFlow {DIV} at (48,18) size 36x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 36x16 text run at (0,7) width 36: "/ 0:06" - LayoutBlockFlow {DIV} at (84,32) size 162x0 - LayoutButton {INPUT} at (246,0) size 32x32 - LayoutButton {INPUT} at (278,0) size 32x32 -layer at (348,271) size 288x4 + LayoutBlockFlow {DIV} at (84,48) size 130x0 + LayoutButton {INPUT} at (214,0) size 48x48 + LayoutButton {INPUT} at (262,0) size 48x48 +layer at (332,260) size 320x32 + LayoutSlider {INPUT} at (0,208) size 320x32 [color=#C4C4C4] + LayoutFlexibleBox {DIV} at (16,16) size 288x4 +layer at (348,276) size 288x4 LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF4D] -layer at (348,267) size 12x12 +layer at (348,272) size 12x12 LayoutBlockFlow (relative positioned) {DIV} at (0,-4) size 12x12 [bgcolor=#FFFFFF] -layer at (348,271) size 288x4 +layer at (348,276) size 288x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 -layer at (348,271) size 0x4 +layer at (348,276) size 0x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF] -layer at (348,271) size 288x4 +layer at (348,276) size 288x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF8A]
diff --git a/third_party/WebKit/LayoutTests/platform/win/media/controls-without-preload-expected.png b/third_party/WebKit/LayoutTests/platform/win/media/controls-without-preload-expected.png index de8ef20..d2af4375 100644 --- a/third_party/WebKit/LayoutTests/platform/win/media/controls-without-preload-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/media/controls-without-preload-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/media/controls-without-preload-expected.txt b/third_party/WebKit/LayoutTests/platform/win/media/controls-without-preload-expected.txt index 33684cf..73465ea 100644 --- a/third_party/WebKit/LayoutTests/platform/win/media/controls-without-preload-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/media/controls-without-preload-expected.txt
@@ -16,30 +16,31 @@ LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,44) size 320x240 LayoutFlexibleBox {DIV} at (0,0) size 320x240 - LayoutSlider {INPUT} at (0,214) size 320x26 [color=#C4C4C4] - LayoutFlexibleBox {DIV} at (16,5) size 288x4 -layer at (8,44) size 320x222 clip at (10,46) size 316x218 - LayoutButton (relative positioned) {INPUT} at (0,0) size 320x222 [border: (2px outset #C0C0C0)] - LayoutFlexibleBox (anonymous) at (8,83) size 304x56 +layer at (8,44) size 320x221 clip at (10,46) size 316x217 + LayoutButton (relative positioned) {INPUT} at (0,0) size 320x221 [border: (2px outset #C0C0C0)] + LayoutFlexibleBox (anonymous) at (8,82.50) size 304x56 LayoutBlockFlow {DIV} at (124,0) size 56x56 [bgcolor=#FFFFFFE6] -layer at (8,226) size 320x32 - LayoutFlexibleBox (relative positioned) {DIV} at (0,182) size 320x32 - LayoutBlockFlow {DIV} at (16,2) size 28x30 [color=#FFFFFF] +layer at (8,204) size 320x48 + LayoutFlexibleBox (relative positioned) {DIV} at (0,160) size 320x48 + LayoutBlockFlow {DIV} at (16,18) size 28x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 28x16 text run at (0,7) width 28: "0:00" - LayoutBlockFlow {DIV} at (48,2) size 36x30 [color=#FFFFFF] + LayoutBlockFlow {DIV} at (48,18) size 36x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 36x16 text run at (0,7) width 36: "/ 0:06" - LayoutBlockFlow {DIV} at (84,32) size 162x0 - LayoutButton {INPUT} at (246,0) size 32x32 - LayoutButton {INPUT} at (278,0) size 32x32 -layer at (24,263) size 288x4 + LayoutBlockFlow {DIV} at (84,48) size 130x0 + LayoutButton {INPUT} at (214,0) size 48x48 + LayoutButton {INPUT} at (262,0) size 48x48 +layer at (8,252) size 320x32 + LayoutSlider {INPUT} at (0,208) size 320x32 [color=#C4C4C4] + LayoutFlexibleBox {DIV} at (16,16) size 288x4 +layer at (24,268) size 288x4 LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF4D] -layer at (24,259) size 12x12 +layer at (24,264) size 12x12 LayoutBlockFlow (relative positioned) {DIV} at (0,-4) size 12x12 [bgcolor=#FFFFFF] -layer at (24,263) size 288x4 +layer at (24,268) size 288x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 -layer at (24,263) size 0x4 +layer at (24,268) size 0x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF] -layer at (24,263) size 288x4 +layer at (24,268) size 288x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF8A]
diff --git a/third_party/WebKit/LayoutTests/platform/win/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.png b/third_party/WebKit/LayoutTests/platform/win/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.png index a239db5c2..f596e70 100644 --- a/third_party/WebKit/LayoutTests/platform/win/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.txt b/third_party/WebKit/LayoutTests/platform/win/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.txt index 055b198..c8f3804e 100644 --- a/third_party/WebKit/LayoutTests/platform/win/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.txt
@@ -12,31 +12,32 @@ LayoutFlexibleBox {DIV} at (0,0) size 400x327.27 layer at (8,8) size 400x327 LayoutFlexibleBox {DIV} at (0,0) size 400x327.27 - LayoutSlider {INPUT} at (0,301.27) size 400x26 [color=#C4C4C4] - LayoutFlexibleBox {DIV} at (16,5) size 368x4 -layer at (8,8) size 400x309 clip at (10,10) size 396x305 - LayoutButton (relative positioned) {INPUT} at (0,0) size 400x309.27 [border: (2px outset #C0C0C0)] - LayoutFlexibleBox (anonymous) at (8,126.63) size 384x56 +layer at (8,8) size 400x308 clip at (10,10) size 396x304 + LayoutButton (relative positioned) {INPUT} at (0,0) size 400x308.27 [border: (2px outset #C0C0C0)] + LayoutFlexibleBox (anonymous) at (8,126.13) size 384x56 LayoutBlockFlow {DIV} at (164,0) size 56x56 [bgcolor=#FFFFFFE6] -layer at (8,277) size 400x32 - LayoutFlexibleBox (relative positioned) {DIV} at (0,269.27) size 400x32 - LayoutBlockFlow {DIV} at (16,2) size 28x30 [color=#FFFFFF] +layer at (8,255) size 400x48 + LayoutFlexibleBox (relative positioned) {DIV} at (0,247.27) size 400x48 + LayoutBlockFlow {DIV} at (16,18) size 28x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 28x16 text run at (0,7) width 28: "0:00" - LayoutBlockFlow {DIV} at (48,2) size 36x30 [color=#FFFFFF] + LayoutBlockFlow {DIV} at (48,18) size 36x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 36x16 text run at (0,7) width 36: "/ 0:09" - LayoutBlockFlow {DIV} at (84,32) size 242x0 - LayoutButton {INPUT} at (358,0) size 32x32 -layer at (334,277) size 32x32 transparent - LayoutButton {INPUT} at (326,0) size 32x32 [color=#808080] -layer at (24,314) size 368x4 + LayoutBlockFlow {DIV} at (84,48) size 210x0 + LayoutButton {INPUT} at (342,0) size 48x48 +layer at (302,255) size 48x48 transparent + LayoutButton {INPUT} at (294,0) size 48x48 [color=#808080] +layer at (8,303) size 400x32 + LayoutSlider {INPUT} at (0,295.27) size 400x32 [color=#C4C4C4] + LayoutFlexibleBox {DIV} at (16,16) size 368x4 +layer at (24,319) size 368x4 LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 368x4 [bgcolor=#FFFFFF4D] -layer at (24,310) size 12x12 +layer at (24,315) size 12x12 LayoutBlockFlow (relative positioned) {DIV} at (0,-4) size 12x12 [bgcolor=#FFFFFF] -layer at (24,314) size 368x4 +layer at (24,319) size 368x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 368x4 -layer at (24,314) size 0x4 +layer at (24,319) size 0x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF] -layer at (24,314) size 368x4 +layer at (24,319) size 368x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 368x4 [bgcolor=#FFFFFF8A]
diff --git a/third_party/WebKit/LayoutTests/platform/win/media/controls/paint-controls-webkit-appearance-none-expected.png b/third_party/WebKit/LayoutTests/platform/win/media/controls/paint-controls-webkit-appearance-none-expected.png index a239db5c2..f596e70 100644 --- a/third_party/WebKit/LayoutTests/platform/win/media/controls/paint-controls-webkit-appearance-none-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/media/controls/paint-controls-webkit-appearance-none-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/media/controls/paint-controls-webkit-appearance-none-expected.txt b/third_party/WebKit/LayoutTests/platform/win/media/controls/paint-controls-webkit-appearance-none-expected.txt index 055b198..c8f3804e 100644 --- a/third_party/WebKit/LayoutTests/platform/win/media/controls/paint-controls-webkit-appearance-none-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/media/controls/paint-controls-webkit-appearance-none-expected.txt
@@ -12,31 +12,32 @@ LayoutFlexibleBox {DIV} at (0,0) size 400x327.27 layer at (8,8) size 400x327 LayoutFlexibleBox {DIV} at (0,0) size 400x327.27 - LayoutSlider {INPUT} at (0,301.27) size 400x26 [color=#C4C4C4] - LayoutFlexibleBox {DIV} at (16,5) size 368x4 -layer at (8,8) size 400x309 clip at (10,10) size 396x305 - LayoutButton (relative positioned) {INPUT} at (0,0) size 400x309.27 [border: (2px outset #C0C0C0)] - LayoutFlexibleBox (anonymous) at (8,126.63) size 384x56 +layer at (8,8) size 400x308 clip at (10,10) size 396x304 + LayoutButton (relative positioned) {INPUT} at (0,0) size 400x308.27 [border: (2px outset #C0C0C0)] + LayoutFlexibleBox (anonymous) at (8,126.13) size 384x56 LayoutBlockFlow {DIV} at (164,0) size 56x56 [bgcolor=#FFFFFFE6] -layer at (8,277) size 400x32 - LayoutFlexibleBox (relative positioned) {DIV} at (0,269.27) size 400x32 - LayoutBlockFlow {DIV} at (16,2) size 28x30 [color=#FFFFFF] +layer at (8,255) size 400x48 + LayoutFlexibleBox (relative positioned) {DIV} at (0,247.27) size 400x48 + LayoutBlockFlow {DIV} at (16,18) size 28x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 28x16 text run at (0,7) width 28: "0:00" - LayoutBlockFlow {DIV} at (48,2) size 36x30 [color=#FFFFFF] + LayoutBlockFlow {DIV} at (48,18) size 36x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 36x16 text run at (0,7) width 36: "/ 0:09" - LayoutBlockFlow {DIV} at (84,32) size 242x0 - LayoutButton {INPUT} at (358,0) size 32x32 -layer at (334,277) size 32x32 transparent - LayoutButton {INPUT} at (326,0) size 32x32 [color=#808080] -layer at (24,314) size 368x4 + LayoutBlockFlow {DIV} at (84,48) size 210x0 + LayoutButton {INPUT} at (342,0) size 48x48 +layer at (302,255) size 48x48 transparent + LayoutButton {INPUT} at (294,0) size 48x48 [color=#808080] +layer at (8,303) size 400x32 + LayoutSlider {INPUT} at (0,295.27) size 400x32 [color=#C4C4C4] + LayoutFlexibleBox {DIV} at (16,16) size 368x4 +layer at (24,319) size 368x4 LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 368x4 [bgcolor=#FFFFFF4D] -layer at (24,310) size 12x12 +layer at (24,315) size 12x12 LayoutBlockFlow (relative positioned) {DIV} at (0,-4) size 12x12 [bgcolor=#FFFFFF] -layer at (24,314) size 368x4 +layer at (24,319) size 368x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 368x4 -layer at (24,314) size 0x4 +layer at (24,319) size 0x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF] -layer at (24,314) size 368x4 +layer at (24,319) size 368x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 368x4 [bgcolor=#FFFFFF8A]
diff --git a/third_party/WebKit/LayoutTests/platform/win/media/media-controls-clone-expected.png b/third_party/WebKit/LayoutTests/platform/win/media/media-controls-clone-expected.png index 77c727f..b1aa7a2 100644 --- a/third_party/WebKit/LayoutTests/platform/win/media/media-controls-clone-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/media/media-controls-clone-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/media/media-controls-clone-expected.txt b/third_party/WebKit/LayoutTests/platform/win/media/media-controls-clone-expected.txt index e47d2e81..8b55a63e 100644 --- a/third_party/WebKit/LayoutTests/platform/win/media/media-controls-clone-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/media/media-controls-clone-expected.txt
@@ -19,20 +19,21 @@ LayoutFlexibleBox {DIV} at (0,0) size 300x150 layer at (8,8) size 300x150 LayoutFlexibleBox {DIV} at (0,0) size 300x150 - LayoutSlider {INPUT} at (0,124) size 300x26 [color=#C4C4C4] - LayoutFlexibleBox {DIV} at (16,5) size 268x4 -layer at (8,100) size 300x32 - LayoutFlexibleBox (relative positioned) {DIV} at (0,92) size 300x32 - LayoutBlockFlow {DIV} at (16,32) size 242x0 -layer at (266,100) size 32x32 transparent - LayoutButton {INPUT} at (258,0) size 32x32 [color=#808080] -layer at (24,137) size 268x4 +layer at (8,78) size 300x48 + LayoutFlexibleBox (relative positioned) {DIV} at (0,70) size 300x48 + LayoutBlockFlow {DIV} at (16,48) size 226x0 +layer at (250,78) size 48x48 transparent + LayoutButton {INPUT} at (242,0) size 48x48 [color=#808080] +layer at (8,126) size 300x32 + LayoutSlider {INPUT} at (0,118) size 300x32 [color=#C4C4C4] + LayoutFlexibleBox {DIV} at (16,16) size 268x4 +layer at (24,142) size 268x4 LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 268x4 [bgcolor=#FFFFFF4D] -layer at (24,137) size 268x4 +layer at (24,142) size 268x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 268x4 -layer at (24,137) size 0x4 +layer at (24,142) size 0x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF] -layer at (24,137) size 0x4 +layer at (24,142) size 0x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF8A] layer at (308,104) size 300x54 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 300x54 @@ -57,20 +58,21 @@ LayoutFlexibleBox {DIV} at (0,0) size 300x150 layer at (8,163) size 300x150 LayoutFlexibleBox {DIV} at (0,0) size 300x150 - LayoutSlider {INPUT} at (0,124) size 300x26 [color=#C4C4C4] - LayoutFlexibleBox {DIV} at (16,5) size 268x4 -layer at (8,255) size 300x32 - LayoutFlexibleBox (relative positioned) {DIV} at (0,92) size 300x32 - LayoutBlockFlow {DIV} at (16,32) size 242x0 -layer at (266,255) size 32x32 transparent - LayoutButton {INPUT} at (258,0) size 32x32 [color=#808080] -layer at (24,292) size 268x4 +layer at (8,233) size 300x48 + LayoutFlexibleBox (relative positioned) {DIV} at (0,70) size 300x48 + LayoutBlockFlow {DIV} at (16,48) size 226x0 +layer at (250,233) size 48x48 transparent + LayoutButton {INPUT} at (242,0) size 48x48 [color=#808080] +layer at (8,281) size 300x32 + LayoutSlider {INPUT} at (0,118) size 300x32 [color=#C4C4C4] + LayoutFlexibleBox {DIV} at (16,16) size 268x4 +layer at (24,297) size 268x4 LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 268x4 [bgcolor=#FFFFFF4D] -layer at (24,292) size 268x4 +layer at (24,297) size 268x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 268x4 -layer at (24,292) size 0x4 +layer at (24,297) size 0x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF] -layer at (24,292) size 0x4 +layer at (24,297) size 0x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF8A] layer at (308,259) size 300x54 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 300x54
diff --git a/third_party/WebKit/LayoutTests/platform/win/media/media-controls-grey-scrubber-expected.png b/third_party/WebKit/LayoutTests/platform/win/media/media-controls-grey-scrubber-expected.png index 468027a..5c8fbf0 100644 --- a/third_party/WebKit/LayoutTests/platform/win/media/media-controls-grey-scrubber-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/media/media-controls-grey-scrubber-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/media/media-controls-grey-scrubber-expected.txt b/third_party/WebKit/LayoutTests/platform/win/media/media-controls-grey-scrubber-expected.txt index 10640f0..60f96d31 100644 --- a/third_party/WebKit/LayoutTests/platform/win/media/media-controls-grey-scrubber-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/media/media-controls-grey-scrubber-expected.txt
@@ -12,29 +12,30 @@ LayoutFlexibleBox {DIV} at (0,0) size 300x150 layer at (8,8) size 300x150 LayoutFlexibleBox {DIV} at (0,0) size 300x150 - LayoutSlider {INPUT} at (0,124) size 300x26 [color=#C4C4C4] - LayoutFlexibleBox {DIV} at (16,5) size 268x4 -layer at (8,8) size 300x132 clip at (10,10) size 296x128 - LayoutButton (relative positioned) {INPUT} at (0,0) size 300x132 [border: (2px outset #C0C0C0)] - LayoutFlexibleBox (anonymous) at (8,38) size 284x56 +layer at (8,8) size 300x131 clip at (10,10) size 296x127 + LayoutButton (relative positioned) {INPUT} at (0,0) size 300x131 [border: (2px outset #C0C0C0)] + LayoutFlexibleBox (anonymous) at (8,37.50) size 284x56 LayoutBlockFlow {DIV} at (114,0) size 56x56 [bgcolor=#FFFFFFE6] -layer at (8,100) size 300x32 - LayoutFlexibleBox (relative positioned) {DIV} at (0,92) size 300x32 - LayoutBlockFlow {DIV} at (16,2) size 28x30 [color=#FFFFFF] +layer at (8,78) size 300x48 + LayoutFlexibleBox (relative positioned) {DIV} at (0,70) size 300x48 + LayoutBlockFlow {DIV} at (16,18) size 28x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 28x16 text run at (0,7) width 28: "0:00" - LayoutBlockFlow {DIV} at (44,32) size 182x0 -layer at (234,100) size 32x32 transparent - LayoutButton {INPUT} at (226,0) size 32x32 [color=#808080] -layer at (266,100) size 32x32 transparent - LayoutButton {INPUT} at (258,0) size 32x32 [color=#808080] -layer at (24,137) size 268x4 + LayoutBlockFlow {DIV} at (44,48) size 150x0 +layer at (202,78) size 48x48 transparent + LayoutButton {INPUT} at (194,0) size 48x48 [color=#808080] +layer at (250,78) size 48x48 transparent + LayoutButton {INPUT} at (242,0) size 48x48 [color=#808080] +layer at (8,126) size 300x32 + LayoutSlider {INPUT} at (0,118) size 300x32 [color=#C4C4C4] + LayoutFlexibleBox {DIV} at (16,16) size 268x4 +layer at (24,142) size 268x4 LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 268x4 [bgcolor=#FFFFFF4D] -layer at (24,133) size 12x12 +layer at (24,138) size 12x12 LayoutBlockFlow (relative positioned) {DIV} at (0,-4) size 12x12 [bgcolor=#FFFFFF] -layer at (24,137) size 268x4 +layer at (24,142) size 268x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 268x4 -layer at (24,137) size 0x4 +layer at (24,142) size 0x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF] -layer at (24,137) size 0x4 +layer at (24,142) size 0x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF8A]
diff --git a/third_party/WebKit/LayoutTests/platform/win/media/media-document-audio-repaint-expected.txt b/third_party/WebKit/LayoutTests/platform/win/media/media-document-audio-repaint-expected.txt index 8efe7076..045b764 100644 --- a/third_party/WebKit/LayoutTests/platform/win/media/media-document-audio-repaint-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/media/media-document-audio-repaint-expected.txt
@@ -25,8 +25,6 @@ layer at (40,186) size 300x54 scrollHeight 55 LayoutFlexibleBox {DIV} at (0,0) size 300x54 LayoutButton {INPUT} at (10,11) size 32x32 - LayoutSlider {INPUT} at (115,-1) size 143x56 [color=#C4C4C4] - LayoutFlexibleBox {DIV} at (16,26) size 111x4 LayoutButton {INPUT} at (258,11) size 32x32 layer at (87,205) size 28x16 transparent LayoutBlockFlow {DIV} at (47,19) size 28x16 @@ -36,6 +34,9 @@ LayoutBlockFlow {DIV} at (79,19) size 36x16 LayoutText {#text} at (0,0) size 36x16 text run at (0,0) width 36: "/ 0:01" + layer at (155,185) size 143x56 backgroundClip at (40,186) size 300x54 clip at (40,186) size 300x54 + LayoutSlider {INPUT} at (115,-1) size 143x56 [color=#C4C4C4] + LayoutFlexibleBox {DIV} at (16,26) size 111x4 layer at (171,211) size 111x4 LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 111x4 [bgcolor=#00000033] layer at (220,207) size 12x12
diff --git a/third_party/WebKit/LayoutTests/platform/win/media/video-controls-rendering-expected.png b/third_party/WebKit/LayoutTests/platform/win/media/video-controls-rendering-expected.png index 080d75f..f5572718 100644 --- a/third_party/WebKit/LayoutTests/platform/win/media/video-controls-rendering-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/media/video-controls-rendering-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/media/video-controls-rendering-expected.txt b/third_party/WebKit/LayoutTests/platform/win/media/video-controls-rendering-expected.txt index b2a6b826..1b277791 100644 --- a/third_party/WebKit/LayoutTests/platform/win/media/video-controls-rendering-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/media/video-controls-rendering-expected.txt
@@ -21,32 +21,33 @@ LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,44) size 320x240 LayoutFlexibleBox {DIV} at (0,0) size 320x240 - LayoutSlider {INPUT} at (0,214) size 320x26 [color=#C4C4C4] - LayoutFlexibleBox {DIV} at (16,5) size 288x4 -layer at (8,44) size 320x222 clip at (10,46) size 316x218 - LayoutButton (relative positioned) {INPUT} at (0,0) size 320x222 [border: (2px outset #C0C0C0)] - LayoutFlexibleBox (anonymous) at (8,83) size 304x56 +layer at (8,44) size 320x221 clip at (10,46) size 316x217 + LayoutButton (relative positioned) {INPUT} at (0,0) size 320x221 [border: (2px outset #C0C0C0)] + LayoutFlexibleBox (anonymous) at (8,82.50) size 304x56 LayoutBlockFlow {DIV} at (124,0) size 56x56 [bgcolor=#FFFFFFE6] -layer at (8,226) size 320x32 - LayoutFlexibleBox (relative positioned) {DIV} at (0,182) size 320x32 - LayoutBlockFlow {DIV} at (16,2) size 28x30 [color=#FFFFFF] +layer at (8,204) size 320x48 + LayoutFlexibleBox (relative positioned) {DIV} at (0,160) size 320x48 + LayoutBlockFlow {DIV} at (16,18) size 28x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 28x16 text run at (0,7) width 28: "0:00" - LayoutBlockFlow {DIV} at (48,2) size 36x30 [color=#FFFFFF] + LayoutBlockFlow {DIV} at (48,18) size 36x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 36x16 text run at (0,7) width 36: "/ 0:06" - LayoutBlockFlow {DIV} at (84,32) size 162x0 - LayoutButton {INPUT} at (246,0) size 32x32 - LayoutButton {INPUT} at (278,0) size 32x32 -layer at (24,263) size 288x4 + LayoutBlockFlow {DIV} at (84,48) size 130x0 + LayoutButton {INPUT} at (214,0) size 48x48 + LayoutButton {INPUT} at (262,0) size 48x48 +layer at (8,252) size 320x32 + LayoutSlider {INPUT} at (0,208) size 320x32 [color=#C4C4C4] + LayoutFlexibleBox {DIV} at (16,16) size 288x4 +layer at (24,268) size 288x4 LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF4D] -layer at (24,259) size 12x12 +layer at (24,264) size 12x12 LayoutBlockFlow (relative positioned) {DIV} at (0,-4) size 12x12 [bgcolor=#FFFFFF] -layer at (24,263) size 288x4 +layer at (24,268) size 288x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 -layer at (24,263) size 0x4 +layer at (24,268) size 0x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF] -layer at (24,263) size 288x4 +layer at (24,268) size 288x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF8A] layer at (8,284) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 @@ -54,32 +55,33 @@ LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,284) size 320x240 LayoutFlexibleBox {DIV} at (0,0) size 320x240 - LayoutSlider {INPUT} at (0,214) size 320x26 [color=#C4C4C4] - LayoutFlexibleBox {DIV} at (16,5) size 288x4 -layer at (8,284) size 320x222 clip at (10,286) size 316x218 - LayoutButton (relative positioned) {INPUT} at (0,0) size 320x222 [border: (2px outset #C0C0C0)] - LayoutFlexibleBox (anonymous) at (8,83) size 304x56 +layer at (8,284) size 320x221 clip at (10,286) size 316x217 + LayoutButton (relative positioned) {INPUT} at (0,0) size 320x221 [border: (2px outset #C0C0C0)] + LayoutFlexibleBox (anonymous) at (8,82.50) size 304x56 LayoutBlockFlow {DIV} at (124,0) size 56x56 [bgcolor=#FFFFFFE6] -layer at (8,466) size 320x32 - LayoutFlexibleBox (relative positioned) {DIV} at (0,182) size 320x32 - LayoutBlockFlow {DIV} at (16,2) size 28x30 [color=#FFFFFF] +layer at (8,444) size 320x48 + LayoutFlexibleBox (relative positioned) {DIV} at (0,160) size 320x48 + LayoutBlockFlow {DIV} at (16,18) size 28x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 28x16 text run at (0,7) width 28: "0:00" - LayoutBlockFlow {DIV} at (48,2) size 36x30 [color=#FFFFFF] + LayoutBlockFlow {DIV} at (48,18) size 36x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 36x16 text run at (0,7) width 36: "/ 0:06" - LayoutBlockFlow {DIV} at (84,32) size 162x0 - LayoutButton {INPUT} at (246,0) size 32x32 - LayoutButton {INPUT} at (278,0) size 32x32 -layer at (24,503) size 288x4 + LayoutBlockFlow {DIV} at (84,48) size 130x0 + LayoutButton {INPUT} at (214,0) size 48x48 + LayoutButton {INPUT} at (262,0) size 48x48 +layer at (8,492) size 320x32 + LayoutSlider {INPUT} at (0,208) size 320x32 [color=#C4C4C4] + LayoutFlexibleBox {DIV} at (16,16) size 288x4 +layer at (24,508) size 288x4 LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF4D] -layer at (24,499) size 12x12 +layer at (24,504) size 12x12 LayoutBlockFlow (relative positioned) {DIV} at (0,-4) size 12x12 [bgcolor=#FFFFFF] -layer at (24,503) size 288x4 +layer at (24,508) size 288x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 -layer at (24,503) size 0x4 +layer at (24,508) size 0x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF] -layer at (24,503) size 288x4 +layer at (24,508) size 288x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF8A] layer at (8,524) size 320x240 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 LayoutVideo (positioned) {VIDEO} at (8,524) size 320x240 @@ -89,30 +91,31 @@ LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,524) size 320x240 backgroundClip at (8,524) size 320x76 clip at (8,524) size 320x76 LayoutFlexibleBox {DIV} at (0,0) size 320x240 - LayoutSlider {INPUT} at (0,214) size 320x26 [color=#C4C4C4] - LayoutFlexibleBox {DIV} at (16,5) size 288x4 -layer at (8,524) size 320x222 backgroundClip at (8,524) size 320x76 clip at (10,526) size 316x74 - LayoutButton (relative positioned) {INPUT} at (0,0) size 320x222 [border: (2px outset #C0C0C0)] - LayoutFlexibleBox (anonymous) at (8,83) size 304x56 +layer at (8,524) size 320x221 backgroundClip at (8,524) size 320x76 clip at (10,526) size 316x74 + LayoutButton (relative positioned) {INPUT} at (0,0) size 320x221 [border: (2px outset #C0C0C0)] + LayoutFlexibleBox (anonymous) at (8,82.50) size 304x56 LayoutBlockFlow {DIV} at (124,0) size 56x56 [bgcolor=#FFFFFFE6] -layer at (8,706) size 320x32 backgroundClip at (0,0) size 0x0 clip at (0,0) size 0x0 - LayoutFlexibleBox (relative positioned) {DIV} at (0,182) size 320x32 - LayoutBlockFlow {DIV} at (16,2) size 28x30 [color=#FFFFFF] +layer at (8,684) size 320x48 backgroundClip at (0,0) size 0x0 clip at (0,0) size 0x0 + LayoutFlexibleBox (relative positioned) {DIV} at (0,160) size 320x48 + LayoutBlockFlow {DIV} at (16,18) size 28x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 28x16 text run at (0,7) width 28: "0:00" - LayoutBlockFlow {DIV} at (48,2) size 36x30 [color=#FFFFFF] + LayoutBlockFlow {DIV} at (48,18) size 36x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 36x16 text run at (0,7) width 36: "/ 0:06" - LayoutBlockFlow {DIV} at (84,32) size 162x0 - LayoutButton {INPUT} at (246,0) size 32x32 - LayoutButton {INPUT} at (278,0) size 32x32 -layer at (24,743) size 288x4 backgroundClip at (8,524) size 320x76 clip at (8,524) size 320x76 + LayoutBlockFlow {DIV} at (84,48) size 130x0 + LayoutButton {INPUT} at (214,0) size 48x48 + LayoutButton {INPUT} at (262,0) size 48x48 +layer at (8,732) size 320x32 backgroundClip at (8,524) size 320x76 clip at (8,524) size 320x76 + LayoutSlider {INPUT} at (0,208) size 320x32 [color=#C4C4C4] + LayoutFlexibleBox {DIV} at (16,16) size 288x4 +layer at (24,748) size 288x4 backgroundClip at (8,524) size 320x76 clip at (8,524) size 320x76 LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF4D] -layer at (24,739) size 12x12 backgroundClip at (8,524) size 320x76 clip at (8,524) size 320x76 +layer at (24,744) size 12x12 backgroundClip at (8,524) size 320x76 clip at (8,524) size 320x76 LayoutBlockFlow (relative positioned) {DIV} at (0,-4) size 12x12 [bgcolor=#FFFFFF] -layer at (24,743) size 288x4 backgroundClip at (0,0) size 0x0 clip at (0,0) size 0x0 +layer at (24,748) size 288x4 backgroundClip at (0,0) size 0x0 clip at (0,0) size 0x0 LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 -layer at (24,743) size 0x4 +layer at (24,748) size 0x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF] -layer at (24,743) size 288x4 backgroundClip at (0,0) size 0x0 clip at (0,0) size 0x0 +layer at (24,748) size 288x4 backgroundClip at (0,0) size 0x0 clip at (0,0) size 0x0 LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF8A]
diff --git a/third_party/WebKit/LayoutTests/platform/win/media/video-display-toggle-expected.png b/third_party/WebKit/LayoutTests/platform/win/media/video-display-toggle-expected.png index 39a4935..bfdec18 100644 --- a/third_party/WebKit/LayoutTests/platform/win/media/video-display-toggle-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/media/video-display-toggle-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/media/video-display-toggle-expected.txt b/third_party/WebKit/LayoutTests/platform/win/media/video-display-toggle-expected.txt index bbed010..5049f74 100644 --- a/third_party/WebKit/LayoutTests/platform/win/media/video-display-toggle-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/media/video-display-toggle-expected.txt
@@ -15,30 +15,31 @@ LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,28) size 320x240 LayoutFlexibleBox {DIV} at (0,0) size 320x240 - LayoutSlider {INPUT} at (0,214) size 320x26 [color=#C4C4C4] - LayoutFlexibleBox {DIV} at (16,5) size 288x4 -layer at (8,28) size 320x222 clip at (10,30) size 316x218 - LayoutButton (relative positioned) {INPUT} at (0,0) size 320x222 [border: (2px outset #C0C0C0)] - LayoutFlexibleBox (anonymous) at (8,83) size 304x56 +layer at (8,28) size 320x221 clip at (10,30) size 316x217 + LayoutButton (relative positioned) {INPUT} at (0,0) size 320x221 [border: (2px outset #C0C0C0)] + LayoutFlexibleBox (anonymous) at (8,82.50) size 304x56 LayoutBlockFlow {DIV} at (124,0) size 56x56 [bgcolor=#FFFFFFE6] -layer at (8,210) size 320x32 - LayoutFlexibleBox (relative positioned) {DIV} at (0,182) size 320x32 - LayoutBlockFlow {DIV} at (16,2) size 28x30 [color=#FFFFFF] +layer at (8,188) size 320x48 + LayoutFlexibleBox (relative positioned) {DIV} at (0,160) size 320x48 + LayoutBlockFlow {DIV} at (16,18) size 28x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 28x16 text run at (0,7) width 28: "0:00" - LayoutBlockFlow {DIV} at (48,2) size 36x30 [color=#FFFFFF] + LayoutBlockFlow {DIV} at (48,18) size 36x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 36x16 text run at (0,7) width 36: "/ 0:06" - LayoutBlockFlow {DIV} at (84,32) size 162x0 - LayoutButton {INPUT} at (246,0) size 32x32 - LayoutButton {INPUT} at (278,0) size 32x32 -layer at (24,247) size 288x4 + LayoutBlockFlow {DIV} at (84,48) size 130x0 + LayoutButton {INPUT} at (214,0) size 48x48 + LayoutButton {INPUT} at (262,0) size 48x48 +layer at (8,236) size 320x32 + LayoutSlider {INPUT} at (0,208) size 320x32 [color=#C4C4C4] + LayoutFlexibleBox {DIV} at (16,16) size 288x4 +layer at (24,252) size 288x4 LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF4D] -layer at (24,243) size 12x12 +layer at (24,248) size 12x12 LayoutBlockFlow (relative positioned) {DIV} at (0,-4) size 12x12 [bgcolor=#FFFFFF] -layer at (24,247) size 288x4 +layer at (24,252) size 288x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 -layer at (24,247) size 0x4 +layer at (24,252) size 0x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF] -layer at (24,247) size 288x4 +layer at (24,252) size 288x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF8A]
diff --git a/third_party/WebKit/LayoutTests/platform/win/media/video-empty-source-expected.png b/third_party/WebKit/LayoutTests/platform/win/media/video-empty-source-expected.png index 0f7a3ff..68118fc 100644 --- a/third_party/WebKit/LayoutTests/platform/win/media/video-empty-source-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/media/video-empty-source-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/media/video-empty-source-expected.txt b/third_party/WebKit/LayoutTests/platform/win/media/video-empty-source-expected.txt index 41d68382..955e00a 100644 --- a/third_party/WebKit/LayoutTests/platform/win/media/video-empty-source-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/media/video-empty-source-expected.txt
@@ -16,30 +16,31 @@ LayoutFlexibleBox {DIV} at (0,0) size 300x150 layer at (9,45) size 300x150 LayoutFlexibleBox {DIV} at (0,0) size 300x150 - LayoutSlider {INPUT} at (0,124) size 300x26 [color=#C4C4C4] - LayoutFlexibleBox {DIV} at (16,5) size 268x4 -layer at (9,45) size 300x132 clip at (11,47) size 296x128 - LayoutButton (relative positioned) {INPUT} at (0,0) size 300x132 [border: (2px outset #C0C0C0)] - LayoutFlexibleBox (anonymous) at (8,38) size 284x56 +layer at (9,45) size 300x131 clip at (11,47) size 296x127 + LayoutButton (relative positioned) {INPUT} at (0,0) size 300x131 [border: (2px outset #C0C0C0)] + LayoutFlexibleBox (anonymous) at (8,37.50) size 284x56 layer at (131,83) size 56x56 transparent LayoutBlockFlow {DIV} at (114,0) size 56x56 [bgcolor=#FFFFFFE6] -layer at (9,137) size 300x32 - LayoutFlexibleBox (relative positioned) {DIV} at (0,92) size 300x32 - LayoutBlockFlow {DIV} at (16,2) size 28x30 [color=#FFFFFF] +layer at (9,115) size 300x48 + LayoutFlexibleBox (relative positioned) {DIV} at (0,70) size 300x48 + LayoutBlockFlow {DIV} at (16,18) size 28x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 28x16 text run at (0,7) width 28: "0:00" - LayoutBlockFlow {DIV} at (44,32) size 150x0 -layer at (203,137) size 32x32 transparent - LayoutButton {INPUT} at (194,0) size 32x32 [color=#808080] -layer at (235,137) size 32x32 transparent - LayoutButton {INPUT} at (226,0) size 32x32 [color=#808080] -layer at (267,137) size 32x32 transparent - LayoutButton {INPUT} at (258,0) size 32x32 [color=#808080] -layer at (25,174) size 268x4 + LayoutBlockFlow {DIV} at (44,48) size 102x0 +layer at (155,115) size 48x48 transparent + LayoutButton {INPUT} at (146,0) size 48x48 [color=#808080] +layer at (203,115) size 48x48 transparent + LayoutButton {INPUT} at (194,0) size 48x48 [color=#808080] +layer at (251,115) size 48x48 transparent + LayoutButton {INPUT} at (242,0) size 48x48 [color=#808080] +layer at (9,163) size 300x32 + LayoutSlider {INPUT} at (0,118) size 300x32 [color=#C4C4C4] + LayoutFlexibleBox {DIV} at (16,16) size 268x4 +layer at (25,179) size 268x4 LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 268x4 [bgcolor=#FFFFFF4D] -layer at (25,174) size 268x4 +layer at (25,179) size 268x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 268x4 -layer at (25,174) size 0x4 +layer at (25,179) size 0x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF] -layer at (25,174) size 0x4 +layer at (25,179) size 0x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF8A]
diff --git a/third_party/WebKit/LayoutTests/platform/win/media/video-no-audio-expected.png b/third_party/WebKit/LayoutTests/platform/win/media/video-no-audio-expected.png index ea5a668..ef11e98 100644 --- a/third_party/WebKit/LayoutTests/platform/win/media/video-no-audio-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/media/video-no-audio-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/media/video-no-audio-expected.txt b/third_party/WebKit/LayoutTests/platform/win/media/video-no-audio-expected.txt index 0d6b9ec..3f8c2345 100644 --- a/third_party/WebKit/LayoutTests/platform/win/media/video-no-audio-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/media/video-no-audio-expected.txt
@@ -16,31 +16,32 @@ LayoutFlexibleBox {DIV} at (0,0) size 352x288 layer at (8,44) size 352x288 LayoutFlexibleBox {DIV} at (0,0) size 352x288 - LayoutSlider {INPUT} at (0,262) size 352x26 [color=#C4C4C4] - LayoutFlexibleBox {DIV} at (16,5) size 320x4 -layer at (8,44) size 352x270 clip at (10,46) size 348x266 - LayoutButton (relative positioned) {INPUT} at (0,0) size 352x270 [border: (2px outset #C0C0C0)] - LayoutFlexibleBox (anonymous) at (8,107) size 336x56 +layer at (8,44) size 352x269 clip at (10,46) size 348x265 + LayoutButton (relative positioned) {INPUT} at (0,0) size 352x269 [border: (2px outset #C0C0C0)] + LayoutFlexibleBox (anonymous) at (8,106.50) size 336x56 LayoutBlockFlow {DIV} at (140,0) size 56x56 [bgcolor=#FFFFFFE6] -layer at (8,274) size 352x32 - LayoutFlexibleBox (relative positioned) {DIV} at (0,230) size 352x32 - LayoutBlockFlow {DIV} at (16,2) size 28x30 [color=#FFFFFF] +layer at (8,252) size 352x48 + LayoutFlexibleBox (relative positioned) {DIV} at (0,208) size 352x48 + LayoutBlockFlow {DIV} at (16,18) size 28x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 28x16 text run at (0,7) width 28: "0:00" - LayoutBlockFlow {DIV} at (48,2) size 36x30 [color=#FFFFFF] + LayoutBlockFlow {DIV} at (48,18) size 36x30 [color=#FFFFFF] LayoutText {#text} at (0,7) size 36x16 text run at (0,7) width 36: "/ 0:09" - LayoutBlockFlow {DIV} at (84,32) size 194x0 - LayoutButton {INPUT} at (310,0) size 32x32 -layer at (286,274) size 32x32 transparent - LayoutButton {INPUT} at (278,0) size 32x32 [color=#808080] -layer at (24,311) size 320x4 + LayoutBlockFlow {DIV} at (84,48) size 162x0 + LayoutButton {INPUT} at (294,0) size 48x48 +layer at (254,252) size 48x48 transparent + LayoutButton {INPUT} at (246,0) size 48x48 [color=#808080] +layer at (8,300) size 352x32 + LayoutSlider {INPUT} at (0,256) size 352x32 [color=#C4C4C4] + LayoutFlexibleBox {DIV} at (16,16) size 320x4 +layer at (24,316) size 320x4 LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 320x4 [bgcolor=#FFFFFF4D] -layer at (24,307) size 12x12 +layer at (24,312) size 12x12 LayoutBlockFlow (relative positioned) {DIV} at (0,-4) size 12x12 [bgcolor=#FFFFFF] -layer at (24,311) size 320x4 +layer at (24,316) size 320x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x4 -layer at (24,311) size 0x4 +layer at (24,316) size 0x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF] -layer at (24,311) size 320x4 +layer at (24,316) size 320x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x4 [bgcolor=#FFFFFF8A]
diff --git a/third_party/WebKit/LayoutTests/platform/win/media/video-zoom-controls-expected.png b/third_party/WebKit/LayoutTests/platform/win/media/video-zoom-controls-expected.png index e207cc5..ad6af59 100644 --- a/third_party/WebKit/LayoutTests/platform/win/media/video-zoom-controls-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/media/video-zoom-controls-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/media/video-zoom-controls-expected.txt b/third_party/WebKit/LayoutTests/platform/win/media/video-zoom-controls-expected.txt index 929ae56e..6b5b903d 100644 --- a/third_party/WebKit/LayoutTests/platform/win/media/video-zoom-controls-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/media/video-zoom-controls-expected.txt
@@ -14,22 +14,22 @@ LayoutFlexibleBox {DIV} at (0,0) size 240x180 layer at (57,85) size 240x180 LayoutFlexibleBox {DIV} at (0,0) size 240x180 - LayoutSlider {INPUT} at (0,141) size 240x39 [color=#C4C4C4] - LayoutFlexibleBox {DIV} at (24,7.50) size 192x6 -layer at (57,85) size 240x201 backgroundClip at (57,85) size 240x180 clip at (60,88) size 234x177 - LayoutButton (relative positioned) {INPUT} at (0,0) size 240x201 [border: (3px outset #C0C0C0)] - LayoutFlexibleBox (anonymous) at (12,58.50) size 216x84 +layer at (57,85) size 240x200 backgroundClip at (57,85) size 240x180 clip at (60,88) size 234x177 + LayoutButton (relative positioned) {INPUT} at (0,0) size 240x199.50 [border: (3px outset #C0C0C0)] + LayoutFlexibleBox (anonymous) at (12,57.75) size 216x84 LayoutBlockFlow {DIV} at (66,0) size 84x84 [bgcolor=#FFFFFFE6] -layer at (81,234) size 192x6 - LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 192x6 [bgcolor=#FFFFFF4D] -layer at (81,228) size 18x18 - LayoutBlockFlow (relative positioned) {DIV} at (0,-6) size 18x18 [bgcolor=#FFFFFF] -layer at (81,234) size 192x6 scrollWidth 288 - LayoutBlockFlow (positioned) {DIV} at (0,0) size 192x6 -layer at (81,234) size 0x6 - LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x6 [bgcolor=#FFFFFF] -layer at (81,234) size 288x6 backgroundClip at (81,234) size 192x6 clip at (81,234) size 192x6 - LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x6 [bgcolor=#FFFFFF8A] +layer at (57,193) size 240x72 scrollWidth 258 + LayoutFlexibleBox (relative positioned) {DIV} at (0,108) size 240x72 + LayoutBlockFlow {DIV} at (24,27) size 42x45 [color=#FFFFFF] + LayoutText {#text} at (0,10) size 42x24 + text run at (0,10) width 42: "0:00" + LayoutBlockFlow {DIV} at (72,-18) size 42x90 [color=#FFFFFF] + LayoutText {#text} at (0,10) size 42x69 + text run at (0,10) width 6: "/" + text run at (0,55) width 42: "0:06" + LayoutBlockFlow {DIV} at (114,72) size 0x0 + LayoutButton {INPUT} at (114,0) size 72x72 + LayoutButton {INPUT} at (186,0) size 72x72 layer at (57,310) size 240x180 LayoutVideo {VIDEO} at (45,298) size 240x180 layer at (57,310) size 240x180 @@ -38,19 +38,19 @@ LayoutFlexibleBox {DIV} at (0,0) size 240x180 layer at (57,310) size 240x180 LayoutFlexibleBox {DIV} at (0,0) size 240x180 - LayoutSlider {INPUT} at (0,141) size 240x39 [color=#C4C4C4] - LayoutFlexibleBox {DIV} at (24,7.50) size 192x6 -layer at (57,310) size 240x201 backgroundClip at (43,291) size 268x218 clip at (60,313) size 234x195 - LayoutButton (relative positioned) {INPUT} at (0,0) size 240x201 [border: (3px outset #C0C0C0)] - LayoutFlexibleBox (anonymous) at (12,58.50) size 216x84 +layer at (57,310) size 240x200 backgroundClip at (43,291) size 268x218 clip at (60,313) size 234x194 + LayoutButton (relative positioned) {INPUT} at (0,0) size 240x199.50 [border: (3px outset #C0C0C0)] + LayoutFlexibleBox (anonymous) at (12,57.75) size 216x84 LayoutBlockFlow {DIV} at (66,0) size 84x84 [bgcolor=#FFFFFFE6] -layer at (81,459) size 192x6 - LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 192x6 [bgcolor=#FFFFFF4D] -layer at (81,453) size 18x18 - LayoutBlockFlow (relative positioned) {DIV} at (0,-6) size 18x18 [bgcolor=#FFFFFF] -layer at (81,459) size 192x6 backgroundClip at (71,441) size 190x39 clip at (81,459) size 180x6 scrollWidth 288 - LayoutBlockFlow (positioned) {DIV} at (0,0) size 192x6 -layer at (81,459) size 0x6 - LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x6 [bgcolor=#FFFFFF] -layer at (81,459) size 288x6 backgroundClip at (71,441) size 190x40 clip at (71,441) size 190x40 - LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x6 [bgcolor=#FFFFFF8A] +layer at (57,418) size 240x72 backgroundClip at (43,397) size 249x112 clip at (57,418) size 235x72 scrollWidth 258 + LayoutFlexibleBox (relative positioned) {DIV} at (0,108) size 240x72 + LayoutBlockFlow {DIV} at (24,27) size 42x45 [color=#FFFFFF] + LayoutText {#text} at (0,10) size 42x24 + text run at (0,10) width 42: "0:00" + LayoutBlockFlow {DIV} at (72,-18) size 42x90 [color=#FFFFFF] + LayoutText {#text} at (0,10) size 42x69 + text run at (0,10) width 6: "/" + text run at (0,55) width 42: "0:06" + LayoutBlockFlow {DIV} at (114,72) size 0x0 + LayoutButton {INPUT} at (114,0) size 72x72 + LayoutButton {INPUT} at (186,0) size 72x72
diff --git a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/bugzilla-6473-expected.txt b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/bugzilla-6473-expected.txt index d444d3c..5504a81 100644 --- a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/bugzilla-6473-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/bugzilla-6473-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutBlockFlow (relative positioned) P", "rect": [8, 152, 784, 20], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutBlockFlow (relative positioned) P",
diff --git a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/caret-subpixel-expected.txt b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/caret-subpixel-expected.txt index 47e4388..92b0d70 100644 --- a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/caret-subpixel-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/caret-subpixel-expected.txt
@@ -25,7 +25,7 @@ { "object": "LayoutBlockFlow DIV", "rect": [209, 11, 2, 16], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/clip/control-clip-expected.txt b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/clip/control-clip-expected.txt index 05df1f4..8dc4b65 100644 --- a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/clip/control-clip-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/clip/control-clip-expected.txt
@@ -20,7 +20,7 @@ { "object": "InlineTextBox 'SUCCESS'", "rect": [76, 116, 64, 18], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox 'SUCCESS'", @@ -30,7 +30,7 @@ { "object": "InlineTextBox 'FAILURE'", "rect": [81, 116, 54, 18], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "InlineTextBox 'FAILURE'",
diff --git a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/clip/outline-clip-change-expected.txt b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/clip/outline-clip-change-expected.txt index 26b5c8f..c0902cfb 100644 --- a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/clip/outline-clip-change-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/clip/outline-clip-change-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutBlockFlow (positioned) A id='link' class='updated'", "rect": [48, 108, 86, 25], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox 'Lorem Ipsum'",
diff --git a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/compositing/iframe-inside-squashed-layer-expected.txt b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/compositing/iframe-inside-squashed-layer-expected.txt index 4eb6a5f..f5808b7e 100644 --- a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/compositing/iframe-inside-squashed-layer-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/compositing/iframe-inside-squashed-layer-expected.txt
@@ -46,7 +46,7 @@ { "object": "LayoutView #document", "rect": [285, 500, 15, 150], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/css-grid-layout/grid-item-z-index-change-repaint-expected.txt b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/css-grid-layout/grid-item-z-index-change-repaint-expected.txt index df9700a..61892f20 100644 --- a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/css-grid-layout/grid-item-z-index-change-repaint-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/css-grid-layout/grid-item-z-index-change-repaint-expected.txt
@@ -20,17 +20,17 @@ { "object": "LayoutBlockFlow HTML", "rect": [8, 16, 432, 320], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutBlockFlow HTML", "rect": [8, 16, 432, 320], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutBlockFlow DIV id='item2' class='sizedToGridArea green'", "rect": [8, 236, 200, 100], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/forms/textarea-caret-expected.txt b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/forms/textarea-caret-expected.txt index 33c09c4..ea9de96 100644 --- a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/forms/textarea-caret-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/forms/textarea-caret-expected.txt
@@ -20,22 +20,22 @@ { "object": "LayoutTextControl TEXTAREA id='editor'", "rect": [7, 7, 183, 40], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutTextControl TEXTAREA id='editor'", "rect": [7, 7, 183, 40], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutBlockFlow HTML", "rect": [8, 8, 181, 38], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutTextControl TEXTAREA id='editor'", "rect": [9, 10, 179, 18], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/invalidation-after-opacity-change-subtree-expected.txt b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/invalidation-after-opacity-change-subtree-expected.txt index 2b1fd9a..df92d3f 100644 --- a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/invalidation-after-opacity-change-subtree-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/invalidation-after-opacity-change-subtree-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutBlockFlow HTML", "rect": [8, 2046, 766, 258], - "reason": "appeared" + "reason": "chunk appeared" } ], "transform": 1
diff --git a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/multicol/multicol-with-abspos-expected.txt b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/multicol/multicol-with-abspos-expected.txt index 400cfe9..70aef8d 100644 --- a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/multicol/multicol-with-abspos-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/multicol/multicol-with-abspos-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutBlockFlow (positioned) DIV id='target'", "rect": [0, 580, 80, 20], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/offset-change-wrong-invalidation-with-float-expected.txt b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/offset-change-wrong-invalidation-with-float-expected.txt similarity index 97% rename from third_party/WebKit/LayoutTests/paint/invalidation/offset-change-wrong-invalidation-with-float-expected.txt rename to third_party/WebKit/LayoutTests/platform/win/paint/invalidation/offset-change-wrong-invalidation-with-float-expected.txt index f5204fa3..d2e5dfc1 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/offset-change-wrong-invalidation-with-float-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/offset-change-wrong-invalidation-with-float-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutBlockFlow (positioned) UL id='submenu'", "rect": [48, 94, 40, 20], - "reason": "disappeared" + "reason": "chunk disappeared" } ] },
diff --git a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/overflow/opacity-change-on-overflow-float-expected.txt b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/overflow/opacity-change-on-overflow-float-expected.txt index 504f2b9..65937d6 100644 --- a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/overflow/opacity-change-on-overflow-float-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/overflow/opacity-change-on-overflow-float-expected.txt
@@ -45,17 +45,12 @@ { "object": "LayoutBlockFlow HTML", "rect": [8, 8, 765, 59], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutBlockFlow (floating) DIV class='green'", "rect": [8, 84, 100, 100], - "reason": "disappeared" - }, - { - "object": "LayoutBlockFlow (floating) DIV class='red'", - "rect": [8, 84, 100, 100], - "reason": "appeared" + "reason": "chunk disappeared" }, { "object": "LayoutBlockFlow (floating) DIV class='red'", @@ -63,6 +58,11 @@ "reason": "disappeared" }, { + "object": "LayoutBlockFlow (floating) DIV class='red'", + "rect": [8, 84, 100, 100], + "reason": "chunk appeared" + }, + { "object": "InlineTextBox 'Repaint test for '", "rect": [8, 8, 96, 19], "reason": "disappeared"
diff --git a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/overhanging-float-detach-repaint-expected.txt b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/overhanging-float-detach-repaint-expected.txt index 242d156..59d43cf 100644 --- a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/overhanging-float-detach-repaint-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/overhanging-float-detach-repaint-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutBlockFlow HTML", "rect": [8, 68, 100, 100], - "reason": "disappeared" + "reason": "chunk disappeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/paint-invalidation-with-reparent-across-frame-boundaries-expected.txt b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/paint-invalidation-with-reparent-across-frame-boundaries-expected.txt index 4ea32ad..952f397 100644 --- a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/paint-invalidation-with-reparent-across-frame-boundaries-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/paint-invalidation-with-reparent-across-frame-boundaries-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutBlockFlow HTML", "rect": [18, 18, 22, 19], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "InlineTextBox 'abc'",
diff --git a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/remove-inline-layer-after-layout-expected.txt b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/remove-inline-layer-after-layout-expected.txt index a4ff6360..86f15feaaa 100644 --- a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/remove-inline-layer-after-layout-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/remove-inline-layer-after-layout-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutInline SPAN id='target'", "rect": [112, 193, 170, 19], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutBlockFlow DIV",
diff --git a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/resize-iframe-text-expected.txt b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/resize-iframe-text-expected.txt index 222e320e..6705455 100644 --- a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/resize-iframe-text-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/resize-iframe-text-expected.txt
@@ -25,12 +25,12 @@ { "object": "LayoutBlockFlow HTML", "rect": [8, 299, 64, 24], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutView #document", "rect": [485, 0, 15, 200], - "reason": "disappeared" + "reason": "chunk disappeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/scroll/caret-with-composited-scroll-expected.txt b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/scroll/caret-with-composited-scroll-expected.txt index 3c7eff8..8a953e2c 100644 --- a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/scroll/caret-with-composited-scroll-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/scroll/caret-with-composited-scroll-expected.txt
@@ -36,17 +36,17 @@ { "object": "LayoutTextControl INPUT id='text'", "rect": [0, 999, 205, 23], - "reason": "appeared" + "reason": "subtree" }, { "object": "LayoutTextControl INPUT id='text'", "rect": [0, 999, 205, 23], - "reason": "subtree" + "reason": "chunk appeared" }, { "object": "LayoutBlockFlow DIV", "rect": [3, 1003, 1, 16], - "reason": "appeared" + "reason": "chunk appeared" } ], "transform": 1
diff --git a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/scroll/invalidate-caret-in-composited-scrolling-container-expected.txt b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/scroll/invalidate-caret-in-composited-scrolling-container-expected.txt index c649fb3..9e959c3 100644 --- a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/scroll/invalidate-caret-in-composited-scrolling-container-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/scroll/invalidate-caret-in-composited-scrolling-container-expected.txt
@@ -51,7 +51,7 @@ { "object": "Caret", "rect": [65, 4, 1, 16], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/scroll/invalidate-caret-in-non-composited-scrolling-container-expected.txt b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/scroll/invalidate-caret-in-non-composited-scrolling-container-expected.txt index c649fb3..9e959c3 100644 --- a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/scroll/invalidate-caret-in-non-composited-scrolling-container-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/scroll/invalidate-caret-in-non-composited-scrolling-container-expected.txt
@@ -51,7 +51,7 @@ { "object": "Caret", "rect": [65, 4, 1, 16], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/search-field-cancel-expected.txt b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/search-field-cancel-expected.txt index 6f0912f..7d3bd790 100644 --- a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/search-field-cancel-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/search-field-cancel-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutBlockFlow DIV", "rect": [11, 46, 58, 18], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/ems-display-none-expected.txt b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/ems-display-none-expected.txt index 540eec3..5f0188c 100644 --- a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/ems-display-none-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/ems-display-none-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutSVGRoot svg", "rect": [50, 54, 560, 86], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/exs-display-none-expected.txt b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/exs-display-none-expected.txt index 42977b4..bcd1c69 100644 --- a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/exs-display-none-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/exs-display-none-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutSVGRoot svg", "rect": [50, 52, 560, 84], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/inner-svg-change-viewPort-relative-expected.txt b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/inner-svg-change-viewPort-relative-expected.txt index b52988a3..cc38ea2 100644 --- a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/inner-svg-change-viewPort-relative-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/inner-svg-change-viewPort-relative-expected.txt
@@ -30,12 +30,12 @@ { "object": "InlineTextBox 'right-aligned text'", "rect": [100, 85, 100, 19], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox 'right-aligned text'", "rect": [0, 85, 100, 19], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGContainer use",
diff --git a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/js-late-clipPath-and-object-creation-expected.txt b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/js-late-clipPath-and-object-creation-expected.txt index 84f5b34..a74747b 100644 --- a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/js-late-clipPath-and-object-creation-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/js-late-clipPath-and-object-creation-expected.txt
@@ -20,17 +20,17 @@ { "object": "LayoutSVGContainer g id='content'", "rect": [16, 40, 784, 173], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer g id='content'", "rect": [16, 40, 784, 173], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [16, 40, 318, 173], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/js-late-clipPath-creation-expected.txt b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/js-late-clipPath-creation-expected.txt index aa83c06..92a2b3bd 100644 --- a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/js-late-clipPath-creation-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/js-late-clipPath-creation-expected.txt
@@ -20,12 +20,12 @@ { "object": "LayoutSVGContainer g id='content'", "rect": [16, 40, 784, 173], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [16, 40, 318, 173], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/js-late-gradient-and-object-creation-expected.txt b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/js-late-gradient-and-object-creation-expected.txt index e66cccd8..7b1dd25 100644 --- a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/js-late-gradient-and-object-creation-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/js-late-gradient-and-object-creation-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutSVGRoot svg id='svg-root'", "rect": [0, 15, 757, 365], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/js-late-pattern-and-object-creation-expected.txt b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/js-late-pattern-and-object-creation-expected.txt index d4b5031..5643fe2 100644 --- a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/js-late-pattern-and-object-creation-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/js-late-pattern-and-object-creation-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutSVGRoot svg id='svg-root'", "rect": [0, 15, 680, 365], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/tabgroup-expected.txt b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/tabgroup-expected.txt index 78698e3c..c2411ed 100644 --- a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/tabgroup-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/tabgroup-expected.txt
@@ -20,67 +20,67 @@ { "object": "LayoutSVGContainer g", "rect": [388, 37, 318, 83], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer g", "rect": [261, 277, 305, 305], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer g", "rect": [5, 255, 240, 162], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGPath path", "rect": [5, 255, 240, 162], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGPath path", "rect": [5, 255, 240, 162], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGPath path", "rect": [5, 255, 240, 162], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer g", "rect": [505, 232, 240, 161], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox 'This is a tabgroup with triangular tab corners'", "rect": [15, 291, 211, 37], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer g id='tabgroupRect'", "rect": [37, 5, 161, 240], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGText text", "rect": [66, 257, 57, 29], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGText text", "rect": [10, 257, 50, 29], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGText text", "rect": [130, 257, 44, 29], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGText text", "rect": [181, 257, 32, 29], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/text-mask-update-expected.txt b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/text-mask-update-expected.txt index 44e30e9..cadde7e 100644 --- a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/text-mask-update-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/text-mask-update-expected.txt
@@ -20,22 +20,22 @@ { "object": "LayoutSVGRect rect", "rect": [10, 3, 45, 22], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGRect rect", "rect": [10, 3, 45, 22], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGRect rect", "rect": [10, 33, 41, 17], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGRect rect", "rect": [10, 33, 41, 17], - "reason": "disappeared" + "reason": "chunk disappeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/text-repaint-including-stroke-expected.txt b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/text-repaint-including-stroke-expected.txt index e870ce2..9032c41 100644 --- a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/text-repaint-including-stroke-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/text-repaint-including-stroke-expected.txt
@@ -20,12 +20,12 @@ { "object": "LayoutSVGText text id='bounce'", "rect": [80, 0, 550, 117], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGRoot svg", "rect": [30, 0, 403, 59], - "reason": "disappeared" + "reason": "chunk disappeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/text-rescale-expected.txt b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/text-rescale-expected.txt index 8dfdc54..4888529 100644 --- a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/text-rescale-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/text-rescale-expected.txt
@@ -20,12 +20,12 @@ { "object": "InlineTextBox 'PASS '", "rect": [0, 114, 192, 46], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGRoot (positioned) svg", "rect": [0, 14, 192, 46], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGViewportContainer svg", @@ -35,7 +35,7 @@ { "object": "LayoutSVGViewportContainer svg", "rect": [310, 14, 91, 46], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGForeignObject foreignObject", @@ -50,7 +50,7 @@ { "object": "LayoutSVGContainer g id='text3g'", "rect": [0, 3, 8, 2], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGViewportContainer svg",
diff --git a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/text-selection-text-05-t-expected.txt b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/text-selection-text-05-t-expected.txt index adf01a1d..3bb05294 100644 --- a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/text-selection-text-05-t-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/text-selection-text-05-t-expected.txt
@@ -20,12 +20,12 @@ { "object": "InlineTextBox '$Revision: 1.8 $'", "rect": [0, 0, 800, 600], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text id='revision'", "rect": [0, 0, 800, 600], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox 'text-anchor'", @@ -60,62 +60,62 @@ { "object": "InlineTextBox '1'", "rect": [266, 485, 113, 29], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [266, 485, 113, 29], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox '1'", "rect": [266, 201, 113, 21], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [266, 201, 113, 21], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox '1'", "rect": [428, 485, 104, 29], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [428, 485, 104, 29], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox '1'", "rect": [428, 201, 104, 21], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [428, 201, 104, 21], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox '1'", "rect": [590, 485, 94, 29], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [590, 485, 94, 29], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox '1'", "rect": [590, 201, 94, 21], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [590, 201, 94, 21], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox 'middle'", @@ -220,92 +220,92 @@ { "object": "InlineTextBox '1'", "rect": [428, 285, 61, 54], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [428, 285, 61, 54], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox '1'", "rect": [266, 285, 61, 54], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [266, 285, 61, 54], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox '1'", "rect": [428, 435, 61, 29], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [428, 435, 61, 29], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox '1'", "rect": [266, 435, 61, 29], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [266, 435, 61, 29], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox '1'", "rect": [428, 151, 61, 21], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [428, 151, 61, 21], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox '1'", "rect": [266, 151, 61, 21], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [266, 151, 61, 21], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox '1'", "rect": [590, 285, 60, 54], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [590, 285, 60, 54], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox '1'", "rect": [590, 435, 60, 29], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [590, 435, 60, 29], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox '1'", "rect": [590, 151, 60, 21], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [590, 151, 60, 21], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox 'start'", @@ -320,32 +320,32 @@ { "object": "InlineTextBox '1'", "rect": [428, 335, 46, 54], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [428, 335, 46, 54], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox '1'", "rect": [266, 335, 46, 54], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [266, 335, 46, 54], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox '1'", "rect": [590, 335, 45, 54], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [590, 335, 45, 54], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox 'end'", @@ -360,92 +360,92 @@ { "object": "InlineTextBox '1'", "rect": [573, 235, 39, 54], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [573, 235, 39, 54], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox '1'", "rect": [411, 235, 38, 54], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [411, 235, 38, 54], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox '1234'", "rect": [546, 101, 38, 21], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [546, 101, 38, 21], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox '1'", "rect": [250, 235, 37, 54], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [250, 235, 37, 54], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox '1'", "rect": [250, 385, 37, 45], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [250, 385, 37, 45], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox '1234'", "rect": [398, 101, 37, 21], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [398, 101, 37, 21], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox '1234'", "rect": [250, 101, 37, 21], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [250, 101, 37, 21], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox '1'", "rect": [565, 385, 29, 45], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [565, 385, 29, 45], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox '1'", "rect": [411, 385, 29, 45], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "LayoutSVGText text", "rect": [411, 385, 29, 45], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/text-viewbox-rescale-expected.txt b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/text-viewbox-rescale-expected.txt index 187e8c5d..500c46c0 100644 --- a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/text-viewbox-rescale-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/text-viewbox-rescale-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutSVGViewportContainer svg id='inner1'", "rect": [0, 0, 200, 200], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox 'PASS '",
diff --git a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/use-clipped-hit-expected.txt b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/use-clipped-hit-expected.txt index 4b70f0d..7478302 100644 --- a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/use-clipped-hit-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/use-clipped-hit-expected.txt
@@ -20,12 +20,12 @@ { "object": "InlineTextBox 'Unknown'", "rect": [90, 115, 59, 19], - "reason": "disappeared" + "reason": "chunk disappeared" }, { "object": "InlineTextBox 'Passed'", "rect": [90, 115, 43, 19], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/window-expected.txt b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/window-expected.txt index ee5831b..407b52e 100644 --- a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/window-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/window-expected.txt
@@ -20,22 +20,22 @@ { "object": "LayoutSVGContainer g id='bigWindow'", "rect": [37, 142, 551, 394], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGRect rect id='titleBarbigWindow'", "rect": [37, 142, 551, 17], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer g id='nestedWindow'", "rect": [76, 181, 316, 238], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGRect rect id='titleBarnestedWindow'", "rect": [76, 181, 316, 17], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGRect rect id='decoGroupMinimizednavWindow'", @@ -45,27 +45,27 @@ { "object": "LayoutSVGContainer g id='navWindow'", "rect": [623, 91, 176, 160], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer g id='colourPickerWindow'", "rect": [76, 194, 176, 144], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer g id='smallWindow'", "rect": [311, 376, 160, 145], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer g id='statusWindow'", "rect": [248, 343, 144, 66], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer g id='minimalWindow'", "rect": [38, 475, 121, 50], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGRect rect", @@ -75,7 +75,7 @@ { "object": "LayoutSVGText text", "rect": [615, 153, 14, 81], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer use id='closeButtonnavWindow'", @@ -85,7 +85,7 @@ { "object": "LayoutSVGContainer use id='closeButtonnavWindow'", "rect": [782, 94, 12, 11], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer use id='closeButtonnavWindow'", @@ -105,32 +105,32 @@ { "object": "LayoutSVGContainer use id='closeButtonbigWindow'", "rect": [571, 145, 12, 11], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer use id='minimizeButtonnestedWindow'", "rect": [349, 184, 12, 11], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer use id='closeButtoncolourPickerWindow'", "rect": [235, 197, 12, 11], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer use id='maximizeButtonstatusWindow'", "rect": [376, 345, 11, 12], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer use id='minimizeButtonstatusWindow'", "rect": [363, 345, 11, 12], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer use id='maximizeButtonnavWindow'", "rect": [769, 94, 11, 11], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer use id='maximizeButtonnavWindow'", @@ -140,7 +140,7 @@ { "object": "LayoutSVGContainer use id='minimizeButtonnavWindow'", "rect": [756, 94, 11, 11], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer use id='minimizeButtonnavWindow'", @@ -150,47 +150,47 @@ { "object": "LayoutSVGContainer use id='maximizeButtonbigWindow'", "rect": [558, 145, 11, 11], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer use id='minimizeButtonbigWindow'", "rect": [545, 145, 11, 11], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer use id='closeButtonsmallWindow'", "rect": [454, 379, 11, 11], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer use id='maximizeButtonsmallWindow'", "rect": [441, 379, 11, 11], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer use id='minimizeButtonsmallWindow'", "rect": [428, 379, 11, 11], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer use id='closeButtonnestedWindow'", "rect": [376, 184, 11, 11], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer use id='maximizeButtonnestedWindow'", "rect": [363, 184, 11, 11], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer use id='maximizeButtoncolourPickerWindow'", "rect": [222, 197, 11, 11], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "LayoutSVGContainer use id='minimizeButtoncolourPickerWindow'", "rect": [209, 197, 11, 11], - "reason": "appeared" + "reason": "chunk appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/transform/transform-inline-layered-child-expected.txt b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/transform/transform-inline-layered-child-expected.txt index ff1eaece..bd744a1 100644 --- a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/transform/transform-inline-layered-child-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/transform/transform-inline-layered-child-expected.txt
@@ -20,7 +20,7 @@ { "object": "LayoutInline (relative positioned) SPAN id='child'", "rect": [135, 361, 159, 195], - "reason": "appeared" + "reason": "chunk appeared" }, { "object": "InlineTextBox 'A B C'",
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/layout_ng_experimental/fast/multicol/composited-layer-multiple-fragments-expected.txt b/third_party/WebKit/LayoutTests/platform/win/virtual/layout_ng_experimental/fast/multicol/composited-layer-multiple-fragments-expected.txt index 7b1c8798..de1ee5bf 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/layout_ng_experimental/fast/multicol/composited-layer-multiple-fragments-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/layout_ng_experimental/fast/multicol/composited-layer-multiple-fragments-expected.txt
@@ -26,15 +26,15 @@ LayoutNGBlockFlow {DIV} at (0,20) size 20x20 [bgcolor=#008000] LayoutNGBlockFlow {DIV} at (0,140) size 20x20 [bgcolor=#008000] LayoutNGBlockFlow {DIV} at (0,160) size 20x20 [bgcolor=#008000] -layer at (8,144) size 20x40 backgroundClip at (0,0) size 28x164 clip at (0,0) size 28x164 +layer at (8,144) size 20x40 LayoutNGBlockFlow {DIV} at (0,40) size 20x40 LayoutNGBlockFlow {DIV} at (0,0) size 20x20 [bgcolor=#008000] LayoutNGBlockFlow {DIV} at (0,20) size 20x20 [bgcolor=#008000] -layer at (28,144) size 20x40 backgroundClip at (0,0) size 28x164 clip at (0,0) size 28x164 +layer at (28,144) size 20x40 LayoutNGBlockFlow {DIV} at (0,100) size 20x40 LayoutNGBlockFlow {DIV} at (0,0) size 20x20 [bgcolor=#008000] LayoutNGBlockFlow {DIV} at (0,20) size 20x20 [bgcolor=#008000] -layer at (8,252) size 20x100 backgroundClip at (0,0) size 28x272 clip at (0,0) size 28x272 +layer at (8,252) size 20x100 LayoutNGBlockFlow {DIV} at (0,40) size 20x100 LayoutNGBlockFlow {DIV} at (0,0) size 20x20 [bgcolor=#008000] LayoutNGBlockFlow {DIV} at (0,20) size 20x20 [bgcolor=#008000]
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/layout_ng_experimental/fast/multicol/composited-layer-multiple-fragments-translated-expected.txt b/third_party/WebKit/LayoutTests/platform/win/virtual/layout_ng_experimental/fast/multicol/composited-layer-multiple-fragments-translated-expected.txt index 3c86a2a1..30d0fe3 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/layout_ng_experimental/fast/multicol/composited-layer-multiple-fragments-translated-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/layout_ng_experimental/fast/multicol/composited-layer-multiple-fragments-translated-expected.txt
@@ -19,7 +19,7 @@ LayoutBR {BR} at (0,0) size 0x0 LayoutBR {BR} at (0,0) size 0x0 LayoutNGBlockFlow {DIV} at (0,160) size 20x20 [bgcolor=#FF0000] -layer at (28,112) size 20x60 backgroundClip at (0,0) size 28x132 clip at (0,0) size 28x132 +layer at (28,112) size 20x60 LayoutNGBlockFlow {DIV} at (0,100) size 20x60 LayoutNGBlockFlow {DIV} at (0,0) size 20x20 [bgcolor=#008000] LayoutNGBlockFlow (anonymous) at (0,20) size 20x20
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/layout_ng_experimental/fast/multicol/composited-layer-nested-expected.txt b/third_party/WebKit/LayoutTests/platform/win/virtual/layout_ng_experimental/fast/multicol/composited-layer-nested-expected.txt index 6fb87ad..1a3c200 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/layout_ng_experimental/fast/multicol/composited-layer-nested-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/layout_ng_experimental/fast/multicol/composited-layer-nested-expected.txt
@@ -22,30 +22,30 @@ LayoutMultiColumnSet (anonymous) at (0,0) size 60x60 layer at (8,212) size 20x180 backgroundClip at (0,0) size 28x272 clip at (0,0) size 28x272 LayoutMultiColumnFlowThread (anonymous) at (0,0) size 20x180 -layer at (8,124) size 20x80 backgroundClip at (0,0) size 28x164 clip at (0,0) size 28x164 +layer at (8,124) size 20x80 LayoutNGBlockFlow {DIV} at (0,20) size 20x80 LayoutNGBlockFlow {DIV} at (0,0) size 20x20 [bgcolor=#008000] LayoutNGBlockFlow {DIV} at (0,60) size 20x20 [bgcolor=#008000] -layer at (8,144) size 20x40 backgroundClip at (0,0) size 28x164 clip at (0,0) size 28x164 +layer at (8,144) size 20x40 LayoutNGBlockFlow {DIV} at (0,20) size 20x40 LayoutNGBlockFlow {DIV} at (0,0) size 20x20 [bgcolor=#008000] LayoutNGBlockFlow {DIV} at (0,20) size 20x20 [bgcolor=#008000] -layer at (8,212) size 20x180 backgroundClip at (0,0) size 28x272 clip at (0,0) size 28x272 +layer at (8,212) size 20x180 LayoutNGBlockFlow {DIV} at (0,0) size 20x180 LayoutNGBlockFlow {DIV} at (0,80) size 20x20 [bgcolor=#008000] -layer at (8,212) size 20x80 backgroundClip at (0,0) size 28x272 clip at (0,0) size 28x272 +layer at (8,212) size 20x80 LayoutNGBlockFlow {DIV} at (0,0) size 20x80 LayoutNGBlockFlow {DIV} at (0,0) size 20x20 [bgcolor=#008000] LayoutNGBlockFlow {DIV} at (0,20) size 20x20 [bgcolor=#008000] -layer at (8,252) size 20x40 backgroundClip at (0,0) size 28x272 clip at (0,0) size 28x272 +layer at (8,252) size 20x40 LayoutNGBlockFlow {DIV} at (0,40) size 20x40 LayoutNGBlockFlow {DIV} at (0,0) size 20x20 [bgcolor=#008000] LayoutNGBlockFlow {DIV} at (0,20) size 20x20 [bgcolor=#008000] -layer at (8,312) size 20x80 backgroundClip at (0,0) size 28x272 clip at (0,0) size 28x272 +layer at (8,312) size 20x80 LayoutNGBlockFlow {DIV} at (0,100) size 20x80 LayoutNGBlockFlow {DIV} at (0,40) size 20x20 [bgcolor=#008000] LayoutNGBlockFlow {DIV} at (0,60) size 20x20 [bgcolor=#008000] -layer at (8,312) size 20x40 backgroundClip at (0,0) size 28x272 clip at (0,0) size 28x272 +layer at (8,312) size 20x40 LayoutNGBlockFlow {DIV} at (0,0) size 20x40 LayoutNGBlockFlow {DIV} at (0,0) size 20x20 [bgcolor=#008000] LayoutNGBlockFlow {DIV} at (0,20) size 20x20 [bgcolor=#008000]
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/layout_ng_experimental/fast/multicol/composited-layer-will-change-expected.txt b/third_party/WebKit/LayoutTests/platform/win/virtual/layout_ng_experimental/fast/multicol/composited-layer-will-change-expected.txt index dec0f29..1995bcd 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/layout_ng_experimental/fast/multicol/composited-layer-will-change-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/layout_ng_experimental/fast/multicol/composited-layer-will-change-expected.txt
@@ -34,11 +34,11 @@ layer at (8,104) size 20x20 LayoutNGBlockFlow {DIV} at (0,0) size 20x20 LayoutNGBlockFlow {DIV} at (0,0) size 20x20 [bgcolor=#008000] -layer at (8,144) size 20x40 backgroundClip at (0,0) size 28x164 clip at (0,0) size 28x164 +layer at (8,144) size 20x40 LayoutNGBlockFlow {DIV} at (0,40) size 20x40 LayoutNGBlockFlow {DIV} at (0,0) size 20x20 [bgcolor=#008000] LayoutNGBlockFlow {DIV} at (0,20) size 20x20 [bgcolor=#008000] -layer at (28,144) size 20x60 backgroundClip at (0,0) size 28x164 clip at (0,0) size 28x164 +layer at (28,144) size 20x60 LayoutNGBlockFlow {DIV} at (0,100) size 20x60 LayoutNGBlockFlow {DIV} at (0,0) size 20x20 [bgcolor=#008000] LayoutNGBlockFlow {DIV} at (0,20) size 20x20 [bgcolor=#008000] @@ -46,11 +46,11 @@ layer at (8,212) size 20x20 LayoutNGBlockFlow {DIV} at (0,0) size 20x20 LayoutNGBlockFlow {DIV} at (0,0) size 20x20 [bgcolor=#008000] -layer at (8,252) size 20x40 backgroundClip at (0,0) size 28x272 clip at (0,0) size 28x272 +layer at (8,252) size 20x40 LayoutNGBlockFlow {DIV} at (0,40) size 20x40 LayoutNGBlockFlow {DIV} at (0,0) size 20x20 [bgcolor=#008000] LayoutNGBlockFlow {DIV} at (0,20) size 20x20 [bgcolor=#008000] -layer at (28,252) size 20x60 backgroundClip at (0,0) size 28x272 clip at (0,0) size 28x272 +layer at (28,252) size 20x60 LayoutNGBlockFlow {DIV} at (0,100) size 20x60 LayoutNGBlockFlow {DIV} at (0,0) size 20x20 [bgcolor=#008000] LayoutNGBlockFlow {DIV} at (0,20) size 20x20 [bgcolor=#008000] @@ -58,11 +58,11 @@ layer at (8,320) size 20x20 LayoutNGBlockFlow (relative positioned) {DIV} at (0,0) size 20x20 LayoutNGBlockFlow {DIV} at (0,0) size 20x20 [bgcolor=#008000] -layer at (8,360) size 20x40 backgroundClip at (0,0) size 28x380 clip at (0,0) size 28x380 +layer at (8,360) size 20x40 LayoutNGBlockFlow (relative positioned) {DIV} at (0,40) size 20x40 LayoutNGBlockFlow {DIV} at (0,0) size 20x20 [bgcolor=#008000] LayoutNGBlockFlow {DIV} at (0,20) size 20x20 [bgcolor=#008000] -layer at (28,360) size 20x60 backgroundClip at (0,0) size 28x380 clip at (0,0) size 28x380 +layer at (28,360) size 20x60 LayoutNGBlockFlow (relative positioned) {DIV} at (0,100) size 20x60 LayoutNGBlockFlow {DIV} at (0,0) size 20x20 [bgcolor=#008000] LayoutNGBlockFlow {DIV} at (0,20) size 20x20 [bgcolor=#008000]
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/video-surface-layer/media/video-zoom-controls-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/video-surface-layer/media/video-zoom-controls-expected.png index 3994c0d..88bcba4 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/video-surface-layer/media/video-zoom-controls-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/video-surface-layer/media/video-zoom-controls-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win7/media/controls-after-reload-expected.png b/third_party/WebKit/LayoutTests/platform/win7/media/controls-after-reload-expected.png deleted file mode 100644 index 025bcb47..0000000 --- a/third_party/WebKit/LayoutTests/platform/win7/media/controls-after-reload-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win7/media/controls-after-reload-expected.txt b/third_party/WebKit/LayoutTests/platform/win7/media/controls-after-reload-expected.txt deleted file mode 100644 index 48f1628c..0000000 --- a/third_party/WebKit/LayoutTests/platform/win7/media/controls-after-reload-expected.txt +++ /dev/null
@@ -1,45 +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 (8,8) size 784x584 - LayoutBlockFlow {P} at (0,0) size 784x20 - LayoutText {#text} at (0,0) size 348x19 - text run at (0,0) width 348: "Making sure the controller looks ok after a second load()." - LayoutBlockFlow (anonymous) at (0,36) size 784x240 - LayoutText {#text} at (0,0) size 0x0 -layer at (8,44) size 320x240 - LayoutVideo {VIDEO} at (0,0) size 320x240 -layer at (8,44) size 320x240 - LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 - LayoutFlexibleBox {DIV} at (0,0) size 320x240 -layer at (8,44) size 320x240 - LayoutFlexibleBox {DIV} at (0,0) size 320x240 - LayoutSlider {INPUT} at (0,214) size 320x26 [color=#C4C4C4] - LayoutFlexibleBox {DIV} at (16,5) size 288x4 -layer at (8,44) size 320x222 clip at (10,46) size 316x218 - LayoutButton (relative positioned) {INPUT} at (0,0) size 320x222 [border: (2px outset #C0C0C0)] - LayoutFlexibleBox (anonymous) at (8,83) size 304x56 - LayoutBlockFlow {DIV} at (124,0) size 56x56 [bgcolor=#FFFFFFE6] -layer at (8,226) size 320x32 - LayoutFlexibleBox (relative positioned) {DIV} at (0,182) size 320x32 - LayoutBlockFlow {DIV} at (16,2) size 28x30 [color=#FFFFFF] - LayoutText {#text} at (0,7) size 28x16 - text run at (0,7) width 28: "0:00" - LayoutBlockFlow {DIV} at (48,2) size 36x30 [color=#FFFFFF] - LayoutText {#text} at (0,7) size 36x16 - text run at (0,7) width 36: "/ 0:06" - LayoutBlockFlow {DIV} at (84,32) size 162x0 - LayoutButton {INPUT} at (246,0) size 32x32 - LayoutButton {INPUT} at (278,0) size 32x32 -layer at (24,263) size 288x4 - LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF4D] -layer at (24,259) size 12x12 - LayoutBlockFlow (relative positioned) {DIV} at (0,-4) size 12x12 [bgcolor=#FFFFFF] -layer at (24,263) size 288x4 - LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 -layer at (24,263) size 0x4 - LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF] -layer at (24,263) size 288x4 - LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF8A]
diff --git a/third_party/WebKit/LayoutTests/platform/win7/media/controls-layout-direction-expected.png b/third_party/WebKit/LayoutTests/platform/win7/media/controls-layout-direction-expected.png index 9afac409..38e7b37 100644 --- a/third_party/WebKit/LayoutTests/platform/win7/media/controls-layout-direction-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win7/media/controls-layout-direction-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win7/media/controls-styling-expected.png b/third_party/WebKit/LayoutTests/platform/win7/media/controls-styling-expected.png index a97d0f7..6a0e4cf9 100644 --- a/third_party/WebKit/LayoutTests/platform/win7/media/controls-styling-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win7/media/controls-styling-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win7/media/controls-styling-expected.txt b/third_party/WebKit/LayoutTests/platform/win7/media/controls-styling-expected.txt deleted file mode 100644 index 6e3926b4..0000000 --- a/third_party/WebKit/LayoutTests/platform/win7/media/controls-styling-expected.txt +++ /dev/null
@@ -1,82 +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 (8,8) size 784x584 - LayoutBlockFlow {P} at (0,0) size 784x20 - LayoutText {#text} at (0,0) size 260x19 - text run at (0,0) width 260: "The look of the controls should not change." - LayoutBlockFlow {DIV} at (0,36) size 784x240 [color=#0000FF] - LayoutText {#text} at (0,0) size 0x0 - LayoutBlockFlow (anonymous) at (0,276) size 784x240 - LayoutText {#text} at (0,0) size 0x0 -layer at (18,44) size 320x240 - LayoutVideo {VIDEO} at (10,0) size 320x240 -layer at (8,284) size 320x240 - LayoutVideo {VIDEO} at (0,0) size 320x240 -layer at (18,44) size 320x240 - LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 [color=#000000] - LayoutBlockFlow {DIV} at (160,0) size 0x0 - LayoutFlexibleBox {DIV} at (0,0) size 320x240 -layer at (18,44) size 320x240 - LayoutFlexibleBox {DIV} at (0,0) size 320x240 - LayoutSlider {INPUT} at (0,214) size 320x26 [color=#C4C4C4] - LayoutFlexibleBox {DIV} at (16,5) size 288x4 -layer at (18,44) size 320x222 clip at (20,46) size 316x218 - LayoutButton (relative positioned) {INPUT} at (0,0) size 320x222 [border: (2px outset #C0C0C0)] - LayoutFlexibleBox (anonymous) at (8,83) size 304x56 - LayoutBlockFlow {DIV} at (124,0) size 56x56 [bgcolor=#FFFFFFE6] -layer at (18,226) size 320x32 - LayoutFlexibleBox (relative positioned) {DIV} at (0,182) size 320x32 - LayoutBlockFlow {DIV} at (16,2) size 28x30 [color=#FFFFFF] - LayoutText {#text} at (0,7) size 28x16 - text run at (0,7) width 28: "0:00" - LayoutBlockFlow {DIV} at (48,2) size 66x30 [color=#FFFFFF] - LayoutText {#text} at (0,7) size 66x16 - text run at (0,7) width 66: "/ 0:06" - LayoutBlockFlow {DIV} at (114,32) size 132x0 - LayoutButton {INPUT} at (246,0) size 32x32 - LayoutButton {INPUT} at (278,0) size 32x32 -layer at (34,263) size 288x4 - LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF4D] -layer at (34,259) size 12x12 - LayoutBlockFlow (relative positioned) {DIV} at (0,-4) size 12x12 [bgcolor=#FFFFFF] -layer at (34,263) size 288x4 - LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 -layer at (34,263) size 0x4 - LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF] -layer at (34,263) size 288x4 - LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF8A] -layer at (8,284) size 320x240 - LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 - LayoutFlexibleBox {DIV} at (0,0) size 320x240 -layer at (8,284) size 320x240 - LayoutFlexibleBox {DIV} at (0,0) size 320x240 - LayoutSlider {INPUT} at (0,214) size 320x26 [color=#C4C4C4] - LayoutFlexibleBox {DIV} at (16,5) size 288x4 -layer at (8,284) size 320x222 clip at (10,286) size 316x218 - LayoutButton (relative positioned) {INPUT} at (0,0) size 320x222 [border: (2px outset #C0C0C0)] - LayoutFlexibleBox (anonymous) at (8,83) size 304x56 - LayoutBlockFlow {DIV} at (124,0) size 56x56 [bgcolor=#FFFFFFE6] -layer at (8,466) size 320x32 - LayoutFlexibleBox (relative positioned) {DIV} at (0,182) size 320x32 - LayoutBlockFlow {DIV} at (16,2) size 28x30 [color=#FFFFFF] - LayoutText {#text} at (0,7) size 28x16 - text run at (0,7) width 28: "0:00" - LayoutBlockFlow {DIV} at (48,2) size 36x30 [color=#FFFFFF] - LayoutText {#text} at (0,7) size 36x16 - text run at (0,7) width 36: "/ 0:06" - LayoutBlockFlow {DIV} at (84,32) size 162x0 - LayoutButton {INPUT} at (246,0) size 32x32 - LayoutButton {INPUT} at (278,0) size 32x32 -layer at (24,503) size 288x4 - LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF4D] -layer at (24,499) size 12x12 - LayoutBlockFlow (relative positioned) {DIV} at (0,-4) size 12x12 [bgcolor=#FFFFFF] -layer at (24,503) size 288x4 - LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 -layer at (24,503) size 0x4 - LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF] -layer at (24,503) size 288x4 - LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF8A]
diff --git a/third_party/WebKit/LayoutTests/platform/win7/media/controls-styling-strict-expected.png b/third_party/WebKit/LayoutTests/platform/win7/media/controls-styling-strict-expected.png deleted file mode 100644 index f9afb933..0000000 --- a/third_party/WebKit/LayoutTests/platform/win7/media/controls-styling-strict-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win7/media/controls-styling-strict-expected.txt b/third_party/WebKit/LayoutTests/platform/win7/media/controls-styling-strict-expected.txt deleted file mode 100644 index ec4c98b3..0000000 --- a/third_party/WebKit/LayoutTests/platform/win7/media/controls-styling-strict-expected.txt +++ /dev/null
@@ -1,82 +0,0 @@ -layer at (0,0) size 800x600 - LayoutView at (0,0) size 800x600 -layer at (0,0) size 800x305 - LayoutBlockFlow {HTML} at (0,0) size 800x305 - LayoutBlockFlow {BODY} at (8,16) size 784x281 - LayoutBlockFlow {P} at (0,0) size 784x20 - LayoutText {#text} at (0,0) size 444x19 - text run at (0,0) width 444: "The look of the controls should not change when styled under strict mode." - LayoutBlockFlow (anonymous) at (0,36) size 784x245 - LayoutText {#text} at (320,225) size 4x19 - text run at (320,225) width 4: " " - LayoutText {#text} at (0,0) size 0x0 -layer at (8,52) size 320x240 - LayoutVideo {VIDEO} at (0,0) size 320x240 [color=#FF0000] -layer at (332,52) size 320x240 - LayoutVideo {VIDEO} at (324,0) size 320x240 -layer at (8,52) size 320x240 - LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 [color=#000000] - LayoutBlockFlow {DIV} at (160,0) size 0x0 - LayoutFlexibleBox {DIV} at (0,0) size 320x240 -layer at (8,52) size 320x240 - LayoutFlexibleBox {DIV} at (0,0) size 320x240 - LayoutSlider {INPUT} at (0,214) size 320x26 [color=#C4C4C4] - LayoutFlexibleBox {DIV} at (16,5) size 288x4 -layer at (8,52) size 320x222 clip at (10,54) size 316x218 - LayoutButton (relative positioned) {INPUT} at (0,0) size 320x222 [border: (2px outset #C0C0C0)] - LayoutFlexibleBox (anonymous) at (8,83) size 304x56 - LayoutBlockFlow {DIV} at (124,0) size 56x56 [bgcolor=#FFFFFFE6] -layer at (8,234) size 320x32 - LayoutFlexibleBox (relative positioned) {DIV} at (0,182) size 320x32 - LayoutBlockFlow {DIV} at (16,2) size 28x30 [color=#FFFFFF] - LayoutText {#text} at (0,7) size 28x16 - text run at (0,7) width 28: "0:00" - LayoutBlockFlow {DIV} at (48,2) size 36x30 [color=#FFFFFF] - LayoutText {#text} at (0,7) size 36x16 - text run at (0,7) width 36: "/ 0:06" - LayoutBlockFlow {DIV} at (84,32) size 162x0 - LayoutButton {INPUT} at (246,0) size 32x32 - LayoutButton {INPUT} at (278,0) size 32x32 -layer at (24,271) size 288x4 - LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF4D] -layer at (24,267) size 12x12 - LayoutBlockFlow (relative positioned) {DIV} at (0,-4) size 12x12 [bgcolor=#FFFFFF] -layer at (24,271) size 288x4 - LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 -layer at (24,271) size 0x4 - LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF] -layer at (24,271) size 288x4 - LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF8A] -layer at (332,52) size 320x240 - LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 - LayoutFlexibleBox {DIV} at (0,0) size 320x240 -layer at (332,52) size 320x240 - LayoutFlexibleBox {DIV} at (0,0) size 320x240 - LayoutSlider {INPUT} at (0,214) size 320x26 [color=#C4C4C4] - LayoutFlexibleBox {DIV} at (16,5) size 288x4 -layer at (332,52) size 320x222 clip at (334,54) size 316x218 - LayoutButton (relative positioned) {INPUT} at (0,0) size 320x222 [border: (2px outset #C0C0C0)] - LayoutFlexibleBox (anonymous) at (8,83) size 304x56 - LayoutBlockFlow {DIV} at (124,0) size 56x56 [bgcolor=#FFFFFFE6] -layer at (332,234) size 320x32 - LayoutFlexibleBox (relative positioned) {DIV} at (0,182) size 320x32 - LayoutBlockFlow {DIV} at (16,2) size 28x30 [color=#FFFFFF] - LayoutText {#text} at (0,7) size 28x16 - text run at (0,7) width 28: "0:00" - LayoutBlockFlow {DIV} at (48,2) size 36x30 [color=#FFFFFF] - LayoutText {#text} at (0,7) size 36x16 - text run at (0,7) width 36: "/ 0:06" - LayoutBlockFlow {DIV} at (84,32) size 162x0 - LayoutButton {INPUT} at (246,0) size 32x32 - LayoutButton {INPUT} at (278,0) size 32x32 -layer at (348,271) size 288x4 - LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF4D] -layer at (348,267) size 12x12 - LayoutBlockFlow (relative positioned) {DIV} at (0,-4) size 12x12 [bgcolor=#FFFFFF] -layer at (348,271) size 288x4 - LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 -layer at (348,271) size 0x4 - LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF] -layer at (348,271) size 288x4 - LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF8A]
diff --git a/third_party/WebKit/LayoutTests/platform/win7/media/controls-without-preload-expected.png b/third_party/WebKit/LayoutTests/platform/win7/media/controls-without-preload-expected.png deleted file mode 100644 index de8ef20..0000000 --- a/third_party/WebKit/LayoutTests/platform/win7/media/controls-without-preload-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win7/media/controls-without-preload-expected.txt b/third_party/WebKit/LayoutTests/platform/win7/media/controls-without-preload-expected.txt deleted file mode 100644 index 33684cf..0000000 --- a/third_party/WebKit/LayoutTests/platform/win7/media/controls-without-preload-expected.txt +++ /dev/null
@@ -1,45 +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 (8,8) size 784x584 - LayoutBlockFlow {P} at (0,0) size 784x20 - LayoutText {#text} at (0,0) size 298x19 - text run at (0,0) width 298: "The controls should not depend on preload value." - LayoutBlockFlow (anonymous) at (0,36) size 784x240 - LayoutText {#text} at (0,0) size 0x0 -layer at (8,44) size 320x240 - LayoutVideo {VIDEO} at (0,0) size 320x240 -layer at (8,44) size 320x240 - LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 - LayoutFlexibleBox {DIV} at (0,0) size 320x240 -layer at (8,44) size 320x240 - LayoutFlexibleBox {DIV} at (0,0) size 320x240 - LayoutSlider {INPUT} at (0,214) size 320x26 [color=#C4C4C4] - LayoutFlexibleBox {DIV} at (16,5) size 288x4 -layer at (8,44) size 320x222 clip at (10,46) size 316x218 - LayoutButton (relative positioned) {INPUT} at (0,0) size 320x222 [border: (2px outset #C0C0C0)] - LayoutFlexibleBox (anonymous) at (8,83) size 304x56 - LayoutBlockFlow {DIV} at (124,0) size 56x56 [bgcolor=#FFFFFFE6] -layer at (8,226) size 320x32 - LayoutFlexibleBox (relative positioned) {DIV} at (0,182) size 320x32 - LayoutBlockFlow {DIV} at (16,2) size 28x30 [color=#FFFFFF] - LayoutText {#text} at (0,7) size 28x16 - text run at (0,7) width 28: "0:00" - LayoutBlockFlow {DIV} at (48,2) size 36x30 [color=#FFFFFF] - LayoutText {#text} at (0,7) size 36x16 - text run at (0,7) width 36: "/ 0:06" - LayoutBlockFlow {DIV} at (84,32) size 162x0 - LayoutButton {INPUT} at (246,0) size 32x32 - LayoutButton {INPUT} at (278,0) size 32x32 -layer at (24,263) size 288x4 - LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF4D] -layer at (24,259) size 12x12 - LayoutBlockFlow (relative positioned) {DIV} at (0,-4) size 12x12 [bgcolor=#FFFFFF] -layer at (24,263) size 288x4 - LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 -layer at (24,263) size 0x4 - LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF] -layer at (24,263) size 288x4 - LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF8A]
diff --git a/third_party/WebKit/LayoutTests/platform/win7/media/media-controls-clone-expected.png b/third_party/WebKit/LayoutTests/platform/win7/media/media-controls-clone-expected.png index fe279d8..40d45ba 100644 --- a/third_party/WebKit/LayoutTests/platform/win7/media/media-controls-clone-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win7/media/media-controls-clone-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win7/media/media-controls-clone-expected.txt b/third_party/WebKit/LayoutTests/platform/win7/media/media-controls-clone-expected.txt deleted file mode 100644 index e47d2e81..0000000 --- a/third_party/WebKit/LayoutTests/platform/win7/media/media-controls-clone-expected.txt +++ /dev/null
@@ -1,91 +0,0 @@ -layer at (0,0) size 800x600 - LayoutView at (0,0) size 800x600 -layer at (0,0) size 800x326 - LayoutBlockFlow {HTML} at (0,0) size 800x326 - LayoutBlockFlow {BODY} at (8,8) size 784x310 - LayoutBlockFlow {DIV} at (0,0) size 784x155 - LayoutBlockFlow {DIV} at (0,155) size 784x155 -layer at (8,8) size 300x150 - LayoutVideo {VIDEO} at (0,0) size 300x150 -layer at (308,104) size 300x54 - LayoutMedia {AUDIO} at (300,96) size 300x54 -layer at (8,163) size 300x150 - LayoutVideo {VIDEO} at (0,0) size 300x150 -layer at (308,259) size 300x54 - LayoutMedia {AUDIO} at (300,96) size 300x54 -layer at (8,8) size 300x150 - LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 300x150 [bgcolor=#333333] - LayoutBlockFlow {DIV} at (150,0) size 0x0 - LayoutFlexibleBox {DIV} at (0,0) size 300x150 -layer at (8,8) size 300x150 - LayoutFlexibleBox {DIV} at (0,0) size 300x150 - LayoutSlider {INPUT} at (0,124) size 300x26 [color=#C4C4C4] - LayoutFlexibleBox {DIV} at (16,5) size 268x4 -layer at (8,100) size 300x32 - LayoutFlexibleBox (relative positioned) {DIV} at (0,92) size 300x32 - LayoutBlockFlow {DIV} at (16,32) size 242x0 -layer at (266,100) size 32x32 transparent - LayoutButton {INPUT} at (258,0) size 32x32 [color=#808080] -layer at (24,137) size 268x4 - LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 268x4 [bgcolor=#FFFFFF4D] -layer at (24,137) size 268x4 - LayoutBlockFlow (positioned) {DIV} at (0,0) size 268x4 -layer at (24,137) size 0x4 - LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF] -layer at (24,137) size 0x4 - LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF8A] -layer at (308,104) size 300x54 - LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 300x54 -layer at (308,104) size 300x54 - LayoutFlexibleBox {DIV} at (0,0) size 300x54 [bgcolor=#F1F3F4] -layer at (308,104) size 300x54 scrollHeight 55 - LayoutFlexibleBox {DIV} at (0,0) size 300x54 - LayoutSlider {INPUT} at (10,-1) size 248x56 [color=#C4C4C4] - LayoutFlexibleBox {DIV} at (16,26) size 216x4 - LayoutButton {INPUT} at (258,11) size 32x32 -layer at (334,129) size 216x4 - LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 216x4 [bgcolor=#00000033] -layer at (334,129) size 216x4 - LayoutBlockFlow (positioned) {DIV} at (0,0) size 216x4 -layer at (334,129) size 0x4 - LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#000000DE] -layer at (334,129) size 0x4 - LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#0000008A] -layer at (8,163) size 300x150 - LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 300x150 [bgcolor=#333333] - LayoutBlockFlow {DIV} at (150,0) size 0x0 - LayoutFlexibleBox {DIV} at (0,0) size 300x150 -layer at (8,163) size 300x150 - LayoutFlexibleBox {DIV} at (0,0) size 300x150 - LayoutSlider {INPUT} at (0,124) size 300x26 [color=#C4C4C4] - LayoutFlexibleBox {DIV} at (16,5) size 268x4 -layer at (8,255) size 300x32 - LayoutFlexibleBox (relative positioned) {DIV} at (0,92) size 300x32 - LayoutBlockFlow {DIV} at (16,32) size 242x0 -layer at (266,255) size 32x32 transparent - LayoutButton {INPUT} at (258,0) size 32x32 [color=#808080] -layer at (24,292) size 268x4 - LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 268x4 [bgcolor=#FFFFFF4D] -layer at (24,292) size 268x4 - LayoutBlockFlow (positioned) {DIV} at (0,0) size 268x4 -layer at (24,292) size 0x4 - LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF] -layer at (24,292) size 0x4 - LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF8A] -layer at (308,259) size 300x54 - LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 300x54 -layer at (308,259) size 300x54 - LayoutFlexibleBox {DIV} at (0,0) size 300x54 [bgcolor=#F1F3F4] -layer at (308,259) size 300x54 scrollHeight 55 - LayoutFlexibleBox {DIV} at (0,0) size 300x54 - LayoutSlider {INPUT} at (10,-1) size 248x56 [color=#C4C4C4] - LayoutFlexibleBox {DIV} at (16,26) size 216x4 - LayoutButton {INPUT} at (258,11) size 32x32 -layer at (334,284) size 216x4 - LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 216x4 [bgcolor=#00000033] -layer at (334,284) size 216x4 - LayoutBlockFlow (positioned) {DIV} at (0,0) size 216x4 -layer at (334,284) size 0x4 - LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#000000DE] -layer at (334,284) size 0x4 - LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#0000008A]
diff --git a/third_party/WebKit/LayoutTests/platform/win7/media/video-controls-rendering-expected.png b/third_party/WebKit/LayoutTests/platform/win7/media/video-controls-rendering-expected.png deleted file mode 100644 index 080d75f..0000000 --- a/third_party/WebKit/LayoutTests/platform/win7/media/video-controls-rendering-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win7/media/video-controls-rendering-expected.txt b/third_party/WebKit/LayoutTests/platform/win7/media/video-controls-rendering-expected.txt deleted file mode 100644 index b2a6b826..0000000 --- a/third_party/WebKit/LayoutTests/platform/win7/media/video-controls-rendering-expected.txt +++ /dev/null
@@ -1,118 +0,0 @@ -layer at (0,0) size 800x600 clip at (0,0) size 785x600 scrollHeight 764 - LayoutView at (0,0) size 800x600 -layer at (0,0) size 785x600 - LayoutBlockFlow {HTML} at (0,0) size 785x600 - LayoutBlockFlow {BODY} at (8,8) size 769x584 - LayoutBlockFlow {P} at (0,0) size 769x20 - LayoutText {#text} at (0,0) size 146x19 - text run at (0,0) width 146: "Test controls placement." - LayoutBlockFlow {DIV} at (0,36) size 769x240 - LayoutText {#text} at (0,0) size 0x0 - LayoutBlockFlow {DIV} at (0,276) size 769x240 - LayoutText {#text} at (0,0) size 0x0 - LayoutBlockFlow {DIV} at (0,516) size 769x0 -layer at (8,44) size 320x240 - LayoutVideo {VIDEO} at (0,0) size 320x240 -layer at (8,284) size 320x240 - LayoutVideo {VIDEO} at (0,0) size 320x240 -layer at (8,44) size 320x240 - LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 - LayoutFlexibleBox {DIV} at (0,0) size 320x240 -layer at (8,44) size 320x240 - LayoutFlexibleBox {DIV} at (0,0) size 320x240 - LayoutSlider {INPUT} at (0,214) size 320x26 [color=#C4C4C4] - LayoutFlexibleBox {DIV} at (16,5) size 288x4 -layer at (8,44) size 320x222 clip at (10,46) size 316x218 - LayoutButton (relative positioned) {INPUT} at (0,0) size 320x222 [border: (2px outset #C0C0C0)] - LayoutFlexibleBox (anonymous) at (8,83) size 304x56 - LayoutBlockFlow {DIV} at (124,0) size 56x56 [bgcolor=#FFFFFFE6] -layer at (8,226) size 320x32 - LayoutFlexibleBox (relative positioned) {DIV} at (0,182) size 320x32 - LayoutBlockFlow {DIV} at (16,2) size 28x30 [color=#FFFFFF] - LayoutText {#text} at (0,7) size 28x16 - text run at (0,7) width 28: "0:00" - LayoutBlockFlow {DIV} at (48,2) size 36x30 [color=#FFFFFF] - LayoutText {#text} at (0,7) size 36x16 - text run at (0,7) width 36: "/ 0:06" - LayoutBlockFlow {DIV} at (84,32) size 162x0 - LayoutButton {INPUT} at (246,0) size 32x32 - LayoutButton {INPUT} at (278,0) size 32x32 -layer at (24,263) size 288x4 - LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF4D] -layer at (24,259) size 12x12 - LayoutBlockFlow (relative positioned) {DIV} at (0,-4) size 12x12 [bgcolor=#FFFFFF] -layer at (24,263) size 288x4 - LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 -layer at (24,263) size 0x4 - LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF] -layer at (24,263) size 288x4 - LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF8A] -layer at (8,284) size 320x240 - LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 - LayoutFlexibleBox {DIV} at (0,0) size 320x240 -layer at (8,284) size 320x240 - LayoutFlexibleBox {DIV} at (0,0) size 320x240 - LayoutSlider {INPUT} at (0,214) size 320x26 [color=#C4C4C4] - LayoutFlexibleBox {DIV} at (16,5) size 288x4 -layer at (8,284) size 320x222 clip at (10,286) size 316x218 - LayoutButton (relative positioned) {INPUT} at (0,0) size 320x222 [border: (2px outset #C0C0C0)] - LayoutFlexibleBox (anonymous) at (8,83) size 304x56 - LayoutBlockFlow {DIV} at (124,0) size 56x56 [bgcolor=#FFFFFFE6] -layer at (8,466) size 320x32 - LayoutFlexibleBox (relative positioned) {DIV} at (0,182) size 320x32 - LayoutBlockFlow {DIV} at (16,2) size 28x30 [color=#FFFFFF] - LayoutText {#text} at (0,7) size 28x16 - text run at (0,7) width 28: "0:00" - LayoutBlockFlow {DIV} at (48,2) size 36x30 [color=#FFFFFF] - LayoutText {#text} at (0,7) size 36x16 - text run at (0,7) width 36: "/ 0:06" - LayoutBlockFlow {DIV} at (84,32) size 162x0 - LayoutButton {INPUT} at (246,0) size 32x32 - LayoutButton {INPUT} at (278,0) size 32x32 -layer at (24,503) size 288x4 - LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF4D] -layer at (24,499) size 12x12 - LayoutBlockFlow (relative positioned) {DIV} at (0,-4) size 12x12 [bgcolor=#FFFFFF] -layer at (24,503) size 288x4 - LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 -layer at (24,503) size 0x4 - LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF] -layer at (24,503) size 288x4 - LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF8A] -layer at (8,524) size 320x240 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 - LayoutVideo (positioned) {VIDEO} at (8,524) size 320x240 -layer at (8,524) size 320x240 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 - LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 - LayoutFlexibleBox {DIV} at (0,0) size 320x240 -layer at (8,524) size 320x240 backgroundClip at (8,524) size 320x76 clip at (8,524) size 320x76 - LayoutFlexibleBox {DIV} at (0,0) size 320x240 - LayoutSlider {INPUT} at (0,214) size 320x26 [color=#C4C4C4] - LayoutFlexibleBox {DIV} at (16,5) size 288x4 -layer at (8,524) size 320x222 backgroundClip at (8,524) size 320x76 clip at (10,526) size 316x74 - LayoutButton (relative positioned) {INPUT} at (0,0) size 320x222 [border: (2px outset #C0C0C0)] - LayoutFlexibleBox (anonymous) at (8,83) size 304x56 - LayoutBlockFlow {DIV} at (124,0) size 56x56 [bgcolor=#FFFFFFE6] -layer at (8,706) size 320x32 backgroundClip at (0,0) size 0x0 clip at (0,0) size 0x0 - LayoutFlexibleBox (relative positioned) {DIV} at (0,182) size 320x32 - LayoutBlockFlow {DIV} at (16,2) size 28x30 [color=#FFFFFF] - LayoutText {#text} at (0,7) size 28x16 - text run at (0,7) width 28: "0:00" - LayoutBlockFlow {DIV} at (48,2) size 36x30 [color=#FFFFFF] - LayoutText {#text} at (0,7) size 36x16 - text run at (0,7) width 36: "/ 0:06" - LayoutBlockFlow {DIV} at (84,32) size 162x0 - LayoutButton {INPUT} at (246,0) size 32x32 - LayoutButton {INPUT} at (278,0) size 32x32 -layer at (24,743) size 288x4 backgroundClip at (8,524) size 320x76 clip at (8,524) size 320x76 - LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF4D] -layer at (24,739) size 12x12 backgroundClip at (8,524) size 320x76 clip at (8,524) size 320x76 - LayoutBlockFlow (relative positioned) {DIV} at (0,-4) size 12x12 [bgcolor=#FFFFFF] -layer at (24,743) size 288x4 backgroundClip at (0,0) size 0x0 clip at (0,0) size 0x0 - LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 -layer at (24,743) size 0x4 - LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF] -layer at (24,743) size 288x4 backgroundClip at (0,0) size 0x0 clip at (0,0) size 0x0 - LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF8A]
diff --git a/third_party/WebKit/LayoutTests/platform/win7/media/video-display-toggle-expected.png b/third_party/WebKit/LayoutTests/platform/win7/media/video-display-toggle-expected.png deleted file mode 100644 index 39a4935..0000000 --- a/third_party/WebKit/LayoutTests/platform/win7/media/video-display-toggle-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win7/media/video-display-toggle-expected.txt b/third_party/WebKit/LayoutTests/platform/win7/media/video-display-toggle-expected.txt deleted file mode 100644 index bbed010..0000000 --- a/third_party/WebKit/LayoutTests/platform/win7/media/video-display-toggle-expected.txt +++ /dev/null
@@ -1,44 +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 (8,8) size 784x584 - LayoutText {#text} at (0,0) size 470x19 - text run at (0,0) width 470: "This tests that toggling the display property won't make the controls disappear." - LayoutBR {BR} at (470,15) size 0x0 - LayoutText {#text} at (0,0) size 0x0 -layer at (8,28) size 320x240 - LayoutVideo {VIDEO} at (0,20) size 320x240 -layer at (8,28) size 320x240 - LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 - LayoutFlexibleBox {DIV} at (0,0) size 320x240 -layer at (8,28) size 320x240 - LayoutFlexibleBox {DIV} at (0,0) size 320x240 - LayoutSlider {INPUT} at (0,214) size 320x26 [color=#C4C4C4] - LayoutFlexibleBox {DIV} at (16,5) size 288x4 -layer at (8,28) size 320x222 clip at (10,30) size 316x218 - LayoutButton (relative positioned) {INPUT} at (0,0) size 320x222 [border: (2px outset #C0C0C0)] - LayoutFlexibleBox (anonymous) at (8,83) size 304x56 - LayoutBlockFlow {DIV} at (124,0) size 56x56 [bgcolor=#FFFFFFE6] -layer at (8,210) size 320x32 - LayoutFlexibleBox (relative positioned) {DIV} at (0,182) size 320x32 - LayoutBlockFlow {DIV} at (16,2) size 28x30 [color=#FFFFFF] - LayoutText {#text} at (0,7) size 28x16 - text run at (0,7) width 28: "0:00" - LayoutBlockFlow {DIV} at (48,2) size 36x30 [color=#FFFFFF] - LayoutText {#text} at (0,7) size 36x16 - text run at (0,7) width 36: "/ 0:06" - LayoutBlockFlow {DIV} at (84,32) size 162x0 - LayoutButton {INPUT} at (246,0) size 32x32 - LayoutButton {INPUT} at (278,0) size 32x32 -layer at (24,247) size 288x4 - LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF4D] -layer at (24,243) size 12x12 - LayoutBlockFlow (relative positioned) {DIV} at (0,-4) size 12x12 [bgcolor=#FFFFFF] -layer at (24,247) size 288x4 - LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 -layer at (24,247) size 0x4 - LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF] -layer at (24,247) size 288x4 - LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF8A]
diff --git a/third_party/WebKit/LayoutTests/platform/win7/media/video-empty-source-expected.png b/third_party/WebKit/LayoutTests/platform/win7/media/video-empty-source-expected.png deleted file mode 100644 index 0f7a3ff..0000000 --- a/third_party/WebKit/LayoutTests/platform/win7/media/video-empty-source-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win7/media/video-empty-source-expected.txt b/third_party/WebKit/LayoutTests/platform/win7/media/video-empty-source-expected.txt deleted file mode 100644 index 41d68382..0000000 --- a/third_party/WebKit/LayoutTests/platform/win7/media/video-empty-source-expected.txt +++ /dev/null
@@ -1,45 +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 (8,8) size 784x584 - LayoutBlockFlow {P} at (0,0) size 784x20 - LayoutText {#text} at (0,0) size 408x19 - text run at (0,0) width 408: "Slider drawing with no source. The controls should render correctly." - LayoutBlockFlow (anonymous) at (0,36) size 784x152 - LayoutText {#text} at (0,0) size 0x0 -layer at (8,44) size 302x152 - LayoutVideo {VIDEO} at (0,0) size 302x152 [border: (1px solid #000000)] -layer at (9,45) size 300x150 - LayoutFlexibleBox (relative positioned) {DIV} at (1,1) size 300x150 [bgcolor=#333333] - LayoutBlockFlow {DIV} at (150,0) size 0x0 - LayoutFlexibleBox {DIV} at (0,0) size 300x150 -layer at (9,45) size 300x150 - LayoutFlexibleBox {DIV} at (0,0) size 300x150 - LayoutSlider {INPUT} at (0,124) size 300x26 [color=#C4C4C4] - LayoutFlexibleBox {DIV} at (16,5) size 268x4 -layer at (9,45) size 300x132 clip at (11,47) size 296x128 - LayoutButton (relative positioned) {INPUT} at (0,0) size 300x132 [border: (2px outset #C0C0C0)] - LayoutFlexibleBox (anonymous) at (8,38) size 284x56 -layer at (131,83) size 56x56 transparent - LayoutBlockFlow {DIV} at (114,0) size 56x56 [bgcolor=#FFFFFFE6] -layer at (9,137) size 300x32 - LayoutFlexibleBox (relative positioned) {DIV} at (0,92) size 300x32 - LayoutBlockFlow {DIV} at (16,2) size 28x30 [color=#FFFFFF] - LayoutText {#text} at (0,7) size 28x16 - text run at (0,7) width 28: "0:00" - LayoutBlockFlow {DIV} at (44,32) size 150x0 -layer at (203,137) size 32x32 transparent - LayoutButton {INPUT} at (194,0) size 32x32 [color=#808080] -layer at (235,137) size 32x32 transparent - LayoutButton {INPUT} at (226,0) size 32x32 [color=#808080] -layer at (267,137) size 32x32 transparent - LayoutButton {INPUT} at (258,0) size 32x32 [color=#808080] -layer at (25,174) size 268x4 - LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 268x4 [bgcolor=#FFFFFF4D] -layer at (25,174) size 268x4 - LayoutBlockFlow (positioned) {DIV} at (0,0) size 268x4 -layer at (25,174) size 0x4 - LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF] -layer at (25,174) size 0x4 - LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF8A]
diff --git a/third_party/WebKit/LayoutTests/platform/win7/virtual/video-surface-layer/media/video-zoom-controls-expected.png b/third_party/WebKit/LayoutTests/platform/win7/virtual/video-surface-layer/media/video-zoom-controls-expected.png new file mode 100644 index 0000000..3994c0d --- /dev/null +++ b/third_party/WebKit/LayoutTests/platform/win7/virtual/video-surface-layer/media/video-zoom-controls-expected.png Binary files differ
diff --git a/third_party/blink/public/BUILD.gn b/third_party/blink/public/BUILD.gn index a92f6c4..4b81a234 100644 --- a/third_party/blink/public/BUILD.gn +++ b/third_party/blink/public/BUILD.gn
@@ -213,7 +213,6 @@ "platform/web_audio_latency_hint.h", "platform/web_audio_source_provider.h", "platform/web_audio_source_provider_client.h", - "platform/web_blend_mode.h", "platform/web_blob_info.h", "platform/web_blob_registry.h", "platform/web_browser_controls_state.h",
diff --git a/third_party/blink/public/blink_resources.grd b/third_party/blink/public/blink_resources.grd index 9db01442b..9a5ed47 100644 --- a/third_party/blink/public/blink_resources.grd +++ b/third_party/blink/public/blink_resources.grd
@@ -47,6 +47,18 @@ <include name="IDR_LIST_PICKER_JS" file="../renderer/core/html/forms/resources/listPicker.js" type="BINDATA" compress="gzip"/> </if> <include name="IDR_AUDIO_SPATIALIZATION_COMPOSITE" file="../renderer/platform/audio/resources/Composite.flac" type="BINDATA"/> + + <!-- Layered API scripts. Should be consistent with kLayeredAPIResources + in renderer/core/script/layered_api.cc --> + <include name="IDR_LAYERED_API_ASYNC_LOCAL_STORAGE_INDEX_JS" file="../renderer/core/script/resources/layered_api/async-local-storage/index.js" type="BINDATA" skip_minify="true"/> + <include name="IDR_LAYERED_API_BLANK_INDEX_JS" file="../renderer/core/script/resources/layered_api/blank/index.js" type="BINDATA" skip_minify="true"/> + <include name="IDR_LAYERED_API_VIRTUAL_LIST_INDEX_JS" file="../renderer/core/script/resources/layered_api/virtual-list/index.js" type="BINDATA" skip_minify="true"/> + <include name="IDR_LAYERED_API_VIRTUAL_LIST_LAYOUTS_LAYOUT_1D_BASE_JS" file="../renderer/core/script/resources/layered_api/virtual-list/layouts/layout-1d-base.js" type="BINDATA" skip_minify="true"/> + <include name="IDR_LAYERED_API_VIRTUAL_LIST_LAYOUTS_LAYOUT_1D_GRID_JS" file="../renderer/core/script/resources/layered_api/virtual-list/layouts/layout-1d-grid.js" type="BINDATA" skip_minify="true"/> + <include name="IDR_LAYERED_API_VIRTUAL_LIST_LAYOUTS_LAYOUT_1D_JS" file="../renderer/core/script/resources/layered_api/virtual-list/layouts/layout-1d.js" type="BINDATA" skip_minify="true"/> + <include name="IDR_LAYERED_API_VIRTUAL_LIST_VIRTUAL_LIST_JS" file="../renderer/core/script/resources/layered_api/virtual-list/virtual-list.js" type="BINDATA" skip_minify="true"/> + <include name="IDR_LAYERED_API_VIRTUAL_LIST_VIRTUAL_REPEATER_JS" file="../renderer/core/script/resources/layered_api/virtual-list/virtual-repeater.js" type="BINDATA" skip_minify="true"/> + </includes> </release> </grit>
diff --git a/third_party/blink/public/platform/web_blend_mode.h b/third_party/blink/public/platform/web_blend_mode.h deleted file mode 100644 index 7fc022da..0000000 --- a/third_party/blink/public/platform/web_blend_mode.h +++ /dev/null
@@ -1,59 +0,0 @@ -/* - * Copyright (C) 2013 Google Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef THIRD_PARTY_BLINK_PUBLIC_PLATFORM_WEB_BLEND_MODE_H_ -#define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_WEB_BLEND_MODE_H_ - -#include "third_party/blink/public/platform/web_common.h" - -namespace blink { - -enum class WebBlendMode { - kNormal, - kMultiply, - kScreen, - kOverlay, - kDarken, - kLighten, - kColorDodge, - kColorBurn, - kHardLight, - kSoftLight, - kDifference, - kExclusion, - kHue, - kSaturation, - kColor, - kLuminosity -}; - -} // namespace blink - -#endif
diff --git a/third_party/blink/public/platform/web_display_item_list.h b/third_party/blink/public/platform/web_display_item_list.h index 647abd0..296cdde 100644 --- a/third_party/blink/public/platform/web_display_item_list.h +++ b/third_party/blink/public/platform/web_display_item_list.h
@@ -5,7 +5,6 @@ #ifndef THIRD_PARTY_BLINK_PUBLIC_PLATFORM_WEB_DISPLAY_ITEM_LIST_H_ #define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_WEB_DISPLAY_ITEM_LIST_H_ -#include "third_party/blink/public/platform/web_blend_mode.h" #include "third_party/blink/public/platform/web_vector.h" #include "cc/paint/paint_record.h"
diff --git a/third_party/blink/public/platform/web_layer.h b/third_party/blink/public/platform/web_layer.h index e7c5047..17f47821 100644 --- a/third_party/blink/public/platform/web_layer.h +++ b/third_party/blink/public/platform/web_layer.h
@@ -28,12 +28,12 @@ #include "cc/input/overscroll_behavior.h" #include "cc/layers/layer.h" -#include "third_party/blink/public/platform/web_blend_mode.h" #include "third_party/blink/public/platform/web_common.h" #include "third_party/blink/public/platform/web_rect.h" #include "third_party/blink/public/platform/web_string.h" #include "third_party/blink/public/platform/web_touch_info.h" #include "third_party/blink/public/platform/web_vector.h" +#include "third_party/skia/include/core/SkBlendMode.h" #include "third_party/skia/include/core/SkColor.h" namespace cc { @@ -98,8 +98,8 @@ // will be addressed once WebLayer is removed. virtual void SetContentsOpaqueIsFixed(bool) = 0; - virtual void SetBlendMode(WebBlendMode) = 0; - virtual WebBlendMode BlendMode() const = 0; + virtual void SetBlendMode(SkBlendMode) = 0; + virtual SkBlendMode BlendMode() const = 0; virtual void SetIsRootForIsolatedGroup(bool) = 0; virtual bool IsRootForIsolatedGroup() = 0;
diff --git a/third_party/blink/public/platform/web_runtime_features.h b/third_party/blink/public/platform/web_runtime_features.h index a7de682..fd67fee 100644 --- a/third_party/blink/public/platform/web_runtime_features.h +++ b/third_party/blink/public/platform/web_runtime_features.h
@@ -188,6 +188,8 @@ BLINK_PLATFORM_EXPORT static void EnableUnifiedTouchAdjustment(bool); BLINK_PLATFORM_EXPORT static void EnableMojoBlobURLs(bool); BLINK_PLATFORM_EXPORT static void EnableOffMainThreadWebSocket(bool); + BLINK_PLATFORM_EXPORT static void EnableExperimentalProductivityFeatures( + bool); private: WebRuntimeFeatures();
diff --git a/third_party/blink/public/web/web_ax_enums.h b/third_party/blink/public/web/web_ax_enums.h index 450625d..7e29081 100644 --- a/third_party/blink/public/web/web_ax_enums.h +++ b/third_party/blink/public/web/web_ax_enums.h
@@ -276,6 +276,16 @@ kWebAXAriaCurrentStateTime }; +enum WebAXHasPopup { + kWebAXHasPopupFalse = 0, + kWebAXHasPopupTrue, + kWebAXHasPopupMenu, + kWebAXHasPopupListbox, + kWebAXHasPopupTree, + kWebAXHasPopupGrid, + kWebAXHasPopupDialog +}; + // Only used by HTML form controls and any other element that has // an aria-invalid attribute specified. enum WebAXInvalidState {
diff --git a/third_party/blink/public/web/web_ax_object.h b/third_party/blink/public/web/web_ax_object.h index 9c1b9be..f306242d 100644 --- a/third_party/blink/public/web/web_ax_object.h +++ b/third_party/blink/public/web/web_ax_object.h
@@ -163,7 +163,7 @@ BLINK_EXPORT WebAXObject AriaActiveDescendant() const; BLINK_EXPORT WebString AriaAutoComplete() const; BLINK_EXPORT WebAXAriaCurrentState AriaCurrentState() const; - BLINK_EXPORT bool AriaHasPopup() const; + BLINK_EXPORT WebAXHasPopup HasPopup() const; BLINK_EXPORT bool IsEditableRoot() const; BLINK_EXPORT bool IsEditable() const; BLINK_EXPORT bool IsMultiline() const;
diff --git a/third_party/blink/renderer/build/scripts/core/css/properties/make_css_property_subclasses.py b/third_party/blink/renderer/build/scripts/core/css/properties/make_css_property_subclasses.py index 3b15755..dfc4a49 100755 --- a/third_party/blink/renderer/build/scripts/core/css/properties/make_css_property_subclasses.py +++ b/third_party/blink/renderer/build/scripts/core/css/properties/make_css_property_subclasses.py
@@ -126,7 +126,7 @@ property_['custom_apply_args'] = { 'layer_type': 'Background' if 'Background' in property_name else 'Mask', 'fill_type': fill_type, - 'fill_type_getter': 'Get' + fill_type if fill_type == "Image" else fill_type + 'fill_type_getter': 'Get' + fill_type if fill_type == "Image" or fill_type == "BlendMode" else fill_type } property_['should_implement_apply_functions'] = ( property_['is_property'] and
diff --git a/third_party/blink/renderer/core/BUILD.gn b/third_party/blink/renderer/core/BUILD.gn index 4a61cbf..6f64a9c 100644 --- a/third_party/blink/renderer/core/BUILD.gn +++ b/third_party/blink/renderer/core/BUILD.gn
@@ -2040,6 +2040,7 @@ "scheduler/throttling_test.cc", "scheduler/virtual_time_test.cc", "script/dynamic_module_resolver_test.cc", + "script/layered_api_test.cc", "script/mock_script_element_base.h", "script/modulator_test.cc", "script/module_map_test.cc",
diff --git a/third_party/blink/renderer/core/css/CSSProperties.json5 b/third_party/blink/renderer/core/css/CSSProperties.json5 index a118a0aa..41b62d049 100644 --- a/third_party/blink/renderer/core/css/CSSProperties.json5 +++ b/third_party/blink/renderer/core/css/CSSProperties.json5
@@ -2045,7 +2045,7 @@ property_methods: ["CSSValueFromComputedStyleInternal"], field_group: "*", field_template: "keyword", - include_paths: ["third_party/blink/public/platform/web_blend_mode.h"], + include_paths: ["third_party/blink/renderer/platform/graphics/graphics_types.h"], keywords: [ "normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", @@ -2054,7 +2054,7 @@ typedom_types: ["Keyword"], default_value: "normal", name_for_methods: "BlendMode", - type_name: "WebBlendMode", + type_name: "BlendMode", }, { name: "object-fit",
diff --git a/third_party/blink/renderer/core/css/css_primitive_value_mappings.h b/third_party/blink/renderer/core/css/css_primitive_value_mappings.h index 6a95549..144da32 100644 --- a/third_party/blink/renderer/core/css/css_primitive_value_mappings.h +++ b/third_party/blink/renderer/core/css/css_primitive_value_mappings.h
@@ -31,7 +31,6 @@ #ifndef THIRD_PARTY_BLINK_RENDERER_CORE_CSS_CSS_PRIMITIVE_VALUE_MAPPINGS_H_ #define THIRD_PARTY_BLINK_RENDERER_CORE_CSS_CSS_PRIMITIVE_VALUE_MAPPINGS_H_ -#include "third_party/blink/public/platform/web_blend_mode.h" #include "third_party/blink/renderer/core/css/css_calculation_value.h" #include "third_party/blink/renderer/core/css/css_identifier_value.h" #include "third_party/blink/renderer/core/css/css_primitive_value.h"
diff --git a/third_party/blink/renderer/core/css/cssom/css_transform_value.idl b/third_party/blink/renderer/core/css/cssom/css_transform_value.idl index 422db60a..d6b71ee 100644 --- a/third_party/blink/renderer/core/css/cssom/css_transform_value.idl +++ b/third_party/blink/renderer/core/css/cssom/css_transform_value.idl
@@ -14,5 +14,5 @@ [RaisesException] setter CSSTransformComponent (unsigned long index, CSSTransformComponent val); readonly attribute boolean is2D; - [RaisesException, RuntimeEnabled=GeometryInterfaces] DOMMatrix toMatrix(); + [RaisesException] DOMMatrix toMatrix(); };
diff --git a/third_party/blink/renderer/core/css/properties/longhands/background_blend_mode_custom.cc b/third_party/blink/renderer/core/css/properties/longhands/background_blend_mode_custom.cc index e2e29c7..4a89a5f 100644 --- a/third_party/blink/renderer/core/css/properties/longhands/background_blend_mode_custom.cc +++ b/third_party/blink/renderer/core/css/properties/longhands/background_blend_mode_custom.cc
@@ -27,7 +27,7 @@ CSSValueList* list = CSSValueList::CreateCommaSeparated(); for (const FillLayer* curr_layer = &style.BackgroundLayers(); curr_layer; curr_layer = curr_layer->Next()) - list->Append(*CSSIdentifierValue::Create(curr_layer->BlendMode())); + list->Append(*CSSIdentifierValue::Create(curr_layer->GetBlendMode())); return list; }
diff --git a/third_party/blink/renderer/core/css/properties/longhands/mix_blend_mode_custom.cc b/third_party/blink/renderer/core/css/properties/longhands/mix_blend_mode_custom.cc index 5e9bea43..e6453fd8 100644 --- a/third_party/blink/renderer/core/css/properties/longhands/mix_blend_mode_custom.cc +++ b/third_party/blink/renderer/core/css/properties/longhands/mix_blend_mode_custom.cc
@@ -13,7 +13,7 @@ const LayoutObject*, Node*, bool allow_visited_style) const { - return CSSIdentifierValue::Create(style.BlendMode()); + return CSSIdentifierValue::Create(style.GetBlendMode()); } } // namespace CSSLonghand
diff --git a/third_party/blink/renderer/core/css/resolver/css_to_style_map.cc b/third_party/blink/renderer/core/css/resolver/css_to_style_map.cc index 89f570d..90f7ecbe 100644 --- a/third_party/blink/renderer/core/css/resolver/css_to_style_map.cc +++ b/third_party/blink/renderer/core/css/resolver/css_to_style_map.cc
@@ -116,7 +116,7 @@ return; const CSSIdentifierValue& identifier_value = ToCSSIdentifierValue(value); - layer->SetBlendMode(identifier_value.ConvertTo<WebBlendMode>()); + layer->SetBlendMode(identifier_value.ConvertTo<BlendMode>()); } void CSSToStyleMap::MapFillOrigin(StyleResolverState&,
diff --git a/third_party/blink/renderer/core/editing/visible_units_line.cc b/third_party/blink/renderer/core/editing/visible_units_line.cc index 452859dd..bb5ea6e 100644 --- a/third_party/blink/renderer/core/editing/visible_units_line.cc +++ b/third_party/blink/renderer/core/editing/visible_units_line.cc
@@ -34,7 +34,6 @@ #include "third_party/blink/renderer/core/editing/editing_utilities.h" #include "third_party/blink/renderer/core/editing/inline_box_position.h" #include "third_party/blink/renderer/core/editing/ng_flat_tree_shorthands.h" -#include "third_party/blink/renderer/core/editing/rendered_position.h" #include "third_party/blink/renderer/core/editing/visible_position.h" #include "third_party/blink/renderer/core/layout/api/line_layout_block_flow.h" #include "third_party/blink/renderer/core/layout/line/inline_text_box.h" @@ -173,9 +172,8 @@ if (c.IsNull()) return PositionWithAffinityTemplate<Strategy>(); - const RootInlineBox* root_box = - RenderedPosition(c.GetPosition(), c.Affinity()).RootBox(); - if (!root_box) { + const InlineBox* inline_box = ComputeInlineBoxPosition(c).inline_box; + if (!inline_box) { // There are VisiblePositions at offset 0 in blocks without // RootInlineBoxes, like empty editable blocks and bordered blocks. PositionTemplate<Strategy> p = c.GetPosition(); @@ -187,7 +185,8 @@ return PositionWithAffinityTemplate<Strategy>(); } - const auto& node_and_box = Ordering::StartNodeAndBoxOf(*root_box); + const RootInlineBox& root_box = inline_box->Root(); + const auto& node_and_box = Ordering::StartNodeAndBoxOf(root_box); Node* const start_node = std::get<Node*>(node_and_box); InlineBox* const start_box = std::get<InlineBox*>(node_and_box); if (!start_node) @@ -430,9 +429,8 @@ if (c.IsNull()) return PositionWithAffinityTemplate<Strategy>(); - const RootInlineBox* root_box = - RenderedPosition(c.GetPosition(), c.Affinity()).RootBox(); - if (!root_box) { + const InlineBox* inline_box = ComputeInlineBoxPosition(c).inline_box; + if (!inline_box) { // There are VisiblePositions at offset 0 in blocks without // RootInlineBoxes, like empty editable blocks and bordered blocks. const PositionTemplate<Strategy> p = c.GetPosition(); @@ -443,7 +441,8 @@ return PositionWithAffinityTemplate<Strategy>(); } - const auto& node_and_box = Ordering::EndNodeAndBoxOf(*root_box); + const RootInlineBox& root_box = inline_box->Root(); + const auto& node_and_box = Ordering::EndNodeAndBoxOf(root_box); Node* const end_node = std::get<Node*>(node_and_box); InlineBox* const end_box = std::get<InlineBox*>(node_and_box); if (!end_node) @@ -725,10 +724,16 @@ Position position = PreviousRootInlineBoxCandidatePosition( node, visible_position, editable_type); if (position.IsNotNull()) { - RenderedPosition rendered_position((CreateVisiblePosition(position))); - root = rendered_position.RootBox(); - if (!root) - return CreateVisiblePosition(position); + const VisiblePosition candidate = CreateVisiblePosition(position); + const InlineBox* inline_box = + candidate.IsNotNull() ? ComputeInlineBoxPosition(candidate).inline_box + : nullptr; + if (!inline_box) { + // TODO(editing-dev): Investigate if this is correct for null + // |candidate|. + return candidate; + } + root = &inline_box->Root(); } } @@ -789,10 +794,16 @@ Position position = NextRootInlineBoxCandidatePosition( node, visible_position, editable_type); if (position.IsNotNull()) { - RenderedPosition rendered_position((CreateVisiblePosition(position))); - root = rendered_position.RootBox(); - if (!root) - return CreateVisiblePosition(position); + const VisiblePosition candidate = CreateVisiblePosition(position); + const InlineBox* inline_box = + candidate.IsNotNull() ? ComputeInlineBoxPosition(candidate).inline_box + : nullptr; + if (!inline_box) { + // TODO(editing-dev): Investigate if this is correct for null + // |candidate|. + return candidate; + } + root = &inline_box->Root(); } }
diff --git a/third_party/blink/renderer/core/geometry/dom_matrix.idl b/third_party/blink/renderer/core/geometry/dom_matrix.idl index 097e920..cbb7be8ac 100644 --- a/third_party/blink/renderer/core/geometry/dom_matrix.idl +++ b/third_party/blink/renderer/core/geometry/dom_matrix.idl
@@ -8,8 +8,7 @@ Constructor(optional (DOMString or sequence<unrestricted double>) init), RaisesException=Constructor, ConstructorCallWith=ExecutionContext, - Exposed=(Window,Worker), - RuntimeEnabled=GeometryInterfaces + Exposed=(Window,Worker) ] interface DOMMatrix : DOMMatrixReadOnly { [RaisesException, NewObject] static DOMMatrix fromMatrix(optional DOMMatrixInit other); [RaisesException, NewObject] static DOMMatrix fromFloat32Array(Float32Array array32);
diff --git a/third_party/blink/renderer/core/geometry/dom_matrix_read_only.idl b/third_party/blink/renderer/core/geometry/dom_matrix_read_only.idl index 5bf2e2a..6f392d4 100644 --- a/third_party/blink/renderer/core/geometry/dom_matrix_read_only.idl +++ b/third_party/blink/renderer/core/geometry/dom_matrix_read_only.idl
@@ -8,8 +8,7 @@ Constructor(optional (DOMString or sequence<unrestricted double>) init), RaisesException=Constructor, ConstructorCallWith=ExecutionContext, - Exposed=(Window,Worker), - RuntimeEnabled=GeometryInterfaces + Exposed=(Window,Worker) ] interface DOMMatrixReadOnly { [RaisesException, NewObject] static DOMMatrixReadOnly fromMatrix(optional DOMMatrixInit other); [RaisesException, NewObject] static DOMMatrixReadOnly fromFloat32Array(Float32Array array32);
diff --git a/third_party/blink/renderer/core/geometry/dom_point.idl b/third_party/blink/renderer/core/geometry/dom_point.idl index 63f084c..2f416d6 100644 --- a/third_party/blink/renderer/core/geometry/dom_point.idl +++ b/third_party/blink/renderer/core/geometry/dom_point.idl
@@ -7,8 +7,7 @@ [ Constructor(optional unrestricted double x = 0, optional unrestricted double y = 0, optional unrestricted double z = 0, optional unrestricted double w = 1), - Exposed=(Window,Worker), - RuntimeEnabled=GeometryInterfaces + Exposed=(Window,Worker) ] interface DOMPoint : DOMPointReadOnly { [NewObject] static DOMPoint fromPoint(optional DOMPointInit other); inherit attribute unrestricted double x;
diff --git a/third_party/blink/renderer/core/geometry/dom_point_read_only.idl b/third_party/blink/renderer/core/geometry/dom_point_read_only.idl index 3ac60c5..f9c19010 100644 --- a/third_party/blink/renderer/core/geometry/dom_point_read_only.idl +++ b/third_party/blink/renderer/core/geometry/dom_point_read_only.idl
@@ -7,8 +7,7 @@ [ Constructor(optional unrestricted double x = 0, optional unrestricted double y = 0, optional unrestricted double z = 0, optional unrestricted double w = 1), - Exposed=(Window,Worker), - RuntimeEnabled=GeometryInterfaces + Exposed=(Window,Worker) ] interface DOMPointReadOnly { [NewObject] static DOMPointReadOnly fromPoint(optional DOMPointInit other);
diff --git a/third_party/blink/renderer/core/geometry/dom_quad.idl b/third_party/blink/renderer/core/geometry/dom_quad.idl index 72f4b2f..bde705c6 100644 --- a/third_party/blink/renderer/core/geometry/dom_quad.idl +++ b/third_party/blink/renderer/core/geometry/dom_quad.idl
@@ -7,8 +7,7 @@ [ Constructor(optional DOMPointInit p1, optional DOMPointInit p2, optional DOMPointInit p3, optional DOMPointInit p4), - Exposed=(Window,Worker), - RuntimeEnabled=GeometryInterfaces + Exposed=(Window,Worker) ] interface DOMQuad { [NewObject] static DOMQuad fromRect(optional DOMRectInit other);
diff --git a/third_party/blink/renderer/core/geometry/dom_rect.idl b/third_party/blink/renderer/core/geometry/dom_rect.idl index 6fa18c68..72ad05b 100644 --- a/third_party/blink/renderer/core/geometry/dom_rect.idl +++ b/third_party/blink/renderer/core/geometry/dom_rect.idl
@@ -9,8 +9,7 @@ optional unrestricted double y = 0, optional unrestricted double width = 0, optional unrestricted double height = 0), - Exposed=(Window,Worker), - RuntimeEnabled=GeometryInterfaces + Exposed=(Window,Worker) ] interface DOMRect : DOMRectReadOnly { [NewObject] static DOMRect fromRect(optional DOMRectInit other);
diff --git a/third_party/blink/renderer/core/geometry/dom_rect_read_only.idl b/third_party/blink/renderer/core/geometry/dom_rect_read_only.idl index 05854af..e64c077c 100644 --- a/third_party/blink/renderer/core/geometry/dom_rect_read_only.idl +++ b/third_party/blink/renderer/core/geometry/dom_rect_read_only.idl
@@ -7,8 +7,7 @@ [ Constructor(optional unrestricted double x = 0, optional unrestricted double y = 0, optional unrestricted double width = 0, optional unrestricted double height = 0), - Exposed=(Window,Worker), - RuntimeEnabled=GeometryInterfaces + Exposed=(Window,Worker) ] interface DOMRectReadOnly { [NewObject] static DOMRectReadOnly fromRect(optional DOMRectInit other);
diff --git a/third_party/blink/renderer/core/html/canvas/canvas_rendering_context_host.h b/third_party/blink/renderer/core/html/canvas/canvas_rendering_context_host.h index 937aa9be..0d94c43 100644 --- a/third_party/blink/renderer/core/html/canvas/canvas_rendering_context_host.h +++ b/third_party/blink/renderer/core/html/canvas/canvas_rendering_context_host.h
@@ -63,9 +63,7 @@ bool IsPaintable() const; - virtual void RegisterContextToDispatch(CanvasRenderingContext*) { - NOTIMPLEMENTED(); - } + virtual void RegisterContextToDispatch(CanvasRenderingContext*) {} protected: virtual ~CanvasRenderingContextHost() {}
diff --git a/third_party/blink/renderer/core/html/forms/picker_indicator_element.cc b/third_party/blink/renderer/core/html/forms/picker_indicator_element.cc index 38bc9b09..e2c2d2f 100644 --- a/third_party/blink/renderer/core/html/forms/picker_indicator_element.cc +++ b/third_party/blink/renderer/core/html/forms/picker_indicator_element.cc
@@ -167,7 +167,7 @@ if (LayoutTestSupport::IsRunningLayoutTest()) return; setAttribute(tabindexAttr, "0"); - setAttribute(aria_haspopupAttr, "true"); + setAttribute(aria_haspopupAttr, "menu"); setAttribute(roleAttr, "button"); }
diff --git a/third_party/blink/renderer/core/inspector/DEPS b/third_party/blink/renderer/core/inspector/DEPS index 11ab397..5676a4a 100644 --- a/third_party/blink/renderer/core/inspector/DEPS +++ b/third_party/blink/renderer/core/inspector/DEPS
@@ -1,4 +1,5 @@ include_rules = [ + "+base/time/time_override.h", "+base/sampling_heap_profiler/sampling_heap_profiler.h", # for base::GetUniqueIdForProcess "+base/process/process_handle.h",
diff --git a/third_party/blink/renderer/core/inspector/browser_protocol.pdl b/third_party/blink/renderer/core/inspector/browser_protocol.pdl index f46f684..fac87e2 100644 --- a/third_party/blink/renderer/core/inspector/browser_protocol.pdl +++ b/third_party/blink/renderer/core/inspector/browser_protocol.pdl
@@ -124,7 +124,7 @@ relevant root autocomplete - haspopup + hasPopup level multiselectable orientation @@ -3461,6 +3461,7 @@ origin inspector subresource-filter + content-type other # HTTP response data.
diff --git a/third_party/blink/renderer/core/inspector/inspector_network_agent.cc b/third_party/blink/renderer/core/inspector/inspector_network_agent.cc index 0aa7125..db52559 100644 --- a/third_party/blink/renderer/core/inspector/inspector_network_agent.cc +++ b/third_party/blink/renderer/core/inspector/inspector_network_agent.cc
@@ -349,6 +349,9 @@ String BuildBlockedReason(ResourceRequestBlockedReason reason) { switch (reason) { + case ResourceRequestBlockedReason::kNone: + NOTREACHED(); + return protocol::Network::BlockedReasonEnum::Other; case ResourceRequestBlockedReason::kCSP: return protocol::Network::BlockedReasonEnum::Csp; case ResourceRequestBlockedReason::kMixedContent: @@ -359,13 +362,13 @@ return protocol::Network::BlockedReasonEnum::Inspector; case ResourceRequestBlockedReason::kSubresourceFilter: return protocol::Network::BlockedReasonEnum::SubresourceFilter; + case ResourceRequestBlockedReason::kContentType: + return protocol::Network::BlockedReasonEnum::ContentType; case ResourceRequestBlockedReason::kOther: return protocol::Network::BlockedReasonEnum::Other; - case ResourceRequestBlockedReason::kNone: - default: - NOTREACHED(); - return protocol::Network::BlockedReasonEnum::Other; } + NOTREACHED(); + return protocol::Network::BlockedReasonEnum::Other; } WebConnectionType ToWebConnectionType(const String& connection_type) {
diff --git a/third_party/blink/renderer/core/inspector/inspector_performance_agent.cc b/third_party/blink/renderer/core/inspector/inspector_performance_agent.cc index 32a631f93..d04403e 100644 --- a/third_party/blink/renderer/core/inspector/inspector_performance_agent.cc +++ b/third_party/blink/renderer/core/inspector/inspector_performance_agent.cc
@@ -4,6 +4,9 @@ #include "third_party/blink/renderer/core/inspector/inspector_performance_agent.h" +#include <utility> + +#include "base/time/time_override.h" #include "third_party/blink/public/platform/platform.h" #include "third_party/blink/renderer/core/frame/local_frame.h" #include "third_party/blink/renderer/core/inspector/inspected_frames.h" @@ -53,8 +56,10 @@ state_->setBoolean(kPerformanceAgentEnabled, true); instrumenting_agents_->addInspectorPerformanceAgent(this); Platform::Current()->CurrentThread()->AddTaskTimeObserver(this); - task_start_time_ = TimeTicks(); - script_start_time_ = TimeTicks(); + layout_start_ticks_ = TimeTicks(); + recalc_style_start_ticks_ = TimeTicks(); + task_start_ticks_ = TimeTicks(); + script_start_ticks_ = TimeTicks(); return Response::OK(); } @@ -90,8 +95,8 @@ std::unique_ptr<protocol::Array<protocol::Performance::Metric>> result = protocol::Array<protocol::Performance::Metric>::create(); - TimeTicks now = CurrentTimeTicks(); - AppendMetric(result.get(), "Timestamp", TimeTicksInSeconds(now)); + AppendMetric(result.get(), "Timestamp", + TimeTicksInSeconds(CurrentTimeTicks())); // Renderer instance counters. for (size_t i = 0; i < ARRAY_SIZE(kInstanceCounterNames); ++i) { @@ -101,6 +106,7 @@ } // Page performance metrics. + TimeTicks now = base::subtle::TimeTicksNowIgnoringOverride(); AppendMetric(result.get(), "LayoutCount", static_cast<double>(layout_count_)); AppendMetric(result.get(), "RecalcStyleCount", static_cast<double>(recalc_style_count_)); @@ -108,12 +114,12 @@ AppendMetric(result.get(), "RecalcStyleDuration", recalc_style_duration_.InSecondsF()); TimeDelta script_duration = script_duration_; - if (!script_start_time_.is_null()) - script_duration += now - script_start_time_; + if (!script_start_ticks_.is_null()) + script_duration += now - script_start_ticks_; AppendMetric(result.get(), "ScriptDuration", script_duration.InSecondsF()); TimeDelta task_duration = task_duration_; - if (!task_start_time_.is_null()) - task_duration += now - task_start_time_; + if (!task_start_ticks_.is_null()) + task_duration += now - task_start_ticks_; AppendMetric(result.get(), "TaskDuration", task_duration.InSecondsF()); v8::HeapStatistics heap_statistics; @@ -149,60 +155,67 @@ GetFrontend()->metrics(std::move(metrics), title); } -void InspectorPerformanceAgent::Will(const probe::CallFunction& probe) { +void InspectorPerformanceAgent::ScriptStarts() { if (!script_call_depth_++) - script_start_time_ = probe.CaptureStartTime(); + script_start_ticks_ = base::subtle::TimeTicksNowIgnoringOverride(); +} + +void InspectorPerformanceAgent::ScriptEnds() { + if (--script_call_depth_) + return; + script_duration_ += + base::subtle::TimeTicksNowIgnoringOverride() - script_start_ticks_; + script_start_ticks_ = TimeTicks(); +} + +void InspectorPerformanceAgent::Will(const probe::CallFunction& probe) { + ScriptStarts(); } void InspectorPerformanceAgent::Did(const probe::CallFunction& probe) { - if (--script_call_depth_) - return; - script_duration_ += probe.Duration(); - script_start_time_ = TimeTicks(); + ScriptEnds(); } void InspectorPerformanceAgent::Will(const probe::ExecuteScript& probe) { - if (!script_call_depth_++) - script_start_time_ = probe.CaptureStartTime(); + ScriptStarts(); } void InspectorPerformanceAgent::Did(const probe::ExecuteScript& probe) { - if (--script_call_depth_) - return; - script_duration_ += probe.Duration(); - script_start_time_ = TimeTicks(); + ScriptEnds(); } void InspectorPerformanceAgent::Will(const probe::RecalculateStyle& probe) { - probe.CaptureStartTime(); + recalc_style_start_ticks_ = base::subtle::TimeTicksNowIgnoringOverride(); } void InspectorPerformanceAgent::Did(const probe::RecalculateStyle& probe) { - recalc_style_duration_ += probe.Duration(); + recalc_style_duration_ += + base::subtle::TimeTicksNowIgnoringOverride() - recalc_style_start_ticks_; recalc_style_count_++; } void InspectorPerformanceAgent::Will(const probe::UpdateLayout& probe) { if (!layout_depth_++) - probe.CaptureStartTime(); + layout_start_ticks_ = base::subtle::TimeTicksNowIgnoringOverride(); } void InspectorPerformanceAgent::Did(const probe::UpdateLayout& probe) { if (--layout_depth_) return; - layout_duration_ += probe.Duration(); + layout_duration_ += + base::subtle::TimeTicksNowIgnoringOverride() - layout_start_ticks_; layout_count_++; } void InspectorPerformanceAgent::WillProcessTask(double start_time) { - task_start_time_ = TimeTicksFromSeconds(start_time); + task_start_ticks_ = TimeTicksFromSeconds(start_time); } void InspectorPerformanceAgent::DidProcessTask(double start_time, double end_time) { - if (task_start_time_ == TimeTicksFromSeconds(start_time)) + if (task_start_ticks_ == TimeTicksFromSeconds(start_time)) task_duration_ += TimeDelta::FromSeconds(end_time - start_time); - task_start_time_ = TimeTicks(); + task_start_ticks_ = TimeTicks(); } void InspectorPerformanceAgent::Trace(blink::Visitor* visitor) {
diff --git a/third_party/blink/renderer/core/inspector/inspector_performance_agent.h b/third_party/blink/renderer/core/inspector/inspector_performance_agent.h index 3d6cec93..210e7c2c 100644 --- a/third_party/blink/renderer/core/inspector/inspector_performance_agent.h +++ b/third_party/blink/renderer/core/inspector/inspector_performance_agent.h
@@ -5,6 +5,8 @@ #ifndef THIRD_PARTY_BLINK_RENDERER_CORE_INSPECTOR_INSPECTOR_PERFORMANCE_AGENT_H_ #define THIRD_PARTY_BLINK_RENDERER_CORE_INSPECTOR_INSPECTOR_PERFORMANCE_AGENT_H_ +#include <memory> + #include "base/macros.h" #include "third_party/blink/renderer/core/core_export.h" #include "third_party/blink/renderer/core/inspector/inspector_base_agent.h" @@ -59,16 +61,20 @@ void DidProcessTask(double start_time, double end_time) override; private: - InspectorPerformanceAgent(InspectedFrames*); + explicit InspectorPerformanceAgent(InspectedFrames*); + void ScriptStarts(); + void ScriptEnds(); Member<InspectedFrames> inspected_frames_; bool enabled_ = false; TimeDelta layout_duration_; + TimeTicks layout_start_ticks_; TimeDelta recalc_style_duration_; + TimeTicks recalc_style_start_ticks_; TimeDelta script_duration_; - TimeTicks script_start_time_; + TimeTicks script_start_ticks_; TimeDelta task_duration_; - TimeTicks task_start_time_; + TimeTicks task_start_ticks_; unsigned long long layout_count_ = 0; unsigned long long recalc_style_count_ = 0; int script_call_depth_ = 0;
diff --git a/third_party/blink/renderer/core/layout/layout_box.cc b/third_party/blink/renderer/core/layout/layout_box.cc index e151ac41..3dcc368 100644 --- a/third_party/blink/renderer/core/layout/layout_box.cc +++ b/third_party/blink/renderer/core/layout/layout_box.cc
@@ -879,7 +879,7 @@ const FillLayer* cur = current; current = current->Next(); if (rect_type == kBackgroundKnownOpaqueRect) { - if (cur->BlendMode() != WebBlendMode::kNormal || + if (cur->GetBlendMode() != BlendMode::kNormal || cur->Composite() != kCompositeSourceOver) continue;
diff --git a/third_party/blink/renderer/core/layout/layout_tree_as_text.cc b/third_party/blink/renderer/core/layout/layout_tree_as_text.cc index 893292f..6ba7a88 100644 --- a/third_party/blink/renderer/core/layout/layout_tree_as_text.cc +++ b/third_party/blink/renderer/core/layout/layout_tree_as_text.cc
@@ -669,8 +669,9 @@ if (layer.GetLayoutObject().Style()->HasBlendMode()) { ts << " blendMode: " - << CompositeOperatorName(kCompositeSourceOver, - layer.GetLayoutObject().Style()->BlendMode()); + << CompositeOperatorName( + kCompositeSourceOver, + layer.GetLayoutObject().Style()->GetBlendMode()); } if (behavior & kLayoutAsTextShowCompositedLayers) {
diff --git a/third_party/blink/renderer/core/loader/modulescript/document_module_script_fetcher.cc b/third_party/blink/renderer/core/loader/modulescript/document_module_script_fetcher.cc index ca59095..7c8215a 100644 --- a/third_party/blink/renderer/core/loader/modulescript/document_module_script_fetcher.cc +++ b/third_party/blink/renderer/core/loader/modulescript/document_module_script_fetcher.cc
@@ -7,9 +7,11 @@ #include "third_party/blink/renderer/core/execution_context/execution_context.h" #include "third_party/blink/renderer/core/inspector/console_message.h" #include "third_party/blink/renderer/core/loader/subresource_integrity_helper.h" +#include "third_party/blink/renderer/core/script/layered_api.h" #include "third_party/blink/renderer/platform/loader/cors/cors.h" #include "third_party/blink/renderer/platform/loader/fetch/fetch_utils.h" #include "third_party/blink/renderer/platform/network/mime/mime_type_registry.h" +#include "third_party/blink/renderer/platform/runtime_enabled_features.h" namespace blink { @@ -76,9 +78,42 @@ void DocumentModuleScriptFetcher::Fetch(FetchParameters& fetch_params, ModuleScriptFetcher::Client* client) { SetClient(client); + + if (FetchIfLayeredAPI(fetch_params)) + return; + ScriptResource::Fetch(fetch_params, fetcher_, this); } +bool DocumentModuleScriptFetcher::FetchIfLayeredAPI( + FetchParameters& fetch_params) { + if (!RuntimeEnabledFeatures::LayeredAPIEnabled()) + return false; + + KURL layered_api_url = blink::layered_api::GetInternalURL(fetch_params.Url()); + + if (layered_api_url.IsNull()) + return false; + + const String source_text = blink::layered_api::GetSourceText(layered_api_url); + + if (source_text.IsNull()) { + HeapVector<Member<ConsoleMessage>> error_messages; + error_messages.push_back(ConsoleMessage::CreateForRequest( + kJSMessageSource, kErrorMessageLevel, "Unexpected data error", + fetch_params.Url().GetString(), nullptr, 0)); + Finalize(base::nullopt, error_messages); + return true; + } + + ModuleScriptCreationParams params( + layered_api_url, source_text, + fetch_params.GetResourceRequest().GetFetchCredentialsMode(), + kSharableCrossOrigin); + Finalize(params, HeapVector<Member<ConsoleMessage>>()); + return true; +} + void DocumentModuleScriptFetcher::NotifyFinished(Resource* resource) { ClearResource();
diff --git a/third_party/blink/renderer/core/loader/modulescript/document_module_script_fetcher.h b/third_party/blink/renderer/core/loader/modulescript/document_module_script_fetcher.h index aefa503..0dd6136 100644 --- a/third_party/blink/renderer/core/loader/modulescript/document_module_script_fetcher.h +++ b/third_party/blink/renderer/core/loader/modulescript/document_module_script_fetcher.h
@@ -44,6 +44,9 @@ void Finalize(const base::Optional<ModuleScriptCreationParams>&, const HeapVector<Member<ConsoleMessage>>& error_messages); + // Returns true if loaded as Layered API. + bool FetchIfLayeredAPI(FetchParameters&); + Member<ResourceFetcher> fetcher_; };
diff --git a/third_party/blink/renderer/core/loader/modulescript/module_tree_linker.cc b/third_party/blink/renderer/core/loader/modulescript/module_tree_linker.cc index e1f2d31..2ef9b731c 100644 --- a/third_party/blink/renderer/core/loader/modulescript/module_tree_linker.cc +++ b/third_party/blink/renderer/core/loader/modulescript/module_tree_linker.cc
@@ -7,9 +7,11 @@ #include "third_party/blink/renderer/bindings/core/v8/script_module.h" #include "third_party/blink/renderer/core/loader/modulescript/module_script_fetch_request.h" #include "third_party/blink/renderer/core/loader/modulescript/module_tree_linker_registry.h" +#include "third_party/blink/renderer/core/script/layered_api.h" #include "third_party/blink/renderer/core/script/module_script.h" #include "third_party/blink/renderer/platform/bindings/v8_throw_exception.h" #include "third_party/blink/renderer/platform/loader/fetch/resource_loading_log.h" +#include "third_party/blink/renderer/platform/runtime_enabled_features.h" #include "third_party/blink/renderer/platform/wtf/vector.h" #include "v8/include/v8.h" @@ -128,15 +130,38 @@ } // https://html.spec.whatwg.org/multipage/webappapis.html#fetch-a-module-script-tree -void ModuleTreeLinker::FetchRoot(const KURL& url, +void ModuleTreeLinker::FetchRoot(const KURL& original_url, const ScriptFetchOptions& options) { #if DCHECK_IS_ON() - url_ = url; + original_url_ = original_url; root_is_inline_ = false; #endif AdvanceState(State::kFetchingSelf); + KURL url = original_url; + // <spec + // href="https://github.com/drufball/layered-apis/blob/master/spec.md#fetch-a-module-script-graph" + // step="1">Set url to the layered API fetching URL for url.</spec> + if (RuntimeEnabledFeatures::LayeredAPIEnabled()) + url = blink::layered_api::ResolveFetchingURL(url); + +#if DCHECK_IS_ON() + url_ = url; +#endif + + // <spec + // href="https://github.com/drufball/layered-apis/blob/master/spec.md#fetch-a-module-script-graph" + // step="2">If url is failure, asynchronously complete this algorithm with + // null.</spec> + if (!url.IsValid()) { + result_ = nullptr; + modulator_->TaskRunner()->PostTask( + FROM_HERE, WTF::Bind(&ModuleTreeLinker::AdvanceState, + WrapPersistent(this), State::kFinished)); + return; + } + // Step 1. Let visited set be << url >>. visited_set_.insert(url); @@ -154,7 +179,8 @@ // Top-level entry point for [FDaI] for an inline module script. DCHECK(module_script); #if DCHECK_IS_ON() - url_ = module_script->BaseURL(); + original_url_ = module_script->BaseURL(); + url_ = original_url_; root_is_inline_ = true; #endif @@ -487,6 +513,7 @@ #if DCHECK_IS_ON() std::ostream& operator<<(std::ostream& stream, const ModuleTreeLinker& linker) { stream << "ModuleTreeLinker[" << &linker + << ", original_url=" << linker.original_url_.GetString() << ", url=" << linker.url_.GetString() << ", inline=" << linker.root_is_inline_ << "]"; return stream;
diff --git a/third_party/blink/renderer/core/loader/modulescript/module_tree_linker.h b/third_party/blink/renderer/core/loader/modulescript/module_tree_linker.h index 741c10b..ee7d659130 100644 --- a/third_party/blink/renderer/core/loader/modulescript/module_tree_linker.h +++ b/third_party/blink/renderer/core/loader/modulescript/module_tree_linker.h
@@ -113,6 +113,7 @@ size_t num_incomplete_fetches_ = 0; #if DCHECK_IS_ON() + KURL original_url_; KURL url_; bool root_is_inline_;
diff --git a/third_party/blink/renderer/core/paint/box_painter_base.cc b/third_party/blink/renderer/core/paint/box_painter_base.cc index a008aef..f82eb09 100644 --- a/third_party/blink/renderer/core/paint/box_painter_base.cc +++ b/third_party/blink/renderer/core/paint/box_painter_base.cc
@@ -254,7 +254,7 @@ // geometry here and pass it down. // TODO(trchen): Need to check compositing mode as well. - if (current_layer->BlendMode() != WebBlendMode::kNormal) + if (current_layer->GetBlendMode() != BlendMode::kNormal) is_non_associative = true; // TODO(trchen): A fill layer cannot paint if the calculated tile size is @@ -557,8 +557,8 @@ context.SetColorFilter(kColorFilterLuminanceToAlpha); // If op != SkBlendMode::kSrcOver, a mask is being painted. - SkBlendMode bg_op = WebCoreCompositeToSkiaComposite(bg_layer.Composite(), - bg_layer.BlendMode()); + SkBlendMode bg_op = WebCoreCompositeToSkiaComposite( + bg_layer.Composite(), bg_layer.GetBlendMode()); composite_op = (op == SkBlendMode::kSrcOver) ? bg_op : op; }
diff --git a/third_party/blink/renderer/core/paint/compositing/composited_layer_mapping.cc b/third_party/blink/renderer/core/paint/compositing/composited_layer_mapping.cc index f0a0711..ef65db7 100644 --- a/third_party/blink/renderer/core/paint/compositing/composited_layer_mapping.cc +++ b/third_party/blink/renderer/core/paint/compositing/composited_layer_mapping.cc
@@ -388,7 +388,7 @@ } void CompositedLayerMapping::UpdateLayerBlendMode(const ComputedStyle& style) { - SetBlendMode(style.BlendMode()); + SetBlendMode(style.GetBlendMode()); } void CompositedLayerMapping::UpdateIsRootForIsolatedGroup() { @@ -3041,10 +3041,10 @@ return graphics_layer_.get(); } -void CompositedLayerMapping::SetBlendMode(WebBlendMode blend_mode) { +void CompositedLayerMapping::SetBlendMode(BlendMode blend_mode) { if (ancestor_clipping_layer_) { ancestor_clipping_layer_->SetBlendMode(blend_mode); - graphics_layer_->SetBlendMode(WebBlendMode::kNormal); + graphics_layer_->SetBlendMode(BlendMode::kNormal); } else { graphics_layer_->SetBlendMode(blend_mode); }
diff --git a/third_party/blink/renderer/core/paint/compositing/composited_layer_mapping.h b/third_party/blink/renderer/core/paint/compositing/composited_layer_mapping.h index 214ed2bd..5c27284 100644 --- a/third_party/blink/renderer/core/paint/compositing/composited_layer_mapping.h +++ b/third_party/blink/renderer/core/paint/compositing/composited_layer_mapping.h
@@ -35,6 +35,7 @@ #include "third_party/blink/renderer/platform/geometry/float_point_3d.h" #include "third_party/blink/renderer/platform/graphics/graphics_layer.h" #include "third_party/blink/renderer/platform/graphics/graphics_layer_client.h" +#include "third_party/blink/renderer/platform/graphics/graphics_types.h" #include "third_party/blink/renderer/platform/wtf/allocator.h" namespace blink { @@ -263,7 +264,7 @@ void UpdateFilters(); void UpdateBackdropFilters(); - void SetBlendMode(WebBlendMode); + void SetBlendMode(BlendMode); bool NeedsGraphicsLayerUpdate() { return pending_update_scope_ > kGraphicsLayerUpdateNone;
diff --git a/third_party/blink/renderer/core/paint/paint_layer_painter.cc b/third_party/blink/renderer/core/paint/paint_layer_painter.cc index 9c419064..e605eb5 100644 --- a/third_party/blink/renderer/core/paint/paint_layer_painter.cc +++ b/third_party/blink/renderer/core/paint/paint_layer_painter.cc
@@ -463,7 +463,7 @@ context, paint_layer_.GetLayoutObject(), WebCoreCompositeToSkiaComposite( kCompositeSourceOver, - paint_layer_.GetLayoutObject().Style()->BlendMode()), + paint_layer_.GetLayoutObject().Style()->GetBlendMode()), paint_layer_.GetLayoutObject().Opacity(), &compositing_bounds); }
diff --git a/third_party/blink/renderer/core/paint/paint_property_tree_builder.cc b/third_party/blink/renderer/core/paint/paint_property_tree_builder.cc index 38f2e6e..08e498ba 100644 --- a/third_party/blink/renderer/core/paint/paint_property_tree_builder.cc +++ b/third_party/blink/renderer/core/paint/paint_property_tree_builder.cc
@@ -751,7 +751,7 @@ SkBlendMode blend_mode = object.IsBlendingAllowed() ? WebCoreCompositeToSkiaComposite( - kCompositeSourceOver, style.BlendMode()) + kCompositeSourceOver, style.GetBlendMode()) : SkBlendMode::kSrcOver; if (blend_mode != SkBlendMode::kSrcOver) return true; @@ -836,8 +836,8 @@ state.output_clip = output_clip; state.opacity = style.Opacity(); if (object_.IsBlendingAllowed()) { - state.blend_mode = WebCoreCompositeToSkiaComposite(kCompositeSourceOver, - style.BlendMode()); + state.blend_mode = WebCoreCompositeToSkiaComposite( + kCompositeSourceOver, style.GetBlendMode()); } if (RuntimeEnabledFeatures::SlimmingPaintV2Enabled() || RuntimeEnabledFeatures::BlinkGenPropertyTreesEnabled()) { @@ -1963,10 +1963,14 @@ context_.fragments[0].logical_top_in_flow_thread = LayoutUnit(); } - if (object_.IsColumnSpanAll()) { - // Column-span:all skips pagination container in the tree hierarchy, so - // it should also skip any fragment clip created by the skipped pagination - // container. + // Column-span:all skips pagination container in the tree hierarchy, so it + // should also skip any fragment clip created by the skipped pagination + // container. We also need to skip fragment clip if the object is a paint + // invalidation container which doesn't allow fragmentation. + if (object_.IsColumnSpanAll() || + (!RuntimeEnabledFeatures::SlimmingPaintV2Enabled() && + object_.IsPaintInvalidationContainer() && + ToLayoutBoxModelObject(object_).Layer()->EnclosingPaginationLayer())) { if (const auto* pagination_layer_in_tree_hierarchy = object_.Parent()->EnclosingLayer()->EnclosingPaginationLayer()) { const auto* properties = @@ -1985,8 +1989,6 @@ if (RuntimeEnabledFeatures::SlimmingPaintV2Enabled()) return; - // TODO(crbug.com/797779): Implement fragments across frame boundaries. - const auto* enclosing_pagination_layer = context_.painting_layer->EnclosingPaginationLayer(); if (!enclosing_pagination_layer)
diff --git a/third_party/blink/renderer/core/paint/paint_property_tree_builder_test.cc b/third_party/blink/renderer/core/paint/paint_property_tree_builder_test.cc index 7e20d4ec..e740c19f 100644 --- a/third_party/blink/renderer/core/paint/paint_property_tree_builder_test.cc +++ b/third_party/blink/renderer/core/paint/paint_property_tree_builder_test.cc
@@ -5506,7 +5506,8 @@ // context when the clipping element didn't need paint property update. SetBodyInnerHTML(R"HTML( <div style="clip-path:circle();"> - <div id="child" style="position:relative; width:100px; height:100px; background:green;"></div> + <div id="child" style="position:relative; width:100px; height:100px; + background:green;"></div> </div> )HTML"); @@ -5522,4 +5523,43 @@ EXPECT_EQ(old_clip_state, new_clip_state); } +TEST_P(PaintPropertyTreeBuilderTest, CompositedLayerSkipsFragmentClip) { + if (RuntimeEnabledFeatures::SlimmingPaintV2Enabled()) + return; + + SetBodyInnerHTML(R"HTML( + <div id="columns" style="columns: 2"> + <div id="composited-with-clip" + style="height: 100px; will-change: transform; overflow: hidden"> + <div id="child-clipped" style="height: 120px; position: relative"></div> + </div> + <div id="composited-without-clip" + style="height: 100px; will-change: transform"> + <div id="child-unclipped" style="height: 100%; position: relative"> + </div> + </div> + </div> + )HTML"); + + const auto* composited_with_clip_properties = + PaintPropertiesForElement("composited-with-clip"); + EXPECT_EQ(FrameContentClip(), + composited_with_clip_properties->OverflowClip()->Parent()); + EXPECT_EQ(composited_with_clip_properties->OverflowClip(), + GetLayoutObjectByElementId("child-clipped") + ->FirstFragment() + .LocalBorderBoxProperties() + .Clip()); + + EXPECT_EQ(FrameContentClip(), + GetLayoutObjectByElementId("composited-without-clip") + ->FirstFragment() + .LocalBorderBoxProperties() + .Clip()); + EXPECT_EQ(FrameContentClip(), GetLayoutObjectByElementId("child-unclipped") + ->FirstFragment() + .LocalBorderBoxProperties() + .Clip()); +} + } // namespace blink
diff --git a/third_party/blink/renderer/core/paint/svg_paint_context.cc b/third_party/blink/renderer/core/paint/svg_paint_context.cc index d91fd6b..f3c56a6 100644 --- a/third_party/blink/renderer/core/paint/svg_paint_context.cc +++ b/third_party/blink/renderer/core/paint/svg_paint_context.cc
@@ -146,10 +146,10 @@ const ComputedStyle& style = object_.StyleRef(); float opacity = style.Opacity(); - WebBlendMode blend_mode = style.HasBlendMode() && object_.IsBlendingAllowed() - ? style.BlendMode() - : WebBlendMode::kNormal; - if (opacity < 1 || blend_mode != WebBlendMode::kNormal) { + BlendMode blend_mode = style.HasBlendMode() && object_.IsBlendingAllowed() + ? style.GetBlendMode() + : BlendMode::kNormal; + if (opacity < 1 || blend_mode != BlendMode::kNormal) { const FloatRect compositing_bounds = object_.VisualRectInLocalSVGCoordinates(); compositing_recorder_ = std::make_unique<CompositingRecorder>(
diff --git a/third_party/blink/renderer/core/script/BUILD.gn b/third_party/blink/renderer/core/script/BUILD.gn index adc2c9c1..483efa84 100644 --- a/third_party/blink/renderer/core/script/BUILD.gn +++ b/third_party/blink/renderer/core/script/BUILD.gn
@@ -22,6 +22,8 @@ "html_parser_script_runner.h", "html_parser_script_runner_host.h", "ignore_destructive_write_count_incrementer.h", + "layered_api.cc", + "layered_api.h", "modulator.cc", "modulator.h", "modulator_impl_base.cc", @@ -54,5 +56,9 @@ "xml_parser_script_runner_host.h", ] + deps = [ + "//third_party/blink/public:resources", + ] + jumbo_excluded_sources = [ "modulator.cc" ] # https://crbug.com/716395 }
diff --git a/third_party/blink/renderer/core/script/layered_api.cc b/third_party/blink/renderer/core/script/layered_api.cc new file mode 100644 index 0000000..b6796248 --- /dev/null +++ b/third_party/blink/renderer/core/script/layered_api.cc
@@ -0,0 +1,141 @@ +// Copyright 2018 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 "third_party/blink/renderer/core/script/layered_api.h" + +#include "base/stl_util.h" +#include "third_party/blink/public/resources/grit/blink_resources.h" +#include "third_party/blink/renderer/platform/media/resource_bundle_helper.h" +#include "third_party/blink/renderer/platform/wtf/text/string_builder.h" + +namespace blink { + +namespace layered_api { + +namespace { + +static const char kStdScheme[] = "std"; +static const char kInternalScheme[] = "std-internal"; + +struct LayeredAPIResource { + const char* path; + int resource_id; +}; + +const LayeredAPIResource kLayeredAPIResources[] = { + {"blank/index.js", IDR_LAYERED_API_BLANK_INDEX_JS}, + + {"async-local-storage/index.js", + IDR_LAYERED_API_ASYNC_LOCAL_STORAGE_INDEX_JS}, + + {"virtual-list/index.js", IDR_LAYERED_API_VIRTUAL_LIST_INDEX_JS}, + {"virtual-list/layouts/layout-1d-base.js", + IDR_LAYERED_API_VIRTUAL_LIST_LAYOUTS_LAYOUT_1D_BASE_JS}, + {"virtual-list/layouts/layout-1d-grid.js", + IDR_LAYERED_API_VIRTUAL_LIST_LAYOUTS_LAYOUT_1D_GRID_JS}, + {"virtual-list/layouts/layout-1d.js", + IDR_LAYERED_API_VIRTUAL_LIST_LAYOUTS_LAYOUT_1D_JS}, + {"virtual-list/virtual-list.js", + IDR_LAYERED_API_VIRTUAL_LIST_VIRTUAL_LIST_JS}, + {"virtual-list/virtual-repeater.js", + IDR_LAYERED_API_VIRTUAL_LIST_VIRTUAL_REPEATER_JS}, +}; + +int GetResourceIDFromPath(const String& path) { + for (size_t i = 0; i < base::size(kLayeredAPIResources); ++i) { + if (path == kLayeredAPIResources[i].path) { + return kLayeredAPIResources[i].resource_id; + } + } + return -1; +} + +bool IsImplemented(const String& name) { + return GetResourceIDFromPath(name + "/index.js") >= 0; +} + +} // namespace + +// https://github.com/drufball/layered-apis/blob/master/spec.md#user-content-layered-api-fetching-url +KURL ResolveFetchingURL(const KURL& url) { + // <spec step="1">If url's scheme is not "std", return url.</spec> + if (!url.ProtocolIs(kStdScheme)) + return url; + + // <spec step="2">Let path be url's path[0].</spec> + const String path = url.GetPath(); + + // <spec step="3">Let identifier be the portion of path before the first + // U+007C (|), or all of path if no U+007C is present.</spec> + // + // <spec step="4">Let fallback be the portion of path after the first U+007C, + // or null if no U+007C is present.</spec> + String identifier; + String fallback; + const size_t separator_position = path.find('|'); + if (separator_position != WTF::kNotFound) { + identifier = path.Substring(0, separator_position); + fallback = path.Substring(separator_position + 1); + } else { + identifier = path; + } + + // <spec step="5">If the layered API identified by path is implemented by this + // user agent, return the result of parsing the concatenation of "std:" with + // identifier.</spec> + if (IsImplemented(identifier)) { + StringBuilder url_string; + url_string.Append(kStdScheme); + url_string.Append(":"); + url_string.Append(identifier); + return KURL(NullURL(), url_string.ToString()); + } + + // <spec step="6">If fallback is null, return failure.</spec> + if (fallback.IsNull()) + return NullURL(); + + // <spec step="7">Return the result of parsing fallback.</spec> + return KURL(NullURL(), fallback); +} + +KURL GetInternalURL(const KURL& url) { + if (url.ProtocolIs(kStdScheme)) { + StringBuilder url_string; + url_string.Append(kInternalScheme); + url_string.Append("://"); + url_string.Append(url.GetPath()); + url_string.Append("/index.js"); + return KURL(NullURL(), url_string.ToString()); + } + + if (url.ProtocolIs(kInternalScheme)) { + return url; + } + + return NullURL(); +} + +String GetSourceText(const KURL& url) { + if (!url.ProtocolIs(kInternalScheme)) + return String(); + + String path = url.GetPath(); + // According to the URL spec, the host/path of "std-internal://foo/bar" + // is "foo" and "/bar", respectively, but in Blink they are "" and + // "//foo/bar". This is a workaround to get "foo/bar" here. + if (path.StartsWith("//")) { + path = path.Substring(2); + } + + int resource_id = GetResourceIDFromPath(path); + if (resource_id < 0) + return String(); + + return ResourceBundleHelper::GetResourceAsString(resource_id); +} + +} // namespace layered_api + +} // namespace blink
diff --git a/third_party/blink/renderer/core/script/layered_api.h b/third_party/blink/renderer/core/script/layered_api.h new file mode 100644 index 0000000..f9d3599 --- /dev/null +++ b/third_party/blink/renderer/core/script/layered_api.h
@@ -0,0 +1,37 @@ +// Copyright 2018 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 THIRD_PARTY_BLINK_RENDERER_CORE_SCRIPT_LAYERED_API_H_ +#define THIRD_PARTY_BLINK_RENDERER_CORE_SCRIPT_LAYERED_API_H_ + +#include "third_party/blink/renderer/core/core_export.h" +#include "third_party/blink/renderer/platform/weborigin/kurl.h" +#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h" + +namespace blink { + +// Implements Layered API. +// Spec: https://github.com/drufball/layered-apis/blob/master/spec.md +// Implementation Design Doc: +// https://docs.google.com/document/d/1V-WaCZQbBcQJRSYSYBb8Y6p0DOdDpiNDSmD41ui_73s/edit +namespace layered_api { + +// <spec +// href="https://github.com/drufball/layered-apis/blob/master/spec.md#user-content-layered-api-fetching-url"> +// This operation maps URLs of the form std:x|y to either std:x or y +// URLs.</spec> +CORE_EXPORT KURL ResolveFetchingURL(const KURL&); + +// Returns std-internal://x/index.js if the URL is Layered API, or null URL +// otherwise (not specced). +CORE_EXPORT KURL GetInternalURL(const KURL&); + +// Gets source text for std-internal://x/index.js. +CORE_EXPORT String GetSourceText(const KURL&); + +} // namespace layered_api + +} // namespace blink + +#endif
diff --git a/third_party/blink/renderer/core/script/layered_api_test.cc b/third_party/blink/renderer/core/script/layered_api_test.cc new file mode 100644 index 0000000..0f056fc --- /dev/null +++ b/third_party/blink/renderer/core/script/layered_api_test.cc
@@ -0,0 +1,66 @@ +// Copyright 2018 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 "third_party/blink/renderer/core/script/layered_api.h" + +#include "testing/gtest/include/gtest/gtest.h" + +namespace blink { + +namespace layered_api { + +namespace { + +TEST(LayeredAPITest, ResolveFetchingURL) { + EXPECT_EQ(ResolveFetchingURL(KURL("https://example.com/")), + KURL("https://example.com/")); + EXPECT_EQ(ResolveFetchingURL(KURL("std:blank")), KURL("std:blank")); + EXPECT_EQ(ResolveFetchingURL(KURL("std:blank|https://fallback.example.com/")), + KURL("std:blank")); + EXPECT_EQ(ResolveFetchingURL(KURL("std:blank|https://:invalid-url")), + KURL("std:blank")); + EXPECT_EQ(ResolveFetchingURL(KURL("std:none")), NullURL()); + EXPECT_EQ(ResolveFetchingURL(KURL("std:none|https://fallback.example.com/")), + KURL("https://fallback.example.com/")); + EXPECT_FALSE( + ResolveFetchingURL(KURL("std:none|https://:invalid-url")).IsValid()); +} + +TEST(LayeredAPITest, GetInternalURL) { + EXPECT_EQ(GetInternalURL(KURL("https://example.com/")), NullURL()); + + EXPECT_EQ(GetInternalURL(KURL("std:blank")), + KURL("std-internal://blank/index.js")); + + EXPECT_EQ(GetInternalURL(KURL("std-internal://blank/index.js")), + KURL("std-internal://blank/index.js")); + EXPECT_EQ(GetInternalURL(KURL("std-internal://blank/foo/bar.js")), + KURL("std-internal://blank/foo/bar.js")); +} + +TEST(LayeredAPITest, InternalURLRelativeResolution) { + EXPECT_EQ(KURL(KURL("std-internal://blank/index.js"), "./sub.js"), + KURL("std-internal://blank/sub.js")); + EXPECT_EQ(KURL(KURL("std-internal://blank/index.js"), "/sub.js"), + KURL("std-internal://blank/sub.js")); + EXPECT_EQ(KURL(KURL("std-internal://blank/index.js"), "./foo/bar.js"), + KURL("std-internal://blank/foo/bar.js")); + EXPECT_EQ(KURL(KURL("std-internal://blank/foo/bar.js"), "../baz.js"), + KURL("std-internal://blank/baz.js")); +} + +TEST(LayeredAPITest, GetSourceText) { + EXPECT_EQ(GetSourceText(KURL("std-internal://blank/index.js")), String("")); + + EXPECT_EQ(GetSourceText(KURL("std-internal://blank/not-found.js")), String()); + EXPECT_EQ(GetSourceText(KURL("std-internal://none/index.js")), String()); + + EXPECT_EQ(GetSourceText(KURL("https://example.com/")), String()); +} + +} // namespace + +} // namespace layered_api + +} // namespace blink
diff --git a/third_party/blink/renderer/core/script/modulator.cc b/third_party/blink/renderer/core/script/modulator.cc index c317188..c958aee 100644 --- a/third_party/blink/renderer/core/script/modulator.cc +++ b/third_party/blink/renderer/core/script/modulator.cc
@@ -9,6 +9,7 @@ #include "third_party/blink/renderer/core/frame/local_dom_window.h" #include "third_party/blink/renderer/core/frame/local_frame.h" #include "third_party/blink/renderer/core/script/document_modulator_impl.h" +#include "third_party/blink/renderer/core/script/layered_api.h" #include "third_party/blink/renderer/core/script/worker_modulator_impl.h" #include "third_party/blink/renderer/core/script/worklet_modulator_impl.h" #include "third_party/blink/renderer/core/workers/worklet_global_scope.h" @@ -86,8 +87,17 @@ // <spec step="1">Apply the URL parser to specifier. If the result is not // failure, return the result.</spec> KURL url(NullURL(), module_request); - if (url.IsValid()) + if (url.IsValid()) { + // <spec + // href="https://github.com/drufball/layered-apis/blob/master/spec.md#resolve-a-module-specifier" + // step="1">Let parsed be the result of applying the URL parser to + // specifier. If parsed is not failure, then return the layered API fetching + // URL for parsed.</spec> + if (RuntimeEnabledFeatures::LayeredAPIEnabled()) + return blink::layered_api::ResolveFetchingURL(url); + return url; + } // <spec step="2">If specifier does not start with the character U+002F // SOLIDUS (/), the two-character sequence U+002E FULL STOP, U+002F SOLIDUS
diff --git a/third_party/blink/renderer/core/script/resources/layered_api/async-local-storage/README.chromium b/third_party/blink/renderer/core/script/resources/layered_api/async-local-storage/README.chromium new file mode 100644 index 0000000..4119a837 --- /dev/null +++ b/third_party/blink/renderer/core/script/resources/layered_api/async-local-storage/README.chromium
@@ -0,0 +1,12 @@ +Name: async-local-storage Layered API +URL: https://github.com/valdrinkoshi/virtual-list +Version: 4bfe22c2d424e3451acfcf809585336f389f6397 +Security Critical: no + +Description: +Temporarily, the files under this directory are authored by Chromium Authors +on a github repository, and then imported to Chromium repository directly here, +until a long-term Layered API development plan is settled. + +Local Modifications: +None (except for renaming to index.js)
diff --git a/third_party/blink/renderer/core/script/resources/layered_api/async-local-storage/index.js b/third_party/blink/renderer/core/script/resources/layered_api/async-local-storage/index.js new file mode 100644 index 0000000..c7149cb3 --- /dev/null +++ b/third_party/blink/renderer/core/script/resources/layered_api/async-local-storage/index.js
@@ -0,0 +1,249 @@ +// TODOs/spec-noncompliances: +// - Susceptible to tampering of built-in prototypes and globals. We want to work on tooling to ameliorate that. +// - Uses symbols for information hiding but those are interceptable and forgeable. Need private fields/methods. + +const databaseName = Symbol("[[DatabaseName]]"); +const databasePromise = Symbol("[[DatabasePromise]]"); + +export class StorageArea { + constructor(name) { + this[databasePromise] = null; + this[databaseName] = "async-local-storage:" + `${name}`; + } + + async set(key, value) { + throwForDisallowedKey(key); + + return performDatabaseOperation(this, "readwrite", (transaction, store) => { + store.put(value, key); + + return new Promise((resolve, reject) => { + transaction.oncomplete = () => resolve(); + transaction.onabort = () => reject(transaction.error); + transaction.onerror = () => reject(transaction.error); + }); + }); + } + + async get(key) { + throwForDisallowedKey(key); + + return performDatabaseOperation(this, "readonly", (transaction, store) => { + const request = store.get(key); + + return new Promise((resolve, reject) => { + request.onsuccess = () => resolve(request.result); + request.onerror = () => reject(request.error); + }); + }); + } + + async has(key) { + throwForDisallowedKey(key); + + return performDatabaseOperation(this, "readonly", (transaction, store) => { + const request = store.count(key); + + return new Promise((resolve, reject) => { + request.onsuccess = () => resolve(request.result === 0 ? false : true); + request.onerror = () => reject(request.error); + }); + }); + } + + async delete(key) { + throwForDisallowedKey(key); + + return performDatabaseOperation(this, "readwrite", (transaction, store) => { + store.delete(key); + + return new Promise((resolve, reject) => { + transaction.oncomplete = () => resolve(); + transaction.onabort = () => reject(transaction.error); + transaction.onerror = () => reject(transaction.error); + }); + }); + } + + async clear() { + if (!(databasePromise in this)) { + return Promise.reject(new TypeError("Invalid this value")); + } + + if (this[databasePromise] !== null) { + return this[databasePromise].then( + () => { + this[databasePromise] = null; + return deleteDatabase(this[databaseName]); + }, + () => { + this[databasePromise] = null; + return deleteDatabase(this[databaseName]); + } + ); + } + + return deleteDatabase(this[databaseName]); + } + + async keys() { + return performDatabaseOperation(this, "readonly", (transaction, store) => { + const request = store.getAllKeys(undefined); + + return new Promise((resolve, reject) => { + request.onsuccess = () => resolve(request.result); + request.onerror = () => reject(request.error); + }); + }); + } + + async values() { + return performDatabaseOperation(this, "readonly", (transaction, store) => { + const request = store.getAll(undefined); + + return new Promise((resolve, reject) => { + request.onsuccess = () => resolve(request.result); + request.onerror = () => reject(request.error); + }); + }); + } + + async entries() { + return performDatabaseOperation(this, "readonly", (transaction, store) => { + const keysRequest = store.getAllKeys(undefined); + const valuesRequest = store.getAll(undefined); + + return new Promise((resolve, reject) => { + keysRequest.onerror = () => reject(keysRequest.error); + valuesRequest.onerror = () => reject(valuesRequest.error); + + valuesRequest.onsuccess = () => { + resolve(zip(keysRequest.result, valuesRequest.result)); + }; + }); + }); + } + + get backingStore() { + if (!(databasePromise in this)) { + throw new TypeError("Invalid this value"); + } + + return { + database: this[databaseName], + store: "store", + version: 1 + }; + } +} + +export const storage = new StorageArea("default"); + +function performDatabaseOperation(area, mode, steps) { + if (!(databasePromise in area)) { + return Promise.reject(new TypeError("Invalid this value")); + } + + if (area[databasePromise] === null) { + initializeDatabasePromise(area); + } + + return area[databasePromise].then(database => { + const transaction = database.transaction("store", mode); + const store = transaction.objectStore("store"); + + return steps(transaction, store); + }); +} + +function initializeDatabasePromise(area) { + area[databasePromise] = new Promise((resolve, reject) => { + const request = self.indexedDB.open(area[databaseName], 1); + + request.onsuccess = () => { + const database = request.result; + database.onclose = () => area[databasePromise] = null; + database.onversionchange = () => { + database.close(); + area[databasePromise] = null; + } + resolve(database); + }; + + request.onerror = () => reject(request.error); + + request.onupgradeneeded = () => { + try { + request.result.createObjectStore("store"); + } catch (e) { + reject(e); + } + }; + }); +} + +function isAllowedAsAKey(value) { + if (typeof value === "number" || typeof value === "string") { + return true; + } + + if (Array.isArray(value)) { + return true; + } + + if (isDate(value)) { + return true; + } + + if (ArrayBuffer.isView(value)) { + return true; + } + + if (isArrayBuffer(value)) { + return true; + } + + return false; +} + +function isDate(value) { + try { + Date.prototype.getTime.call(value); + return true; + } catch (e) { // TODO: remove useless binding + return false; + } +} + +const byteLengthGetter = Object.getOwnPropertyDescriptor(ArrayBuffer.prototype, "byteLength").get; +function isArrayBuffer(value) { + try { + byteLengthGetter.call(value); + return true; + } catch (e) { // TODO: remove useless binding + return false; + } +} + +function throwForDisallowedKey(key) { + if (!isAllowedAsAKey(key)) { + throw new DOMException("The given value is not allowed as a key", "DataError"); + } +} + +function zip(a, b) { + const result = []; + for (let i = 0; i < a.length; ++i) { + result.push([a[i], b[i]]); + } + + return result; +} + +function deleteDatabase(name) { + return new Promise((resolve, reject) => { + const request = self.indexedDB.deleteDatabase(name); + request.onsuccess = () => resolve(); + request.onerror = () => reject(request.error); + }); +}
diff --git a/third_party/blink/renderer/core/script/resources/layered_api/blank/index.js b/third_party/blink/renderer/core/script/resources/layered_api/blank/index.js new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/third_party/blink/renderer/core/script/resources/layered_api/blank/index.js
diff --git a/third_party/blink/renderer/core/script/resources/layered_api/virtual-list/README.chromium b/third_party/blink/renderer/core/script/resources/layered_api/virtual-list/README.chromium new file mode 100644 index 0000000..0660333 --- /dev/null +++ b/third_party/blink/renderer/core/script/resources/layered_api/virtual-list/README.chromium
@@ -0,0 +1,12 @@ +Name: virtual-list Layered API +URL: https://github.com/valdrinkoshi/virtual-list +Version: 4bbc08999515cdf3ce944a150bc6d9949add8978 +Security Critical: no + +Description: +Temporarily, the files under this directory are authored by Chromium Authors +on a github repository, and then imported to Chromium repository directly here, +until a long-term Layered API development plan is settled. + +Local Modifications: +None (except for renaming virtual-list-element.js to index.js)
diff --git a/third_party/blink/renderer/core/script/resources/layered_api/virtual-list/index.js b/third_party/blink/renderer/core/script/resources/layered_api/virtual-list/index.js new file mode 100644 index 0000000..3dfbb62 --- /dev/null +++ b/third_party/blink/renderer/core/script/resources/layered_api/virtual-list/index.js
@@ -0,0 +1,163 @@ +import {VirtualList} from './virtual-list.js'; + +/** Properties */ +const _items = Symbol(); +const _list = Symbol(); +const _newChild = Symbol(); +const _updateChild = Symbol(); +const _recycleChild = Symbol(); +const _itemKey = Symbol(); +const _grid = Symbol(); +const _horizontal = Symbol(); +const _pendingRender = Symbol(); +/** Functions */ +const _render = Symbol(); +const _scheduleRender = Symbol(); + +// Lazily loaded Layout classes. +const dynamicImports = {}; +const importLayoutClass = async (url) => { + if (!dynamicImports[url]) { + dynamicImports[url] = import(url).then(module => module.default); + } + return await dynamicImports[url]; +}; + +export class VirtualListElement extends HTMLElement { + constructor() { + super(); + this[_items] = null; + this[_list] = null; + this[_newChild] = null; + this[_updateChild] = null; + this[_recycleChild] = null; + this[_itemKey] = null; + this[_grid] = false; + this[_horizontal] = false; + this[_pendingRender] = null; + } + + connectedCallback() { + if (!this.shadowRoot) { + this.attachShadow({mode: 'open'}).innerHTML = ` +<style> + :host { + display: block; + position: relative; + contain: strict; + } + ::slotted(*) { + box-sizing: border-box; + max-width: 100%; + max-height: 100%; + } +</style> +<slot></slot>`; + } + this[_scheduleRender](); + } + + static get observedAttributes() { + return ['layout']; + } + + attributeChangedCallback(name, oldVal, newVal) { + if (name === 'layout') { + this.layout = newVal; + } + } + + get newChild() { + return this[_newChild]; + } + set newChild(fn) { + this[_newChild] = fn; + this[_scheduleRender](); + } + + get updateChild() { + return this[_updateChild]; + } + set updateChild(fn) { + this[_updateChild] = fn; + this[_scheduleRender](); + } + + get recycleChild() { + return this[_recycleChild]; + } + set recycleChild(fn) { + this[_recycleChild] = fn; + this[_scheduleRender](); + } + + get itemKey() { + return this[_itemKey]; + } + set itemKey(fn) { + this[_itemKey] = fn; + this[_scheduleRender](); + } + + get layout() { + const prefix = this[_horizontal] ? 'horizontal' : 'vertical'; + const suffix = this[_grid] ? '-grid' : ''; + return prefix + suffix; + } + set layout(layout) { + this[_horizontal] = layout && layout.startsWith('horizontal'); + this[_grid] = layout && layout.endsWith('-grid'); + this[_scheduleRender](); + } + + get items() { + return this[_items]; + } + set items(items) { + this[_items] = items; + this[_scheduleRender](); + } + + requestReset() { + if (this[_list]) { + this[_list].requestReset(); + } + } + + [_scheduleRender]() { + if (!this[_pendingRender]) { + this[_pendingRender] = Promise.resolve().then(() => { + this[_pendingRender] = null; + this[_render](); + }); + } + } + + async[_render]() { + if (!this.newChild) { + return; + } + // Delay init to first connected as list needs to measure + // sizes of container and children. + if (!this[_list] && !this.isConnected) { + return; + } + + if (!this[_list]) { + this[_list] = new VirtualList({container: this}); + } + const list = this[_list]; + + const {newChild, updateChild, recycleChild, itemKey, items} = this; + Object.assign(list, {newChild, updateChild, recycleChild, itemKey, items}); + + const Layout = await importLayoutClass( + this[_grid] ? './layouts/layout-1d-grid.js' : './layouts/layout-1d.js'); + const direction = this[_horizontal] ? 'horizontal' : 'vertical'; + if (list.layout instanceof Layout === false || + list.layout.direction !== direction) { + list.layout = new Layout({direction}); + } + } +} +customElements.define('virtual-list', VirtualListElement); \ No newline at end of file
diff --git a/third_party/blink/renderer/core/script/resources/layered_api/virtual-list/layouts/layout-1d-base.js b/third_party/blink/renderer/core/script/resources/layered_api/virtual-list/layouts/layout-1d-base.js new file mode 100644 index 0000000..df58584 --- /dev/null +++ b/third_party/blink/renderer/core/script/resources/layered_api/virtual-list/layouts/layout-1d-base.js
@@ -0,0 +1,264 @@ +export default class Layout extends EventTarget { + constructor(config) { + super(); + + this._physicalMin = 0; + this._physicalMax = 0; + + this._first = -1; + this._last = -1; + + this._latestCoords = {left: 0, top: 0}; + + this._itemSize = {width: 100, height: 100}; + this._spacing = 0; + + this._virtualScroll = false; + + this._sizeDim = 'height'; + this._secondarySizeDim = 'width'; + this._positionDim = 'top'; + this._secondaryPositionDim = 'left'; + this._direction = 'vertical'; + + this._scrollPosition = 0; + this._viewportSize = {width: 0, height: 0}; + this._totalItems = 0; + + this._scrollSize = 1; + + this._overhang = 150; + + Object.assign(this, config); + } + + // public properties + + set virtualScroll(bool) { + this._virtualScroll = bool; + } + + get virtualScroll() { + return this._virtualScroll; + } + + set spacing(px) { + if (px !== this._spacing) { + this._spacing = px; + this._scheduleReflow(); + } + } + + get spacing() { + return this._spacing; + } + + set itemSize(dims) { + const {_itemDim1, _itemDim2} = this; + Object.assign(this._itemSize, dims); + if (_itemDim1 !== this._itemDim1 || _itemDim2 !== this._itemDim2) { + if (_itemDim2 !== this._itemDim2) { + this._itemDim2Changed(); + } else { + this._scheduleReflow(); + } + } + } + + _itemDim2Changed() { + // Override + } + + get _delta() { + return this._itemDim1 + this._spacing; + } + + get _itemDim1() { + return this._itemSize[this._sizeDim]; + } + + get _itemDim2() { + return this._itemSize[this._secondarySizeDim]; + } + + get itemSize() { + return this._itemSize; + } + + set direction(dir) { + // Force it to be either horizontal or vertical. + dir = (dir === 'horizontal') ? dir : 'vertical'; + if (dir !== this._direction) { + this._direction = dir; + this._sizeDim = (dir === 'horizontal') ? 'width' : 'height'; + this._secondarySizeDim = (dir === 'horizontal') ? 'height' : 'width'; + this._positionDim = (dir === 'horizontal') ? 'left' : 'top'; + this._secondaryPositionDim = (dir === 'horizontal') ? 'top' : 'left'; + this._scheduleReflow(); + } + } + + get direction() { + return this._direction; + } + + set viewportSize(dims) { + const {_viewDim1, _viewDim2} = this; + Object.assign(this._viewportSize, dims); + if (_viewDim1 !== this._viewDim1 || _viewDim2 !== this._viewDim2) { + if (_viewDim2 !== this._viewDim2) { + this._viewDim2Changed(); + } else { + this._checkThresholds(); + } + } + } + + _viewDim2Changed() { + // Override + } + + get _viewDim1() { + return this._viewportSize[this._sizeDim]; + } + + get _viewDim2() { + return this._viewportSize[this._secondarySizeDim]; + } + + get viewportSize() { + return this._viewportSize; + } + + set totalItems(num) { + if (num !== this._totalItems) { + this._totalItems = num; + this._maxIdx = num - 1; + this._scheduleReflow(); + } + } + + get totalItems() { + return this._totalItems; + } + + // private properties + + get _num() { + if (this._first === -1 || this._last === -1) { + return 0; + } + return this._last - this._first + 1; + } + + // public methods + + scrollTo(coords) { + this._latestCoords = coords; + this._scroll(); + } + + // + + _scroll() { + this._scrollPosition = this._latestCoords[this._positionDim]; + + this._checkThresholds(); + } + + _getActiveItems() { + // Override + } + + // TODO: Does this need to be public? + _reflow() { + const {_first, _last, _scrollSize} = this; + + this._updateScrollSize(); + this._getActiveItems(); + + if (this._scrollSize !== _scrollSize) { + this._emitScrollSize(); + } + + if (this._first === -1 && this._last === -1) { + this._emitRange(); + } else if ( + this._first !== _first || this._last !== _last || + this._spacingChanged) { + this._emitRange(); + this._emitChildPositions(); + } + this._pendingReflow = null; + } + + _scheduleReflow() { + if (!this._pendingReflow) { + this._pendingReflow = Promise.resolve().then(() => this._reflow()); + } + } + + _updateScrollSize() { + // Ensure we have at least 1px - this allows getting at least 1 item to be + // rendered. + this._scrollSize = Math.max(1, this._totalItems * this._delta); + } + + _checkThresholds() { + if (this._viewDim1 === 0 && this._num > 0) { + this._scheduleReflow(); + } else { + const min = Math.max(0, this._scrollPosition - this._overhang); + const max = Math.min( + this._scrollSize, + this._scrollPosition + this._viewDim1 + this._overhang); + if (this._physicalMin > min || this._physicalMax < max) { + this._scheduleReflow(); + } + } + } + + /// + + _emitRange(inProps) { + const detail = Object.assign( + { + first: this._first, + last: this._last, + num: this._num, + stable: true, + }, + inProps); + this.dispatchEvent(new CustomEvent('rangechange', {detail})); + } + + _emitScrollSize() { + const detail = { + [this._sizeDim]: this._scrollSize, + }; + this.dispatchEvent(new CustomEvent('scrollsizechange', {detail})); + } + + _emitScrollError() { + if (this._scrollError) { + const detail = { + [this._positionDim]: this._scrollError, + [this._secondaryPositionDim]: 0, + }; + this.dispatchEvent(new CustomEvent('scrollerrorchange', {detail})); + this._scrollError = 0; + } + } + + _emitChildPositions() { + const detail = {}; + for (let idx = this._first; idx <= this._last; idx++) { + detail[idx] = this._getItemPosition(idx); + } + this.dispatchEvent(new CustomEvent('itempositionchange', {detail})); + } + + _getItemPosition(idx) { + // Override. + } +} \ No newline at end of file
diff --git a/third_party/blink/renderer/core/script/resources/layered_api/virtual-list/layouts/layout-1d-grid.js b/third_party/blink/renderer/core/script/resources/layered_api/virtual-list/layouts/layout-1d-grid.js new file mode 100644 index 0000000..f2b208d --- /dev/null +++ b/third_party/blink/renderer/core/script/resources/layered_api/virtual-list/layouts/layout-1d-grid.js
@@ -0,0 +1,66 @@ +import Layout1dBase from './layout-1d-base.js'; + +export default class Layout extends Layout1dBase { + constructor(config) { + super(config); + this._rolumns = 1; + } + + updateItemSizes(sizes) { + // Assume all items have the same size. + const size = Object.values(sizes)[0]; + if (size) { + this.itemSize = size; + } + } + + _viewDim2Changed() { + this._defineGrid(); + } + + _itemDim2Changed() { + this._defineGrid(); + } + + _getActiveItems() { + const {_scrollPosition, _scrollSize} = this; + + const min = Math.max(0, this._scrollPosition - this._overhang); + const max = Math.min( + this._scrollSize, + this._scrollPosition + this._viewDim1 + this._overhang); + const firstCow = Math.floor(min / this._delta); + const lastCow = Math.ceil(max / this._delta) - 1; + + this._first = firstCow * this._rolumns; + this._last = + Math.min(((lastCow + 1) * this._rolumns) - 1, this._totalItems); + this._physicalMin = this._delta * firstCow; + this._physicalMax = this._delta * (lastCow + 1); + } + + _getItemPosition(idx) { + return { + [this._positionDim]: Math.floor(idx / this._rolumns) * this._delta, + [this._secondaryPositionDim]: this._spacing + + ((idx % this._rolumns) * (this._spacing + this._itemDim2)) + } + } + + + _defineGrid() { + const {_spacing} = this; + this._rolumns = Math.max(1, Math.floor(this._viewDim2 / this._itemDim2)); + if (this._rolumns > 1) { + this._spacing = (this._viewDim2 % (this._rolumns * this._itemDim2)) / + (this._rolumns + 1); + } + this._spacingChanged = !(_spacing === this._spacing); + this._scheduleReflow(); + } + + _updateScrollSize() { + this._scrollSize = + Math.max(1, Math.ceil(this._totalItems / this._rolumns) * this._delta); + } +} \ No newline at end of file
diff --git a/third_party/blink/renderer/core/script/resources/layered_api/virtual-list/layouts/layout-1d.js b/third_party/blink/renderer/core/script/resources/layered_api/virtual-list/layouts/layout-1d.js new file mode 100644 index 0000000..38447806 --- /dev/null +++ b/third_party/blink/renderer/core/script/resources/layered_api/virtual-list/layouts/layout-1d.js
@@ -0,0 +1,329 @@ +import Layout1dBase from './layout-1d-base.js'; + +export default class Layout extends Layout1dBase { + constructor(config) { + super(config); + this._physicalItems = new Map(); + this._newPhysicalItems = new Map(); + + this._metrics = new Map(); + + this._anchorIdx = null; + this._anchorPos = null; + this._scrollError = 0; + this._stable = true; + + this._needsRemeasure = false; + + this._nMeasured = 0; + this._tMeasured = 0; + + this._estimate = true; + } + + updateItemSizes(sizes) { + Object.keys(sizes).forEach((key) => { + const metrics = sizes[key], mi = this._getMetrics(key), + prevSize = mi[this._sizeDim]; + + // TODO(valdrin) Handle margin collapsing. + // https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Box_Model/Mastering_margin_collapsing + mi.width = metrics.width + (metrics.marginLeft || 0) + + (metrics.marginRight || 0); + mi.height = metrics.height + (metrics.marginTop || 0) + + (metrics.marginBottom || 0); + + const size = mi[this._sizeDim]; + const item = this._getPhysicalItem(Number(key)); + if (item) { + let delta; + + if (size !== undefined) { + item.size = size; + if (prevSize === undefined) { + delta = size; + this._nMeasured++; + } else { + delta = size - prevSize; + } + } + this._tMeasured = this._tMeasured + delta; + } else { + // console.debug(`Could not find physical item for key ${key}`); + } + }); + if (!this._nMeasured) { + console.warn(`No items measured yet.`); + } else { + this._updateItemSize(); + this._scheduleReflow(); + } + } + + _updateItemSize() { + this._itemSize[this._sizeDim] = this._tMeasured / this._nMeasured; + } + + // + + _getMetrics(idx) { + return (this._metrics[idx] = this._metrics[idx] || {}); + } + + _getPhysicalItem(idx) { + return this._newPhysicalItems.get(idx) || this._physicalItems.get(idx); + } + + _getSize(idx) { + const item = this._getPhysicalItem(idx); + return item && item.size; + } + + _getPosition(idx) { + const item = this._physicalItems.get(idx); + return item ? item.pos : (idx * (this._delta)) + this._spacing; + } + + _calculateAnchor(lower, upper) { + if (lower === 0) { + return 0; + } + if (upper > this._scrollSize - this._viewDim1) { + return this._maxIdx; + } + return Math.max( + 0, + Math.min( + this._maxIdx, Math.floor(((lower + upper) / 2) / this._delta))); + } + + _setAnchor(lower, upper) { + if (this._physicalItems.size === 0) { + return this._calculateAnchor(lower, upper); + } + if (this._first < 0) { + console.error('_setAnchor: negative _first'); + return this._calculateAnchor(lower, upper); + } + if (this._last < 0) { + console.error('_setAnchor: negative _last'); + return this._calculateAnchor(lower, upper); + } + + const firstItem = this._getPhysicalItem(this._first), + lastItem = this._getPhysicalItem(this._last), + firstMin = firstItem.pos, firstMax = firstMin + firstItem.size, + lastMin = lastItem.pos, lastMax = lastMin + lastItem.size; + + if (lastMax < lower) { + // Window is entirely past physical items, calculate new anchor + return this._calculateAnchor(lower, upper); + } + if (firstMin > upper) { + // Window is entirely before physical items, calculate new anchor + return this._calculateAnchor(lower, upper); + } + if (firstMin >= lower || firstMax >= lower) { + // First physical item overlaps window, choose it + return this._first; + } + if (lastMax <= upper || lastMin <= upper) { + // Last physical overlaps window, choose it + return this._last; + } + // Window contains a physical item, but not the first or last + let maxIdx = this._last, minIdx = this._first; + + while (true) { + let candidateIdx = Math.round((maxIdx + minIdx) / 2), + candidate = this._physicalItems.get(candidateIdx), + cMin = candidate.pos, cMax = cMin + candidate.size; + + if ((cMin >= lower && cMin <= upper) || + (cMax >= lower && cMax <= upper)) { + return candidateIdx; + } else if (cMax < lower) { + minIdx = candidateIdx + 1; + } else if (cMin > upper) { + maxIdx = candidateIdx - 1; + } + } + } + + _getActiveItems() { + if (this._viewDim1 === 0 || this._totalItems === 0) { + this._clearItems(); + } else { + const upper = Math.min( + this._scrollSize, + this._scrollPosition + this._viewDim1 + this._overhang), + lower = Math.max(0, upper - this._viewDim1 - (2 * this._overhang)); + + this._getItems(lower, upper); + } + } + + _clearItems() { + this._first = -1; + this._last = -1; + this._physicalMin = 0; + this._physicalMax = 0; + const items = this._newPhysicalItems; + this._newPhysicalItems = this._physicalItems; + this._newPhysicalItems.clear(); + this._physicalItems = items; + this._stable = true; + } + + _getItems(lower, upper) { + const items = this._newPhysicalItems; + + if (this._anchorIdx === null || this._anchorPos === null) { + this._anchorIdx = this._setAnchor(lower, upper); + this._anchorPos = this._getPosition(this._anchorIdx); + } + + let anchorSize = this._getSize(this._anchorIdx); + if (anchorSize === undefined) { + anchorSize = this._itemDim1; + } + + let anchorErr = 0; + + if (this._anchorPos + anchorSize + this._spacing < lower) { + anchorErr = lower - (this._anchorPos + anchorSize + this._spacing); + } + + if (this._anchorPos > upper) { + anchorErr = upper - this._anchorPos; + } + + if (anchorErr) { + this._scrollPosition -= anchorErr; + lower -= anchorErr; + upper -= anchorErr; + this._scrollError += anchorErr; + } + + items.set(this._anchorIdx, {pos: this._anchorPos, size: anchorSize}); + + this._first = (this._last = this._anchorIdx); + this._physicalMin = (this._physicalMax = this._anchorPos); + + this._stable = true; + + while (this._physicalMin > lower && this._first > 0) { + let size = this._getSize(--this._first); + if (size === undefined) { + this._stable = false; + size = this._itemDim1; + } + const pos = (this._physicalMin -= size + this._spacing); + items.set(this._first, {pos, size}); + if (this._stable === false && this._estimate === false) { + break; + } + } + + while (this._physicalMax < upper && this._last < this._totalItems) { + let size = this._getSize(this._last); + if (size === undefined) { + this._stable = false; + size = this._itemDim1; + } + items.set(this._last++, {pos: this._physicalMax, size}); + if (this._stable === false && this._estimate === false) { + break; + } else { + this._physicalMax += size + this._spacing; + } + } + + this._last--; + + const extentErr = this._calculateError(); + if (extentErr) { + this._physicalMin -= extentErr; + this._physicalMax -= extentErr; + this._anchorPos -= extentErr; + this._scrollPosition -= extentErr; + items.forEach(item => item.pos -= extentErr); + this._scrollError += extentErr; + } + + if (this._stable) { + this._newPhysicalItems = this._physicalItems; + this._newPhysicalItems.clear(); + this._physicalItems = items; + } + } + + _calculateError() { + if (this._first === 0) { + return this._physicalMin; + } else if (this._physicalMin <= 0) { + return this._physicalMin - (this._first * this._delta); + } else if (this._last === this._maxIdx) { + return this._physicalMax - this._scrollSize; + } else if (this._physicalMax >= this._scrollSize) { + return ( + (this._physicalMax - this._scrollSize) + + ((this._maxIdx - this._last) * this._delta)); + } + return 0; + } + + // TODO: Can this be made to inherit from base, with proper hooks? + _reflow() { + const {_first, _last, _scrollSize} = this; + + this._updateScrollSize(); + this._getActiveItems(); + + if (this._scrollSize !== _scrollSize) { + this._emitScrollSize(); + } + + if (this._first === -1 && this._last === -1) { + this._emitRange(); + this._resetReflowState(); + } else if ( + this._first !== _first || this._last !== _last || + this._needsRemeasure) { + this._emitRange(); + this._emitScrollError(); + this._emitChildPositions(); + } else { + this._emitRange(); + this._emitScrollError(); + this._emitChildPositions(); + this._resetReflowState(); + } + this._pendingReflow = null; + } + + _resetReflowState() { + this._anchorIdx = null; + this._anchorPos = null; + this._stable = true; + } + + _getItemPosition(idx) { + return { + [this._positionDim]: this._getPosition(idx), + [this._secondaryPositionDim]: 0 + } + } + + _viewDim2Changed() { + this._needsRemeasure = true; + this._scheduleReflow(); + } + + _emitRange() { + const remeasure = this._needsRemeasure; + const stable = this._stable; + this._needsRemeasure = false; + super._emitRange({remeasure, stable}); + } +}
diff --git a/third_party/blink/renderer/core/script/resources/layered_api/virtual-list/virtual-list.js b/third_party/blink/renderer/core/script/resources/layered_api/virtual-list/virtual-list.js new file mode 100644 index 0000000..22050869 --- /dev/null +++ b/third_party/blink/renderer/core/script/resources/layered_api/virtual-list/virtual-list.js
@@ -0,0 +1,255 @@ +import {Repeats} from './virtual-repeater.js'; + +export class RangeChangeEvent extends Event { + constructor(type, init) { + super(type, init); + this._first = Math.floor(init.first || 0); + this._last = Math.floor(init.last || 0); + } + get first() { + return this._first; + } + get last() { + return this._last; + } +} + +export const RepeatsAndScrolls = Superclass => class extends Repeats +(Superclass) { + constructor(config) { + super(); + this._num = 0; + this._first = -1; + this._last = -1; + this._prevFirst = -1; + this._prevLast = -1; + + this._pendingUpdateView = null; + this._isContainerVisible = false; + this._containerElement = null; + + if (config) { + Object.assign(this, config); + } + } + + get container() { + return this._container; + } + set container(container) { + if (container === this._container) { + return; + } + + removeEventListener('scroll', this); + removeEventListener('resize', this); + + super.container = container; + + if (container) { + addEventListener('scroll', this); + addEventListener('resize', this); + this._scheduleUpdateView(); + } + + // Update the containerElement, copy min-width/height styles to new + // container. + let containerStyle = null; + if (this._containerElement) { + containerStyle = this._containerElement.getAttribute('style'); + this._containerElement.removeAttribute('style'); + } + // Consider document fragments as shadowRoots. + this._containerElement = + (container && container.nodeType === Node.DOCUMENT_FRAGMENT_NODE) ? + container.host : + container; + + if (this._containerElement && containerStyle) { + this._containerElement.setAttribute('style', containerStyle); + } + } + + get layout() { + return this._layout; + } + set layout(layout) { + if (layout === this._layout) { + return; + } + + if (this._layout) { + this._measureCallback = null; + this._layout.removeEventListener('scrollsizechange', this); + this._layout.removeEventListener('scrollerrorchange', this); + this._layout.removeEventListener('itempositionchange', this); + this._layout.removeEventListener('rangechange', this); + // Remove min-width/height from containerElement so + // layout can get correct viewport size. + if (this._containerElement) { + this._containerElement.removeAttribute('style'); + this.requestRemeasure(); + } + } + + this._layout = layout; + + if (this._layout) { + if (typeof this._layout.updateItemSizes === 'function') { + this._measureCallback = this._layout.updateItemSizes.bind(this._layout); + } + this._layout.addEventListener('scrollsizechange', this); + this._layout.addEventListener('scrollerrorchange', this); + this._layout.addEventListener('itempositionchange', this); + this._layout.addEventListener('rangechange', this); + this._scheduleUpdateView(); + } + } + + requestReset() { + super.requestReset(); + this._scheduleUpdateView(); + } + + /** + * @param {!Event} event + * @private + */ + handleEvent(event) { + switch (event.type) { + case 'scroll': + case 'resize': + this._scheduleUpdateView(); + break; + case 'scrollsizechange': + this._sizeContainer(event.detail); + break; + case 'scrollerrorchange': + this._correctScrollError(event.detail); + break; + case 'itempositionchange': + this._positionChildren(event.detail); + break; + case 'rangechange': + this._adjustRange(event.detail); + break; + default: + console.warn('event not handled', event); + } + } + + // Rename _ordered to _kids? + /** + * @protected + */ + get _kids() { + return this._ordered; + } + /** + * @private + */ + _scheduleUpdateView() { + if (!this._pendingUpdateView && this._container && this._layout) { + this._pendingUpdateView = + Promise.resolve().then(() => this._updateView()); + } + } + /** + * @private + */ + _updateView() { + this._pendingUpdateView = null; + + this._layout.totalItems = this._items ? this._items.length : 0; + + const listBounds = this._containerElement.getBoundingClientRect(); + // Avoid updating viewport if container is not visible. + this._isContainerVisible = Boolean( + listBounds.width || listBounds.height || listBounds.top || + listBounds.left); + if (!this._isContainerVisible) { + return; + } + + const scrollerWidth = window.innerWidth; + const scrollerHeight = window.innerHeight; + const xMin = Math.max(0, Math.min(scrollerWidth, listBounds.left)); + const yMin = Math.max(0, Math.min(scrollerHeight, listBounds.top)); + const xMax = this._layout.direction === 'vertical' ? + Math.max(0, Math.min(scrollerWidth, listBounds.right)) : + scrollerWidth; + const yMax = this._layout.direction === 'vertical' ? + scrollerHeight : + Math.max(0, Math.min(scrollerHeight, listBounds.bottom)); + const width = xMax - xMin; + const height = yMax - yMin; + this._layout.viewportSize = {width, height}; + + const left = Math.max(0, -listBounds.x); + const top = Math.max(0, -listBounds.y); + this._layout.scrollTo({top, left}); + } + /** + * @private + */ + _sizeContainer(size) { + const style = this._containerElement.style; + style.minWidth = size.width ? size.width + 'px' : null; + style.minHeight = size.height ? size.height + 'px' : null; + } + /** + * @private + */ + async _positionChildren(pos) { + await Promise.resolve(); + const kids = this._kids; + Object.keys(pos).forEach(key => { + const idx = key - this._first; + const child = kids[idx]; + if (child) { + const {top, left} = pos[key]; + // console.debug(`_positionChild #${this._container.id} > #${child.id}: + // top ${top}`); + child.style.position = 'absolute'; + child.style.transform = `translate(${left}px, ${top}px)`; + } + }); + } + /** + * @private + */ + _adjustRange(range) { + this.num = range.num; + this.first = range.first; + this._incremental = !(range.stable); + if (range.remeasure) { + this.requestRemeasure(); + } else if (range.stable) { + this._notifyStable(); + } + } + /** + * @protected + */ + _shouldRender() { + return Boolean( + this._isContainerVisible && this._layout && super._shouldRender()); + } + /** + * @private + */ + _correctScrollError(err) { + window.scroll(window.scrollX - err.left, window.scrollY - err.top); + } + /** + * @protected + */ + _notifyStable() { + const {first, num} = this; + const last = first + num; + this._container.dispatchEvent( + new RangeChangeEvent('rangechange', {first, last})); + } +}; + +export const VirtualList = RepeatsAndScrolls(class {});
diff --git a/third_party/blink/renderer/core/script/resources/layered_api/virtual-list/virtual-repeater.js b/third_party/blink/renderer/core/script/resources/layered_api/virtual-list/virtual-repeater.js new file mode 100644 index 0000000..ccc46b1 --- /dev/null +++ b/third_party/blink/renderer/core/script/resources/layered_api/virtual-list/virtual-repeater.js
@@ -0,0 +1,522 @@ +export const Repeats = Superclass => class extends Superclass { + constructor(config) { + super(); + + this._newChildFn = null; + this._updateChildFn = null; + this._recycleChildFn = null; + this._itemKeyFn = null; + + this._measureCallback = null; + + this._items = null; + // Consider renaming this. firstVisibleIndex? + this._first = 0; + // Consider renaming this. count? visibleElements? + this._num = Infinity; + + this.__incremental = false; + + // used only internally.. + // legacy from 1st approach to preact integration + this._manageDom = true; + // used to check if it is more perf if you don't care of dom order? + this._maintainDomOrder = true; + + this._last = 0; + this._prevFirst = 0; + this._prevLast = 0; + + this._needsReset = false; + this._needsRemeasure = false; + this._pendingRender = null; + + // Contains child nodes in the rendered order. + this._ordered = []; + // this._pool = []; + this._active = new Map(); + this._prevActive = new Map(); + // Both used for recycling purposes. + this._keyToChild = new Map(); + this._childToKey = new WeakMap(); + // Used to keep track of measures by index. + this._indexToMeasure = {}; + + if (config) { + Object.assign(this, config); + } + } + + // API + + get container() { + return this._container; + } + set container(container) { + if (container === this._container) { + return; + } + if (this._container) { + // Remove children from old container. + this._ordered.forEach((child) => this._removeChild(child)); + } + + this._container = container; + + if (container) { + // Insert children in new container. + this._ordered.forEach((child) => this._insertBefore(child, null)); + } else { + this._ordered.length = 0; + this._active.clear(); + this._prevActive.clear(); + } + this.requestReset(); + } + + get newChild() { + return this._newChildFn; + } + set newChild(fn) { + if (fn !== this._newChildFn) { + this._newChildFn = fn; + this._keyToChild.clear(); + this.requestReset(); + } + } + + get updateChild() { + return this._updateChildFn; + } + set updateChild(fn) { + if (fn !== this._updateChildFn) { + this._updateChildFn = fn; + this.requestReset(); + } + } + + get recycleChild() { + return this._recycleChildFn; + } + set recycleChild(fn) { + if (fn !== this._recycleChildFn) { + this._recycleChildFn = fn; + this.requestReset(); + } + } + + get itemKey() { + return this._itemKeyFn; + } + set itemKey(fn) { + if (fn !== this._itemKeyFn) { + this._itemKeyFn = fn; + this._keyToChild.clear(); + this.requestReset(); + } + } + + get first() { + return this._first; + } + + set first(idx) { + if (typeof idx === 'number') { + const len = this._items ? this._items.length : 0; + const newFirst = Math.max(0, Math.min(idx, len - this._num)); + if (newFirst !== this._first) { + this._first = newFirst; + this._scheduleRender(); + } + } + } + + get num() { + return this._num; + } + + set num(n) { + if (typeof n === 'number') { + if (n !== this._num) { + this._num = n; + this.first = this._first; + this._scheduleRender(); + } + } + } + + get items() { + return this._items; + } + + set items(arr) { + if (arr !== this._items) { + this._items = arr; + this.first = this._first; + this.requestReset(); + } + } + + get _incremental() { + return this.__incremental; + } + + set _incremental(inc) { + if (inc !== this.__incremental) { + this.__incremental = inc; + this._scheduleRender(); + } + } + + requestReset() { + this._needsReset = true; + this._scheduleRender(); + } + + requestRemeasure() { + this._needsRemeasure = true; + this._scheduleRender(); + } + + // Core functionality + + /** + * @protected + */ + _shouldRender() { + return Boolean(this.items && this.container && this.newChild); + } + + /** + * @private + */ + _scheduleRender() { + if (!this._pendingRender && this._shouldRender()) { + this._pendingRender = Promise.resolve().then(() => this._render()); + } + } + + /** + * Returns those children that are about to be displayed and that + * require to be positioned. If reset or remeasure has been triggered, + * all children are returned. + * @return {{indices:Array<number>,children:Array<Element>}} + * @private + */ + get _toMeasure() { + return this._ordered.reduce((toMeasure, c, i) => { + const idx = this._first + i; + if (this._needsReset || this._needsRemeasure || idx < this._prevFirst || + idx > this._prevLast) { + toMeasure.indices.push(idx); + toMeasure.children.push(c); + } + return toMeasure; + }, {indices: [], children: []}); + } + + /** + * Measures each child bounds and builds a map of index/bounds to be passed to + * the `_measureCallback` + * @private + */ + async _measureChildren() { + if (this._ordered.length > 0) { + const {indices, children} = this._toMeasure; + await Promise.resolve(); + const pm = await Promise.all(children.map( + (c, i) => this._indexToMeasure[indices[i]] || this._measureChild(c))); + const mm = /** @type {{ number: { width: number, height: number } }} */ + (pm.reduce((out, cur, i) => { + out[indices[i]] = this._indexToMeasure[indices[i]] = cur; + return out; + }, {})); + this._measureCallback(mm); + } + } + + /** + * @protected + */ + _render() { + // 1. create DOM + // 2. measure DOM + // 3. recycle DOM + const rangeChanged = + this._first !== this._prevFirst || this._num !== this._prevNum; + if (rangeChanged || this._needsReset) { + this._last = this._first + + Math.min(this._num, this._items.length - this._first) - 1; + if (this._num || this._prevNum) { + if (this._needsReset) { + this._reset(this._first, this._last); + } else { + this._discardHead(); + this._discardTail(); + this._addHead(); + this._addTail(); + } + } + } + if (this._needsRemeasure || this._needsReset) { + this._indexToMeasure = {}; + } + const shouldMeasure = this._num > 0 && this._measureCallback && + (rangeChanged || this._needsRemeasure || this._needsReset); + // console.debug(`#${this._container.id} _render: ${this._num}/${ + // this._items.length} ${this._first} -> ${this._last} + // (${this._prevNum}/${this._items.length} ${this._prevFirst} -> + // ${this._prevLast}) measure=${shouldMeasure}`); + if (shouldMeasure) { + this._measureChildren(); + } + + // Cleanup + if (!this._incremental) { + this._prevActive.forEach((idx, child) => this._unassignChild(child, idx)); + this._prevActive.clear(); + } + + this._prevFirst = this._first; + this._prevLast = this._last; + this._prevNum = this._num; + this._needsReset = false; + this._needsRemeasure = false; + this._pendingRender = null; + } + + /** + * @private + */ + _discardHead() { + const o = this._ordered; + for (let idx = this._prevFirst; o.length && idx < this._first; idx++) { + this._unassignChild(o.shift(), idx); + } + } + + /** + * @private + */ + _discardTail() { + const o = this._ordered; + for (let idx = this._prevLast; o.length && idx > this._last; idx--) { + this._unassignChild(o.pop(), idx); + } + } + + /** + * @private + */ + _addHead() { + const start = this._first; + const end = Math.min(this._last, this._prevFirst - 1); + for (let idx = end; idx >= start; idx--) { + const child = this._assignChild(idx); + const item = this._items[idx]; + if (this._manageDom) { + if (this._maintainDomOrder || !this._childIsAttached(child)) { + this._insertBefore(child, this._firstChild); + } + } + if (this.updateChild) { + this.updateChild(child, item, idx); + } + this._ordered.unshift(child); + } + } + + /** + * @private + */ + _addTail() { + const start = Math.max(this._first, this._prevLast + 1); + const end = this._last; + for (let idx = start; idx <= end; idx++) { + const child = this._assignChild(idx); + const item = this._items[idx]; + if (this._manageDom) { + if (this._maintainDomOrder || !this._childIsAttached(child)) { + this._insertBefore(child, null); + } + } + if (this.updateChild) { + this.updateChild(child, item, idx); + } + this._ordered.push(child); + } + } + + /** + * @param {number} first + * @param {number} last + * @private + */ + _reset(first, last) { + const len = last - first + 1; + // Explain why swap prevActive with active - affects _assignChild. + const prevActive = this._active; + this._active = this._prevActive; + this._prevActive = prevActive; + let currentMarker = this._manageDom && this._firstChild; + this._ordered.length = 0; + for (let n = 0; n < len; n++) { + const idx = first + n; + const item = this._items[idx]; + const child = this._assignChild(idx); + this._ordered.push(child); + if (this._manageDom) { + if (currentMarker && this._maintainDomOrder) { + if (currentMarker === this._node(child)) { + currentMarker = this._nextSibling(child); + } else { + this._insertBefore(child, currentMarker); + } + } else if (!this._childIsAttached(child)) { + this._insertBefore(child, null); + } + } + if (this.updateChild) { + this.updateChild(child, item, idx); + } + } + } + + /** + * @param {number} idx + * @private + */ + _assignChild(idx) { + const item = this._items[idx]; + const key = this.itemKey ? this.itemKey(item) : idx; + let child; + if (child = this._keyToChild.get(key)) { + this._prevActive.delete(child); + } else { + child = this.newChild(item, idx); + this._keyToChild.set(key, child); + this._childToKey.set(child, key); + } + this._showChild(child); + this._active.set(child, idx); + return child; + } + + /** + * @param {*} child + * @param {number} idx + * @private + */ + _unassignChild(child, idx) { + this._hideChild(child); + if (this._incremental) { + this._active.delete(child); + this._prevActive.set(child, idx); + } else { + const key = this._childToKey.get(child); + this._childToKey.delete(child); + this._keyToChild.delete(key); + this._active.delete(child); + if (this.recycleChild) { + this.recycleChild(child, this._items[idx], idx); + } else { + this._removeChild(child); + } + } + } + + // TODO: Is this the right name? + /** + * @private + */ + get _firstChild() { + return this._ordered.length ? this._node(this._ordered[0]) : null; + } + + // Overridable abstractions for child manipulation + /** + * @protected + */ + _node(child) { + return child; + } + /** + * @protected + */ + _nextSibling(child) { + return child.nextSibling; + } + /** + * @protected + */ + _insertBefore(child, referenceNode) { + this._container.insertBefore(child, referenceNode); + } + /** + * @protected + */ + _childIsAttached(child) { + const node = this._node(child); + return node && node.parentNode === this._container; + } + /** + * @protected + */ + _hideChild(child) { + if (child.style) { + child.style.display = 'none'; + } + } + /** + * @protected + */ + _showChild(child) { + if (child.style) { + child.style.display = null; + } + } + + /** + * + * @param {!Element} child + * @return {{width: number, height: number, marginTop: number, marginBottom: number, marginLeft: number, marginRight: number}} childMeasures + * @protected + */ + _measureChild(child) { + // offsetWidth doesn't take transforms in consideration, + // so we use getBoundingClientRect which does. + const {width, height} = child.getBoundingClientRect(); + // console.debug(`_measureChild #${this._container.id} > #${ + // child.id}: height: ${height}px`); + return Object.assign({width, height}, getMargins(child)); + } + + /** + * Remove child. + * Override to control child removal. + * + * @param {*} child + * @protected + */ + _removeChild(child) { + child.parentNode.removeChild(child); + } +} + +function getMargins(el) { + const style = window.getComputedStyle(el); + // console.log(el.id, style.position); + return { + marginLeft: getMarginValue(style.marginLeft), + marginRight: getMarginValue(style.marginRight), + marginTop: getMarginValue(style.marginTop), + marginBottom: getMarginValue(style.marginBottom), + }; +} + +function getMarginValue(value) { + value = value ? parseFloat(value) : NaN; + return value !== value ? 0 : value; +} + +export const VirtualRepeater = Repeats(class {}); \ No newline at end of file
diff --git a/third_party/blink/renderer/core/style/computed_style.h b/third_party/blink/renderer/core/style/computed_style.h index 93936cb..cb9e30b 100644 --- a/third_party/blink/renderer/core/style/computed_style.h +++ b/third_party/blink/renderer/core/style/computed_style.h
@@ -1741,7 +1741,7 @@ bool IsFloating() const { return Floating() != EFloat::kNone; } // Mix-blend-mode utility functions. - bool HasBlendMode() const { return BlendMode() != WebBlendMode::kNormal; } + bool HasBlendMode() const { return GetBlendMode() != BlendMode::kNormal; } // Motion utility functions. bool HasOffset() const {
diff --git a/third_party/blink/renderer/core/style/fill_layer.cc b/third_party/blink/renderer/core/style/fill_layer.cc index 89ff2d84..7c0a92d 100644 --- a/third_party/blink/renderer/core/style/fill_layer.cc +++ b/third_party/blink/renderer/core/style/fill_layer.cc
@@ -386,9 +386,8 @@ bool FillLayer::ImageIsOpaque(const Document& document, const ComputedStyle& style) const { - // Returns true if we have an image that will cover the content below it when - // m_composite == CompositeSourceOver && m_blendMode == WebBlendModeNormal. - // Otherwise false. + // Returns whether we have an image that will cover the content below it when + // composite_ == CompositeSourceOver && blend_mode_ == BlendMode::kNormal. return image_->KnownToBeOpaque(document, style) && !image_->ImageSize(document, style.EffectiveZoom(), LayoutSize()) .IsEmpty(); @@ -417,7 +416,7 @@ case kCompositeCopy: return ImageTilesLayer(); case kCompositeSourceOver: - return (blend_mode_ == static_cast<unsigned>(WebBlendMode::kNormal)) && + return (blend_mode_ == static_cast<unsigned>(BlendMode::kNormal)) && ImageTilesLayer() && ImageIsOpaque(document, style); default: {} }
diff --git a/third_party/blink/renderer/core/style/fill_layer.h b/third_party/blink/renderer/core/style/fill_layer.h index c11b54a4..1d68e66 100644 --- a/third_party/blink/renderer/core/style/fill_layer.h +++ b/third_party/blink/renderer/core/style/fill_layer.h
@@ -78,9 +78,7 @@ CompositeOperator Composite() const { return static_cast<CompositeOperator>(composite_); } - WebBlendMode BlendMode() const { - return static_cast<WebBlendMode>(blend_mode_); - } + BlendMode GetBlendMode() const { return static_cast<BlendMode>(blend_mode_); } const LengthSize& SizeLength() const { return size_length_; } EFillSizeType SizeType() const { return static_cast<EFillSizeType>(size_type_); @@ -168,7 +166,7 @@ composite_ = c; composite_set_ = true; } - void SetBlendMode(WebBlendMode b) { + void SetBlendMode(BlendMode b) { blend_mode_ = static_cast<unsigned>(b); blend_mode_set_ = true; } @@ -274,8 +272,8 @@ static CompositeOperator InitialFillComposite(EFillLayerType) { return kCompositeSourceOver; } - static WebBlendMode InitialFillBlendMode(EFillLayerType) { - return WebBlendMode::kNormal; + static BlendMode InitialFillBlendMode(EFillLayerType) { + return BlendMode::kNormal; } static EFillSizeType InitialFillSizeType(EFillLayerType) { return EFillSizeType::kSizeLength; @@ -322,7 +320,7 @@ unsigned repeat_y_ : 3; // EFillRepeat unsigned composite_ : 4; // CompositeOperator unsigned size_type_ : 2; // EFillSizeType - unsigned blend_mode_ : 5; // WebBlendMode + unsigned blend_mode_ : 5; // BlendMode unsigned mask_source_type_ : 1; // EMaskSourceType unsigned background_x_origin_ : 2; // BackgroundEdgeOrigin unsigned background_y_origin_ : 2; // BackgroundEdgeOrigin
diff --git a/third_party/blink/renderer/core/svg/svg_fe_blend_element.cc b/third_party/blink/renderer/core/svg/svg_fe_blend_element.cc index a9582cc..3f12323 100644 --- a/third_party/blink/renderer/core/svg/svg_fe_blend_element.cc +++ b/third_party/blink/renderer/core/svg/svg_fe_blend_element.cc
@@ -26,10 +26,10 @@ namespace blink { -static WebBlendMode ToWebBlendMode(SVGFEBlendElement::Mode mode) { +static BlendMode ToBlendMode(SVGFEBlendElement::Mode mode) { #define MAP_BLEND_MODE(MODENAME) \ case SVGFEBlendElement::kMode##MODENAME: \ - return WebBlendMode::k##MODENAME + return BlendMode::k##MODENAME switch (mode) { MAP_BLEND_MODE(Normal); @@ -50,7 +50,7 @@ MAP_BLEND_MODE(Luminosity); default: NOTREACHED(); - return WebBlendMode::kNormal; + return BlendMode::kNormal; } #undef MAP_BLEND_MODE } @@ -123,8 +123,7 @@ const QualifiedName& attr_name) { FEBlend* blend = static_cast<FEBlend*>(effect); if (attr_name == SVGNames::modeAttr) - return blend->SetBlendMode( - ToWebBlendMode(mode_->CurrentValue()->EnumValue())); + return blend->SetBlendMode(ToBlendMode(mode_->CurrentValue()->EnumValue())); return SVGFilterPrimitiveStandardAttributes::SetFilterEffectAttribute( effect, attr_name); @@ -155,8 +154,8 @@ DCHECK(input1); DCHECK(input2); - FilterEffect* effect = FEBlend::Create( - filter, ToWebBlendMode(mode_->CurrentValue()->EnumValue())); + FilterEffect* effect = + FEBlend::Create(filter, ToBlendMode(mode_->CurrentValue()->EnumValue())); FilterEffectVector& input_effects = effect->InputEffects(); input_effects.ReserveCapacity(2); input_effects.push_back(input1);
diff --git a/third_party/blink/renderer/devtools/front_end/network/NetworkDataGridNode.js b/third_party/blink/renderer/devtools/front_end/network/NetworkDataGridNode.js index a2819ff..6eaaec9 100644 --- a/third_party/blink/renderer/devtools/front_end/network/NetworkDataGridNode.js +++ b/third_party/blink/renderer/devtools/front_end/network/NetworkDataGridNode.js
@@ -855,6 +855,12 @@ case Protocol.Network.BlockedReason.Inspector: reason = Common.UIString('devtools'); break; + case Protocol.Network.BlockedReason.SubresourceFilter: + reason = Common.UIString('subresource-filter'); + break; + case Protocol.Network.BlockedReason.ContentType: + reason = Common.UIString('content-type'); + break; case Protocol.Network.BlockedReason.Other: reason = Common.UIString('other'); break;
diff --git a/third_party/blink/renderer/modules/accessibility/ax_enums.cc b/third_party/blink/renderer/modules/accessibility/ax_enums.cc index 3a70238..059b4eb 100644 --- a/third_party/blink/renderer/modules/accessibility/ax_enums.cc +++ b/third_party/blink/renderer/modules/accessibility/ax_enums.cc
@@ -180,6 +180,14 @@ STATIC_ASSERT_ENUM(kWebAXAriaCurrentStateDate, kAriaCurrentStateDate); STATIC_ASSERT_ENUM(kWebAXAriaCurrentStateTime, kAriaCurrentStateTime); +STATIC_ASSERT_ENUM(kWebAXHasPopupFalse, kAXHasPopupFalse); +STATIC_ASSERT_ENUM(kWebAXHasPopupTrue, kAXHasPopupTrue); +STATIC_ASSERT_ENUM(kWebAXHasPopupMenu, kAXHasPopupMenu); +STATIC_ASSERT_ENUM(kWebAXHasPopupListbox, kAXHasPopupListbox); +STATIC_ASSERT_ENUM(kWebAXHasPopupTree, kAXHasPopupTree); +STATIC_ASSERT_ENUM(kWebAXHasPopupGrid, kAXHasPopupGrid); +STATIC_ASSERT_ENUM(kWebAXHasPopupDialog, kAXHasPopupDialog); + STATIC_ASSERT_ENUM(kWebAXInvalidStateUndefined, kInvalidStateUndefined); STATIC_ASSERT_ENUM(kWebAXInvalidStateFalse, kInvalidStateFalse); STATIC_ASSERT_ENUM(kWebAXInvalidStateTrue, kInvalidStateTrue);
diff --git a/third_party/blink/renderer/modules/accessibility/ax_enums.h b/third_party/blink/renderer/modules/accessibility/ax_enums.h index 8dface8..bc51aacd 100644 --- a/third_party/blink/renderer/modules/accessibility/ax_enums.h +++ b/third_party/blink/renderer/modules/accessibility/ax_enums.h
@@ -217,6 +217,16 @@ kAriaCurrentStateTime }; +enum AXHasPopup { + kAXHasPopupFalse = 0, + kAXHasPopupTrue, + kAXHasPopupMenu, + kAXHasPopupListbox, + kAXHasPopupTree, + kAXHasPopupGrid, + kAXHasPopupDialog +}; + enum InvalidState { kInvalidStateUndefined = 0, kInvalidStateFalse,
diff --git a/third_party/blink/renderer/modules/accessibility/ax_layout_object.cc b/third_party/blink/renderer/modules/accessibility/ax_layout_object.cc index 1bed366..f248d44 100644 --- a/third_party/blink/renderer/modules/accessibility/ax_layout_object.cc +++ b/third_party/blink/renderer/modules/accessibility/ax_layout_object.cc
@@ -258,7 +258,7 @@ if (node && node->IsLink()) return kImageMapRole; if (IsHTMLInputElement(node)) - return AriaHasPopup() ? kPopUpButtonRole : kButtonRole; + return HasPopup() ? kPopUpButtonRole : kButtonRole; if (IsSVGImage()) return kSVGRootRole; return kImageRole; @@ -1351,14 +1351,39 @@ describedby); } -bool AXLayoutObject::AriaHasPopup() const { +AXHasPopup AXLayoutObject::HasPopup() const { const AtomicString& has_popup = GetAOMPropertyOrARIAAttribute(AOMStringProperty::kHasPopUp); - if (!has_popup.IsNull()) - return !has_popup.IsEmpty() && !EqualIgnoringASCIICase(has_popup, "false"); + if (!has_popup.IsNull()) { + if (EqualIgnoringASCIICase(has_popup, "false")) + return kAXHasPopupFalse; - return RoleValue() == kComboBoxMenuButtonRole || - RoleValue() == kTextFieldWithComboBoxRole; + if (EqualIgnoringASCIICase(has_popup, "listbox")) + return kAXHasPopupListbox; + + if (EqualIgnoringASCIICase(has_popup, "tree")) + return kAXHasPopupTree; + + if (EqualIgnoringASCIICase(has_popup, "grid")) + return kAXHasPopupGrid; + + if (EqualIgnoringASCIICase(has_popup, "dialog")) + return kAXHasPopupDialog; + + // To provide backward compatibility with ARIA 1.0 content, + // user agents MUST treat an aria-haspopup value of true + // as equivalent to a value of menu. + // And unknown value also return menu too. + if (EqualIgnoringASCIICase(has_popup, "true") || + EqualIgnoringASCIICase(has_popup, "menu") || !has_popup.IsEmpty()) + return kAXHasPopupMenu; + } + + if (RoleValue() == kComboBoxMenuButtonRole || + RoleValue() == kTextFieldWithComboBoxRole) + return kAXHasPopupMenu; + + return AXObject::HasPopup(); } // TODO : Aria-dropeffect and aria-grabbed are deprecated in aria 1.1
diff --git a/third_party/blink/renderer/modules/accessibility/ax_layout_object.h b/third_party/blink/renderer/modules/accessibility/ax_layout_object.h index 316a395..b2e0b5d 100644 --- a/third_party/blink/renderer/modules/accessibility/ax_layout_object.h +++ b/third_party/blink/renderer/modules/accessibility/ax_layout_object.h
@@ -118,7 +118,7 @@ void AriaDescribedbyElements(AXObjectVector&) const override; void AriaOwnsElements(AXObjectVector&) const override; - bool AriaHasPopup() const override; + AXHasPopup HasPopup() const override; bool SupportsARIADragging() const override; bool SupportsARIADropping() const override; bool SupportsARIAFlowTo() const override;
diff --git a/third_party/blink/renderer/modules/accessibility/ax_object.cc b/third_party/blink/renderer/modules/accessibility/ax_object.cc index 13c2f0dd..dcc0ada 100644 --- a/third_party/blink/renderer/modules/accessibility/ax_object.cc +++ b/third_party/blink/renderer/modules/accessibility/ax_object.cc
@@ -2762,7 +2762,7 @@ // http://www.w3.org/TR/wai-aria/states_and_properties#aria-pressed if (AriaPressedIsPresent()) return kToggleButtonRole; - if (AriaHasPopup()) + if (HasPopup()) return kPopUpButtonRole; // We don't contemplate RadioButtonRole, as it depends on the input // type.
diff --git a/third_party/blink/renderer/modules/accessibility/ax_object.h b/third_party/blink/renderer/modules/accessibility/ax_object.h index d2304bfe7..09170d2d 100644 --- a/third_party/blink/renderer/modules/accessibility/ax_object.h +++ b/third_party/blink/renderer/modules/accessibility/ax_object.h
@@ -560,7 +560,7 @@ virtual String AriaAutoComplete() const { return String(); } virtual void AriaOwnsElements(AXObjectVector& owns) const {} virtual void AriaDescribedbyElements(AXObjectVector&) const {} - virtual bool AriaHasPopup() const { return false; } + virtual AXHasPopup HasPopup() const { return kAXHasPopupFalse; } virtual bool IsEditable() const { return false; } bool IsEditableRoot() const; virtual bool ComputeIsEditableRoot() const { return false; }
diff --git a/third_party/blink/renderer/modules/accessibility/inspector_accessibility_agent.cc b/third_party/blink/renderer/modules/accessibility/inspector_accessibility_agent.cc index 64672d5..a91842b 100644 --- a/third_party/blink/renderer/modules/accessibility/inspector_accessibility_agent.cc +++ b/third_party/blink/renderer/modules/accessibility/inspector_accessibility_agent.cc
@@ -39,6 +39,44 @@ static const AXID kIDForInspectedNodeWithNoAXNode = 0; +void AddHasPopupProperty(AXHasPopup has_popup, + protocol::Array<AXProperty>& properties) { + switch (has_popup) { + case kAXHasPopupFalse: + break; + case kAXHasPopupTrue: + properties.addItem( + CreateProperty(AXPropertyNameEnum::HasPopup, + CreateValue("true", AXValueTypeEnum::Token))); + break; + case kAXHasPopupMenu: + properties.addItem( + CreateProperty(AXPropertyNameEnum::HasPopup, + CreateValue("menu", AXValueTypeEnum::Token))); + break; + case kAXHasPopupListbox: + properties.addItem( + CreateProperty(AXPropertyNameEnum::HasPopup, + CreateValue("listbox", AXValueTypeEnum::Token))); + break; + case kAXHasPopupTree: + properties.addItem( + CreateProperty(AXPropertyNameEnum::HasPopup, + CreateValue("tree", AXValueTypeEnum::Token))); + break; + case kAXHasPopupGrid: + properties.addItem( + CreateProperty(AXPropertyNameEnum::HasPopup, + CreateValue("grid", AXValueTypeEnum::Token))); + break; + case kAXHasPopupDialog: + properties.addItem( + CreateProperty(AXPropertyNameEnum::HasPopup, + CreateValue("dialog", AXValueTypeEnum::Token))); + break; + } +} + void FillLiveRegionProperties(AXObject& ax_object, protocol::Array<AXProperty>& properties) { if (!ax_object.LiveRegionRoot()) @@ -78,6 +116,8 @@ CreateRelatedNodeListValue(*hidden_root))); } + AddHasPopupProperty(ax_object.HasPopup(), properties); + InvalidState invalid_state = ax_object.GetInvalidState(); switch (invalid_state) { case kInvalidStateUndefined: @@ -153,11 +193,7 @@ CreateProperty(AXPropertyNameEnum::Autocomplete, CreateValue(autocomplete, AXValueTypeEnum::Token))); - bool has_popup = ax_object.AriaHasPopup(); - if (has_popup || ax_object.HasAttribute(HTMLNames::aria_haspopupAttr)) { - properties.addItem(CreateProperty(AXPropertyNameEnum::Haspopup, - CreateBooleanValue(has_popup))); - } + AddHasPopupProperty(ax_object.HasPopup(), properties); int heading_level = ax_object.HeadingLevel(); if (heading_level > 0) {
diff --git a/third_party/blink/renderer/modules/canvas/canvas2d/base_rendering_context_2d.cc b/third_party/blink/renderer/modules/canvas/canvas2d/base_rendering_context_2d.cc index 60cc876..e5aa18f1 100644 --- a/third_party/blink/renderer/modules/canvas/canvas2d/base_rendering_context_2d.cc +++ b/third_party/blink/renderer/modules/canvas/canvas2d/base_rendering_context_2d.cc
@@ -392,20 +392,20 @@ String BaseRenderingContext2D::globalCompositeOperation() const { return CompositeOperatorName( - CompositeOperatorFromSkia(GetState().GlobalComposite()), - BlendModeFromSkia(GetState().GlobalComposite())); + CompositeOperatorFromSkBlendMode(GetState().GlobalComposite()), + BlendModeFromSkBlendMode(GetState().GlobalComposite())); } void BaseRenderingContext2D::setGlobalCompositeOperation( const String& operation) { CompositeOperator op = kCompositeSourceOver; - WebBlendMode blend_mode = WebBlendMode::kNormal; - if (!ParseCompositeAndBlendOperator(operation, op, blend_mode)) + BlendMode blend_mode = BlendMode::kNormal; + if (!ParseCompositeAndBlendMode(operation, op, blend_mode)) return; - SkBlendMode xfermode = WebCoreCompositeToSkiaComposite(op, blend_mode); - if (GetState().GlobalComposite() == xfermode) + SkBlendMode sk_blend_mode = WebCoreCompositeToSkiaComposite(op, blend_mode); + if (GetState().GlobalComposite() == sk_blend_mode) return; - ModifiableState().SetGlobalComposite(xfermode); + ModifiableState().SetGlobalComposite(sk_blend_mode); } String BaseRenderingContext2D::filter() const {
diff --git a/third_party/blink/renderer/modules/exported/web_ax_object.cc b/third_party/blink/renderer/modules/exported/web_ax_object.cc index 8796b1a..4102333 100644 --- a/third_party/blink/renderer/modules/exported/web_ax_object.cc +++ b/third_party/blink/renderer/modules/exported/web_ax_object.cc
@@ -437,11 +437,11 @@ return WebAXObject(private_->ActiveDescendant()); } -bool WebAXObject::AriaHasPopup() const { +WebAXHasPopup WebAXObject::HasPopup() const { if (IsDetached()) - return false; + return kWebAXHasPopupFalse; - return private_->AriaHasPopup(); + return static_cast<WebAXHasPopup>(private_->HasPopup()); } bool WebAXObject::IsEditableRoot() const {
diff --git a/third_party/blink/renderer/modules/media_controls/resources/default_100_percent/modern/gradient_bg.png b/third_party/blink/renderer/modules/media_controls/resources/default_100_percent/modern/gradient_bg.png index db067fa..1e6d5caa 100644 --- a/third_party/blink/renderer/modules/media_controls/resources/default_100_percent/modern/gradient_bg.png +++ b/third_party/blink/renderer/modules/media_controls/resources/default_100_percent/modern/gradient_bg.png Binary files differ
diff --git a/third_party/blink/renderer/modules/media_controls/resources/default_200_percent/modern/gradient_bg.png b/third_party/blink/renderer/modules/media_controls/resources/default_200_percent/modern/gradient_bg.png index ec14c17..0cf01979 100644 --- a/third_party/blink/renderer/modules/media_controls/resources/default_200_percent/modern/gradient_bg.png +++ b/third_party/blink/renderer/modules/media_controls/resources/default_200_percent/modern/gradient_bg.png Binary files differ
diff --git a/third_party/blink/renderer/modules/media_controls/resources/modernMediaControls.css b/third_party/blink/renderer/modules/media_controls/resources/modernMediaControls.css index 25ecf20..e4e9599 100644 --- a/third_party/blink/renderer/modules/media_controls/resources/modernMediaControls.css +++ b/third_party/blink/renderer/modules/media_controls/resources/modernMediaControls.css
@@ -131,7 +131,7 @@ overflow: hidden; text-align: right; bottom: auto; - height: 32px; + height: 48px; min-width: 48px; line-height: 30px; padding: 0 10px 0 16px; @@ -193,6 +193,14 @@ color: inherit; } +video::-webkit-media-controls:not(.audio-only) input[pseudo="-webkit-media-controls-mute-button" i], +video::-webkit-media-controls:not(.audio-only) input[pseudo="-webkit-media-controls-fullscreen-button" i], +video::-webkit-media-controls:not(.audio-only) input[pseudo="-internal-media-controls-overflow-button" i] { + width: 48px; + height: 48px; + min-width: 48px; +} + audio::-webkit-media-controls-play-button, video::-webkit-media-controls-play-button { background-image: -webkit-image-set(url(ic_play_arrow.svg) 1x); @@ -288,7 +296,7 @@ box-sizing: border-box; overflow: hidden; background: transparent; - margin-bottom: -40px; + margin-bottom: -61px; position: relative; opacity: 1; transition: opacity 0.25s cubic-bezier(0.25, 0.1, 0.25, 1); @@ -351,8 +359,9 @@ } video::-webkit-media-controls-timeline { - padding-top: 5px; - padding-bottom: 17px; + padding-top: 16px; + padding-bottom: 12px; + z-index: 0; } input[pseudo="-webkit-media-controls-timeline" i]::-internal-media-controls-segmented-track {
diff --git a/third_party/blink/renderer/modules/media_controls/resources/modernMediaControls_loading.css b/third_party/blink/renderer/modules/media_controls/resources/modernMediaControls_loading.css index 612d467..e9f59a6 100644 --- a/third_party/blink/renderer/modules/media_controls/resources/modernMediaControls_loading.css +++ b/third_party/blink/renderer/modules/media_controls/resources/modernMediaControls_loading.css
@@ -151,14 +151,14 @@ #cutoff-2 { top: 50%; - bottom: 21px; + bottom: 16px; margin-top: 19px; } #cutoff-3, #cutoff-4 { top: 0; - bottom: 21px; + bottom: 16px; } #cutoff-3 { @@ -179,6 +179,6 @@ left: 0; right: 0; border: solid white; - border-width: 0 16px 17px; + border-width: 0 16px 12px; height: 4px; }
diff --git a/third_party/blink/renderer/platform/exported/web_runtime_features.cc b/third_party/blink/renderer/platform/exported/web_runtime_features.cc index 3c68bd6..fb6c283b 100644 --- a/third_party/blink/renderer/platform/exported/web_runtime_features.cc +++ b/third_party/blink/renderer/platform/exported/web_runtime_features.cc
@@ -516,4 +516,8 @@ RuntimeEnabledFeatures::SetOffMainThreadWebSocketEnabled(enable); } +void WebRuntimeFeatures::EnableExperimentalProductivityFeatures(bool enable) { + RuntimeEnabledFeatures::SetExperimentalProductivityFeaturesEnabled(enable); +} + } // namespace blink
diff --git a/third_party/blink/renderer/platform/graphics/compositing/composited_layer_raster_invalidator.cc b/third_party/blink/renderer/platform/graphics/compositing/composited_layer_raster_invalidator.cc index f55abfb..0c8c7bd 100644 --- a/third_party/blink/renderer/platform/graphics/compositing/composited_layer_raster_invalidator.cc +++ b/third_party/blink/renderer/platform/graphics/compositing/composited_layer_raster_invalidator.cc
@@ -134,7 +134,7 @@ if (matched_old_index == kNotFound) { // The new chunk doesn't match any old chunk. FullyInvalidateNewChunk(new_chunk_info, - PaintInvalidationReason::kAppeared); + PaintInvalidationReason::kChunkAppeared); continue; } @@ -186,7 +186,7 @@ continue; FullyInvalidateOldChunk(paint_chunks_info_[i], paint_chunks_info_[i].is_cacheable - ? PaintInvalidationReason::kDisappeared + ? PaintInvalidationReason::kChunkDisappeared : PaintInvalidationReason::kChunkUncacheable); } }
diff --git a/third_party/blink/renderer/platform/graphics/compositing/composited_layer_raster_invalidator_test.cc b/third_party/blink/renderer/platform/graphics/compositing/composited_layer_raster_invalidator_test.cc index 2b10b67b..8f9f57e 100644 --- a/third_party/blink/renderer/platform/graphics/compositing/composited_layer_raster_invalidator_test.cc +++ b/third_party/blink/renderer/platform/graphics/compositing/composited_layer_raster_invalidator_test.cc
@@ -282,13 +282,13 @@ ASSERT_EQ(6u, invalidations.size()); EXPECT_DISPLAY_ITEM_INVALIDATIONS(invalidations, 0, new_artifact, 0); EXPECT_CHUNK_INVALIDATION(invalidations, 2, new_artifact.PaintChunks()[1], - PaintInvalidationReason::kAppeared); + PaintInvalidationReason::kChunkAppeared); EXPECT_CHUNK_INVALIDATION(invalidations, 3, new_artifact.PaintChunks()[2], - PaintInvalidationReason::kAppeared); + PaintInvalidationReason::kChunkAppeared); EXPECT_CHUNK_INVALIDATION(invalidations, 4, artifact.PaintChunks()[1], - PaintInvalidationReason::kDisappeared); + PaintInvalidationReason::kChunkDisappeared); EXPECT_CHUNK_INVALIDATION(invalidations, 5, artifact.PaintChunks()[2], - PaintInvalidationReason::kDisappeared); + PaintInvalidationReason::kChunkDisappeared); } TEST_F(CompositedLayerRasterInvalidatorTest, AppearAtEnd) { @@ -312,9 +312,9 @@ ASSERT_EQ(4u, invalidations.size()); EXPECT_DISPLAY_ITEM_INVALIDATIONS(invalidations, 0, new_artifact, 0); EXPECT_CHUNK_INVALIDATION(invalidations, 2, new_artifact.PaintChunks()[1], - PaintInvalidationReason::kAppeared); + PaintInvalidationReason::kChunkAppeared); EXPECT_CHUNK_INVALIDATION(invalidations, 3, new_artifact.PaintChunks()[2], - PaintInvalidationReason::kAppeared); + PaintInvalidationReason::kChunkAppeared); } TEST_F(CompositedLayerRasterInvalidatorTest, UncacheableChunks) {
diff --git a/third_party/blink/renderer/platform/graphics/filters/fe_blend.cc b/third_party/blink/renderer/platform/graphics/filters/fe_blend.cc index f8dd282..4aea378 100644 --- a/third_party/blink/renderer/platform/graphics/filters/fe_blend.cc +++ b/third_party/blink/renderer/platform/graphics/filters/fe_blend.cc
@@ -31,18 +31,14 @@ namespace blink { -FEBlend::FEBlend(Filter* filter, WebBlendMode mode) +FEBlend::FEBlend(Filter* filter, BlendMode mode) : FilterEffect(filter), mode_(mode) {} -FEBlend* FEBlend::Create(Filter* filter, WebBlendMode mode) { +FEBlend* FEBlend::Create(Filter* filter, BlendMode mode) { return new FEBlend(filter, mode); } -WebBlendMode FEBlend::BlendMode() const { - return mode_; -} - -bool FEBlend::SetBlendMode(WebBlendMode mode) { +bool FEBlend::SetBlendMode(BlendMode mode) { if (mode_ == mode) return false; mode_ = mode; @@ -66,7 +62,7 @@ ts << "[feBlend"; FilterEffect::ExternalRepresentation(ts); ts << " mode=\"" - << (mode_ == WebBlendMode::kNormal + << (mode_ == BlendMode::kNormal ? "normal" : CompositeOperatorName(kCompositeSourceOver, mode_)) << "\"]\n";
diff --git a/third_party/blink/renderer/platform/graphics/filters/fe_blend.h b/third_party/blink/renderer/platform/graphics/filters/fe_blend.h index 696605e..27f3a44 100644 --- a/third_party/blink/renderer/platform/graphics/filters/fe_blend.h +++ b/third_party/blink/renderer/platform/graphics/filters/fe_blend.h
@@ -23,26 +23,26 @@ #ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_GRAPHICS_FILTERS_FE_BLEND_H_ #define THIRD_PARTY_BLINK_RENDERER_PLATFORM_GRAPHICS_FILTERS_FE_BLEND_H_ -#include "third_party/blink/public/platform/web_blend_mode.h" #include "third_party/blink/renderer/platform/graphics/filters/filter_effect.h" +#include "third_party/blink/renderer/platform/graphics/graphics_types.h" namespace blink { class PLATFORM_EXPORT FEBlend final : public FilterEffect { public: - static FEBlend* Create(Filter*, WebBlendMode); + static FEBlend* Create(Filter*, BlendMode); - WebBlendMode BlendMode() const; - bool SetBlendMode(WebBlendMode); + BlendMode GetBlendMode() const { return mode_; } + bool SetBlendMode(BlendMode); TextStream& ExternalRepresentation(TextStream&, int indention) const override; private: - FEBlend(Filter*, WebBlendMode); + FEBlend(Filter*, BlendMode); sk_sp<PaintFilter> CreateImageFilter() override; - WebBlendMode mode_; + BlendMode mode_; }; } // namespace blink
diff --git a/third_party/blink/renderer/platform/graphics/filters/image_filter_builder_test.cc b/third_party/blink/renderer/platform/graphics/filters/image_filter_builder_test.cc index a226148..1f15afc0 100644 --- a/third_party/blink/renderer/platform/graphics/filters/image_filter_builder_test.cc +++ b/third_party/blink/renderer/platform/graphics/filters/image_filter_builder_test.cc
@@ -52,7 +52,7 @@ // Add a blend effect (with inputs : blur, source) FilterEffect* blend_effect = - FEBlend::Create(reference_filter, WebBlendMode::kNormal); + FEBlend::Create(reference_filter, BlendMode::kNormal); blend_effect->SetOperatingInterpolationSpace(kInterpolationSpaceSRGB); FilterEffectVector& blend_inputs = blend_effect->InputEffects(); blend_inputs.ReserveCapacity(2);
diff --git a/third_party/blink/renderer/platform/graphics/graphics_layer.cc b/third_party/blink/renderer/platform/graphics/graphics_layer.cc index 48f36d3f..799a5303 100644 --- a/third_party/blink/renderer/platform/graphics/graphics_layer.cc +++ b/third_party/blink/renderer/platform/graphics/graphics_layer.cc
@@ -29,7 +29,7 @@ #include <cmath> #include <memory> #include <utility> -#include "SkMatrix44.h" + #include "base/memory/ptr_util.h" #include "base/trace_event/trace_event_argument.h" #include "cc/layers/layer.h" @@ -61,6 +61,7 @@ #include "third_party/blink/renderer/platform/graphics/paint/paint_controller.h" #include "third_party/blink/renderer/platform/graphics/paint/property_tree_state.h" #include "third_party/blink/renderer/platform/graphics/paint/raster_invalidation_tracking.h" +#include "third_party/blink/renderer/platform/graphics/skia/skia_utils.h" #include "third_party/blink/renderer/platform/instrumentation/tracing/trace_event.h" #include "third_party/blink/renderer/platform/json/json_values.h" #include "third_party/blink/renderer/platform/scroll/scroll_snap_data.h" @@ -72,6 +73,7 @@ #include "third_party/blink/renderer/platform/wtf/text/string_utf8_adaptor.h" #include "third_party/blink/renderer/platform/wtf/text/wtf_string.h" #include "third_party/blink/renderer/platform/wtf/time.h" +#include "third_party/skia/include/core/SkMatrix44.h" namespace blink { @@ -84,7 +86,7 @@ : client_(client), background_color_(Color::kTransparent), opacity_(1), - blend_mode_(WebBlendMode::kNormal), + blend_mode_(BlendMode::kNormal), has_transform_origin_(false), contents_opaque_(false), should_flatten_transform_(true), @@ -770,7 +772,7 @@ if (opacity_ != 1) json->SetDouble("opacity", opacity_); - if (blend_mode_ != WebBlendMode::kNormal) { + if (blend_mode_ != BlendMode::kNormal) { json->SetString("blendMode", CompositeOperatorName(kCompositeSourceOver, blend_mode_)); } @@ -1141,11 +1143,11 @@ PlatformLayer()->SetOpacity(opacity); } -void GraphicsLayer::SetBlendMode(WebBlendMode blend_mode) { +void GraphicsLayer::SetBlendMode(BlendMode blend_mode) { if (blend_mode_ == blend_mode) return; blend_mode_ = blend_mode; - PlatformLayer()->SetBlendMode(blend_mode); + PlatformLayer()->SetBlendMode(WebCoreBlendModeToSkBlendMode(blend_mode)); } void GraphicsLayer::SetIsRootForIsolatedGroup(bool isolated) {
diff --git a/third_party/blink/renderer/platform/graphics/graphics_layer.h b/third_party/blink/renderer/platform/graphics/graphics_layer.h index 9077f50..d179891 100644 --- a/third_party/blink/renderer/platform/graphics/graphics_layer.h +++ b/third_party/blink/renderer/platform/graphics/graphics_layer.h
@@ -43,6 +43,7 @@ #include "third_party/blink/renderer/platform/graphics/graphics_context.h" #include "third_party/blink/renderer/platform/graphics/graphics_layer_client.h" #include "third_party/blink/renderer/platform/graphics/graphics_layer_debug_info.h" +#include "third_party/blink/renderer/platform/graphics/graphics_types.h" #include "third_party/blink/renderer/platform/graphics/image_orientation.h" #include "third_party/blink/renderer/platform/graphics/paint/display_item_client.h" #include "third_party/blink/renderer/platform/graphics/paint/paint_controller.h" @@ -180,7 +181,7 @@ float Opacity() const { return opacity_; } void SetOpacity(float); - void SetBlendMode(WebBlendMode); + void SetBlendMode(BlendMode); void SetIsRootForIsolatedGroup(bool); void SetHitTestableWithoutDrawsContent(bool); @@ -380,7 +381,7 @@ Color background_color_; float opacity_; - WebBlendMode blend_mode_; + BlendMode blend_mode_; bool has_transform_origin_ : 1; bool contents_opaque_ : 1;
diff --git a/third_party/blink/renderer/platform/graphics/graphics_types.cc b/third_party/blink/renderer/platform/graphics/graphics_types.cc index a0e1a37..703a49c 100644 --- a/third_party/blink/renderer/platform/graphics/graphics_types.cc +++ b/third_party/blink/renderer/platform/graphics/graphics_types.cc
@@ -26,6 +26,7 @@ #include "third_party/blink/renderer/platform/graphics/graphics_types.h" +#include "base/stl_util.h" #include "third_party/blink/renderer/platform/wtf/assertions.h" #include "third_party/blink/renderer/platform/wtf/text/wtf_string.h" @@ -44,28 +45,28 @@ "xor", "lighter"}; -static const char* const kBlendOperatorNames[] = { +static const char* const kBlendModeNames[] = { "normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"}; -const int kNumCompositeOperatorNames = arraysize(kCompositeOperatorNames); -const int kNumBlendOperatorNames = arraysize(kBlendOperatorNames); +const int kNumCompositeOperatorNames = base::size(kCompositeOperatorNames); +const int kNumBlendModeNames = base::size(kBlendModeNames); -bool ParseCompositeAndBlendOperator(const String& s, - CompositeOperator& op, - WebBlendMode& blend_op) { +bool ParseCompositeAndBlendMode(const String& s, + CompositeOperator& op, + BlendMode& blend_op) { for (int i = 0; i < kNumCompositeOperatorNames; i++) { if (s == kCompositeOperatorNames[i]) { op = static_cast<CompositeOperator>(i); - blend_op = WebBlendMode::kNormal; + blend_op = BlendMode::kNormal; return true; } } - for (int i = 0; i < kNumBlendOperatorNames; i++) { - if (s == kBlendOperatorNames[i]) { - blend_op = static_cast<WebBlendMode>(i); + for (int i = 0; i < kNumBlendModeNames; i++) { + if (s == kBlendModeNames[i]) { + blend_op = static_cast<BlendMode>(i); op = kCompositeSourceOver; return true; } @@ -74,12 +75,12 @@ return false; } -String CompositeOperatorName(CompositeOperator op, WebBlendMode blend_op) { +String CompositeOperatorName(CompositeOperator op, BlendMode blend_op) { DCHECK_GE(op, 0); DCHECK_LT(op, kNumCompositeOperatorNames); DCHECK_GE(static_cast<unsigned>(blend_op), 0u); - if (blend_op != WebBlendMode::kNormal) - return kBlendOperatorNames[static_cast<unsigned>(blend_op)]; + if (blend_op != BlendMode::kNormal) + return kBlendModeNames[static_cast<unsigned>(blend_op)]; return kCompositeOperatorNames[op]; }
diff --git a/third_party/blink/renderer/platform/graphics/graphics_types.h b/third_party/blink/renderer/platform/graphics/graphics_types.h index bec1ca3..636dd547 100644 --- a/third_party/blink/renderer/platform/graphics/graphics_types.h +++ b/third_party/blink/renderer/platform/graphics/graphics_types.h
@@ -26,7 +26,6 @@ #ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_GRAPHICS_GRAPHICS_TYPES_H_ #define THIRD_PARTY_BLINK_RENDERER_PLATFORM_GRAPHICS_GRAPHICS_TYPES_H_ -#include "third_party/blink/public/platform/web_blend_mode.h" #include "third_party/blink/renderer/platform/platform_export.h" #include "third_party/blink/renderer/platform/wtf/forward.h" #include "third_party/skia/include/core/SkFilterQuality.h" @@ -87,6 +86,25 @@ kCompositePlusLighter }; +enum class BlendMode { + kNormal, + kMultiply, + kScreen, + kOverlay, + kDarken, + kLighten, + kColorDodge, + kColorBurn, + kHardLight, + kSoftLight, + kDifference, + kExclusion, + kHue, + kSaturation, + kColor, + kLuminosity, +}; + enum OpacityMode { kNonOpaque, kOpaque, @@ -191,10 +209,10 @@ RULE_EVENODD = SkPath::kEvenOdd_FillType }; -PLATFORM_EXPORT String CompositeOperatorName(CompositeOperator, WebBlendMode); -PLATFORM_EXPORT bool ParseCompositeAndBlendOperator(const String&, - CompositeOperator&, - WebBlendMode&); +PLATFORM_EXPORT String CompositeOperatorName(CompositeOperator, BlendMode); +PLATFORM_EXPORT bool ParseCompositeAndBlendMode(const String&, + CompositeOperator&, + BlendMode&); PLATFORM_EXPORT String LineCapName(LineCap); PLATFORM_EXPORT bool ParseLineCap(const String&, LineCap&);
diff --git a/third_party/blink/renderer/platform/graphics/paint/compositing_display_item.h b/third_party/blink/renderer/platform/graphics/paint/compositing_display_item.h index ba7ca46..f8aaa70 100644 --- a/third_party/blink/renderer/platform/graphics/paint/compositing_display_item.h +++ b/third_party/blink/renderer/platform/graphics/paint/compositing_display_item.h
@@ -5,10 +5,10 @@ #ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_GRAPHICS_PAINT_COMPOSITING_DISPLAY_ITEM_H_ #define THIRD_PARTY_BLINK_RENDERER_PLATFORM_GRAPHICS_PAINT_COMPOSITING_DISPLAY_ITEM_H_ -#include "third_party/blink/public/platform/web_blend_mode.h" #include "third_party/blink/renderer/platform/geometry/float_rect.h" #include "third_party/blink/renderer/platform/graphics/graphics_types.h" #include "third_party/blink/renderer/platform/graphics/paint/display_item.h" +#include "third_party/skia/include/core/SkBlendMode.h" namespace blink {
diff --git a/third_party/blink/renderer/platform/graphics/paint_invalidation_reason.cc b/third_party/blink/renderer/platform/graphics/paint_invalidation_reason.cc index 4b2381e..e2d2623 100644 --- a/third_party/blink/renderer/platform/graphics/paint_invalidation_reason.cc +++ b/third_party/blink/renderer/platform/graphics/paint_invalidation_reason.cc
@@ -50,6 +50,10 @@ return "DocumentMarker change"; case PaintInvalidationReason::kImage: return "image"; + case PaintInvalidationReason::kChunkAppeared: + return "chunk appeared"; + case PaintInvalidationReason::kChunkDisappeared: + return "chunk disappeared"; case PaintInvalidationReason::kChunkUncacheable: return "chunk uncacheable"; case PaintInvalidationReason::kChunkReordered:
diff --git a/third_party/blink/renderer/platform/graphics/paint_invalidation_reason.h b/third_party/blink/renderer/platform/graphics/paint_invalidation_reason.h index c1a324d0..43b9c79 100644 --- a/third_party/blink/renderer/platform/graphics/paint_invalidation_reason.h +++ b/third_party/blink/renderer/platform/graphics/paint_invalidation_reason.h
@@ -32,6 +32,8 @@ kCaret, kDocumentMarker, kImage, + kChunkAppeared, + kChunkDisappeared, kChunkUncacheable, kChunkReordered, kPaintProperty,
diff --git a/third_party/blink/renderer/platform/graphics/skia/skia_utils.cc b/third_party/blink/renderer/platform/graphics/skia/skia_utils.cc index 9bdc50f..5e245b1 100644 --- a/third_party/blink/renderer/platform/graphics/skia/skia_utils.cc +++ b/third_party/blink/renderer/platform/graphics/skia/skia_utils.cc
@@ -40,10 +40,10 @@ namespace blink { -static const struct CompositOpToXfermodeMode { +static const struct CompositOpToSkBlendMode { CompositeOperator composit_op; SkBlendMode xfermode_mode; -} kGMapCompositOpsToXfermodeModes[] = { +} kGMapCompositOpsToSkBlendMode[] = { {kCompositeClear, SkBlendMode::kClear}, {kCompositeCopy, SkBlendMode::kSrc}, {kCompositeSourceOver, SkBlendMode::kSrcOver}, @@ -57,45 +57,45 @@ {kCompositeXOR, SkBlendMode::kXor}, {kCompositePlusLighter, SkBlendMode::kPlus}}; -// Keep this array in sync with the WebBlendMode enum in -// public/platform/WebBlendMode.h. -static const SkBlendMode kGMapBlendOpsToXfermodeModes[] = { - SkBlendMode::kSrcOver, // WebBlendModeNormal - SkBlendMode::kMultiply, // WebBlendModeMultiply - SkBlendMode::kScreen, // WebBlendModeScreen - SkBlendMode::kOverlay, // WebBlendModeOverlay - SkBlendMode::kDarken, // WebBlendModeDarken - SkBlendMode::kLighten, // WebBlendModeLighten - SkBlendMode::kColorDodge, // WebBlendModeColorDodge - SkBlendMode::kColorBurn, // WebBlendModeColorBurn - SkBlendMode::kHardLight, // WebBlendModeHardLight - SkBlendMode::kSoftLight, // WebBlendModeSoftLight - SkBlendMode::kDifference, // WebBlendModeDifference - SkBlendMode::kExclusion, // WebBlendModeExclusion - SkBlendMode::kHue, // WebBlendModeHue - SkBlendMode::kSaturation, // WebBlendModeSaturation - SkBlendMode::kColor, // WebBlendModeColor - SkBlendMode::kLuminosity // WebBlendModeLuminosity +// Keep this array in sync with the BlendMode enum in +// platform/graphics/graphics_types.h. +static const SkBlendMode kGMapBlendOpsToSkBlendMode[] = { + SkBlendMode::kSrcOver, // BlendMode::kNormal + SkBlendMode::kMultiply, // BlendMode::kMultiply + SkBlendMode::kScreen, // BlendMode::kScreen + SkBlendMode::kOverlay, // BlendMode::kOverlay + SkBlendMode::kDarken, // BlendMode::kDarken + SkBlendMode::kLighten, // BlendMode::kLighten + SkBlendMode::kColorDodge, // BlendMode::kColorDodge + SkBlendMode::kColorBurn, // BlendMode::kColorBurn + SkBlendMode::kHardLight, // BlendMode::kHardLight + SkBlendMode::kSoftLight, // BlendMode::kSoftLight + SkBlendMode::kDifference, // BlendMode::kDifference + SkBlendMode::kExclusion, // BlendMode::kExclusion + SkBlendMode::kHue, // BlendMode::kHue + SkBlendMode::kSaturation, // BlendMode::kSaturation + SkBlendMode::kColor, // BlendMode::kColor + SkBlendMode::kLuminosity // BlendMode::kLuminosity }; SkBlendMode WebCoreCompositeToSkiaComposite(CompositeOperator op, - WebBlendMode blend_mode) { - DCHECK(op == kCompositeSourceOver || blend_mode == WebBlendMode::kNormal); - if (blend_mode != WebBlendMode::kNormal) { + BlendMode blend_mode) { + DCHECK(op == kCompositeSourceOver || blend_mode == BlendMode::kNormal); + if (blend_mode != BlendMode::kNormal) { if (static_cast<uint8_t>(blend_mode) >= - SK_ARRAY_COUNT(kGMapBlendOpsToXfermodeModes)) { + SK_ARRAY_COUNT(kGMapBlendOpsToSkBlendMode)) { SkDEBUGF( ("GraphicsContext::setPlatformCompositeOperation unknown " - "WebBlendMode %d\n", + "BlendMode %d\n", blend_mode)); return SkBlendMode::kSrcOver; } - return kGMapBlendOpsToXfermodeModes[static_cast<uint8_t>(blend_mode)]; + return kGMapBlendOpsToSkBlendMode[static_cast<uint8_t>(blend_mode)]; } - const CompositOpToXfermodeMode* table = kGMapCompositOpsToXfermodeModes; + const CompositOpToSkBlendMode* table = kGMapCompositOpsToSkBlendMode; if (static_cast<uint8_t>(op) >= - SK_ARRAY_COUNT(kGMapCompositOpsToXfermodeModes)) { + SK_ARRAY_COUNT(kGMapCompositOpsToSkBlendMode)) { SkDEBUGF( ("GraphicsContext::setPlatformCompositeOperation unknown " "CompositeOperator %d\n", @@ -106,8 +106,20 @@ return table[static_cast<uint8_t>(op)].xfermode_mode; } -CompositeOperator CompositeOperatorFromSkia(SkBlendMode xfer_mode) { - switch (xfer_mode) { +SkBlendMode WebCoreBlendModeToSkBlendMode(BlendMode blend_mode) { + if (static_cast<uint8_t>(blend_mode) >= + SK_ARRAY_COUNT(kGMapBlendOpsToSkBlendMode)) { + SkDEBUGF( + ("GraphicsContext::setPlatformCompositeOperation unknown " + "BlendMode %d\n", + blend_mode)); + return SkBlendMode::kSrcOver; + } + return kGMapBlendOpsToSkBlendMode[static_cast<uint8_t>(blend_mode)]; +} + +CompositeOperator CompositeOperatorFromSkBlendMode(SkBlendMode blend_mode) { + switch (blend_mode) { case SkBlendMode::kClear: return kCompositeClear; case SkBlendMode::kSrc: @@ -138,44 +150,44 @@ return kCompositeSourceOver; } -WebBlendMode BlendModeFromSkia(SkBlendMode xfer_mode) { - switch (xfer_mode) { +BlendMode BlendModeFromSkBlendMode(SkBlendMode blend_mode) { + switch (blend_mode) { case SkBlendMode::kSrcOver: - return WebBlendMode::kNormal; + return BlendMode::kNormal; case SkBlendMode::kMultiply: - return WebBlendMode::kMultiply; + return BlendMode::kMultiply; case SkBlendMode::kScreen: - return WebBlendMode::kScreen; + return BlendMode::kScreen; case SkBlendMode::kOverlay: - return WebBlendMode::kOverlay; + return BlendMode::kOverlay; case SkBlendMode::kDarken: - return WebBlendMode::kDarken; + return BlendMode::kDarken; case SkBlendMode::kLighten: - return WebBlendMode::kLighten; + return BlendMode::kLighten; case SkBlendMode::kColorDodge: - return WebBlendMode::kColorDodge; + return BlendMode::kColorDodge; case SkBlendMode::kColorBurn: - return WebBlendMode::kColorBurn; + return BlendMode::kColorBurn; case SkBlendMode::kHardLight: - return WebBlendMode::kHardLight; + return BlendMode::kHardLight; case SkBlendMode::kSoftLight: - return WebBlendMode::kSoftLight; + return BlendMode::kSoftLight; case SkBlendMode::kDifference: - return WebBlendMode::kDifference; + return BlendMode::kDifference; case SkBlendMode::kExclusion: - return WebBlendMode::kExclusion; + return BlendMode::kExclusion; case SkBlendMode::kHue: - return WebBlendMode::kHue; + return BlendMode::kHue; case SkBlendMode::kSaturation: - return WebBlendMode::kSaturation; + return BlendMode::kSaturation; case SkBlendMode::kColor: - return WebBlendMode::kColor; + return BlendMode::kColor; case SkBlendMode::kLuminosity: - return WebBlendMode::kLuminosity; + return BlendMode::kLuminosity; default: break; } - return WebBlendMode::kNormal; + return BlendMode::kNormal; } SkMatrix AffineTransformToSkMatrix(const AffineTransform& source) {
diff --git a/third_party/blink/renderer/platform/graphics/skia/skia_utils.h b/third_party/blink/renderer/platform/graphics/skia/skia_utils.h index 07a07a93..eec0d2a1 100644 --- a/third_party/blink/renderer/platform/graphics/skia/skia_utils.h +++ b/third_party/blink/renderer/platform/graphics/skia/skia_utils.h
@@ -62,9 +62,10 @@ SkBlendMode PLATFORM_EXPORT WebCoreCompositeToSkiaComposite(CompositeOperator, - WebBlendMode = WebBlendMode::kNormal); -CompositeOperator PLATFORM_EXPORT CompositeOperatorFromSkia(SkBlendMode); -WebBlendMode PLATFORM_EXPORT BlendModeFromSkia(SkBlendMode); + BlendMode = BlendMode::kNormal); +SkBlendMode PLATFORM_EXPORT WebCoreBlendModeToSkBlendMode(BlendMode); +CompositeOperator PLATFORM_EXPORT CompositeOperatorFromSkBlendMode(SkBlendMode); +BlendMode PLATFORM_EXPORT BlendModeFromSkBlendMode(SkBlendMode); // Multiply a color's alpha channel by an additional alpha factor where // alpha is in the range [0, 1].
diff --git a/third_party/blink/renderer/platform/loader/fetch/resource_request.h b/third_party/blink/renderer/platform/loader/fetch/resource_request.h index f2ba34c1..a5c2bd4 100644 --- a/third_party/blink/renderer/platform/loader/fetch/resource_request.h +++ b/third_party/blink/renderer/platform/loader/fetch/resource_request.h
@@ -48,15 +48,19 @@ namespace blink { +// NOTE: If updating this enum, also update +// BuildResourceRequestReason in inspector_network_agent.cc and +// BlockedReasonEnum in browser_protocol.pdl and +// Network.NetworkRequestNode in NetworkDataGridNode.js. enum class ResourceRequestBlockedReason { + kNone, kCSP, kMixedContent, kOrigin, kInspector, kSubresourceFilter, - kOther, kContentType, - kNone + kOther, }; enum InputToLoadPerfMetricReportPolicy : uint8_t {
diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 b/third_party/blink/renderer/platform/runtime_enabled_features.json5 index 7c26667..d074fcd 100644 --- a/third_party/blink/renderer/platform/runtime_enabled_features.json5 +++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5
@@ -555,10 +555,6 @@ status: "experimental", }, { - name: "GeometryInterfaces", - status: "stable", - }, - { name: "HeapCompaction", status: "stable", },
diff --git a/third_party/blink/tools/audit_non_blink_usage.py b/third_party/blink/tools/audit_non_blink_usage.py index 95a0ad4..62de77a8 100755 --- a/third_party/blink/tools/audit_non_blink_usage.py +++ b/third_party/blink/tools/audit_non_blink_usage.py
@@ -167,12 +167,18 @@ ], }, { - 'paths': ['third_party/blink/renderer/core/inspector/InspectorMemoryAgent.cpp'], + 'paths': ['third_party/blink/renderer/core/inspector/inspector_memory_agent.cc'], 'allowed': [ 'base::SamplingHeapProfiler', ], }, { + 'paths': ['third_party/blink/renderer/core/inspector/inspector_performance_agent.cc'], + 'allowed': [ + 'base::subtle::TimeTicksNowIgnoringOverride', + ], + }, + { 'paths': [ 'third_party/blink/renderer/modules/device_orientation/', 'third_party/blink/renderer/modules/gamepad/',
diff --git a/third_party/closure_compiler/compiled_resources2.gyp b/third_party/closure_compiler/compiled_resources2.gyp index c85f24e..0ef8646 100644 --- a/third_party/closure_compiler/compiled_resources2.gyp +++ b/third_party/closure_compiler/compiled_resources2.gyp
@@ -22,7 +22,6 @@ '<(DEPTH)/chrome/browser/resources/chromeos/select_to_speak/compiled_resources2.gyp:*', '<(DEPTH)/chrome/browser/resources/chromeos/switch_access/compiled_resources2.gyp:*', '<(DEPTH)/chrome/browser/resources/chromeos/sys_internals/compiled_resources2.gyp:*', - '<(DEPTH)/chrome/browser/resources/media_router/compiled_resources2.gyp:*', '<(DEPTH)/chrome/browser/resources/ntp4/compiled_resources2.gyp:*', '<(DEPTH)/chrome/browser/resources/pdf/compiled_resources2.gyp:*', '<(DEPTH)/chrome/browser/resources/print_preview/compiled_resources2.gyp:*',
diff --git a/third_party/closure_compiler/externs/automation.js b/third_party/closure_compiler/externs/automation.js index 1cf0050..996ee1f 100644 --- a/third_party/closure_compiler/externs/automation.js +++ b/third_party/closure_compiler/externs/automation.js
@@ -222,7 +222,7 @@ EXPANDED: 'expanded', FOCUSABLE: 'focusable', FOCUSED: 'focused', - HASPOPUP: 'haspopup', + HAS_POPUP: 'hasPopup', HORIZONTAL: 'horizontal', HOVERED: 'hovered', IGNORED: 'ignored', @@ -306,6 +306,19 @@ /** * @enum {string} + * @see https://developer.chrome.com/extensions/automation#type-HasPopup + */ +chrome.automation.HasPopup = { + TRUE: 'true', + MENU: 'menu', + LISTBOX: 'listbox', + TREE: 'tree', + GRID: 'grid', + DIALOG: 'dialog', +}; + +/** + * @enum {string} * @see https://developer.chrome.com/extensions/automation#type-DefaultActionVerb */ chrome.automation.DefaultActionVerb = { @@ -1101,6 +1114,12 @@ chrome.automation.AutomationNode.prototype.language; /** + * @type {(string|undefined)} + * @see https://developer.chrome.com/extensions/automation#type-hasPopup + */ +chrome.automation.AutomationNode.prototype.hasPopup; + +/** * Input restriction, if any, such as readonly or disabled: undefined - enabled control or other object that is not disabled Restriction.DISABLED - disallows input in itself + any descendants Restriction.READONLY - allow focus/selection but not input * @type {(string|undefined)} * @see https://developer.chrome.com/extensions/automation#type-restriction
diff --git a/third_party/polymer/v1_0/components-chromium/paper-ripple/paper-ripple.html b/third_party/polymer/v1_0/components-chromium/paper-ripple/paper-ripple.html index 2c35205..c170faf 100644 --- a/third_party/polymer/v1_0/components-chromium/paper-ripple/paper-ripple.html +++ b/third_party/polymer/v1_0/components-chromium/paper-ripple/paper-ripple.html
@@ -42,14 +42,28 @@ this.$.ripple.upAction(); } -Styling ripple effect: +There are a few ways to style the ripple effect: - Use CSS color property to style the ripple: + 1) Set only the color of the ripple, allowing opacity to default to 0.25: paper-ripple { color: #4285f4; } + 2) Set both the color and the opacity in one of two ways: + + paper-ripple { + --paper-ripple-opacity: 0.5; + color: black; + } + + or: + + paper-ripple { + --paper-ripple-opacity: 1; + color: rgba(0, 0, 0, 0.5); + } + Note that CSS color property is inherited so it is not required to set it on the `paper-ripple` element directly. @@ -93,7 +107,7 @@ .ripple { background-color: currentcolor; left: 0; - opacity: .25; + opacity: var(--paper-ripple-opacity, 0.25); pointer-events: none; position: absolute; will-change: height, transform, width;
diff --git a/tools/cfi/blacklist.txt b/tools/cfi/blacklist.txt index 66ca698..03de7354 100644 --- a/tools/cfi/blacklist.txt +++ b/tools/cfi/blacklist.txt
@@ -172,6 +172,7 @@ src:*third_party/swiftshader/* src:*base/native_library_unittest.cc src:*chrome/browser/ui/libgtkui/app_indicator_icon.cc +src:*chrome/browser/ui/libgtkui/unity_service.cc src:*components/cronet/native/* # chrome/browser/ui/views/frame/global_menu_bar_x11.cc @@ -180,6 +181,9 @@ # third_party/skia/include/gpu/gl/GrGLFunctions.h fun:*GrGLFunction* +# Call to libcurl.so from the symupload utility +src:*third_party/breakpad/breakpad/src/common/linux/http_upload.cc + ######### Function pointers cast to incorrect type signatures # libicu is currently compiled such that in libicu the 'UChar' type is a
diff --git a/tools/gn/docs/reference.md b/tools/gn/docs/reference.md index 6f3682d..8fa85d24 100644 --- a/tools/gn/docs/reference.md +++ b/tools/gn/docs/reference.md
@@ -4696,10 +4696,10 @@ #### **Inputs for binary targets** ``` - Any input dependencies will be resolved before compiling any sources. - Normally, all actions that a target depends on will be run before any files - in a target are compiled. So if you depend on generated headers, you do not - typically need to list them in the inputs section. + Any input dependencies will be resolved before compiling any sources or + linking the target. Normally, all actions that a target depends on will be run + before any files in a target are compiled. So if you depend on generated + headers, you do not typically need to list them in the inputs section. Inputs for binary targets will be treated as implicit dependencies, meaning that changes in any of the inputs will force all sources in the target to be
diff --git a/tools/gn/ninja_binary_target_writer.cc b/tools/gn/ninja_binary_target_writer.cc index 0e2bab0f..1711ad2 100644 --- a/tools/gn/ninja_binary_target_writer.cc +++ b/tools/gn/ninja_binary_target_writer.cc
@@ -348,7 +348,7 @@ DCHECK_NE(static_cast<size_t>(-1), computed_obj.IndexOf(obj)); #endif } else { - WriteLinkerStuff(obj_files, other_files); + WriteLinkerStuff(obj_files, other_files, input_dep); } } @@ -752,7 +752,8 @@ void NinjaBinaryTargetWriter::WriteLinkerStuff( const std::vector<OutputFile>& object_files, - const std::vector<SourceFile>& other_files) { + const std::vector<SourceFile>& other_files, + const OutputFile& input_dep) { std::vector<OutputFile> output_files; SubstitutionWriter::ApplyListToLinkerAsOutputFile( target_, tool_, tool_->outputs(), &output_files); @@ -816,6 +817,11 @@ } } + // The input dependency is only needed if there are no object files, as the + // dependency is normally provided transitively by the source files. + if (!input_dep.value().empty() && object_files.empty()) + implicit_deps.push_back(input_dep); + // Append implicit dependencies collected above. if (!implicit_deps.empty()) { out_ << " |";
diff --git a/tools/gn/ninja_binary_target_writer.h b/tools/gn/ninja_binary_target_writer.h index 93e5b2d..91a7a27 100644 --- a/tools/gn/ninja_binary_target_writer.h +++ b/tools/gn/ninja_binary_target_writer.h
@@ -107,7 +107,8 @@ const std::vector<OutputFile>& outputs); void WriteLinkerStuff(const std::vector<OutputFile>& object_files, - const std::vector<SourceFile>& other_files); + const std::vector<SourceFile>& other_files, + const OutputFile& input_dep); void WriteLinkerFlags(const SourceFile* optional_def_file); void WriteLibs(); void WriteOutputSubstitutions();
diff --git a/tools/gn/ninja_binary_target_writer_unittest.cc b/tools/gn/ninja_binary_target_writer_unittest.cc index 15b6da9a1..20239b0 100644 --- a/tools/gn/ninja_binary_target_writer_unittest.cc +++ b/tools/gn/ninja_binary_target_writer_unittest.cc
@@ -1007,6 +1007,36 @@ EXPECT_EQ(expected, out.str()); } + // This target has one input but no source files. + { + Target target(setup.settings(), Label(SourceDir("//foo/"), "bar")); + target.set_output_type(Target::SHARED_LIBRARY); + target.visibility().SetPublic(); + target.config_values().inputs().push_back(SourceFile("//foo/input.data")); + target.SetToolchain(setup.toolchain()); + ASSERT_TRUE(target.OnResolved(&err)); + + std::ostringstream out; + NinjaBinaryTargetWriter writer(&target, out); + writer.Run(); + + const char expected[] = + "defines =\n" + "include_dirs =\n" + "root_out_dir = .\n" + "target_out_dir = obj/foo\n" + "target_output_name = libbar\n" + "\n" + "\n" + "build ./libbar.so: solink | ../../foo/input.data\n" + " ldflags =\n" + " libs =\n" + " output_extension = .so\n" + " output_dir = \n"; + + EXPECT_EQ(expected, out.str()); + } + // This target has multiple inputs. { Target target(setup.settings(), Label(SourceDir("//foo/"), "bar"));
diff --git a/tools/gn/variables.cc b/tools/gn/variables.cc index b9dec07..42191e36 100644 --- a/tools/gn/variables.cc +++ b/tools/gn/variables.cc
@@ -1229,10 +1229,10 @@ Inputs for binary targets - Any input dependencies will be resolved before compiling any sources. - Normally, all actions that a target depends on will be run before any files - in a target are compiled. So if you depend on generated headers, you do not - typically need to list them in the inputs section. + Any input dependencies will be resolved before compiling any sources or + linking the target. Normally, all actions that a target depends on will be run + before any files in a target are compiled. So if you depend on generated + headers, you do not typically need to list them in the inputs section. Inputs for binary targets will be treated as implicit dependencies, meaning that changes in any of the inputs will force all sources in the target to be
diff --git a/tools/grit/grit/node/include.py b/tools/grit/grit/node/include.py index 27cff17a10..3538cc7 100755 --- a/tools/grit/grit/node/include.py +++ b/tools/grit/grit/node/include.py
@@ -52,6 +52,7 @@ 'allowexternalscript': 'false', 'relativepath': 'false', 'use_base_dir': 'true', + 'skip_minify': 'false', } def GetInputPath(self): @@ -84,9 +85,11 @@ data = self._GetFlattenedData(allow_external_script=allow_external_script) else: data = util.ReadFile(filename, util.BINARY) - # Note that the minifier will only do anything if a minifier command - # has been set in the command line. - data = minifier.Minify(data, filename) + + if self.attrs['skip_minify'] != 'true': + # Note that the minifier will only do anything if a minifier command + # has been set in the command line. + data = minifier.Minify(data, filename) # Include does not care about the encoding, because it only returns binary # data.
diff --git a/tools/ipc_fuzzer/fuzzer/fuzzer.cc b/tools/ipc_fuzzer/fuzzer/fuzzer.cc index 5a488bf6..1265d95 100644 --- a/tools/ipc_fuzzer/fuzzer/fuzzer.cc +++ b/tools/ipc_fuzzer/fuzzer/fuzzer.cc
@@ -1113,7 +1113,6 @@ int channel_layout = p->channel_layout(); int format = p->format(); int sample_rate = p->sample_rate(); - int bits_per_sample = p->bits_per_sample(); int frames_per_buffer = p->frames_per_buffer(); int channels = p->channels(); int effects = p->effects(); @@ -1126,8 +1125,6 @@ return false; if (!FuzzParam(&sample_rate, fuzzer)) return false; - if (!FuzzParam(&bits_per_sample, fuzzer)) - return false; if (!FuzzParam(&frames_per_buffer, fuzzer)) return false; if (!FuzzParam(&channels, fuzzer)) @@ -1137,7 +1134,7 @@ media::AudioParameters params( static_cast<media::AudioParameters::Format>(format), static_cast<media::ChannelLayout>(channel_layout), sample_rate, - bits_per_sample, frames_per_buffer); + frames_per_buffer); params.set_channels_for_discrete(channels); params.set_effects(effects); *p = params;
diff --git a/tools/mb/mb.py b/tools/mb/mb.py index 4b8cbfe..57ddca2 100755 --- a/tools/mb/mb.py +++ b/tools/mb/mb.py
@@ -1066,7 +1066,13 @@ '--cfi-diag=%d' % cfi_diag, ] elif test_type == 'script': - cmdline = [ + cmdline = [] + # If we're testing a CrOS simplechrome build, assume we need to launch a + # VM first. So prepend the command to run with the VM launcher. + # TODO(bpastene): Differentiate between CrOS VM and hardware tests. + if is_simplechrome: + cmdline = [os.path.join('bin', 'launch_cros_vm')] + cmdline += [ '../../testing/test_env.py', '../../' + self.ToSrcRelPath(isolate_map[target]['script']) ]
diff --git a/tools/metrics/histograms/enums.xml b/tools/metrics/histograms/enums.xml index 4127b44..10f2096 100644 --- a/tools/metrics/histograms/enums.xml +++ b/tools/metrics/histograms/enums.xml
@@ -7386,9 +7386,11 @@ <int value="7" label="Fetch completed"/> <int value="8" label="UI peek from reverse-scroll"/> <int value="9" label="UI opened"/> - <int value="10" label="UI closed"/> + <int value="10" label="UI closed (generic, obsolete)"/> <int value="11" label="Suggestion downloaded"/> <int value="12" label="Suggestion clicked"/> + <int value="13" label="UI dismissed without open"/> + <int value="14" label="UI dismissed after open"/> </enum> <enum name="CookieCommitProblem"> @@ -14070,6 +14072,7 @@ label="SAFE_BROWSING_PRIVATE_ON_SECURITY_INTERSTITIAL_PROCEEDED"/> <int value="421" label="ACCESSIBILITY_PRIVATE_ON_SELECT_TO_SPEAK_STATE_CHANGE_REQUESTED"/> + <int value="422" label="INPUT_METHOD_PRIVATE_ON_FOCUS"/> </enum> <enum name="ExtensionFileWriteResult"> @@ -26291,6 +26294,7 @@ <int value="-2119827860" label="ash-disable-maximize-mode-window-backdrop"/> <int value="-2119530966" label="enable-webrtc-dtls12"/> <int value="-2119493239" label="enable-app-info-dialog-mac"/> + <int value="-2117621241" label="ExperimentalProductivityFeatures:enabled"/> <int value="-2117201726" label="disable-gpu-rasterization"/> <int value="-2114831248" label="disable-new-ntp"/> <int value="-2113705745" @@ -26521,6 +26525,7 @@ <int value="-1653838003" label="PauseBackgroundTabs:enabled"/> <int value="-1649778035" label="disable-clear-browsing-data-counters"/> <int value="-1648216169" label="NewOmniboxAnswerTypes:disabled"/> + <int value="-1638815914" label="enable-experimental-productivity-features"/> <int value="-1634878515" label="ChromeHomeModernLayout:enabled"/> <int value="-1634154256" label="ZeroSuggestRedirectToChrome:enabled"/> <int value="-1633586675" label="TabModalJsDialog:enabled"/> @@ -26942,6 +26947,7 @@ <int value="-738957187" label="OmniboxUIExperimentSwapTitleAndUrl:disabled"/> <int value="-723224470" label="enable-password-force-saving:enabled"/> <int value="-722474177" label="browser-side-navigation:disabled"/> + <int value="-719147284" label="ExperimentalProductivityFeatures:disabled"/> <int value="-718884399" label="NewTabPageUIMd:enabled"/> <int value="-718626298" label="SysInternals:enabled"/> <int value="-716953514" label="disable-password-separated-signin-flow"/> @@ -27421,6 +27427,7 @@ <int value="423855924" label="enable-tab-switcher-theme-colors"/> <int value="431691805" label="MediaDocumentDownloadButton:enabled"/> <int value="434033638" label="PwaPersistentNotification:disabled"/> + <int value="438048339" label="WarnBeforeQuitting:disabled"/> <int value="446316019" label="enable-threaded-compositing"/> <int value="451196246" label="disable-impl-side-painting"/> <int value="452139294" label="VrShellExperimentalRendering:enabled"/> @@ -27460,6 +27467,7 @@ <int value="513356954" label="InstantTethering:disabled"/> <int value="513372959" label="ViewsProfileChooser:enabled"/> <int value="517568645" label="AnimatedAppMenuIcon:disabled"/> + <int value="530158943" label="WarnBeforeQuitting:enabled"/> <int value="535131384" label="OmniboxTailSuggestions:enabled"/> <int value="535976218" label="enable-plugin-power-saver"/> <int value="538468149" label="OfflinePagesCT:enabled"/>
diff --git a/tools/metrics/histograms/histograms.xml b/tools/metrics/histograms/histograms.xml index 167be6f..da070b1 100644 --- a/tools/metrics/histograms/histograms.xml +++ b/tools/metrics/histograms/histograms.xml
@@ -13358,6 +13358,9 @@ <summary> The exit codes for crashed extension processes. Note: Due to https://crbug.com/805754, the enum labels are off by 1 for M56 and earlier. + + See also Stability.CrashedProcessAge.Extension that is usually logged at the + same time. </summary> </histogram> @@ -13366,6 +13369,9 @@ <summary> The exit codes for crashed renderer processes. Note: Due to https://crbug.com/805754, the enum labels are off by 1 for M56 and earlier. + + See also Stability.CrashedProcessAge.Renderer that is usually logged at the + same time. </summary> </histogram> @@ -37271,6 +37277,9 @@ </histogram> <histogram name="Media.FallbackHardwareAudioBitsPerChannel"> + <obsolete> + Deprecated May 2018; has been 32-bit for years now. + </obsolete> <owner>dalecurtis@chromium.org</owner> <summary> Bits per channel of the hardware audio device which failed to open in low @@ -37401,6 +37410,9 @@ </histogram> <histogram name="Media.HardwareAudioBitsPerChannel"> + <obsolete> + Deprecated May 2018; has been 32-bit for years now. + </obsolete> <owner>dalecurtis@chromium.org</owner> <summary>Bits per channel of the hardware audio device.</summary> </histogram> @@ -89960,6 +89972,22 @@ </summary> </histogram> +<histogram name="Stability.CrashedProcessAge.Extension" units="ms"> + <owner>lukasza@chromium.org</owner> + <summary> + The age of a crashed extension process. Not logged on iOS. Logged together + with CrashExitCodes.Extension. + </summary> +</histogram> + +<histogram name="Stability.CrashedProcessAge.Renderer" units="ms"> + <owner>lukasza@chromium.org</owner> + <summary> + The age of a crashed extension process. Not logged on iOS. Logged together + with CrashExitCodes.Renderer. + </summary> +</histogram> + <histogram name="Stability.ExitFunnel" units="ms"> <owner>siggi@chromium.org</owner> <summary>
diff --git a/tools/metrics/ukm/ukm.xml b/tools/metrics/ukm/ukm.xml index 839782c..b9b010f 100644 --- a/tools/metrics/ukm/ukm.xml +++ b/tools/metrics/ukm/ukm.xml
@@ -3524,16 +3524,17 @@ </summary> <metric name="ContentType"> <summary> - Enumeration for the MIME type of the page. Values are enumerated in - metrics::TabMetricsEvent::ContentType. + Obsolete. Enumeration for the MIME type of the page. Values are enumerated + in metrics::TabMetricsEvent::ContentType. </summary> </metric> <metric name="DefaultProtocolHandler"> <summary> - Schemes that a page from this page's origin is the default protocol - handler for, meaning the user has chosen to accept (or the handler was - preinstalled by Chrome). The metric is repeated, occurring for each such - protocol handler, and uses values from metrics::TabMetricsEvent::Scheme. + Obsolete. Schemes that a page from this page's origin is the default + protocol handler for, meaning the user has chosen to accept (or the + handler was preinstalled by Chrome). The metric is repeated, occurring for + each such protocol handler, and uses values from + metrics::TabMetricsEvent::Scheme. </summary> </metric> <metric name="HasBeforeUnloadHandler"> @@ -3549,8 +3550,8 @@ </metric> <metric name="IsExtensionProtected"> <summary> - True if an extension has marked this tab as non-discardable via the - chrome.tabs.update() extension API. + Obsolete. True if an extension has marked this tab as non-discardable via + the chrome.tabs.update() extension API. </summary> </metric> <metric name="IsPinned">
diff --git a/tools/perf/chrome_telemetry_build/BUILD.gn b/tools/perf/chrome_telemetry_build/BUILD.gn index 76194420..2e50671 100644 --- a/tools/perf/chrome_telemetry_build/BUILD.gn +++ b/tools/perf/chrome_telemetry_build/BUILD.gn
@@ -6,6 +6,9 @@ if (is_android) { import("//build/config/android/config.gni") # For public_android_sdk } +if (is_chromeos) { + import("//build/config/chromeos/rules.gni") +} group("telemetry_chrome_test") { testonly = true @@ -53,6 +56,10 @@ ] } + if (is_chromeos && cros_board != "") { + data_deps += [ "//chromeos:cros_vm_launcher" ] + } + if (is_win && (symbol_level == 1 || symbol_level == 2)) { data_deps += [ "//build/win:copy_cdb_to_output",
diff --git a/ui/accessibility/ax_enum_util.cc b/ui/accessibility/ax_enum_util.cc index 26e2f2c8..7bd2e707 100644 --- a/ui/accessibility/ax_enum_util.cc +++ b/ui/accessibility/ax_enum_util.cc
@@ -768,7 +768,7 @@ return "expanded"; case ax::mojom::State::kFocusable: return "focusable"; - case ax::mojom::State::kHaspopup: + case ax::mojom::State::kHasPopup: return "haspopup"; case ax::mojom::State::kHorizontal: return "horizontal"; @@ -813,7 +813,7 @@ if (0 == strcmp(state, "focusable")) return ax::mojom::State::kFocusable; if (0 == strcmp(state, "haspopup")) - return ax::mojom::State::kHaspopup; + return ax::mojom::State::kHasPopup; if (0 == strcmp(state, "horizontal")) return ax::mojom::State::kHorizontal; if (0 == strcmp(state, "hovered")) @@ -1251,6 +1251,8 @@ return "backgroundColor"; case ax::mojom::IntAttribute::kColor: return "color"; + case ax::mojom::IntAttribute::kHasPopup: + return "haspopup"; case ax::mojom::IntAttribute::kInvalidState: return "invalidState"; case ax::mojom::IntAttribute::kCheckedState: @@ -1357,6 +1359,8 @@ return ax::mojom::IntAttribute::kBackgroundColor; if (0 == strcmp(int_attribute, "color")) return ax::mojom::IntAttribute::kColor; + if (0 == strcmp(int_attribute, "haspopup")) + return ax::mojom::IntAttribute::kHasPopup; if (0 == strcmp(int_attribute, "invalidState")) return ax::mojom::IntAttribute::kInvalidState; if (0 == strcmp(int_attribute, "checkedState")) @@ -1862,6 +1866,44 @@ return ax::mojom::AriaCurrentState::kNone; } +const char* ToString(ax::mojom::HasPopup has_popup) { + switch (has_popup) { + case ax::mojom::HasPopup::kFalse: + return ""; + case ax::mojom::HasPopup::kTrue: + return "true"; + case ax::mojom::HasPopup::kMenu: + return "menu"; + case ax::mojom::HasPopup::kListbox: + return "listbox"; + case ax::mojom::HasPopup::kTree: + return "tree"; + case ax::mojom::HasPopup::kGrid: + return "grid"; + case ax::mojom::HasPopup::kDialog: + return "dialog"; + } + + return ""; +} + +ax::mojom::HasPopup ParseHasPopup(const char* has_popup) { + if (0 == strcmp(has_popup, "true")) + return ax::mojom::HasPopup::kTrue; + if (0 == strcmp(has_popup, "menu")) + return ax::mojom::HasPopup::kMenu; + if (0 == strcmp(has_popup, "listbox")) + return ax::mojom::HasPopup::kListbox; + if (0 == strcmp(has_popup, "tree")) + return ax::mojom::HasPopup::kTree; + if (0 == strcmp(has_popup, "grid")) + return ax::mojom::HasPopup::kGrid; + if (0 == strcmp(has_popup, "dialog")) + return ax::mojom::HasPopup::kDialog; + + return ax::mojom::HasPopup::kFalse; +} + const char* ToString(ax::mojom::InvalidState invalid_state) { switch (invalid_state) { case ax::mojom::InvalidState::kNone:
diff --git a/ui/accessibility/ax_enum_util.h b/ui/accessibility/ax_enum_util.h index e331b4e..b3f9674 100644 --- a/ui/accessibility/ax_enum_util.h +++ b/ui/accessibility/ax_enum_util.h
@@ -2,6 +2,9 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#ifndef UI_ACCESSIBILITY_AX_ENUM_UTIL_H_ +#define UI_ACCESSIBILITY_AX_ENUM_UTIL_H_ + #include "ui/accessibility/ax_enums.mojom.h" #include "ui/accessibility/ax_export.h" @@ -85,6 +88,10 @@ AX_EXPORT ax::mojom::AriaCurrentState ParseAriaCurrentState( const char* aria_current_state); +// ax::mojom::HasPopup +AX_EXPORT const char* ToString(ax::mojom::HasPopup has_popup); +AX_EXPORT ax::mojom::HasPopup ParseHasPopup(const char* has_popup); + // ax::mojom::InvalidState AX_EXPORT const char* ToString(ax::mojom::InvalidState invalid_state); AX_EXPORT ax::mojom::InvalidState ParseInvalidState(const char* invalid_state); @@ -128,3 +135,5 @@ AX_EXPORT ax::mojom::TreeOrder ParseTreeOrder(const char* tree_order); } // namespace ui + +#endif // UI_ACCESSIBILITY_AX_ENUM_UTIL_H_
diff --git a/ui/accessibility/ax_enums.mojom b/ui/accessibility/ax_enums.mojom index 159b964..ace5d27 100644 --- a/ui/accessibility/ax_enums.mojom +++ b/ui/accessibility/ax_enums.mojom
@@ -229,7 +229,7 @@ kEditable, kExpanded, kFocusable, - kHaspopup, + kHasPopup, // Grows horizontally, e.g. most toolbars and separators. kHorizontal, kHovered, @@ -472,6 +472,8 @@ kBackgroundColor, kColor, + kHasPopup, + // Indicates if a form control has invalid input or // if an element has an aria-invalid attribute. kInvalidState, @@ -691,6 +693,17 @@ kTime, }; +enum HasPopup { + kFalse = 0, + kTrue, + kMenu, + kListbox, + kTree, + kGrid, + kDialog, + kLast = kDialog, +}; + enum InvalidState { kNone, kFalse,
diff --git a/ui/accessibility/ax_node_data.cc b/ui/accessibility/ax_node_data.cc index 78dca09..df48678 100644 --- a/ui/accessibility/ax_node_data.cc +++ b/ui/accessibility/ax_node_data.cc
@@ -137,6 +137,7 @@ case ax::mojom::IntAttribute::kPosInSet: case ax::mojom::IntAttribute::kColorValue: case ax::mojom::IntAttribute::kAriaCurrentState: + case ax::mojom::IntAttribute::kHasPopup: case ax::mojom::IntAttribute::kBackgroundColor: case ax::mojom::IntAttribute::kColor: case ax::mojom::IntAttribute::kInvalidState: @@ -799,6 +800,31 @@ case ax::mojom::IntAttribute::kPosInSet: result += " posinset=" + value; break; + case ax::mojom::IntAttribute::kHasPopup: + switch (static_cast<ax::mojom::HasPopup>(int_attribute.second)) { + case ax::mojom::HasPopup::kTrue: + result += " haspopup=true"; + break; + case ax::mojom::HasPopup::kMenu: + result += " haspopup=menu"; + break; + case ax::mojom::HasPopup::kListbox: + result += " haspopup=listbox"; + break; + case ax::mojom::HasPopup::kTree: + result += " haspopup=tree"; + break; + case ax::mojom::HasPopup::kGrid: + result += " haspopup=grid"; + break; + case ax::mojom::HasPopup::kDialog: + result += " haspopup=dialog"; + break; + case ax::mojom::HasPopup::kFalse: + default: + break; + } + break; case ax::mojom::IntAttribute::kInvalidState: switch (static_cast<ax::mojom::InvalidState>(int_attribute.second)) { case ax::mojom::InvalidState::kFalse:
diff --git a/ui/accessibility/ax_node_data.h b/ui/accessibility/ax_node_data.h index 5741f15c..8d665a2 100644 --- a/ui/accessibility/ax_node_data.h +++ b/ui/accessibility/ax_node_data.h
@@ -139,6 +139,12 @@ return static_cast<ax::mojom::CheckedState>( GetIntAttribute(ax::mojom::IntAttribute::kCheckedState)); } + + ax::mojom::HasPopup GetHasPopup() const { + return static_cast<ax::mojom::HasPopup>( + GetIntAttribute(ax::mojom::IntAttribute::kHasPopup)); + } + ax::mojom::DefaultActionVerb GetDefaultActionVerb() const { return static_cast<ax::mojom::DefaultActionVerb>( GetIntAttribute(ax::mojom::IntAttribute::kDefaultActionVerb)); @@ -165,6 +171,10 @@ AddIntAttribute(ax::mojom::IntAttribute::kCheckedState, static_cast<int32_t>(checked_state)); } + void SetHasPopup(ax::mojom::HasPopup has_popup) { + AddIntAttribute(ax::mojom::IntAttribute::kHasPopup, + static_cast<int32_t>(has_popup)); + } void SetDefaultActionVerb(ax::mojom::DefaultActionVerb default_action_verb) { AddIntAttribute(ax::mojom::IntAttribute::kDefaultActionVerb, static_cast<int32_t>(default_action_verb));
diff --git a/ui/accessibility/ax_node_position_unittest.cc b/ui/accessibility/ax_node_position_unittest.cc index 3d90632..665d92cec 100644 --- a/ui/accessibility/ax_node_position_unittest.cc +++ b/ui/accessibility/ax_node_position_unittest.cc
@@ -121,7 +121,7 @@ root_.location = gfx::RectF(0, 0, 800, 600); button_.role = ax::mojom::Role::kButton; - button_.AddState(ax::mojom::State::kHaspopup); + button_.SetHasPopup(ax::mojom::HasPopup::kMenu); button_.SetName("Button"); button_.location = gfx::RectF(20, 20, 200, 30); button_.AddIntListAttribute(ax::mojom::IntListAttribute::kWordStarts,
diff --git a/ui/accessibility/platform/ax_platform_node_auralinux.cc b/ui/accessibility/platform/ax_platform_node_auralinux.cc index b73cd96..43fc998 100644 --- a/ui/accessibility/platform/ax_platform_node_auralinux.cc +++ b/ui/accessibility/platform/ax_platform_node_auralinux.cc
@@ -982,7 +982,7 @@ atk_state_set_add_state(atk_state_set, ATK_STATE_FOCUSABLE); #if defined(ATK_CHECK_VERSION) #if ATK_CHECK_VERSION(2, 11, 2) - if (data.HasState(ax::mojom::State::kHaspopup)) + if (data.HasIntAttribute(ax::mojom::IntAttribute::kHasPopup)) atk_state_set_add_state(atk_state_set, ATK_STATE_HAS_POPUP); #endif #endif
diff --git a/ui/accessibility/platform/ax_platform_node_win.cc b/ui/accessibility/platform/ax_platform_node_win.cc index 88d5b61..03eadb5 100644 --- a/ui/accessibility/platform/ax_platform_node_win.cc +++ b/ui/accessibility/platform/ax_platform_node_win.cc
@@ -3103,6 +3103,37 @@ result.push_back(L"explicit-name:true"); } + // Expose the aria-haspopup attribute. + int32_t has_popup; + if (GetIntAttribute(ax::mojom::IntAttribute::kHasPopup, &has_popup)) { + switch (static_cast<ax::mojom::HasPopup>(has_popup)) { + case ax::mojom::HasPopup::kFalse: + break; + case ax::mojom::HasPopup::kTrue: + result.push_back(L"haspopup:true"); + break; + case ax::mojom::HasPopup::kMenu: + result.push_back(L"haspopup:menu"); + break; + case ax::mojom::HasPopup::kListbox: + result.push_back(L"haspopup:listbox"); + break; + case ax::mojom::HasPopup::kTree: + result.push_back(L"haspopup:tree"); + break; + case ax::mojom::HasPopup::kGrid: + result.push_back(L"haspopup:grid"); + break; + case ax::mojom::HasPopup::kDialog: + result.push_back(L"haspopup:dialog"); + break; + } + } else if (IsAutofillField()) { + // Note: autofill is special-cased here because there is no way for the + // browser to know when the autofill popup is shown. + result.push_back(L"haspopup:menu"); + } + // Expose the aria-current attribute. int32_t aria_current_state; if (GetIntAttribute(ax::mojom::IntAttribute::kAriaCurrentState, @@ -3450,7 +3481,8 @@ // Note: autofill is special-cased here because there is no way for the // browser to know when the autofill popup is shown. - if (data.HasState(ax::mojom::State::kHaspopup) || IsAutofillField()) + if (data.HasIntAttribute(ax::mojom::IntAttribute::kHasPopup) || + IsAutofillField()) msaa_state |= STATE_SYSTEM_HASPOPUP; // TODO(dougt) unhandled ux::ax::mojom::State::kHorizontal
diff --git a/ui/base/ime/chromeos/mock_ime_engine_handler.cc b/ui/base/ime/chromeos/mock_ime_engine_handler.cc index a679739..a8db1ae 100644 --- a/ui/base/ime/chromeos/mock_ime_engine_handler.cc +++ b/ui/base/ime/chromeos/mock_ime_engine_handler.cc
@@ -15,10 +15,10 @@ reset_call_count_(0), last_text_input_context_(ui::TEXT_INPUT_TYPE_NONE, ui::TEXT_INPUT_MODE_DEFAULT, - ui::TEXT_INPUT_FLAG_NONE), + ui::TEXT_INPUT_FLAG_NONE, + ui::TextInputClient::FOCUS_REASON_NONE), last_set_surrounding_cursor_pos_(0), - last_set_surrounding_anchor_pos_(0) { -} + last_set_surrounding_anchor_pos_(0) {} MockIMEEngineHandler::~MockIMEEngineHandler() { }
diff --git a/ui/base/ime/dummy_text_input_client.cc b/ui/base/ime/dummy_text_input_client.cc index 5ddd43c..83e3a9d 100644 --- a/ui/base/ime/dummy_text_input_client.cc +++ b/ui/base/ime/dummy_text_input_client.cc
@@ -80,6 +80,10 @@ return false; } +ui::TextInputClient::FocusReason DummyTextInputClient::GetFocusReason() const { + return ui::TextInputClient::FOCUS_REASON_OTHER; +} + bool DummyTextInputClient::GetTextRange(gfx::Range* range) const { return false; }
diff --git a/ui/base/ime/dummy_text_input_client.h b/ui/base/ime/dummy_text_input_client.h index 1badca4..63b0b35 100644 --- a/ui/base/ime/dummy_text_input_client.h +++ b/ui/base/ime/dummy_text_input_client.h
@@ -37,6 +37,7 @@ bool GetCompositionCharacterBounds(uint32_t index, gfx::Rect* rect) const override; bool HasCompositionText() const override; + ui::TextInputClient::FocusReason GetFocusReason() const override; bool GetTextRange(gfx::Range* range) const override; bool GetCompositionTextRange(gfx::Range* range) const override; bool GetSelectionRange(gfx::Range* range) const override;
diff --git a/ui/base/ime/ime_bridge.cc b/ui/base/ime/ime_bridge.cc index e30642b3c..c7539aa 100644 --- a/ui/base/ime/ime_bridge.cc +++ b/ui/base/ime/ime_bridge.cc
@@ -25,7 +25,8 @@ observer_(nullptr), current_input_context_(ui::TEXT_INPUT_TYPE_NONE, ui::TEXT_INPUT_MODE_DEFAULT, - 0), + 0, + ui::TextInputClient::FOCUS_REASON_NONE), candidate_window_handler_(nullptr) {} #else IMEBridgeImpl() @@ -34,7 +35,8 @@ observer_(nullptr), current_input_context_(ui::TEXT_INPUT_TYPE_NONE, ui::TEXT_INPUT_MODE_DEFAULT, - 0) {} + 0, + ui::TextInputClient::FOCUS_REASON_NONE) {} #endif ~IMEBridgeImpl() override {}
diff --git a/ui/base/ime/ime_engine_handler_interface.h b/ui/base/ime/ime_engine_handler_interface.h index a226fa3..3a246117 100644 --- a/ui/base/ime/ime_engine_handler_interface.h +++ b/ui/base/ime/ime_engine_handler_interface.h
@@ -13,9 +13,9 @@ #include "base/callback.h" #include "build/build_config.h" +#include "ui/base/ime/text_input_client.h" #include "ui/base/ime/text_input_mode.h" #include "ui/base/ime/text_input_type.h" -#include "ui/base/ime/ui_base_ime_export.h" namespace gfx { class Rect; @@ -35,10 +35,24 @@ // used to specify about a non html text field like Omnibox. struct InputContext { InputContext() {} - InputContext(TextInputType type_, TextInputMode mode_, int flags_) - : type(type_), mode(mode_), flags(flags_) {} - InputContext(int id_, TextInputType type_, TextInputMode mode_, int flags_) - : id(id_), type(type_), mode(mode_), flags(flags_) {} + InputContext(TextInputType type_, + TextInputMode mode_, + int flags_, + TextInputClient::FocusReason focus_reason_) + : type(type_), + mode(mode_), + flags(flags_), + focus_reason(focus_reason_) {} + InputContext(int id_, + TextInputType type_, + TextInputMode mode_, + int flags_, + TextInputClient::FocusReason focus_reason_) + : id(id_), + type(type_), + mode(mode_), + flags(flags_), + focus_reason(focus_reason_) {} // An attribute of the context id which used for ChromeOS only. int id; // An attribute of the field defined at @@ -52,6 +66,9 @@ // An antribute to indicate the flags for web input fields. Please refer to // WebTextInputType. int flags; + // An attribute to indicate how this input field was focused. + TextInputClient::FocusReason focus_reason = + TextInputClient::FOCUS_REASON_NONE; }; virtual ~IMEEngineHandlerInterface() {}
diff --git a/ui/base/ime/input_method_auralinux.cc b/ui/base/ime/input_method_auralinux.cc index d8b7aa7..696ca681 100644 --- a/ui/base/ime/input_method_auralinux.cc +++ b/ui/base/ime/input_method_auralinux.cc
@@ -249,7 +249,8 @@ return; ui::IMEEngineHandlerInterface::InputContext context( - GetTextInputType(), GetTextInputMode(), GetTextInputFlags()); + GetTextInputType(), GetTextInputMode(), GetTextInputFlags(), + ui::TextInputClient::FOCUS_REASON_OTHER); ui::IMEBridge::Get()->SetCurrentInputContext(context); ui::IMEEngineHandlerInterface* engine = GetEngine();
diff --git a/ui/base/ime/input_method_chromeos.cc b/ui/base/ime/input_method_chromeos.cc index b9ad9fcc..01a00a0 100644 --- a/ui/base/ime/input_method_chromeos.cc +++ b/ui/base/ime/input_method_chromeos.cc
@@ -192,7 +192,8 @@ // The focus in to or out from password field should also notify engine. engine->FocusOut(); ui::IMEEngineHandlerInterface::InputContext context( - GetTextInputType(), GetTextInputMode(), GetTextInputFlags()); + GetTextInputType(), GetTextInputMode(), GetTextInputFlags(), + GetClientFocusReason()); engine->FocusIn(context); } @@ -308,7 +309,8 @@ if (GetEngine()) { ui::IMEEngineHandlerInterface::InputContext context( - GetTextInputType(), GetTextInputMode(), GetTextInputFlags()); + GetTextInputType(), GetTextInputMode(), GetTextInputFlags(), + GetClientFocusReason()); GetEngine()->FocusIn(context); } } @@ -352,7 +354,8 @@ candidate_window->FocusStateChanged(IsNonPasswordInputFieldFocused()); ui::IMEEngineHandlerInterface::InputContext context( - GetTextInputType(), GetTextInputMode(), GetTextInputFlags()); + GetTextInputType(), GetTextInputMode(), GetTextInputFlags(), + GetClientFocusReason()); ui::IMEBridge::Get()->SetCurrentInputContext(context); if (!IsTextInputTypeNone()) @@ -749,4 +752,9 @@ return GetTextInputType() != TEXT_INPUT_TYPE_NONE; } +TextInputClient::FocusReason InputMethodChromeOS::GetClientFocusReason() const { + TextInputClient* client = GetTextInputClient(); + return client ? client->GetFocusReason() : TextInputClient::FOCUS_REASON_NONE; +} + } // namespace ui
diff --git a/ui/base/ime/input_method_chromeos.h b/ui/base/ime/input_method_chromeos.h index 78dad2e..893ac113 100644 --- a/ui/base/ime/input_method_chromeos.h +++ b/ui/base/ime/input_method_chromeos.h
@@ -19,6 +19,7 @@ #include "ui/base/ime/composition_text.h" #include "ui/base/ime/ime_input_context_handler_interface.h" #include "ui/base/ime/input_method_base.h" +#include "ui/base/ime/text_input_client.h" namespace ui { @@ -137,6 +138,9 @@ // Returns true if an text input field is focused. bool IsInputFieldFocused(); + // Gets the reason how the focused text input client was focused. + TextInputClient::FocusReason GetClientFocusReason() const; + // Pending composition text generated by the current pending key event. // It'll be sent to the focused text input client as soon as we receive the // processing result of the pending key event.
diff --git a/ui/base/ime/input_method_win.cc b/ui/base/ime/input_method_win.cc index 4c3b458..7b6b500c 100644 --- a/ui/base/ime/input_method_win.cc +++ b/ui/base/ime/input_method_win.cc
@@ -514,7 +514,8 @@ const TextInputType old_text_input_type = ui::IMEBridge::Get()->GetCurrentInputContext().type; ui::IMEEngineHandlerInterface::InputContext context( - GetTextInputType(), GetTextInputMode(), GetTextInputFlags()); + GetTextInputType(), GetTextInputMode(), GetTextInputFlags(), + ui::TextInputClient::FOCUS_REASON_OTHER); ui::IMEBridge::Get()->SetCurrentInputContext(context); ui::IMEEngineHandlerInterface* engine = GetEngine();
diff --git a/ui/base/ime/text_input_client.h b/ui/base/ime/text_input_client.h index d314045..19e3b74 100644 --- a/ui/base/ime/text_input_client.h +++ b/ui/base/ime/text_input_client.h
@@ -29,6 +29,21 @@ // An interface implemented by a View that needs text input support. class UI_BASE_IME_EXPORT TextInputClient { public: + // The reason the control was focused, used by the virtual keyboard to detect + // pen input. + enum FocusReason { + // Not focused. + FOCUS_REASON_NONE, + // User initiated with mouse. + FOCUS_REASON_MOUSE, + // User initiated with touch. + FOCUS_REASON_TOUCH, + // User initiated with pen. + FOCUS_REASON_PEN, + // All other reasons (e.g. system initiated, mouse) + FOCUS_REASON_OTHER, + }; + virtual ~TextInputClient(); // Input method result ------------------------------------------------------- @@ -97,6 +112,9 @@ // Returns true if there is composition text. virtual bool HasCompositionText() const = 0; + // Returns how the text input client was focused. + virtual FocusReason GetFocusReason() const = 0; + // Document content operations ---------------------------------------------- // Retrieves the UTF-16 based character range containing accessible text in
diff --git a/ui/base/ime/win/tsf_text_store_unittest.cc b/ui/base/ime/win/tsf_text_store_unittest.cc index 76c3eb1..9392429 100644 --- a/ui/base/ime/win/tsf_text_store_unittest.cc +++ b/ui/base/ime/win/tsf_text_store_unittest.cc
@@ -43,6 +43,7 @@ MOCK_CONST_METHOD0(GetCaretBounds, gfx::Rect()); MOCK_CONST_METHOD2(GetCompositionCharacterBounds, bool(uint32_t, gfx::Rect*)); MOCK_CONST_METHOD0(HasCompositionText, bool()); + MOCK_CONST_METHOD0(GetFocusReason, ui::TextInputClient::FocusReason()); MOCK_CONST_METHOD1(GetTextRange, bool(gfx::Range*)); MOCK_CONST_METHOD1(GetCompositionTextRange, bool(gfx::Range*)); MOCK_CONST_METHOD1(GetSelectionRange, bool(gfx::Range*));
diff --git a/ui/events/event_utils.cc b/ui/events/event_utils.cc index a92ebb5..d1f79963 100644 --- a/ui/events/event_utils.cc +++ b/ui/events/event_utils.cc
@@ -61,27 +61,31 @@ return ++g_custom_event_types; } +bool IsValidTimebase(base::TimeTicks now, base::TimeTicks timestamp) { + int64_t delta = (now - timestamp).InMilliseconds(); + return delta >= 0 && delta <= 60 * 1000; +} + void ValidateEventTimeClock(base::TimeTicks* timestamp) { -#if defined(USE_X11) || DCHECK_IS_ON() +#if defined(USE_X11) + + // Restrict this correction to X11 which is known to provide bogus timestamps + // that require correction (crbug.com/611950). + base::TimeTicks now = EventTimeForNow(); + if (!IsValidTimebase(now, *timestamp)) + *timestamp = now; + +#elif DCHECK_IS_ON() + if (base::debug::BeingDebugged()) return; base::TimeTicks now = EventTimeForNow(); - int64_t delta = (now - *timestamp).InMilliseconds(); - bool has_valid_timebase = delta >= 0 && delta <= 60 * 1000; - -#if defined(USE_X11) - // Restrict this correction to X11 which is known to provide bogus timestamps - // that require correction (crbug.com/611950). - if (!has_valid_timebase) - *timestamp = now; -#else - DCHECK(has_valid_timebase) + DCHECK(IsValidTimebase(now, *timestamp)) << "Event timestamp (" << *timestamp << ") is not consistent with " << "current time (" << now << ")."; -#endif -#endif // defined(USE_X11) || DCHECK_IS_ON() +#endif } bool ShouldDefaultToNaturalScroll() {
diff --git a/ui/gl/gl_switches_util.cc b/ui/gl/gl_switches_util.cc index cdf0932..df9e4f9a 100644 --- a/ui/gl/gl_switches_util.cc +++ b/ui/gl/gl_switches_util.cc
@@ -13,7 +13,7 @@ bool IsPresentationCallbackEnabled() { // TODO(peng): always enable once 776877 is fixed. -#if defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_LINUX) +#if defined(OS_CHROMEOS) || defined(OS_ANDROID) return true; #else return base::CommandLine::ForCurrentProcess()->HasSwitch(
diff --git a/ui/keyboard/keyboard_util.cc b/ui/keyboard/keyboard_util.cc index b502f7c..7e6a8f7d 100644 --- a/ui/keyboard/keyboard_util.cc +++ b/ui/keyboard/keyboard_util.cc
@@ -199,6 +199,10 @@ features::kEnableFullscreenHandwritingVirtualKeyboard); } +bool IsStylusVirtualKeyboardEnabled() { + return base::FeatureList::IsEnabled(features::kEnableStylusVirtualKeyboard); +} + bool IsGestureTypingEnabled() { return !base::CommandLine::ForCurrentProcess()->HasSwitch( switches::kDisableGestureTyping);
diff --git a/ui/keyboard/keyboard_util.h b/ui/keyboard/keyboard_util.h index 6ce3fbb..bffffef 100644 --- a/ui/keyboard/keyboard_util.h +++ b/ui/keyboard/keyboard_util.h
@@ -136,6 +136,9 @@ // Returns true if fullscreen handwriting virtual keyboard feature is enabled. KEYBOARD_EXPORT bool IsFullscreenHandwritingVirtualKeyboardEnabled(); +// Returns true if stylus virtual keyboard feature is enabled. +KEYBOARD_EXPORT bool IsStylusVirtualKeyboardEnabled(); + // Returns true if gesture typing option is enabled for virtual keyboard. KEYBOARD_EXPORT bool IsGestureTypingEnabled();
diff --git a/ui/login/display_manager.js b/ui/login/display_manager.js index 051216c..633187a 100644 --- a/ui/login/display_manager.js +++ b/ui/login/display_manager.js
@@ -253,6 +253,15 @@ displayType_: DISPLAY_TYPE.UNKNOWN, /** + * Number of users in the login screen UI. This is used by the views login + * screen, and is always 0 for WebUI login screen. + * TODO(crbug.com/808271): WebUI and views implementation should return the + * same user list. + * @type {number} + */ + userCount_: 0, + + /** * Error message (bubble) was shown. This is checked in tests. */ errorMessageWasShownForTesting_: false, @@ -326,6 +335,16 @@ }, /** + * Returns true if the login screen has user pods. + * @return {boolean} + */ + get hasUserPods() { + var userCount = + this.showingViewsLogin ? this.userCount_ : $('pod-row').pods.length; + return !!userCount; + }, + + /** * Sets the current size of the client area (display size). * @param {number} width client area width * @param {number} height client area height @@ -383,6 +402,14 @@ }, /** + * Sets the number of users on the views login screen. + * @param {number} userCount The number of users. + */ + setLoginUserCount: function(userCount) { + this.userCount_ = userCount; + }, + + /** * Handle accelerators. * @param {string} name Accelerator name. */
diff --git a/ui/ozone/platform/drm/common/drm_util.cc b/ui/ozone/platform/drm/common/drm_util.cc index 4256145..5eebf7d 100644 --- a/ui/ozone/platform/drm/common/drm_util.cc +++ b/ui/ozone/platform/drm/common/drm_util.cc
@@ -193,18 +193,16 @@ return ((device_index << 4) + display_index) & 0xFF; } -bool HasPerPlaneColorCorrectionMatrix(const int fd, drmModeCrtc* crtc) { - ScopedDrmPlaneResPtr plane_resources(drmModeGetPlaneResources(fd)); - DCHECK(plane_resources); - for (uint32_t i = 0; i < plane_resources->count_planes; ++i) { - ScopedDrmObjectPropertyPtr plane_props(drmModeObjectGetProperties( - fd, plane_resources->planes[i], DRM_MODE_OBJECT_PLANE)); - DCHECK(plane_props); +bool HasColorCorrectionMatrix(int fd, drmModeCrtc* crtc) { + ScopedDrmObjectPropertyPtr crtc_props( + drmModeObjectGetProperties(fd, crtc->crtc_id, DRM_MODE_OBJECT_CRTC)); - if (!FindDrmProperty(fd, plane_props.get(), "PLANE_CTM")) - return false; + for (uint32_t i = 0; i < crtc_props->count_props; ++i) { + ScopedDrmPropertyPtr property(drmModeGetProperty(fd, crtc_props->props[i])); + if (property && !strcmp(property->name, "CTM")) + return true; } - return true; + return false; } bool AreDisplayModesEqual(const DisplayMode_Params& lhs, @@ -215,23 +213,6 @@ } // namespace -ScopedDrmPropertyPtr FindDrmProperty(int fd, - drmModeObjectProperties* properties, - const char* name) { - for (uint32_t i = 0; i < properties->count_props; ++i) { - ScopedDrmPropertyPtr property(drmModeGetProperty(fd, properties->props[i])); - if (property && !strcmp(property->name, name)) - return property; - } - return nullptr; -} - -bool HasColorCorrectionMatrix(int fd, drmModeCrtc* crtc) { - ScopedDrmObjectPropertyPtr crtc_props( - drmModeObjectGetProperties(fd, crtc->crtc_id, DRM_MODE_OBJECT_CRTC)); - return !!FindDrmProperty(fd, crtc_props.get(), "CTM"); -} - DisplayMode_Params GetDisplayModeParams(const display::DisplayMode& mode) { DisplayMode_Params params; params.size = mode.size(); @@ -415,8 +396,7 @@ const bool is_aspect_preserving_scaling = IsAspectPreserving(fd, info->connector()); const bool has_color_correction_matrix = - HasColorCorrectionMatrix(fd, info->crtc()) || - HasPerPlaneColorCorrectionMatrix(fd, info->crtc()); + HasColorCorrectionMatrix(fd, info->crtc()); const gfx::Size maximum_cursor_size = GetMaximumCursorSize(fd); std::string display_name;
diff --git a/ui/ozone/platform/drm/common/drm_util.h b/ui/ozone/platform/drm/common/drm_util.h index 83aebd5..d08ba68 100644 --- a/ui/ozone/platform/drm/common/drm_util.h +++ b/ui/ozone/platform/drm/common/drm_util.h
@@ -106,12 +106,6 @@ gfx::Size GetMaximumCursorSize(int fd); -ScopedDrmPropertyPtr FindDrmProperty(int fd, - drmModeObjectProperties* properties, - const char* name); - -bool HasColorCorrectionMatrix(int fd, drmModeCrtc* crtc); - DisplayMode_Params GetDisplayModeParams(const display::DisplayMode& mode); std::unique_ptr<display::DisplayMode> CreateDisplayModeFromParams(
diff --git a/ui/ozone/platform/drm/common/scoped_drm_types.cc b/ui/ozone/platform/drm/common/scoped_drm_types.cc index f7d8be7..e8b7941 100644 --- a/ui/ozone/platform/drm/common/scoped_drm_types.cc +++ b/ui/ozone/platform/drm/common/scoped_drm_types.cc
@@ -55,11 +55,4 @@ drmModeFreeFB(framebuffer); } -ScopedDrmPropertyBlob::ScopedDrmPropertyBlob(int fd, uint32_t blob_id) - : fd(fd), blob_id(blob_id) {} - -ScopedDrmPropertyBlob::~ScopedDrmPropertyBlob() { - drmModeDestroyPropertyBlob(fd, blob_id); -} - } // namespace ui
diff --git a/ui/ozone/platform/drm/common/scoped_drm_types.h b/ui/ozone/platform/drm/common/scoped_drm_types.h index fd006e5..93a7d4d 100644 --- a/ui/ozone/platform/drm/common/scoped_drm_types.h +++ b/ui/ozone/platform/drm/common/scoped_drm_types.h
@@ -7,8 +7,6 @@ #include <memory> -#include "base/memory/free_deleter.h" - typedef struct _drmModeConnector drmModeConnector; typedef struct _drmModeCrtc drmModeCrtc; typedef struct _drmModeEncoder drmModeEncoder; @@ -20,8 +18,6 @@ typedef struct _drmModeAtomicReq drmModeAtomicReq; typedef struct _drmModePropertyBlob drmModePropertyBlobRes; typedef struct _drmModeRes drmModeRes; -typedef struct drm_color_lut drm_color_lut; -typedef struct drm_color_ctm drm_color_ctm; namespace ui { @@ -78,16 +74,6 @@ typedef std::unique_ptr<drmModeFB, DrmFramebufferDeleter> ScopedDrmFramebufferPtr; -struct ScopedDrmPropertyBlob { - ScopedDrmPropertyBlob(int fd, uint32_t blob_id); - ~ScopedDrmPropertyBlob(); - int fd; - uint32_t blob_id; -}; - -typedef std::unique_ptr<drm_color_lut, base::FreeDeleter> ScopedDrmColorLutPtr; -typedef std::unique_ptr<drm_color_ctm, base::FreeDeleter> ScopedDrmColorCtmPtr; - } // namespace ui #endif // UI_OZONE_PLATFORM_DRM_COMMON_SCOPED_DRM_TYPES_H_
diff --git a/ui/ozone/platform/drm/gpu/drm_device.cc b/ui/ozone/platform/drm/gpu/drm_device.cc index 740c251..993fd22 100644 --- a/ui/ozone/platform/drm/gpu/drm_device.cc +++ b/ui/ozone/platform/drm/gpu/drm_device.cc
@@ -132,6 +132,8 @@ return !drmIoctl(fd, DRM_IOCTL_MODE_GETRESOURCES, &resources); } +using ScopedDrmColorLutPtr = std::unique_ptr<drm_color_lut, base::FreeDeleter>; +using ScopedDrmColorCtmPtr = std::unique_ptr<drm_color_ctm, base::FreeDeleter>; ScopedDrmColorLutPtr CreateLutBlob( const std::vector<display::GammaRampRGBEntry>& source) { @@ -692,25 +694,13 @@ const std::vector<display::GammaRampRGBEntry>& degamma_lut, const std::vector<display::GammaRampRGBEntry>& gamma_lut, const std::vector<float>& correction_matrix) { - const bool should_set_gamma_properties = - !degamma_lut.empty() || !gamma_lut.empty(); - - ScopedDrmCrtcPtr crtc(drmModeGetCrtc(file_.GetPlatformFile(), crtc_id)); - // TODO(dcastagna): Precompute and cache the return value of - // HasColorCorrectionMatrix when we initialize DrmDevice. - // We currently assume that if a per-CRTC CTM is not available, per-plane - // CTMs will be. We can make this more explicit once we address this TODO. - if (!HasColorCorrectionMatrix(file_.GetPlatformFile(), crtc.get()) && - !should_set_gamma_properties) { - return plane_manager_->SetColorCorrectionOnAllCrtcPlanes( - crtc_id, CreateCTMBlob(correction_matrix)); - } - ScopedDrmObjectPropertyPtr crtc_props(drmModeObjectGetProperties( file_.GetPlatformFile(), crtc_id, DRM_MODE_OBJECT_CRTC)); // Extract only the needed properties. int max_num_properties_expected = 1; + const bool should_set_gamma_properties = + !degamma_lut.empty() || !gamma_lut.empty(); if (should_set_gamma_properties) max_num_properties_expected += 4;
diff --git a/ui/ozone/platform/drm/gpu/hardware_display_plane_manager.h b/ui/ozone/platform/drm/gpu/hardware_display_plane_manager.h index cb4de09e..134c40e 100644 --- a/ui/ozone/platform/drm/gpu/hardware_display_plane_manager.h +++ b/ui/ozone/platform/drm/gpu/hardware_display_plane_manager.h
@@ -93,12 +93,6 @@ // plane_list->old_plane_list. virtual bool DisableOverlayPlanes(HardwareDisplayPlaneList* plane_list) = 0; - // Set the drm_color_ctm contained in |ctm_blob_data| to all planes' KMS - // states - virtual bool SetColorCorrectionOnAllCrtcPlanes( - uint32_t crtc_id, - ScopedDrmColorCtmPtr ctm_blob_data) = 0; - // Check that the primary plane is valid for this // PlaneManager. Specifically, legacy can't support primary planes // that don't have the same size as the current mode of the crtc.
diff --git a/ui/ozone/platform/drm/gpu/hardware_display_plane_manager_atomic.cc b/ui/ozone/platform/drm/gpu/hardware_display_plane_manager_atomic.cc index 2ce0210..fc74708c 100644 --- a/ui/ozone/platform/drm/gpu/hardware_display_plane_manager_atomic.cc +++ b/ui/ozone/platform/drm/gpu/hardware_display_plane_manager_atomic.cc
@@ -4,14 +4,10 @@ #include "ui/ozone/platform/drm/gpu/hardware_display_plane_manager_atomic.h" -#include <xf86drm.h> -#include <xf86drmMode.h> - #include "base/bind.h" #include "base/files/platform_file.h" #include "base/stl_util.h" #include "base/threading/sequenced_task_runner_handle.h" -#include "ui/ozone/platform/drm/common/drm_util.h" #include "ui/ozone/platform/drm/gpu/crtc_controller.h" #include "ui/ozone/platform/drm/gpu/drm_device.h" #include "ui/ozone/platform/drm/gpu/hardware_display_plane_atomic.h" @@ -122,50 +118,6 @@ return ret; } -bool HardwareDisplayPlaneManagerAtomic::SetColorCorrectionOnAllCrtcPlanes( - uint32_t crtc_id, - ScopedDrmColorCtmPtr ctm_blob_data) { - ScopedDrmAtomicReqPtr property_set(drmModeAtomicAlloc()); - uint32_t blob_id = 0; - int fd = drm_->get_fd(); - int ret = drmModeCreatePropertyBlob(fd, ctm_blob_data.get(), - sizeof(drm_color_ctm), &blob_id); - DCHECK(!ret && blob_id); - ScopedDrmPropertyBlob property_blob(fd, blob_id); - - const int crtc_index = LookupCrtcIndex(crtc_id); - DCHECK_GE(crtc_index, 0); - const int crtc_bit = 1 << crtc_index; - - ScopedDrmPlaneResPtr plane_resources(drmModeGetPlaneResources(fd)); - DCHECK(plane_resources); - bool all_planes_ctm = true; - for (uint32_t i = 0; i < plane_resources->count_planes; ++i) { - ScopedDrmPlanePtr drm_plane( - drmModeGetPlane(fd, plane_resources->planes[i])); - DCHECK(drm_plane); - - // This assumes planes can belong only to one crtc. - if (!(drm_plane->possible_crtcs & crtc_bit)) - continue; - ScopedDrmObjectPropertyPtr plane_props(drmModeObjectGetProperties( - fd, plane_resources->planes[i], DRM_MODE_OBJECT_PLANE)); - DCHECK(plane_props); - ScopedDrmPropertyPtr property( - FindDrmProperty(fd, plane_props.get(), "PLANE_CTM")); - if (property) { - int ret = drmModeAtomicAddProperty( - property_set.get(), plane_resources->planes[i], property->prop_id, - property_blob.blob_id); - LOG_IF(ERROR, ret < 0) << "Failed to set PLANE_CTM property."; - } - all_planes_ctm = all_planes_ctm && property; - } - drm_->CommitProperties(property_set.get(), DRM_MODE_ATOMIC_NONBLOCK, 0, - DrmDevice::PageFlipCallback()); - return all_planes_ctm; -} - bool HardwareDisplayPlaneManagerAtomic::ValidatePrimarySize( const OverlayPlane& primary, const drmModeModeInfo& mode) {
diff --git a/ui/ozone/platform/drm/gpu/hardware_display_plane_manager_atomic.h b/ui/ozone/platform/drm/gpu/hardware_display_plane_manager_atomic.h index 63f1c76..46619c5 100644 --- a/ui/ozone/platform/drm/gpu/hardware_display_plane_manager_atomic.h +++ b/ui/ozone/platform/drm/gpu/hardware_display_plane_manager_atomic.h
@@ -22,10 +22,6 @@ bool test_only) override; bool DisableOverlayPlanes(HardwareDisplayPlaneList* plane_list) override; - bool SetColorCorrectionOnAllCrtcPlanes( - uint32_t crtc_id, - ScopedDrmColorCtmPtr ctm_blob_data) override; - bool ValidatePrimarySize(const OverlayPlane& primary, const drmModeModeInfo& mode) override;
diff --git a/ui/ozone/platform/drm/gpu/hardware_display_plane_manager_legacy.cc b/ui/ozone/platform/drm/gpu/hardware_display_plane_manager_legacy.cc index 493b29e..b9d8ead7 100644 --- a/ui/ozone/platform/drm/gpu/hardware_display_plane_manager_legacy.cc +++ b/ui/ozone/platform/drm/gpu/hardware_display_plane_manager_legacy.cc
@@ -131,14 +131,6 @@ return true; } -bool HardwareDisplayPlaneManagerLegacy::SetColorCorrectionOnAllCrtcPlanes( - uint32_t crtc_id, - ScopedDrmColorCtmPtr ctm_blob_data) { - NOTREACHED() - << "HardwareDisplayPlaneManagerLegacy doesn't support per plane CTM"; - return false; -} - bool HardwareDisplayPlaneManagerLegacy::ValidatePrimarySize( const OverlayPlane& primary, const drmModeModeInfo& mode) {
diff --git a/ui/ozone/platform/drm/gpu/hardware_display_plane_manager_legacy.h b/ui/ozone/platform/drm/gpu/hardware_display_plane_manager_legacy.h index 482a700d..db1d78a 100644 --- a/ui/ozone/platform/drm/gpu/hardware_display_plane_manager_legacy.h +++ b/ui/ozone/platform/drm/gpu/hardware_display_plane_manager_legacy.h
@@ -22,10 +22,6 @@ bool test_only) override; bool DisableOverlayPlanes(HardwareDisplayPlaneList* plane_list) override; - bool SetColorCorrectionOnAllCrtcPlanes( - uint32_t crtc_id, - ScopedDrmColorCtmPtr ctm_blob_data) override; - bool ValidatePrimarySize(const OverlayPlane& primary, const drmModeModeInfo& mode) override;
diff --git a/ui/views/controls/button/menu_button.cc b/ui/views/controls/button/menu_button.cc index b6996aab..4b4c769 100644 --- a/ui/views/controls/button/menu_button.cc +++ b/ui/views/controls/button/menu_button.cc
@@ -287,7 +287,7 @@ void MenuButton::GetAccessibleNodeData(ui::AXNodeData* node_data) { Button::GetAccessibleNodeData(node_data); node_data->role = ax::mojom::Role::kPopUpButton; - node_data->AddState(ax::mojom::State::kHaspopup); + node_data->SetHasPopup(ax::mojom::HasPopup::kMenu); if (enabled()) node_data->SetDefaultActionVerb(ax::mojom::DefaultActionVerb::kOpen); }
diff --git a/ui/views/controls/menu/menu_item_view.cc b/ui/views/controls/menu/menu_item_view.cc index 5c21e221..9db91f9 100644 --- a/ui/views/controls/menu/menu_item_view.cc +++ b/ui/views/controls/menu/menu_item_view.cc
@@ -171,7 +171,7 @@ switch (GetType()) { case SUBMENU: - node_data->AddState(ax::mojom::State::kHaspopup); + node_data->SetHasPopup(ax::mojom::HasPopup::kMenu); break; case CHECKBOX: case RADIO: {
diff --git a/ui/views/controls/prefix_selector.cc b/ui/views/controls/prefix_selector.cc index b1195d5..172dde2b 100644 --- a/ui/views/controls/prefix_selector.cc +++ b/ui/views/controls/prefix_selector.cc
@@ -89,6 +89,12 @@ return false; } +ui::TextInputClient::FocusReason PrefixSelector::GetFocusReason() const { + // TODO(https://crbug.com/824604): Implement this correctly. + NOTIMPLEMENTED_LOG_ONCE(); + return ui::TextInputClient::FOCUS_REASON_OTHER; +} + bool PrefixSelector::GetTextRange(gfx::Range* range) const { *range = gfx::Range(); return false;
diff --git a/ui/views/controls/prefix_selector.h b/ui/views/controls/prefix_selector.h index 1e70d1a..937da79 100644 --- a/ui/views/controls/prefix_selector.h +++ b/ui/views/controls/prefix_selector.h
@@ -44,6 +44,7 @@ bool GetCompositionCharacterBounds(uint32_t index, gfx::Rect* rect) const override; bool HasCompositionText() const override; + FocusReason GetFocusReason() const override; bool GetTextRange(gfx::Range* range) const override; bool GetCompositionTextRange(gfx::Range* range) const override; bool GetSelectionRange(gfx::Range* range) const override;
diff --git a/ui/views/controls/textfield/textfield.cc b/ui/views/controls/textfield/textfield.cc index 50d017d..3119ee3 100644 --- a/ui/views/controls/textfield/textfield.cc +++ b/ui/views/controls/textfield/textfield.cc
@@ -669,16 +669,22 @@ bool Textfield::OnMousePressed(const ui::MouseEvent& event) { const bool had_focus = HasFocus(); bool handled = controller_ && controller_->HandleMouseEvent(this, event); + + // If the controller triggered the focus, then record the focus reason as + // other. + if (!had_focus && HasFocus()) + focus_reason_ = ui::TextInputClient::FOCUS_REASON_OTHER; + if (!handled && (event.IsOnlyLeftMouseButton() || event.IsOnlyRightMouseButton())) { if (!had_focus) - RequestFocus(); + RequestFocusWithPointer(ui::EventPointerType::POINTER_TYPE_MOUSE); ShowImeIfNeeded(); } #if defined(OS_LINUX) && !defined(OS_CHROMEOS) if (!handled && !had_focus && event.IsOnlyMiddleMouseButton()) - RequestFocus(); + RequestFocusWithPointer(ui::EventPointerType::POINTER_TYPE_MOUSE); #endif return selection_controller_.OnMousePressed( @@ -752,7 +758,7 @@ void Textfield::OnGestureEvent(ui::GestureEvent* event) { switch (event->type()) { case ui::ET_GESTURE_TAP_DOWN: - RequestFocus(); + RequestFocusWithPointer(event->details().primary_pointer_type()); ShowImeIfNeeded(); event->SetHandled(); break; @@ -855,6 +861,28 @@ return GetRenderText()->focused() && View::CanHandleAccelerators(); } +void Textfield::RequestFocusWithPointer(ui::EventPointerType pointer_type) { + if (HasFocus()) + return; + + switch (pointer_type) { + case ui::EventPointerType::POINTER_TYPE_MOUSE: + focus_reason_ = ui::TextInputClient::FOCUS_REASON_MOUSE; + break; + case ui::EventPointerType::POINTER_TYPE_PEN: + focus_reason_ = ui::TextInputClient::FOCUS_REASON_PEN; + break; + case ui::EventPointerType::POINTER_TYPE_TOUCH: + focus_reason_ = ui::TextInputClient::FOCUS_REASON_TOUCH; + break; + default: + focus_reason_ = ui::TextInputClient::FOCUS_REASON_OTHER; + break; + } + + View::RequestFocus(); +} + void Textfield::AboutToRequestFocusFromTabTraversal(bool reverse) { SelectAll(PlatformStyle::kTextfieldScrollsToStartOnFocusChange); } @@ -1072,6 +1100,10 @@ } void Textfield::OnFocus() { + // Set focus reason if focused was gained without mouse or touch input. + if (focus_reason_ == ui::TextInputClient::FOCUS_REASON_NONE) + focus_reason_ = ui::TextInputClient::FOCUS_REASON_OTHER; + #if defined(OS_MACOSX) if (text_input_type_ == ui::TEXT_INPUT_TYPE_PASSWORD) password_input_enabler_.reset(new ui::ScopedPasswordInputEnabler()); @@ -1094,6 +1126,8 @@ } void Textfield::OnBlur() { + focus_reason_ = ui::TextInputClient::FOCUS_REASON_NONE; + gfx::RenderText* render_text = GetRenderText(); render_text->set_focused(false); @@ -1533,6 +1567,10 @@ return model_->HasCompositionText(); } +ui::TextInputClient::FocusReason Textfield::GetFocusReason() const { + return focus_reason_; +} + bool Textfield::GetTextRange(gfx::Range* range) const { if (!ImeEditingAllowed()) return false;
diff --git a/ui/views/controls/textfield/textfield.h b/ui/views/controls/textfield/textfield.h index 8f26353..8834ac08 100644 --- a/ui/views/controls/textfield/textfield.h +++ b/ui/views/controls/textfield/textfield.h
@@ -343,6 +343,7 @@ bool GetCompositionCharacterBounds(uint32_t index, gfx::Rect* rect) const override; bool HasCompositionText() const override; + FocusReason GetFocusReason() const override; bool GetTextRange(gfx::Range* range) const override; bool GetCompositionTextRange(gfx::Range* range) const override; bool GetSelectionRange(gfx::Range* range) const override; @@ -481,6 +482,10 @@ // Textfield::GetCaretBlinkMs(). void OnCursorBlinkTimerFired(); + // Like RequestFocus, but explicitly states that the focus is triggered by + // a pointer event. + void RequestFocusWithPointer(ui::EventPointerType pointer_type); + // The text model. std::unique_ptr<TextfieldModel> model_; @@ -602,6 +607,10 @@ std::unique_ptr<ui::ScopedPasswordInputEnabler> password_input_enabler_; #endif // defined(OS_MACOSX) + // How this textfield was focused. + ui::TextInputClient::FocusReason focus_reason_ = + ui::TextInputClient::FOCUS_REASON_NONE; + // Used to bind callback functions to this object. base::WeakPtrFactory<Textfield> weak_ptr_factory_;
diff --git a/ui/views/controls/textfield/textfield_unittest.cc b/ui/views/controls/textfield/textfield_unittest.cc index 775c61f..5f4f46e 100644 --- a/ui/views/controls/textfield/textfield_unittest.cc +++ b/ui/views/controls/textfield/textfield_unittest.cc
@@ -3552,4 +3552,95 @@ textfield_->GetAccessibilitySelectionFiredCount()); } +TEST_F(TextfieldTest, FocusReasonMouse) { + InitTextfield(); + widget_->GetFocusManager()->ClearFocus(); + EXPECT_EQ(ui::TextInputClient::FOCUS_REASON_NONE, + textfield_->GetFocusReason()); + + const auto& bounds = textfield_->bounds(); + MouseClick(bounds, 10); + + EXPECT_EQ(ui::TextInputClient::FOCUS_REASON_MOUSE, + textfield_->GetFocusReason()); +} + +TEST_F(TextfieldTest, FocusReasonTouchTap) { + InitTextfield(); + widget_->GetFocusManager()->ClearFocus(); + EXPECT_EQ(ui::TextInputClient::FOCUS_REASON_NONE, + textfield_->GetFocusReason()); + + ui::GestureEventDetails tap_details(ui::ET_GESTURE_TAP_DOWN); + tap_details.set_primary_pointer_type( + ui::EventPointerType::POINTER_TYPE_TOUCH); + GestureEventForTest tap(GetCursorPositionX(0), 0, tap_details); + textfield_->OnGestureEvent(&tap); + + EXPECT_EQ(ui::TextInputClient::FOCUS_REASON_TOUCH, + textfield_->GetFocusReason()); +} + +TEST_F(TextfieldTest, FocusReasonPenTap) { + InitTextfield(); + widget_->GetFocusManager()->ClearFocus(); + EXPECT_EQ(ui::TextInputClient::FOCUS_REASON_NONE, + textfield_->GetFocusReason()); + + ui::GestureEventDetails tap_details(ui::ET_GESTURE_TAP_DOWN); + tap_details.set_primary_pointer_type(ui::EventPointerType::POINTER_TYPE_PEN); + GestureEventForTest tap(GetCursorPositionX(0), 0, tap_details); + textfield_->OnGestureEvent(&tap); + + EXPECT_EQ(ui::TextInputClient::FOCUS_REASON_PEN, + textfield_->GetFocusReason()); +} + +TEST_F(TextfieldTest, FocusReasonMultipleEvents) { + InitTextfield(); + widget_->GetFocusManager()->ClearFocus(); + EXPECT_EQ(ui::TextInputClient::FOCUS_REASON_NONE, + textfield_->GetFocusReason()); + + // Pen tap, followed by a touch tap + { + ui::GestureEventDetails tap_details(ui::ET_GESTURE_TAP_DOWN); + tap_details.set_primary_pointer_type( + ui::EventPointerType::POINTER_TYPE_PEN); + GestureEventForTest tap(GetCursorPositionX(0), 0, tap_details); + textfield_->OnGestureEvent(&tap); + } + + { + ui::GestureEventDetails tap_details(ui::ET_GESTURE_TAP_DOWN); + tap_details.set_primary_pointer_type( + ui::EventPointerType::POINTER_TYPE_TOUCH); + GestureEventForTest tap(GetCursorPositionX(0), 0, tap_details); + textfield_->OnGestureEvent(&tap); + } + + EXPECT_EQ(ui::TextInputClient::FOCUS_REASON_PEN, + textfield_->GetFocusReason()); +} + +TEST_F(TextfieldTest, FocusReasonFocusBlurFocus) { + InitTextfield(); + widget_->GetFocusManager()->ClearFocus(); + EXPECT_EQ(ui::TextInputClient::FOCUS_REASON_NONE, + textfield_->GetFocusReason()); + + // Pen tap, blur, then programmatic focus. + ui::GestureEventDetails tap_details(ui::ET_GESTURE_TAP_DOWN); + tap_details.set_primary_pointer_type(ui::EventPointerType::POINTER_TYPE_PEN); + GestureEventForTest tap(GetCursorPositionX(0), 0, tap_details); + textfield_->OnGestureEvent(&tap); + + widget_->GetFocusManager()->ClearFocus(); + + textfield_->RequestFocus(); + + EXPECT_EQ(ui::TextInputClient::FOCUS_REASON_OTHER, + textfield_->GetFocusReason()); +} + } // namespace views
diff --git a/ui/webui/resources/cr_elements/cr_toggle/cr_toggle.html b/ui/webui/resources/cr_elements/cr_toggle/cr_toggle.html index 1d542c9b..0ea8fbf 100644 --- a/ui/webui/resources/cr_elements/cr_toggle/cr_toggle.html +++ b/ui/webui/resources/cr_elements/cr_toggle/cr_toggle.html
@@ -16,7 +16,13 @@ pointer-events: none; } - #container { + button { + background: none; + border: none; + cursor: inherit; + display: block; + outline: inherit; + padding: 0; position: relative; width: 34px; z-index: 0; @@ -45,11 +51,12 @@ opacity: 0.12; } - #button { + #knob { background-color: var( --cr-toggle-unchecked-button-color, var(--paper-grey-50)); border-radius: 50%; box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.4); + display: block; height: 16px; position: relative; transition: transform linear 80ms, background-color linear 80ms; @@ -57,26 +64,26 @@ z-index: 1; } - :host([checked]) #button { + :host([checked]) #knob { background-color: var( --cr-toggle-checked-button-color, var(--google-blue-500)); transform: translate3d(18px, 0, 0); } - :host-context([dir=rtl]):host([checked]) #button { + :host-context([dir=rtl]):host([checked]) #knob { transform: translate3d(-18px, 0, 0); } - :host([disabled]) #button { + :host([disabled]) #knob { background-color: #bdbdbd; opacity: 1; } paper-ripple { + --paper-ripple-opacity: 0.125; color: var(--cr-toggle-unchecked-ink-color, var(--primary-text-color)); height: 40px; left: -12px; - opacity: 0.5; pointer-events: none; top: -12px; transition: color linear 80ms; @@ -92,10 +99,16 @@ color: var(--cr-toggle-checked-ink-color, var(--primary-color)); } </style> - <div id="container"> - <div id="bar"></div> - <div id="button"></div> - </div> + <!-- A <button> is used (instead of a plain <div>) to avoid a corner case + when pointerdown is initiated in cr-toggle, but pointerup happens + outside the bounds of cr-toggle, which would end up firing a 'click' + event on the parent and unexpectedly modify the toggle's state (see + context at crbug.com/689158 and crbug.com/768555). The 'click' + event is not fired when the <button> wrapper is used. --> + <button tabindex="-1"> + <span id="bar"></span> + <span id="knob"></span> + </button> </template> <script src="cr_toggle.js"></script> </dom-module>
diff --git a/ui/webui/resources/cr_elements/cr_toggle/cr_toggle.js b/ui/webui/resources/cr_elements/cr_toggle/cr_toggle.js index d4d38a7..25c6441b 100644 --- a/ui/webui/resources/cr_elements/cr_toggle/cr_toggle.js +++ b/ui/webui/resources/cr_elements/cr_toggle/cr_toggle.js
@@ -63,9 +63,6 @@ */ handledInPointerMove_: false, - /** @private {number} */ - lastPointerUpTime_: 0, - /** @override */ attached: function() { let direction = this.matches(':host-context([dir=rtl]) cr-toggle') ? -1 : 1; @@ -113,7 +110,6 @@ /** @private */ onPointerUp_: function(e) { - this.lastPointerUpTime_ = e.timeStamp; this.removeEventListener('pointermove', this.boundPointerMove_); }, @@ -152,23 +148,6 @@ }, /** - * Whether the host of this element should handle a 'click' event it received, - * to be used when clicking on the parent is supposed to toggle the cr-toggle. - * - * This is necessary to avoid a corner case when pointerdown is initiated - * in cr-toggle, but pointerup happens outside the bounds of cr-toggle, which - * ends up firing a 'click' event on the parent (see context at - * crbug.com/689158 and crbug.com/768555). - * @param {!Event} e - * @return {boolean} - */ - shouldIgnoreHostTap: function(e) { - let timeStamp = - e.detail.sourceEvent ? e.detail.sourceEvent.timeStamp : e.timeStamp; - return timeStamp == this.lastPointerUpTime_; - }, - - /** * @param {boolean} fromKeyboard * @private */ @@ -196,7 +175,7 @@ // customize the element's ripple _createRipple: function() { - this._rippleContainer = this.$.button; + this._rippleContainer = this.$.knob; let ripple = Polymer.PaperRippleBehavior._createRipple(); ripple.id = 'ink'; ripple.setAttribute('recenters', '');