chore: bump chromium to 94cc24d3bb17a7406ba6c6cc6dc29 (master) (#21485)
This commit is contained in:
parent
19cd8f3a02
commit
0f2f9a580a
47 changed files with 285 additions and 256 deletions
|
@ -112,17 +112,17 @@ index a258d038da4a2bbfc6ec13c250781166235c1fbc..f6dbaa19cdb8938204c3452622589708
|
|||
+ EXPECT_EQ(7, changed_count());
|
||||
}
|
||||
diff --git a/chrome/browser/ui/views/menu_item_view_interactive_uitest.cc b/chrome/browser/ui/views/menu_item_view_interactive_uitest.cc
|
||||
index 1d7f5dc3abe95ffaa847454e2be1e9872fedc287..6e67fff6631d2d5339df6a912d917862bce37f3d 100644
|
||||
index 326fe5abe680051a393c49ecbbdb07354ee16191..b80baf9290c054a3f254b73b4ed82f785c02b4b1 100644
|
||||
--- a/chrome/browser/ui/views/menu_item_view_interactive_uitest.cc
|
||||
+++ b/chrome/browser/ui/views/menu_item_view_interactive_uitest.cc
|
||||
@@ -91,8 +91,8 @@ class MenuItemViewTestInsert : public MenuTestBase {
|
||||
|
||||
inserted_item_ = menu()->AddMenuItemAt(
|
||||
INSERT_INDEX, 1000, ASCIIToUTF16("inserted item"), base::string16(),
|
||||
- nullptr, gfx::ImageSkia(), nullptr, views::MenuItemView::NORMAL,
|
||||
- nullptr, gfx::ImageSkia(), nullptr, views::MenuItemView::Type::kNormal,
|
||||
- ui::NORMAL_SEPARATOR);
|
||||
+ base::string16(), nullptr, gfx::ImageSkia(), nullptr,
|
||||
+ views::MenuItemView::NORMAL, ui::NORMAL_SEPARATOR);
|
||||
+ views::MenuItemView::Type::kNormal, ui::NORMAL_SEPARATOR);
|
||||
ASSERT_TRUE(inserted_item_);
|
||||
menu()->ChildrenChanged();
|
||||
|
||||
|
@ -130,10 +130,10 @@ index 1d7f5dc3abe95ffaa847454e2be1e9872fedc287..6e67fff6631d2d5339df6a912d917862
|
|||
void Step2() {
|
||||
inserted_item_ = menu()->AddMenuItemAt(
|
||||
INSERT_INDEX, 1000, ASCIIToUTF16("inserted item"), base::string16(),
|
||||
- nullptr, gfx::ImageSkia(), nullptr, views::MenuItemView::NORMAL,
|
||||
- nullptr, gfx::ImageSkia(), nullptr, views::MenuItemView::Type::kNormal,
|
||||
- ui::NORMAL_SEPARATOR);
|
||||
+ base::string16(), nullptr, gfx::ImageSkia(), nullptr,
|
||||
+ views::MenuItemView::NORMAL, ui::NORMAL_SEPARATOR);
|
||||
+ views::MenuItemView::Type::kNormal, ui::NORMAL_SEPARATOR);
|
||||
ASSERT_TRUE(inserted_item_);
|
||||
menu()->ChildrenChanged();
|
||||
|
||||
|
@ -267,7 +267,7 @@ index 1ae8909a1404a43b34b9ef585511c7a3de39fa28..0d2a74ab5e9d55201a4992d81aecf9c2
|
|||
const gfx::VectorIcon* minor_icon = nullptr;
|
||||
gfx::Image icon;
|
||||
diff --git a/ui/views/controls/menu/menu_item_view.cc b/ui/views/controls/menu/menu_item_view.cc
|
||||
index e86941132ce80e262d1961ff3cdad79b44abb878..6e67ffea103e7169d35b37455ded83d8d812d77b 100644
|
||||
index 07fc2153d8ad802a6ad1db9a2fc85498ce9a2dd0..2bfb29aaebe7a5a192a469519090bdc1e35672b0 100644
|
||||
--- a/ui/views/controls/menu/menu_item_view.cc
|
||||
+++ b/ui/views/controls/menu/menu_item_view.cc
|
||||
@@ -278,6 +278,7 @@ MenuItemView* MenuItemView::AddMenuItemAt(
|
||||
|
@ -290,20 +290,20 @@ index e86941132ce80e262d1961ff3cdad79b44abb878..6e67ffea103e7169d35b37455ded83d8
|
|||
MenuItemView* MenuItemView::AppendMenuItem(int item_id,
|
||||
const base::string16& label,
|
||||
const gfx::ImageSkia& icon) {
|
||||
- return AppendMenuItemImpl(item_id, label, icon, NORMAL);
|
||||
+ return AppendMenuItemImpl(item_id, label, base::string16(), icon, NORMAL);
|
||||
- return AppendMenuItemImpl(item_id, label, icon, Type::kNormal);
|
||||
+ return AppendMenuItemImpl(item_id, label, base::string16(), icon, Type::kNormal);
|
||||
}
|
||||
|
||||
MenuItemView* MenuItemView::AppendSubMenu(int item_id,
|
||||
const base::string16& label,
|
||||
const gfx::ImageSkia& icon) {
|
||||
- return AppendMenuItemImpl(item_id, label, icon, SUBMENU);
|
||||
+ return AppendMenuItemImpl(item_id, label, base::string16(), icon, SUBMENU);
|
||||
- return AppendMenuItemImpl(item_id, label, icon, Type::kSubMenu);
|
||||
+ return AppendMenuItemImpl(item_id, label, base::string16(), icon, Type::kSubMenu);
|
||||
}
|
||||
|
||||
void MenuItemView::AppendSeparator() {
|
||||
- AppendMenuItemImpl(0, base::string16(), gfx::ImageSkia(), SEPARATOR);
|
||||
+ AppendMenuItemImpl(0, base::string16(), base::string16(), gfx::ImageSkia(), SEPARATOR);
|
||||
- AppendMenuItemImpl(0, base::string16(), gfx::ImageSkia(), Type::kSeparator);
|
||||
+ AppendMenuItemImpl(0, base::string16(), base::string16(), gfx::ImageSkia(), Type::kSeparator);
|
||||
}
|
||||
|
||||
void MenuItemView::AddSeparatorAt(int index) {
|
||||
|
@ -311,7 +311,7 @@ index e86941132ce80e262d1961ff3cdad79b44abb878..6e67ffea103e7169d35b37455ded83d8
|
|||
+ /*sub_label=*/base::string16(),
|
||||
/*minor_text=*/base::string16(), /*minor_icon=*/nullptr,
|
||||
/*icon=*/gfx::ImageSkia(), /*vector_icon=*/nullptr,
|
||||
/*type=*/SEPARATOR,
|
||||
/*type=*/Type::kSeparator,
|
||||
@@ -362,10 +365,11 @@ void MenuItemView::AddSeparatorAt(int index) {
|
||||
|
||||
MenuItemView* MenuItemView::AppendMenuItemImpl(int item_id,
|
||||
|
@ -337,7 +337,7 @@ index e86941132ce80e262d1961ff3cdad79b44abb878..6e67ffea103e7169d35b37455ded83d8
|
|||
void MenuItemView::SetMinorText(const base::string16& minor_text) {
|
||||
minor_text_ = minor_text;
|
||||
invalidate_dimensions(); // Triggers preferred size recalculation.
|
||||
@@ -987,13 +996,23 @@ void MenuItemView::PaintButton(gfx::Canvas* canvas, PaintButtonMode mode) {
|
||||
@@ -988,13 +997,23 @@ void MenuItemView::PaintButton(gfx::Canvas* canvas, PaintButtonMode mode) {
|
||||
(!delegate ||
|
||||
delegate->ShouldReserveSpaceForSubmenuIndicator() ?
|
||||
item_right_margin_ : config.arrow_to_edge_padding);
|
||||
|
@ -362,7 +362,7 @@ index e86941132ce80e262d1961ff3cdad79b44abb878..6e67ffea103e7169d35b37455ded83d8
|
|||
PaintMinorIconAndText(canvas, style);
|
||||
|
||||
// Set the submenu indicator (arrow) image and color.
|
||||
@@ -1244,6 +1263,11 @@ MenuItemView::MenuItemDimensions MenuItemView::CalculateDimensions() const {
|
||||
@@ -1245,6 +1264,11 @@ MenuItemView::MenuItemDimensions MenuItemView::CalculateDimensions() const {
|
||||
|
||||
// Determine the length of the label text.
|
||||
int string_width = gfx::GetStringWidth(title_, style.font_list);
|
||||
|
@ -374,7 +374,7 @@ index e86941132ce80e262d1961ff3cdad79b44abb878..6e67ffea103e7169d35b37455ded83d8
|
|||
dimensions.standard_width = string_width + label_start +
|
||||
item_right_margin_;
|
||||
// Determine the length of the right-side text.
|
||||
@@ -1251,9 +1275,10 @@ MenuItemView::MenuItemDimensions MenuItemView::CalculateDimensions() const {
|
||||
@@ -1252,9 +1276,10 @@ MenuItemView::MenuItemDimensions MenuItemView::CalculateDimensions() const {
|
||||
minor_text.empty() ? 0 : gfx::GetStringWidth(minor_text, style.font_list);
|
||||
|
||||
// Determine the height to use.
|
||||
|
@ -389,7 +389,7 @@ index e86941132ce80e262d1961ff3cdad79b44abb878..6e67ffea103e7169d35b37455ded83d8
|
|||
std::max(dimensions.height, MenuConfig::instance().item_min_height);
|
||||
|
||||
diff --git a/ui/views/controls/menu/menu_item_view.h b/ui/views/controls/menu/menu_item_view.h
|
||||
index c453320c3fbd8ad5581a78b0b63d7a06cda4d542..b92470f17446698515ae2e973e51628023d075de 100644
|
||||
index 6a69047e9c1ba7e1a93e1d730edc7639476561dd..1720c480fb72fb7a4aed551c30a252fbb813873c 100644
|
||||
--- a/ui/views/controls/menu/menu_item_view.h
|
||||
+++ b/ui/views/controls/menu/menu_item_view.h
|
||||
@@ -152,6 +152,7 @@ class VIEWS_EXPORT MenuItemView : public View {
|
||||
|
@ -438,7 +438,7 @@ index c453320c3fbd8ad5581a78b0b63d7a06cda4d542..b92470f17446698515ae2e973e516280
|
|||
base::string16 minor_text_;
|
||||
|
||||
diff --git a/ui/views/controls/menu/menu_item_view_unittest.cc b/ui/views/controls/menu/menu_item_view_unittest.cc
|
||||
index 27d189a5be20d001ac6c457f4540e5e5430dde37..5c749133714d40595ef804d56951eed35abee91e 100644
|
||||
index 6b5229578e0856a07c85db7d5eb36ffee812cef8..3d90eefa5345f4dc8563dfcefb2ee1376dd668d3 100644
|
||||
--- a/ui/views/controls/menu/menu_item_view_unittest.cc
|
||||
+++ b/ui/views/controls/menu/menu_item_view_unittest.cc
|
||||
@@ -322,10 +322,10 @@ class MenuItemViewPaintUnitTest : public ViewsTestBase {
|
||||
|
@ -447,22 +447,22 @@ index 27d189a5be20d001ac6c457f4540e5e5430dde37..5c749133714d40595ef804d56951eed3
|
|||
auto AddItem = [this](auto label, auto minor_label, auto minor_icon) {
|
||||
- menu_item_view()->AddMenuItemAt(0, 1000, base::ASCIIToUTF16(label),
|
||||
- minor_label, minor_icon, gfx::ImageSkia(),
|
||||
- nullptr, views::MenuItemView::NORMAL,
|
||||
- nullptr, views::MenuItemView::Type::kNormal,
|
||||
- ui::NORMAL_SEPARATOR);
|
||||
+ menu_item_view()->AddMenuItemAt(
|
||||
+ 0, 1000, base::ASCIIToUTF16(label), base::string16(), minor_label,
|
||||
+ minor_icon, gfx::ImageSkia(), nullptr, views::MenuItemView::NORMAL,
|
||||
+ minor_icon, gfx::ImageSkia(), nullptr, views::MenuItemView::Type::kNormal,
|
||||
+ ui::NORMAL_SEPARATOR);
|
||||
};
|
||||
AddItem("No minor content", base::string16(), nullptr);
|
||||
AddItem("Minor text only", base::ASCIIToUTF16("minor text"), nullptr);
|
||||
diff --git a/ui/views/controls/menu/menu_model_adapter.cc b/ui/views/controls/menu/menu_model_adapter.cc
|
||||
index beac9986b2c6d13cde9cb26310eefc01cfbbbe09..ab9ac14fcd346ce5490c916cf3eceb534510fb69 100644
|
||||
index 792b864594b36526cfb77292e921f9a62e1de7e4..d37d949a0db198b89f75603720e65ef35e9dc37b 100644
|
||||
--- a/ui/views/controls/menu/menu_model_adapter.cc
|
||||
+++ b/ui/views/controls/menu/menu_model_adapter.cc
|
||||
@@ -99,8 +99,8 @@ MenuItemView* MenuModelAdapter::AddMenuItemFromModelAt(ui::MenuModel* model,
|
||||
|
||||
if (*type == MenuItemView::SEPARATOR) {
|
||||
if (*type == MenuItemView::Type::kSeparator) {
|
||||
return menu->AddMenuItemAt(menu_index, item_id, base::string16(),
|
||||
- base::string16(), nullptr, gfx::ImageSkia(),
|
||||
- nullptr, *type,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue