gecko-dev/dom/ipc/PBrowserBridge.ipdl
Emilio Cobos Álvarez fa6f012317 Bug 1582042 - Remove useless threading of aForceRepaint around various IPC messages. r=mconley
aForceRepaint wasn't doing what it claimed to do at all, as we've recently
learned. In current mozilla-central:

 * All those arguments ended up in a RecvRenderLayers with aForceRepaint = true
   (so far so good, that's expected).

 * But it was ignored (so that aForceRepaint is always true to calls to
   MakeVisible) from UpdateVisibility:

https://searchfox.org/mozilla-central/rev/f43ae7e1c43a4a940b658381157a6ea6c5a185c1/dom/ipc/BrowserChild.cpp#2523

 * Plus that argument only does anything useful on current central if we get to
   the end of MakeVisible(true). And MakeVisible() early returns if already
   visible.

So all in all this seems somewhat useless, and nobody has complained about such
a thing in a long time.

It seemed to do what it promised when it was introduced in
https://hg.mozilla.org/mozilla-central/rev/27f6f789b194, but it seems the
refactoring in https://hg.mozilla.org/mozilla-central/rev/4df5fa6fa785 broke it.

I think the new setup is somewhat easier to reason about, and nobody seems to be
missing that.

I'll try to remove the forceRepaint() call itself on a follow-up.

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

--HG--
extra : moz-landing-system : lando
2019-09-26 22:11:17 +00:00

117 lines
3.8 KiB
C++

/* -*- Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 8 -*- */
/* vim: set sw=4 ts=8 et tw=80 ft=cpp : */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
include protocol PBrowser;
include protocol PDocAccessible;
include DOMTypes;
using ScreenIntSize from "Units.h";
using nsSizeMode from "nsIWidgetListener.h";
using mozilla::layers::LayersObserverEpoch from "mozilla/layers/LayersTypes.h";
using mozilla::layers::LayersId from "mozilla/layers/LayersTypes.h";
using mozilla::WidgetMouseEvent from "ipc/nsGUIEventIPC.h";
using mozilla::a11y::IDispatchHolder from "mozilla/a11y/IPCTypes.h";
using mozilla::dom::EffectsInfo from "mozilla/dom/TabMessageUtils.h";
using mozilla::ScrollAxis from "mozilla/PresShellForwards.h";
using mozilla::ScrollFlags from "mozilla/PresShellForwards.h";
using struct nsRect from "nsRect.h";
namespace mozilla {
namespace dom {
/**
* A PBrowserBridge connects an iframe/browser in a content process to the
* PBrowser that manages the embedded content.
*
* See `dom/docs/Fission-IPC-Diagram.svg` for an overview of the DOM IPC
* actors.
*/
async refcounted protocol PBrowserBridge {
manager PBrowser;
child:
async SetLayersId(LayersId layersId);
/**
* Request that the IPC child / Web parent process move focus to the
* browser's frame. If canRaise is true, the window can be raised if
* it is inactive.
*/
async RequestFocus(bool canRaise);
/**
* When IPC parent / Web child sends this message, the IPC child / Web parent
* should move focus to the next or previous focusable element or document.
*/
async MoveFocus(bool forward, bool forDocumentNavigation);
/**
* Send the child the COM proxy for the embedded document accessible.
*/
async SetEmbeddedDocAccessibleCOMProxy(IDispatchHolder aCOMProxy);
/**
* Called once this PBrowserBridge's OOP subdoc no longer blocks its
* embedding element's and embedding doc's 'load' events.
*/
async MaybeFireEmbedderLoadEvents(bool aIsTrusted,
bool aFireLoadAtEmbeddingElement);
async ScrollRectIntoView(nsRect aRect, ScrollAxis aVertical,
ScrollAxis aHorizontal, ScrollFlags aScrollFlags,
int32_t aAppUnitsPerDevPixel);
async SubFrameCrashed(BrowsingContext aContext);
parent:
// Destroy the remote web browser due to the nsFrameLoader going away.
async __delete__();
// DocShell messaging.
async LoadURL(nsCString aSpec);
async ResumeLoad(uint64_t aPendingSwitchID);
// Out of process rendering.
async Show(ScreenIntSize size, bool parentIsActive, nsSizeMode sizeMode);
async UpdateDimensions(DimensionInfo dimensions) compressall;
async RenderLayers(bool aEnabled, LayersObserverEpoch aEpoch);
async UpdateEffects(EffectsInfo aEffects);
/**
* Navigate by key (Tab/Shift+Tab/F6/Shift+f6).
*/
async NavigateByKey(bool aForward, bool aForDocumentNavigation);
/**
* Dispatch the given synthesized mousemove event to the child.
*/
async DispatchSynthesizedMouseEvent(WidgetMouseEvent event);
/**
* Sending an activate message moves focus to the iframe.
*/
async Activate();
async Deactivate(bool aWindowLowering);
async SetIsUnderHiddenEmbedderElement(bool aIsUnderHiddenEmbedderElement);
async SkipBrowsingContextDetach();
/**
* Tell the parent the accessible for this iframe's embedder
* OuterDocAccessible.
* aDoc is the actor for the containing document.
* aID is the unique id of the embedder accessible within that document.
*/
async SetEmbedderAccessible(PDocAccessible aDoc, uint64_t aID);
};
} // namespace dom
} // namespace mozilla