mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1018461 - Allow active scrolling inside SVG. Should give a big tscrollx win. r=roc
This commit is contained in:
parent
5ba2295fc8
commit
4afbfc077b
@ -1798,22 +1798,9 @@ static void AdjustViews(nsIFrame* aFrame)
|
||||
}
|
||||
|
||||
static bool
|
||||
CanScrollWithBlitting(nsIFrame* aFrame)
|
||||
NeedToInvalidateOnScroll(nsIFrame* aFrame)
|
||||
{
|
||||
if (aFrame->GetStateBits() & NS_SCROLLFRAME_INVALIDATE_CONTENTS_ON_SCROLL)
|
||||
return false;
|
||||
|
||||
for (nsIFrame* f = aFrame; f;
|
||||
f = nsLayoutUtils::GetCrossDocParentFrame(f)) {
|
||||
if (nsSVGIntegrationUtils::UsingEffectsForFrame(f) ||
|
||||
f->IsFrameOfType(nsIFrame::eSVG) ||
|
||||
f->GetStateBits() & NS_FRAME_NO_COMPONENT_ALPHA) {
|
||||
return false;
|
||||
}
|
||||
if (nsLayoutUtils::IsPopup(f))
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
return (aFrame->GetStateBits() & NS_SCROLLFRAME_INVALIDATE_CONTENTS_ON_SCROLL) != 0;
|
||||
}
|
||||
|
||||
bool ScrollFrameHelper::IsIgnoringViewportClipping() const
|
||||
@ -1900,14 +1887,12 @@ void ScrollFrameHelper::ScrollVisual(nsPoint aOldScrolledFramePos)
|
||||
AdjustViews(mScrolledFrame);
|
||||
// We need to call this after fixing up the view positions
|
||||
// to be consistent with the frame hierarchy.
|
||||
bool canScrollWithBlitting = CanScrollWithBlitting(mOuter);
|
||||
bool needToInvalidateOnScroll = NeedToInvalidateOnScroll(mOuter);
|
||||
mOuter->RemoveStateBits(NS_SCROLLFRAME_INVALIDATE_CONTENTS_ON_SCROLL);
|
||||
if (IsScrollingActive()) {
|
||||
if (!canScrollWithBlitting) {
|
||||
MarkInactive();
|
||||
}
|
||||
if (IsScrollingActive() && needToInvalidateOnScroll) {
|
||||
MarkInactive();
|
||||
}
|
||||
if (canScrollWithBlitting) {
|
||||
if (!needToInvalidateOnScroll) {
|
||||
MarkActive();
|
||||
}
|
||||
|
||||
@ -2422,7 +2407,7 @@ ScrollFrameHelper::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||
|
||||
if (aBuilder->IsPaintingToWindow()) {
|
||||
mScrollPosAtLastPaint = GetScrollPosition();
|
||||
if (IsScrollingActive() && !CanScrollWithBlitting(mOuter)) {
|
||||
if (IsScrollingActive() && NeedToInvalidateOnScroll(mOuter)) {
|
||||
MarkInactive();
|
||||
}
|
||||
if (IsScrollingActive()) {
|
||||
|
Loading…
Reference in New Issue
Block a user