зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1577859 - Additional post container scrolling removal cleanup in Layout code. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D45596 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
9ca5e64e7d
Коммит
88ed171110
|
@ -5164,21 +5164,6 @@ bool PresShell::AsyncPanZoomEnabled() {
|
|||
return gfxPlatform::AsyncPanZoomEnabled();
|
||||
}
|
||||
|
||||
void PresShell::SetIgnoreViewportScrolling(bool aIgnore) {
|
||||
if (IgnoringViewportScrolling() == aIgnore) {
|
||||
return;
|
||||
}
|
||||
RenderingState state(this);
|
||||
if (aIgnore) {
|
||||
state.mRenderingStateFlags |=
|
||||
RenderingStateFlags::IgnoringViewportScrolling;
|
||||
} else {
|
||||
state.mRenderingStateFlags &=
|
||||
~RenderingStateFlags::IgnoringViewportScrolling;
|
||||
}
|
||||
SetRenderingState(state);
|
||||
}
|
||||
|
||||
nsresult PresShell::SetResolutionAndScaleTo(float aResolution,
|
||||
ResolutionChangeOrigin aOrigin) {
|
||||
if (!(aResolution > 0.0)) {
|
||||
|
|
|
@ -966,7 +966,6 @@ class PresShell final : public nsStubDocumentObserver,
|
|||
* of painting. If we are ignoring, then layers aren't clipped to
|
||||
* the CSS viewport and scrollbars aren't drawn.
|
||||
*/
|
||||
void SetIgnoreViewportScrolling(bool aIgnore);
|
||||
bool IgnoringViewportScrolling() const {
|
||||
return !!(mRenderingStateFlags &
|
||||
RenderingStateFlags::IgnoringViewportScrolling);
|
||||
|
|
|
@ -2103,7 +2103,6 @@ ScrollFrameHelper::ScrollFrameHelper(nsContainerFrame* aOuter, bool aIsRoot)
|
|||
mCollapsedResizer(false),
|
||||
mWillBuildScrollableLayer(false),
|
||||
mIsScrollParent(false),
|
||||
mIsScrollableLayerInRootContainer(false),
|
||||
mAddClipRectToLayer(false),
|
||||
mHasBeenScrolled(false),
|
||||
mIgnoreMomentumScroll(false),
|
||||
|
@ -3435,9 +3434,6 @@ void ScrollFrameHelper::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
nsIScrollableFrame* sf = do_QueryFrame(mOuter);
|
||||
MOZ_ASSERT(sf);
|
||||
|
||||
// Are we the root content document's root scroll frame?
|
||||
bool isRcdRsf = mIsRoot && mOuter->PresContext()->IsRootContentDocument();
|
||||
|
||||
if (ignoringThisScrollFrame) {
|
||||
// Root scrollframes have FrameMetrics and clipping on their container
|
||||
// layers, so don't apply clipping again.
|
||||
|
@ -3629,11 +3625,6 @@ void ScrollFrameHelper::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
asrSetter.EnterScrollFrame(sf);
|
||||
}
|
||||
|
||||
if (mIsScrollableLayerInRootContainer && isRcdRsf) {
|
||||
aBuilder->SetActiveScrolledRootForRootScrollframe(
|
||||
aBuilder->CurrentActiveScrolledRoot());
|
||||
}
|
||||
|
||||
if (mWillBuildScrollableLayer && aBuilder->BuildCompositorHitTestInfo()) {
|
||||
// Create a hit test info item for the scrolled content that's not
|
||||
// clipped to the displayport. This ensures that within the bounds
|
||||
|
@ -4027,7 +4018,7 @@ Maybe<ScrollMetadata> ScrollFrameHelper::ComputeScrollMetadata(
|
|||
LayerManager* aLayerManager, const nsIFrame* aContainerReferenceFrame,
|
||||
const Maybe<ContainerLayerParameters>& aParameters,
|
||||
const DisplayItemClip* aClip) const {
|
||||
if (!mWillBuildScrollableLayer || mIsScrollableLayerInRootContainer) {
|
||||
if (!mWillBuildScrollableLayer) {
|
||||
return Nothing();
|
||||
}
|
||||
|
||||
|
|
|
@ -660,12 +660,6 @@ class ScrollFrameHelper : public nsIReflowCallback {
|
|||
// descendant scrollframes also have their displayports removed.
|
||||
bool mIsScrollParent : 1;
|
||||
|
||||
// Whether we are the root scroll frame that is used for containerful
|
||||
// scrolling with a display port. If true, the scrollable frame
|
||||
// shouldn't attach frame metrics to its layers because the container
|
||||
// will already have the necessary frame metrics.
|
||||
bool mIsScrollableLayerInRootContainer : 1;
|
||||
|
||||
// If true, add clipping in ScrollFrameHelper::ClipLayerToDisplayPort.
|
||||
bool mAddClipRectToLayer : 1;
|
||||
|
||||
|
|
|
@ -1230,7 +1230,6 @@ nsDisplayListBuilder::nsDisplayListBuilder(nsIFrame* aReferenceFrame,
|
|||
mCaretFrame(nullptr),
|
||||
mScrollInfoItemsForHoisting(nullptr),
|
||||
mFirstClipChainToDestroy(nullptr),
|
||||
mActiveScrolledRootForRootScrollframe(nullptr),
|
||||
mMode(aMode),
|
||||
mTableBackgroundSet(nullptr),
|
||||
mCurrentScrollParentId(ScrollableLayerGuid::NULL_SCROLL_ID),
|
||||
|
|
|
@ -1117,17 +1117,6 @@ class nsDisplayListBuilder {
|
|||
const DisplayItemClipChain* FuseClipChainUpTo(
|
||||
const DisplayItemClipChain* aClipChain, const ActiveScrolledRoot* aASR);
|
||||
|
||||
/**
|
||||
* Only used for containerful root scrolling. This is a workaround.
|
||||
*/
|
||||
void SetActiveScrolledRootForRootScrollframe(const ActiveScrolledRoot* aASR) {
|
||||
mActiveScrolledRootForRootScrollframe = aASR;
|
||||
}
|
||||
|
||||
const ActiveScrolledRoot* ActiveScrolledRootForRootScrollframe() const {
|
||||
return mActiveScrolledRootForRootScrollframe;
|
||||
}
|
||||
|
||||
const ActiveScrolledRoot* GetFilterASR() const { return mFilterASR; }
|
||||
|
||||
/**
|
||||
|
@ -1982,7 +1971,6 @@ class nsDisplayListBuilder {
|
|||
mClipDeduplicator;
|
||||
DisplayItemClipChain* mFirstClipChainToDestroy;
|
||||
nsTArray<nsDisplayItem*> mTemporaryItems;
|
||||
const ActiveScrolledRoot* mActiveScrolledRootForRootScrollframe;
|
||||
nsDisplayListBuilderMode mMode;
|
||||
nsDisplayTableBackgroundSet* mTableBackgroundSet;
|
||||
ViewID mCurrentScrollParentId;
|
||||
|
|
Загрузка…
Ссылка в новой задаче