mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-20 08:45:46 +00:00
Bug 1525561 - Rename nsPresContext::GetToplevelContentDocumentPresContext to GetInProcessRootContentDocumentPresContext. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D82812
This commit is contained in:
parent
869189c69f
commit
2e4ceac41e
@ -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;
|
||||
}
|
||||
|
@ -446,7 +446,7 @@ PresShell* APZCCallbackHelper::GetRootContentDocumentPresShellForContent(
|
||||
if (!context) {
|
||||
return nullptr;
|
||||
}
|
||||
context = context->GetToplevelContentDocumentPresContext();
|
||||
context = context->GetInProcessRootContentDocumentPresContext();
|
||||
if (!context) {
|
||||
return nullptr;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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();
|
||||
|
@ -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
|
||||
|
@ -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.
|
||||
|
@ -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)
|
||||
|
@ -3952,7 +3952,7 @@ nsRect ScrollFrameHelper::RestrictToRootDisplayPort(
|
||||
|
||||
nsPresContext* pc = mOuter->PresContext();
|
||||
const nsPresContext* rootPresContext =
|
||||
pc->GetToplevelContentDocumentPresContext();
|
||||
pc->GetInProcessRootContentDocumentPresContext();
|
||||
if (!rootPresContext) {
|
||||
rootPresContext = pc->GetRootPresContext();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user