Commit Graph

76364 Commits

Author SHA1 Message Date
Andreas Pehrson
0facadf342 Bug 1480161: Fix underrun assert for processed input stream. r=achronop
The logic here intends to (as is written in the comment) append one block of
silence to the track to allow for us to underrun one full scratch buffer.

The code doesn't match this behavior however, because if we are not underrunning
by less than a block, we end up appending *less* than a block. This causes us to
append at a later time as the scratch buffer can swallow more (up to a full
block) than we appended.

Without processing this seems to work because of timing and ordering, but
with processing (aec/agc/ns) we tend to add 71
(512 for an iteration - 441 packed) samples of silence,
leaving us to hit the assert with a 44% ((128-71)/128) chance during subsequent
iterations.

Differential Revision: https://phabricator.services.mozilla.com/D2644

--HG--
extra : moz-landing-system : lando
2018-08-02 10:25:05 +00:00
Masayuki Nakano
0fadf6b9da Bug 1467796 - part 3: Make mozInlineSpellChecker::ReplaceWord() use TextEditor::ReplaceTextAsAction() r=m_kato,smaug
mozInlineSpellChecker::ReplaceWord() is used for replacing misspelled word
with a word.  So, this is necessary to be distinguished from insertText
command when we implement InputEvent.inputType.  So, we should make it
use TextEditor::ReplaceTextAsAction() instead (same as autocomplete).

This patch makes TextEditor::ReplaceTextAsAction() take optional argument
to make callers can specify replace range.  Then, the range is a spellchecker
selection range if the caller is mozInlineSpellChecker::ReplaceWord().
Prior to this patch, it clones the range for normal selection, but it's
expensive and we may be able to reuse cached range of Selection in this case.
So, this patch makes Selection::AddRangeInternal() checks if given range is
in another Selection and use mCachedRange as far as possible.

MozReview-Commit-ID: JIOTTsxlj4Q

--HG--
extra : rebase_source : 7c26b0255f08608ebe8c7045c9bcdca1dc70cadf
2018-07-04 22:51:55 +09:00
Masayuki Nakano
08f4c56c7e Bug 1467796 - part 2: Make autocomplete use new method TextEditor::ReplaceTextAsAction() which replaces all text with specified text r=m_kato
InputEvent.inputType needs to distinguish whether inserting text is caused
by insertText command or replaced by autocomplete or spellchecker.
Therefore, nsTextEditorState::SetValue() cannot use
TextEditor::InsertTextAsAction() nor TextEditor::DeleteSelectionAsAction().

This patch reuses TextEditor::SetText()'s slow path for the new method.

Note that the new method uses EditSubAction::eInsertText as top level edit sub-
action because specifying this improves undo/redo behavior.

And also this patch modifies test_bug1368544.html.  Oddly, only on Android,
we get different result.  After removing all text with setUserInput(""),
TextEditor::DeleteSelectionAsSubAction() removes both text node and non-bogus
<br> element from the anonymous-div element.  However, only on Android, new
<br> element is recreated.  I've not understood where this difference comes
from yet.

MozReview-Commit-ID: GKNksctGik

--HG--
rename : toolkit/content/tests/chrome/file_autocomplete_with_composition.js => toolkit/content/tests/chrome/file_editor_with_autocomplete.js
rename : toolkit/content/tests/chrome/test_autocomplete_with_composition_on_input.html => toolkit/content/tests/chrome/test_editor_for_input_with_autocomplete.html
rename : toolkit/content/tests/chrome/test_autocomplete_with_composition_on_textbox.xul => toolkit/content/tests/chrome/test_editor_for_textbox_with_autocomplete.xul
extra : rebase_source : b90419d9e5a01e86f6e6418f8df002c91416acae
2018-07-03 22:25:52 +09:00
Noemi Erli
048f87627e Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-08-02 12:03:09 +03:00
Noemi Erli
8f66a71e70 Merge inbound to mozilla-central. a=merge 2018-08-02 11:54:46 +03:00
dvarga
956d57e7f2 Merge mozilla-central to mozilla-inbound. a=merge CLOSED TREE 2018-08-02 01:26:29 +03:00
dvarga
e487e6e564 Merge inbound to mozilla-central. a=merge 2018-08-02 01:09:38 +03:00
Nika Layzell
54ae90a187 Bug 1474739 - Part 1: Stop using XPT shims in any xpidl interfaces, r=bzbarsky
Reviewers: bzbarsky!

