These flex / grid's methods are implemented by delegating to
nsContainerFrame's methods. We shouldn't assume they can support more
child list types than the ones supported in nsContainerFrame's methods.
- NoteNewChildren is a helper for flex and grid's AppendFrame and
InsertFrames, and nsContainerFrame::{AppendFrame,InsertFrames} supports
only kPrincipalList and kNoReflowPrincipalList.
- nsContainerFrame::RemoveFrame supports only kPrincipalList and
kNoReflowPrincipalList.
- nsContainerFrame::SetInitialChildList supports only kPrincipalList and
kBackdropList.
Differential Revision: https://phabricator.services.mozilla.com/D77391
Bug 1635406 made it so that webrender snaps the offsets of animated
transforms before accumulating them in to the reference frame
transform. Unfortunately, however, this causes jittery animations. The
original intention was just to snap the visual viewport offset when
scrolling, to avoid excessive picture cache invalidation.
To avoid this, make it so that we only snap for reference frames of
kind ReferenceFrameKind::Zoom. This will mean that most animations are
unaffected. There may however still be some jitter when zooming, but
this is outweighed by the benefit of not invalidating picture cache
tiles every frame when scrolling.
Differential Revision: https://phabricator.services.mozilla.com/D77679
Also update documentation to suggest using the `GeneratedFile` template rather than directly referencing `GENERATED_FILES` where possible.
Differential Revision: https://phabricator.services.mozilla.com/D77496
I'm about to introduce the concept of "Loader principal" (as in "the
principal of the CSS loader"), and SheetLoadData already has an
mLoaderPrincipal.
However SheetLoadData's principal is just the triggering principal (the
principal that initiated the load). So name it that with consistency
with SheetInfo::mTriggeringPrincipal etc.
Differential Revision: https://phabricator.services.mozilla.com/D77613
The viewport units size doesn't match the aspect ratio of the screen size in
some cases.
For example, in the case of the reftest in this commit, the meta viewport is
"width=1600, height=device-height" and the screen size during reftest is
"800x1000". Thus the viewport units size will be "1600x1000". In such cases
with the old way ExpandHeightForViewportUnits shrinks the given size
"1600x1800" to "1600x1000" with 100px dynamic toolbar max height (and the
MOZ_ASSERT in the function happens on debug builds).
Differential Revision: https://phabricator.services.mozilla.com/D77176
Similar to nsGridContainerFrame, when appending, inserting, or removing
frames, the state bits NS_STATE_FLEX_DID_PUSH_ITEMS and
NS_STATE_FLEX_HAS_CHILD_NIFS need to be set so that
nsContainerFrame::NormalizeChildLists() can work correctly.
Remove kNoReflowPrincipalList from the supported child list in
NoteNewChildren() since the list is used to optimize BIDI-splitting,
which should only affect Inline and Text frame classes.
Differential Revision: https://phabricator.services.mozilla.com/D77204
mozilla::Unused is going to be removed in bug 1628542. We can cast the
return value of `TakeProperty` into void to suppress the warning.
In bug 1641085, we can add `DestroyOverflowContainersList` (similar to
DestroyOverflowList(), and audit the caller.
Differential Revision: https://phabricator.services.mozilla.com/D76981
- Implement the nsPrinterEnumeratorX
- Enable the contract @mozilla.org/gfx/printerenumerator;1 for macOS
- Add test for default printer name.
- Remove restrictions preventing some tests from running on macOS
Differential Revision: https://phabricator.services.mozilla.com/D76356
Add the NSWindowCollectionBehaviorMoveToActiveSpace behavior to nsCocoaWindow
popups so that they override the "Assign To" space setting and display on the
active space.
This also addresses bug 1589893 where, when "Assign To" space is used, popup
menus are not visible in full screen mode.
With mutiple displays, recreate the popup widget each time it is displayed
to workaround a problem where the re-shown popup appears on the "Assign To"
display instead of the current display.
Differential Revision: https://phabricator.services.mozilla.com/D75419
Add the NSWindowCollectionBehaviorMoveToActiveSpace behavior to nsCocoaWindow
popups so that they override the "Assign To" space setting and display on the
active space.
This also addresses bug 1589893 where, when "Assign To" space is used, popup
menus are not visible in full screen mode.
With mutiple displays, recreate the popup widget each time it is displayed
to workaround a problem where the re-shown popup appears on the "Assign To"
display instead of the current display.
Differential Revision: https://phabricator.services.mozilla.com/D75419
- Add a gfxVarReceiver for nsCSSProps.
- Recompute backdrop-filter state when notifying receivers for WebRender.
- Remove NS_NewRunableFunction calls when we know we're on main thread.
- Add assertion that recompute enabled state is called from main thread.
Differential Revision: https://phabricator.services.mozilla.com/D74975
Dynamically toggle support for displaying image/webp and image/avif according
to the values of the image.webp.enabled and image.avif.enabled prefs.
Differential Revision: https://phabricator.services.mozilla.com/D76977
Bug 1620014 attempted to fix an issue where an animated visual
viewport offset (eg due to scrolling while being zoomed in) was
causing the fractional offset of a descendant scroll frame's content
transform to change, causing too much picture cache invalidation.
It did so by snapping the coordinate-system-relative offset when using
it to calculate the content_transform. This value of course includes
the animated visual viewport offset (as the axis-aligned zoom
transform cannot reset the coordinate system). However, it also
includes non-animated offsets, which were now being incorrectly
snapped, causing blurry/clipped text.
This change reverts that original fix. And instead, it snaps the
source_transform of the reference frame itself when it is sampled,
rather than the accumulated coordinate-system-relative scale_offset of
the scroll frame. Additionally, it only snaps the offset if it is an
animation (including zoom), and static offsets are left unsnapped.
Differential Revision: https://phabricator.services.mozilla.com/D76298
There's no use case for stateful comparators, so they can be just plain
function pointers.
This is used in some hot places like CSS selector matching.
Differential Revision: https://phabricator.services.mozilla.com/D77084
If |nsDisplayItem::CreateWebRenderCommands()| returns false, the items that have been pushed to |DisplayListBuilder::pending_chunk| need to be cleared, because the item will be pushed as an image instead. This happens, for example, when nsDisplayText encounters unsupported features.
Differential Revision: https://phabricator.services.mozilla.com/D77095
This should help out quite a bit with uBO, which has lots of very
general attribute selectors. We invalidate per attribute name rather
than using a SelectorMap, which prevents matching for attribute
selectors that can't have changed.
The idea is that this should be generally cheaper, though there are
cases where this would be a slight pesimization. For example, if there's
an attribute selector like:
my-specific-element[my-attribute] { /* ... */ }
And you change `my-attribute` in an element that isn't a
`my-specific-element`, before that the SelectorMap would've prevented us
from selector-matching completely. Now we'd still run selector-matching
for that (though the matching would be pretty cheap).
However I think this should speed up things generally, let's see what
the perf tests think before landing this though.
Differential Revision: https://phabricator.services.mozilla.com/D76825