Bug 1450017 - Part IV, Always set resizer direction explicitly in ScrollFrameHelper::CreateAnonymousContent() r=enndeakin+6102
authorTimothy Guan-tin Chien <timdream@gmail.com>
Tue, 10 Apr 2018 21:10:29 +0800
changeset 460886 407774fc7c7a3455134bfa3cad5a8c3a6ebe21ac
parent 460885 4ffb62df7a592d892b528ab91d98e85b2a3d8a90
child 460887 eabdcd541092ef9974ae8ec4fa5802704f4b8722
push id165
push userfmarier@mozilla.com
push dateMon, 30 Apr 2018 23:50:51 +0000
reviewersenndeakin
bugs1450017
milestone61.0a1
Bug 1450017 - Part IV, Always set resizer direction explicitly in ScrollFrameHelper::CreateAnonymousContent() r=enndeakin+6102 Given that we have access to the RTL/writing modes information via ScrollFrameHelper::IsPhysicalLTR(), set the dir to bottomleft/bottomright instead of context-aware value bottomend. MozReview-Commit-ID: Lfe053WOsY2
layout/generic/nsGfxScrollFrame.cpp
--- a/layout/generic/nsGfxScrollFrame.cpp
+++ b/layout/generic/nsGfxScrollFrame.cpp
@@ -4720,17 +4720,22 @@ ScrollFrameHelper::CreateAnonymousConten
         else {
           dir.AssignLiteral("left");
         }
         break;
       case NS_STYLE_RESIZE_VERTICAL:
         dir.AssignLiteral("bottom");
         break;
       case NS_STYLE_RESIZE_BOTH:
-        dir.AssignLiteral("bottomend");
+        if (IsScrollbarOnRight()) {
+          dir.AssignLiteral("bottomright");
+        }
+        else {
+          dir.AssignLiteral("bottomleft");
+        }
         break;
       default:
         NS_WARNING("only resizable types should have resizers");
     }
     mResizerContent->SetAttr(kNameSpaceID_None, nsGkAtoms::dir, dir, false);
 
     if (mIsRoot) {
       mResizerContent->SetProperty(nsGkAtoms::docLevelNativeAnonymousContent,