Bug 811570 - Allow inactive scroll frames to become active when scrolled. r=roc
authorMatt Woodrow <mwoodrow@mozilla.com>
Mon, 19 Nov 2012 17:19:22 +1300
changeset 113659 3a057b8667fb479daf22abbd11ef7b636377ef45
parent 113658 7c34912e0cbc6d5868d4b2f1b6421e6287db90b2
child 113660 d224b191b8ca6d894675cb79fa7d25a724077ba2
push id18292
push usermwoodrow@mozilla.com
push dateMon, 19 Nov 2012 04:19:30 +0000
treeherdermozilla-inbound@3a057b8667fb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs811570
milestone19.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 811570 - Allow inactive scroll frames to become active when scrolled. r=roc
layout/generic/nsGfxScrollFrame.cpp
layout/reftests/scrolling/reftest.list
--- a/layout/generic/nsGfxScrollFrame.cpp
+++ b/layout/generic/nsGfxScrollFrame.cpp
@@ -1695,17 +1695,17 @@ bool nsGfxScrollFrameInner::IsAlwaysActi
   // which is the direct child of a chrome document, we default to not
   // being "active".
   if (!(mIsRoot && mOuter->PresContext()->IsRootContentDocument())) {
      return false;
   }
 
   // If we have scrolled before, then we should stay active.
   if (mHasBeenScrolled) {
-   return true;
+    return true;
   }
  
   // If we're overflow:hidden, then start as inactive until
   // we get scrolled manually.
   ScrollbarStyles styles = GetScrollbarStylesFromFrame();
   return (styles.mHorizontal != NS_STYLE_OVERFLOW_HIDDEN &&
           styles.mVertical != NS_STYLE_OVERFLOW_HIDDEN);
 }
@@ -1716,20 +1716,20 @@ void nsGfxScrollFrameInner::MarkInactive
     return;
 
   mScrollingActive = false;
   mOuter->InvalidateFrameSubtree();
 }
 
 void nsGfxScrollFrameInner::MarkActive()
 {
+  mScrollingActive = true;
   if (IsAlwaysActive())
     return;
 
-  mScrollingActive = true;
   if (mActivityExpirationState.IsTracked()) {
     gScrollFrameActivityTracker->MarkUsed(this);
   } else {
     if (!gScrollFrameActivityTracker) {
       gScrollFrameActivityTracker = new ScrollFrameActivityTracker();
     }
     gScrollFrameActivityTracker->AddObject(this);
   }
--- a/layout/reftests/scrolling/reftest.list
+++ b/layout/reftests/scrolling/reftest.list
@@ -8,13 +8,13 @@ random-if(Android) HTTP == image-1.html 
 random-if(Android&&!browserIsRemote) HTTP == opacity-mixed-scrolling-1.html opacity-mixed-scrolling-1.html?ref # bug 760269
 random-if(cocoaWidget) HTTP == opacity-mixed-scrolling-2.html opacity-mixed-scrolling-2.html?ref # see bug 625357
 random-if(bug685516) HTTP == simple-1.html simple-1.html?ref
 HTTP == subpixel-1.html#d subpixel-1-ref.html#d
 HTTP == text-1.html text-1.html?ref
 HTTP == text-2.html?up text-2.html?ref
 HTTP == transformed-1.html transformed-1.html?ref
 HTTP == transformed-1.html?up transformed-1.html?ref
-== uncovering-1.html uncovering-1-ref.html
-== uncovering-2.html uncovering-2-ref.html
+fuzzy-if(Android,5,20000) == uncovering-1.html uncovering-1-ref.html
+fuzzy-if(Android,5,20000) == uncovering-2.html uncovering-2-ref.html
 == less-than-scrollbar-height.html less-than-scrollbar-height-ref.html
 == huge-horizontal-overflow.html huge-horizontal-overflow-ref.html
 == huge-vertical-overflow.html huge-vertical-overflow-ref.html