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

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

Issue 2493273002: [Mac] Fix tab dragging in RTL (Closed)
Patch Set: Stray log Created 4 years, 1 month 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 a8499d1c31d7899bdb40c222f624d63d1dd27927..e2853503ab23dabb61e9e0dd50b9e0bbd3cb739b 100644
--- a/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
+++ b/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
@@ -1756,8 +1756,9 @@ NSRect FlipRectInView(NSView* view, NSRect rect) {
// No placeholder, return the end of the strip.
if (placeholderTab_ == nil)
return count;
-
- double placeholderX = placeholderFrame_.origin.x;
+ BOOL isRTL = cocoa_l10n_util::ShouldDoExperimentalRTLLayout();
+ double placeholderX =
+ isRTL ? NSMaxX(placeholderFrame_) : placeholderFrame_.origin.x;
int index = 0;
int location = 0;
while (index < count) {
@@ -1778,7 +1779,8 @@ NSRect FlipRectInView(NSView* view, NSRect rect) {
index++;
continue;
}
- if (placeholderX <= NSMinX([curr frame]))
+ if (isRTL ? placeholderX >= NSMaxX([curr frame])
+ : placeholderX <= NSMinX([curr frame]))
break;
index++;
location++;
« 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