зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1002992. Part 6. Rename ExpandRect to ExpandToNearlyVisibleRect. r=addressingreviewcomment
This commit is contained in:
Родитель
91256bfbc7
Коммит
2d4f5b7712
|
@ -5765,7 +5765,7 @@ PresShell::MarkImagesInSubtreeVisible(nsIFrame* aFrame, const nsRect& aRect)
|
|||
} else {
|
||||
rect = rect.Intersect(scrollFrame->GetScrollPortRect());
|
||||
}
|
||||
rect = scrollFrame->ExpandRect(rect);
|
||||
rect = scrollFrame->ExpandRectToNearlyVisible(rect);
|
||||
}
|
||||
|
||||
bool preserves3DChildren = aFrame->Preserves3DChildren();
|
||||
|
@ -5871,10 +5871,10 @@ PresShell::UpdateImageVisibility()
|
|||
|
||||
if (IgnoringViewportScrolling()) {
|
||||
builder.SetIgnoreScrollFrame(rootScroll);
|
||||
// The ExpandRect that the root scroll frame would do gets short circuited
|
||||
// due to us ignoring the root scroll frame, so we do it here.
|
||||
// The ExpandRectToNearlyVisible that the root scroll frame would do gets short
|
||||
// circuited due to us ignoring the root scroll frame, so we do it here.
|
||||
nsIScrollableFrame* rootScrollable = do_QueryFrame(rootScroll);
|
||||
updateRect = rootScrollable->ExpandRect(updateRect);
|
||||
updateRect = rootScrollable->ExpandRectToNearlyVisible(updateRect);
|
||||
}
|
||||
}
|
||||
builder.IgnorePaintSuppression();
|
||||
|
|
|
@ -2276,7 +2276,7 @@ ScrollFrameHelper::EnsureImageVisPrefsCached()
|
|||
}
|
||||
|
||||
nsRect
|
||||
ScrollFrameHelper::ExpandRect(const nsRect& aRect) const
|
||||
ScrollFrameHelper::ExpandRectToNearlyVisible(const nsRect& aRect) const
|
||||
{
|
||||
// We don't want to expand a rect in a direction that we can't scroll, so we
|
||||
// check the scroll range.
|
||||
|
@ -2527,7 +2527,7 @@ ScrollFrameHelper::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
// We use the dirty rect instead of the whole scroll port to prevent
|
||||
// too much expansion in the presence of very large (bigger than the
|
||||
// viewport) scroll ports.
|
||||
dirtyRect = ExpandRect(dirtyRect);
|
||||
dirtyRect = ExpandRectToNearlyVisible(dirtyRect);
|
||||
}
|
||||
|
||||
// Since making new layers is expensive, only use nsDisplayScrollLayer
|
||||
|
@ -2663,7 +2663,7 @@ ScrollFrameHelper::IsRectNearlyVisible(const nsRect& aRect) const
|
|||
// Use the right rect depending on if a display port is set.
|
||||
nsRect displayPort;
|
||||
bool usingDisplayport = nsLayoutUtils::GetDisplayPort(mOuter->GetContent(), &displayPort);
|
||||
return aRect.Intersects(ExpandRect(usingDisplayport ? displayPort : mScrollPort));
|
||||
return aRect.Intersects(ExpandRectToNearlyVisible(usingDisplayport ? displayPort : mScrollPort));
|
||||
}
|
||||
|
||||
static void HandleScrollPref(nsIScrollable *aScrollable, int32_t aOrientation,
|
||||
|
|
|
@ -279,7 +279,7 @@ public:
|
|||
void UpdateSticky();
|
||||
|
||||
bool IsRectNearlyVisible(const nsRect& aRect) const;
|
||||
nsRect ExpandRect(const nsRect& aRect) const;
|
||||
nsRect ExpandRectToNearlyVisible(const nsRect& aRect) const;
|
||||
|
||||
// adjust the scrollbar rectangle aRect to account for any visible resizer.
|
||||
// aHasResizer specifies if there is a content resizer, however this method
|
||||
|
@ -671,8 +671,8 @@ public:
|
|||
virtual bool IsRectNearlyVisible(const nsRect& aRect) MOZ_OVERRIDE {
|
||||
return mHelper.IsRectNearlyVisible(aRect);
|
||||
}
|
||||
virtual nsRect ExpandRect(const nsRect& aRect) const MOZ_OVERRIDE {
|
||||
return mHelper.ExpandRect(aRect);
|
||||
virtual nsRect ExpandRectToNearlyVisible(const nsRect& aRect) const MOZ_OVERRIDE {
|
||||
return mHelper.ExpandRectToNearlyVisible(aRect);
|
||||
}
|
||||
virtual nsIAtom* OriginOfLastScroll() MOZ_OVERRIDE {
|
||||
return mHelper.OriginOfLastScroll();
|
||||
|
@ -990,8 +990,8 @@ public:
|
|||
virtual bool IsRectNearlyVisible(const nsRect& aRect) MOZ_OVERRIDE {
|
||||
return mHelper.IsRectNearlyVisible(aRect);
|
||||
}
|
||||
virtual nsRect ExpandRect(const nsRect& aRect) const MOZ_OVERRIDE {
|
||||
return mHelper.ExpandRect(aRect);
|
||||
virtual nsRect ExpandRectToNearlyVisible(const nsRect& aRect) const MOZ_OVERRIDE {
|
||||
return mHelper.ExpandRectToNearlyVisible(aRect);
|
||||
}
|
||||
virtual nsIAtom* OriginOfLastScroll() MOZ_OVERRIDE {
|
||||
return mHelper.OriginOfLastScroll();
|
||||
|
|
|
@ -290,7 +290,7 @@ public:
|
|||
* Expand the given rect taking into account which directions we can scroll
|
||||
* and how far we want to expand for image visibility purposes.
|
||||
*/
|
||||
virtual nsRect ExpandRect(const nsRect& aRect) const = 0;
|
||||
virtual nsRect ExpandRectToNearlyVisible(const nsRect& aRect) const = 0;
|
||||
/**
|
||||
* Returns the origin passed in to the last ScrollToImpl call that took
|
||||
* effect.
|
||||
|
|
|
@ -420,10 +420,10 @@ nsSubDocumentFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
aBuilder->SetIgnoreScrollFrame(rootScrollFrame);
|
||||
|
||||
if (aBuilder->IsForImageVisibility()) {
|
||||
// The ExpandRect that the root scroll frame would do gets short circuited
|
||||
// due to us ignoring the root scroll frame, so we do it here.
|
||||
// The ExpandRectToNearlyVisible that the root scroll frame would do gets short
|
||||
// circuited due to us ignoring the root scroll frame, so we do it here.
|
||||
nsIScrollableFrame* rootScrollableFrame = do_QueryFrame(rootScrollFrame);
|
||||
dirty = rootScrollableFrame->ExpandRect(dirty);
|
||||
dirty = rootScrollableFrame->ExpandRectToNearlyVisible(dirty);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче