Commit Graph

62 Commits

Author SHA1 Message Date
Jeff Gilbert
5b753da289 Bug 1470325 - s/FooBinding/Foo_Binding/g - r=qdot
MozReview-Commit-ID: JtTcLL5OPF0
2018-06-26 17:05:01 -07:00
Emilio Cobos Álvarez
47ebd819b3 Bug 1449806: Merge {Servo,Generic}SpecifiedValues into MappedDeclarations. r=xidorn
The idea would be that this header is only included in cpp files, thus it's ok
to include ServoBindings, etc.

MozReview-Commit-ID: EgQEsR0cZd4
2018-06-25 11:14:39 +02:00
Ciure Andrei
873d562bc3 Backed out 8 changesets (bug 1451169) on request from njn a=backout
Backed out changeset b92f856e15a8 (bug 1451169)
Backed out changeset 348e825756fa (bug 1451169)
Backed out changeset 624d82428726 (bug 1451169)
Backed out changeset 4d51610ca08e (bug 1451169)
Backed out changeset bb76a9589717 (bug 1451169)
Backed out changeset c145fbd03947 (bug 1451169)
Backed out changeset 6d36289e0f54 (bug 1451169)
Backed out changeset 914fb7cd9fc3 (bug 1451169)

--HG--
extra : histedit_source : 94de6631919f895dec422bc0e564f5baf885ba4a%2C18f52c6c11d3064d3137a6847575effb7d407894
2018-04-11 11:22:05 +03:00
Nicholas Nethercote
a560608963 Bug 1451169 - Use nsStaticAtom* instead of nsStaticAtom** in Element.h. r=baku
And then fix up everything else that needs to change as well.

MozReview-Commit-ID: GDMfERqdQAc

--HG--
extra : rebase_source : 01fe06c3182245a409099a53383d92bf4fa0155c
2018-04-03 13:21:06 +10:00
Adrian Wielgosik
8cb213f738 Bug 1438956 - Add inline Start/End TimeRanges methods for C++ users. r=bz
MozReview-Commit-ID: DcLsYyKV7WX

--HG--
extra : rebase_source : 1891f87a72380ed6f57d1790659c10ea416ccf15
2018-02-16 19:36:40 +01:00
Adrian Wielgosik
d729e5e045 Bug 1438956 - Remove nsIDOMTimeRanges. r=bz
MozReview-Commit-ID: DAgQ0OkSxkq

