Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(485)

Unified Diff: chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm

Issue 2680203004: Do RTL tabstrip transforms before animating tabs. (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
diff --git a/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm b/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
index 116c021143d4a3b9a8a072ff822c65b919704b47..ac56c5b6aa1f02730602ec168f632d7cc3b122f2 100644
--- a/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
+++ b/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
@@ -1127,6 +1127,10 @@ NSRect FlipRectInView(NSView* view, NSRect rect) {
}
isLastTabPinned = isPinned;
+ // Flip if in RTL mode.
+ tabFrame.origin.x =
+ FlipXInView(tabStripView_, tabFrame.size.width, tabFrame.origin.x);
+
if (laidOutNonPinnedTabs > numberOfNonPinnedTabs) {
// There is not enough space to fit this tab.
tabFrame.size.width = 0;
@@ -1145,9 +1149,6 @@ NSRect FlipRectInView(NSView* view, NSRect rect) {
}
}
- tabFrame.origin.x =
- FlipXInView(tabStripView_, tabFrame.size.width, tabFrame.origin.x);
-
// Check the frame by identifier to avoid redundant calls to animator.
id frameTarget = visible && animate ? [[tab view] animator] : [tab view];
NSValue* identifier = [NSValue valueWithPointer:[tab view]];
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698