Bug 1520363 - Rename nsIScrollableFrame::GetAnchor() to Anchor(). r=dholbert

Differential Revision: https://phabricator.services.mozilla.com/D19872

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Ryan Hunt 2019-02-15 01:25:55 +00:00
Родитель 1063b8aee3
Коммит fc7e92ad83
6 изменённых файлов: 15 добавлений и 18 удалений

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

@ -2553,7 +2553,7 @@ void nsIPresShell::FlushPendingScrollAnchorSelections() {
for (auto iter = mPendingScrollAnchorSelection.Iter(); !iter.Done();
iter.Next()) {
nsIScrollableFrame* scroll = iter.Get()->GetKey();
scroll->GetAnchor()->SelectAnchor();
scroll->Anchor()->SelectAnchor();
}
mPendingScrollAnchorSelection.Clear();
}
@ -2567,7 +2567,7 @@ void nsIPresShell::FlushPendingScrollAnchorAdjustments() {
for (auto iter = mPendingScrollAnchorAdjustment.Iter(); !iter.Done();
iter.Next()) {
nsIScrollableFrame* scroll = iter.Get()->GetKey();
scroll->GetAnchor()->ApplyAdjustments();
scroll->Anchor()->ApplyAdjustments();
}
mPendingScrollAnchorAdjustment.Clear();
}
@ -10499,7 +10499,7 @@ void nsIPresShell::SetVisualViewportSize(nscoord aWidth, nscoord aHeight) {
if (nsIScrollableFrame* rootScrollFrame =
GetRootScrollFrameAsScrollable()) {
ScrollAnchorContainer* container = rootScrollFrame->GetAnchor();
ScrollAnchorContainer* container = rootScrollFrame->Anchor();
container->UserScrolled();
}
}
@ -10520,7 +10520,7 @@ bool nsIPresShell::SetVisualViewportOffset(
if (nsIScrollableFrame* rootScrollFrame =
GetRootScrollFrameAsScrollable()) {
ScrollAnchorContainer* container = rootScrollFrame->GetAnchor();
ScrollAnchorContainer* container = rootScrollFrame->Anchor();
container->UserScrolled();
}
}

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

@ -38,7 +38,7 @@ ScrollAnchorContainer* ScrollAnchorContainer::FindFor(nsIFrame* aFrame) {
aFrame, nsLayoutUtils::SCROLLABLE_SAME_DOC |
nsLayoutUtils::SCROLLABLE_INCLUDE_HIDDEN);
if (nearest) {
return nearest->GetAnchor();
return nearest->Anchor();
}
return nullptr;
}

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

@ -1099,7 +1099,7 @@ void nsIFrame::MarkNeedsDisplayItemRebuild() {
container->InvalidateAnchor();
}
if (nsIScrollableFrame* scrollableFrame = do_QueryFrame(this)) {
scrollableFrame->GetAnchor()->InvalidateAnchor();
scrollableFrame->Anchor()->InvalidateAnchor();
}
}

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

@ -1165,7 +1165,7 @@ void nsHTMLScrollFrame::Reflow(nsPresContext* aPresContext,
void nsHTMLScrollFrame::DidReflow(nsPresContext* aPresContext,
const ReflowInput* aReflowInput) {
nsContainerFrame::DidReflow(aPresContext, aReflowInput);
PresShell()->PostPendingScrollAnchorAdjustment(GetAnchor());
PresShell()->PostPendingScrollAnchorAdjustment(Anchor());
}
////////////////////////////////////////////////////////////////////////////////

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

@ -1178,13 +1178,11 @@ class nsHTMLScrollFrame : public nsContainerFrame,
return mHelper.IsRootScrollFrameOfDocument();
}
virtual const ScrollAnchorContainer* GetAnchor() const override {
virtual const ScrollAnchorContainer* Anchor() const override {
return &mHelper.mAnchor;
}
virtual ScrollAnchorContainer* GetAnchor() override {
return &mHelper.mAnchor;
}
virtual ScrollAnchorContainer* Anchor() override { return &mHelper.mAnchor; }
// Return the scrolled frame.
void AppendDirectlyOwnedAnonBoxes(nsTArray<OwnedAnonBox>& aResult) override {
@ -1658,13 +1656,11 @@ class nsXULScrollFrame final : public nsBoxFrame,
return mHelper.IsRootScrollFrameOfDocument();
}
virtual const ScrollAnchorContainer* GetAnchor() const override {
virtual const ScrollAnchorContainer* Anchor() const override {
return &mHelper.mAnchor;
}
virtual ScrollAnchorContainer* GetAnchor() override {
return &mHelper.mAnchor;
}
virtual ScrollAnchorContainer* Anchor() override { return &mHelper.mAnchor; }
// Return the scrolled frame.
void AppendDirectlyOwnedAnonBoxes(nsTArray<OwnedAnonBox>& aResult) override {

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

@ -568,10 +568,11 @@ class nsIScrollableFrame : public nsIScrollbarMediator {
virtual bool IsRootScrollFrameOfDocument() const = 0;
/**
* Returns the scroll anchor associated with this scrollable frame.
* Returns the scroll anchor associated with this scrollable frame. This is
* never null.
*/
virtual const ScrollAnchorContainer* GetAnchor() const = 0;
virtual ScrollAnchorContainer* GetAnchor() = 0;
virtual const ScrollAnchorContainer* Anchor() const = 0;
virtual ScrollAnchorContainer* Anchor() = 0;
};
#endif