import changes from `dev' branch of rmottola/Arctic-Fox:

- Bug 1248105 - Move CSSPseudoElement::GetParentObject out of header, r=boris (b851c3806d)
- Bug 1248581 - Fix build bustage on WakeLock.h and CSSPseudoElement.h. r=khuey (fb47a96889)
- Bug 1249230 - Prepend an extra colon to the pseudo type string. r=birtles (6af63f00de)
- fix build on Mac > 10.5 (1ae9402eaf)
- Bug 1241118 - Add gc = GetGeneralCategory(ch) when sc == MOZ_SCRIPT_COMMON. r=jfkthame (51dfbede47)
- minor crash rep (1e7e5bc97e)
- Bug 1240904 - Remove ParamTraits for NPString and NPVariant. r=bsmedberg (1850d10374)
- bug 1170584 - fix PluginMessageUtils on iOS. r=jimm (c624cbe92d)
- Bug 1170343 - Use release-mode asserts when plugins making NPAPI calls on the wrong thread, r=mccr8 (15c71250f4)
- Bug 1239525 - Make sure async plugin initialization is off if e10s is on. r=aklotz (07e73ce74d)
- Bug 1128454 - When plugin bridging fails, propagate the error back to the content process without aborting tabs. r=billm (e1547c00ab)
- Bug 1222169 - remove unused function from PluginProcessChild.cpp; r=aklotz (11a8fc32e1)
- Bug 1239749 - Remove extra space from PermissionSettings.js debug message. r=gwagner (abe2ac7574)
- Bug 1221104 - Revoke 'midi' permission queries with TypeError. r=baku (cce673498f)
- Bug 1221104 - Throw NS_ERROR_NOT_IMPLEMENTED instead of NS_ERROR_UNEXPECTED for PushPermissionDescriptor.userVisible. r=baku (face32ed7b)
- Bug 1228723 - Avoid a promise worker proxy deadlock caused by synchronous Push callbacks. r=catalinb (bd564a0483)
- Bug 1191931, Part 1 - Use tasks in the Push subscription tests. r=mt (3109fdf2af)
- Bug 1191931, Part 2 - Test resubscribing from a worker. r=m (9527fa2672)
- Bug 1243781 - Push methods called from a worker should reject with a `DOMException`. r=mt (f66818b161)
- Bug 1219064 - Add test for extendable pushsubscriptionchange event. r=mt (12af4b59dd)
- Bug 1176449 - Enter an update here to avoid assertions on startup. r=dbaron (1109cce81d)
- Bug 1239743: Do not allow windows to be resized to sizes above the maximum texture size. We don't know how to draw to these anyway. r=jimm (694dafd544)
- Remove some static_casting in CompositorParent. (bug 1245765 part 5, r=mattwoodrow) (4c7f39b18e)
- Bug 1133615 - Don't assert about the contents of RestyleData::mDescendants when in a full style rebuild. r=dbaron (2b071b90d2)
- Bug 1237902 (part 1) - Remove unneeded gfxContext ops in DrawTableBorderSegment(). r=roc. (8490ab67ca)
- Bug 1237902 (part 2) - Pass a DrawTarget to DrawTableBorderSegment(). r=roc. (c602535af0)
- Bug 1237902 (part 3) - Change the gfxContextMatrixAutoSaveRestore in PaintTableBorderBackground() to an AutoRestoreTransform. r=roc. (0b2412e7d6)
- Bug 1242164 - Remove the implementation of colspan=0 (which is now dead code). r=dbaron (88555a04a4)
- Bug 1235478 - Part 1: Rename eAdjustingTimer to eForceAdjustTimer. r=mchang (113a98fa28)
- Bug 1235478 - Part 2: Don't update mMostRecentRefresh when nsRefreshDriver::ScheduleViewManagerFlush is called. r=mchang (7fd8599b7b)
- Bug 1235478 - Part 3: Make weightmapping-12579.html fuzzy on MacOS 10.10. r=jdaggett (559683f95d)
- Bug 1234049 - Ensure we always invalidate new PresShells that are created for an inactive DocShell upon reactivating them. r=smaug (aeca3e08d9)
- Re-backout c216ff19d690 (bug 1059014 part 3) because the removed code is less dead than it first appears. (2cce434c50)
This commit is contained in:
2024-01-23 13:49:53 +08:00
parent 54262da9aa
commit 817a8eed36
48 changed files with 629 additions and 826 deletions
+43 -1
View File
@@ -747,6 +747,7 @@ PresShell::PresShell()
mSelectionFlags = nsISelectionDisplay::DISPLAY_TEXT | nsISelectionDisplay::DISPLAY_IMAGES;
mIsThemeSupportDisabled = false;
mIsActive = true;
mIsHidden = false;
// FIXME/bug 735029: find a better solution to this problem
#if defined(MOZ_WIDGET_ANDROID) && !defined(MOZ_ANDROID_APZ)
// The java pan/zoom code uses this to mean approximately "request a
@@ -778,6 +779,7 @@ PresShell::PresShell()
addedPointerEventEnabled = true;
}
mPaintingIsFrozen = false;
mHasCSSBackgroundColor = true;
mIsLastChromeOnlyEscapeKeyConsumed = false;
mHasReceivedPaintMessage = false;
@@ -801,6 +803,13 @@ PresShell::~PresShell()
mLastCallbackEventRequest == nullptr,
"post-reflow queues not empty. This means we're leaking");
// Verify that if painting was frozen, but we're being removed from the tree,
// that we now re-enable painting on our refresh driver, since it may need to
// be re-used by another presentation.
if (mPaintingIsFrozen) {
mPresContext->RefreshDriver()->Thaw();
}
#ifdef DEBUG
MOZ_ASSERT(mPresArenaAllocCount == 0,
"Some pres arena objects were not freed");
@@ -10451,6 +10460,10 @@ void PresShell::QueryIsActive()
if (docshell) {
bool isActive;
nsresult rv = docshell->GetIsActive(&isActive);
// Even though in theory the docshell here could be "Inactive and
// Foreground", thus implying aIsHidden=false for SetIsActive(),
// this is a newly created PresShell so we'd like to invalidate anyway
// upon being made active to ensure that the contents get painted.
if (NS_SUCCEEDED(rv))
SetIsActive(isActive);
}
@@ -10488,6 +10501,11 @@ PresShell::SetIsActive(bool aIsActive, bool aIsHidden)
NS_PRECONDITION(mDocument, "should only be called with a document");
mIsActive = aIsActive;
// Keep track of whether we've called TabChild::MakeHidden() or not.
// This can still be true even if aIsHidden is false.
mIsHidden |= aIsHidden;
nsPresContext* presContext = GetPresContext();
if (presContext &&
presContext->RefreshDriver()->PresContext() == presContext) {
@@ -10527,10 +10545,14 @@ PresShell::SetIsActive(bool aIsActive, bool aIsHidden)
// and (ii) has easy access to the TabChild. So we use this
// notification to signal the TabChild to drop its layer tree and
// stop trying to repaint.
if (aIsHidden) {
if (mIsHidden) {
if (TabChild* tab = TabChild::GetFrom(this)) {
if (aIsActive) {
tab->MakeVisible();
// The only time we should set this to false is when
// TabChild::MakeVisible() is called.
mIsHidden = false;
if (!mIsZombie) {
if (nsIFrame* root = mFrameConstructor->GetRootFrame()) {
FrameLayerBuilder::InvalidateAllLayersForFrame(
@@ -10750,6 +10772,26 @@ nsIPresShell::FontSizeInflationEnabled()
return mFontSizeInflationEnabled;
}
void
PresShell::PausePainting()
{
if (GetPresContext()->RefreshDriver()->PresContext() != GetPresContext())
return;
mPaintingIsFrozen = true;
GetPresContext()->RefreshDriver()->Freeze();
}
void
PresShell::ResumePainting()
{
if (GetPresContext()->RefreshDriver()->PresContext() != GetPresContext())
return;
mPaintingIsFrozen = false;
GetPresContext()->RefreshDriver()->Thaw();
}
void
nsIPresShell::SyncWindowProperties(nsView* aView)
{