New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 884941 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 2
Type: Bug



Sign in to add a comment

RTL tabstrip image misaligned

Project Member Reported by pkasting@chromium.org, Sep 18

Issue description

Run the browser with --force-ui-direction=rtl .  Install a theme such as https://chrome.google.com/webstore/detail/dots/gliedaffibdnbhbiaolgkdhhfbjgmhgi , where it's easy to see when things are misaligned.  Resize the window back and forth from the right edge.  Note how the tab and NTB backgrounds get misaligned; they seem to always be one resize event behind, so if you move the mouse rapidly and suddenly stop you can get arbitrarily large misalignment.

Not sure why this only seems to be wrong in RTL.  Wondering if it's something like, when we get the resize event we tell the tabstrip to update its background coordinate, and the tabstrip tries to calculate the mirrored X, but the width of the window hasn't been updated yet, so we use the old, out-of-date width and get the wrong coordinate as a result.

CCing some newer UI folks in case one of them wants to jump on this :)
 
I can't get on this right now, but I took a quick look. Here's some info for whoever jumps on this (this might be obvious, I'm not sure): 

The actual background image drawing occurs in Tab::PaintTabBackgroundFill() @ line 1451 (https://cs.chromium.org/chromium/src/chrome/browser/ui/views/tabs/tab.cc?rcl=b1e0638a12b569791c0e64ec0fce247c6682c440&l=1451). As far as I can tell, `background_offset_` is always 0 on Windows, so View::GetMirroredX() is returning something wrong. My guess is the problem is either in View or in BrowserViewLayout.

Sign in to add a comment