--HG--
extra : rebase_source : e995b4d76186032fc048bc7b63f4e1e2aee046b4
2018-02-16 19:34:28 +01:00
Gerald Squelart
1b357db99b Bug 1407810 - Use DDLogger in media stack - r=jwwang
Mostly-mechanical additions:
- Log constructions&destructions, usually by just inheriting from
  DecoderDoctorLifeLogger, otherwise with explicit log commands (for internal
  classes for which DecoderDoctorTraits can't be specialized),
- Log links between most objects, e.g.: Media element -> decoder -> state
  machine -> reader -> demuxer -> resource, etc.

And logging some important properties and events (JS events, duration change,
frames being decoded, etc.)

More will be added later on, from just converting MOZ_LOGs, and as needed.

MozReview-Commit-ID: KgNhHSz35t0

--HG--
extra : rebase_source : dd7206e350e32671adc6f3b9e54ebf777251de2c
2017-10-10 17:55:27 +11:00
Kris Maglione
1c66345e09 Bug 1415352: Part 1a - Pass subject principal through to ParseAttribute. r=bz
This is necessary in order to parse style attributes using the subject
principal of the caller, rather than defaulting to the page principal.

MozReview-Commit-ID: GIshajQ28la

--HG--
extra : rebase_source : 5dba46f61d70ec647cae16383b62961ac72d2f47
2017-11-01 20:35:52 -07:00
Kyle Machulis
7308e0e9fe Bug 1412414 - Remove nsIDOMHTMLSourceElement; r=bz
MozReview-Commit-ID: 3ZK1GremntX

--HG--
extra : rebase_source : c25b1a449596130ec8d2e7936f52cc651988af85
2017-10-27 15:00:42 -07:00
Nicholas Nethercote
d225f7151b Bug 1400460 - Rename nsIAtom as nsAtom. r=hiro.
(Path is actually r=froydnj.)

Bug 1400459 devirtualized nsIAtom so that it is no longer a subclass of
nsISupports. This means that nsAtom is now a better name for it than nsIAtom.

MozReview-Commit-ID: 91U22X2NydP

--HG--
rename : xpcom/ds/nsIAtom.h => xpcom/ds/nsAtom.h
extra : rebase_source : ac3e904a21b8b48e74534fff964f1623ee937c67
2017-10-03 09:05:19 +11:00
Alastor Wu
ac5a951f4a Bug 1373888 - part6 : only release the wakelock when video is paused. r=cpearce
Wakelock would automatically handle the lock/unlock by listening "hidden/visible", we
don't need to handle it in HTMLVideoElement.

MozReview-Commit-ID: AcOwR2nqm6L

--HG--
extra : rebase_source : 8f96b8cd908332be33ed3289dd288990da56c1c9
2017-08-29 15:25:57 +08:00
Alastor Wu
6a6ee2a0d7 Bug 1373888 - part3 : rename the topic of the wake lock. r=cpearce
For knowing the wake lock usage more clearly, we should use more specific topic name.

In OSX, you can use "$ pmset -g assertions" to check all the wakelock.
In Windows, using "$ powser -energy" to generate the energy report.

MozReview-Commit-ID: rAXnkxTvLc

--HG--
extra : rebase_source : 42ebf204673d3c913739f64c71c24af20d37c95d
2017-08-29 10:54:28 +08:00
Alastor Wu
f570c3c5ec Bug 1373888 - part1 : remove useless function. r=cpearce,smaug
These functions didn't be used by anyone, remove them.

MozReview-Commit-ID: BLj8GsVp1gR

--HG--
extra : rebase_source : 1b7eee86c62314401c2374a2979ba2a42fda2490
2017-08-29 10:54:18 +08:00
Sebastian Hengst
9769c22d10 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: AeoHOxZLi6m
2017-08-28 16:53:53 +02:00
John Lin
bad6535260 Bug 842782 - p2: introduce attributes for orientation lock to video element. r=jwwang,smaug
MozReview-Commit-ID: odq1y9qH1
2017-08-28 18:15:31 +08:00
Sebastian Hengst
3074ff30be Backed out changeset ba812092214c (bug 842782) 2017-08-28 09:59:11 +02:00
John Lin
ae733d5007 Bug 842782 - p2: introduce attributes for orientation lock to video element. r=jwwang,smaug
MozReview-Commit-ID: odq1y9qH1

--HG--
extra : rebase_source : 65daa7bde05ceee01704bb3677c5511c39c20848
2017-08-25 14:23:03 +08:00
Chris Pearce
4ffa31745b Bug 1392498 - Move TimeIntervals to dom::TimeRanges conversion into TimeRanges class. r=jya
If TimeUnits.h includes mozilla/dom/TimeRanges.h, then the build ends up
pulling in the Gecko DOM bindings, which pulls in a whole lot of JavaScript and
DOM bindings code. That makes it trickier to import GeckoMedia into Servo, and
makes Gecko's build slower, so move the code to convert TimeIntervals into
dom::TimeRanges.

Also remove an extraneous "virtual" and add "const" to some functions in TimeRanges.

MozReview-Commit-ID: BLeehaf9gCE

--HG--
extra : rebase_source : 84ef054cf8fd5b4434dc761a1b0a39803d3231f5
2017-08-21 15:08:25 +12:00
Tim Huang
7af48eb06f Bug 1369309 - Part 3: Making the media statistics reports a spoofed value when fingerprinting resistance is enabled. r=cpearce, r=arthuredelstein
This patch makes the media statistics report values with a fixed frames per second
and a dynamic dropped ratio when resistance fingerprinting is enabled. The dropped
rate is decided by the video resolution that it will report a fixed dropped rate
when the video resolution is greater than 480p. And It will report a zero dropped
rate if the video is below or equal to 480p. In addition, it adds three new prefs
that allow us to change the value of frames per second, the dropped ratio and the
threshold of target video resolution. The three prefs are
'privacy.resistFingerprinting.video_frames_per_sec', 'privacy.resistFingerprinting.video_dropped_ratio'
and 'privacy.resistFingerprinting.target_video_res'. The default values of them
are 30, 5 and 480, which means 30 frames per second, 5 percent dropped ratio and
480p.

This also adds a new helper function 'nsContentUtils::ShouldResistFingerprinting(nsIDocument* aDoc)'
for checking whether fingerprinting resistance is enabled for a given docuemnt.
If it is a chrome document, this function will indicate that fingerprinting
resistance is not enabled regardless of the pref 'privacy.resistFingerprinting'.
If it is a content document, the result will depend on the pref.

MozReview-Commit-ID: FbSuRq6Zdnn

--HG--
extra : rebase_source : a62a1be19d9b38520f9eed7164fb258e3354d228
2017-07-17 15:13:55 +08:00
Tim Huang
a6420be85e Bug 1369309 - Part 1: Spoofing media statistics to 0 when 'privacy.resistFingerprinting' is true. r=jwwang, r=arthuredelstein
MozReview-Commit-ID: FNALpUGFDTQ

--HG--
extra : rebase_source : 3ba5bfca6178ffdf15ceeeb66cb17e902e82b15a
2017-06-19 14:43:26 +08:00
JW Wang
46e04d4ca0 Bug 1378295. P5 - remove AbstractMediaDecoder from MediaDecoder's base class. r=jya
MozReview-Commit-ID: lIAT21YMRR

--HG--
extra : rebase_source : 72fe91b3c17e448a8b8b748bc1a44f760ff48274
extra : intermediate-source : b1246c769384a69f23d4d88a63ccef636b79f6e1
extra : source : 9f4592b9d821ea775cea39e780c4dd4197aae8ad
2017-07-13 17:38:06 +08:00
David Major
ed0b8f8653 Bug 1344615: Remove nsXPCOMStrings.{h,cpp} r=bsmedberg
These are now dead code.

MozReview-Commit-ID: AClU0Qx3kmN

--HG--
extra : rebase_source : df83cf89292da1519bb26027c11e14923d5c54a0
2017-03-06 17:52:54 +13:00
Manish Goregaokar
7aca0c8cd0 Bug 1334330 - Part 3: stylo: Use GenericSpecifiedValue abstraction in elements using only common mappers; r=bz,emilio
MozReview-Commit-ID: B8vg4ZiqRGK

--HG--
extra : rebase_source : c1c73d3f8dd695717e368ce28028ad75dbf9838c
2017-01-26 16:51:01 -08:00
Manish Goregaokar
48bc1c741c Bug 1334330 - Part 1: stylo: Abstractify nsMappedAttributes to work on arbitrary containers of specified value data; r=bz,emilio
MozReview-Commit-ID: BSM4TC9RKot

--HG--
extra : rebase_source : 5f2c5d998b9e2bc10a2c9ce8d0b3ce90817a0d39
2017-01-26 13:39:13 -08:00
Gerald Squelart
116cef615e Bug 1311877 - VideoPlaybackQuality.totalVideoFrameCount is presented+dropped - r=jya
totalVideoFrameCount was previously incorrectly set to the number of demuxed
frames.
According to the current W3C specs [1], it should instead be the total number of
frames that have been presented, plus frames that have been discarded.

Also added a check that discarded<=total in mochitest.

[1] https://wicg.github.io/media-playback-quality/#concepts

MozReview-Commit-ID: Gnv1roM5n0A

--HG--
extra : rebase_source : 1f018612fbaf43867f5c92e59d62d718a3b08535
2016-10-21 12:01:59 +11:00
Alastor Wu
56e48dbbf5 Bug 1262053 - part8 : remove function NotifyOwnerDocumentActivityChangedInternal. r=cpearce
MozReview-Commit-ID: DnWgQHGJLU5

--HG--
extra : rebase_source : a6c4ab94fad22b2bef1bdde07bc17246943128f7
2016-08-29 18:56:38 +08:00
ctai
b7fcb47572 Bug 1201363 - Replace VideoFrameContainer with MediaStreamVideoSink in MSG. r=jesup
Replace the pointer of VideoFrameContainer with the pointer of MediaStreamVideoSink.

MozReview-Commit-ID: 5bqEMpemwuR

--HG--
extra : transplant_source : %008z%D8W%EE%87%8E%E9/%2CT%26%EBvo%AE%099%A6
2016-05-27 14:33:48 +08:00
Sebastian Hengst
120f502e2a Backed out changeset 3851902daa94 (bug 1201363) 2016-08-03 19:33:25 +02:00
ctai
e28782c9ba Bug 1201363 - Replace VideoFrameContainer with MediaStreamVideoSink in MSG. r=jesup
Replace the pointer of VideoFrameContainer with the pointer of MediaStreamVideoSink.

MozReview-Commit-ID: 5bqEMpemwuR

--HG--
extra : amend_source : 7eb1e87fdcbc61f2f9831fa3a6d803cc50306604
2016-05-27 14:33:48 +08:00
Carsten "Tomcat" Book
7e324b6cdb Backed out changeset b018ce9d1484 (bug 1201363) 2016-08-02 12:53:59 +02:00
ctai
0948ae3f3a Bug 1201363 - Replace VideoFrameContainer with MediaStreamVideoSink in MSG. r=jesup
Replace the pointer of VideoFrameContainer with the pointer of MediaStreamVideoSink.

MozReview-Commit-ID: 5bqEMpemwuR

--HG--
extra : transplant_source : %9D%86%93%A6%DF%D5%9Ep%20%DF%FD%C1%E2%BA%A3Gq%1A%7E%A3
2016-05-27 14:33:48 +08:00
Gerald Squelart
374f22a566 Bug 1289668 - HTMLMediaElement uses video decoder's frame statistics - r=kamidphish
HTMLVideoElement can expose its thread-safe FrameStatistics object, so that
HTMLMediaElement can access more adequate data for its telemetry, without
having to use an intermediary (and potentially less accurate)
VideoPlaybackQuality object.

This will also help with accessing other/new FrameStatistics members later on.

MozReview-Commit-ID: AT7mEGy0zGr

--HG--
extra : rebase_source : 35bf6673cc0acd9d4e6e1a58c573749689614d43
2016-07-26 11:32:58 +10:00
Gerald Squelart
16ceda9794 Bug 1289668 - Use 64 bits to store FrameStatistics values - r=kamidphish
Decoders uses 64-bit values to count frames, so we should use the same type
in FrameStatistics.

Because VideoPlaybackQuality can only use 32 bits (as defined in W3C specs),
we need to ensure that imported FrameStatistics numbers can fit in 32 bits,
while keeping their ratios the same.

MozReview-Commit-ID: 3pUTGK0ekGv

--HG--
extra : rebase_source : 627fada111b51b8830fd38bf6d60a79b899ce603
2016-07-18 10:51:30 +10:00
Gerald Squelart
9448bd8536 Bug 1289668 - Refactor FrameStatistics - r=kamidphish
Move FrameStatistics' data into separate struct, so that it can more easily be
changed and passed around, outside of the lock-controlled FrameStatistics
object.

MozReview-Commit-ID: TfsMRJhVfQ

--HG--
extra : rebase_source : 8c4c6a23c8c2d6ff4272f9f918c9510326691148
2016-07-18 09:51:25 +10:00
Gerald Squelart
46e43139df Bug 1286444 - Use correct types to construct VideoPlaybackQuality - r=kinetik
VideoPlaybackQuality was fed uint64_t's, now it should be given uint32_t's.
Note that FrameStatistics currently provide uint32_t's, so we are fine now;
nevertheless I added a static_assert to verify that and ensure it stays true.

MozReview-Commit-ID: I0dgP1K4lg3

--HG--
extra : rebase_source : f8d673db0cd45d2b3ae03c092dff217e5d7ebbee
2016-07-14 15:18:36 +10:00
Andrea Marchesini
64734bf74c Bug 1278838 - Remove separate worker binding for Performance API, r=smaug
--HG--
rename : dom/performance/nsPerformance.cpp => dom/performance/Performance.cpp
rename : dom/performance/nsPerformance.h => dom/performance/Performance.h
rename : dom/workers/Performance.cpp => dom/performance/PerformanceWorker.cpp
rename : dom/workers/Performance.h => dom/performance/PerformanceWorker.h
2016-06-09 19:04:42 +02:00
Kilik Kuo
50e65bce86 Bug 1228601 - [Part2] Swap width,height if necessary and apply rotation matrix while building layer.; r=mattwoodrow
MozReview-Commit-ID: Jlh6oRa32fj

--HG--
extra : transplant_source : %7Ed%14%5Ea%01T%16%90R%0Auj%E6I%8D%EDR%EE%BC
2016-05-12 01:54:52 +08:00
Sebastian Hengst
8cd2f85f26 Backed out changeset 1ed74da8c8bb (bug 1228601) 2016-05-23 14:23:51 +02:00
Kilik Kuo
650f34aa50 Bug 1228601 - [Part2] Swap width,height if necessary and apply rotation matrix while building layer.; r=mattwoodrow
MozReview-Commit-ID: Jlh6oRa32fj

--HG--
extra : transplant_source : %C2%A5%8C%DA4TF%0C%D4%C9%C6%9C%98%25t%3C%B9%90%E8%B2
2016-05-12 01:54:52 +08:00
Kyle Huey
91efc5a86c Bug 1241764: Replace nsPIDOMWindow with nsPIDOMWindowInner/Outer. r=mrbkap,smaug 2016-01-30 09:05:36 -08:00
Chris Peterson
88051371a9 Bug 1232223 - Part 1: Remove MOZ_WEBM #ifdefs because WebM is always supported, though not necessarily enabled. r=jya r=glandium 2015-12-12 13:49:07 -05:00
Boris Zbarsky
1fec018fcb Bug 1224007 part 4. Fix some cases in which ErrorResult instances are destroyed without doing anything useful with exceptions on them. r=peterv 2015-11-20 16:29:41 -05:00
Nathan Froyd
01583602a9 Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat
The bulk of this commit was generated with a script, executed at the top
level of a typical source code checkout.  The only non-machine-generated
part was modifying MFBT's moz.build to reflect the new naming.

CLOSED TREE makes big refactorings like this a piece of cake.

 # The main substitution.
find . -name '*.cpp' -o -name '*.cc' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    xargs perl -p -i -e '
 s/nsRefPtr\.h/RefPtr\.h/g; # handle includes
 s/nsRefPtr ?</RefPtr</g;   # handle declarations and variables
'

 # Handle a special friend declaration in gfx/layers/AtomicRefCountedWithFinalize.h.
perl -p -i -e 's/::nsRefPtr;/::RefPtr;/' gfx/layers/AtomicRefCountedWithFinalize.h

 # Handle nsRefPtr.h itself, a couple places that define constructors
 # from nsRefPtr, and code generators specially.  We do this here, rather
 # than indiscriminantly s/nsRefPtr/RefPtr/, because that would rename
 # things like nsRefPtrHashtable.
perl -p -i -e 's/nsRefPtr/RefPtr/g' \
     mfbt/nsRefPtr.h \
     xpcom/glue/nsCOMPtr.h \
     xpcom/base/OwningNonNull.h \
     ipc/ipdl/ipdl/lower.py \
     ipc/ipdl/ipdl/builtin.py \
     dom/bindings/Codegen.py \
     python/lldbutils/lldbutils/utils.py

 # In our indiscriminate substitution above, we renamed
 # nsRefPtrGetterAddRefs, the class behind getter_AddRefs.  Fix that up.
find . -name '*.cpp' -o -name '*.h' -o -name '*.idl' | \
    xargs perl -p -i -e 's/nsRefPtrGetterAddRefs/RefPtrGetterAddRefs/g'

if [ -d .git ]; then
    git mv mfbt/nsRefPtr.h mfbt/RefPtr.h
else
    hg mv mfbt/nsRefPtr.h mfbt/RefPtr.h
fi

--HG--
rename : mfbt/nsRefPtr.h => mfbt/RefPtr.h
2015-10-18 01:24:48 -04:00
Kilik Kuo
90420c357e Bug 1204882 - Move MediaDecoder::FrameStatistics out of MediaDecoder for easier use in other classes. r=jwwang
--HG--
extra : transplant_source : 3%E1%C1%3B%B5%8B%82%20%DF%AE%1A%21%E0f%FF%7C%3C%0EF%10
2015-09-15 22:57:20 +08:00
Andrew Osmond
d46f639332 Bug 1203151 - Allow disabling of screen wakelocks for video elements. r=baku 2015-09-02 09:18:16 -04:00
Andrea Marchesini
813316efe8 Bug 1184292 - Remove some Wakelock warning messages when unlocking. r=smaug
CLOSED TREE
2015-08-26 09:21:00 -04:00
Hiroyuki Ikezoe
5a1cc68844 Bug 1189162 - Clamp gamepad.timestamp and VideoPlaybackQuality.creationTime. r=bz 2015-07-30 01:41:00 -04:00
Ehsan Akhgari
59e89cba9d Bug 1180535 - Dispatch the media-playback notification when navigating away from a page that has a media element playing; r=baku
When navigating away from a document, we mute the playing media elements
through the NotifyOwnerDocumentActivityChanged() notification.
Sometimes, that function may notify the audio channel agent through its
call to AddRemoveSelfReference() which may call
UpdateAudioChannelPlayingState() and notify the agent, but when we're
navigating away from the page, playingThroughTheAudioChannel will always
be equal to mPlayingThroughTheAudioChannel, which causes us to not
notify the audio channel agent.

This patch fixes this by separating NotifyOwnerDocumentActivityChanged()
from its internal consumers, and forcefully notifying the audio channel
agent when we navigate away.
2015-07-11 13:16:39 -04:00
Carsten "Tomcat" Book
b8617ced73 Backed out changeset e11a8496bf63 (bug 1180535) 2015-07-11 14:13:32 +02:00
Ehsan Akhgari
6834ce768e Bug 1180535 - Dispatch the media-playback notification when navigating away from a page that has a media element playing; r=baku
When navigating away from a document, we mute the playing media elements
through the NotifyOwnerDocumentActivityChanged() notification.
Sometimes, that function may notify the audio channel agent through its
call to AddRemoveSelfReference() which may call
UpdateAudioChannelPlayingState() and notify the agent, but when we're
navigating away from the page, playingThroughTheAudioChannel will always
be equal to mPlayingThroughTheAudioChannel, which causes us to not
notify the audio channel agent.

This patch fixes this by separating NotifyOwnerDocumentActivityChanged()
from its internal consumers, and forcefully notifying the audio channel
agent when we navigate away.
2015-07-10 21:33:00 -04:00