Skip to content

Commit

Permalink
[cr132] Revert "[cr131] Tab::set_group => Tab::SetGroup"
Browse files Browse the repository at this point in the history
This reverts commit d9a3fa1.

This got reverted in upstream

Chromium change:
https://chromium.googlesource.com/chromium/src/+/1eadd223cce221615fa18db6647451a26a0315a2

commit bf601391652cebeaae149fab39eda062a5f28732
Author: Nasko Oskov <[email protected]>
Date:   Thu Oct 31 16:57:50 2024 +0000

    Revert "[views-ax] Migration of kName attribute in Tab"

    This reverts commit 1eadd223cce221615fa18db6647451a26a0315a2.

    Reason for revert: This CL has regressed window name availability to a11y APIs - https://crbug.com/374947846.

    Original change's description:
    > [views-ax] Migration of kName attribute in Tab
    >
    > This CL migrates the kName attribute in views to be updated
    > whenever its value should change, rather than querying the value
    > and computing it only when needed.
    >
    > As part of this change, the following views are updated:
    > Tab, BrowserView, PermissionChipView, and TabSlotView. The Tab
    > class extends TabSlotView. BrowserView::GetAccessibleTabLabel
    >  constructs the accessible name for a tab by gathering various
    > properties such as the title, group, memory usage, and possibly
    > other elements like permission chips, to create a comprehensive
    > and accurate label.
    >
    > This CL is part of the ViewsAX project:
    > https://docs.google.com/document/d/1Ku7HOyDsiZem1yaV6ccZ-tz3lO2XR2NEcm8HjR6d-VY/edit#heading=h.ke1u3utej413
    >
    > Bug: 325137417
    > Change-Id: Id1ca1da2e970c82575dff12bd48434f716d4548f
    > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5836477
    > Reviewed-by: Jacques Newman <[email protected]>
    > Commit-Queue: Gaurav Kumar <[email protected]>
    > Reviewed-by: Elly FJ <[email protected]>
    > Cr-Commit-Position: refs/heads/main@{#1367340}

    Bug: 325137417
  • Loading branch information
cdesouza-chromium authored and emerick committed Dec 10, 2024
1 parent 1d6f300 commit 890d544
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion browser/ui/views/tabs/brave_tab.cc
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,6 @@ void BraveTab::SetData(TabRendererData data) {
if (data_changed &&
tabs::utils::ShouldShowVerticalTabs(controller()->GetBrowser()) &&
data_.pinned) {
SetGroup(std::nullopt);
set_group(std::nullopt);
}
}
2 changes: 1 addition & 1 deletion browser/ui/views/tabs/brave_tab_container.cc
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ void BraveTabContainer::SetTabSlotVisibility() {
for (Tab* tab : layout_helper_->GetTabs()) {
if (std::optional<tab_groups::TabGroupId> group = tab->group();
group && !base::Contains(group_views_, *group)) {
tab->SetGroup(std::nullopt);
tab->set_group(std::nullopt);
}
}

Expand Down
2 changes: 1 addition & 1 deletion browser/ui/views/tabs/brave_tab_strip.cc
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ void BraveTabStrip::UpdateTabContainer() {
auto* tab = original_container->GetTabAtModelIndex(i);
// At this point, we don't have group views in the container. So before
// restoring groups, clears group for tabs.
tab->SetGroup(std::nullopt);
tab->set_group(std::nullopt);
tab_container_->AddTab(
tab->parent()->RemoveChildViewT(tab), i,
tab->data().pinned ? TabPinned::kPinned : TabPinned::kUnpinned);
Expand Down

0 comments on commit 890d544

Please sign in to comment.