Bug 1361781 - Ensure nsLayoutUtils::SetFixedPositionLayerData sets the SideBits: eSideBitsTop and eSideBitsLeft r=tnikkel
authorRandall Barker <rbarker@mozilla.com>
Wed, 03 May 2017 10:35:38 -0700
changeset 357160 31e5f57bebfb83d8ce0c733698fa33386331630d
parent 357159 46450bea21d82117608bb45a99edb5cbb5933be7
child 357161 13fc94c53f3f7f108dee685a96c0b3996b771842
push id90052
push userrbarker@mozilla.com
push dateTue, 09 May 2017 00:01:59 +0000
treeherdermozilla-inbound@177335aa1d58 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstnikkel
bugs1361781
milestone55.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 1361781 - Ensure nsLayoutUtils::SetFixedPositionLayerData sets the SideBits: eSideBitsTop and eSideBitsLeft r=tnikkel MozReview-Commit-ID: LxKOsExXGfH
layout/base/nsLayoutUtils.cpp
--- a/layout/base/nsLayoutUtils.cpp
+++ b/layout/base/nsLayoutUtils.cpp
@@ -2055,25 +2055,29 @@ nsLayoutUtils::SetFixedPositionLayerData
     if (position->mOffset.GetRightUnit() != eStyleUnit_Auto) {
       sides |= eSideBitsRight;
       if (position->mOffset.GetLeftUnit() != eStyleUnit_Auto) {
         sides |= eSideBitsLeft;
         anchor.x = anchorRect.x + anchorRect.width / 2.f;
       } else {
         anchor.x = anchorRect.XMost();
       }
+    } else if (position->mOffset.GetLeftUnit() != eStyleUnit_Auto) {
+      sides |= eSideBitsLeft;
     }
     if (position->mOffset.GetBottomUnit() != eStyleUnit_Auto) {
       sides |= eSideBitsBottom;
       if (position->mOffset.GetTopUnit() != eStyleUnit_Auto) {
         sides |= eSideBitsTop;
         anchor.y = anchorRect.y + anchorRect.height / 2.f;
       } else {
         anchor.y = anchorRect.YMost();
       }
+    } else if (position->mOffset.GetTopUnit() != eStyleUnit_Auto) {
+      sides |= eSideBitsTop;
     }
   }
 
   ViewID id = FrameMetrics::NULL_SCROLL_ID;
   if (nsIFrame* rootScrollFrame = aPresContext->PresShell()->GetRootScrollFrame()) {
     if (nsIContent* content = rootScrollFrame->GetContent()) {
       id = FindOrCreateIDFor(content);
     }