gecko-dev/dom
Timothy Nikkel e2f27ec58a Bug 1690433. Create a minimal display port type. r=botond
We introduce a new type of display port, a minimal display port. It is controlled via a property on the content element. When the property is present any other display port specified on the element is ignored and instead the display port rect is computed by assuming 0 display port margins and no alignment (this reuses the existing code for display port suppression).

We then add code to set a minimal display port on every scroll frame that is painted that has WantAsyncScroll() when certain prefs are set (the prefs are disabled as of this patch though).

We then need to manage removing the minimal display port property when, before this patch, we would have created a regular display port. As well we need to add the minimal display port property when, before this patch, we would have removed a regular display port.

In order to do this I audited all sites where we set the display port rect and display port margins property. The changes to the code for handling the removal display ports happens in a later patch.

My audit found that all of the places we set a display port want to clear the minimal display port property except:
-UpdateSub/RootFrame in APZCCallbackHelper
-UpdateDisplayPortMarginsForPendingMetrics in DisplayPortUtils

UpdateDisplayPortMarginsForPendingMetrics is basically a fast path of the UpdateSub/RootFrame code. These are the places where we handle calls to RequestContentRepaint from apz. By adding an assert and running it through try server I found that UpdateSub/RootFrame can create a display port in the following cases:
-a scroll info layer
-a scroll frame with !WantAsyncScroll() (the main thread never creates a display port for a scroll frame with !WantAsyncScroll()) (for example if the main thread creates a scroll id and sends over metadata via nsLayoutUtils::GetRootMetaData, and then the scroll rect changes, that will cause a RequestContentRepaint call)
-a few instances that don't fall into the above that happened on try server but didn't reproduce for me locally, so I don't know more about them.
It's not very important whether we clear the minimal display port property for these cases or not (the first two cases we don't async scroll the scroll frame at all, the last case seems quite rare).

Note that we intentionally do not change the existing behaviour of zero margin display ports set via SetZeroMarginDisplayPortOnAsyncScrollableAncestors as we are aiming for no behaviour changes with this patch (until we flip the pref). A later patch in a different bug handles changing these display ports over to minimal display ports.

