Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] main from chromium:main #109

Merged
merged 32 commits into from
Dec 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
16bdb40
Reland "dlp: Process confidential Lacros windows in Ash."
Dec 14, 2021
91f1fa0
Delay expiry of histograms causing alerts.
Dec 14, 2021
028f25a
Roll Perfetto Trace Processor Linux from 86b18b837a45 to 1357bd132733
Dec 14, 2021
77142ae
Roll Chrome Win32 PGO Profile
Dec 14, 2021
73b15b3
Roll Perfetto Trace Processor Win from 86b18b837a45 to 1357bd132733
Dec 14, 2021
328d74d
Revert "Implement accessibility for expandable view"
sreejakshetty Dec 14, 2021
6c3ddbc
Revert "dcheck-on-cros: Disable DCHECK at slot_assignment.cc:252 on C…
Dec 14, 2021
2747485
Add Histograms to track Linux Vaapi Vulkan status
tm-chromium Dec 14, 2021
d5684ab
[Autofill Assistant] Pass in IsGsa function
Dec 14, 2021
dd4c3dd
[linux/wayland] Fixed terminate caused by binding to wrong version.
alex-voodoo Dec 14, 2021
8656aed
Roll src-internal from df7c46c625a3 to d49909553bd8 (1 revision)
Dec 14, 2021
2d55c09
[UPM] Invoke sync callback for profile store when sync is turned off
Dec 14, 2021
97ffe91
Delay expiry of frequently used histograms.
Dec 14, 2021
0482d92
QA Lacros: Move shared vector icons to //components/vector_icons/
Dec 14, 2021
e0cff60
Migrate remove_preinstalled_webview.py to Python 3
Dec 14, 2021
2b0c1f8
[iOS] Fix new overflow menu on iPhone landscape
rkgibson2 Dec 14, 2021
1c6ff76
CCA: Migrate unload.js to TypeScript
peter50216 Dec 14, 2021
eee864f
Grit: Add aliases chromeos -> chromeos_ash, lacros -> chromeos_lacros
freshp86 Dec 14, 2021
64693f3
[Autofill Assistant] Add binding for Driver
Dec 14, 2021
1541758
Remove core dimensions for mac builders in order to pick up new mac bots
KaptenJansson Dec 14, 2021
c753272
Remove default value from content::MediaStreamRequest() ctor
Dec 14, 2021
3debb2d
Roll Chrome Win64 PGO Profile
Dec 14, 2021
6d44280
Revert "Properly close Lens and open link after LRP press"
sreejakshetty Dec 14, 2021
b9897c0
Roll DevTools Frontend from ebad3a4739fd to a84185e6b5be (1 revision)
Dec 14, 2021
de087f5
Roll Dawn from b7e2f3654264 to 4682ae0034e7 (5 revisions)
Dec 14, 2021
af53d2b
Remove outer_rect DCHECK from CalculateClearForOpaqueRasterRects.
Dec 14, 2021
e352143
[MPArch] Migrate proxy and replication state updates to BCS
Dec 14, 2021
8840a09
Roll Skia from 33c28b9fa986 to d26057a2c0e1 (3 revisions)
Dec 14, 2021
60cd53c
[ios] Manage stable identifier in WebState
sdefresne Dec 14, 2021
af9b90a
CCA: Migrate app_window.js to TypeScript
peter50216 Dec 14, 2021
59c1d1c
Reland "ozone/wayland: fix mouse events in tests"
Dec 14, 2021
36043c5
Roll ChromeOS Bigcore AFDO profile from 98-4729.0-1638791049-benchmar…
Dec 14, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ vars = {
# 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': '33c28b9fa98634d36dbb5f404a3be33decc35463',
'skia_revision': 'd26057a2c0e1e35a2f3a498769a27d8f8b6b1e62',
# Three lines of non-changing comments so that
# the commit queue can handle CLs rolling V8
# and whatever else without interference from each other.
Expand Down Expand Up @@ -314,7 +314,7 @@ vars = {
# Three lines of non-changing comments so that
# the commit queue can handle CLs rolling devtools-frontend
# and whatever else without interference from each other.
'devtools_frontend_revision': 'ebad3a4739fd8170cf9b8b91496cf8b866972d0a',
'devtools_frontend_revision': 'a84185e6b5be9c88f8aad0fa589ab7c213d77e5d',
# Three lines of non-changing comments so that
# the commit queue can handle CLs rolling libprotobuf-mutator
# and whatever else without interference from each other.
Expand Down Expand Up @@ -354,7 +354,7 @@ vars = {
# Three lines of non-changing comments so that
# the commit queue can handle CLs rolling feed
# and whatever else without interference from each other.
'dawn_revision': 'b7e2f3654264515c50b10308afb70626ef22bce1',
'dawn_revision': '4682ae0034e7929dbea9b064ff39f6953eec406b',
# Three lines of non-changing comments so that
# the commit queue can handle CLs rolling feed
# and whatever else without interference from each other.
Expand Down Expand Up @@ -1700,7 +1700,7 @@ deps = {
Var('chromium_git') + '/v8/v8.git' + '@' + Var('v8_revision'),

'src-internal': {
'url': 'https://chrome-internal.googlesource.com/chrome/src-internal.git@df7c46c625a3bb971a83b1469c8e82f7db00eeca',
'url': 'https://chrome-internal.googlesource.com/chrome/src-internal.git@d49909553bd8838195664ca9df5b36229c2582da',
'condition': 'checkout_src_internal',
},

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ class MediaAccessPermissionRequestTest : public testing::Test {
video_id, blink::mojom::MediaStreamType::DEVICE_AUDIO_CAPTURE,
blink::mojom::MediaStreamType::DEVICE_VIDEO_CAPTURE,
false /* disable_local_echo */,
false /* request_pan_tilt_zoom_permission */);
false /* request_pan_tilt_zoom_permission */,
false /* region_capture_capable */);

std::unique_ptr<TestMediaAccessPermissionRequest> permission_request;
permission_request = std::make_unique<TestMediaAccessPermissionRequest>(
Expand Down
2 changes: 1 addition & 1 deletion android_webview/tools/remove_preinstalled_webview.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env vpython
#!/usr/bin/env vpython3
#
# Copyright 2018 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
Expand Down
1 change: 1 addition & 0 deletions ash/app_list/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ source_set("app_list") {
"//components/prefs",
"//components/services/app_service/public/cpp:app_update",
"//components/sync",
"//components/vector_icons",
"//extensions/common:common_constants",
"//mojo/public/cpp/bindings",
"//skia",
Expand Down
6 changes: 4 additions & 2 deletions ash/app_list/views/search_box_view.cc
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include "base/metrics/user_metrics.h"
#include "base/notreached.h"
#include "chromeos/ui/vector_icons/vector_icons.h"
#include "components/vector_icons/vector_icons.h"
#include "ui/accessibility/ax_node_data.h"
#include "ui/base/ime/composition_text.h"
#include "ui/base/l10n/l10n_util.h"
Expand Down Expand Up @@ -209,8 +210,9 @@ void SearchBoxView::UpdateModel(bool initiated_by_user) {
void SearchBoxView::UpdateSearchIcon() {
const bool search_engine_is_google =
AppListModelProvider::Get()->search_model()->search_engine_is_google();
const gfx::VectorIcon& google_icon =
is_search_box_active() ? kGoogleColorIcon : kGoogleBlackIcon;
const gfx::VectorIcon& google_icon = is_search_box_active()
? vector_icons::kGoogleColorIcon
: kGoogleBlackIcon;
const gfx::VectorIcon& icon =
search_engine_is_google ? google_icon : kSearchEngineNotGoogleIcon;
SetSearchIconImage(
Expand Down
6 changes: 4 additions & 2 deletions ash/app_list/views/search_box_view_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include "base/strings/utf_string_conversions.h"
#include "base/test/metrics/user_action_tester.h"
#include "base/test/scoped_feature_list.h"
#include "components/vector_icons/vector_icons.h"
#include "ui/base/ime/composition_text.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/compositor/layer.h"
Expand Down Expand Up @@ -284,8 +285,9 @@ TEST_F(SearchBoxViewTest, SearchBoxInactiveSearchBoxGoogle) {
TEST_F(SearchBoxViewTest, SearchBoxActiveSearchEngineGoogle) {
SetSearchEngineIsGoogle(true);
SetSearchBoxActive(true, ui::ET_MOUSE_PRESSED);
const gfx::ImageSkia expected_icon = gfx::CreateVectorIcon(
kGoogleColorIcon, kSearchBoxIconSize, kDefaultSearchboxColor);
const gfx::ImageSkia expected_icon =
gfx::CreateVectorIcon(vector_icons::kGoogleColorIcon, kSearchBoxIconSize,
kDefaultSearchboxColor);

const gfx::ImageSkia actual_icon = view()->search_icon()->GetImage();

Expand Down
1 change: 0 additions & 1 deletion ash/public/cpp/app_list/vector_icons/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ aggregate_vector_icons("app_list_vector_icons") {
"bookmark.icon",
"equal.icon",
"google_black.icon",
"google_color.icon",
"history.icon",
"mic_black.icon",
"omnibox_generic.icon",
Expand Down
2 changes: 0 additions & 2 deletions ash/resources/vector_icons/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ aggregate_vector_icons("ash_vector_icons") {
"dictation_on.icon",
"dictation_on_newui.icon",
"do_not_disturb_disabled.icon",
"dogfood.icon",
"eight_files.icon",
"files_app.icon",
"five_files.icon",
Expand Down Expand Up @@ -408,7 +407,6 @@ aggregate_vector_icons("ash_vector_icons") {
"unified_menu_rotation_lock_auto.icon",
"unified_menu_rotation_lock_landscape.icon",
"unified_menu_rotation_lock_portrait.icon",
"unified_menu_settings.icon",
"unified_menu_volume_high.icon",
"unified_menu_volume_low.icon",
"unified_menu_volume_medium.icon",
Expand Down
1 change: 0 additions & 1 deletion ash/system/time/calendar_event_list_item_view.cc
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ CalendarEventListItemView::CalendarEventListItemView(
time_range_(new views::Label()) {
SetLayoutManager(std::make_unique<views::FillLayout>());
GetViewAccessibility().OverrideName(GetClassName());
SetFocusBehavior(FocusBehavior::ALWAYS);

summary_->SetText(base::UTF8ToUTF16(event.summary()));
SetUpLabel(summary_);
Expand Down
1 change: 0 additions & 1 deletion ash/system/time/calendar_event_list_view.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ class ASH_EXPORT CalendarEventListView

private:
friend class CalendarViewEventListViewTest;
friend class CalendarViewTest;

// Updates the event list entries.
void UpdateListItems();
Expand Down
94 changes: 11 additions & 83 deletions ash/system/time/calendar_view.cc
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,6 @@ CalendarView::CalendarView(DetailedViewDelegate* delegate,
scroll_view_->SetDrawOverflowIndicator(false);
scroll_view_->SetVerticalScrollBarMode(
views::ScrollView::ScrollBarMode::kHiddenButEnabled);
scroll_view_->GetViewAccessibility().OverrideName(GetClassName());
scroll_view_->SetFocusBehavior(FocusBehavior::ALWAYS);
on_contents_scrolled_subscription_ =
scroll_view_->AddContentsScrolledCallback(base::BindRepeating(
&CalendarView::OnContentsScrolled, base::Unretained(this)));
Expand Down Expand Up @@ -412,7 +410,7 @@ int CalendarView::PositionOfSelectedDate() const {
}

void CalendarView::ResetToToday() {
if (event_list_container_)
if (event_list_)
return;

calendar_view_controller_->UpdateMonth(base::Time::Now());
Expand Down Expand Up @@ -518,11 +516,6 @@ void CalendarView::MaybeResetContentViewFocusBehavior() {
}

content_view_->SetFocusBehavior(FocusBehavior::ALWAYS);

// Also disable the focus behavior of the `event_list_container_`, since now
// the focusing ring is out of the date cells.
if (event_list_container_)
event_list_container_->SetFocusBehavior(FocusBehavior::NEVER);
}

void CalendarView::OnViewBoundsChanged(views::View* observed_view) {
Expand All @@ -542,24 +535,12 @@ void CalendarView::OnViewFocused(View* observed_view) {
if (observed_view != content_view_ || IsDateCellViewFocused())
return;

auto* focus_manager = GetFocusManager();
// When focusing on the `content_view_`, we decide which is the to-be-focued
// cell based on the current position.
previous_month_->EnableFocus();
current_month_->EnableFocus();
next_month_->EnableFocus();

// If the event list is showing, focus on the first cell in the current row or
// today's cell if today is in this row.
if (event_list_container_) {
focus_manager->SetFocusedView(
current_month_->focused_cells()[calendar_view_controller_
->GetExpandedRowIndex()]);
content_view_->SetFocusBehavior(FocusBehavior::NEVER);
event_list_container_->SetFocusBehavior(FocusBehavior::ALWAYS);
return;
}

// When focusing on the `content_view_`, we decide which is the to-be-focued
// cell based on the current position.
auto* focus_manager = GetFocusManager();
const int position = scroll_view_->GetVisibleRect().y();
const int row_height = calendar_view_controller_->row_height();

Expand Down Expand Up @@ -666,12 +647,9 @@ void CalendarView::OnEventsFetched(
}

void CalendarView::OpenEventList() {
if (event_list_container_)
if (event_list_)
return;

scroll_view_->SetVerticalScrollBarMode(
views::ScrollView::ScrollBarMode::kHiddenButEnabled);

if (!calendar_view_controller_->IsSelectedDateInCurrentMonth())
ScrollDownOneMonth();
base::AutoReset<bool> is_resetting_scrolling(&is_resetting_scroll_, true);
Expand All @@ -682,29 +660,16 @@ void CalendarView::OpenEventList() {
calendar_view_controller_->row_height());
scroll_view_->SetVerticalScrollBarMode(
views::ScrollView::ScrollBarMode::kDisabled);

// The event list is in a container, which will be used for escaping the
// focusing from the date cells.
event_list_container_ = AddChildView(std::make_unique<views::View>());
event_list_container_->SetLayoutManager(std::make_unique<views::BoxLayout>(
views::BoxLayout::Orientation::kVertical));
event_list_container_->GetViewAccessibility().OverrideName(GetClassName());
event_list_container_->SetFocusBehavior(
IsDateCellViewFocused() ? FocusBehavior::ALWAYS : FocusBehavior::NEVER);

event_list_ = event_list_container_->AddChildView(
event_list_ = AddChildView(
std::make_unique<CalendarEventListView>(calendar_view_controller_.get()));
event_list_->GetViewAccessibility().OverrideName(GetClassName());
event_list_->SetFocusBehavior(FocusBehavior::ALWAYS);
calendar_view_controller_->OnEventListOpened();
}

void CalendarView::CloseEventList() {
scroll_view_->ClipHeightTo(0, INT_MAX);
scroll_view_->SetVerticalScrollBarMode(
views::ScrollView::ScrollBarMode::kHiddenButEnabled);
RemoveChildViewT(event_list_container_);
event_list_container_ = nullptr;
RemoveChildViewT(event_list_);
event_list_ = nullptr;
calendar_view_controller_->OnEventListClosed();
}
Expand Down Expand Up @@ -802,7 +767,7 @@ void CalendarView::ScrollOneMonthWithAnimation(bool is_scrolling_up) {
if (is_resetting_scroll_)
return;

if (event_list_container_) {
if (event_list_) {
ScrollOneRowWithAnimation(is_scrolling_up);
return;
}
Expand Down Expand Up @@ -956,23 +921,13 @@ void CalendarView::OnEvent(ui::Event* event) {
// goes to the next focusable button in the header.
if (key_event->type() == ui::EventType::ET_KEY_PRESSED &&
views::FocusManager::IsTabTraversalKeyEvent(*key_event)) {
// Set focus on `scroll_view_`/`event_list_` or null pointer to escape the
// focusing on the date cell.
if (key_event->IsShiftDown()) {
scroll_view_->RequestFocus();
} else if (event_list_container_) {
event_list_container_->RequestFocus();
event_list_container_->SetFocusBehavior(FocusBehavior::NEVER);
} else {
focus_manager->SetFocusedView(nullptr);
}

// Set focus on null pointer first. Otherwise the it will auto
// `AdvanceFocus` when the focused cell is on blur.
focus_manager->SetFocusedView(nullptr);
current_month_->DisableFocus();
previous_month_->DisableFocus();
next_month_->DisableFocus();

TrayDetailedView::OnEvent(event);

content_view_->SetFocusBehavior(FocusBehavior::ALWAYS);
return;
}
Expand All @@ -988,10 +943,6 @@ void CalendarView::OnEvent(ui::Event* event) {
case ui::VKEY_UP:
case ui::VKEY_DOWN: {
auto* current_focusable_view = focus_manager->GetFocusedView();
// Enable the scroll bar mode, in case it is disabled when the event list
// is showing.
scroll_view_->SetVerticalScrollBarMode(
views::ScrollView::ScrollBarMode::kHiddenButEnabled);

// Moving 7 (`kDateInOneWeek`) steps will focus on the cell which is right
// above or below the current cell, since each row has 7 days.
Expand Down Expand Up @@ -1043,36 +994,13 @@ void CalendarView::OnEvent(ui::Event* event) {
}
}
focus_manager->SetFocusedView(current_focusable_view);
// After focusing on the new cell the view should have scrolled already
// if needed, disable the scroll bar mode if the even list is showing.
if (event_list_container_)
scroll_view_->SetVerticalScrollBarMode(
views::ScrollView::ScrollBarMode::kDisabled);
const int current_height =
scroll_view_->GetVisibleRect().y() - PositionOfCurrentMonth();
calendar_view_controller_->set_expanded_row_index(
current_height / calendar_view_controller_->row_height());
return;
}
case ui::VKEY_LEFT:
case ui::VKEY_RIGHT: {
// Enable the scroll bar mode, in case it is disabled when the event list
// is showing.
scroll_view_->SetVerticalScrollBarMode(
views::ScrollView::ScrollBarMode::kHiddenButEnabled);
bool is_reverse = base::i18n::IsRTL() ? key_code == ui::VKEY_RIGHT
: key_code == ui::VKEY_LEFT;
focus_manager->AdvanceFocus(/*reverse=*/is_reverse);
// After focusing on the new cell the view should have scrolled already
// if needed, disable the scroll bar mode if the even list is showing.
if (event_list_container_)
scroll_view_->SetVerticalScrollBarMode(
views::ScrollView::ScrollBarMode::kDisabled);

const int current_height =
scroll_view_->GetVisibleRect().y() - PositionOfCurrentMonth();
calendar_view_controller_->set_expanded_row_index(
current_height / calendar_view_controller_->row_height());
return;
}
default:
Expand Down
1 change: 0 additions & 1 deletion ash/system/time/calendar_view.h
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,6 @@ class ASH_EXPORT CalendarView : public CalendarViewController::Observer,
views::Button* settings_button_ = nullptr;
IconButton* up_button_ = nullptr;
IconButton* down_button_ = nullptr;
views::View* event_list_container_ = nullptr;
CalendarEventListView* event_list_ = nullptr;

// If it `is_resetting_scroll_`, we don't calculate the scroll position and we
Expand Down
Loading