зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1847584 - Misc BrowserChild clean-ups. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D185642
This commit is contained in:
Родитель
8ca940e6ae
Коммит
e385adffde
|
@ -3557,7 +3557,7 @@ void BrowsingContext::DidSet(FieldIndex<IDX_IsUnderHiddenEmbedderElement>,
|
|||
}
|
||||
|
||||
bool embedderFrameIsHidden = true;
|
||||
if (auto embedderFrame = embedderElement->GetPrimaryFrame()) {
|
||||
if (auto* embedderFrame = embedderElement->GetPrimaryFrame()) {
|
||||
embedderFrameIsHidden = !embedderFrame->StyleVisibility()->IsVisible();
|
||||
}
|
||||
|
||||
|
|
|
@ -2434,7 +2434,7 @@ mozilla::ipc::IPCResult BrowserChild::RecvUpdateNativeWindowHandle(
|
|||
}
|
||||
|
||||
mozilla::ipc::IPCResult BrowserChild::RecvDestroy() {
|
||||
MOZ_ASSERT(mDestroyed == false);
|
||||
MOZ_ASSERT(!mDestroyed);
|
||||
mDestroyed = true;
|
||||
|
||||
nsTArray<PContentPermissionRequestChild*> childArray =
|
||||
|
@ -2444,7 +2444,7 @@ mozilla::ipc::IPCResult BrowserChild::RecvDestroy() {
|
|||
// Need to close undeleted ContentPermissionRequestChilds before tab is
|
||||
// closed.
|
||||
for (auto& permissionRequestChild : childArray) {
|
||||
auto child = static_cast<RemotePermissionRequest*>(permissionRequestChild);
|
||||
auto* child = static_cast<RemotePermissionRequest*>(permissionRequestChild);
|
||||
child->Destroy();
|
||||
}
|
||||
|
||||
|
@ -2715,7 +2715,7 @@ void BrowserChild::InitAPZState() {
|
|||
if (!mCompositorOptions->UseAPZ()) {
|
||||
return;
|
||||
}
|
||||
auto cbc = CompositorBridgeChild::Get();
|
||||
auto* cbc = CompositorBridgeChild::Get();
|
||||
|
||||
// Initialize the ApzcTreeManager. This takes multiple casts because of ugly
|
||||
// multiple inheritance.
|
||||
|
@ -2747,7 +2747,7 @@ IPCResult BrowserChild::RecvUpdateEffects(const EffectsInfo& aEffects) {
|
|||
bool needInvalidate = false;
|
||||
if (mEffectsInfo.IsVisible() && aEffects.IsVisible() &&
|
||||
mEffectsInfo != aEffects) {
|
||||
// if we are staying visible and either the visrect or scale changed we need
|
||||
// If we are staying visible and either the visrect or scale changed we need
|
||||
// to invalidate
|
||||
needInvalidate = true;
|
||||
}
|
||||
|
@ -2756,14 +2756,12 @@ IPCResult BrowserChild::RecvUpdateEffects(const EffectsInfo& aEffects) {
|
|||
UpdateVisibility();
|
||||
|
||||
if (needInvalidate) {
|
||||
nsCOMPtr<nsIDocShell> docShell = do_GetInterface(WebNavigation());
|
||||
if (docShell) {
|
||||
if (nsCOMPtr<nsIDocShell> docShell = do_GetInterface(WebNavigation())) {
|
||||
// We don't use BrowserChildBase::GetPresShell() here because that would
|
||||
// create a content viewer if one doesn't exist yet. Creating a content
|
||||
// viewer can cause JS to run, which we want to avoid.
|
||||
// nsIDocShell::GetPresShell returns null if no content viewer exists yet.
|
||||
RefPtr<PresShell> presShell = docShell->GetPresShell();
|
||||
if (presShell) {
|
||||
if (RefPtr<PresShell> presShell = docShell->GetPresShell()) {
|
||||
if (nsIFrame* root = presShell->GetRootFrame()) {
|
||||
root->InvalidateFrame();
|
||||
}
|
||||
|
|
|
@ -190,7 +190,7 @@ class BrowserChild final : public nsMessageManagerScriptExecutor,
|
|||
// Let managees query if it is safe to send messages.
|
||||
bool IsDestroyed() const { return mDestroyed; }
|
||||
|
||||
const TabId GetTabId() const {
|
||||
TabId GetTabId() const {
|
||||
MOZ_ASSERT(mUniqueId != 0);
|
||||
return mUniqueId;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче