Bug 1554571 - Part 2: Remove unused sbattr="scrollbar-thumb" from XUL thumb elements. r=emilio
☠☠ backed out by 0a8bb0b56daa ☠ ☠
authorCameron McCormack <cam@mcc.id.au>
Thu, 27 Jun 2019 00:24:56 +0000
changeset 543102 c14e9c381345d6710682ab5ff98e3c02c1ff3b18
parent 543101 a2143551d7bc8dc407cd1cab5d03850dc660c1bc
child 543103 30728685499e9c78aa43691c42cc452fb04fa444
push id2131
push userffxbld-merge
push dateMon, 26 Aug 2019 18:30:20 +0000
treeherdermozilla-release@b19ffb3ca153 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersemilio
bugs1554571
milestone69.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 1554571 - Part 2: Remove unused sbattr="scrollbar-thumb" from XUL thumb elements. r=emilio Differential Revision: https://phabricator.services.mozilla.com/D33122
layout/xul/nsScrollbarFrame.cpp
toolkit/content/minimal-xul.css
--- a/layout/xul/nsScrollbarFrame.cpp
+++ b/layout/xul/nsScrollbarFrame.cpp
@@ -279,29 +279,16 @@ int32_t nsScrollbarFrame::MoveToNewPosit
     }
   }
   content->UnsetAttr(kNameSpaceID_None, nsGkAtoms::smooth, false);
   return curpos;
 }
 
 nsresult nsScrollbarFrame::CreateAnonymousContent(
     nsTArray<ContentInfo>& aElements) {
-  // clang-format off
-
-  // <xul:scrollbarbutton sbattr="scrollbar-up-top" type="decrement" xbl:inherits="curpos,maxpos,disabled"/>
-  // <xul:scrollbarbutton sbattr="scrollbar-down-top" type="increment" xbl:inherits="curpos,maxpos,disabled"/>
-  // <xul:slider flex="1" xbl:inherits="disabled,curpos,maxpos,pageincrement,increment,orient">
-  //   <xul:thumb sbattr="scrollbar-thumb" xbl:inherits="orient,collapsed=disabled"
-  //              align="center" pack="center"/>
-  // </xul:slider>
-  // <xul:scrollbarbutton sbattr="scrollbar-up-bottom" type="decrement" xbl:inherits="curpos,maxpos,disabled"/>
-  // <xul:scrollbarbutton sbattr="scrollbar-down-bottom" type="increment" xbl:inherits="curpos,maxpos,disabled"/>
-
-  // clang-format on
-
   nsNodeInfoManager* nodeInfoManager = mContent->NodeInfo()->NodeInfoManager();
 
   Element* el(GetContent()->AsElement());
 
   // If there are children already in the node, don't create any anonymous
   // content (this only apply to crashtests/369038-1.xhtml)
   if (el->HasChildren()) {
     return NS_OK;
@@ -347,18 +334,16 @@ nsresult nsScrollbarFrame::CreateAnonymo
   if (!aElements.AppendElement(mSlider)) {
     return NS_ERROR_OUT_OF_MEMORY;
   }
 
   NS_TrustedNewXULElement(
       getter_AddRefs(mThumb),
       nodeInfoManager->GetNodeInfo(nsGkAtoms::thumb, nullptr, kNameSpaceID_XUL,
                                    nsINode::ELEMENT_NODE));
-  mThumb->SetAttr(kNameSpaceID_None, nsGkAtoms::sbattr,
-                  NS_LITERAL_STRING("scrollbar-thumb"), false);
   mThumb->SetAttr(kNameSpaceID_None, nsGkAtoms::orient, orient, false);
   mThumb->SetAttr(kNameSpaceID_None, nsGkAtoms::align,
                   NS_LITERAL_STRING("center"), false);
   mThumb->SetAttr(kNameSpaceID_None, nsGkAtoms::pack,
                   NS_LITERAL_STRING("center"), false);
   mSlider->AppendChildTo(mThumb, false);
 
   NS_TrustedNewXULElement(
--- a/toolkit/content/minimal-xul.css
+++ b/toolkit/content/minimal-xul.css
@@ -147,12 +147,12 @@ scrollbar[value="hidden"] {
 
 @media (-moz-scrollbar-end-forward: 0) {
   scrollbarbutton[sbattr="scrollbar-down-bottom"] {
     display: none;
   }
 }
 
 @media (-moz-scrollbar-thumb-proportional) {
-  thumb[sbattr="scrollbar-thumb"] {
+  thumb {
     -moz-box-flex: 1;
   }
 }