If we called PaintFrame for drawWindow or something other than painting to the widget the visual scroll update won't make it to the compositor, so don't clear it.
This doesn't fix anything specifically, just noticed it while reading code.
Differential Revision: https://phabricator.services.mozilla.com/D76781
nsPrintObject::InitAsNestedObject made sure that all nsPrintObjects were set to
print-as-is except for frameset documents and their sub-documents. (Note the
setting of mParent->mPrintAsIs, which would actually set the root nsPrintObject
to print-as-is if it wasn't a frameset document!).
The SetPrintAsIs() calls in nsPrintJob::EnablePOsForPrinting would then
subsequently also set those frameset and frame nsPrintObjects to be print-as-is
in all but one edge case, namely printing a selection when there isn't a focused
window (which I'm not sure is even be possible).
Differential Revision: https://phabricator.services.mozilla.com/D77621
We nowadays already directly set nsPrintObject->mContent in
nsPrintObject::InitAsNestedObject. This patch adds the setting of mFrameType
and PrintAsIs that MapContentForPO does, making MapContentToWebShells and
MapContentForPO redundant.
Differential Revision: https://phabricator.services.mozilla.com/D77597
Spec: https://html.spec.whatwg.org/multipage/#centered-alignment
The spec is opaque about the centered alignment mode and we couldn't
come up a satisfied solution by using the current version of the
spec. There will be discussion in CSSWG to talk about better solutions.
In the meantime, we are adding this patch as a temporary solution with
basic centered alignment support to allow us enabling the feature
in Nightly for more testing.
Differential Revision: https://phabricator.services.mozilla.com/D77678
Simple application of `./mach clang-format -p
layout/generic/nsFrameSelection.cpp`. Separating this from previous
changes simplified reviewing and decreases the probability for mistakes.
Differential Revision: https://phabricator.services.mozilla.com/D77459
`HandleSelection` was too complex.
The arguments of the new methods will be renamed in a separate commit to
simplify reviewing and avoid mistakes.
Differential Revision: https://phabricator.services.mozilla.com/D77253
This is to prevent the assertion at the beginning of
DrainExcessOverflowContainersList().
The invariant is described in the comment revised in this patch. That
is, "only one overflow containers list exists for a given frame: either
its own OverflowContainersProperty or its prev-in-flow's
ExcessOverflowContainersProperty, not both."
Differential Revision: https://phabricator.services.mozilla.com/D77328
AutoFrameListPtr might be used more frequently after we add more APIs to
handle overflow container list and excess overflow container list in
bug 1641085.
The improvements in this patch includes:
* Mark AutoFrameListPtr as MOZ_RAII and final class.
* Move AutoFrameListPtr into mozilla namespace since we don't use layout
sub-namespace that much these days.
* Remove the AutoFrameListPtr type alias in nsGridContainerFrame's
header since it's not used.
Differential Revision: https://phabricator.services.mozilla.com/D77568
StealOverflowFrames() and RemovePropTableFrames() use TakeProperty() to
remove the property, and transfer the ownership to the caller. Since
TakeProperty() is already marked as [[nodiscard]], so should they.
Differential Revision: https://phabricator.services.mozilla.com/D77567
This is to prevent the assertion at the beginning of
DrainExcessOverflowContainersList().
The invariant is described in the comment revised in this patch. That
is, "only one overflow containers list exists for a given frame: either
its own OverflowContainersProperty or its prev-in-flow's
ExcessOverflowContainersProperty, not both."
Differential Revision: https://phabricator.services.mozilla.com/D77328
This adjusts the position at which the drag images appear when doing drag
actions, so that they appear where you would expect when APZ zoom is applied.
There doesn't seem to be a good way to test this, but I did a bunch of manual
testing, with all the possible expansions of this sentence:
Dragging {a small image,a large image,some text} in {an iframe,the root
content document}, with {,no }zooming applied.
In all cases, the drag image/text should appear such that the part under the
cursor is the same as what was under the cursor on the original rendering of
the page.
Differential Revision: https://phabricator.services.mozilla.com/D77436
When rasterizing the drag image, we pick up the resolution from ancestor
presShells and ensure that the drag image is rasterized at that resolution,
with appropriate limits for memory usage.
Differential Revision: https://phabricator.services.mozilla.com/D77435
The previous patch stops us from firing the load event if we abort a load. We have a few crashtests that abort loads (either by directly calling stop(), or by starting a new navigation before load completes).
This switches the reftest harness to use web progress to determine when we've finished loading a test.
Differential Revision: https://phabricator.services.mozilla.com/D73995
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