Tags: #secure-revision

Bug #: 1474739

Differential Revision: https://phabricator.services.mozilla.com/D2624
2018-08-01 18:05:04 -04:00
Jorg K
ba1be252a0 Bug 1478441 - Introduce nsIURIWithSpecialOrigin needed for Thunderbird. r=baku 2018-07-31 11:27:00 +03:00
Jon Coppeard
43dbbc475e Bug 1477090 - Only instantiate modules when it's safe to run script r=baku 2018-08-01 11:47:04 +01:00
Kartikaya Gupta
a17fda2acb Bug 1479277 - Don't try to send APZ messages after teardown. r=botond
MozReview-Commit-ID: 8l0h197hfTj

--HG--
extra : rebase_source : a65b07f66a05b9ec54aa859fa0d9384061332120
2018-07-30 10:00:34 -04:00
Kris Maglione
fb8f4c7562 Bug 1479313: Don't load manifestMessages.js until needed. r=felipe
MozReview-Commit-ID: s2fq6XcgQ7

--HG--
rename : dom/ipc/manifestMessages.js => dom/ipc/ManifestMessages.jsm
extra : rebase_source : be3c8b11dac18219b2e4b8aafa8d213cd1435c80
2018-07-29 13:18:26 -07:00
Dave Townsend
170f0fe4df Bug 1479866: Throw an exception if XUL elements cannot be created. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D2576

--HG--
extra : moz-landing-system : lando
2018-08-01 17:46:24 +00:00
Brendan Dahl
6a890f9e34 Bug 1473742 - Fix printing fonts loaded with JS API. r=jfkthame
Copy over non-rule font faces to the static clone document that is used
during printing.

MozReview-Commit-ID: 8ggNrCcVpEK

--HG--
extra : rebase_source : 27e270edd28c3ecf19a99f4df5398a89e6c53e6a
2018-08-01 09:40:24 -07:00
Chris Pearce
2e3c4bd9af Bug 1478208 - Implement HTMLMediaElement.allowedToPlay. r=alwu,bz
Various web authors have expressed desire to know in advance whether autoplay
will work.

They want this in order to avoid paying the price for downloading media that
won't play. Or they want to take other action such as showing a poster image
instead.

This is of particular interest to Firefox, as we're planning on showing a
prompt to ask the user whether they would like a site to play. If sites want to
determine whether they can autoplay but avoid the prompt showing, they won't be
able to just call play() in Firefox and see whether it works, as that would
likely show the prompt if the user doesn't already have a stored permission.

We've been working out a spec here:
https://github.com/whatwg/html/issues/3617#issuecomment-398613484

This implements what is the consensus to date there;
HTMLMediaElement.allowedToPlay, which returns true when a play() call would not
be blocked with NotAllowedError by autoplay blocking policies.

MozReview-Commit-ID: AkBu0G7uCJ0

--HG--
extra : rebase_source : 3f31db79aa1e570fdd9fc7062d0ddac7c96a8931
2018-07-25 14:25:17 +12:00
Jon Coppeard
b64ad562af Bug 1475228 - Allocate script loader source buffers on the JS heap and pass ownership when compiling r=baku 2018-07-17 14:30:24 +01:00
Jon Coppeard
d3c569854b Bug 1475228 - Don't ignore errors returned from ScriptLoader::AttemptAsyncScriptCompile() r=baku 2018-07-17 14:30:23 +01:00
Jon Coppeard
d45eed4795 Bug 1475228 - Refactor ScriptLoader::GetScriptSource() to remove inline data argument r=baku 2018-07-17 14:30:23 +01:00
Jon Coppeard
4ff436874c Bug 1475228 - Make asynchronous compile APIs take SourceBufferHolders r=jandem 2018-07-17 14:30:23 +01:00
Jon Coppeard
ec2af16383 Bug 1475228 - Make synchronous compile APIs take SourceBufferHolders exclusively r=jandem r=fitzgen 2018-07-17 14:30:22 +01:00
Dorel Luca
a6587cb874 Merge mozilla-cental to mozilla-inbound
--HG--
rename : browser/components/payments/test/mochitest/test_labelled_checkbox.html => browser/components/payments/test/mochitest/test_completion_error_page.html
extra : rebase_source : 8549ae557dceba753101a71840a5076783bd1d36
2018-08-01 12:54:59 +03:00
Dorel Luca
d0a0ae30d5 Merge mozilla-inbound to mozilla-central. a=merge 2018-08-01 12:51:56 +03:00
Emilio Cobos Álvarez
8fbd92cc4b Bug 1479860: Add a missing override keyword that got lost. r=me
on a CLOSED TREE of course, sigh.

