Bug 1525561 - Rename nsPresContext::GetToplevelContentDocumentPresContext to GetInProcessRootContentDocumentPresContext. r=heycam

Differential Revision: https://phabricator.services.mozilla.com/D82812
This commit is contained in:
Hiroyuki Ikezoe 2020-07-09 01:58:59 +00:00
parent 869189c69f
commit 2e4ceac41e
8 changed files with 15 additions and 15 deletions

View File

@ -3804,7 +3804,7 @@ static bool ShouldBlockCustomCursor(nsPresContext* aPresContext,
// TODO(emilio, bug 1525561): In a fission world, we should have a better way
// to find the event coordinates relative to the content area.
nsPresContext* topLevel =
aPresContext->GetToplevelContentDocumentPresContext();
aPresContext->GetInProcessRootContentDocumentPresContext();
if (!topLevel) {
return false;
}

View File

@ -446,7 +446,7 @@ PresShell* APZCCallbackHelper::GetRootContentDocumentPresShellForContent(
if (!context) {
return nullptr;
}
context = context->GetToplevelContentDocumentPresContext();
context = context->GetInProcessRootContentDocumentPresContext();
if (!context) {
return nullptr;
}

View File

@ -6075,7 +6075,7 @@ bool PresShell::AssumeAllFramesVisible() {
if (!mHaveShutDown && !mIsDestroying &&
!mPresContext->IsRootContentDocumentInProcess()) {
nsPresContext* presContext =
mPresContext->GetToplevelContentDocumentPresContext();
mPresContext->GetInProcessRootContentDocumentPresContext();
if (presContext && presContext->PresShell()->AssumeAllFramesVisible()) {
return true;
}
@ -6109,11 +6109,11 @@ void PresShell::ScheduleApproximateFrameVisibilityUpdateNow() {
if (!mPresContext->IsRootContentDocument()) {
nsPresContext* presContext =
mPresContext->GetToplevelContentDocumentPresContext();
mPresContext->GetInProcessRootContentDocumentPresContext();
if (!presContext) return;
MOZ_ASSERT(presContext->IsRootContentDocument(),
"Didn't get a root prescontext from "
"GetToplevelContentDocumentPresContext?");
"GetInProcessRootContentDocumentPresContext?");
presContext->PresShell()->ScheduleApproximateFrameVisibilityUpdateNow();
return;
}

View File

@ -8770,7 +8770,7 @@ CSSSize nsLayoutUtils::CalculateRootCompositionSize(
nsPresContext* presContext = aFrame->PresContext();
ScreenSize rootCompositionSize;
nsPresContext* rootPresContext =
presContext->GetToplevelContentDocumentPresContext();
presContext->GetInProcessRootContentDocumentPresContext();
if (!rootPresContext) {
rootPresContext = presContext->GetRootPresContext();
}
@ -10343,7 +10343,7 @@ ComputedStyle* nsLayoutUtils::StyleForScrollbar(nsIFrame* aScrollbarPart) {
static Maybe<ScreenRect> GetFrameVisibleRectOnScreen(const nsIFrame* aFrame) {
// We actually want the in-process top prescontext here.
nsPresContext* topContextInProcess =
aFrame->PresContext()->GetToplevelContentDocumentPresContext();
aFrame->PresContext()->GetInProcessRootContentDocumentPresContext();
if (!topContextInProcess) {
// We are in chrome process.
return Nothing();
@ -10403,7 +10403,7 @@ bool nsLayoutUtils::FrameIsMostlyScrolledOutOfViewInCrossProcess(
}
nsPresContext* topContextInProcess =
aFrame->PresContext()->GetToplevelContentDocumentPresContext();
aFrame->PresContext()->GetInProcessRootContentDocumentPresContext();
MOZ_ASSERT(topContextInProcess);
nsIDocShell* docShell = topContextInProcess->GetDocShell();

View File

@ -863,7 +863,7 @@ nsPresContext* nsPresContext::GetParentPresContext() const {
return nullptr;
}
nsPresContext* nsPresContext::GetToplevelContentDocumentPresContext() {
nsPresContext* nsPresContext::GetInProcessRootContentDocumentPresContext() {
if (IsChrome()) return nullptr;
nsPresContext* pc = this;
for (;;) {
@ -1270,7 +1270,7 @@ void nsPresContext::RecordInteractionTime(InteractionType aType,
// Record the interaction time if it occurs after the first paint
// of the top level content document.
nsPresContext* topContentPresContext =
GetToplevelContentDocumentPresContext();
GetInProcessRootContentDocumentPresContext();
if (!topContentPresContext) {
// There is no top content pres context so we don't care

View File

@ -184,10 +184,10 @@ class nsPresContext : public nsISupports,
nsPresContext* GetParentPresContext() const;
/**
* Returns the prescontext of the toplevel content document that contains
* this presentation, or null if there isn't one.
* Returns the prescontext of the root content document in the same process
* that contains this presentation, or null if there isn't one.
*/
nsPresContext* GetToplevelContentDocumentPresContext();
nsPresContext* GetInProcessRootContentDocumentPresContext();
/**
* Returns the nearest widget for the root frame or view of this.

View File

@ -570,7 +570,7 @@ void nsComboboxControlFrame::GetAvailableDropdownSpace(
}
nscoord minBCoord;
nsPresContext* pc = PresContext()->GetToplevelContentDocumentPresContext();
nsPresContext* pc = PresContext()->GetInProcessRootContentDocumentPresContext();
nsIFrame* root = pc ? pc->PresShell()->GetRootFrame() : nullptr;
if (root) {
minBCoord = LogicalRect(aWM, root->GetScreenRectInAppUnits(), containerSize)

View File

@ -3952,7 +3952,7 @@ nsRect ScrollFrameHelper::RestrictToRootDisplayPort(
nsPresContext* pc = mOuter->PresContext();
const nsPresContext* rootPresContext =
pc->GetToplevelContentDocumentPresContext();
pc->GetInProcessRootContentDocumentPresContext();
if (!rootPresContext) {
rootPresContext = pc->GetRootPresContext();
}