Bug 1615609 - Rename nsRefreshDriver::IntersectionObservationAdded. r=hiro

The existing name is wrong since recently.

Differential Revision: https://phabricator.services.mozilla.com/D62922
This commit is contained in:
Emilio Cobos Álvarez
2020-02-15 07:23:51 +00:00
parent 59bb8eb6b6
commit 81f5747d96
3 changed files with 8 additions and 7 deletions

View File

@@ -162,7 +162,7 @@ void DOMIntersectionObserver::Observe(Element& aTarget) {
Connect();
if (mDocument) {
if (nsPresContext* pc = mDocument->GetPresContext()) {
pc->RefreshDriver()->IntersectionObservationAdded();
pc->RefreshDriver()->EnsureIntersectionObservationsUpdateHappens();
}
}
}

View File

@@ -1300,17 +1300,18 @@ mozilla::ipc::IPCResult BrowserChild::RecvSizeModeChanged(
}
mozilla::ipc::IPCResult BrowserChild::RecvChildToParentMatrix(
const mozilla::Maybe<mozilla::gfx::Matrix4x4>& aMatrix,
const mozilla::ScreenRect& aTopLevelViewportVisibleRectInBrowserCoords) {
const Maybe<gfx::Matrix4x4>& aMatrix,
const ScreenRect& aTopLevelViewportVisibleRectInBrowserCoords) {
mChildToParentConversionMatrix =
LayoutDeviceToLayoutDeviceMatrix4x4::FromUnknownMatrix(aMatrix);
mTopLevelViewportVisibleRectInBrowserCoords =
aTopLevelViewportVisibleRectInBrowserCoords;
// Triger an intersection observation since ancestor viewports changed.
// Trigger an intersection observation update since ancestor viewports
// changed.
if (RefPtr<Document> toplevelDoc = GetTopLevelDocument()) {
if (nsPresContext* presContext = toplevelDoc->GetPresContext()) {
presContext->RefreshDriver()->IntersectionObservationAdded();
if (nsPresContext* pc = toplevelDoc->GetPresContext()) {
pc->RefreshDriver()->EnsureIntersectionObservationsUpdateHappens();
}
}

View File

@@ -432,7 +432,7 @@ class nsRefreshDriver final : public mozilla::layers::TransactionIdAllocator,
EnsureTimerStarted();
}
void IntersectionObservationAdded() {
void EnsureIntersectionObservationsUpdateHappens() {
// This is enough to make sure that UpdateIntersectionObservations runs at
// least once. This is presumably the intent of step 5 in [1]:
//