From d3cbada9f488d9d102bb04cfc6f4bc8ec3ef061d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Sun, 23 Apr 2023 04:48:46 +0000 Subject: [PATCH] Bug 1828879 - Fix position of RTL vertical overlay scrollbars. r=tnikkel,layout-reviewers It was just a silly mistake. In the rtl case the position is already the start, we don't need to move it into the box. Differential Revision: https://phabricator.services.mozilla.com/D176229 --- layout/generic/nsGfxScrollFrame.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/layout/generic/nsGfxScrollFrame.cpp b/layout/generic/nsGfxScrollFrame.cpp index 21f4e2c3385e..cce33c6a83d1 100644 --- a/layout/generic/nsGfxScrollFrame.cpp +++ b/layout/generic/nsGfxScrollFrame.cpp @@ -6534,9 +6534,7 @@ void nsHTMLScrollFrame::LayoutScrollbars(ScrollReflowInput& aState, // not visible because it is positioned just outside the scrollport. But // we know that it needs to be made visible so we shift it back in. vRect.width += width; - if (scrollbarOnLeft) { - vRect.x += width; - } else { + if (!scrollbarOnLeft) { vRect.x -= width; } }