HTMLInputElement::IsValueEmpty uses DocumentEncoder when input element has focus. DocumentEncoder is slow, so we should use fast path (nsTextEditorState::HasNonEmptyValue) to check whether value is empty.
MozReview-Commit-ID: 1JxAeZ6z5A4
--HG--
extra : rebase_source : 8cf89721bf59f0bde09e217428bb593ad6d328de
When we send out a prefetch request, we act as if the load came
from one of the possibly many documents containing <link> element
for the given URL. The docgroup assigned to this request is
derived from this document. Later, when the load finishes, the
OnStopRequest code runs in a runnable labeled with this
docgroup. OnStopRequest dispatches a load event to *all* the link
elements, including some that might be in different docgroups
from the OnStopRequest runnable. This generates an assertion.
To fix this, I decided to dispatch the load events
asynchronously. I'm hoping the extra round trip through the event
loop shouldn't hurt us too much since I doubt anyone actually
listens for these events.
MozReview-Commit-ID: FTkjuHO7RFp
When we send out a prefetch request, we act as if the load came
from one of the possibly many documents containing <link> element
for the given URL. The docgroup assigned to this request is
derived from this document. Later, when the load finishes, the
OnStopRequest code runs in a runnable labeled with this
docgroup. OnStopRequest dispatches a load event to *all* the link
elements, including some that might be in different docgroups
from the OnStopRequest runnable. This generates an assertion.
To fix this, I decided to dispatch the load events
asynchronously. I'm hoping the extra round trip through the event
loop shouldn't hurt us too much since I doubt anyone actually
listens for these events.
MozReview-Commit-ID: FTkjuHO7RFp
We no longer support decoding non-EME audio via GMPs, so it's not possible
for a GMP to be used for decoding content that passes through a WebAudio
BufferDecoder. So we don't need to keep the GMPCrashHelper around in the
WebAudio code. If EME content is being used, there will be a crash helper on
the MediaKeys object anyway.
MozReview-Commit-ID: BThxnTANSTD
--HG--
extra : rebase_source : 2c2ce4e982dcef6e3985c426386974083505c953
We should only render the Subtitles/Captions cue on the screen. In addition, rename the activeCues to showingCues.
Because the meaning of "active" and "showing" are different. Showing means we can see the cue on the screen, active means the current playback time touches the cue.
MozReview-Commit-ID: 1BfHhxFXBDP
--HG--
extra : rebase_source : 2c4d6b0b052758f1bb01a7794365bf75b556304c
This event is no longer necessary, since checking nsITabParent.hasPresented is enough to know
if we need to blank out the tab or not.
MozReview-Commit-ID: 445XMqhorxC
--HG--
extra : rebase_source : 1a05de827502c409d979a621471978b08ce39fb2
The U2F Soft Token, due to its usage of NSS, has to have const values be
marked non-const - but no such limitation should exist for other implementations
of U2F, so this patch moves the const_cast-ing from the U2FTokenManager-level
down to the U2FSoftTokenManager, where it is actually necessary.
Credit to Axel Nennker for this patch.
MozReview-Commit-ID: Kw6zfTDI3GL
--HG--
extra : rebase_source : 90e31e2da9e021043509653a476ddaae03078e55
Changed the type of argument |targetFilter| of NukeCrossCompartmentWrappers()
from CompartmentFilter to JSCompartment* because it is always a single target
compartment, and we can optimize the iteration not to iterate the outer map.
MozReview-Commit-ID: 7cDCgJI0H9z
--HG--
extra : rebase_source : 4973dfd4c3326bf48b78088979962e425e35030c
This will enable us to pre-allocate the correct number of shared memory buffers
that we pre-allocate for sending video frames between the CDM and Gecko. That
means we won't need to take the slow path to recover from underestimating how
many shmems we need.
MozReview-Commit-ID: Q4mX2rYMz3
--HG--
extra : rebase_source : f9573cfbf4e65013803b46c0909be2c68566e512
If the Fetch request is created by a tracking script, we want to lower the priority of the http channel.
--HG--
extra : rebase_source : fc258770a2f58a503777dec8a05fd2aeab2ff889
With nsIDocument::IsScriptTracking, we know that whether a script is a tracking script. If the XHR is created by a tracking script, we want to lower the priority of the http channel.
--HG--
extra : rebase_source : 7c9d2a545968a50c8ec34a3395132f0d99087058
Also, update an outdated comment that was leftover.
MozReview-Commit-ID: CC865rj3o3S
--HG--
extra : rebase_source : 094ed5c23a55f8f00f7aeb18856c539caa80ff86
We have already waitForIdle() in testcommon.js.
MozReview-Commit-ID: 64XTU2g8CO7
--HG--
extra : rebase_source : 028e6827f4d67b789b979673ceb5a8bef501dbf7
requestIdleCallback has been enable by default in bug 1314959.
MozReview-Commit-ID: 7rwqdsCdjNb
--HG--
extra : rebase_source : cb60996accfe733714c9b5dff983c2210c4fa98b
Changes:
- remove code addressed by reviewer
- remove PContent.ipdl, PBrowser.ipdl, and ProcessPriorityManager code
that relates only to removed AudioChannelService methods
- correct test case listening to event from removed code
- remove useless test case files
MozReview-Commit-ID: I96nR8zTXJt
--HG--
extra : rebase_source : 127876c672744811c025ca55839ff2e8a06b1fce
The switch from duration to time stamp based samples has removed the need for
this logic.
MozReview-Commit-ID: 7J6oQf7qn4u
--HG--
extra : rebase_source : 5ab566c03c4af0ab1067e814fdd51fa8879e95f1
Removing support for this preference means that mReuseLoaderGlobal
will always be false, which lets us eliminate that field, and remove a
lot of code.
This also means that false is always passed to
PrepareObjectForLocation for aReuseLoaderGlobal.
ReadCachedFunction is no longer used, so it is deleted.
MozReview-Commit-ID: 5JD24EYVcQf
--HG--
extra : rebase_source : 3b23b4b8d2b1a2f6a53223477afb4cb13b8a671c
The <content> in an XBL document could be injected into documents with
different style backend types. Therefore, we need to set the XBL document's
style backend to the same as the bound document's so that the style
attribute of the content can be processed by the correct backend. <marquee>
elements in xbl-marquee.xml is one such example.
MozReview-Commit-ID: 7M33zlbZqNF
--HG--
extra : rebase_source : 363fd7c2bc91e959fbcfb288bdc1b65cfd1bba97
We assume those XBL documents without a bound document use gecko style
backend. Their backend type will be explicitly set when loading in Part 6.
MozReview-Commit-ID: 5c5xtYFvgAD
--HG--
extra : rebase_source : 578b50953d98ffa5280dac3440979e2aba7519cb
In the next part, mXBLDocTable will be split into mGeckoXBLDocTable and
mServoXBLDocTable, and a helper function XBLDocTableFor will be added. Hence
this rename to avoid confusion.
MozReview-Commit-ID: CPCd67wKgb1
--HG--
extra : rebase_source : 08dd5c38fd3efab152a0be9e44c4d6536824d67a
SupportsServoStyleBackend() uses methods in nsIDocument, so it would be more
straightforward to do that in UpdateStyleBackendType().
Also, call StyloEnabled() before doing other logic so that the warning about
"no docshell" won't show up when stylo is built but disabled.
MozReview-Commit-ID: 9ZUYatPBv1r
--HG--
extra : rebase_source : ea130cdf2ef0b49d73bd688aeca1fc227431441c
In this way, the callers who have nsIDocument don't need to cast to nsDocument.
MozReview-Commit-ID: 8zVUjkbrlaG
--HG--
extra : rebase_source : c444a103a430e3746508cc894902e677d58e65fe
IGNORE BAD COMMIT MESSAGES because something landed and was backed out for no bug number
--HG--
extra : amend_source : 1134c379d1134fe160fd2d889488d07acd9f4177
This makes UpdateLayerTree synchronous enough to ensure that the layer
transaction from the child reaches the compositor. Given the comment in
http://searchfox.org/mozilla-central/rev/484d2b7f51b7aed035147bbb4a565061659d9278/dom/interfaces/base/nsIDOMWindowUtils.idl#106
this seems to be the original intent of this function anyways. Without this, we
can have a race between the child talking to the compositor and the child
talking to the parent talking to the compositor.
This also changes GetCompositorBridgeChild to work even when the widget doesn't
have a CompositorBridge
This makes UpdateLayerTree synchronous enough to ensure that the layer
transaction from the child reaches the compositor. Given the comment in
http://searchfox.org/mozilla-central/rev/484d2b7f51b7aed035147bbb4a565061659d9278/dom/interfaces/base/nsIDOMWindowUtils.idl#106
this seems to be the original intent of this function anyways. Without this, we
can have a race between the child talking to the compositor and the child
talking to the parent talking to the compositor.
This also changes GetCompositorBridgeChild to work even when the widget doesn't
have a CompositorBridge
FRAME_STATE_BIT of nsFrame and nsINode::mBoolFlags are both full, we need to
find another place to hold MAY_HAVE_OPACITY information.
nsINode::mSlots might be a choice, but since we always use this information in
painting, memory footprint of nsINode will become larger after this change.
So I decide to put this information right in EffectSet. The drawback of storing
this information in EffectSet is, although unnecessary Effect look-up is
prevented, we still need EffectSet property look-up in each time
HasOpacityInternal call, so we need Part 2.
Conceptually, Part 1 and Part 2 are independent.
MozReview-Commit-ID: 6sfBFSHjxQb
--HG--
extra : rebase_source : 394141cec3b44bb352297a0add8f9763d815bddb
The format member isn't set when an audio frame hasn't been decoded yet.
MozReview-Commit-ID: IgUj6bjVzdF
--HG--
extra : rebase_source : bb47fa523384f9a85ee7d0ed5b6de4fe2c73526a
Should any error occurred while checking the tracks, we could end up with a null pointer stored in the list of track demuxers.
MozReview-Commit-ID: 13FllESrpbg
--HG--
extra : rebase_source : 335de6320c12f758858e462ed22fc9f9ffe8e305
Also added a extra flag NO_RESELECT, to avoid selecting the same option (with
default value false) again after setting it to its default value, and later no
way of deselecting it because it's dirtiness is set to false already.
MozReview-Commit-ID: L35sBMWwi3m
The only difference between proxies and non-proxies is that proxies only support
up to MAX_FIXED_SLOTS slots all told (reserved plus private slot). SpiderMonkey
already has static asserts to make sure we don't ask for too many reserved slots
on a proxy.
Remove the unconditional return from FindAnimationsForCompositor(), so
we can check if there is any property running on compositor.
Also, enable a reftest and fix the mochitest expectation:
1. The expectation numbers of test_animations_omta.html in e10s and non-e10s
are different, so skip non-e10s.
2. We pass all tests in test_animations_omta_start.html with e10s;
however, got 3 test failures with non-e10s, so skip this file with
non-e10s.
MozReview-Commit-ID: IuOyAsUYguU
--HG--
extra : rebase_source : 8f8549063f2d1907e95d0bab450e1b6f851f8c84
We need to request an animation-only restyle to force flush all throttled
animations on main thread when we handle an event with coordinates
(e.g. mouse event).
MozReview-Commit-ID: KkjeQVsLgTl
--HG--
extra : rebase_source : 314408062e719e9f52df9a6726e2f3dad817bbef
We need to retrieve the correct base style for Servo backend, so change
the return value to AnimationValue and update
KeyframeEffectReadOnly::BaseStyle().
MozReview-Commit-ID: 9FL3h1DLoJt
--HG--
extra : rebase_source : 42284c5fe8b8135910cde44b0815eb475ca2f1cc
If video gets error after loaded metadata, its duration should still be available.
MozReview-Commit-ID: GvwqX28I04o
--HG--
extra : rebase_source : fe0d41a5a031bc020fd7de200c1de4f59f443485
The spec says that we don't need to change the ready state when getting the error.
If the ready state is "HAVE_METADATA", it means we could get the video's duration
at that time.
However, if we shutdown decoder too early, we won't get the correct duration.
In addition, since we remove old decoder prior to create new one in the function
HTMLMediaElement::SetDecoder(), we can remove the decoder checking assertion
in HTMLMediaElement::InitializeDecoderForChannel().
MozReview-Commit-ID: CHRJHng8Xm0
--HG--
extra : rebase_source : 32b2114f5b4bce2d777826295959a6ce0701984d
Since MozPromise supports move-only types, we don't need to make MetadataHolder a ref-counted type.
MozReview-Commit-ID: E7KJuFQNWxe
--HG--
extra : rebase_source : d303c4d119504a289fe60cf5cdd2793ebf58d643
Technically speaking, we use the new async API 'nsIURIClassifier.asyncClassifyLocalWithTables'
to replace the old sync API. However, since we cannot guarantee the async call will be done when
we neet its result, we need a sync call as a fallback in this case. This is a sub-optimal
solution and we will be investigating if there's a better solution if the sync call
is used too frequently.
MozReview-Commit-ID: L1uQ2eaYr1e
--HG--
extra : rebase_source : 148e0e85796c932ea85d123092f479e1373ecec9
extra : intermediate-source : 53007a31b576fcd4f16ad6523cccd0a9b90c66f0
extra : source : 1175b9c64b31da2ca2ab88f78488aed6fdc405bc
The changes here:
1. Make it easier to discover where nsIPKCS11 is implemented / make it easier to
discover what the file implements.
2. Reduce global scope pollution.
3. Make nsCrypto.h no longer unnecessarily exported.
4. Remove NS_CRYPTO_CONTRACTID from nsDOMCID.h, since the define isn't used
anywhere.
5. Move the definition of NS_PKCS11_CONTRACTID from nsDOMCID.h into PSM code,
since this contract ID is firmly in PSM territory now.
MozReview-Commit-ID: 2PdFM0mlL4R
--HG--
rename : security/manager/ssl/nsCrypto.cpp => security/manager/ssl/PKCS11.cpp
rename : security/manager/ssl/nsCrypto.h => security/manager/ssl/PKCS11.h
extra : rebase_source : 46667edef5a1d8c910d96dec1125c05bc3477bee
In order to facilitate the movement of code with side-effects called by Element::SetAttr to Element::BeforeSetAttr and Element::AfterSetAttr, Element::AfterSetAttr should have access to the old value of the attribute. This includes information about whether there was previously a value set or not.
Accomplishing this involved passing an additional argument through functions that find and change the old attribute value in order to ensure that we can differentiate between an empty old value and an absent old value (attribute was not set).
Note that while I tried to ensure that accurate values (and their absence) are reported to Element::AfterSetAttr, I largely ignored SVG. While the old value reported for SVG values should be however accurate the value already being reported to SetAttrAndNotify was, SVG elements do not currently report unset values properly because they will never pass a null pointer to SetAttrAndNotify.
MozReview-Commit-ID: K1mha8CNFZP
--HG--
extra : rebase_source : 42776eb01451d371e4aebcc17fe3dd112c8d268b
Step 10 of EME's "Get Supported Capabilities for Audio/Video Type" algorithm
says we can assume default codecs only if a container normatively implies a
specific set of codec and codec constraints. Our code assumes that WebM implies
Vorbis/VP8 and MP4 implies AAC/H.264, but those aren't actually normatively
required by either of these containers' specifications. So we shouldn't assume
these containers imply those codecs.
MozReview-Commit-ID: G9TDOmrjhpp
--HG--
extra : rebase_source : 2f040d76c8cb240359401fe1dc1e3eefa029d77b
While inside FileBlock::Read, the mIsReading flag is set, which in turn
prevents starting the writer task, or makes it exit as soon as possible.
This should help multi-block reads (while data is being received) by giving
them priority, so that that blocking call can return faster.
At the end of Read, the writer task is re-dispatched if needed.
MozReview-Commit-ID: J32tHGFRMNU
--HG--
extra : rebase_source : 8eb3e869888cb1f593d3561191bc6b8c5a53f1bd
Since both FileBlockCache Monitor's are only used as locks, we should just use
simple Mutex'es (smaller, faster, and tighter API).
MozReview-Commit-ID: DdNNPN1kFrs
--HG--
extra : rebase_source : 5216929b182d08544b3077374955dfb4ac5b7b16
All DOMProxyHandler::ClearExternalRefsForWrapperRelease now does is clear a backpointer to the expando, and that's handled during reflector finalization already.
Closing the temporary file was done in the FileBlockCache destructor, which is
called on the main thread.
Instead, we are now dispatching a new final task from Close, which will close
the temporary file and then shutdown the thread.
The thread and FD ownerships are transferred to that final task, so that no
more tasks may be unexpectly queued to that thread, and both members can
immediately be reused after Close() returns.
MozReview-Commit-ID: L9djYGhDFn4
--HG--
extra : rebase_source : bedad374454ec94966d10552b8aea26c8997fbb9
In a parent process, the temporary file was created and opened by calling
NS_OpenAnonymousTemporaryFile() from Init, which was called from the main
thread.
In addition to being called at least once when the first media file is fetched,
it may also be called if caches need to be emptied.
So it should help to move this operation on the FileBlockCache thread, if only
to remove potential background-hang reports from non-e10s configurations.
MozReview-Commit-ID: CjPsHEsL3Ch
--HG--
extra : rebase_source : beaa2793dea82d853669d87c9434139d88562da9
SetCacheFile, Init, Close, and MoveBlock all had NS_IsMainThread() assertions.
However they all use Monitor's to access member data, so they should be thread-
safe.
(Upcoming patches will actually start using some of these functions from non-
main-threads.)
MozReview-Commit-ID: E1auNEXuoF9
--HG--
extra : rebase_source : 41af7d16f8a9bde5492e864712981a208f3b47be
We need to traverse rule tree to get the important rules, so we will not
override them if they have animations running on compositor.
MozReview-Commit-ID: 67NO2nIcUfq
--HG--
extra : rebase_source : 24a4ea4ca10e00f409d94c81acacb3db72248b3f
We don't use the public UpdateCascadeResults method, so remove it.
MozReview-Commit-ID: A2lWZaHWHTZ
--HG--
extra : rebase_source : 35a1d77fdeba5a1db74d15f523dba78801b0b48e
We need this flag to avoid assertion in PostRestyleForAnimation(), which
may be called from MaybeUpdateCascadeResults() in pre-traversal.
MozReview-Commit-ID: 46AfoIUb9o3
--HG--
extra : rebase_source : 3290d9954be43ffaeb94b501ac346622651c452a
We restyle elements with non-animation restyles even if the animations
are throttled.
MozReview-Commit-ID: Exhd4qVx7su
--HG--
extra : rebase_source : 1632bf949bb60a894372a425fd9173e1b718452d