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

- Bug 1159497 - Fix intermittent browser_bug427559.js failures r=MattN (7b3ea3f61)
- Bug 1156110 - Make nsView::mWindow an nsCOMPtr; r=roc (463a0d551)
- Bug 1167085 - Initialize nsBaseWidget::mLayerManager to nullptr. r=roc (a35cadb61)
- Bug 1157941 - If the current PresShell is suppressed, paint the old one if it is available r=tn,Enn (a50bcd9e3)
- Bug 1176959 nsGtkIMModule shouldn't commit composition when a selection change is notified but it was caused by selection set event r=m_kato (eae9672d1)
- Bug 1184449 part.1 IMENotifiation::SelectionChangeData should store selected string r=smaug (a34eddb64)
- Bug 1184449 part.2 nsIMM32Handler should store selection range as far as possible r=m_kato (d318ad109)
- Bug 1167105 - Part 1. Set temporary range until OnSelectionChange is called. r=masayuki (6aff5bd9d)
- Bug 1167105 - Part 2. Improve OnSelectionChange implementation. r=masayuki (4cb1f297f)
- Bug 1184449 part.3 Fix the bustage of Mac OS X r=myself (8e35b4aa2)
- Bug 1184986 NOTIFY_IME_OF_POSITION_CHANGE should be put off until all sending events are recieved by child process r=smaug (a1909600a)
- Bug 1192156 Separate IME specific structs, classes and enums from nsIWidget.h to IMEData.h r=roc (53a9f5f4c)
- Bug 1128607 - Add freshness check for OneCRL (r=keeler) (149e6a57f)
- Bug 1128607 - Test the freshness check for OneCRL (r=keeler) (c2408b646)
- Bug 1175382 TextRangeArray::TargetClauseOffset() and TextRangeArray::TargetClauseLength() shouldn't be public and same name methods of WidgetCompositionEvent should be used r=m_kato (5010f8363)
- Bug 1181240 - Part 1: Copy methods from gfx3DMatrix,r=vlad (dbb277cb2)
- Bug 1150704 - Use the same dest rect calculation for nsDisplayImage::GetOpaqueRegion and nsDisplayImage::GetDestRect. r=dholbert (60853571d)
- Bug 1182929 - Work around bug 803703 by refusing to turn heavily-downscaled images into image layers. r=seth (ecf9f5c9e)
- Bug 1177587 - Detect use of <img> elements for animation and use sync decoding to reduce flicker. r=tn (463ca0fd6)
- Bug 1151359 (Part 1) - Predict the size of nsImageFrame images before drawing. r=tn (c0cd67ee0)
- Bug 1151359 (Part 2) - Add support for detecting transform property changes that affect scale to ActiveLayerTracker. r=mstange (69094936c)
- Bug 1122526 patch 1 - Factor in the scale from ancestors when computing scale for layer with OMT animation of transform. r=roc (75378e2c8)
- Bug 1122526 patch 2 - Only do OMTA transform scale choosing for layers that are for transform display items. r=roc (299d3644b)
- Bug 1122526 patch 3 - Correctly account for transform:none when finding maximum scale for a transform animation. r=roc (6b6e190ad)
- Bug 1184200 - Update a check for APZ enabled. r=dvander (01c9f72df)
- Bug 1122526 patch 4 - Use the nearest widget size as the maximum size for an animated layer, in case it's a popup larger than the toplevel window. r=roc (941979bcb)
- Bug 771367 - Support compositor animation for pseudo-elements. r=dbaron (625ad9140)
- Bug 1151359 (Part 3) - Treat nsImageFrames subject to scale animation as having an identity scale when predicting size. r=tn,birtles (708fb4323)
- Bug 1238337. If the intrinsic size of the image hasn't changed then we don't need to do a new predictive image decode. r=mats (6b2bbe118)
- Bug 1181240 - Part 2: Replace gfx3DMatrix with Matrix4x4 in layout,r=vlad (e99b4dae5)
- Bug 1147279 - Get correct translation when layer optimize away. r=roc (a0bbf3c91)
- Bug 1176411 - Stop parenthesizing array/object pattern destructuring assignment targets in addon SDK code. r=jsantell, a=KWierso (remaining parts of rev 3f0d8da0b) (91a80210e)
- Bug 1146136 - Fix most in-tree tests that parenthesize destructuring pattern assignment targets, as ES6 forbids such parenthesization. (was rev 24bf70dac) (55d943c12)
- Bug 1145764 - Remove unused functions. r=nical (6bb54ad02)
- Bug 1150549 - Simplify TiledContentHost. r=jrmuizel (b800fa87d)
- Bug 1169339 - Fix incorrect tile storage order in TiledContentHost. r=jrmuizel (618e476bd)
- Bug 1145764 - Add logging for tile retention inside a TiledLayerBuffer. r=nical (113c84fbe)
- Bug 1170189 - Use TilesPlacement to handle tile coordinates conversion. r=BenWa (c3f082a21)
This commit is contained in:
2021-03-03 09:31:30 +08:00
parent 7fc7f2d2a8
commit 5fe82ff0f2
86 changed files with 3141 additions and 1592 deletions
+28
View File
@@ -100,6 +100,9 @@ nsImageLoadingContent::nsImageLoadingContent()
if (!nsContentUtils::GetImgLoaderForChannel(nullptr, nullptr)) {
mLoadingEnabled = false;
}
bool isInconsistent;
mMostRecentRequestChange = TimeStamp::ProcessCreation(isInconsistent);
}
void
@@ -1214,6 +1217,22 @@ nsImageLoadingContent::FireEvent(const nsAString& aEventType)
nsRefPtr<imgRequestProxy>&
nsImageLoadingContent::PrepareNextRequest(ImageLoadType aImageLoadType)
{
nsImageFrame* frame = do_QueryFrame(GetOurPrimaryFrame());
if (frame) {
// Detect JavaScript-based animations created by changing the |src|
// attribute on a timer.
TimeStamp now = TimeStamp::Now();
TimeDuration threshold =
TimeDuration::FromMilliseconds(
gfxPrefs::ImageInferSrcAnimationThresholdMS());
// If the length of time between request changes is less than the threshold,
// then force sync decoding to eliminate flicker from the animation.
frame->SetForceSyncDecoding(now - mMostRecentRequestChange < threshold);
mMostRecentRequestChange = now;
}
// If we don't have a usable current request, get rid of any half-baked
// request that might be sitting there and make this one current.
if (!HaveSize(mCurrentRequest))
@@ -1470,6 +1489,15 @@ nsImageLoadingContent::TrackImage(imgIRequest* aImage)
nsIDocument* doc = GetOurCurrentDoc();
if (doc && (mFrameCreateCalled || GetOurPrimaryFrame()) &&
(mVisibleCount > 0)) {
if (mVisibleCount == 1) {
// Since we're becoming visible, request a decode.
nsImageFrame* f = do_QueryFrame(GetOurPrimaryFrame());
if (f) {
f->MaybeDecodeForPredictedSize();
}
}
if (aImage == mCurrentRequest && !(mCurrentRequestFlags & REQUEST_IS_TRACKED)) {
mCurrentRequestFlags |= REQUEST_IS_TRACKED;
doc->AddImage(mCurrentRequest);