Including SymbolType.h in AtomMarking.h pulls in a ton of vm includes. This
dependency can be moved to the -inl.h which used rarely.
Differential Revision: https://phabricator.services.mozilla.com/D90103
Currently HelperThreads.h defines all the internals of the helper thread
system, but most of this is only neeed by HelperThreads.cpp itself. This patch
splits that out into a separate file so that HelperThreads.h defines an API for
the helper thread system.
Differential Revision: https://phabricator.services.mozilla.com/D90101
This is only used by ubinode and doesn't need to be in the public API. I
removed ZoneSet/CompartmentSet which are otherwise unneeded.
Differential Revision: https://phabricator.services.mozilla.com/D90100
When rejecting promises in ChromiumCDMProxy we pass an exception to MediaKeys to
represent the error that took place. However, if we do not have a any keys the
exception is not passed anywhere. Since these exceptions will assert on
destruction that they were handled we need to explicitly suppress the exception
when we don't have MediaKeys to avoid firing asserts.
The case we hit this issue in is during browser shutdown, so I think it makes
sense to ignore the exception. This is not a case of simply ignoring an
exception when it can be handled, this is that we're in a state where various
machinery is becoming unavailable and where it makes sense to not try and send
the exception any further.
Differential Revision: https://phabricator.services.mozilla.com/D90156
Including SymbolType.h in AtomMarking.h pulls in a ton of vm includes. This
dependency can be moved to the -inl.h which used rarely.
Differential Revision: https://phabricator.services.mozilla.com/D90103
Currently HelperThreads.h defines all the internals of the helper thread
system, but most of this is only neeed by HelperThreads.cpp itself. This patch
splits that out into a separate file so that HelperThreads.h defines an API for
the helper thread system.
Differential Revision: https://phabricator.services.mozilla.com/D90101
This is only used by ubinode and doesn't need to be in the public API. I
removed ZoneSet/CompartmentSet which are otherwise unneeded.
Differential Revision: https://phabricator.services.mozilla.com/D90100
Remote Settings still support search shortcuts for the time being but it's considered an obsolete feature that we don't intend to use.
Differential Revision: https://phabricator.services.mozilla.com/D90122
In ScrollFrameHelper::ScrollToImpl we suppress repainting scrollbars when calling UpdateScrollbarPosition if we've decided not to schedule a paint (because we are sending a pending scroll update instead). Otherwise we repaint which is what we are trying to avoid.
The desktop zooming scrollbars code added a call to UpdateScrollbarPosition in SetVisualViewportOffset because the vv offset is what determines the scrollbar position, no longer the layout scroll position. This means that we can trigger a repaint via that path, and there is a test that checks that we don't.
This patch moves the SetVisualViewportOffset call to just after the code that determines if we need to schedule a paint (it was just before it), and then add the AutoScrollbarRepaintSuppression class.
Differential Revision: https://phabricator.services.mozilla.com/D89902
This fixes a few causes of firing EndDownload twice:
1. firing it from OnDataAvailable if the download was already canceled when the
method was initially invoked, rather than if we are ourselves wanting to
cancel the download because we encountered issues inside OnDataAvailable.
2. firing it from FinishDownload, dispatched from SerializeNextFile, after the
download has already been ended elsewhere.
3. calling Cancel() multiple times.
It also adds some code to avoid the re-entrancy on the Promise code that the
bug was originally filed for, and a diagnostic assert to check if there are any
other cases of repeated EndDownload calling that we've missed.
As a driveby, it adds a few thread assertions to help with code clarity.
Differential Revision: https://phabricator.services.mozilla.com/D90186
By moving it to nsImageLoadingContent we don't need to pass a reference
to the current request and can just use the member.
The weird reference-passing was introduced in bug 987140 and broke in
bug 1534608.
Also make it return a CSSIntSize rather than an nsSize, since it's what
it returns, nsSize is supposed to be in app units, not in CSS pixels :-)
Differential Revision: https://phabricator.services.mozilla.com/D90036
It'll fail to join them when its utility methods actually join them.
However, it should be considered earlier timing because the preparation
DOM tree changes before joining them causes creating odd tree (see the
removed cases of the test). Therefore, we should make them stop handling
deletion before modifying the DOM tree.
Depends on D89579
Differential Revision: https://phabricator.services.mozilla.com/D89580
Gradient shaders end up calling fetch_from_gpu_cache_2 with a vectorized
address. This currently disables SWGL texelFetchPtr optimization for repeated
uses of texelFetchOffsets. In principle this optimization can still work in
vector mode. We just need to use an I32 instead of a direct pointer into the
buffer in this case. I've added a texelFetchUnchecked wrapper to automagically
disambiguate between scalar and vector cases.
Differential Revision: https://phabricator.services.mozilla.com/D90059
Right now it uses mData, which is modified from another thread from
OnDataAvailable.
Prevent the race and even simplify the code a bit by keeping the bytes
read separately.
Relaxed atomics are fine for these, they don't guard any memory.
Differential Revision: https://phabricator.services.mozilla.com/D90155
This makes `AutoInclusiveAncestorBlockElementsJoiner` stores whether `Run()`
will return "ignored" or not when `Prepare()` is called. And this patch adds
`NS_ASSERTION()` to compare the result of `Run()` and the guess.
Note that this shouldn't used for considering whether its user call or not
`Run()` actually for the risk of regressions and if we do it with current
implementation, some web apps may be broken if they do modify the DOM tree
at white-space adjustment before joining the left and right block elements.
The method will be used by `ComputeTargetRanges()` which will be implemented
by bug 1658702.
Depends on D89578
Differential Revision: https://phabricator.services.mozilla.com/D89579
When its `Run()` join the block elements, even if it won't move any content
nodes in first line, it may notify the callers as "handled" when there is a
preceding invisible `<br>` element since it needs to delete it in any cases.
Therefore, whether there is or not a preceding invisible `<br>` element is
important to compute target ranges since if there is one, `Run()` won't return
"ignored" and the callers won't delete leaf content instead.
Note that the new assertions are not hit in any tests, but due to searching
preceding invisible `<br>` element in `Prepare()`, expected assertion
count of 2 tests is increased.
Depends on D89577
Differential Revision: https://phabricator.services.mozilla.com/D89578
The relation is important when the class handles both joining them and computing
target ranges. Additionally, it's required to consider whether it can join the
block elements. So, it should store the relation when `Prepare()` is called.
Depends on D89576
Differential Revision: https://phabricator.services.mozilla.com/D89577
Unfortunately, `HTMLEditor::MoveOneHardLineContents()`,
`HTMLEditor::MoveChildrenWithTransaction()` and
`HTMLEditor::MoveNodeOrChildrenWithTransaction()` return strict result whether
at least one node is moved or not. Therefore, we need to scan the DOM tree
whether there is at least one content node which can be moved by them for
computing target ranges.
We cannot do same thing for ``HTMLEditor::MoveOneHardLineContents()` because
it split parent elements first and use `ContentSubtreeIterator` which lists
up topmost nodes which are completely in the range, but we need to compute
target ranges without splitting nodes at the range boundaries. Therefore,
this patch checks whether the line containing specified point has content
except invisible `<br>` element.
The others are simple. We can use same logic with them.
Finally, this adds `NS_ASSERTION()`s to check whether the computation is done
correctly at running any automated tests on debug build, and I don't see any
failure with them.
Depends on D89575
Differential Revision: https://phabricator.services.mozilla.com/D89576
When they return error, neither "handled" nor "canceled" state is referred.
So, for making the code simpler, we can make them return
`EditActionResult(NS_ERROR_*)` instead of `EditActionIgnored(NS_ERROR_*)`.
Depends on D89574
Differential Revision: https://phabricator.services.mozilla.com/D89575
The 2 of them always mark the edit action as "handled", but it's not important
when it's "canceled" or an error. Therefore, we can make the users simpler
as this patch does.
Depends on D89573
Differential Revision: https://phabricator.services.mozilla.com/D89574