Previous design allows us calling resume/block from both front-end and back-end,
it's not easy to know who called these operations.
So move all these logic to frond-end side, it's more clear than before.
One important thing is that we should block tab before loading the content.
If we block the tab after loading, the media might not be blocked because it had
already started (that is one situation I observed from test).
The value of block state would be stored in the outer window, before media want
to start, it would check this value to know whether it can start playing or not.
---
In addition, introduce new attribute "media-blocked".
The "media-blocked" attribute indicates that whether the tab is allowed to play autoplay media.
The "activemedia-blocked" attribute indicates whether the tab has blocked the autoplay media.
MozReview-Commit-ID: FnNh3zmItxo
--HG--
extra : rebase_source : cdc890c0c47a4a03ea8dbbdfee24c66b52945c60
The "blocked" attribute is too general to indicate the real usage, so rename it
to "activemedia-blocked".
This attribute indicates that whether the tab has blocked the autoplay media.
MozReview-Commit-ID: EAmq6OuBYjq
--HG--
extra : rebase_source : e8e9321854b80736f0959fbfecbc8bf9a83b0712
The "platform" chrome flag requires an irrelevant "content" chrome
manifest entry, while it's only used for locales. It only has exactly
one use, which can actually be replaced by uses of the "os" flag.
Note, we're doing something similar with the "os" flag for skins in
e.g. browser/extensions/pocket/jar.mn.
Unfortunately, for determinism reasons, the chrome manifest entries from
jar.mn are sorted (per bug 982075), so keeping global-platform/unix
would leave it appearing after /mac, and would override it on mac
because of the lack of "os" flag on the /unix entry (we can't put "os"
flags on that entry because we can't do something like os!=Darwin &&
os!=WINNT). So we move it to /gtk such that it always comes before /mac.
--HG--
extra : rebase_source : aaace8147ea54f74aef8a7b2314ad022e9f9be23
This intentionally allows to set MOZ_INSTALL_TRACKING without
reference to the milestone being release or beta. That is, we
separate the default value (which depends on release or beta) from the
value specified, making life easier for developers.
MozReview-Commit-ID: 3vPF7KO7fEX
--HG--
extra : rebase_source : 8d5764104b5322a32e4a048bfd3222f62fed73bb
This patch uses the new Photon animation curve for notification bars as well
as supporting `toolkit.cosmeticAnimations.enabled` to disable the animations
on notification bars entirely.
MozReview-Commit-ID: AHSQR32g6hf
--HG--
extra : rebase_source : 9b643a758db07791dbda12f7e6383f193f3fa698
__define{Getter,Setter}__ are deprecated, and are not defined on
NonSyntacticVariablesObjects, so these calls get in the way of sharing
globals between different .jsms. Probably only the DownloadUtils.jsm
change is really needed for that.
configurable and enumerable are both set to true to match the existing
behavior. If enumerable is set to false, then tests fail, because some
of the getters overwrite the getter with a regular property.
MozReview-Commit-ID: 1OZF45fIAQ
--HG--
extra : source : 96dd2e2d8d1677fb04c98bb3a063df32478fbc00
Reset button should not be tabbable or focusable.
MozReview-Commit-ID: IboMKl3n0LY
--HG--
extra : rebase_source : 7bec15cfb601cd15a99d26e39b39446ef3ca5601
This patch creates a new print preview browser to host the simplified cloned-document
when Simplify Page option is used on preview. Also, this patch keeps track of what browser
should be presented, based on whether the 'Simplify page' checkbox is checked.
MozReview-Commit-ID: FZSRUyC49Wk
With ideas and code from Oriol <oriol-bugzilla@hotmail.com>.
MozReview-Commit-ID: CjuCAkYaort
--HG--
extra : rebase_source : dd53d1a665a5aba8ef094ee82dffe9c6c010d3d6
This patch creates a new print preview browser to host the simplified cloned-document
when Simplify Page option is used on preview. Also, this patch keeps track of what browser
should be presented, based on whether the 'Simplify page' checkbox is checked.
MozReview-Commit-ID: FZSRUyC49Wk
--HG--
extra : rebase_source : cccc12f17f315089c9e5d05116077b7f87f4053b
The APZ scrolling codepath doesn't do the right thing for <listbox>
without special handling, so have it scroll in JS instead, like we
did in bug 1302736 for <tree>.
MozReview-Commit-ID: LWJCBfhZ3Hc
--HG--
extra : rebase_source : bb8b2f7e713d35822a956e08f4e0eed0557b07b3
Opening pages in a new tab might suffer an extra delay from e10s-multi because
the new process has to start up and then run all the process / frame scripts
before it can react on the request from the parent to load the first page.
There are two code paths. Either we start the tab with a remote browser and
then the RemoteWebNavigation will send the request. Or we start with a non-remote
browser and have to change the remoteness flag on it, and then the SessionStore
will send the request.
In each cases we start the timer on the parent side, send it with the message,
and when the child receives it it stops the timer and reports the measured delay.
We can lower the eslint cyclomatic complexity threshold in some directories without adding eslint suppression comments in any .js source files. We need to specify the complexity rule in accessible/.eslintrc because it doesn't inherit the mozilla/recommended rules. eslint's default complexity threshold is 20.
Also bump the eslint-plugin-mozilla version because we modified the mozilla/recommended rules.
MozReview-Commit-ID: 57T4gAjPH7z
--HG--
extra : rebase_source : 4565abfa722b9459cfb4e006e843da13ed7cffd4
extra : intermediate-source : 658588564c08c9fd5e60633d1457f24087de8570
extra : source : 7e0526e3b943419a80c0cd2fa462cabbf8925eb1
Changlist:
- Added Jim Palmer's well proven natural sort algorithm.
- Added natural sort license (MIT).
- Use natural sort everywhere inside TableWidget.js wherever we use .sort()
- Changed browser_storage_overflow.js so that the test is faster and more maintainable. The test now also tests column sorting (ascending and descending).
- Use natural sort everywhere inside storage.js wherever we need to slice the array. Without natural sort here we get e.g. row-1, row-10, row-100, row-2 etc.
MozReview-Commit-ID: FUY7pcLIYml
--HG--
extra : rebase_source : 6e25cc962a7ab89aeb361e4036af90dcecd24b02
The about:url-classifier supports following functions:
1. Provider section
- Show update status for each provider, update status include
last update time, next update time and last update status
- Update button to manually trigger an update for the provider.
2. Debug section
- Set MOZ_LOG Modules
- Set MOZ_LOG_FILE
MozReview-Commit-ID: AHiveKEHSNC
--HG--
extra : rebase_source : b56e918de7f4eb30ad8eebc6d24ffaf2e76f4f4e
This patch creates a new print preview browser to host the simplified cloned-document
when Simplify Page option is used on preview. Also, this patch keeps track of what browser
should be presented, based on whether the 'Simplify page' checkbox is checked.
MozReview-Commit-ID: 77pLXhdbpPp
--HG--
extra : rebase_source : 7201f230299c571d6c3a86ce650d6852c43e0943
We could register media control related event after the tab has active media.
But we still need to register "audioFocusChange" in the beginning, because it
affect every tab even the tab has no active media.
MozReview-Commit-ID: ErIBUobnxbg
--HG--
extra : rebase_source : bdc8070f2f2a81f847ebb8e0ec87f6efeb86eb80
The scroll destination of the smooth scroller of <scrollbox> can be outside of the actual scrollable range. Therefore, it doesn't make scroll slower even when the end appears.
This patch makes the destination always in the scrollable range.
MozReview-Commit-ID: CfEGzhG7Jh7
--HG--
extra : rebase_source : 87a07140a1ce58752ac264a1e8decb2a8af6d078
EnsureElementIsVisible can cause a Layout flush, so we should try to avoid it when possible.
MozReview-Commit-ID: Dr0D8vPl9rd
--HG--
extra : rebase_source : e1d6de9c1449f0b4d9780d374e5632fb40498902
CLOSED TREE
Backed out changeset 941e0f9ff9a7 (bug 1351074)
Backed out changeset 4fdf3b87a70b (bug 1351074)
Backed out changeset 586428f69838 (bug 1351074)
TESTING_JS_MODULES uses testing-common, not gre. So we should replace gre with testing-common for mochitest.
MozReview-Commit-ID: BqsS2D3IGR6
--HG--
extra : rebase_source : 2143fcdf33c428c82c6b2e00b542649b958aeccc
TESTING_JS_MODULES uses testing-common, not gre. So we should replace gre with testing-common for mochitest.
MozReview-Commit-ID: BqsS2D3IGR6
--HG--
extra : rebase_source : a8553684f8f106c1dfb6e2d9b51df7ebeb15275d
Set the .dir property of the input box wrapper to `rtl` if this is a RTL
locale.
MozReview-Commit-ID: D2qJVjvzxNW
--HG--
extra : rebase_source : f0514ab18fe129600adfbd695f15594c6f4c8ca9
Since the inner fields of date/time input are now <span> instead of <input>
text, we are adding an API for binding code to set the focus state of the
bound input element when inner fields are focused/blurred.
MozReview-Commit-ID: 9wvu57xT6HZ
--HG--
extra : rebase_source : c6c3832fe0aa0fe9429052dcb5b15a3497c33fa4
When adding support for RTL in date/time input box, we noticed that bidi text
was not displayed properly with mixed of inline and block elements. By
changing our editabled fields from <input> to <span>, we can rely on bidi
algorithm and markups to display the inner fields in the right order.
MozReview-Commit-ID: 7r8OVSJXJRU
--HG--
extra : rebase_source : b130a5424b533930a57695a65196454c72d7be10
Add new tests and move some share codes to head.js.
MozReview-Commit-ID: GcCio6JupZu
--HG--
extra : rebase_source : a9324aaebd89412d77bed19b0554e6cf2959b6e2
The FX_PREFERENCES_CATEGORY_OPENED probe must be extended to version 59 to support the fallback "forked" preference implementation (in-content-old).
The switchToAdvancedSubPane within utilityOverlay's openPreferences must also remain until the fallback has been removed (bug 1349689).
Patch co-authored by Zack Herrick <herrickz@msu.edu> and Ziyan Long <lzylong@gmail.com>.
MozReview-Commit-ID: 1sx0Wj15yM7
--HG--
extra : rebase_source : 0266027fb3023d4cb155533193d6809d799de1e4
We could not avoid controls being focused after De-XUL, in order
to preventDefault before event propagate to focused control, we should
change the way of keypress event propagation in media controls.
MozReview-Commit-ID: 4KNPU4XlSDJ
--HG--
extra : rebase_source : 1146e18e3beebca8ae36a4de126c5c920aa5cdfd
CLOSED TREE
Backed out changeset 4ac559eea9ec (bug 1348803)
Backed out changeset 2ab6e0b8aec6 (bug 1348803)
Backed out changeset f966aef934b1 (bug 1348803)
We could register media control related event after the tab has active media.
But we still need to register "audioFocusChange" in the beginning, because it
affect every tab even the tab has no active media.
MozReview-Commit-ID: 4pBKIR8F5tV
--HG--
extra : rebase_source : fc26c98ed7b33552b4eba5b20168394b1b1a4390
If we rely on XUL panel's default behavior, the picker is hidden and opened
again when we jump from one inner field to another with a mouse click, this is
because XUL pannel gets hidden when user clicks outside it with
noautohide=false. In order to avoid this, we should close it explicitly only
when input element blurs.
MozReview-Commit-ID: GxPxd0wPWgM
--HG--
extra : rebase_source : 3bac43a57da51a341d7ec4bb7b86807f55308f39
We used to have this rule in shared stylesheet for both mobile and
desktop, but the namespace mismatched after visual refresh (De-XUL).
Now we should add this rule back to hide cursor while fading out.
MozReview-Commit-ID: HDZKn8CrQ5X
--HG--
extra : rebase_source : 7a63650b9f048dd5b0b0b79ce289bc762cc6a07b
Add a new attribute "rawValue" in each of the numeric fields. We store the
non-formatted number in this attribute, and display formatted number using
Intl.NumberFormat.
MozReview-Commit-ID: JkcBObFoYQ3
--HG--
extra : rebase_source : 05918ba57513f9c816273a758ab2aa7198722135
The test cases should be ordered according to their alphabet order.
MozReview-Commit-ID: LmmyjcTf6Nd
--HG--
extra : rebase_source : 2a0d826cf06ae4ff16f2f8ed5fcb2012ba1dd0a6
Add tests for non-in-tree media element, web-audio and plug-in.
MozReview-Commit-ID: 2BMzUHPjKWX
--HG--
extra : rebase_source : 1005cc83973fdbd33efb0146d9ff87d52659f090
Running eslint with --fix didn't fix many of the issues. The majority here had to be fixed by hand but a significant majority of the issues were related to a few files that I was able to use find-and-replace with. I regret not making this in to separate commits of the hand-fixes and the fixes from --fix but I don't recall --fix fixing any of the issues.
MozReview-Commit-ID: ANyg2qfo3Qx
--HG--
extra : rebase_source : 61d2aa91bf9474af3d72a5dea41b25dca442c1b7
In cases, where the caller is looking for the locale to be used for JS Intl API,
we can now replace it with `undefined` which causes JS Intl API to use the default
locale which since bug 1346674 is resolved to the app locale.
This allows us to remove a lot of calls for the app locale.
The remaining ones are split between `AsBCP47` and `AsLangTag`.
Here, the `AsLangTag` is used, as described in the API docs, for cases where
the language string is used for localization purposes, such as language negotaition
matching to our language resources etc.
`AsBCP47` is used when the returned value is handed over to ICU API.
MozReview-Commit-ID: DzmFEUvMq3N
--HG--
extra : rebase_source : 513ed31d995864939aa893e73c81ffdf591a6617
In cases, where the caller is looking for the locale to be used for JS Intl API,
we can now replace it with `undefined` which causes JS Intl API to use the default
locale which since bug 1346674 is resolved to the app locale.
This allows us to remove a lot of calls for the app locale.
The remaining ones are split between `AsBCP47` and `AsLangTag`.
Here, the `AsLangTag` is used, as described in the API docs, for cases where
the language string is used for localization purposes, such as language negotaition
matching to our language resources etc.
`AsBCP47` is used when the returned value is handed over to ICU API.
MozReview-Commit-ID: DzmFEUvMq3N
--HG--
extra : rebase_source : 13fa4c397ba4c79303a2cd76684b5b8c4bd17331
Undo incorrect change from bug 1341029, and tell ESLint about how Utils is 'global' to some of the videocontrols.xml event listeners.
MozReview-Commit-ID: 9ItMIzwYhEj
--HG--
extra : rebase_source : 4ea996771c00e25e7e33063cfb56cf19c2cf059a
Replaced all Task occurence by an async function
MozReview-Commit-ID: 1HjHtPRTkl7
--HG--
extra : rebase_source : a08ac1030ef93e97ed4228c129f6f4905d99ba42
Use entities declared in DTD files so that lozalizers can fill in appropiate
placeholders for each locale.
MozReview-Commit-ID: 9KODExaDnDe
--HG--
extra : rebase_source : e6a9f27c68907aded0483028aee3a17744491a56
Block-stop should be dispatched before audio-playback, so we can check block
event first. Also add "loop" attribute for video to avoid getting the wrong
pause state.
MozReview-Commit-ID: 3WHuJGsZCPn
--HG--
extra : rebase_source : 75147657a727bf34aacf9feb1674ccf29142a0eb
This patch is generated by the following sed script:
find . ! -wholename '*/.hg*' -type f \( -iname '*.html' -o -iname '*.xhtml' -o -iname '*.xul' -o -iname '*.js' \) -exec sed -i -e 's/\(\(text\|application\)\/javascript\);version=1.[0-9]/\1/g' {} \;
MozReview-Commit-ID: AzhtdwJwVNg
--HG--
extra : rebase_source : e8f90249454c0779d926f87777f457352961748d
The DOMAudioPlaybackStarted event would affect the tabbrowser's attribute,
"soundPlaying", and this attribute should indicate whether the tab is audible or not. However, in present codebase, even the tab has "soundplaying", it doens't mean
the tab has audible sound, you need to check extra attribute, "muted".
After applying this patch, tabbrowser can only own one of the attributes ("soundplaying"
or "mute"). These attributes won't exist at the same time, so we can easily know
whether the tab is audible by checking "soundPlaying".
Let's see an example,
step1. playing a playing audio
- tab owns "soundPlaying"
step2. mute the tab
- tab owns "muted"
step3. stop audio
- tab owns "muted"
step4. replay the audio
- tab owns "muted"
step5. unmute the tab
- tab owns "soundPlaying"
step6. stop audio
- tab owns ""
MozReview-Commit-ID: EEKEbAVzsVm
--HG--
extra : rebase_source : 823d501e9162ae8b611f2e97dd763c1eec16c2cf
The root cause of the intermittent fail is because "DOMAudioPlaybackStopped" has no directly relationship with browser.mute()/unmute().
In [1], the "DOMAudioPlaybackStopped" is caused by audio stop playing, not by calling the browser.mute(). If the audio stops playing before calling the wait_for_event(), the test would be time-out. I guess the bug 1302280 is also caused by same reason.
So this patch would do two thinngs,
1. dispatch "DOMAudioPlaybackStopped" when we mute tab
2. loop the audio in test file, to make sure the "DOMAudioPlaybackStopped" is
dispatched when muting the audio, not the file ended.
[1] https://goo.gl/ymUv8P
MozReview-Commit-ID: 5RnyBRE73lQ
--HG--
extra : rebase_source : 40ad97cbf84da6f5d013d832cb12e3ed88473dfd
The test cases should be ordered according to their alphabet order.
MozReview-Commit-ID: LmmyjcTf6Nd
--HG--
extra : rebase_source : e93da9fd41f312c6ce2bc59698597286e6dfc088
Add tests for non-in-tree media element, web-audio and plug-in.
MozReview-Commit-ID: 2BMzUHPjKWX
--HG--
extra : rebase_source : 93c836edb04dbb5cb8cb487e1d5face6ddefdd42
The DOMAudioPlaybackStarted event would affect the tabbrowser's attribute,
"soundPlaying", and this attribute should indicate whether the tab is audible or not. However, in present codebase, even the tab has "soundplaying", it doens't mean
the tab has audible sound, you need to check extra attribute, "muted".
After applying this patch, tabbrowser can only own one of the attributes ("soundplaying"
or "mute"). These attributes won't exist at the same time, so we can easily know
whether the tab is audible by checking "soundPlaying".
Let's see an example,
step1. playing a playing audio
- tab owns "soundPlaying"
step2. mute the tab
- tab owns "muted"
step3. stop audio
- tab owns "muted"
step4. replay the audio
- tab owns "muted"
step5. unmute the tab
- tab owns "soundPlaying"
step6. stop audio
- tab owns ""
MozReview-Commit-ID: 50NorRbRIP
--HG--
extra : rebase_source : 8a06d1df7f4e3b974b18292944b19ada20eb655d
The root cause of the intermittent fail is because "DOMAudioPlaybackStopped" has no directly relationship with browser.mute()/unmute().
In [1], the "DOMAudioPlaybackStopped" is caused by audio stop playing, not by calling the browser.mute(). If the audio stops playing before calling the wait_for_event(), the test would be time-out. I guess the bug 1302280 is also caused by same reason.
So this patch would do two thinngs,
1. dispatch "DOMAudioPlaybackStopped" when we mute tab
2. loop the audio in test file, to make sure the "DOMAudioPlaybackStopped" is
dispatched when muting the audio, not the file ended.
[1] https://goo.gl/ymUv8P
MozReview-Commit-ID: 703JHj9dICT
--HG--
extra : rebase_source : ad2985bd14d6a9b91a73c0d4103aa51c4981124c
This is a terrible hack, asking input[type=range] in our video control
xbl binding content continue to handle mouse/touch event, even if the
event is being defaultPrevented by the content.
MozReview-Commit-ID: G1huxbS7oeq
--HG--
extra : rebase_source : 27153ce36e6883d947894da69dd9aca47965e99b
This changes the `relatedBrowser` property which held a <xul:browser> to the
more explicit `sameProcessAsFrameLoader` which takes an nsIFrameLoader.
This clarifies the purpose of the property and also (by switching to the frame
loader) makes it easier to set in some contexts.
MozReview-Commit-ID: LnEvSP8zkto
--HG--
extra : rebase_source : f9f4c07995ef39f1ccd5042e9ae3df37879423b6
In present design, the tab would hide the unblocking icon when receives
the audio-playback event, but it means we can't hide the icon if the media isn't
audible.
For example, we won't show the unblocking icon for audio with audio track, but
we show the icon for audio with silent audio track which can only be detected
after starting decoding.
In this case, we can't receive the audio-playback after resuming that media.
Therefore, we should dispatch the different event to notify tab UI that the
tab has already been resumed.
MozReview-Commit-ID: 3xCWQU7nVCl
--HG--
extra : rebase_source : b5f8855b17664bb1cc2b485f1d85120c0939931f