While much of this is simply converting code (and removing extraneous
`size` parameters), toolkit/xre/GeckoArgs.{h,cpp} has some significant
changes to support sending read-only handles (which is all we need!).
Differential Revision: https://phabricator.services.mozilla.com/D236750
This is used to replace the places where all documents are iterated using
DocGroup. In another part, DocGroups are changed to hold Window Globals rather
than Document objects, so an alternative mechanism is required to allow for all
documents to be iterated.
A linked list is used to minimize document creation overhead.
Differential Revision: https://phabricator.services.mozilla.com/D238116
While much of this is simply converting code (and removing extraneous
`size` parameters), toolkit/xre/GeckoArgs.{h,cpp} has some significant
changes to support sending read-only handles (which is all we need!).
Differential Revision: https://phabricator.services.mozilla.com/D236750
Usually, we name methods as `GetFoo()` if they may return `nullptr`, on the
other hand, we name methods as `Foo()` if they won't return `nullptr`.
`RangeBoundaryBase::Container()` may return `nullptr`. So, this name may cause
misleading of some developers. Let's rename it as `GetContainer()`.
This does not change anything for avoiding merge conflict with the other
landings.
Differential Revision: https://phabricator.services.mozilla.com/D236796
There are some callers of parent/offset version which computes offset before.
However, the offset may not be used. Therefore, the callers should use
`RangeBoundaryBase` version.
Additionally, if only one of the pairs is computed from `RangeBoundaryBase`,
such callers should use the `RangeBoundaryBase` version too because the offset
computation may be skipped. In this case, temporary `RangeBoundaryBase` should
be a `RawRangeBoundary` and whose `aRangeIsMutationObserver` should be set to
`RangeBoundaryIsMutationObserved::No` to avoid immediately to compute the child
node from `aOffset`. I think that this should be default to
`RangeBoundaryIsMutationObserved::No` in the future, but for now, we should just
make the users explicitly set it to `RangeBoundaryIsMutationObserved::No` for
avoiding regressions.
Differential Revision: https://phabricator.services.mozilla.com/D236793
All their users should use the newer one which does not have the out-param
for "disconnected" case and indicates that with `Nothing` of `Maybe`.
Differential Revision: https://phabricator.services.mozilla.com/D236792
The `RangeBoundaryBase` version of `nsContentUtils::ComparePoints_Deprecated()`
calls the parent/offset pair version of it with computing the offsets.
However, the offset is used only when the parent node is the closest common
ancestor. Therefore, the offset may be unnecessary in a lot of cases, but
we pay expensive cost to compute the unnecessary index.
This patch creates a utility class, `CommonAncestors` for computing common
ancestors and children of the closest common ancestor, and creates 3 methods
which compare a child node and offset or another (or same) child node without
computing index of the given child node if it's possible and reasonable.
So, in the advantageous situations, this makes the comparison faster. However,
the case is not so many according to the benchmark results.
Differential Revision: https://phabricator.services.mozilla.com/D236791
This is in preparation for passing more information about this kind of
mutation down for optimization purposes, see bug comments.
Differential Revision: https://phabricator.services.mozilla.com/D233545
There are probably other simplifications that can be done after this on the
windows side of things, but I tried to keep this minimal.
Differential Revision: https://phabricator.services.mozilla.com/D229765
There are probably other simplifications that can be done after this on the
windows side of things, but I tried to keep this minimal.
Differential Revision: https://phabricator.services.mozilla.com/D229765
Reuse the editor's manual NAC machinery for now, and hook it into
StyleChildrenIterator and co.
We might need to slightly tweak the setup for selector-matching, not
sure yet, but that should be fine.
Differential Revision: https://phabricator.services.mozilla.com/D228255
Reuse the editor's manual NAC machinery for now, and hook it into
StyleChildrenIterator and co.
We might need to slightly tweak the setup for selector-matching, not
sure yet, but that should be fine.
Differential Revision: https://phabricator.services.mozilla.com/D228255
Reuse the editor's manual NAC machinery for now, and hook it into
StyleChildrenIterator and co.
We might need to slightly tweak the setup for selector-matching, not
sure yet, but that should be fine.
Differential Revision: https://phabricator.services.mozilla.com/D228255
Use LayoutDevice units for most these things, since it's what they are:
ScreenIntSize(presContext->AppUnitsToDevPixels(size.width), ...
Is clearly a lie :)
Differential Revision: https://phabricator.services.mozilla.com/D228586
Those query interfaces on image load show up in profiles, eg it's about 0.05% of total time of the NewsSite test on sp3.
Differential Revision: https://phabricator.services.mozilla.com/D192726
Those query interfaces on image load show up in profiles, eg it's about 0.05% of total time of the NewsSite test on sp3.
Differential Revision: https://phabricator.services.mozilla.com/D192726