Commit ece9b5e4 authored by hashimoto's avatar hashimoto Committed by Commit bot

Fix horizontal scroll tab-switching behavior on Linux

The tab on the left side should be selected when scrolling to left and vice versa.

BUG=365501
TEST=Prepare a mouse with horizontal-scrolling feature, open multiple tabs, place cursor over tab strip and try to switch tabs.

Review URL: https://codereview.chromium.org/1084903002

Cr-Commit-Position: refs/heads/master@{#325260}
parent 13beb501
......@@ -131,7 +131,7 @@ bool BrowserRootView::OnMouseWheel(const ui::MouseWheelEvent& event) {
hittest == HTCAPTION ||
hittest == HTTOP) {
int scroll_offset = abs(event.y_offset()) > abs(event.x_offset()) ?
event.y_offset() : -event.x_offset();
event.y_offset() : event.x_offset();
Browser* browser = browser_view_->browser();
TabStripModel* model = browser->tab_strip_model();
// Switch to the next tab only if not at the end of the tab-strip.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment