Bug 1729604. Remove unused aClipRect argument to nsLayoutUtils::ComputeScrollMetadata. r=hiro

Depends on D124871

Differential Revision: https://phabricator.services.mozilla.com/D124872
This commit is contained in:
Timothy Nikkel 2021-09-08 04:20:56 +00:00
Родитель 138d77c546
Коммит 409d2513b2
4 изменённых файлов: 5 добавлений и 15 удалений

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

@ -8542,8 +8542,7 @@ ScrollMetadata nsLayoutUtils::ComputeScrollMetadata(
const nsIFrame* aForFrame, const nsIFrame* aScrollFrame,
nsIContent* aContent, const nsIFrame* aReferenceFrame,
WebRenderLayerManager* aLayerManager, ViewID aScrollParentId,
const nsSize& aScrollPortSize, const Maybe<nsRect>& aClipRect,
bool aIsRootContent) {
const nsSize& aScrollPortSize, bool aIsRootContent) {
const nsPresContext* presContext = aForFrame->PresContext();
int32_t auPerDevPixel = presContext->AppUnitsPerDevPixel();
@ -8813,13 +8812,6 @@ ScrollMetadata nsLayoutUtils::ComputeScrollMetadata(
LayoutDeviceRect::FromAppUnits(compositionBounds, auPerDevPixel) *
metrics.GetCumulativeResolution() * layerToParentLayerScale;
if (aClipRect) {
ParentLayerRect rect =
LayoutDeviceRect::FromAppUnits(*aClipRect, auPerDevPixel) *
metrics.GetCumulativeResolution() * layerToParentLayerScale;
metadata.SetScrollClip(Some(LayerClip(RoundedToInt(rect))));
}
// For the root scroll frame of the root content document (RCD-RSF), the above
// calculation will yield the size of the viewport frame as the composition
// bounds, which doesn't actually correspond to what is visible when
@ -8964,7 +8956,7 @@ Maybe<ScrollMetadata> nsLayoutUtils::GetRootMetadata(
return Some(nsLayoutUtils::ComputeScrollMetadata(
frame, rootScrollFrame, content, aBuilder->FindReferenceFrameFor(frame),
aLayerManager, ScrollableLayerGuid::NULL_SCROLL_ID, scrollPortSize,
Nothing(), isRootContent));
isRootContent));
}
return Nothing();

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

@ -2762,8 +2762,7 @@ class nsLayoutUtils {
const nsIFrame* aForFrame, const nsIFrame* aScrollFrame,
nsIContent* aContent, const nsIFrame* aReferenceFrame,
mozilla::layers::WebRenderLayerManager* aLayerManager,
ViewID aScrollParentId, const nsSize& aScrollPortSize,
const mozilla::Maybe<nsRect>& aClipRect, bool aIsRoot);
ViewID aScrollParentId, const nsSize& aScrollPortSize, bool aIsRoot);
/**
* Returns the metadata to put onto the root layer of a layer tree, if one is

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

@ -4501,8 +4501,7 @@ Maybe<ScrollMetadata> ScrollFrameHelper::ComputeScrollMetadata(
return Some(nsLayoutUtils::ComputeScrollMetadata(
mScrolledFrame, mOuter, mOuter->GetContent(), aContainerReferenceFrame,
aLayerManager, mScrollParentID, mScrollPort.Size(), Nothing(),
isRootContent));
aLayerManager, mScrollParentID, mScrollPort.Size(), isRootContent));
}
bool ScrollFrameHelper::IsRectNearlyVisible(const nsRect& aRect) const {

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

@ -6151,7 +6151,7 @@ UniquePtr<ScrollMetadata> nsDisplayScrollInfoLayer::ComputeScrollMetadata(
ScrollMetadata metadata = nsLayoutUtils::ComputeScrollMetadata(
mScrolledFrame, mScrollFrame, mScrollFrame->GetContent(),
ReferenceFrame(), aLayerManager, mScrollParentId, mScrollFrame->GetSize(),
Nothing(), false);
false);
metadata.GetMetrics().SetIsScrollInfoLayer(true);
nsIScrollableFrame* scrollableFrame = mScrollFrame->GetScrollTargetFrame();
if (scrollableFrame) {