There are some methods in `TextServicesDocument` which work only with
`TextServicesDocument::mOffsetTable`. Once we move such methods to custom
class of `nsTArray<UniquePtr<OffsetEntry>>`, we can make `TextServicesDocument`
simpler.
Depends on D119157
Differential Revision: https://phabricator.services.mozilla.com/D119158
`beforeinput` event was shipped and it won't be disabled for avoiding confusion
of web developers. So, we can drop the pref setting of
"dom.input_events.beforeinput.enabled" in our tests.
Depends on D119716
Differential Revision: https://phabricator.services.mozilla.com/D119729
Similarly, the test uses `synthesizeWheel` and it may be handled by the main
process before APZC has the `<iframe>`'s layout information. So, it should
wait `promiseElementReadyForUserInput` before running its first test.
Differential Revision: https://phabricator.services.mozilla.com/D119716
Now, it stores `dom::Text` with `OwningNonNull`. So, once it's leaked, it
wastes a lot of memory spaces. Therefore, we should make `mOffsetTable`
store `UniquePtr<OffsetEntry>` instead of `OffsetEntry*`.
Depends on D119156
Differential Revision: https://phabricator.services.mozilla.com/D119157
Now, the meaning of `OffsetEntry` is clear. Therefore, this patch adds comment
explaining the class and its members.
Then, the meaning of `TextServicesDocument::mSelStartOffset` and
`TextServicesDocument::mSelEndOffset` becomes clearer since they are used to
create `OffsetEntry` instances. Therefore, this patch renames them.
Depends on D119155
Differential Revision: https://phabricator.services.mozilla.com/D119156
This is a step towards removing object private slots.
Classes with JSCLASS_PRIVATE_IS_NSISUPPORTS now use JSCLASS_SLOT0_IS_NSISUPPORTS
instead. For most classes this means we need to add an extra reserved slot and remove
the private slot.
Global objects (SimpleGlobalObject and the XPConnect BackstagePass and Sandbox globals)
however can use the JSCLASS_GLOBAL_APPLICATION_SLOTS already there. These slots were
only used for WebIDL DOM globals until now.
Differential Revision: https://phabricator.services.mozilla.com/D119502
This fixes intermittent failures on browser_target_list_service_workers_navigation.js
that were appearing with the next patch on the queue (switching to dom-loading resource
in legacy service worker watcher).
Differential Revision: https://phabricator.services.mozilla.com/D119511
It was enabled in bug 1712633 by mistake.
Because there wasn't a way to distinguish esr yet, we add one, and while
at it, expose it to the build system.
Differential Revision: https://phabricator.services.mozilla.com/D119682
Now, `mNode` is always a text node, and it may store across "can run script"
boundaries. So, it should be `OwningNonNull<Text>`.
Depends on D119148
Differential Revision: https://phabricator.services.mozilla.com/D119149
Now, `nsIFrame::HandleEvent` moves selection at middle mouse button down. This
occurs before dispatching the event into the system event group. Therefore,
`AutoScrollChild` cannot prevent it.
On the other hand, Chrome does not start autoscroll when a modifier is pressed.
This means that our users may not be able to use middle click with modifiers
if web apps do not call `preventDefault()` as expected. So, this difference
is a potential risk of web-compat.
Therefore, this patch makes `AutoScrollChild` stop starting autoscroll if
`Shift` key is pressed.
Differential Revision: https://phabricator.services.mozilla.com/D119253
If middle button click with `Shift` key occurs, Chrome and Safari extend the
selection in most cases. However, if the clicked position is in a link,
Chrome does:
* If editable, collapse selection into the link instead of extending selection.
* If not editable, not extending selection and open tabs.
We should follow this behavior for both backward compatibility and web-compat.
Differential Revision: https://phabricator.services.mozilla.com/D119252
It seems that it treats mainly a text node in various places, but it's not
guaranteed by any variable declarations. So, first of all, I'd like to make
it clearer.
`TextServicesDocument::IsTextNode()` isn't necessary because `nsINode::IsText()`
is enough useful. And `AsText()` should be zero cost at runtime. So, in blocks
which guarantee specific content node is a text node, this patch appends
`AsText()` for making the code clearer.
Differential Revision: https://phabricator.services.mozilla.com/D119148
Add MixBlend and ComponentTransfer to the picture composite modes that
unconditionally establish a raster root.
All the known bugs with the raster root code have been fixed, so let's
start incrementally enabling raster roots for more picture modes, and
fix any regressions that come from these before making raster roots
the default for all surfaces.
Differential Revision: https://phabricator.services.mozilla.com/D117954
When the test times out, the `<iframe>` element in the parent document receives
the mouse button events. This may happen if APZC has not received layout
information from subframe's document yet.
For solving this issue, this patch adds a utility method into `EventUtils.js`
that waits a `mousemove` event synthesized on the given target.
Differential Revision: https://phabricator.services.mozilla.com/D119596
This patch allows the desktop recorder to be run manually. A subsequent patch
will enable it for every m-c push once the hardware is deployed.
Differential Revision: https://phabricator.services.mozilla.com/D117367
This becomes possible as a side effect of making sure that the current
buffer content is always completely valid, by blitting from the
previous buffer, analogous to
`NativeLayerCA::HandlePartialUpdate` and
`WindowSurfaceWaylandMB::HandlePartialUpdate`.
Apart from reducing overpaint, this improves correctness is many
situations, avoiding glitches.
Note: the approach here may not be optimal concerning efficiency yet
and improvements are planed after further refactoring.
Depends on D118925
Differential Revision: https://phabricator.services.mozilla.com/D119015
Instead of using the Wayland EGL platform. The later is very convenient
but has several limitations. Managing FBOs allows to make our code more
similar to that of MacOS as well as the Wayland software backend.
Most importantly, it will allow us to cleanly implement partial damage
by giving us direct acces to previously submitted buffers, allowing us
to blit back from them, similar like in
`NativeLayerCA::HandlePartialUpdate`.
There are several other fields where more control over buffers will
come in handy, too many to describe them here in detail.
Note: we still use individual buffer pools for each tile. However, this
change brings everything into place to allow us to change to a more
`SurfacePoolCA`-style shared pool. That will reduce GPU-memory usage.
Includes some minor cleanups here and there.
Depends on D119013
Differential Revision: https://phabricator.services.mozilla.com/D118925
When the Mozilla PDF printer is selected, a new settings object was created without the value of isPrintSelectionRBEnabled computed.
Differential Revision: https://phabricator.services.mozilla.com/D119578