nsIEditor::EnableUndo() and nsITransactionManager::Clear(),
nsITransactionManager::SetMaxTransactionCount() are called a lot but they are
virtual and some of or all of them are called once. There should be each
non-virtual method to do what each root caller wants. Therefore, this patch
adds EditorBase::EnableUndoRedo(), EditorBase::DisableUndoRedo(),
EditorBase::ClearUndoRedo(), TransactionManager::EnableUndoRedo(),
TransactionManager::DisableUndoRedo() and TransactionManager::ClearUndoRedo().
Note that this patch makes TransactionManager won't clear mUndoStack nor
mRedoStack if mDoStack is not empty. This is checked only by
TransactionManager::SetMaxTransactionCount() but according to the comment,
TransactionManager::Clear(), TransactionManager::UndoStack() and
TransactionManager::RedoStack() should check it too.
MozReview-Commit-ID: 6qBZOQNwdhw
--HG--
extra : rebase_source : 3249137f7acca0b4698713ab732774140bcc27e8
Now, both TransactionManager.h and TransactionStack.h are exposed. So,
TransactionManager::GetNumberOfUndoItems() and
TransactionManager::GetNumberOfRedoItems() can be rewritten with non-virtual
inline methods because they just return mUndoStack.GetSize() and
mRedoStack.GetSize(). Then, we can implement EditorBase::NumbeOfUndoItems(),
EditorBase::NumberOfRedoItems(), EditorBase::CanUndo() and
EditorBase::CanRedo() as inline methods.
MozReview-Commit-ID: 3CJd0VrlvFY
--HG--
extra : rebase_source : 6848d80a395f1c161e10bfb50d15bd63de288095
Then, all classes in editor/txmgr is now in mozilla namespace and all
headers which are included by other directory are now exposed. So,
we can remote local includes from other directories now.
MozReview-Commit-ID: Kdb1c4Hp9Sy
--HG--
rename : editor/txmgr/nsTransactionStack.cpp => editor/txmgr/TransactionStack.cpp
rename : editor/txmgr/nsTransactionStack.h => editor/txmgr/TransactionStack.h
extra : rebase_source : 75035e9e618680af9188820595ab050b612a456f
The current code is a bit of a mess. This patch does the following.
- Changes the processing from backwards to forwards. This avoids the need for
all the `found` booleans, because if a flag is present multiple times, the
last one will naturally override.
- Tightens up the checking. It now doesn't use assertions, but instead returns
false if any of the options are missing arguments, or have malformed
arguments, or any of the mandatory flags are missing. (It assumes that
-appdir and -profile are optional.)
- Renames the loop variable `idx` as `i`.
- Changes `!strcmp(...)` to `strcmp(...) == 0`, because I find that clearer.
- Avoids a redundant nsCString when handling -appdir.
The patch also tweaks GeckoChildProcessHost::mGroupId, which was buggy. It
holds the appModelUserId argument, which XRE_InitChildProcess() always expects
is present in the command. But it's only set to a non-empty value in
InitWindowsGroupID(), which is only called for plugin processes. So in lots of
cases the appModelUserId argument was missing, and a different argument would
be interpreted as the appModelUserId argument (seemingly without noticeable ill
effect).
The patch changes things to mGroupId defaults to "-", which means it's always
present in the command.
Note: all this explains why the old code for ContentProcess::Init() started
processing from argument aArgc, instead of aArgc-1 as you might expect -- it
had to read one extra arg in order to see the argument following -appdir,
because XRE_InitChildProcess() was decrementing aArgc for the appModelUserId
argument even when that argument wasn't present. The new code for
ContentProcess::Init() doesn't have to read past aArgc-1 because the mGroupId
fix ensures the appModelUserId argument is always present.
MozReview-Commit-ID: 8a8k6ABYMgo
--HG--
extra : rebase_source : 70695125ee26e67af3337119f4dfc293a0dab74c
Apple layout standard has a 1:1 equivalence with the WAVE standard. As such, any streams under 18 channels, properly defining a channel layout, should play on all platform.
Otherwise, as Opus and Vorbis, the result will be platform dependent.
MozReview-Commit-ID: ID6b9u2UNQr
Under 8 channels, the audio will be reordered so it can be playable on any platforms.
Over 8 channels, the channels will be as output by the decoder. Playing of such stream will be platform dependent as neither Opus nor Vorbis define a channel layout with more than 8 channels.
With WebAudio however, the result will be platform independent (as long as you don't attempt to play it)
MozReview-Commit-ID: 93ATiKm9y20
This will allow to create an AudioConfig with an unknown or unsupported channel layout, defaulting instead to the number of channels.
MozReview-Commit-ID: IonLuo9q2a5
If a channel layout is unsupported, the AudioConverter will instead just use the channel count information to leave the data as-is, only trimming extra channels, or inserting silence if needed.
MozReview-Commit-ID: CXOjcSRsRwI
Instead we place it at 32.
Future changes will change the meaning of this limit to when we can deal with channel layout. If outside that limit the audio will be played on a best attempt basis.
MozReview-Commit-ID: EavmmcxjLI0
Channel layout is derived by the content being played. The concept of preferred layout is meaningless. Either we have a layout defined, or we don't. There's no in-between.
So we remove it.
MozReview-Commit-ID: CSCAInNmzMS
That ChannelLayout uses an AutoTArray internally makes XPCOM report them as leaking when declared as static.
They weren't use outside of ChannelLayout anyway so they can be removed.
MozReview-Commit-ID: KVqdjzvL8pr
It makes no sense to have a case for those as the data structure used (a bitmask) do not allow to represent this channel layout (a channel can only be present once). As such it was a non-functional layout
MozReview-Commit-ID: FjA0fojFcJp
This makes it for future easier conversion for the FFmpeg and Windows WMF decoder, so that we can use their channel map directly.
Also introduce a difference between 2F2 and QUAD, cubeb supports will be added in a future change.
MozReview-Commit-ID: L5NkjeuGslI
getAtomName() is only used in one place -- FunctionCall::toString() -- where
the returned atom is appended to a string. This patch changes it to
appendName(), which does the appending itself. This avoids a bunch of manual
atom refcounting and the possibility of failure.
MozReview-Commit-ID: I75rO1Bv6Y8
--HG--
extra : rebase_source : ef78377db12b2e89c582e32836d3abd460bde7d0
Our Client.id values were being normalized from "{uuid}" to "uuid", but not
our FetchEvent.clientId values. Because nsID::Parse accepts both forms,
this was not being caught by any tests.
Although there are ServiceWorker WPT tests that verify consistency of
returned Client.id values across multiple matchAll invocations (ex:
client-id.https.html), there are no tests that compare Client.id with
FetchEvent.clientId. All the tests largely use Clients.get() to verify
correctness/round-tripping. I looked into adding WPT tests, but we
quickly run into the test logistics problem where it's preferable to
avoid adding tests that involve effectively global state.
So, this patch:
- Changes Clients::Get() to explicitly treat client id's that start with a
"{" as invalid. This causes existing FetchEvent.clientId-related WPT
tests to fail, as we would hope.
- Duplicates the client id normalization logic that strips {} for the
FetchEvent.clientId to its point of origin in
ContinueDispatchFetchEventRunnable::Run.
- Augments our dom/serviceworkers/test/test_match_all_client_properties.html
test, which has been enforcing {}-less UUIDs for a while, to also test
FetchEvent.clientId to verify it conforms. I added some comments to the
test files too.
--HG--
extra : rebase_source : dd6d07ea880eb2c3115d8810ea246b4469ad5f96
When dragging an image, add the image request's MIME type to the transfer
so that the MIME-extension check can be done in the parent process.
Move the MIME-extension check to the parent process to avoid
issues caused by content process sandboxing.
MozReview-Commit-ID: 3cb4fCr6GnL
--HG--
extra : rebase_source : ec49b8c83613be844fe4cd88a5024ac41a845199
Currently static atoms are stored on the heap, but their char buffers are
stored in read-only static memory.
This patch changes the representation of nsStaticAtom (thus making it a
non-trivial subclass of nsAtom). Instead of a pointer to the string, it now has
an mStringOffset field which is a 32-bit offset to the string. (This requires
placement of the string and the atom within the same object so that the offset
is known to be small. The docs and macros in nsStaticAtom.h handle that.)
Static and dynamic atoms now store their chars in different ways: nsStaticAtom
stores them inline, nsDynamicAtom has a pointer to separate storage. So
`mString` and GetStringBuffer() move from nsAtom to nsDynamicAtom.
The change to static atoms means they can be made constexpr and stored in
read-only memory instead of on the heap. On 64-bit this reduces the per-process
overhead by 16 bytes; on 32-bit the saving is 12 bytes. (Further reductions
will be possible in follow-up patches.)
The increased use of constexpr required multiple workarounds for MSVC.
- Multiple uses of MOZ_{PUSH,POP}_DISABLE_INTEGRAL_CONSTANT_OVERFLOW_WARNING to
disable warnings about (well-defined!) overflow of unsigned integer
arithmetic.
- The use of -Zc:externConstexpr on all files defining static atoms, to make
MSVC follow the C++ standard(!) and let constexpr variables have external
linkage.
- The use of -constexpr:steps300000 to increase the number of operations
allowed in a constexpr value, in order to handle gGkAtoms, which requires
hashing ~2,500 atom strings.
The patch also changes how HTML5 atoms are handled. They are now treated as
dynamic atoms, i.e. we have "dynamic normal" atoms and "dynamic HTML5 atoms",
and "dynamic atoms" covers both cases, and both are represented via
nsDynamicAtom. The main difference between the two kinds is that dynamic HTML5
atoms still aren't allowed to be used in various operations, most notably
AddRef()/Release(). All this also required moving nsDynamicAtom into the header
file.
There is a slight performance cost to all these changes: now that nsStaticAtom
and nsDynamicAtom store their chars in different ways, a conditional branch is
required in the following functions: Equals(), GetUTF16String(),
WeakAtom::as_slice().
Finally, in about:memory the "explicit/atoms/static/atom-objects" value is no
longer needed, because that memory is static instead of heap-allocated.
MozReview-Commit-ID: 4AxPv05ngZy
nsStyleStructList.h was initially made generated in bug 873368 to avoid
manually maintaining boilerplate for if-dispatch, while the if-dispatch
was replaced by jump table in bug 1171842, so the boilerplate went away.
However, in bug 1122781 (before bug 1171842), boilerplate for dependency
check, so it still needs to be generated.
The dependency table is removed in the previous patch, so we no longer
have any boilerplate in the style struct list, and thus it doesn't need
to be generated anymore.
MozReview-Commit-ID: GkbJZ98ojbE
--HG--
extra : rebase_source : a148b97c051bb6c88846cf6ba617c4edef70ca24
extra : source : f1c7d19cde195fb90ac2627d16ed69d020de01b9
The aSamePointerStructs argument is unused now.
Also, aIgnoreVariables can be true everywhere now, since variable changes can't
generate change hints, and anonymous boxes and such don't care about whether
they really changed or not.
Only one caller cares about struct equality, and that already compares variables
manually as an optimization on the rust side.
We had this optimization inconsistently in some cases but not others.
MozReview-Commit-ID: F2EISKlxR3K
The patch for bug 1387427 made us keep the source content in an array and we don't insert
it into the document anymore. The code for xslt-param and xslt-param-namespace should look
in the source content array instead of the document.
--HG--
extra : rebase_source : bbf4c6ab66357b3d7fe3f91fefc040d0a19578f5
Disable time jittering when comparing different AudioContexts because they might look
different.
MozReview-Commit-ID: A3neLqokQ5c
--HG--
extra : rebase_source : b275942db06d3bb8e80bdb6ed5f94299636d1a8f
We want to create the source fragment before trying to use it in URIUtils::ResetWithSource.
The testcase triggers an assertion related to unbalanced onload blocking/unblocking,
fixing that by blocking onload on the new document we're setting in OnTransformDone and
unblocking onload on the old document.
--HG--
extra : rebase_source : 8bbdb9ce6a38dc6b76d13dfb2c3c7d67f78ecefe
The new struct is in LayersTypes.h, all the rest of the changes are just
replacing existing uint64_t instances with the new LayersId struct.
Note that there is one functional change, in
CompositorBridgeParent::DeallocPWebRenderBridgeParent, where we now
correctly convert the PipelineId to a LayersId before using it to index
into sIndirectLayerTrees, whereas before we were incorrectly just using
the mHandle part of the PipelineId.
MozReview-Commit-ID: GFHZSZiwMrP
--HG--
extra : rebase_source : d2b274f63aaee2ee9bba030297e0a37a19af0d6c
updateLayerTree() is called from the callback of MozAfterPaint in
reftest-content.js all the time except when we specify reftest-no-sync-layers
or reftest-no-flush. If there is a throttled animation,
FlushPendingNotifications flushes the animation, thus it will fire another
MozAfterPaint event. It means we will end up waiting for the throttled
animation to finish. This reiteration MozAfterPaint events can be easily
observed in WebRender since WebRender fires MozAfterPaint event without
checking invalidation change. Whereas current Gecko fires MozAfterPaint only
if invalidation change happens and reftests for such throttled animations
specify the same value for 'from' and 'to' value, so it hasn't been a problem
there.
The FlushPendingNotifications in updateLayerTree() was introduced in bug
1083635 <https://hg.mozilla.org/mozilla-central/rev/5bebfbefb3c2> to
sync-decode images so it shouldn't matter if there are still throttled
animations.
MozReview-Commit-ID: B9KgNCX0kWq
--HG--
extra : rebase_source : 7e40a94b7ead05c708f21fb4bc897d50becd74dc
We can get button indexes in HID usage reports that do not actually
correspond to a button we store, meaning we can overstep bounds of the
button array. Check validity before accessing array.
MozReview-Commit-ID: AAQJLEgy2Ua
--HG--
extra : rebase_source : d665f7713612b76f7b36ca3d2ace1e6659bb5099
With bug 1444489, there is no longer a need to load the full xul.css into HTML
documents. This patch remove that ability and keep it as an assertion.
MozReview-Commit-ID: ChBdRts6PFX
--HG--
extra : rebase_source : b6b35af4c66d8a097f8b4787305bba2e948de554
For now we preserve the current code structure and function signatures to make
review simpler. That's about to get cleaned up.
MozReview-Commit-ID: 4epLHQiEwDV
test_bug609794.html was testing a behavior that the method before the current
method of attaching InstallTrigger to windows depended on. We don't really
need that behavior, which is good, because this change is not producing it.
MozReview-Commit-ID: GPzif89UYYl
The only caller of nsDOMConstructor::nsDOMConstructor is
nsDOMConstructor::Create which has no callers.
Also removes the now-unused nsDOMConstructorSH class.
MozReview-Commit-ID: GgOO8ugXFKb
We only have classinfo left for DOMConstructor and DOMPrototype, both of which
use nsDOMConstructorSH, which overrides PostCreatePrototype.
To avoid -Werror build failures, this changeset also removes static functions
that were only reachable from PostCreatePrototype.
MozReview-Commit-ID: JpJOuMHAAuo
We don't resolve it normally, because nsDOMConstructorSH overrides
PostCreatePrototype to be a no-op, so nsWindowSH::GlobalResolve never actually
defines the relevant property on the window. We also hide it in
nsWindowSH::NameStructEnabled. But in the Xray-to-window case we attempt to
define it. We shouldn't do that.
MozReview-Commit-ID: 3tnMnSQuvuT
The only caller is nsDOMClassInfo::RegisterClassProtos. The only caller of
that is nsDOMClassInfo::Init. In nsDOMClassInfo::Init this is called after we
have done the RegisterClassName call for "DOMConstructor".
Since the only bits of classinfo left are DOMConstructor and DOMPrototype, and
both use nsIDOMDOMConstructor as their interface, we call RegisterClassProto
with "DOMConstructor" as aClassName, find the existing nsGlobalNameStruct, and
return without doing anything. So this entire codepath can be removed.
MozReview-Commit-ID: JfXmIex7tLC
nsFrameLoader is on WebIDL bindings, so those QIs are no-ops anyway, unless the given object is no a frameloader to start with.
MozReview-Commit-ID: IPiW70H5NPc
The change from "docShell" to "mDocShell" for the SetName call in the
OwnerIsMozBrowserFrame case in nsFrameLoader::MaybeCreateDocShell is a
drive-by correctness fix for a bug the rename of "docShell" to "parentDocShell"
caught: setting the name of our _parent_ docshell based on the name attr of our
owner makes no sense.
MozReview-Commit-ID: DwnWt8jTokV
* blobImpl references are now only kept in nsHostObjectProtocolHandler
* removes nsHostObjectProtocolHandler.idl
* Makes nsHostObjectURI no longer inherit from nsSupportsWeakReference
MozReview-Commit-ID: AC1klrfsMnn
--HG--
extra : rebase_source : 142802f9a6fa6aae5611dccf117d88f96a9985a6
Non-restartless extensions are no longer supported in the wild, and none of
the remaining automation extension rely on Workers in their components.
MozReview-Commit-ID: bh3nwwfM1g
--HG--
extra : rebase_source : db16e8bfdc8148310675b1c8641f4321b2a89702
extra : source : d6bda91c66d6625fb98c427ad62b337696df5acf
Adds the IPDL layer to asynchronously retrieve in the parent process the performance counters.
MozReview-Commit-ID: RbKstNx8pi
--HG--
extra : rebase_source : f81058b9bdd67c2f77bb5cd45d3838bc12f406ea
Change AudioCallbackDriver::Init() to fallback to a system clock driver if a
cubeb context can not be obtained. This should make driver init more robust in
cases where cubeb init fails and then CubebUtils::GetCubebContext() returns no
context.
MozReview-Commit-ID: IlFPytYacoI
--HG--
extra : rebase_source : 7445ceb49583ee3ae399252e995ce6f012d9da2f
Add logging was added to help diagnose gUM failures and provide more log
coverage of that code path.
MozReview-Commit-ID: A76fjlUVpmn
--HG--
extra : rebase_source : 6f67ab223739474c8dec7a72a1ff322503c4df96
Adds the IPDL layer to asynchronously retrieve in the parent process the performance counters.
MozReview-Commit-ID: RbKstNx8pi
--HG--
extra : rebase_source : d7c00f2ef16623dbbd88ede0f6636ca56501e151
Bug 1408695 introduced a workaround in HTMLTrackElement for a bug in VS2017 <
15.6. Bug 1424281 bumps our minimum support versions so the workaround can be
removed.
MozReview-Commit-ID: 9aZb9ODPIlh
--HG--
extra : rebase_source : df4aac786e8db039e4ecd9912c453a74e1065876
Internal users of indexedDB were using the storage: "persistent" option to
avoid losing their data due to quota management. We would like to remove
that proprietary option and are adding a way for internal origins to be
considered persistent storage by default. This should also prevent
previous users from losing their data.
MozReview-Commit-ID: 4cbfbAlHokM
--HG--
extra : rebase_source : 0f8e4f8716a2e302e10c3ede81ceb2216706dfc7