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 471957 407774fc7c7a3455134bfa3cad5a8c3a6ebe21ac
parent 471956 4ffb62df7a592d892b528ab91d98e85b2a3d8a90
child 471958 eabdcd541092ef9974ae8ec4fa5802704f4b8722
push id1728
push userjlund@mozilla.com
push dateMon, 18 Jun 2018 21:12:27 +0000
treeherdermozilla-release@c296fde26f5f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersenndeakin
bugs1450017
milestone61.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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,