Skip to content

Commit

Permalink
Remove background painting logic in BraveTabStrip (uplift to 1.64.x) (#…
Browse files Browse the repository at this point in the history
…22371)

Uplift of #22337 (squashed) to beta
  • Loading branch information
brave-builds authored Mar 2, 2024
1 parent 183a574 commit 1423107
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
12 changes: 0 additions & 12 deletions browser/ui/views/tabs/brave_tab_strip.cc
Original file line number Diff line number Diff line change
Expand Up @@ -404,17 +404,5 @@ void BraveTabStrip::Layout() {
TabStrip::Layout();
}

void BraveTabStrip::OnPaintBackground(gfx::Canvas* canvas) {
// Unlike upstream, we are painting this view to an opaque layer in order to
// support layer-based shadows under the active tab. Paint a background so
// that all pixels are painted appropriately.
SkColor background_color =
ShouldShowVerticalTabs()
? GetColorProvider()->GetColor(kColorToolbar)
: controller_->GetFrameColor(BrowserFrameActiveState::kUseCurrent);

canvas->DrawColor(background_color);
}

BEGIN_METADATA(BraveTabStrip, TabStrip)
END_METADATA
1 change: 0 additions & 1 deletion browser/ui/views/tabs/brave_tab_strip.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ class BraveTabStrip : public TabStrip {
SkColor GetTabSeparatorColor() const override;
bool ShouldDrawStrokes() const override;
void Layout() override;
void OnPaintBackground(gfx::Canvas* canvas) override;

// Exposed for testing.
static constexpr float kBraveMinimumContrastRatioForOutlines = 1.0816f;
Expand Down

0 comments on commit 1423107

Please sign in to comment.