MozReview-Commit-ID: 5nqGog4zg3Z
2018-08-01 11:31:24 +02:00
Jan de Mooij
84036b8de4 Bug 1474272 part 4 - Stop using js::GetGlobalForObjectCrossCompartment in xpc::NativeGlobal. r=bholley 2018-08-01 11:25:50 +02:00
Jan de Mooij
47c842b8ff Bug 1474272 part 1 - Remove unused WrappedJSToDictionary. r=bz 2018-08-01 11:25:49 +02:00
Jan de Mooij
ed16c87a11 Bug 1478306 - Actually use the sandbox we create in CacheCreator::CreateCacheStorage. r=baku
AutoSafeJSContext enters the unprivileged junk scope, so CreateSandbox returned a wrapper and then we used the wrapper's global instead of the sandbox global. We now use AutoJSAPI with a null realm.
2018-08-01 11:25:49 +02:00
Emilio Cobos Álvarez
8f34c12e14 Bug 1479860: Remove unused aCompileEventHandlers argument from BindToTree. r=bz
Mostly automatic via sed. Only parts which I touched manually (apart from a
couple ones where I fixed indentation or which had mispelled arguments) are the
callers. I may have removed a couple redundant `virtual` keywords as well when
I started to do it manually, I can revert those if wanted.

Most of them are just removing the argument, but in Element.cpp I also added an
assertion for GetBindingParent when binding the ShadowRoot's kids (the binding
parent is set from the ShadowRoot constructor, and I don't think we bind a
shadow tree during unlink or what not which could cause a behavior difference).

Differential Revision: https://phabricator.services.mozilla.com/D2574

MozReview-Commit-ID: 2oIgatty2HU
2018-08-01 10:42:54 +02:00
Emilio Cobos Álvarez
0e0ef15865 Bug 1479860: Remove aCompileEventHandlers argument in nsXULElement::AddListenerFor. r=bz
All callers pass true.

Differential Revision: https://phabricator.services.mozilla.com/D2573

MozReview-Commit-ID: A0L3QglvFJa
2018-08-01 10:42:54 +02:00
Andrea Marchesini
6c0e1e4469 Bug 1479519 - WPT for Clear-Site-Data executionContexts, r=smaug 2018-08-01 09:01:40 +02:00
Andrea Marchesini
44ce53c72e Bug 1476592 - Remove the cache from nsCSPContext - part 2 - sendViolationReports parameter, r=ckerschb, r=aosmond 2018-08-01 06:35:24 +02:00
Andrea Marchesini
277949ed10 Bug 1476592 - Remove the cache from nsCSPContext - part 1, r=ckerschb 2018-08-01 06:35:21 +02:00
Boris Zbarsky
ee565cfd06 Bug 1479486. Remove some unused chromeonly history APIs on Window. r=mccr8
Well, back() is used, but only in tests, and those can use history.back().
2018-07-31 17:27:03 -04:00
Boris Zbarsky
c15a7558ea Bug 1479475 part 2. Remove dead code in nsGlobalWindowOuter that is inner-window-only. r=nika 2018-07-31 17:27:02 -04:00
Boris Zbarsky
c70cb82b91 Bug 1479475 part 1. Remove dead code in nsGlobalWindowInner that is outer-window-only. r=nika 2018-07-31 17:27:02 -04:00
Boris Zbarsky
e847da3a28 Bug 1479497. Use the API for getting the canvas frame instead of groveling around for it in nsGlobalWindowInner::UpdateCanvasFocus. r=heycam 2018-07-31 17:27:02 -04:00
Zibi Braniecki
a0c2cfd168 Bug 1479606 - Sync BCP47 language tags between processes, not lang tags. r=jfkthame
Sync BCP47 language tags between processes, not lang tags.

