Fix wheel events not working on scrollbars of inactive subframes. (bug 1216488, r=tn)

--HG--
extra : rebase_source : fd735909ba7e9ac8208e210e1061b71f9a559f2a
This commit is contained in:
David Anderson 2015-10-22 01:13:30 -07:00
Родитель 24ab66bc98
Коммит 49593ec27d
2 изменённых файлов: 5 добавлений и 2 удалений

Просмотреть файл

@ -624,6 +624,7 @@ nsDisplayListBuilder::nsDisplayListBuilder(nsIFrame* aReferenceFrame,
mCurrentScrollParentId(FrameMetrics::NULL_SCROLL_ID),
mCurrentScrollbarTarget(FrameMetrics::NULL_SCROLL_ID),
mCurrentScrollbarFlags(0),
mIsBuildingScrollbar(false),
mCurrentScrollbarWillHaveLayer(false),
mBuildCaret(aBuildCaret),
mIgnoreSuppression(false),

Просмотреть файл

@ -317,8 +317,7 @@ public:
* layerized.
*/
bool IsBuildingNonLayerizedScrollbar() const {
return mCurrentScrollbarTarget != FrameMetrics::NULL_SCROLL_ID &&
!mCurrentScrollbarWillHaveLayer;
return mIsBuildingScrollbar && !mCurrentScrollbarWillHaveLayer;
}
/**
* Calling this setter makes us include all out-of-flow descendant
@ -763,12 +762,14 @@ public:
AutoCurrentScrollbarInfoSetter(nsDisplayListBuilder* aBuilder, ViewID aScrollTargetID,
uint32_t aScrollbarFlags, bool aWillHaveLayer)
: mBuilder(aBuilder) {
aBuilder->mIsBuildingScrollbar = true;
aBuilder->mCurrentScrollbarTarget = aScrollTargetID;
aBuilder->mCurrentScrollbarFlags = aScrollbarFlags;
aBuilder->mCurrentScrollbarWillHaveLayer = aWillHaveLayer;
}
~AutoCurrentScrollbarInfoSetter() {
// No need to restore old values because scrollbars cannot be nested.
mBuilder->mIsBuildingScrollbar = false;
mBuilder->mCurrentScrollbarTarget = FrameMetrics::NULL_SCROLL_ID;
mBuilder->mCurrentScrollbarFlags = 0;
mBuilder->mCurrentScrollbarWillHaveLayer = false;
@ -1166,6 +1167,7 @@ private:
uint32_t mCurrentScrollbarFlags;
BlendModeSet mContainedBlendModes;
Preserves3DContext mPreserves3DCtx;
bool mIsBuildingScrollbar;
bool mCurrentScrollbarWillHaveLayer;
bool mBuildCaret;
bool mIgnoreSuppression;