Bug 890897 - Don't show overlay scrollbars when we don't end up scrolling the page because we're already at an acceptable place. r=roc

This commit is contained in:
Stephen Pohl 2013-07-16 00:51:21 -04:00
parent 90e5017497
commit bcad140bc2

View File

@ -2934,10 +2934,6 @@ void nsGfxScrollFrameInner::CurPosAttributeChanged(nsIContent* aContent)
(mVScrollbarBox && mVScrollbarBox->GetContent() == aContent), (mVScrollbarBox && mVScrollbarBox->GetContent() == aContent),
"unexpected child"); "unexpected child");
if (mScrollbarActivity) {
mScrollbarActivity->ActivityOccurred();
}
// Attribute changes on the scrollbars happen in one of three ways: // Attribute changes on the scrollbars happen in one of three ways:
// 1) The scrollbar changed the attribute in response to some user event // 1) The scrollbar changed the attribute in response to some user event
// 2) We changed the attribute in response to a ScrollPositionDidChange // 2) We changed the attribute in response to a ScrollPositionDidChange
@ -2970,6 +2966,10 @@ void nsGfxScrollFrameInner::CurPosAttributeChanged(nsIContent* aContent)
return; return;
} }
if (mScrollbarActivity) {
mScrollbarActivity->ActivityOccurred();
}
bool isSmooth = aContent->HasAttr(kNameSpaceID_None, nsGkAtoms::smooth); bool isSmooth = aContent->HasAttr(kNameSpaceID_None, nsGkAtoms::smooth);
if (isSmooth) { if (isSmooth) {
// Make sure an attribute-setting callback occurs even if the view // Make sure an attribute-setting callback occurs even if the view