Differential Revision: https://phabricator.services.mozilla.com/D2579

--HG--
extra : moz-landing-system : lando
2018-07-31 21:42:37 +00:00
Bogdan Tara
bd351673a5 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-08-01 01:05:56 +03:00
Bogdan Tara
9c44097a0d Merge inbound to mozilla-central. a=merge 2018-08-01 00:58:55 +03:00
Bogdan Tara
642f18b262 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-07-31 21:32:12 +03:00
Jan Varga
27932e0385 Bug 1478573; r=asuth 2018-07-31 12:27:17 +02:00
shindli
eb2f38acfb Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-07-31 13:09:14 +03:00
Emilio Cobos Álvarez
6c81e2e79c Bug 1479450: Convert GetStringValue to use Servo. r=xidorn
And remove gPropertyTable / kCSSRawProperties while at it.

Differential Revision: https://phabricator.services.mozilla.com/D2516

MozReview-Commit-ID: 8U87BcBkrJF
2018-07-31 12:05:00 +02:00
Emilio Cobos Álvarez
2996813963 Bug 1479450: Implement nsCSSProps::LookupProperty using Rust. r=xidorn
Always assume allowed-for-all-content. There are a couple callers which weren't
doing that:

 * A unit test -> removed.

 * ComputeAnimationDistance: Used for testing (in transitions_per_property), and
   for the animation inspector. The animation inspector shouldn't show
   non-enabled properties. The transitions_per_property test already relies on
   getComputedStyle stuff which only uses eForAllContent.

 * GetCSSImageURLs: I added this API for the context menu page and such. It
   doesn't rely on non-enabled-everywhere properties, it was only using
   eInChrome because it was a ChromeOnly API, but it doesn't really need this.

Differential Revision: https://phabricator.services.mozilla.com/D2514

MozReview-Commit-ID: 4VOi5Su3Bos
2018-07-31 12:00:15 +02:00
shindli
f0d8729e09 Merge inbound to mozilla-central. a=merge 2018-07-31 12:50:32 +03:00
Jan de Mooij
01fa47134b Bug 1479363 part 4 - Use JSAutoRealm instead of JSAutoRealmAllowCCW in dom/workers and dom/worklet. r=baku 2018-07-31 08:37:17 +02:00
Jan de Mooij
9b9ef5d8db Bug 1479363 part 3 - Use JSAutoRealm instead of JSAutoRealmAllowCCW in dom/xbl and dom/xul. r=bholley 2018-07-31 08:37:07 +02:00
Byron Campen [:bwc]
a600a51631 Bug 1476600: Stop reusing mids from stopped transceivers. r=jib
When a transceiver is stopped, its mid should not be reused by a new transceiver.

Differential Revision: https://phabricator.services.mozilla.com/D2518

--HG--
extra : moz-landing-system : lando
2018-07-31 20:44:47 +00:00
Kearwood Gilbert
17fa5240f0 Bug 1476797 - Indicate VR session activity indepenently of layer presence r=daoshengmu
MozReview-Commit-ID: 4F0vclSj5gB

Differential Revision: https://phabricator.services.mozilla.com/D2451

--HG--
extra : moz-landing-system : lando
2018-07-31 01:41:25 +00:00
Masayuki Nakano
6da4b51b7b Bug 971462 - Hide event type from constructor of WidgetCommandEvent r=smaug
The constructor of WidgetCommandEvent takes 2 nsAtom pointers.  One is for
specifying event type, the other is for specifying the command.  The
difference of these arguments are pretty unclear for other developers and
the former argument is always nsGkAtoms::onAppCommand unless nullptr in
C++ code.  So, we can hide the former argument.

Then, we should create another constructor for creating empty command event
from constructor of dom::CommandEvent.

Differential Revision: https://phabricator.services.mozilla.com/D2506

--HG--
extra : moz-landing-system : lando
2018-07-30 12:20:47 +00:00
Hiroyuki Ikezoe
9dd9cf1cc1 Bug 1479234 - Factor out a function getting an OMTAValue from the compositor. r=boris
MozReview-Commit-ID: HciPnmLDiYd

--HG--
extra : rebase_source : 46866f562774aadadcd540ab392363770e3d231f
2018-07-31 08:13:04 +09:00