Recursive the things all :^)
The fix to the "corresponding node" bits in Document.cpp should be
pretty straight-forward. The fix in nsPrintJob is a bit more subtle:
The way printing selection works is literally "select everything else,
then call Selection.deleteFromDocument on that". We need to do the same
with shadow DOM, which involves skipping over shadow trees, and dealing
with selecting bits in ancestor trees as needed.
Note that for multi-range-selection case this technically relies on the
order of the ranges being shadow-tree-inclusive. We don't support
multi-range selection in shadow dom well, afaict, but I've added a
comment to the code to that effect.
Differential Revision: https://phabricator.services.mozilla.com/D93357
Due to the MacOS `__PYVENV_LAUNCHER__` environment variable, some
virtualenv operations were being run with the system python (and
packages), rather than the python and packages within the venv.
This was already partially solved by having `__PYVENV_LAUNCHER__`
get unset when some virtualenv operations were run.
This change makes this more consistent by unsetting the environment
variable once a `VirtualenvManager` is created.
Differential Revision: https://phabricator.services.mozilla.com/D93615
When waiting for a navigation to complete the
"browsing-context-discarded" observer notification
is used to determine if the currently selected
browsing context has been closed or just replaced
due to a remoteness change.
Differential Revision: https://phabricator.services.mozilla.com/D93747
See the comment.
https://phabricator.services.mozilla.com/D90808 made it so that we
reused the print document (and thus <browser>) to do the actual print
job.
When a print job finishes, we call window.close(), which is used as a
signal to the front-end to clean up the <browser> element. Before that
patch we sent that signal to the browser created in printUtils.js, but
afterwards we send it to the preview window which causes this badness
when the event bubbles up.
Ignoring it effectively restores the previous behavior, so let's do it.
Differential Revision: https://phabricator.services.mozilla.com/D93499
This patch deletes the whole layout/reftests/w3c-css/ directory.
These tests are duplicated across the reftest harness and the wpt
reftest harness. This has a number of problems:
* We run every test twice, taking unnecessary time and resources.
* A bespoke sync process is required for this directory.
* We often get metadata out of sync between the two copies, so they
seem to have different results.
* Other vendors often don't realise these tests exist, so they're less
useful for interop.
* When others do realise the test exist, they don't feel able to fix
issues in them because of the complex sync.
This patch removes the reftest harness copy of the tests. It seems
like the wpt reftest harness is sufficiently aligned with the reftest
harness that this shouldn't lose much in the way of coverage (and any
remaining differences are obviously a problem for all other wpt
reftests as well so should be fixed in general if there's a problem).
Differential Revision: https://phabricator.services.mozilla.com/D93127
I couldn't reproduce this bug with a try push containing 20
retriggers, so I think it's safe to remove the annotations. If this
comes up again as an intermittent, we can revert this patch and
investigate further.
Differential Revision: https://phabricator.services.mozilla.com/D93126
The comments in PreWriteBarrierImpl mention that the per-barrier verifer can
turn on incremental barriers in the atoms zone outside of a GC. This also
applies to the self hosting zone so we just need to relax the assertions to
cover that too.
Differential Revision: https://phabricator.services.mozilla.com/D93760
When the grabber to move absolutely positioned element is disabled,
`HTMLEditor::HideGrabberInternal()` is called to delete it. However,
it does not reset dragging state. Therefore, `mousemove` event listener
will try to handle drag even after the grabber is removed.
This patch makes `HideGrabberInternal()` reset the dragging state to
make the event listener stop handling the drag action.
However, I hit a buggy assertion in `EventStateManager`. It tries to
set active state to parent of the grabber (in this case, absolutely positioned
element). However, editable element in `contenteditable` cannot have
active state. Therefore, `leaf` becomes `nullptr`, but `newleaf` is the
absolutely positioned element. Therefore, this patch adds this condition
into the `MOZ_ASSERT`.
Differential Revision: https://phabricator.services.mozilla.com/D93632
Our fract offset for the tiles should be a simple mapping of the snapped
device position back to picture space. If no snapping is required, then
the position will be precisely the origin. When using this value to
decide if the position has changed for glyph subpixel offset purposes,
we must consider it in device space, since picture to device space can
be effectively arbitrary.
We update the stored fract offset at which a tile was rendered whenever
we invalidate the whole tile, not just when we detect the fract offset
has changed by a notable amount. This should reduce spurious
invalidations since the tile was actually rendered at a different offset
that we had recorded prior to this patch.
Also, when evaluating the tile's valid rect, we cannot use the local
valid rect. The device valid rect we use is the local mapped from
picture space, but also snapped. Thus it makes far more sense to compare
that which we used for drawing purposes which has the bonus of avoiding
floating point errors.
Differential Revision: https://phabricator.services.mozilla.com/D91156
In clang trunk 12, mingw builds started adding an `.exe` extension by default. We need to have `ac_exeext` know about this so that we'll search for `conftest.exe` rather than `conftest`. Calling `AC_EXEEXT` will go through some logic and set the right value of `ac_exeext`.
Differential Revision: https://phabricator.services.mozilla.com/D93252
In strictly speaking, we should shrink selection ranges at very first time
of edit action handling. However, we support multiple selection ranges and
it makes the check cost really expensive, and the code would be really
complicated since ranges cannot be overlapped. I.e., changing one range
could affect some of the others.
Therefore, this patch changes `HTMLEditor::SelectAllInternal()` instead.
If computed selection root is an ancestor of `<body>` element in HTML document,
it use the `<body>` element instead.
Note that, in HTML document, there should be only one `<body>` element and
only its content should be editable at least for now. (Note that in XHTML
document, no `<body>` is allowed, multiple `<body>` elements allowed.)
Differential Revision: https://phabricator.services.mozilla.com/D93712
1. Fix border-radius at the top of the tabs for RTL
2. Make every <list-item> flush with the panel
3. Force LTR / set dir=auto where needed
Differential Revision: https://phabricator.services.mozilla.com/D93690