gecko-dev/xpcom
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
..
base Bug 1428742 - use Value::toGCCellPtr and delegating ctr of GCCellPtr. r=jonco 2021-02-03 20:13:10 +00:00
build Bug 1607138 - gXPCOMThreadsShutdown should be atomic r=xpcom-reviewers,mccr8 2021-01-21 01:01:26 +00:00
components Bug 1675848 - Part 2: Add "BackgroundTasksSelector" to static component category registration. r=mhentges,nika 2021-01-25 23:44:49 +00:00
doc
ds Bug 1690433. Create a minimal display port type. r=botond 2021-02-04 11:16:44 +00:00
glue Bug 1654103: Standardize on Black for Python code in `mozilla-central`. 2020-10-26 18:34:53 +00:00
idl-parser Bug 1647259 - Replace unsubscriptable value 'list' with 'attlist' r=nika 2021-02-01 15:57:44 +00:00
io Backed out 11 changesets (bug 1681529) for talos crashes CLOSED TREE 2021-02-03 09:29:38 +02:00
libxpt/xptcall
reflect Bug 1690152 - on ppc64 properly skip parameter slots if we overflow GPRs while still having FPRs to burn. r=tcampbell 2021-02-02 02:04:20 +00:00
rust Bug 1679094 - Resolve dom::Promise from Rust. r=nika 2020-12-12 02:55:49 +00:00
string Bug 1686831 - Handle trailing zero removal in double-conversion. r=nika,jwalden,Gankra 2021-01-29 04:25:53 +00:00
system Bug 1654103: Standardize on Black for Python code in `mozilla-central`. 2020-10-26 18:34:53 +00:00
tests Backed out 11 changesets (bug 1681529) for talos crashes CLOSED TREE 2021-02-03 09:29:38 +02:00
threads Bug 1688937 - Remove now-unused thread counting r=KrisWright 2021-02-01 18:25:27 +00:00
windbgdlg Bug 1654103: Standardize on Black for Python code in `mozilla-central`. 2020-10-26 18:34:53 +00:00
xpidl Bug 1670357 - Remove `make` targets for cleaning: `clean`, `realclean`, `clobber`, `distclean`, `clobber_all`, `everything` r=firefox-build-system-reviewers,mhentges 2020-10-15 20:37:18 +00:00
moz.build Bug 1654103: Standardize on Black for Python code in `mozilla-central`. 2020-10-26 18:34:53 +00:00
xpcom-config.h.in