Bug 886646 - Part 2: Include sticky positioning in nsStyleDisplay::IsRelativelyPositionedStyle. r=heycam
authorCorey Ford <cford@mozilla.com>
Fri, 06 Sep 2013 09:35:15 -0400
changeset 145940 d65d4436d3a6de25b5897056d3f2c465ae5b85bb
parent 145939 cc50ede322393576f832a0992b34e46c234432ab
child 145941 90d700eaeac0043b42daeedf6f35bb4f120a0f81
push id25229
push userryanvm@gmail.com
push dateFri, 06 Sep 2013 20:49:59 +0000
treeherdermozilla-central@bdbdeda69f05 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersheycam
bugs886646
milestone26.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 886646 - Part 2: Include sticky positioning in nsStyleDisplay::IsRelativelyPositionedStyle. r=heycam
layout/style/nsStyleStruct.h
--- a/layout/style/nsStyleStruct.h
+++ b/layout/style/nsStyleStruct.h
@@ -1783,17 +1783,18 @@ struct nsStyleDisplay {
   }
 
   bool IsAbsolutelyPositionedStyle() const {
     return NS_STYLE_POSITION_ABSOLUTE == mPosition ||
            NS_STYLE_POSITION_FIXED == mPosition;
   }
 
   bool IsRelativelyPositionedStyle() const {
-    return mPosition == NS_STYLE_POSITION_RELATIVE;
+    return NS_STYLE_POSITION_RELATIVE == mPosition ||
+           NS_STYLE_POSITION_STICKY == mPosition;
   }
 
   bool IsScrollableOverflow() const {
     // mOverflowX and mOverflowY always match when one of them is
     // NS_STYLE_OVERFLOW_VISIBLE or NS_STYLE_OVERFLOW_CLIP.
     return mOverflowX != NS_STYLE_OVERFLOW_VISIBLE &&
            mOverflowX != NS_STYLE_OVERFLOW_CLIP;
   }