Differential Revision: https://phabricator.services.mozilla.com/D103855
2021-02-04 11:16:44 +00:00
..
abort
animation
audiochannel
base Bug 1690433. Create a minimal display port type. r=botond 2021-02-04 11:16:44 +00:00
battery
bindings Bug 1675277 - Support FOG Labeled Metrics in C++ and JS r=janerik 2021-02-02 16:46:40 +00:00
broadcastchannel Bug 1688109 - BroadcastChannel doesn't reliably remove the page from BFCache when a message is received, r=annyG 2021-01-22 10:57:42 +00:00
browser-element
cache Backed out 11 changesets (bug 1681529) for talos crashes CLOSED TREE 2021-02-03 09:29:38 +02:00
canvas Bug 1689415 - Avoid UB when validating enum values in EnumSerializer. r=mccr8 2021-02-02 18:04:05 +00:00
chrome-webidl Bug 1655967 - Move serviceWorkersTestingEnabled to BrowsingContext. r=nika 2021-02-03 10:38:43 +00:00
clients Bug 1496997 - Remove child intercept code from dom/clients r=asuth,dom-workers-and-storage-reviewers 2021-01-25 22:49:49 +00:00
commandhandler
console
credentialmanagement
crypto
debugger
docs
encoding
events Bug 1541915 - part 2: Make `test_scroll_per_page.html` never timed out r=smaug 2021-02-02 03:05:07 +00:00
fetch Bug 1687587 - Cleanup a bit Link.h. r=smaug 2021-01-20 09:24:10 +00:00
file Backed out 11 changesets (bug 1681529) for talos crashes CLOSED TREE 2021-02-03 09:29:38 +02:00
filehandle
filesystem
flex
gamepad
geolocation
grid
html Bug 1685491 - part 5: Move the code remapping arrow keys in vertical content to `NativeKeyBindings` r=smaug,jfkthame 2021-02-02 03:29:31 +00:00
imptests
indexedDB Bug 1687391 - Avoid using a spinlock in ThreadSafeWeakReference, r=glandium,mccr8,Gankra,sg 2021-02-03 17:00:04 +00:00
interfaces Bug 1655967 - Move serviceWorkersTestingEnabled to BrowsingContext. r=nika 2021-02-03 10:38:43 +00:00
ipc Bug 1689516 - Remove AudioNotification{Sender, Receiver}. r=chunmin 2021-02-03 20:37:09 +00:00
jsurl Bug 1684647 - Removed 'else' after 'return'. r=nika 2021-01-15 04:42:07 +00:00
l10n
locales
localstorage Bug 1689293 - Introduce DirectoryLock::Acquire; r=sg 2021-02-02 08:20:18 +00:00
manifest
mathml
media Bug 1689516 - Remove AudioNotification{Sender, Receiver}. r=chunmin 2021-02-03 20:37:09 +00:00
messagechannel
midi
network
notification
offline
payments
performance Bug 1688941 - Enforce and document that mTimingData is always non-null. r=smaug 2021-01-27 19:24:19 +00:00
permission
plugins Bug 1689034 - part 1: Get rid of communication part between plugin process and widget in the main process r=smaug 2021-01-28 08:23:33 +00:00
power
presentation Bug 1689604 - Remove TCPFastOpen part 3 r=necko-reviewers,valentin 2021-02-03 17:23:45 +00:00
prio
promise Bug 1687063 - Improve error messages when trying to consume a Reponse for WebAssembly. r=lth 2021-01-18 12:16:33 +00:00
prototype Bug 1686822 - Execute currently-non-cacheable module scripts in the XUL content sink. r=smaug 2021-01-18 17:38:56 +00:00
push Backed out changeset db75491e5d2e (bug 1649604) for causing xpcshell and marionette failures. CLOSED TREE 2021-01-25 19:24:06 +02:00
quota Bug 1685677 - Refactor QuotaManager::CollectOriginsForEviction. r=dom-workers-and-storage-reviewers,janv 2021-02-04 09:24:27 +00:00
reporting
res
script
security Bug 1687364 - Authorization header can't be wildcarded for Access-Control-Allow-Headers r=necko-reviewers,dragana 2021-02-02 18:39:32 +00:00
serializers
serviceworkers Bug 1655967 - Move serviceWorkersTestingEnabled to BrowsingContext. r=nika 2021-02-03 10:38:43 +00:00
simpledb Bug 1689293 - Introduce DirectoryLock::Acquire; r=sg 2021-02-02 08:20:18 +00:00
smil
storage Bug 1682536 - Use NotNull with WriteInfo. r=dom-workers-and-storage-reviewers,janv 2021-01-21 11:58:47 +00:00
svg Bug 1687195 - Invalid enums should return the initial value, not the unknown value r=emilio 2021-01-18 15:57:55 +00:00
system Bug 1689740 - Check for nsIFile::GetParent() returning null in IOUtils r=emalysz 2021-01-30 05:47:25 +00:00
tests Bug 1690225 - Remove focus-visible feature flag. r=edgar 2021-02-02 23:45:25 +00:00
u2f
url
vr
webauthn
webbrowserpersist
webgpu
webidl Bug 259640, add chrome only method to add scrollbar tick marks to a window, r=smaug,tnikkel 2021-02-03 17:35:41 +00:00
webshare
websocket
workers Bug 1687391 - Avoid using a spinlock in ThreadSafeWeakReference, r=glandium,mccr8,Gankra,sg 2021-02-03 17:00:04 +00:00
worklet
xhr
xml
xslt
xul Bug 1686822 - Execute currently-non-cacheable module scripts in the XUL content sink. r=smaug 2021-01-18 17:38:56 +00:00
jar.mn
moz.build