Commit Graph

5143 Commits

Author SHA1 Message Date
Masayuki Nakano
00f4c31bb7 Bug 970802 - part 5: Make AutoEditActionDataSetter created method dispatch "beforeinput" event r=smaug,m_kato
`AutoEditActionDataSetter` is created in the stack when editor's public method
is called and that guarantees lifetime of global objects in editor such as
editor itself, selection controller, etc.

The dispatcher of `beforeinput` event returns `NS_ERROR_EDITOR_ACTION_CANCELED`
if an event is actually dispatched but canceled.  The reason why it's an error
is, editor code must stop handling anything when any methods return error.
So, returning an error code is reasonable in editor module.  But when it's
filtered by `EditorBase::ToGenericNSResult()` at return statement of public
methods, it's converted to `NS_SUCCESS_DOM_NO_OPERATION`.  This avoids throwing
new exception, but editor class users in C++ can distinguish whether each edit
action is canceled or handled.  The reason why we should not throw new
exception from XPCOM API is, without taking care of each caller may break some
our UI (especially for avoiding to break comm-central).  Therefore, this patch
does not make XPCOM methods return error code when `beforeinput` event is
canceled.

In most cases, immediately after creating `AutoEditActionDataSetter` is good
timing to dispatch `beforeinput` event since editor has not touched the DOM
yet.  If `beforeinput` requires `data` or `dataTransfer`, methods need to
dispatch `beforeinput` event after that.  Alhtough this is not a good thing
from point of view of consistency of the code.  However, I have no better
idea.

Note 1: Our implementation does NOT conform to the spec about event order
between `keypress` and `beforeinput` (dispatching `beforeinput` event after
`keypress` event).  However, we follow all other browsers' behavior so that it
must be safe and the spec should be updated for backward compatibility.
Spec issue: https://github.com/w3c/uievents/issues/220

Note 2: Our implementation does NOT conform to the spec about event order
between `compositionupdate` and `beforeinput`.  Our behavior is same as
Safari, but different from Chrome.  This might cause web-compat issues.
However, our behavior does make sense from point of view of consistency of
event spec.  Additionally, at both `compositionupdate` and `beforeinput`,
composition string in editor has not been modified yet.  Therefore, this
may not cause web-compat issues (and I hope so).
Spec issue: https://github.com/w3c/input-events/issues/49

Note that this patch makes editor detect bugs that `beforeinput` event hasn't
been handled yet when it dispatches `input` event or modifying `data` and
`dataTransfer` value are modified after dispatching `beforeinput` event with
`MOZ_ASSERT`s.

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

--HG--
extra : moz-landing-system : lando
2020-01-14 01:09:45 +00:00
Masayuki Nakano
f52c17a188 Bug 970802 - part 4: Make TextControlState dispatch "beforeinput" event if there is no TextEditor r=smaug
If `TextControlState` does not have `TextEditor` and its `SetValue()` is called
from `SetUserInput()`, `TextControlState` itself needs to dispatch `beforeinput`
event.

If the value is modified by `beforeinput` event listener, it's intended that
`preventDefault()` is called by the web apps.  However, the behavior in this
case is not mentioned by UI Events nor Input Events spec.  We should just file
a spec issue instead of emulating Chrome's behavior for now because it requires
more changes, but this case must be an edge case.
The spec issue is: https://github.com/w3c/input-events/issues/106

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

--HG--
extra : moz-landing-system : lando
2020-01-08 09:24:33 +00:00
Masayuki Nakano
81d47ee6d5 Bug 970802 - part 3: Implement beforeinput event dispatcher and add onbeforeinput event handler attribute r=smaug
This patch makes `nsContentUtils::DispatchInputEvent()` dispatch `beforeinput`
event too.  And also adds `onbeforeinput` event handler which is really
important for feature detection (although Chrome has not implemented this
attribute yet: https://bugs.chromium.org/p/chromium/issues/detail?id=947408).

However, we don't implement `InputEvent.getTargetRanges()` in this bug and
implementing `beforeinput` event may hit bugs of some web apps.  Therefore,
this patch disables `beforeinput` event by default even in Nightly channel.

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

--HG--
extra : moz-landing-system : lando
2020-01-08 09:23:40 +00:00
Masayuki Nakano
583465bce4 Bug 970802 - part 1: Add beforeinput event tests into existing mochitests r=smaug
This patch adds a lot of `beforeinput` event tests into existing mochitests
which test `input` events.  But this does not add tests of canceling
`beforeinput` event because it requires really complicated path until
implementing `beforeinput` actually.

Note that `beforeinput` event is not fired with `Document.execCommand()`.
Therefore, this patch does not add WPT for testing `beforeinput` event.
And unfortunately, WPT cannot test most cases of the new tests.

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

--HG--
extra : moz-landing-system : lando
2020-01-08 09:22:50 +00:00
Emilio Cobos Álvarez
cdd999d4e9 Bug 1608905 - Parse the HTMLImageElement.loading attribute. r=smaug
Behind a pref of course. Toggle that pref on on the loading/lazyload test
subdirectory, though there are no tests for the IDL (I guess once the spec PR
lands the existing IDL tests will be updated from the spec).

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

--HG--
extra : moz-landing-system : lando
2020-01-13 21:10:43 +00:00
Boris Zbarsky
59239b7c5c Bug 1607918. Fix case handling for webkit-prefixed transition/animation event handlers. r=smaug.
The WPTs were cherrypicked from e05bdb8e0d

The issue in dom/events/test/test_bug1332699.html was discussed in
https://bugzilla.mozilla.org/show_bug.cgi?id=1332699#c8 and
https://bugzilla.mozilla.org/show_bug.cgi?id=1332699#c10 but Xidorn never quite
made it clear enough what the issue was, so it ended up making it into the tree.

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

--HG--
extra : moz-landing-system : lando
2020-01-13 20:04:59 +00:00
Jonathan Kingston
84c462a2d0 Bug 1605814 - Don't capture CSP nonce when loading a child sheet. r=emilio,ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D58686

--HG--
extra : moz-landing-system : lando
2020-01-13 11:47:25 +00:00
Emilio Cobos Álvarez
aaecc96d81 Bug 1588791 - Make fission iframes honor and deal with the scrolling attribute. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D59630

--HG--
extra : moz-landing-system : lando
2020-01-13 11:30:44 +00:00
Ciure Andrei
51c540de3d Backed out 2 changesets (bug 1588791) for causing test_bug369370.html and test_transformed_scrolling_repaints_3.html to permafail
Backed out changeset 52e661ff161d (bug 1588791)
Backed out changeset d59e691bda9e (bug 1588791)
2020-01-13 04:49:16 +02:00
Emilio Cobos Álvarez
6e69347f9f Bug 1588791 - Make fission iframes honor and deal with the scrolling attribute. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D59630

--HG--
extra : moz-landing-system : lando
2020-01-12 22:22:29 +00:00
alwu
c2d2ecbd96 Bug 1595603 - part2 : delay seeking task when media is inactive r=bryce
When media element is inactive, asking MDSM to seek is actually useless, because all the data we decode won't be showed to user. In addition, we have to store extra pending events for `seeking` and `seeked`, which might result in memory overflow if the inactive page is calling `seek()` all the time.

Therfore, we should delay all seeking tasks while media is inactive, and perform the latest seeking task when media becomes active.

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

--HG--
extra : moz-landing-system : lando
2020-01-09 17:10:08 +00:00
alwu
25786bc918 Bug 1595603 - part1 : remove duplicate parameter and rename variable r=bryce
Two parameters in `SuspendOrResumeElement()` are acutally the same, they are both related with `IsActive()`, so using one parameter is enough.
In addition, we only suspend or resume element by checking element's active state, so rename `mPausedForInactiveDocumentOrChannel` to `mSuspendedForInactiveDocument` which fits the actual situation more.

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

--HG--
extra : moz-landing-system : lando
2020-01-09 06:10:02 +00:00
Johann Hofmann
b61a4aacf6 Bug 1597029 - Set securityInfo for all document types. r=baku
In StartDocumentLoad we copy the securityInfo reference from the load channel into a document
member variable. This used to happen only for HTML documents, but other documents (e.g. media)
can be loaded via secure channels, too and thus should have securityInfos. We're using the
securityInfo object to display information in the UI, which would previously fail for images and videos.

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

--HG--
extra : moz-landing-system : lando
2020-01-09 14:55:02 +00:00
Jeff Gilbert
f26e4d546b Bug 1477756 - Fix non-webgl CI tests. r=handyman
* Revert some partial webgl+oop+vr code.
* More missing FuncScope.
* Fix compile errors.
* Refactor some ifdef'd code to branch and compile on all platforms.
* -Wno-error=unused-result for GCC to allow for (void)MustUse().

Depends on D55739

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

--HG--
extra : moz-landing-system : lando
2020-01-08 22:19:26 +00:00
Jeff Gilbert
e1d0fe64bb Bug 1477756 - Client-side bindings mirror for precise CC, and merge similar codepaths. r=handyman
* Context loss using RAII
* Move Program reflection Client-side

Depends on D54018

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

--HG--
extra : moz-landing-system : lando
2020-01-08 22:19:16 +00:00
David Parks
198fa063c2 Bug 1477756 - Initial out-of-process WebGL implementation. r=mccr8,handyman
Splits WebGLContext into ClientWebGLContext and HostWebGLContext.  The Client enables the JS-control of a WebGL context in a content procecss while the Host executes the WebGL graphics operations (via a WebGLContext that maintains much of the existing code) in the compositor process.  At this point, the cross-process behavior is disabled -- this series of patches is an incremental step toward that final goal.

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

--HG--
extra : moz-landing-system : lando
2020-01-08 22:19:14 +00:00
Valentin Gosu
16ae7bd480 Bug 1552176 - pass TRRMode into nsHTMLDNSPrefetch methods r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D49159

--HG--
extra : moz-landing-system : lando
2020-01-07 19:33:51 +00:00
sotaro
68439d9c26 Bug 1598998 - Fix CanvasContextType::ImageBitmap handling r=nical
Differential Revision: https://phabricator.services.mozilla.com/D56348

--HG--
extra : moz-landing-system : lando
2020-01-08 01:12:50 +00:00
Mihai Alexandru Michis
c8ca91e7db Backed out changeset 67142a370d4a (bug 1598998) for causing failures in ImageBitmapRenderingContext.cpp
CLOSED TREE

--HG--
extra : histedit_source : 1e4895b3c8773f7881b99f1ab0fca9c6b64b7644
2020-01-07 01:49:59 +02:00
sotaro
374fa2d1ea Bug 1598998 - Fix CanvasContextType::ImageBitmap handling r=nical
Differential Revision: https://phabricator.services.mozilla.com/D56348

--HG--
extra : moz-landing-system : lando
2020-01-06 10:14:15 +00:00
Emilio Cobos Álvarez
5e95f50f4f Bug 1606659 - Don't pass margin and scrollbar preferences to nsFrameLoader::Show. r=mattwoodrow
Instead, get them on the relevant code paths.

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

--HG--
extra : moz-landing-system : lando
2020-01-05 22:48:40 +00:00
Andrew Sutherland
eb447022c9 Bug 1588148 - extend test timeout for long-running test. r=perry
Differential Revision: https://phabricator.services.mozilla.com/D58385

--HG--
extra : moz-landing-system : lando
2020-01-04 21:44:51 +00:00
Narcis Beleuzu
c1482e434d Backed out changeset c5f2b5b4a45f (bug 1588148) for mochitest failures on test_formSubmission.html . CLOSED TREE 2020-01-04 22:08:40 +02:00
Andrew Sutherland
30b6e43a67 Bug 1588148 - extend test timeout for long-running test. r=perry
Differential Revision: https://phabricator.services.mozilla.com/D58385

--HG--
extra : moz-landing-system : lando
2020-01-03 22:18:36 +00:00
alwu
2d2b857325 Bug 1571493 - part3 : notify media state and audible state changes. r=chunmin
Modify IPC method to support notify `ControlledMediaState` to the media controller, and remove the previous implementation.

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

--HG--
extra : moz-landing-system : lando
2020-01-03 01:34:34 +00:00
alwu
f5053f5850 Bug 1571493 - part2 : use 'MediaControlAgent' in media element. r=chunmin
We create `MediaControlEventListener` to register itself to the `MediaControlAgent` that is an event source, so that we can receive the media control event from the evnet source and operate media according to different types of event.

 `MediaControlEventListener` is also used to notify controlled media state to the media controller. When media first starts playing, or leaves bfcache and  has created listener before, we would notify `eStarted`. Notify `eStopped` when media destroys, or enter bfcache and has created listener before. When media's playing state changes, we would notifty `ePlayed` or `ePaused` depeding on media's `mPaused`.

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

--HG--
extra : moz-landing-system : lando
2020-01-03 01:20:01 +00:00
Emma Malysz
be8bd71702 Bug 1601110, remove handling and references to vnd.mozilla.xul+xml r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D57567

--HG--
extra : moz-landing-system : lando
2019-12-23 23:02:05 +00:00
Emma Malysz
c028f5125c Bug 1605737, remove XUL cached type r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D58140

--HG--
extra : moz-landing-system : lando
2019-12-23 17:10:15 +00:00
Emilio Cobos Álvarez
ff130db72b Bug 981248 - Fix test_input_number_mouse_events.html to not dispatch mouse events from input events. r=masayuki
The test fails with my <input type=number> rewrite because editor fails to
dispatch one input event caused by these mouse events.

The reason for this is that we schedule them from an input event, which fires
from here:

  https://searchfox.org/mozilla-central/rev/6305f6935f496b3a302c7afcc579399a4217729c/editor/libeditor/EditorBase.cpp#965

Not how at that point we still haven't decremented mPlaceholderBatch. That means
that other stuff that triggers input events from there will not dispatch events.

I think that's a bit unexpected, but it is a preexisting problem, and can't
happen for users because mouse events go through the event loop.

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

--HG--
extra : moz-landing-system : lando
2019-12-20 13:54:48 +00:00
Chris Peterson
406763af7f Bug 1570499 - Part 1: Replace MOZ_FALLTHROUGH macro with C++17's [[fallthrough]] attribute. r=froydnj
This changeset is a simple find and replace of `MOZ_FALLTHROUGH` and `[[fallthrough]]`.

Unfortunately, the MOZ_FALLTHROUGH_ASSERT macro (to assert on case fallthrough in debug builds) is still necessary after switching from [[clang::fallthrough]] to [[fallthrough]] because:

* MOZ_ASSERT(false) followed by [[fallthrough]] triggers a -Wunreachable-code warning in DEBUG builds
* but MOZ_ASSERT(false) without [[fallthrough]] triggers a -Wimplicit-fallthrough warning in NDEBUG builds.

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

--HG--
extra : moz-landing-system : lando
2019-12-20 07:16:43 +00:00
Tyler
ea8b8dab8a Bug 1601475 - Remove ImageContentLoaded event and ImageDocumentLoaded message handling code across the tree r=Gijs,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D56051

--HG--
extra : moz-landing-system : lando
2019-12-18 21:46:51 +00:00
Alastor Wu
6305f6935f Bug 1588138 - reset blessed state when media aborting current load. r=bryce
This patch is used to change the blessed state for media element under `click-to-play` blocking autoplay policy, which only allows play invocation called from user input handler, eg. `onclick`.

When media aborts current load, we should regard it as a new media. One example is on Youtube they always reuse same media element but replace its url for different video. Therefore, we should reset media's blessed state so that the media with new url can be blocked again.

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

--HG--
extra : moz-landing-system : lando
2019-12-18 04:11:12 +00:00
Andrew McCreight
058daef5d2 Bug 1603879 - Add a memory reporter for HTMLMediaElement::mPendingEvents. r=erahm
Differential Revision: https://phabricator.services.mozilla.com/D57376

--HG--
extra : moz-landing-system : lando
2019-12-17 02:55:15 +00:00
Oana Pop Rus
661db3a39f Backed out 7 changesets (bug 1432856) for build bustages failures in nsWindow.h on a CLOSED TREE
Backed out changeset 3d08c3cce533 (bug 1432856)
Backed out changeset 49d03dd89b17 (bug 1432856)
Backed out changeset 62fc84c8ce99 (bug 1432856)
Backed out changeset a8a4fa63f5b2 (bug 1432856)
Backed out changeset c81f3d5b9bf3 (bug 1432856)
Backed out changeset 8351a8b1d96a (bug 1432856)
Backed out changeset a303b775a51b (bug 1432856)
2019-12-16 23:53:35 +02:00
pbz
2a543b67bb Bug 1432856 - Disable fullscreen leave on raise and open for fullscreen-multiple test. r=smaug
Depends on D56391

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

--HG--
extra : moz-landing-system : lando
2019-12-16 21:23:50 +00:00
pbz
e03ecc2171 Bug 1432856 - Extended focus methods in Window.webidl, Client.webidl and Element.webidl to pass CallerType. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D55811

--HG--
extra : moz-landing-system : lando
2019-12-16 21:06:11 +00:00
Emilio Cobos Álvarez
ac506d6f4b Bug 1603889 - Simplify the scrollbar preference setup. r=smaug
So much plumbing to pass an enum down.

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

--HG--
extra : moz-landing-system : lando
2019-12-15 22:56:23 +00:00
Kris Maglione
0b1a146519 Bug 1596918: Part 4c - Fix callers which depend on document lifecycle changes. r=mccr8
ContentTask tasks have a different lifetime than SpecialPowers tasks, with the
former being tied to the lifetime of a message manager and the latter tied to
the lifetime of a window global. That means that existing ContentTask callers
which expect to be able to register load listeners before the creation of a
window global, or which expect to persist after a page has navigated, won't
work as SpecialPowers tasks.

Since those sorts of tasks are not really resilient in the face of Fission,
they should really be written to work differently, but this patch mostly just
reverts them to using ContentTask for the time being.

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

--HG--
extra : moz-landing-system : lando
2019-12-13 20:36:36 +00:00
Kris Maglione
9853440599 Bug 1596918: Part 3b - Run code formatters on files changed by previous patch. r=mccr8,remote-protocol-reviewers,ato
Differential Revision: https://phabricator.services.mozilla.com/D53741

--HG--
extra : moz-landing-system : lando
2019-12-13 20:36:24 +00:00
Kris Maglione
94e3b0bd8d Bug 1596918: Part 3a - Scripted rewrite of most ContentTask.spawn calls to SpecialPowers.spawn calls. r=mccr8,remote-protocol-reviewers,ato
This is generally pretty straightforward, and rewrites nearly all calls. It
skips the ones that it can detect using frame script globals like
`sendAsyncMessage`, though.

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

--HG--
extra : moz-landing-system : lando
2019-12-13 20:36:16 +00:00
Boris Zbarsky
ee1cc488f2 Bug 1602483 part 2. Add a window id argument to CheckLoadURIWithPrincipal. r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D56428

--HG--
rename : devtools/client/webconsole/test/browser/browser_webconsole_same_origin_errors.js => devtools/client/webconsole/test/browser/browser_webconsole_checkloaduri_errors.js
rename : devtools/client/webconsole/test/browser/test-same-origin-required-load.html => devtools/client/webconsole/test/browser/test-checkloaduri-failure.html
extra : moz-landing-system : lando
2019-12-12 16:41:19 +00:00
Emilio Cobos Álvarez
b498defa90 Bug 1603455 - Remove full-screen-api.unprefix.enabled. r=xidorn,smaug
It's been enabled since Firefox 64.

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

--HG--
extra : moz-landing-system : lando
2019-12-13 13:27:27 +00:00
Noemi Erli
2b5af87228 Backed out changeset d23f209ada8b (bug 1603455) for causing failures in test_fullscreen-api.html
--HG--
extra : rebase_source : 7b7990746d3884eeced2404ed9bc78590db4b77c
2019-12-12 23:49:35 +02:00
Emilio Cobos Álvarez
8d6730e227 Bug 1603455 - Remove full-screen-api.unprefix.enabled. r=xidorn,smaug
It's been enabled since Firefox 64.

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

--HG--
extra : moz-landing-system : lando
2019-12-12 19:56:10 +00:00
Henri Sivonen
5c2bad25ab Bug 1551276 - Autodetect legacy encodings on unlabeled pages. r=emk
Differential Revision: https://phabricator.services.mozilla.com/D56362

--HG--
extra : moz-landing-system : lando
2019-12-12 17:50:19 +00:00
Ciure Andrei
6c95adafed Backed out 4 changesets (bug 1602483, bug 1602090) for causing perma leackchecks CLOSED TREE
Backed out changeset 6b057ba06b4a (bug 1602483)
Backed out changeset 9be3269d781d (bug 1602483)
Backed out changeset e3e2c1d7478e (bug 1602090)
Backed out changeset fdc4a588912e (bug 1602090)
2019-12-12 18:37:01 +02:00
Oana Pop Rus
df78d6011c Backed out changeset 0810ad586986 (bug 1551276) for wpt failures in ar-ISO-8859-6-late.tentative.html on a CLOSED TREE 2019-12-12 16:38:54 +02:00
Boris Zbarsky
4425adb1cc Bug 1602483 part 2. Add a window id argument to CheckLoadURIWithPrincipal. r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D56428

--HG--
rename : devtools/client/webconsole/test/browser/browser_webconsole_same_origin_errors.js => devtools/client/webconsole/test/browser/browser_webconsole_checkloaduri_errors.js
rename : devtools/client/webconsole/test/browser/test-same-origin-required-load.html => devtools/client/webconsole/test/browser/test-checkloaduri-failure.html
extra : moz-landing-system : lando
2019-12-12 13:05:12 +00:00
Henri Sivonen
07527a83c9 Bug 1551276 - Autodetect legacy encodings on unlabeled pages. r=emk
Differential Revision: https://phabricator.services.mozilla.com/D56362

--HG--
extra : moz-landing-system : lando
2019-12-12 12:59:47 +00:00
Mark Banner
2103c3b16a Bug 1601681 - Switch recently added files with Windows line endings to Unix. r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D55990

--HG--
extra : moz-landing-system : lando
2019-12-11 08:12:49 +00:00
Alastor Wu
47d2457f3e Bug 1602163 - part2 : remove 'corruptedFrames' from 'VideoPlaybackQuality' r=bzbarsky
According to [1], we're going to deprecate this attribute.

[1] https://github.com/w3c/media-playback-quality/pull/20

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

--HG--
extra : moz-landing-system : lando
2019-12-11 07:19:15 +00:00
Masayuki Nakano
a2a7b27d8d Bug 1599971 - part 5: Mark TextControlState::UnbindFromFrame() as MOZ_CAN_RUN_SCRIPT r=m_kato,emilio
Note that `TextControlState::BindToFrame()` may also run script if it's
called without script blocker.  However, it shouldn't occur.  Therefore,
we don't need to mark it `MOZ_CAN_RUN_SCRIPT`, but we should check
script blocker existence with `MOZ_ASSERT`.

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

--HG--
extra : moz-landing-system : lando
2019-12-11 03:04:20 +00:00
Masayuki Nakano
c13f925d16 Bug 1599971 - part 4: Mark TextControlState::GetTextEditor() as MOZ_CAN_RUN_SCRIPT r=m_kato
If `PreareEditor()` returns `NS_OK`, but if the instance is deleted at returning
from it, `GetTextEditor()` will access `mTextEditor`.  Therefore, this patch
makes `PrepareEditor()` return error if the instance is destroyed at its end.

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

--HG--
extra : moz-landing-system : lando
2019-12-11 03:03:31 +00:00
Masayuki Nakano
0b75352ba4 Bug 1599971 - part 3: Mark nsITextControlFrame::SetSelectionRange() as MOZ_CAN_RUN_SCRIPT r=m_kato
Similar to the previous patch, it may notify selection listeners of native
anonymous tree in `<input>` and `<textarea>` element.

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

--HG--
extra : moz-landing-system : lando
2019-12-11 03:02:53 +00:00
Masayuki Nakano
f9203c9b66 Bug 1599971 - part 2: Mark TextControlState::DeleteOrCacheForReuse() and TextControlState::Reuse() as MOZ_CAN_RUN_SCRIPT r=m_kato
They are really complicated and can run script while the instance is being
destroyed.  Therefore, they should have their own `AutoTextControlHandlingState`
as "kungFuDeathGrip".

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

--HG--
extra : moz-landing-system : lando
2019-12-11 03:02:46 +00:00
Masayuki Nakano
a26ed4b301 Bug 1599971 - part 1: Mark constructors of AutoTextControlHandlingState as MOZ_CAN_RUN_SCRIPT r=m_kato
The destructor of `AutoTextControlHandlingState`is marked as
`MOZ_CAN_RUN_SCRIPT`, but it's not checked at build time.  And this does not
need to be created when the method does not run script.  Therefore, we should
mark its constructor as `MOZ_CAN_RUN_SCRIPT` instead since it's stack only
class so that its constructor and destructor are always called from same
method.

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

--HG--
extra : moz-landing-system : lando
2019-12-11 03:01:37 +00:00
shindli
91924fedc7 Backed out 9 changesets (bug 1596918) for causing mochitest permafailures in toolkit/content/tests/chrome/test_findbar_events.xhtml CLOSED TREE
Backed out changeset 45a1c42118f2 (bug 1596918)
Backed out changeset db09910ffa56 (bug 1596918)
Backed out changeset 5c9d9f141c10 (bug 1596918)
Backed out changeset 6a135670d603 (bug 1596918)
Backed out changeset 3a0184e0df72 (bug 1596918)
Backed out changeset 2f0036486823 (bug 1596918)
Backed out changeset a770c6d08d52 (bug 1596918)
Backed out changeset ef062eb7a6ee (bug 1596918)
Backed out changeset a6ea596e98db (bug 1596918)
2019-12-11 03:09:26 +02:00
Kris Maglione
356e59c6bc Bug 1596918: Part 4c - Fix callers which depend on document lifecycle changes. r=mccr8
ContentTask tasks have a different lifetime than SpecialPowers tasks, with the
former being tied to the lifetime of a message manager and the latter tied to
the lifetime of a window global. That means that existing ContentTask callers
which expect to be able to register load listeners before the creation of a
window global, or which expect to persist after a page has navigated, won't
work as SpecialPowers tasks.

Since those sorts of tasks are not really resilient in the face of Fission,
they should really be written to work differently, but this patch mostly just
reverts them to using ContentTask for the time being.

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

--HG--
extra : moz-landing-system : lando
2019-12-10 23:07:22 +00:00
Kris Maglione
3ca78ce8e3 Bug 1596918: Part 3b - Run code formatters on files changed by previous patch. r=mccr8,remote-protocol-reviewers,ato
Differential Revision: https://phabricator.services.mozilla.com/D53741

--HG--
extra : moz-landing-system : lando
2019-12-10 23:07:21 +00:00
Kris Maglione
16a9b29848 Bug 1596918: Part 3a - Scripted rewrite of most ContentTask.spawn calls to SpecialPowers.spawn calls. r=mccr8,remote-protocol-reviewers,ato
This is generally pretty straightforward, and rewrites nearly all calls. It
skips the ones that it can detect using frame script globals like
`sendAsyncMessage`, though.

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

--HG--
extra : moz-landing-system : lando
2019-12-10 23:07:13 +00:00
Emilio Cobos Álvarez
707ed5c818 Bug 1602421 - Remove some useless includes. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D56350

--HG--
extra : moz-landing-system : lando
2019-12-09 14:53:50 +00:00
Boris Zbarsky
4aa649053b Bug 1601377 part 2. Make it clear that nsContentUtils::PrincipalHasPermission never takes a null nsIPrincipal. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D56217

--HG--
extra : moz-landing-system : lando
2019-12-08 21:10:15 +00:00
Daniel Varga
6e13799734 Backed out changeset e65c1bcb013f (bug 1601475) for causing build bustage. On a CLOSED TREE 2019-12-09 12:51:07 +02:00
Tyler
103588ae45 Bug 1601475 - Remove ImageContentLoaded event and ImageDocumentLoaded message handling code across the tree r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D56051

--HG--
extra : moz-landing-system : lando
2019-12-09 10:18:25 +00:00
Noemi Erli
82d41a33b2 Backed out 9 changesets (bug 1596918) for causing multiple browser-chrome failures
Backed out changeset 415007efd8c9 (bug 1596918)
Backed out changeset 011eb5ce927b (bug 1596918)
Backed out changeset e5fd3ee22ea1 (bug 1596918)
Backed out changeset 0bca4de31d40 (bug 1596918)
Backed out changeset 11ec4393f23d (bug 1596918)
Backed out changeset c5404a7c286d (bug 1596918)
Backed out changeset 7e9304405a46 (bug 1596918)
Backed out changeset fa0f0aeabf99 (bug 1596918)
Backed out changeset de196b077000 (bug 1596918)
2019-12-07 22:26:43 +02:00
Kris Maglione
bd497b1a21 Bug 1596918: Part 4c - Fix callers which depend on document lifecycle changes. r=mccr8
ContentTask tasks have a different lifetime than SpecialPowers tasks, with the
former being tied to the lifetime of a message manager and the latter tied to
the lifetime of a window global. That means that existing ContentTask callers
which expect to be able to register load listeners before the creation of a
window global, or which expect to persist after a page has navigated, won't
work as SpecialPowers tasks.

Since those sorts of tasks are not really resilient in the face of Fission,
they should really be written to work differently, but this patch mostly just
reverts them to using ContentTask for the time being.

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

--HG--
extra : moz-landing-system : lando
2019-12-07 18:44:34 +00:00
Kris Maglione
fa3556c3fc Bug 1596918: Part 3b - Run code formatters on files changed by previous patch. r=mccr8,remote-protocol-reviewers,ato
Differential Revision: https://phabricator.services.mozilla.com/D53741

--HG--
extra : moz-landing-system : lando
2019-12-07 18:44:34 +00:00
Kris Maglione
910eab35d2 Bug 1596918: Part 3a - Scripted rewrite of most ContentTask.spawn calls to SpecialPowers.spawn calls. r=mccr8,remote-protocol-reviewers,ato
This is generally pretty straightforward, and rewrites nearly all calls. It
skips the ones that it can detect using frame script globals like
`sendAsyncMessage`, though.

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

--HG--
extra : moz-landing-system : lando
2019-12-07 19:11:58 +00:00
Daniel Varga
84a601a6d4 Backed out 17 changesets (bug 1596918) for multiple browser-chrome and dev-tools failures. On a CLOSED TREE
Backed out changeset ab87d2c1afae (bug 1596918)
Backed out changeset 775f3b06a687 (bug 1596918)
Backed out changeset 67cc63ef5d7f (bug 1596918)
Backed out changeset 7d290bcd2067 (bug 1596918)
Backed out changeset 048db9f4db7c (bug 1596918)
Backed out changeset 96a79d2ba614 (bug 1596918)
Backed out changeset be770d112dd8 (bug 1596918)
Backed out changeset 302c8ab8391c (bug 1596918)
Backed out changeset 44ef8f20732e (bug 1596918)
Backed out changeset 38c11ebfb8ff (bug 1596918)
Backed out changeset b586fc081374 (bug 1596918)
Backed out changeset 12283166716f (bug 1596918)
Backed out changeset 99b0421015d8 (bug 1596918)
Backed out changeset 97ec49dbbbf3 (bug 1596918)
Backed out changeset ec79478f58f1 (bug 1596918)
Backed out changeset c6d356833bb8 (bug 1596918)
Backed out changeset 5ef6026806c8 (bug 1596918)
2019-12-07 03:12:07 +02:00
Kris Maglione
73e3d8bcf6 Bug 1596918: Part 4c - Fix callers which depend on document lifecycle changes. r=mccr8
ContentTask tasks have a different lifetime than SpecialPowers tasks, with the
former being tied to the lifetime of a message manager and the latter tied to
the lifetime of a window global. That means that existing ContentTask callers
which expect to be able to register load listeners before the creation of a
window global, or which expect to persist after a page has navigated, won't
work as SpecialPowers tasks.

Since those sorts of tasks are not really resilient in the face of Fission,
they should really be written to work differently, but this patch mostly just
reverts them to using ContentTask for the time being.

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

--HG--
extra : moz-landing-system : lando
2019-12-06 22:15:25 +00:00
Kris Maglione
b5238224ba Bug 1596918: Part 3b - Run code formatters on files changed by previous patch. r=mccr8,remote-protocol-reviewers,ato
Differential Revision: https://phabricator.services.mozilla.com/D53741

--HG--
extra : moz-landing-system : lando
2019-12-06 22:14:22 +00:00
Kris Maglione
20da940e14 Bug 1596918: Part 3a - Scripted rewrite of most ContentTask.spawn calls to SpecialPowers.spawn calls. r=mccr8,remote-protocol-reviewers,ato
This is generally pretty straightforward, and rewrites nearly all calls. It
skips the ones that it can detect using frame script globals like
`sendAsyncMessage`, though.

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

--HG--
extra : moz-landing-system : lando
2019-12-06 22:14:14 +00:00
Gabriele Svelto
ace6d1063f Bug 1600545 - Remove useless inclusions of header files generated from IDL files in dom/ r=Ehsan
The inclusions were removed with the following very crude script and the
resulting breakage was fixed up by hand. The manual fixups did either
revert the changes done by the script, replace a generic header with a more
specific one or replace a header with a forward declaration.

find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
    interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
    if [ -n "$interfaces" ]; then
        if [[ "$interfaces" == *$'\n'* ]]; then
          regexp="\("
          for i in $interfaces; do regexp="$regexp$i\|"; done
          regexp="${regexp%%\\\|}\)"
        else
          regexp="$interfaces"
        fi
        interface=$(basename "$path")
        rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
            hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
            if [ $hits -eq 0 ]; then
                echo "Removing ${interface} from ${path2}"
                grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
                mv -f "$path2".tmp "$path2"
            fi
        done
    fi
done

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

--HG--
extra : moz-landing-system : lando
2019-12-06 09:24:56 +00:00
Marcos Cáceres
78f831bf6c Bug 1596040 - Teach HTMLLinkElement's relList about 'manifest' r=bzbarsky
Fenix wants to ship Web Manifest support, while other Firefox products (e.g., Desktop) don't support it.

With the pref enabled, developers can check, via `link.relList.supports()`, if manifest processing is supported by a particular product.

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

--HG--
extra : moz-landing-system : lando
2019-12-06 04:17:04 +00:00
Boris Zbarsky
75124bdd98 Bug 1517588. Use nsIPrincipal::IsSystemPrincipal instead of nsContentUtils::IsSystemPrincipal r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D53067

--HG--
extra : moz-landing-system : lando
2019-12-05 04:44:32 +00:00
Dorel Luca
a381d5c96d Backed out changeset f6e53d1c6518 (bug 1600545) for Android build bustage. CLOSED TREE 2019-12-04 17:32:27 +02:00
Gabriele Svelto
bc9290f767 Bug 1600545 - Remove useless inclusions of header files generated from IDL files in dom/ r=Ehsan
The inclusions were removed with the following very crude script and the
resulting breakage was fixed up by hand. The manual fixups did either
revert the changes done by the script, replace a generic header with a more
specific one or replace a header with a forward declaration.

find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
    interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
    if [ -n "$interfaces" ]; then
        if [[ "$interfaces" == *$'\n'* ]]; then
          regexp="\("
          for i in $interfaces; do regexp="$regexp$i\|"; done
          regexp="${regexp%%\\\|}\)"
        else
          regexp="$interfaces"
        fi
        interface=$(basename "$path")
        rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
            hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
            if [ $hits -eq 0 ]; then
                echo "Removing ${interface} from ${path2}"
                grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
                mv -f "$path2".tmp "$path2"
            fi
        done
    fi
done

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

--HG--
extra : moz-landing-system : lando
2019-12-04 15:01:19 +00:00
Ehsan Akhgari
d94f27a8d6 Bug 1595934 - Make nsICookieManager cookie enumerators return Array<nsICookie> instead of nsISimpleEnumerator; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D52761

--HG--
extra : moz-landing-system : lando
2019-12-03 17:08:25 +00:00
John Dai
9186958d1f Bug 1552301 - Implement form.requestSubmit(); r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D54278

--HG--
extra : moz-landing-system : lando
2019-12-03 10:13:41 +00:00
Thomas Nguyen
18482671c9 Bug 1595720 - Disable fullscreen in third party by default r=baku
Differential Revision: https://phabricator.services.mozilla.com/D54194

--HG--
extra : moz-landing-system : lando
2019-12-02 16:01:09 +00:00
Emilio Cobos Álvarez
e1918d8385 Bug 1600353 - Make TextTrackSource and TextTrackReadyState enum classes. r=bzbarsky
To avoid defining `Loading`, `Loaded`, etc. in the mozilla::dom namespace. Also
it is a bit cleaner and saves some memory in the TextTrack objects by specifying
the size to be smaller.

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

--HG--
extra : moz-landing-system : lando
2019-12-02 19:13:11 +00:00
Ciure Andrei
1b5b6af7bd Backed out 2 changesets (bug 1598470, bug 1595720) for causing browser_fullscreen_cross_origin.js to permafail CLOSED TREE
Backed out changeset 02fbe3085e54 (bug 1598470)
Backed out changeset 40f6133b6b61 (bug 1595720)
2019-12-02 12:55:37 +02:00
Thomas Nguyen
8962c61512 Bug 1595720 - Disable fullscreen in third party by default r=baku
Differential Revision: https://phabricator.services.mozilla.com/D54194

--HG--
extra : moz-landing-system : lando
2019-12-02 09:39:33 +00:00
Emilio Cobos Álvarez
3c12d374bc Bug 1600362 - Cleanup IntersectionObserver. r=smaug
Initially this was going to be a simple cleanup: Remove some useless namespaces
here and there and so on, remove `using` statements from the header and so on.

But unfortunately, DOMIntersectionObserver.h (which is included in Element.h,
unnecessarily) ended up exposing `Element` unnamespaced to a lot of code, so I
had to fix that.

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

--HG--
extra : moz-landing-system : lando
2019-11-29 20:39:36 +00:00
Emilio Cobos Álvarez
ec4d0f06f5 No bug - Minor ImageLoadTask cleanup.
Just removing unneeded virtual, and marking the class as final.

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

--HG--
extra : moz-landing-system : lando
2019-11-29 20:04:18 +00:00
Honza Bambas
ce072f8e6a Bug 1594449 - <link rel="preload"> implemented as a speculative load initiated during the prescan phase in the HTML5 parser, disabled by default, only supports "script" and "styles" types, r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D52019

--HG--
extra : moz-landing-system : lando
2019-11-27 21:45:12 +00:00
Emilio Cobos Álvarez
a6a78ce682 Bug 1599843 - Element::SetEventHandler is infallible. r=bzbarsky
Depends on D54996

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

--HG--
extra : moz-landing-system : lando
2019-11-27 20:01:38 +00:00
Sylvestre Ledru
8d2f0d1b1f Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-11-26 14:35:02 +00:00
Emilio Cobos Álvarez
0eb000c3ae Bug 1599161 - Rename nsLayoutStylesheetCache to GlobalStyleSheetCache. r=boris
It's a better name, and will avoid confusion when I add other stylesheet caches
outside of the CSS loader.

Depends on D54556

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

--HG--
rename : layout/style/nsLayoutStylesheetCache.cpp => layout/style/GlobalStyleSheetCache.cpp
rename : layout/style/nsLayoutStylesheetCache.h => layout/style/GlobalStyleSheetCache.h
extra : moz-landing-system : lando
2019-11-25 22:08:43 +00:00
alwu
92b6033d47 Bug 1593843 - part10 : ask for the play permission when creating media element. r=bryce
For media element, as the spec requires that we should know the whether it can be allowed to play when we call `media.play()` [1], which means that we should get the result before the play invocation.

Therefore, we request for the play permission when we create media element.

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

--HG--
extra : moz-landing-system : lando
2019-11-25 11:00:14 +00:00
alwu
54b8cc7893 Bug 1593843 - part8 : move helper functions out from 'AutoplayPolicy'. r=bryce
Move helper functions out from `AutoplayPolicy`, makes us clearly know which one could really be used to determine the blocking autoplay result. It also give other classes an ability to use those helper functions if they have a need.

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

--HG--
extra : moz-landing-system : lando
2019-11-25 11:00:13 +00:00
Masayuki Nakano
3f7057ece8 Bug 1597679 - part 3: Create methods to compare given string with values of TextControlState, nsTextControlFrame, HTMLInputElement and HTMLTextAreaElement r=smaug
For avoiding unnecessary copy of string buffer only for comparing setting
value and current value, especially with `nsAutoString`, this patch
creates `*Equals()` methods for every class.

And also this avoids to call `nsContentUtils::PlatformToDOMLineBreaks()` in
most paths.

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

--HG--
extra : moz-landing-system : lando
2019-11-25 06:35:17 +00:00
Masayuki Nakano
20699e2189 Bug 1597679 - part 2: Make nsITextControlElement inherit nsGenericHTMLFormElementWithState r=smaug
Sub classes of `nsITextControlElement` are only `HTMLInputElement` and
`HTMLTextAreaElement`. And both base class is
`nsGenericHTMLFormElementWithState`.  Therefore, we can make
`nsITextControlElement` inherit `nsGenericHTMLFormElementWithState` and
make `HTMLInputElement` and `HTMLTextAreaElement` inherit
`nsITextControlElement`.  Then, we can get rid of a lot of QI between
`nsINode`/`nsIContent`/`Element` and `nsITextControlElement` (and note that
some of them in a hot path).

Additionally, this patch renames `nsITextControlElement` to
`mozilla::TextControlElement`.

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

--HG--
rename : dom/html/nsITextControlElement.h => dom/html/TextControlElement.h
extra : moz-landing-system : lando
2019-11-25 06:35:15 +00:00
Masayuki Nakano
384ee1a2e7 Bug 1597679 - part 1: Cache multiple TextControlState instances for reuse r=Ehsan
Previously, we cache only one `TextControlState` instance to reuse.  However,
`HTMLTextAreaElement` also started to allocate it in the heap rather than
a part of its instance.  Therefore, we should have more room to cache the
instances for saving the allocation cost.

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

--HG--
extra : moz-landing-system : lando
2019-11-25 06:33:53 +00:00
Coroiu Cristina
84bf2b6d25 Backed out 3 changesets (bug 1597679) for Android debug build bustage at build/src/dom/base/nsContentAreaDragDrop.cpp
Backed out changeset 6a73b58e0db4 (bug 1597679)
Backed out changeset 90a172eff2de (bug 1597679)
Backed out changeset d4a156cf28ff (bug 1597679)

--HG--
rename : dom/html/TextControlElement.h => dom/html/nsITextControlElement.h
2019-11-24 09:02:53 +02:00
Masayuki Nakano
12437404e1 Bug 1597679 - part 3: Create methods to compare given string with values of TextControlState, nsTextControlFrame, HTMLInputElement and HTMLTextAreaElement r=smaug
For avoiding unnecessary copy of string buffer only for comparing setting
value and current value, especially with `nsAutoString`, this patch
creates `*Equals()` methods for every class.

And also this avoids to call `nsContentUtils::PlatformToDOMLineBreaks()` in
most paths.

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

--HG--
extra : moz-landing-system : lando
2019-11-24 05:38:16 +00:00
Masayuki Nakano
eea1784f2d Bug 1597679 - part 2: Make nsITextControlElement inherit nsGenericHTMLFormElementWithState r=smaug
Sub classes of `nsITextControlElement` are only `HTMLInputElement` and
`HTMLTextAreaElement`. And both base class is
`nsGenericHTMLFormElementWithState`.  Therefore, we can make
`nsITextControlElement` inherit `nsGenericHTMLFormElementWithState` and
make `HTMLInputElement` and `HTMLTextAreaElement` inherit
`nsITextControlElement`.  Then, we can get rid of a lot of QI between
`nsINode`/`nsIContent`/`Element` and `nsITextControlElement` (and note that
some of them in a hot path).

Additionally, this patch renames `nsITextControlElement` to
`mozilla::TextControlElement`.

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

--HG--
rename : dom/html/nsITextControlElement.h => dom/html/TextControlElement.h
extra : moz-landing-system : lando
2019-11-24 05:38:02 +00:00
Masayuki Nakano
efafd8cb17 Bug 1597679 - part 1: Cache multiple TextControlState instances for reuse r=Ehsan
Previously, we cache only one `TextControlState` instance to reuse.  However,
`HTMLTextAreaElement` also started to allocate it in the heap rather than
a part of its instance.  Therefore, we should have more room to cache the
instances for saving the allocation cost.

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

--HG--
extra : moz-landing-system : lando
2019-11-24 05:37:26 +00:00
Noemi Erli
23395b20e2 Backed out 13 changesets (bug 1593843) for bustages in Logging.h CLOSED TREE
Backed out changeset b6e3fa6363bd (bug 1593843)
Backed out changeset 3db512256b0d (bug 1593843)
Backed out changeset f67081ea84ee (bug 1593843)
Backed out changeset ad02bb934459 (bug 1593843)
Backed out changeset 1a79176d3f7b (bug 1593843)
Backed out changeset 486c8562b816 (bug 1593843)
Backed out changeset 0d4313c436c5 (bug 1593843)
Backed out changeset 0c7e831d11bf (bug 1593843)
Backed out changeset 02ac8c39f46d (bug 1593843)
Backed out changeset 80895462dddf (bug 1593843)
Backed out changeset 4ab855869725 (bug 1593843)
Backed out changeset 5a24fc933cd6 (bug 1593843)
Backed out changeset f1c50ee60a78 (bug 1593843)
2019-11-23 05:18:17 +02:00
alwu
6d90addd24 Bug 1593843 - part10 : ask for the play permission when creating media element. r=bryce
For media element, as the spec requires that we should know the whether it can be allowed to play when we call `media.play()` [1], which means that we should get the result before the play invocation.

Therefore, we request for the play permission when we create media element.

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

--HG--
extra : moz-landing-system : lando
2019-11-22 21:27:09 +00:00
alwu
f789ab1d90 Bug 1593843 - part8 : move helper functions out from 'AutoplayPolicy'. r=bryce
Move helper functions out from `AutoplayPolicy`, makes us clearly know which one could really be used to determine the blocking autoplay result. It also give other classes an ability to use those helper functions if they have a need.

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

--HG--
extra : moz-landing-system : lando
2019-11-22 09:17:35 +00:00
John Dai
0d5706ade7 Bug 1598684 - Click button element with button type should do nothing; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D54367

--HG--
extra : moz-landing-system : lando
2019-11-22 21:11:39 +00:00
Andreas Pehrson
3c385b4b80 Bug 1536156 - Stop doing EndCloningVisually in Unlink. r=mconley
Unlink must not cause an AddRef on the unlinked object, or it is at risk of
leaking. See 1593739 for an example of where this happens.

EndCloningVisually is dangerous in that it tries to do more than just unlink the
video element. It does AddRef in NotifyUAWidgetSetupOrChange, so that must be
avoided.

Previous patches to this bug make sure that MediaDecoder shutdown takes care of
clearing the secondary video container in the MediaDecoder stack, so this is not
actually necessary anymore.

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

--HG--
extra : moz-landing-system : lando
2019-11-22 12:52:48 +00:00
Andreas Pehrson
626de4fb8d Bug 1536156 - Let cloneElementVisually() return a promise that resolves when frames have been rendered. r=alwu,mconley,bzbarsky
This patch does the following:
- Makes cloneElementVisually() return a promise
- Plumbs an event from the MediaDecoderStateMachine's VideoSink to
  HTMLVideoElement
- Hooks the event up to resolve the promise from cloneElementVisually()
- Updates tests and their expectations.

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

--HG--
extra : moz-landing-system : lando
2019-11-22 12:52:48 +00:00
Andreas Pehrson
3c62bb84d8 Bug 1596777 - Hook up the SecondaryVideoContainer with state mirroring. r=alwu
This better follows how MediaDecoder and MediaDecoderStateMachine was
architected.

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

--HG--
extra : moz-landing-system : lando
2019-11-22 00:07:04 +00:00
Daniel Varga
f12c40c242 Backed out changeset afe80b4ff889 (bug 1595934) Requested by ehsan to see if it fixex bug 1597915. On a CLOSED TREE 2019-11-22 02:01:51 +02:00
Daniel Varga
af05b317ec Backed out 7 changesets (bug 1597216, bug 1596777, bug 1536156) for reftest failures at reftest/bipbop_300_215kbps.mp4.lastframe.htm. On a CLOSED TREE
Backed out changeset a3fa99d936f3 (bug 1536156)
Backed out changeset 29dd64930421 (bug 1536156)
Backed out changeset 77c16444e714 (bug 1536156)
Backed out changeset d540f1802ff6 (bug 1536156)
Backed out changeset 8283eed414d2 (bug 1536156)
Backed out changeset 01d2c84810f0 (bug 1597216)
Backed out changeset e0184916cf37 (bug 1596777)
2019-11-22 01:58:42 +02:00
Andreas Pehrson
531a7211a9 Bug 1536156 - Stop doing EndCloningVisually in Unlink. r=mconley
Unlink must not cause an AddRef on the unlinked object, or it is at risk of
leaking. See 1593739 for an example of where this happens.

EndCloningVisually is dangerous in that it tries to do more than just unlink the
video element. It does AddRef in NotifyUAWidgetSetupOrChange, so that must be
avoided.

Previous patches to this bug make sure that MediaDecoder shutdown takes care of
clearing the secondary video container in the MediaDecoder stack, so this is not
actually necessary anymore.

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

--HG--
extra : moz-landing-system : lando
2019-11-21 12:40:11 +00:00
Andreas Pehrson
1052205963 Bug 1536156 - Let cloneElementVisually() return a promise that resolves when frames have been rendered. r=alwu,mconley,bzbarsky
This patch does the following:
- Makes cloneElementVisually() return a promise
- Plumbs an event from the MediaDecoderStateMachine's VideoSink to
  HTMLVideoElement
- Hooks the event up to resolve the promise from cloneElementVisually()
- Updates tests and their expectations.

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

--HG--
extra : moz-landing-system : lando
2019-11-20 21:51:48 +00:00
Andreas Pehrson
9d878d1ca7 Bug 1596777 - Hook up the SecondaryVideoContainer with state mirroring. r=alwu
This better follows how MediaDecoder and MediaDecoderStateMachine was
architected.

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

--HG--
extra : moz-landing-system : lando
2019-11-20 16:32:52 +00:00
John Dai
fd9869d4f3 Bug 1551758 - Form submission reentrancy protection for 'submit' and 'invalid' event; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D53696

--HG--
extra : moz-landing-system : lando
2019-11-20 19:39:38 +00:00
John Dai
3c293b08a8 Bug 1551758 - Update spec link and comments for CheckValidFormSubmission and CheckFormValidity; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D53166

--HG--
extra : moz-landing-system : lando
2019-11-20 16:14:37 +00:00
John Dai
a7f881e5fc Bug 1551758 - Centralize form submission; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D53165

--HG--
extra : moz-landing-system : lando
2019-11-20 16:14:39 +00:00
Arthur Iakab
29a9345cd6 Backed out 3 changesets (bug 1551758) for causing wpt failures on form-submission-algorithm.html. CLOSED TREE
Backed out changeset 7f73f8d6d3b1 (bug 1551758)
Backed out changeset 295015e6e79b (bug 1551758)
Backed out changeset 6ffaf0da08d9 (bug 1551758)

--HG--
extra : rebase_source : d86d64bed9c089190125efdd4f63d06ea9e30c97
2019-11-20 18:05:34 +02:00
Andreas Pehrson
df720f22d1 Bug 1592289 - Implement mute/unmute events for media element capture. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D52818

--HG--
extra : moz-landing-system : lando
2019-11-20 15:24:34 +00:00
Andreas Pehrson
67229e8a27 Bug 1592287 - Remove ended captureStream tracks and fire "removetrack" on MediaStream. r=jib
Differential Revision: https://phabricator.services.mozilla.com/D52816

--HG--
extra : moz-landing-system : lando
2019-11-20 15:24:10 +00:00
John Dai
b99ae738cd Bug 1551758 - Form submission reentrancy protection for 'submit' and 'invalid' event; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D53696

--HG--
extra : moz-landing-system : lando
2019-11-19 17:02:40 +00:00
John Dai
375a7b3faf Bug 1551758 - Update spec link and comments for CheckValidFormSubmission and CheckFormValidity; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D53166

--HG--
extra : moz-landing-system : lando
2019-11-19 17:02:38 +00:00
John Dai
a9103e960f Bug 1551758 - Centralize form submission; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D53165

--HG--
extra : moz-landing-system : lando
2019-11-20 13:09:19 +00:00
Andreas Pehrson
ef3f8a0e39 Bug 1593739 - Create a dedicated Unlink path for mSrcStream. r=bryce
Unlink of mSrcStream used to rely on EndSrcMediaStreamPlayback to unhook
everything. That method does more than necessary however, and if anything in it
creates a strong reference to the media element, we risk a leak.

This patch takes what's necessary to unhook from EndSrcMediaStreamPlayback and
runs it explicitly from Unlink, to avoid anything unnecessary being run as well.

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

--HG--
extra : moz-landing-system : lando
2019-11-19 16:29:41 +00:00
Bogdan Tara
26742ff1c1 Backed out changeset 100092ccffcd (bug 1593739) for RefPtr mda perma-failures CLOSED TREE 2019-11-19 00:56:40 +02:00
Andreas Pehrson
daeeabf1da Bug 1593739 - Create a dedicated Unlink path for mSrcStream. r=bryce
Unlink of mSrcStream used to rely on EndSrcMediaStreamPlayback to unhook
everything. That method does more than necessary however, and if anything in it
creates a strong reference to the media element, we risk a leak.

This patch takes what's necessary to unhook from EndSrcMediaStreamPlayback and
runs it explicitly from Unlink, to avoid anything unnecessary being run as well.

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

--HG--
extra : moz-landing-system : lando
2019-11-18 16:44:46 +00:00
Ehsan Akhgari
30cf316b38 Bug 1595934 - Make nsICookieManager cookie enumerators return Array<nsICookie> instead of nsISimpleEnumerator; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D52761

--HG--
extra : moz-landing-system : lando
2019-11-17 07:21:14 +00:00
Noemi Erli
513f38c497 Backed out changeset 0f20566c7b2f (bug 1593739) for causing assertion in StateWatching.h CLOSED TREE 2019-11-15 14:07:06 +02:00
Andreas Pehrson
a91244fa43 Bug 1593739 - Shut down the watch manager during Unlink to prevent future notify tasks. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D51906

--HG--
extra : moz-landing-system : lando
2019-11-15 09:39:15 +00:00
Emilio Cobos Álvarez
de8886fe4f Bug 1596474 - Remove GetBindingParent from nsGenericHTMLElement. r=smaug
The two loops where they're used can't walk across shadow boundaries, so we only
need to check for NAC.

We don't have forms in NAC, so avoid silly book-keeping and just return early
for those cases.

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

--HG--
extra : moz-landing-system : lando
2019-11-14 17:16:01 +00:00
Andreas Pehrson
3f1d369bbf Bug 1302379 - Remove FinishedOnInactive hack from DOMMediaStream. r=jib
It is no longer needed with captured tracks' lifetimes spanning across seek
operations.

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

--HG--
extra : moz-landing-system : lando
2019-11-13 22:40:16 +00:00
Andreas Pehrson
8d201eb310 Bug 1172394 - Hinge UpdateReadyStateInternal off watchables instead of direct updates. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D52047

--HG--
extra : moz-landing-system : lando
2019-11-13 22:39:55 +00:00
Andreas Pehrson
30c47c82ac Bug 1172394 - Use tail dispatching instead of mSrcStreamTracksAvailable. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D52046

--HG--
extra : moz-landing-system : lando
2019-11-13 22:39:58 +00:00
Andreas Pehrson
7fac8df54d Bug 1172394 - Merge MediaStream and MediaDecoder track sources. r=padenot
This reworks how media element captureStream works by removing the differences
between MediaStream and MediaDecoder capture. MediaDecoder capture will be
refactored so that ownership of MediaStreamTracks lies with the media element
instead of the OutputStreamManager. The internal MediaDecoder parts happen in a
later patch.

The new API for capturing a MediaDecoder involves a boolean on/off toggle, the
output tracks the decoder pipes data to, and the principal that data is tagged
with. If capturing is on but there are no output tracks, playback will not
happen, to ensure that no data gets accidentally skipped in the output tracks
while captured.

This also changes the logic for setting up MediaElementTrackSources in
HTMLMediaElement so it's triggered by the WatchManager and thus run in tail
dispatched runnables.

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

--HG--
extra : moz-landing-system : lando
2019-11-13 22:40:09 +00:00
Andreas Pehrson
e324229af5 Bug 1172394 - Make dom::MediaTrack lifetime spec compliant. r=bryce
This makes us forget tracks at the right times. The spec also says no
removetrack events should be fired because of this, yet it seems to be something
other user agents do:
https://wpt.fyi/results/media-source/mediasource-avtracks.html

This is of low importance however, since MediaTracks are prefed off by default.

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

--HG--
extra : moz-landing-system : lando
2019-11-13 22:40:12 +00:00
Csoregi Natalia
6ba30843e8 Backed out 15 changesets (bug 1500049, bug 1172394, bug 1546756, bug 1302379) for failures on browser_disabledForMediaStreamVideos.js. CLOSED TREE
Backed out changeset 355f090421a6 (bug 1500049)
Backed out changeset 306341d0b586 (bug 1302379)
Backed out changeset 3ff0d72d23a2 (bug 1546756)
Backed out changeset a4f256e68cef (bug 1172394)
Backed out changeset d0aa43657e8c (bug 1172394)
Backed out changeset edff95b6f724 (bug 1172394)
Backed out changeset 94bd21d9b396 (bug 1172394)
Backed out changeset 7e7baa73e1ef (bug 1172394)
Backed out changeset c3bd415507e8 (bug 1172394)
Backed out changeset 1c45b135318d (bug 1172394)
Backed out changeset c57c41e8c39e (bug 1172394)
Backed out changeset a796541fe5ef (bug 1172394)
Backed out changeset 89ad0b553b0f (bug 1172394)
Backed out changeset 744fb77a5833 (bug 1172394)
Backed out changeset afb4b226ff04 (bug 1172394)
2019-11-14 00:32:51 +02:00
Andreas Pehrson
b59f1080f0 Bug 1302379 - Remove FinishedOnInactive hack from DOMMediaStream. r=jib
It is no longer needed with captured tracks' lifetimes spanning across seek
operations.

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

--HG--
extra : moz-landing-system : lando
2019-11-13 08:58:32 +00:00
Andreas Pehrson
af96d72e5f Bug 1172394 - Hinge UpdateReadyStateInternal off watchables instead of direct updates. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D52047

--HG--
extra : moz-landing-system : lando
2019-11-13 08:56:44 +00:00
Andreas Pehrson
8343246e20 Bug 1172394 - Use tail dispatching instead of mSrcStreamTracksAvailable. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D52046

--HG--
extra : moz-landing-system : lando
2019-11-13 08:56:31 +00:00
Andreas Pehrson
5b1bea60b3 Bug 1172394 - Merge MediaStream and MediaDecoder track sources. r=padenot
This reworks how media element captureStream works by removing the differences
between MediaStream and MediaDecoder capture. MediaDecoder capture will be
refactored so that ownership of MediaStreamTracks lies with the media element
instead of the OutputStreamManager. The internal MediaDecoder parts happen in a
later patch.

The new API for capturing a MediaDecoder involves a boolean on/off toggle, the
output tracks the decoder pipes data to, and the principal that data is tagged
with. If capturing is on but there are no output tracks, playback will not
happen, to ensure that no data gets accidentally skipped in the output tracks
while captured.

This also changes the logic for setting up MediaElementTrackSources in
HTMLMediaElement so it's triggered by the WatchManager and thus run in tail
dispatched runnables.

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

--HG--
extra : moz-landing-system : lando
2019-11-13 08:55:29 +00:00
Andreas Pehrson
ed705988de Bug 1172394 - Make dom::MediaTrack lifetime spec compliant. r=bryce
This makes us forget tracks at the right times. The spec also says no
removetrack events should be fired because of this, yet it seems to be something
other user agents do:
https://wpt.fyi/results/media-source/mediasource-avtracks.html

This is of low importance however, since MediaTracks are prefed off by default.

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

--HG--
extra : moz-landing-system : lando
2019-11-13 08:48:16 +00:00
Emilio Cobos Álvarez
019f75cee4 Bug 1595285 - Do not track TRANSITION_EMBED visits for link-coloring purposes. r=mak
Other browsers don't, plus it blocks work I want to do to query multiple links
at the same time.

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

--HG--
extra : moz-landing-system : lando
2019-11-13 16:36:09 +00:00
Narcis Beleuzu
a30e00cd9c Backed out changeset b73d74bcafda (bug 1595285) for multiple bc failures. CLOSED TREE 2019-11-13 18:31:41 +02:00
Emilio Cobos Álvarez
eafae9973a Bug 1595285 - Do not track TRANSITION_EMBED visits for link-coloring purposes. r=mak
Other browsers don't, plus it blocks work I want to do to query multiple links
at the same time.

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

--HG--
extra : moz-landing-system : lando
2019-11-12 05:06:36 +00:00
John Dai
de2c2a249a Bug 1552313 - Implement element.attachInternals; r=smaug,edgar
ElementInternals class is empty-for-now.

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

--HG--
extra : moz-landing-system : lando
2019-11-12 11:27:55 +00:00
Dorel Luca
be7de717dd Backed out changeset e19c5df398de (bug 1595285) for causing leaks on browser-chrome in toolkit/components/places/tests/browser/browser_bug461710.js. CLOSED TREE 2019-11-11 20:58:06 +02:00
Dorel Luca
cbf2994b14 Backed out 3 changesets (bug 1552313) for WPT failures in custom-elements/CustomElementRegistry.html. CLOSED TREE
Backed out changeset 27a01989152a (bug 1552313)
Backed out changeset 5f8c6c9f2d36 (bug 1552313)
Backed out changeset f26d61e06a9d (bug 1552313)
2019-11-11 20:55:58 +02:00
John Dai
d9933f32ad Bug 1552313 - Implement element.attachInternals; r=smaug,edgar
ElementInternals class is empty-for-now.

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

--HG--
extra : moz-landing-system : lando
2019-11-11 15:43:03 +00:00
Emilio Cobos Álvarez
87b2a95c52 Bug 1595285 - Do not track TRANSITION_EMBED visits for link-coloring purposes. r=mak
Other browsers don't, plus it blocks work I want to do to query multiple links
at the same time.

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

--HG--
extra : moz-landing-system : lando
2019-11-11 13:28:52 +00:00
Bogdan Tara
80377e90ee Backed out 6 changesets (bug 1552176) for causing Hazard bustages CLOSED TREE
Backed out changeset c79b90bae420 (bug 1552176)
Backed out changeset 4b970cc771ca (bug 1552176)
Backed out changeset de7aa0eaf4c8 (bug 1552176)
Backed out changeset c8e692a40cd3 (bug 1552176)
Backed out changeset 68882d1eccac (bug 1552176)
Backed out changeset 692e5e51e19e (bug 1552176)
2019-11-11 12:11:36 +02:00
Valentin Gosu
60297f04a5 Bug 1552176 - pass TRRMode into nsHTMLDNSPrefetch methods r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D49159

--HG--
extra : moz-landing-system : lando
2019-11-10 17:12:19 +00:00
Bogdan Tara
8f38f4a3fb Backed out 6 changesets (bug 1552176) for bustages complaining about ServiceWorkerManager.cpp CLOSED TREE
Backed out changeset bff9110e434e (bug 1552176)
Backed out changeset ac8f8a6dbd98 (bug 1552176)
Backed out changeset 8dd630e7534a (bug 1552176)
Backed out changeset 7ce9e220cdb9 (bug 1552176)
Backed out changeset ee9911acfcd4 (bug 1552176)
Backed out changeset 652b3bd6848d (bug 1552176)
2019-11-08 22:18:05 +02:00
Valentin Gosu
4354a83c3d Bug 1552176 - pass TRRMode into nsHTMLDNSPrefetch methods r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D49159

--HG--
extra : moz-landing-system : lando
2019-11-08 17:13:47 +00:00
Matt Woodrow
2704b7ceff Bug 1593560 - Adjust tests to wait for data uri to load properly, since it now includes an extra IPDL roundtrip. r=kmag,ochameau
Differential Revision: https://phabricator.services.mozilla.com/D51548

--HG--
extra : moz-landing-system : lando
2019-11-06 22:37:07 +00:00
Brian Grinstead
d981495450 Bug 1593119 - Remove dom/xbl and the MOZ_XBL build option r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D51338

--HG--
extra : moz-landing-system : lando
2019-11-07 00:35:32 +00:00
Coroiu Cristina
cbdbc8bc4b Backed out 7 changesets (bug 1593560) for crashtest failures at tests/layout/base/crashtests/446328.html on a CLOSED TREE
Backed out changeset 7dfae085a4cb (bug 1593560)
Backed out changeset 9842c80c98d8 (bug 1593560)
Backed out changeset d67a10437af7 (bug 1593560)
Backed out changeset 3e3948e9531c (bug 1593560)
Backed out changeset a7d04e276b44 (bug 1593560)
Backed out changeset 9f52c9f6dc54 (bug 1593560)
Backed out changeset 90572c49d464 (bug 1593560)
2019-11-07 00:32:53 +02:00
Matt Woodrow
52d6e76c02 Bug 1593560 - Adjust tests to wait for data uri to load properly, since it now includes an extra IPDL roundtrip. r=kmag,ochameau
Differential Revision: https://phabricator.services.mozilla.com/D51548

--HG--
extra : moz-landing-system : lando
2019-11-06 18:22:17 +00:00
Andreas Pehrson
ac4828baba Bug 1588840 - Make ended return true after reaching the event loop's step 1 when playing a MediaStream. r=jib
This is especially important for media elements playing MediaStreams, since the
streams can be manipulated to end playback of the elements synchronously by
either stopping or removing their tracks.

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

--HG--
extra : moz-landing-system : lando
2019-11-06 13:06:44 +00:00
Mirko Brodesser
b2de103bf9 Bug 1593222: part 12) Rename "nsNodeUtils.*" to "MutationObservers.*". r=smaug
Depends on D51827

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

--HG--
rename : dom/base/nsNodeUtils.cpp => dom/base/MutationObservers.cpp
rename : dom/base/nsNodeUtils.h => dom/base/MutationObservers.h
extra : moz-landing-system : lando
2019-11-06 09:08:06 +00:00
Mirko Brodesser
ba0285f534 Bug 1593222: part 9) Move non-animation notification methods from nsNodeUtils to MutationObservers. r=smaug
The remaining notification methods are moved in a separate commit. The
files are renamed to `MutationObservers.*` in a follow-up commit.

Depends on D51824

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

--HG--
extra : moz-landing-system : lando
2019-11-05 21:32:53 +00:00
Alex Catarineu
08a431f34e Bug 1581537 - Avoid several browser language leaks r=smaug
Spoof dom/dom.properties, layout/xmlparser.properties,
layout/MediaDocument.properties to en-US if needed.

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

--HG--
extra : moz-landing-system : lando
2019-11-04 16:56:27 +00:00
Mihai Alexandru Michis
d19c1272ca Backed out changeset 1d87c269da8a (bug 1581537) for causing bc failures in browser_misused_characters_in_strings.js CLOSED TREE
--HG--
extra : rebase_source : b9f2da6650a4213a4a9284d6dbe7ecfd97761501
extra : amend_source : b7ca833a091419a2de5904eccb2d3ce9d0fcd337
2019-11-04 16:06:37 +02:00
Andreas Pehrson
9a95077157 Bug 1577505 - Progress currentTime for a MediaStream only while potentially playing. r=jib
It started progressing as soon as we set up the rendering of the tracks in the
stream, which is too early according to the HTMLMediaElement spec.

Now it starts progressing when we're potentially playing. The difference being
that we now wait for mReadyState to go beyond HAVE_CURRENT_DATA before hooking
up the time progression mechanism.

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

--HG--
extra : moz-landing-system : lando
2019-11-04 13:43:01 +00:00
Andreas Pehrson
0685c0e901 Bug 1577505 - Make mSrcStreamPlaybackEnded and mReadyState watchable. r=jib
This makes all inputs to IsPotentiallyPlayin() Watchable when we're playing a
MediaStream.

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

--HG--
extra : moz-landing-system : lando
2019-11-04 13:42:58 +00:00
Andreas Pehrson
aa162c3e88 Bug 1577505 - Rename UpdateSrcTrackTime back to UpdateSrcStreamTime. r=jib
It was incorrectly included in the renaming part of bug 1454998.

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

--HG--
extra : moz-landing-system : lando
2019-11-04 13:42:56 +00:00
Alex Catarineu
ea206b140d Bug 1581537 - Avoid several browser language leaks r=smaug
Spoof dom/dom.properties, layout/xmlparser.properties,
layout/MediaDocument.properties to en-US if needed.

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

--HG--
extra : moz-landing-system : lando
2019-11-04 11:27:59 +00:00
Masayuki Nakano
345f0e69ba Bug 1588745 - part 7: Remove AutoScriptBlocker from TextControlState::SetValue() r=Ehsan
For allowing `TextEditor` to dispatch DOM events synchronously, we should
remove `AutoScriptBlocker` in `TextControlState::SetValue()` right now.

According to the comment around the `AutoScriptBlocker`, `PrepareEditor()`
may be called while setting value.  Therefore, this patch makes
`AutoTextControlHandlingState` call it if `PrepareEditor()` is called
while handling `SetValue()` and when the top most `SetValue()` ends its job.

Depends on D51396

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

--HG--
extra : moz-landing-system : lando
2019-11-01 21:10:17 +00:00
Masayuki Nakano
129b58687c Bug 1588745 - part 6: Post processing of setting value with TextEditor should be done before dispatching "input" event r=Ehsan
Currently, "input" event is fired when the `AutoScriptBlocker` in `SetValue()`
is deleted.  So, for keeping same behavior, the post processing after calling
`TextEditor` methods should be done before editor dispatches "input" event.

Fortunately, `TextInputListener::OnEditActionHandled()` is a good chance to
do that.  Therefore, this patch makes it notify `TextControlState` and
`AutoTextControlHandlingState`.

Note that ideally, each method of `TextEditor` should return
`NS_ERROR_OUT_OF_MEMORY` coming from
`AutoTextControlHandlingState::OnEditActionHandled()`.  However, it requires
a lot of changes in editor classes, and the case is really rare since editor
does not use fallible allocation.  Therefore, it must be okay to crash in
editor if `OnEditActionHandled()` returns `NS_ERROR_OUT_OF_MEMORY`.

Depends on D51395

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

--HG--
extra : moz-landing-system : lando
2019-11-03 02:50:00 +00:00
Masayuki Nakano
4ea46b632e Bug 1588745 - part 5: Split TextControlState::SetValue() r=Ehsan
`TextControlState::SetValue()` does 4 things.
1. Committing composition if there is and if possible.
2. Setting value with `TextEditor` if text editor and frame are available.
3. Setting value without `TextEditor` otherwise.
4. Notifying value changed.

We can split #2 and #3 from it now because `AutoTextControlHandlingState`
manages nested actions.  Therefore, this patch creates
`SetValueWithTextEditor()` and `SetValueWithoutTextEditor()` which take
`AutoTextControlHandlingState`.

Depends on D51394

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

--HG--
extra : moz-landing-system : lando
2019-11-02 23:23:54 +00:00
Masayuki Nakano
3b61d80b0e Bug 1588745 - part 4: Make TextControlState reuse its instance by itself r=Ehsan
Currently, only `HTMLInputElement` reuses `TextControlState` instance since
`HTMLTextAreaElement` had the instance as a member rather than allocate it.

Now, all instances are allocated in the heap independently for guaranteeing
their lifetime.  So, the reuse mechanism should be managed by
`TextControlState` itself.

Depends on D51393

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

--HG--
extra : moz-landing-system : lando
2019-11-01 20:51:48 +00:00
Masayuki Nakano
f3bf8ed506 Bug 1588745 - part 3: Make TextControlState not deleted actually while it handles something r=Ehsan
Currently, nobody guarantees that `TextControlState` won't be deleted while
it handles something with `MOZ_CAN_RUN_SCRIPT` methods.

This patch hides its destructor (and constructor) for making only
`TextControlState` itself can delete its instances.  Then, if instance owner
wants to delete it while handling action(s), the oldest `AutoHandlingState`
will delete the `TextControlState`.

Depends on D51392

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

--HG--
extra : moz-landing-system : lando
2019-11-01 20:49:12 +00:00
Masayuki Nakano
e2c6cf597d Bug 1588745 - part 2: Move some TextControlState members to stack only class r=Ehsan
Some members of `TextControlState` are initialized and restored in same block
scopes.  Therefore, with creating new stack only class and storing latest one
with a new member variable, we can store all of them in the stack.

Depends on D51391

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

--HG--
extra : moz-landing-system : lando
2019-11-01 20:47:35 +00:00
Masayuki Nakano
91b4aa6851 Bug 1588745 - part 1: Rename nsTextEditorState to mozilla::TextControlState r=Ehsan
It should be in `mozilla` namespace and it manages not only `TextEditor`,
manages selection, selection controller and callback from editor. so that
I think it stores state of "text control widget". Therefore, I name it to
`TextControlState`.

And cleaning up the cpp file.

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

--HG--
rename : dom/html/nsTextEditorState.cpp => dom/html/TextControlState.cpp
rename : dom/html/nsTextEditorState.h => dom/html/TextControlState.h
extra : moz-landing-system : lando
2019-11-01 20:43:11 +00:00
Noemi Erli
853acdf360 Backed out 5 changesets (bug 1552176) for causing multiple build bustages CLOSED TREE
Backed out changeset 203060e4af95 (bug 1552176)
Backed out changeset b52f0ff800c8 (bug 1552176)
Backed out changeset 9f8d159fe252 (bug 1552176)
Backed out changeset 751b518e08fa (bug 1552176)
Backed out changeset a11ffd474c0c (bug 1552176)
2019-11-02 23:20:28 +02:00
Valentin Gosu
27377bc488 Bug 1552176 - pass TRRMode into nsHTMLDNSPrefetch methods r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D49159

--HG--
extra : moz-landing-system : lando
2019-11-02 20:43:30 +00:00
Edgar Chen
acd2114113 Bug 1580491 - Use Element::HasNonEmptyAttr in various places; r=bzbarsky
This was done by reviewing the results of
https://searchfox.org/mozilla-central/search?q=%2F*GetAttr%5C(.%2B(%26%26%7C%5C%7C%5C%7C)&case=true&regexp=true
one by one and replacing them with Element::HasNonEmptyAttr if possible.

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

--HG--
extra : moz-landing-system : lando
2019-11-01 15:24:25 +00:00
Edwin Takahashi
c0f93ea425 Bug 1591641 - annotate select-load.html with fuzzy-if condition for Android r=gbrown
Changes:
- annotate select-load.html test with `fuzzy-if(Android)`

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

--HG--
extra : moz-landing-system : lando
2019-10-30 21:25:22 +00:00
Daosheng Mu
21480b57c1 Bug 1565268 - Recovering VRDisplay status after VRService is shutdown. r=kip,jgilbert
When JS is paused, VRService will automatically shutdown because the timer is not updated,
we used to create a new VRDisplay to JS. However, the page is still using the older VRDisplay,
so it can't get the newest VRDisplayInfo status. We should exit presentation and
apply the VRDisplayInfo status to the original VRDisplay instead of creating new one.

Besides, we also need to release the VR screen buffer after exiting the immersive mode to avoid eglMakeCurrent error.

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

--HG--
extra : moz-landing-system : lando
2019-10-29 00:35:35 +00:00
John Dai
3a77b15ccb Bug 1589027 - Fix object.tabIndex should return 0 by default; r=smaug
The spec change HTMLObjectElement tabIndex default to 0, but `test_object_plugin_nav.html` will fail due to HTMLObjectElement’s sequence focus and .focus() rely on default tabIndex. In this patch I separate the logic to not rely on default tabIndex for HTMLObjectElement's plugin type and align the spec.

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

--HG--
extra : moz-landing-system : lando
2019-10-28 15:50:59 +00:00
Masayuki Nakano
a434f646f8 Bug 1577058 - part 2: Make nsFrameSelection::CommonPageMove() handle nsFrameSelection::ScrollSelectionIntoView() too r=smaug
Currently, `nsFrameSelection::CommonPageMove()` is called before every caller
calls `nsFrameSelection::ScrollSelectionIntoView()`.  However, when an editing
host has focus, the scroll target may be outside of it.  In such case, without
moving caret, user may want only to scroll the scrollable element.

Chrome behaves like so.  Chrome also can scroll outside scrollable element
of focused editing host.  However, it scrolls caret into view only when
caret is moved actually.  Therefore, it makes sense to follow this behavior.

This patch makes `nsFrameSelection::CommonPageMove()` also call
`nsFrameSelection::ScrollSelectionIntoView()`.  However, it newly takes
`SelectionIntoView` flag for making callers can choose the condition.  I.e.,
`ScrollSelectionIntoView()` should be called always, or only when selection
is actually changed, or shouldn't be called.

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

--HG--
extra : moz-landing-system : lando
2019-10-28 10:03:37 +00:00
Cosmin Sabou
3c54e28fc8 Backed out 2 changesets (bug 1577058) for causing bug 1541915 to nearly permafail.
Backed out changeset c556c5228132 (bug 1577058)
Backed out changeset d00a7e091efd (bug 1577058)
2019-10-27 17:38:58 +02:00
Masayuki Nakano
7a894386f2 Bug 1577058 - part 2: Make nsFrameSelection::CommonPageMove() handle nsFrameSelection::ScrollSelectionIntoView() too r=smaug
Currently, `nsFrameSelection::CommonPageMove()` is called before every caller
calls `nsFrameSelection::ScrollSelectionIntoView()`.  However, when an editing
host has focus, the scroll target may be outside of it.  In such case, without
moving caret, user may want only to scroll the scrollable element.

Chrome behaves like so.  Chrome also can scroll outside scrollable element
of focused editing host.  However, it scrolls caret into view only when
caret is moved actually.  Therefore, it makes sense to follow this behavior.

This patch makes `nsFrameSelection::CommonPageMove()` also call
`nsFrameSelection::ScrollSelectionIntoView()`.  However, it newly takes
`SelectionIntoView` flag for making callers can choose the condition.  I.e.,
`ScrollSelectionIntoView()` should be called always, or only when selection
is actually changed, or shouldn't be called.

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

--HG--
extra : moz-landing-system : lando
2019-10-27 01:44:55 +00:00
Jeff Walden
3e64c882fe Bug 1591655 - Remove the unnecessary |proto| argument from |JS::NewPromiseObject| and its callers, seeing as all callers pass |nullptr| (and therefore uniformly request the default prototype). r=jandem,bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D50695

--HG--
extra : moz-landing-system : lando
2019-10-26 08:14:05 +00:00
Brian Grinstead
ec30cc58df Bug 1587142 - Remove most XBL tests in dom/ r=bzbarsky
The following tests are not removed and need to be ported to Shadow DOM:
- test_bug330925.xhtml
- test_bug372086.html
- test_bug319374.xhtml

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

--HG--
extra : moz-landing-system : lando
2019-10-25 22:38:08 +00:00
Edwin Takahashi
a5bb04283f Bug 1591257 - remove skiaContent fuzzy condition from dom/html/reftests/autofocus/reftest.list r=gbrown
Changes:
- remove skiaContent from `dom/html/reftests/autofocus/reftest.list`

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

--HG--
extra : moz-landing-system : lando
2019-10-25 20:19:41 +00:00
alwu
11341ad999 Bug 1590579 - part2 : update controller's audible state when it starts. r=chunmin
Everytime when we start a controller, we should also update its audible state correctly, in order to request audio focus correctly.

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

--HG--
extra : moz-landing-system : lando
2019-10-24 20:18:47 +00:00
Matthew Noorenberghe
19fc89710d Bug 1583957 - Indicate support for autocomplete=(username|new-password|current-password). r=farre
Bug 917325 started using the `username` token.
Bug 1119063 started using the `new-password` token. This patch also adds support for `current-password` since it's the counterpart to `new-password` and we plan to use it as a signal eventually so want to encourage its use.

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

--HG--
extra : moz-landing-system : lando
2019-10-24 12:45:24 +00:00
Rob Wu
9502c5460b Bug 1590417 - Remove unused HTMLMediaElement::GetTopLevelPrincipal r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D50069

--HG--
extra : moz-landing-system : lando
2019-10-23 18:13:40 +00:00
Thomas Nguyen
cf2f2ec008 Bug 1580462 - Store iframe's FeaturePolicy in browsingContext to inherit cross origin document. r=baku,farre
Differential Revision: https://phabricator.services.mozilla.com/D48825

--HG--
extra : moz-landing-system : lando
2019-10-23 19:39:00 +00:00
Razvan Maries
7fb625f8cf Backed out changeset ae33b9c001e5 (bug 1580462) for build bustages on nsWindow.cpp. CLOSED TREE 2019-10-23 11:07:00 +03:00
Thomas Nguyen
a220530f6b Bug 1580462 - Store iframe's FeaturePolicy in browsingContext to inherit cross origin document. r=baku,farre
Differential Revision: https://phabricator.services.mozilla.com/D48825

--HG--
extra : moz-landing-system : lando
2019-10-22 14:36:00 +00:00
Emilio Cobos Álvarez
602ba56e1f Bug 1590366 - Remove accessibility.heading-element-level-changes.enabled. r=MarcoZ
Well that was short :D

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

--HG--
extra : moz-landing-system : lando
2019-10-22 13:51:41 +00:00
Andrea Marchesini
410cb724a7 Bug 1585284 - Force global in Blob CTOR, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D49629

--HG--
extra : moz-landing-system : lando
2019-10-21 05:33:19 +00:00
Andrea Marchesini
6797e45278 Bug 1585284 - Use nsIGlobalObject in any Blob/File CTOR, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D49392

--HG--
extra : moz-landing-system : lando
2019-10-21 05:33:33 +00:00
Geoff Brown
32490358c2 Bug 1585119 - Re-enable many more mochitests on Android; r=geckoview-reviewers,snorp
Most of these tests have been disabled for a long time; they run well
in the current test environment.
I intend to enable still more mochitests in a future patch.

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

--HG--
extra : moz-landing-system : lando
2019-10-18 14:35:20 +00:00
Masayuki Nakano
023906f104 Bug 1584963 - Make nsTextEditorState not manage TextInputListener by itself when chrome script emulates user input r=m_kato
When `nsTextEditorState::SetValue()` is called with `eSetValue_BySetUserInput`,
we emulate user input.  I.e., keep using transaction manager of the editor,
events fired while handling user input should be fired.

Currently, `nsTextEditorState::SetValue()` suppresses multiple state handling
while setting value with calling `mTextListener->SettingValue(true)`.  This
is why `"input"` event listeners cannot retrieve the latest state of validation
if `inputType` is `"insertReplacementText"`.

This patch makes it keep managing `mTextListener` when setting the value
programatically.   Otherwise, i.e., it emulates user input, editor should
manage it from `EditorBase::NotifyEditorObservers()` instead so that this
patch makes it not managing `mTextListener` in such case.

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

--HG--
extra : moz-landing-system : lando
2019-10-18 09:18:40 +00:00
Ryan VanderMeulen
1cb9560b83 Bug 1587622 - Use MOZ_ASSERT_UNREACHABLE() instead of double-conversion's UNREACHABLE() in DOM media code. r=karlt
Differential Revision: https://phabricator.services.mozilla.com/D48880

--HG--
extra : moz-landing-system : lando
2019-10-18 01:49:06 +00:00
Andreas Pehrson
ace14cf90c Bug 1587248 - Adequately guard mMediaStreamRenderer usage. r=bryce
It can be unset by NotifyShutdown, to release the VideoFrameContainer in time.
This is unexpected for all paths assuming it will be unset by
EndSrcMediaStreamPlayback().

Depends on D49573

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

--HG--
extra : moz-landing-system : lando
2019-10-17 18:31:22 +00:00
Andreas Pehrson
fe804f1c14 Bug 1587248 - Remove unnecessary legacy window guard. r=bryce
Depends on D49572

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

--HG--
extra : moz-landing-system : lando
2019-10-17 18:25:26 +00:00
Emilio Cobos Álvarez
441f9a401b Bug 998590 - Prototype accessibility level changes for headings behind a pref. r=MarcoZ
I don't think these need invalidation of any sort since they only depend on
ancestors, and we recreate accessibles when the element's ancestor chain changes.

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

--HG--
extra : moz-landing-system : lando
2019-10-16 12:31:21 +00:00
Emilio Cobos Álvarez
5ffa02e5a8 Bug 998590 - Factor out heading accessibility level into HTMLHeadingElement. r=MarcoZ
Differential Revision: https://phabricator.services.mozilla.com/D49407

--HG--
extra : moz-landing-system : lando
2019-10-16 12:32:10 +00:00
Emilio Cobos Álvarez
2ec3bb2b4f Bug 998590 - Cleanup HTMLHeadingElement, and add HTMLHeadingElement::FromNode. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D49406

--HG--
extra : moz-landing-system : lando
2019-10-16 14:25:05 +00:00
Geoff Brown
c906073cd5 Bug 1585119 - Re-enable many mochitests on android; r=geckoview-reviewers,snorp
Most of these tests have been disabled for a long time; they run well
in the current test environment.
With the additional tests running, task times increase; I have added one
more test chunk for android mochitest-plain.
These tests were identified from a random sampling of mochitest manifests;
I intend to enable more mochitests in future patches.

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

--HG--
extra : moz-landing-system : lando
2019-10-15 15:07:09 +00:00
Emilio Cobos Álvarez
9eb8be65f7 Bug 1576714 - Don't update scrollbar visibility for non-top-level remote browsers. r=nika
This flag is only meant for window.open() stuff, so not relevant to iframes at
all.

This preserves the current fission behavior (which is quite broken) of always
showing scrollbars.

The way to control scrollbars for iframes (the scrolling attribute) is not
handled at all for Fission, I filed a bug and left a few FIXMEs.

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

--HG--
extra : moz-landing-system : lando
2019-10-15 14:32:18 +00:00
Emilio Cobos Álvarez
58050e8a18 Bug 1555947 - Be consistent in using composed / uncomposed doc for <link rel=localization>. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D49180

--HG--
extra : moz-landing-system : lando
2019-10-15 14:15:14 +00:00
Andreea Pavel
c45f72ed14 Bug 1533759 - update test_window_open_close.html disable condition for windows64 debug. r=bc
Differential Revision: https://phabricator.services.mozilla.com/D48925

--HG--
extra : moz-landing-system : lando
2019-10-11 13:45:19 +00:00
Emilio Cobos Álvarez
135388d85f Bug 1587457 - Remove Element::GetTokenList. r=bzbarsky
Looks like this used to be more generic, looking at:

https://hg.mozilla.org/mozilla-central/rev/263812990c503f6e238b33b2fd3314284ac1be3e

But now only specific element subclasses use it, and the token lists can just be
members in the relevant subclasses.

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

--HG--
extra : moz-landing-system : lando
2019-10-11 04:09:40 +00:00
Ehsan Akhgari
ff268df84b Bug 1546112 - Remove the code for XMLDocument.load/async; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D48877

--HG--
extra : moz-landing-system : lando
2019-10-10 18:20:34 +00:00
Brendan Dahl
237d762715 Bug 1510785 - Skip all XBL related tests when XBL is disabled. r=bzbarsky
XBL will be disabled on android, so these tests must be skipped. Where possible
tests are copied to create shadow DOM tests.

Depends on D45615

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

--HG--
rename : layout/inspector/tests/test_bug522601.xhtml => layout/inspector/tests/test_bug522601-shadow.xhtml
rename : layout/inspector/tests/test_bug609549.xhtml => layout/inspector/tests/test_bug609549-shadow.xhtml
rename : layout/reftests/bugs/334829-1a.xhtml => layout/reftests/bugs/334829-1a-shadow.xhtml
rename : layout/reftests/bugs/334829-1b.xhtml => layout/reftests/bugs/334829-1b-shadow.xhtml
rename : layout/reftests/bugs/386310-1b.html => layout/reftests/bugs/386310-1b-shadow.html
rename : layout/reftests/bugs/386310-1c.html => layout/reftests/bugs/386310-1c-shadow.html
rename : layout/reftests/bugs/386310-1d.html => layout/reftests/bugs/386310-1d-shadow.html
rename : layout/reftests/bugs/482592-1a.xhtml => layout/reftests/bugs/482592-1a-shadow.xhtml
rename : layout/reftests/bugs/482592-1b.xhtml => layout/reftests/bugs/482592-1b-shadow.xhtml
rename : layout/reftests/css-selectors/sibling-combinators-on-anon-content-1.xhtml => layout/reftests/css-selectors/sibling-combinators-on-anon-content-1-shadow.xhtml
rename : layout/reftests/css-selectors/sibling-combinators-on-anon-content-2.xhtml => layout/reftests/css-selectors/sibling-combinators-on-anon-content-2-shadow.xhtml
rename : layout/reftests/dom/multipleinsertionpoints-appendmultiple.xhtml => layout/reftests/dom/multipleinsertionpoints-appendmultiple-shadow.xhtml
rename : layout/reftests/dom/multipleinsertionpoints-appendsingle-1.xhtml => layout/reftests/dom/multipleinsertionpoints-appendsingle-1-shadow.xhtml
rename : layout/reftests/dom/multipleinsertionpoints-appendsingle-2.xhtml => layout/reftests/dom/multipleinsertionpoints-appendsingle-2-shadow.xhtml
rename : layout/reftests/dom/multipleinsertionpoints-insertmultiple.xhtml => layout/reftests/dom/multipleinsertionpoints-insertmultiple-shadow.xhtml
rename : layout/reftests/dom/multipleinsertionpoints-insertsingle-1.xhtml => layout/reftests/dom/multipleinsertionpoints-insertsingle-1-shadow.xhtml
rename : layout/reftests/dom/multipleinsertionpoints-insertsingle-2.xhtml => layout/reftests/dom/multipleinsertionpoints-insertsingle-2-shadow.xhtml
rename : layout/reftests/dom/multipleinsertionpoints-ref2.xhtml => layout/reftests/dom/multipleinsertionpoints-ref2-shadow.xhtml
rename : layout/reftests/ib-split/insert-into-split-inline-5.html => layout/reftests/ib-split/insert-into-split-inline-5-shadow.html
extra : moz-landing-system : lando
2019-10-08 23:52:46 +00:00
Brendan Dahl
c68cd30ef2 Bug 1510785 - Only build XBL related code when MOZ_XBL is defined. r=bzbarsky
When XBL is disabled, no code in dom/xbl will be built. Also, adds ifdefs
to remove any of the XBL related code elsewhere. There's definitely more
that can be done here, but I think it's better to wait to do the rest of
the cleanup when we actually remove the code.

Depends on D45612

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

--HG--
extra : moz-landing-system : lando
2019-10-08 23:52:14 +00:00
Emma Malysz
dd0ffd6562 Bug 1586862, replace XUL textbox with HTML input and generic XUL box in testcases within dom directory r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D48450

--HG--
extra : moz-landing-system : lando
2019-10-08 21:09:48 +00:00
Cosmin Sabou
73c11d0ebd Backed out changeset 388dbc366e53 (bug 1586862) for mochitest failures on test_focus_docnav.xul CLOSED TREE 2019-10-08 21:04:02 +03:00
Emma Malysz
2e3c4bba36 Bug 1586862, replace XUL textbox with HTML input and generic XUL box in testcases within dom directory r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D48450

--HG--
extra : moz-landing-system : lando
2019-10-08 15:32:07 +00:00
Edgar Chen
534d501cf9 Bug 1129227 - Part 3: Add test for requesting fullscreen in async callback; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D47152

--HG--
extra : moz-landing-system : lando
2019-10-07 08:54:40 +00:00
Edgar Chen
37dc0de88e Bug 1129227 - Part 2: Switch Fullscreen to use transient-user-activation API; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D47151

--HG--
extra : moz-landing-system : lando
2019-09-30 13:42:40 +00:00
Sylvestre Ledru
f12b9fa5c3 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-10-06 18:29:55 +00:00
Frederic Wang
de2b53a526 Bug 1586008 - Factor out IsNodeInEditableRegion. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D48174

--HG--
extra : moz-landing-system : lando
2019-10-05 11:39:16 +00:00
Andreas Pehrson
1bdb34c6ec Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug
This renames the following (in alphabetical order, non-exhaustive):

AudioCaptureStream -> AudioCaptureTrack
AudioNodeStream -> AudioNodeTrack
AudioNodeExternalInputStream -> AudioNodeExternalInputTrack
DirectMediaStreamTrackListener -> DirectMediaTrackListener
MediaStream -> MediaTrack
  - Note that there's also dom::MediaTrack. Namespaces differentiate them.
MediaStreamGraph -> MediaTrackGraph
MediaStreamTrackListener -> MediaTrackListener
MSG -> MTG (in comments)
ProcessedMediaStream -> ProcessedMediaTrack
SharedDummyStream -> SharedDummyTrack
SourceMediaStream -> SourceMediaTrack
StreamTime -> TrackTime
TrackUnionStream -> ForwardedInputTrack
  - Because this no longer takes a union of anything, but only a single track
    as input.

Other minor classes, members and comments have been updated to reflect these
name changes.

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

--HG--
rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp
rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h
rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp
rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h
rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp
rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h
rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h
rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp
rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h
rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp
rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h
rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp
rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h
extra : moz-landing-system : lando
2019-10-02 10:23:02 +00:00
Andreas Pehrson
8028758d0e Bug 1454998 - Remove the notion of streams from MediaStreamGraph. r=padenot,karlt
This change mainly removes the `mTracks` member from MediaStream and moves all
associated members up a level, so that a MediaStream in practice represents a
single track.

Classes will be renamed in a future patch to reflect this.

Other changes include:

The new `mEnded` member of MediaStream changes meaning to only become true when
all data in the stream has been processed. It stems from
StreamTracks::Track::mEnded which used to become true as soon as the last bit of
data had been added to a track, and there could still be data in the track that
would get processed in future iterations. We are moving towards not having any
future data in tracks, which is why this change is ok to make -- keeping the old
behavior will soon not make sense.

TrackUnionStream is changed to no longer take a list of streams as input and
forward the union of their tracks to itself. Instead it's limited to having one
track as input at a time.

The autofinishing functionality that TrackUnionStream had before has been
transformed into an autoending functionality to allow it to defer ending until
its been told that it's ok to end through the control API. This lets a single
TrackUnionStream span the lifetime of multiple inputs, which will be useful for
making DecodedStream spec compliant with HTMLMediaElement::CaptureStream(), and
for implementing the currently discussed MediaRecorder::ReplaceTrack(), to name
a few potential use cases.

AudioNodeStreams used to only have a track (and thus an AudioSegment) if the
EXTERNAL_OUTPUT flag was enabled on them. With all MediaStreams now representing
a track, AudioNodeStreams inherently have an AudioSegment as a member. It is
however only used with data if the EXTERNAL_OUTPUT flag is enabled.

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

--HG--
extra : moz-landing-system : lando
2019-10-02 10:22:53 +00:00
Andreas Pehrson
a639f42a0e Bug 1454998 - Remove track blocking from MediaInputPort. r=karlt
This functionality is not used since we moved to only having a single track per
MediaStream (bug 1493613).

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

--HG--
extra : moz-landing-system : lando
2019-10-02 10:22:49 +00:00
Gurzau Raul
40dae37e00 Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE.
Backed out changeset 80417bdfa721 (bug 1454998)
Backed out changeset 8ff03f2f4ca2 (bug 1454998)
Backed out changeset ae6056b748d1 (bug 1454998)
Backed out changeset ab721cb2066b (bug 1454998)
Backed out changeset d0e8d413cd1c (bug 1454998)
Backed out changeset 3ce4dc7e9ae2 (bug 1454998)
Backed out changeset 6105a4176729 (bug 1454998)

--HG--
rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp
rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h
rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp
rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h
rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h
rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp
rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h
rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp
rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h
rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp
rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h
rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp
rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
Andreas Pehrson
36d89d91c8 Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug
This renames the following (in alphabetical order, non-exhaustive):

AudioCaptureStream -> AudioCaptureTrack
AudioNodeStream -> AudioNodeTrack
AudioNodeExternalInputStream -> AudioNodeExternalInputTrack
DirectMediaStreamTrackListener -> DirectMediaTrackListener
MediaStream -> MediaTrack
  - Note that there's also dom::MediaTrack. Namespaces differentiate them.
MediaStreamGraph -> MediaTrackGraph
MediaStreamTrackListener -> MediaTrackListener
MSG -> MTG (in comments)
ProcessedMediaStream -> ProcessedMediaTrack
SharedDummyStream -> SharedDummyTrack
SourceMediaStream -> SourceMediaTrack
StreamTime -> TrackTime
TrackUnionStream -> ForwardedInputTrack
  - Because this no longer takes a union of anything, but only a single track
    as input.

Other minor classes, members and comments have been updated to reflect these
name changes.

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

--HG--
rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp
rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h
rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp
rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h
rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp
rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h
rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h
rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp
rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h
rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp
rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h
rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp
rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h
extra : moz-landing-system : lando
2019-10-02 08:18:16 +00:00
Andreas Pehrson
1bc37d8ea4 Bug 1454998 - Remove the notion of streams from MediaStreamGraph. r=padenot,karlt
This change mainly removes the `mTracks` member from MediaStream and moves all
associated members up a level, so that a MediaStream in practice represents a
single track.

Classes will be renamed in a future patch to reflect this.

Other changes include:

The new `mEnded` member of MediaStream changes meaning to only become true when
all data in the stream has been processed. It stems from
StreamTracks::Track::mEnded which used to become true as soon as the last bit of
data had been added to a track, and there could still be data in the track that
would get processed in future iterations. We are moving towards not having any
future data in tracks, which is why this change is ok to make -- keeping the old
behavior will soon not make sense.

TrackUnionStream is changed to no longer take a list of streams as input and
forward the union of their tracks to itself. Instead it's limited to having one
track as input at a time.

The autofinishing functionality that TrackUnionStream had before has been
transformed into an autoending functionality to allow it to defer ending until
its been told that it's ok to end through the control API. This lets a single
TrackUnionStream span the lifetime of multiple inputs, which will be useful for
making DecodedStream spec compliant with HTMLMediaElement::CaptureStream(), and
for implementing the currently discussed MediaRecorder::ReplaceTrack(), to name
a few potential use cases.

AudioNodeStreams used to only have a track (and thus an AudioSegment) if the
EXTERNAL_OUTPUT flag was enabled on them. With all MediaStreams now representing
a track, AudioNodeStreams inherently have an AudioSegment as a member. It is
however only used with data if the EXTERNAL_OUTPUT flag is enabled.

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

--HG--
extra : moz-landing-system : lando
2019-10-02 08:17:51 +00:00
Andreas Pehrson
778a50400e Bug 1454998 - Remove track blocking from MediaInputPort. r=karlt
This functionality is not used since we moved to only having a single track per
MediaStream (bug 1493613).

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

--HG--
extra : moz-landing-system : lando
2019-10-02 08:12:28 +00:00
Mike Conley
090db13fda Bug 1583882 - Fire an event when a <video> being visually cloned is removed from the DOM. r=dminor
Depends on D47611

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

--HG--
extra : moz-landing-system : lando
2019-09-30 15:49:56 +00:00
Mike Conley
a220f3e4c9 Bug 1583882 - Remove vestigial TogglePictureInPicture privileged method on HTMLVideoElement. r=webidl,dminor,smaug*
Differential Revision: https://phabricator.services.mozilla.com/D47611

--HG--
extra : moz-landing-system : lando
2019-09-30 15:34:43 +00:00
Gabriele Svelto
10d41866a5 Bug 1585156 - Remove useless inclusions of nsIDOMWindow.h and nsIDOMWindowUtils.h r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D47678

--HG--
extra : moz-landing-system : lando
2019-09-30 22:06:47 +00:00
Cosmin Sabou
cb6b4f7b5b Bug 1533759 - Disable test_window_open_close.html on windows64 debug. r=bc
Differential Revision: https://phabricator.services.mozilla.com/D47570

--HG--
extra : moz-landing-system : lando
2019-09-30 13:10:06 +00:00
Anny Gakhokidze
f1c694e18f Bug 1582531 - Update fission annotations for skipped tests that are now passing succesfully, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D47347

--HG--
extra : moz-landing-system : lando
2019-09-27 14:25:10 +00:00
Brindusan Cristian
1991bac5a6 Backed out 3 changesets (bug 1129227) for wpt failures at active-lock.html. CLOSED TREE
Backed out changeset 44219f4bafb0 (bug 1129227)
Backed out changeset 69f7db4e75bf (bug 1129227)
Backed out changeset 3edc8921609b (bug 1129227)
2019-09-27 03:53:36 +03:00
Edgar Chen
5925e241a9 Bug 1129227 - Part 3: Add test for requesting fullscreen in async callback; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D47152

--HG--
extra : moz-landing-system : lando
2019-09-26 21:15:47 +00:00
Edgar Chen
7bf4c68bf5 Bug 1129227 - Part 2: Switch Fullscreen to use transient-user-activation API; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D47151

--HG--
extra : moz-landing-system : lando
2019-09-26 21:15:43 +00:00
alwu
2e38d31eb1 Bug 1584215 - complete the request once promise is resolved. r=chunmin
The request is used to track if the promise is resolved or not, so we should call its `Complete()` method once promise is resolved, in order to keep the state of the request correct.

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

--HG--
extra : moz-landing-system : lando
2019-09-26 21:54:05 +00:00
Sebastian Streich
88670a47e9 Bug 1580782 - Change Callsites to use nsIPrincipal->SchemeIs r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D45654

--HG--
extra : moz-landing-system : lando
2019-09-26 10:47:16 +00:00
Emilio Cobos Álvarez
e4c23e97da Bug 1583980 - Restrict mapping of width and height to aspect-ratio for <img> for now. r=bzbarsky
This is an easier thing to implement interoperably than what we implement now,
which is basically "whatever goes through this function".

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

--HG--
extra : moz-landing-system : lando
2019-09-25 22:33:47 +00:00
alwu
8d8222b8a9 Bug 1578615 - part11 : remove usages of 'AudibleState::eMaybeAudible' in media element. r=chunmin
In bug1583978, we are going to remove `AudibleState::eMaybeAudible`. But before that, as `AudibleState::eMaybeAudible` is only used for delaying media playback, so we can remove its usage from media element and move it to the dedicated class to reduce confusion about how and when we should use `AudibleState::eMaybeAudible` or `AudibleState::eNotAudible`.

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

--HG--
extra : moz-landing-system : lando
2019-09-25 23:55:42 +00:00
alwu
991ba4c203 Bug 1578615 - part4 : remove SUSPENDED_BLOCK related logic in AudioChannelWrapper. r=chunmin
Now `AudioChannelWrapper` would only start `AudioChannelAgent` when media starts and stop the agent when media stops. It won't handle any case with `SUSPENDED_BLOCK`.

It's clearer to know when we would start or stop the agent in AudioChannelWrapper.

In addition, in bug1577890, we will remove more unnecessary logic which is used for Fennec only in order to make `AudioChannelWrapper` cleaner.

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

--HG--
extra : moz-landing-system : lando
2019-09-25 02:08:39 +00:00
alwu
93ee16c385 Bug 1578615 - part3 : implement delay media playback policy. r=chunmin
Separate the logic of delaying media playback from `HTMLMediaElement`'s `mAudioChannelWrapper` to a new class, because delaying media playback is a special usage of using `AudioChannelAgent`.

It would make the code cleaner and separate the normal usage and the special usage, to reduce confusion.

We usually start `AudioChannelAgent` when media playback starts and stop it when media playback stops, however, in this case, we would start the agent even if media hasn't be started yet, because we would like to use the agent as a connection with `AudioChannelService` in order to receive the resume command when we're able to play delayed playback.

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

--HG--
extra : moz-landing-system : lando
2019-09-25 23:41:23 +00:00
alwu
549eca85d5 Bug 1578615 - part1 : provide function GetAudibleState() on media element. r=chunmin
As we have another usage to know whether media is audible or not, we remove this function from AudioChannelWrapper and make it as media element's function.

In addition, it also makes sense to have this function for media element, because the result is decided by media element's own attributes.

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

--HG--
extra : moz-landing-system : lando
2019-09-25 20:07:06 +00:00
alwu
1cd30cecd2 Bug 1578615 - part0.5 : simply the logic of "IsOwnerAudible()". r=chunmin
There are some checking conditions can be reordered or simplified in order to remove some unnecessary check.

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

--HG--
extra : moz-landing-system : lando
2019-09-25 20:32:46 +00:00
alwu
e3fa191af4 Bug 1580659 - part6 : remove input config parameter from 'NotifyStartedPlaying()'. r=Ehsan
After applying patch4, now we would pull the change from `AudioChannelService` everytime after starting the agent, so we don't need to rely on letting `NotifyStartedPlaying()` to modify the config and use it to update our state.

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

--HG--
extra : moz-landing-system : lando
2019-09-24 21:18:07 +00:00
Alastor Wu
330adf4d9e Bug 1580659 - part5 : stop audio capturing explicitly. r=chunmin,karlt
As we start audio capturing explicitly, we should also take responsibility to stop audio capturing when we don't need it.

We were hiding too many details on `AudioChannelAgent` before, which allow us hard to know who and where we handle audio capturing.

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

--HG--
extra : moz-landing-system : lando
2019-09-24 06:55:39 +00:00
alwu
d158e0c4b2 Bug 1580659 - part4 : pulling the intial update after starting AudioChannelAgent. r=chunmin
Instead of calling those callback functions seperately, we could provide a function to pull those changes at once after starting the agent.

In addition, `WindowXXXChanged` are callback functions of `nsIAudioChannelAgentCallback`, so they should only be called by `AudioChannelAgent`, to indicate receiving the change from `AudioChannelService`. We should not call them directly.

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

--HG--
extra : moz-landing-system : lando
2019-09-24 21:17:59 +00:00
Alastor Wu
5d31bee21f Bug 1580659 - part3 : call 'WindowAudioCaptureChanged()' explicitly. r=chunmin,karlt
Previously `AudioChannelService` called `WindowAudioCaptureChanged()` implicitly whenever we added the agent to the service [1], which made the audio capturing callback happen before finishing registration.

There are two drawbacks,
(1) it's hard to be aware of that the audio capturing callback would be called before finishing `AudioChannelAgent::NotifyStartedPlaying()` [2], which causes unclear call flow.

(2) If someone checks `AudioChannelAgent::IsPlayingStarted()` [3] inside audio capturing callback, then we would find that the `mIsRegToService` is false even if we have registered the agent to `AudioChannelService` because `mIsRegToService` is updated in the last line in the `AudioChannelAgent::NotifyStartedPlaying()`, but the audio capturing callback could be executed before that.

[1] https://searchfox.org/mozilla-central/rev/a777ff11b6d700a698c61e5bd17e73b044304494/dom/audiochannel/AudioChannelService.cpp#723
[2] https://searchfox.org/mozilla-central/rev/a777ff11b6d700a698c61e5bd17e73b044304494/dom/audiochannel/AudioChannelAgent.cpp#144
[3] https://searchfox.org/mozilla-central/rev/a777ff11b6d700a698c61e5bd17e73b044304494/dom/audiochannel/AudioChannelAgent.cpp#285

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

--HG--
extra : moz-landing-system : lando
2019-09-24 06:55:43 +00:00
Alastor Wu
08fa1387dc Bug 1580659 - part2 : remove redundant checking. r=chunmin
We have already had the same checking in `AudioCaptureStreamChange()`, so we can remove the checking in `AudioCaptureStreamChangeIfNeeded()`.

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

--HG--
extra : moz-landing-system : lando
2019-09-24 06:55:27 +00:00
shindli
bfa22f415b Backed out 9 changesets (bug 1580659) for causing linting failure in /builds/worker/checkouts/gecko/dom/plugins/base/nsNPAPIPluginInstance.cpp CLOSED TREE
Backed out changeset b8c46aaec410 (bug 1580659)
Backed out changeset fd31977767d5 (bug 1580659)
Backed out changeset 8b9f61694270 (bug 1580659)
Backed out changeset 276827f54c71 (bug 1580659)
Backed out changeset ecb2bf9fb452 (bug 1580659)
Backed out changeset b712f15af619 (bug 1580659)
Backed out changeset c25bfc8b31b1 (bug 1580659)
Backed out changeset 20cfcd96a40e (bug 1580659)
Backed out changeset e92ff4ac7f43 (bug 1580659)
2019-09-24 09:50:42 +03:00
Alastor Wu
b3e82e167d Bug 1580659 - part6 : remove input config parameter from 'NotifyStartedPlaying()'. r=Ehsan
After applying patch4, now we would pull the change from `AudioChannelService` everytime after starting the agent, so we don't need to rely on letting `NotifyStartedPlaying()` to modify the config and use it to update our state.

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

--HG--
extra : moz-landing-system : lando
2019-09-18 00:03:14 +00:00
Alastor Wu
eaf6b8ef6e Bug 1580659 - part5 : stop audio capturing explicitly. r=chunmin,karlt
As we start audio capturing explicitly, we should also take responsibility to stop audio capturing when we don't need it.

We were hiding too many details on `AudioChannelAgent` before, which allow us hard to know who and where we handle audio capturing.

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

--HG--
extra : moz-landing-system : lando
2019-09-21 02:21:58 +00:00
Alastor Wu
17d1e17425 Bug 1580659 - part4 : pulling the intial update after starting AudioChannelAgent. r=chunmin
Instead of calling those callback functions seperately, we could provide a function to pull those changes at once after starting the agent.

In addition, `WindowXXXChanged` are callback functions of `nsIAudioChannelAgentCallback`, so they should only be called by `AudioChannelAgent`, to indicate receiving the change from `AudioChannelService`. We should not call them directly.

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

--HG--
extra : moz-landing-system : lando
2019-09-23 17:44:21 +00:00
Alastor Wu
f74da16941 Bug 1580659 - part3 : call 'WindowAudioCaptureChanged()' explicitly. r=chunmin,karlt
Previously `AudioChannelService` called `WindowAudioCaptureChanged()` implicitly whenever we added the agent to the service [1], which made the audio capturing callback happen before finishing registration.

There are two drawbacks,
(1) it's hard to be aware of that the audio capturing callback would be called before finishing `AudioChannelAgent::NotifyStartedPlaying()` [2], which causes unclear call flow.

(2) If someone checks `AudioChannelAgent::IsPlayingStarted()` [3] inside audio capturing callback, then we would find that the `mIsRegToService` is false even if we have registered the agent to `AudioChannelService` because `mIsRegToService` is updated in the last line in the `AudioChannelAgent::NotifyStartedPlaying()`, but the audio capturing callback could be executed before that.

[1] https://searchfox.org/mozilla-central/rev/a777ff11b6d700a698c61e5bd17e73b044304494/dom/audiochannel/AudioChannelService.cpp#723
[2] https://searchfox.org/mozilla-central/rev/a777ff11b6d700a698c61e5bd17e73b044304494/dom/audiochannel/AudioChannelAgent.cpp#144
[3] https://searchfox.org/mozilla-central/rev/a777ff11b6d700a698c61e5bd17e73b044304494/dom/audiochannel/AudioChannelAgent.cpp#285

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

--HG--
extra : moz-landing-system : lando
2019-09-18 21:59:32 +00:00
Alastor Wu
9f046cf28c Bug 1580659 - part2 : remove redundant checking. r=chunmin
We have already had the same checking in `AudioCaptureStreamChange()`, so we can remove the checking in `AudioCaptureStreamChangeIfNeeded()`.

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

--HG--
extra : moz-landing-system : lando
2019-09-17 23:04:12 +00:00
Emilio Cobos Álvarez
678c18063d Bug 1583203 - Annotate nsINode::OwnerDoc() as MOZ_NONNULL_RETURN. r=smaug
People keep adding useless null-checks and it was not clear what the consensus
was from bug 1441165, but this should be unobjectionable I guess.

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

--HG--
extra : moz-landing-system : lando
2019-09-23 18:12:19 +00:00
Henri Sivonen
b5140cd3ca Bug 1583169 - Enable test_bug871161.html in Fission. r=farre
Differential Revision: https://phabricator.services.mozilla.com/D46770

--HG--
extra : moz-landing-system : lando
2019-09-23 12:05:02 +00:00
Emilio Cobos Álvarez
4c429b8f4e Bug 1582585 - Factor out a bit of the logic in AutoScrollController.jsm. r=botond
No behavior change intended.

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

--HG--
extra : moz-landing-system : lando
2019-09-23 15:39:48 +00:00
Andreea Pavel
7d9c945b30 Backed out 3 changesets (bug 1583203) build bustages on a CLOSED TREE
Backed out changeset ca89485fedf8 (bug 1583203)
Backed out changeset 8bc17415ff25 (bug 1583203)
Backed out changeset 3e3eebe862e5 (bug 1583203)
2019-09-23 18:16:49 +03:00
Emilio Cobos Álvarez
d40510e58a Bug 1583203 - followup: Remove some silly null-checks.
CLOSED TREE

MANUAL PUSH: red
2019-09-23 16:49:44 +02:00
Boris Zbarsky
e44e36a681 Bug 1581278 part 2. Add convenience methods for rejecting promises with various types of spec exceptions. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D46383

--HG--
extra : moz-landing-system : lando
2019-09-19 13:02:39 +00:00
Emilio Cobos Álvarez
9263e08c77 Bug 1583052 - Fix a check which really wants composed doc semantics, not uncomposed. r=smaug
I don't know why it'd want uncomposed doc semantics.

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

--HG--
extra : moz-landing-system : lando
2019-09-23 13:14:51 +00:00
Emilio Cobos Álvarez
8076d7fb37 Bug 1583052 - Don't null-check OwnerDoc() in HTMLMediaElement.cpp. r=smaug
It can never return null.

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

--HG--
extra : moz-landing-system : lando
2019-09-23 13:09:52 +00:00
Emilio Cobos Álvarez
9dd253929b Bug 1583052 - Remove an optimization introduced in bug 1555946 which is not sound. r=smaug
Tasks dispatched from RunInStableState() can be cancelled if there's a load in
between, so this is not sound.

See nsSyncSection::IsCancelled().

This is the only patch in this bug that is worth uplifting IMO.

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

--HG--
extra : moz-landing-system : lando
2019-09-23 13:08:53 +00:00
Mirko Brodesser
8aac98dbcc Bug 1581523: part 3) Assert nsTextEditorState::PrepareEditor sets only non-negative wrap-columns. r=jorgk
Differential Revision: https://phabricator.services.mozilla.com/D46128

--HG--
extra : moz-landing-system : lando
2019-09-23 11:43:57 +00:00
Mirko Brodesser
f2404d79a1 Bug 1581523: part 2) Remove outdated comment in HTMLTextAreaElement. r=jorgk
Differential Revision: https://phabricator.services.mozilla.com/D46127

--HG--
extra : moz-landing-system : lando
2019-09-23 11:43:55 +00:00
Edgar Chen
5bc0854d2b Bug 1578355 - Part 1: Move user-activation code from EventStateManager to UserActivation; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D45168

--HG--
extra : moz-landing-system : lando
2019-09-20 20:51:25 +00:00
Daniel Varga
bc19cdb06d Backed out 3 changesets (bug 1578355) for build bustage at build/src/dom/base/nsSyncLoadService.h:48:21. On a CLOSED TREE
Backed out changeset d50ad759f129 (bug 1578355)
Backed out changeset 339ab54ca471 (bug 1578355)
Backed out changeset 284299dac42c (bug 1578355)
2019-09-20 14:05:12 +03:00
Edgar Chen
5b6fe53148 Bug 1578355 - Part 1: Move user-activation code from EventStateManager to UserActivation; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D45168

--HG--
extra : moz-landing-system : lando
2019-09-20 10:31:55 +00:00
Masayuki Nakano
6789366d5e Bug 1540029 - part 10: Get rid of TextEditRules and HTMLEditRules r=m_kato
Now, we can get rid of `TextEditRules` and `HTMLEditRules` completely.
And also this patch renames their cpp files to `TextEditSubActionHandler`
and `HTMLEditSubActionHandler`.

`TextEditor::Init()` and `HTMLEditor::Init()` are still complicated due to
`AutoEditInitRulesTrigger`.  The following patch will remove it.

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

--HG--
rename : editor/libeditor/HTMLEditRules.cpp => editor/libeditor/HTMLEditSubActionHandler.cpp
rename : editor/libeditor/TextEditRules.cpp => editor/libeditor/TextEditSubActionHandler.cpp
extra : moz-landing-system : lando
2019-09-18 08:40:08 +00:00
Valentin Gosu
9be69aefcb Bug 1580750 - Enable more fission tests r=JuniorHsu
Differential Revision: https://phabricator.services.mozilla.com/D46175

--HG--
extra : moz-landing-system : lando
2019-09-17 19:35:00 +00:00
Henri Sivonen
c193518677 Bug 1490601 part 2 - Move C++ entry points to encoding_c_mem to mfbt/. r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D43957

--HG--
extra : moz-landing-system : lando
2019-09-18 08:26:34 +00:00
Karl Tomlinson
78bb2541b3 Bug 834505 undef GetCurrentTime() from windows-h-wrapper.template.h r=glandium
GetCurrentTime is declared in WinBase.h
https://github.com/tpn/winsdk-10/blob/master/Include/10.0.10240.0/um/WinBase.h#L91

Documentation for functions declared in winbase.h instruct to include
Windows.h. e.g.
https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-copyfile
Other macro declarations in winbase.h such as CopyFile() are already adjusted
with this wrapper via windows-h-unicode.decls.h

A similar, but different, static inline could be provided but is not required.

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

--HG--
extra : moz-landing-system : lando
2019-09-18 02:52:20 +00:00
Masayuki Nakano
db32271cec Bug 1540029 - part 2: Get rid of TextEditRules::DocumentIsEmpty() and HTMLEditRules::DocumentIsEmpty() r=m_kato
`TextEditRules::DocumentIsEmpty()` is a wrapper of `TextEditor::IsEmpty()` so
that we can get rid of it simply.

`HTMLEditRules::DocumentIsEmpty()` needs to change.  It's oddly checks only
`EditorBase::mPaddingBRElementForEmptyEditor` is `nullptr` or not.  However,
the editor may be completely empty.  And the result may be different from
`TextEditor::IsEmpty()` which is not overridden by `HTMLEditor`.  For partially
solving this issue, this patch makes `HTMLEditor` overrides `IsEmpty()` and
optimizes `TextEditor::IsEmpty()`.

With this change, the caller of `HTMLEditRules::DocumentIsEmpty()` may behave
differently in the only caller, `HTMLEditor::SelectEntireDocument()`.  And
unfortunately, its root called from `SelectAllCommand::DoCommand()`.  However,
it does just collapse `Selection` into the root element (`<body>` or
`Document.documentElement`) if it returns `true`.  Therefore, this change
must be safe since anyway `SelectionRefPtr()->SelectAllChildren()` with
the root element is exactly same as `SelectionRefPtr()->Collapse()` with
the empty root element if it's truly empty.

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

--HG--
extra : moz-landing-system : lando
2019-09-17 06:58:06 +00:00
Emilio Cobos Álvarez
ff890f406e Bug 1579788 - Don't update validity state when the JS engine fails to execute the pattern. r=smaug
When we call nsContentUtils::IsPatternMatching, we swallow JS engine errors
unconditionally returning true.

This is bad, because if it happens in one of the value sets that arguably
shouldn't change the state of the element, we end up returning an arbitrary
value (true) which may or may not match the previous state of the element.

Handle error explicitly instead, by not updating the state.

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

--HG--
extra : moz-landing-system : lando
2019-09-16 10:11:42 +00:00
Mats Palmgren
616c110e54 Bug 400258 - Use the padding edge as the origin for offsetLeft/offsetTop also for box-sizing:border-box boxes. r=emilio
This is what the spec says and is compatible with other UAs.
https://drafts.csswg.org/cssom-view/#dom-htmlelement-offsetleft

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

--HG--
extra : moz-landing-system : lando
2019-09-12 07:35:43 +00:00
Hiroyuki Ikezoe
a7316f6141 Bug 1578973 - Don't do autofocus process if the target node of 'autofocus' is in a cross-origin document. r=nika
Note that I've confirmed no-cross-origin-autofocus.html works fine with
enabling fission on w3c-test.org.

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

--HG--
extra : moz-landing-system : lando
2019-09-13 01:44:59 +00:00
Coroiu Cristina
8d4d7a884d Backed out changeset 5a021b9f8790 (bug 1578973) for browser-chrome failures at browser/base/content/test/forms/browser_selectpopup.js 2019-09-13 03:55:26 +03:00
alwu
5b20dd1672 Bug 1579588 - part2 : create media controller for media element only. r=chunmin
We use `NotifyMediaStarted()` and `NotifyMediaStopped()` to notify `MediaControlService` on parent process to start/stop a media controller, and use `NotifyMediaAudibleChanged()` to notify controller's audible state in order to request audio focus.

As our goal is to use media controller to control media element, not for web audio, web speech and other stuffs which also use audio channel agent.

Therefore, we should notify parent process to start/stop controller only for media element, instead of sending a notification in AudioChannelService because that would create media controller for all different consumers which uses audio channel agent.

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

--HG--
extra : moz-landing-system : lando
2019-09-12 23:13:04 +00:00
alwu
a54c7c082a Bug 1579588 - part1 : split NotifyAudioChannelAgent() to StartAudioChannelAgent() and StopAudioChanelAgent(). r=chunmin
Spliting NotifyAudioChannelAgent() to StartAudioChannelAgent() and StopAudioChanelAgent() allows us to start and stop an AudioChannelAgent in a clear naming function, and to do related operation and checking every time we start/stop the agent.

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

--HG--
extra : moz-landing-system : lando
2019-09-12 23:13:04 +00:00
Hiroyuki Ikezoe
64f7ca1737 Bug 1578973 - Don't do autofocus process if the target node of 'autofocus' is in a cross-origin document. r=nika
Note that I've confirmed no-cross-origin-autofocus.html works fine with
enabling fission on w3c-test.org.

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

--HG--
extra : moz-landing-system : lando
2019-09-12 22:14:37 +00:00
Nika Layzell
f103e26834 Bug 1579213 - Remove unused fields from ChangeRemoteness API, r=farre
This patch changes a few things about how nsFrameLoader is created, specifically
around the ChangeRemoteness API.

1. The private 'nsFrameLoader::nsFrameLoader' constructor has been simplified to
   only have one overload, shared by the different `::Create` static methods.

2. The creation static method used by `ChangeRemoteness` has changed name to
   `::Recreate`, as the signature is becoming more like the old method.

3. The `mNetworkCreated` bit is preserved when doing a `ChangeRemoteness`, as a
   remoteness change shouldn't be affecting that property.

4. Unused fields are removed from the ChangeRemoteness API.

5. The `remoteType` attribute is now mandatory in the ChangeRemoteness API,
   which simplifies the logic and makes it harder to accidentally misuse.

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

--HG--
extra : moz-landing-system : lando
2019-09-11 08:09:58 +00:00
Edgar Chen
811663c08e Bug 1578448 - Make img.complete align with spec; r=bzbarsky
If the img has srcset attribute and the current request isn't complete or broken,
the img.complete should return false per spec,
https://html.spec.whatwg.org/multipage/embedded-content.html#dom-img-complete.

We should check srcset or src attribute, checking only mCurrentRequest isn't
enough given that updating mCurrentRequest happens async.

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

--HG--
extra : moz-landing-system : lando
2019-09-11 14:37:39 +00:00
Andrea Marchesini
91b2277029 Bug 1576463 - canvas toDataURL and toBlob should not throw for serialization errors, r=jya
Differential Revision: https://phabricator.services.mozilla.com/D45121

--HG--
extra : moz-landing-system : lando
2019-09-11 05:16:44 +00:00
Alastor Wu
07f8890bbd Bug 1578609 - part1 : only check source element's type attribute when it's not empty. r=bryce
According to the spec [1], we abort loading only when we're sure the type of source element is something we don't support.

If source element's type is empty, it's equal to not having any type, so we won't have to check can play type, we should start loading to see if we can play it or not.

[1] https://html.spec.whatwg.org/multipage/media.html#loading-the-media-resource:attr-source-type

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

--HG--
extra : moz-landing-system : lando
2019-09-10 19:42:25 +00:00
Kris Maglione
165096efe5 Bug 1579820 - Handle window.open() from remote subframes. r=nika
The CommonCreateWindow code requires having a BrowserHost for the tab that's
creating the window, which it tries to get from the requestor's BrowserParent.
For remote BrowserParents, though, there is no BrowserHost, so we need to get
it from the top-level embedder instead.

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

--HG--
extra : moz-landing-system : lando
2019-09-10 09:04:17 +00:00
Paul Bone
eb520e111a Bug 1578628 - Set the name on the BrowsingContext not the nsDocShell r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D44947

--HG--
extra : moz-landing-system : lando
2019-09-10 07:05:14 +00:00
John Dai
5e255f0239 Bug 1518442 - Part 3: Add dom.formdata.event.enabled preference for Event-based form participation; r=smaug,edgar
Differential Revision: https://phabricator.services.mozilla.com/D43987

--HG--
extra : moz-landing-system : lando
2019-09-09 13:53:34 +00:00
John Dai
d2154fae15 Bug 1518442 - Part 2: Implement Event-based form participation; r=smaug,edgar
For Event-based form participation specification PR:
https://github.com/whatwg/html/pull/4239

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

--HG--
extra : moz-landing-system : lando
2019-09-09 13:53:27 +00:00
Narcis Beleuzu
77240d9965 Backed out 5 changesets (bug 1518442) as requested by jdai. CLOSED TREE
Backed out changeset 9143aef9bd5e (bug 1518442)
Backed out changeset b1b08f66996c (bug 1518442)
Backed out changeset 1f3d36108982 (bug 1518442)
Backed out changeset 1ac7b20bb1d8 (bug 1518442)
Backed out changeset f280db1076a4 (bug 1518442)
2019-09-07 01:07:50 +03:00
John Dai
a128680dbf Bug 1518442 - Part 3: Add dom.formdata.event.enabled preference for Event-based form participation; r=smaug,edgar
Differential Revision: https://phabricator.services.mozilla.com/D43987

--HG--
extra : moz-landing-system : lando
2019-09-06 20:50:52 +00:00
John Dai
6635020ec7 Bug 1518442 - Part 2: Implement Event-based form participation; r=smaug,edgar
For Event-based form participation specification PR:
https://github.com/whatwg/html/pull/4239

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

--HG--
extra : moz-landing-system : lando
2019-09-06 20:50:50 +00:00
Dave Townsend
df895249c6 Bug 1550058: Move most keyboard shortcut handling out of XBL. r=masayuki
Most of our keyboard shortcut handling is handled by nsXBLWindowKeyHandler along
with nsXBLPrototypeHandler. With the impending removal of XBL this needs to
change.

This patch moves nsXBLWindowKeyHandler to dom/events/GlobalKeyListener and copies
nsXBLPrototypeHandler to dom/events/KeyEventHandler. Windows, text elements and
XUL <keyset> are changed to use the new copies and anything unnecessary for
those is stripped out.

XBL handler elements still remain using the existing nsXBLPrototypeHandler path.
Some of the code is ripped out there to make it compile. There is probably a
lot more that can be removed but since the whole of XBL is likely gone soon I'm
not sure it is worth cleaning that up much.

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

--HG--
rename : dom/xbl/nsXBLWindowKeyHandler.cpp => dom/events/GlobalKeyListener.cpp
rename : dom/xbl/nsXBLWindowKeyHandler.h => dom/events/GlobalKeyListener.h
rename : dom/xbl/nsXBLPrototypeHandler.cpp => dom/events/KeyEventHandler.cpp
rename : dom/xbl/nsXBLPrototypeHandler.h => dom/events/KeyEventHandler.h
rename : dom/xbl/builtin/ShortcutKeyDefinitionsForBrowserCommon.h => dom/events/ShortcutKeyDefinitionsForBrowserCommon.h
rename : dom/xbl/builtin/ShortcutKeyDefinitionsForEditorCommon.h => dom/events/ShortcutKeyDefinitionsForEditorCommon.h
rename : dom/xbl/builtin/ShortcutKeyDefinitionsForInputCommon.h => dom/events/ShortcutKeyDefinitionsForInputCommon.h
rename : dom/xbl/builtin/ShortcutKeyDefinitionsForInputCommon.h => dom/events/ShortcutKeyDefinitionsForTextAreaCommon.h
rename : dom/xbl/builtin/ShortcutKeys.cpp => dom/events/ShortcutKeys.cpp
rename : dom/xbl/builtin/ShortcutKeys.h => dom/events/ShortcutKeys.h
rename : dom/xbl/builtin/android/ShortcutKeyDefinitions.cpp => dom/events/android/ShortcutKeyDefinitions.cpp
rename : dom/xbl/builtin/android/moz.build => dom/events/android/moz.build
rename : dom/xbl/builtin/emacs/ShortcutKeyDefinitions.cpp => dom/events/emacs/ShortcutKeyDefinitions.cpp
rename : dom/xbl/builtin/android/moz.build => dom/events/emacs/moz.build
rename : dom/xbl/builtin/mac/ShortcutKeyDefinitions.cpp => dom/events/mac/ShortcutKeyDefinitions.cpp
rename : dom/xbl/builtin/android/moz.build => dom/events/mac/moz.build
rename : dom/xbl/builtin/unix/ShortcutKeyDefinitions.cpp => dom/events/unix/ShortcutKeyDefinitions.cpp
rename : dom/xbl/builtin/android/moz.build => dom/events/unix/moz.build
rename : dom/xbl/builtin/win/ShortcutKeyDefinitions.cpp => dom/events/win/ShortcutKeyDefinitions.cpp
rename : dom/xbl/builtin/android/moz.build => dom/events/win/moz.build
extra : moz-landing-system : lando
2019-09-06 17:10:40 +00:00
Geoff Brown
56ca134785 Bug 1579272 - Cleanup obviously fennec-centric test annotations; r=bc
Remove test manifest annotations that specifically target fennec,
or likely target the android 4.3 emulator.

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

--HG--
extra : moz-landing-system : lando
2019-09-06 16:51:10 +00:00
Cosmin Sabou
54e16b14e3 Backed out 6 changesets (bug 1518442) as requested by jdai.
Backed out changeset 74c27d7d13c5 (bug 1518442)
Backed out changeset a092042068ab (bug 1518442)
Backed out changeset 1df8f544b3b7 (bug 1518442)
Backed out changeset 65f7059b0080 (bug 1518442)
Backed out changeset c8fbe42eba38 (bug 1518442)
Backed out changeset e7a459689227 (bug 1518442)

--HG--
extra : rebase_source : 938405a9643076c7aa894059bcdd8d20a8110873
2019-09-06 17:58:57 +03:00
John Dai
1fd20a87f9 Bug 1518442 - Part 3: Add dom.formdata.event.enabled preference for Event-based form participation; r=smaug,edgar
Differential Revision: https://phabricator.services.mozilla.com/D43987

--HG--
extra : moz-landing-system : lando
2019-09-06 09:47:31 +00:00
John Dai
7cc4da92b6 Bug 1518442 - Part 2: Implement Event-based form participation; r=smaug,edgar
For Event-based form participation specification PR:
https://github.com/whatwg/html/pull/4239

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

--HG--
extra : moz-landing-system : lando
2019-09-06 09:47:29 +00:00
Razvan Maries
10dbfc585c Backed out changeset e18ae5f66cac (bug 1550058) for causing Android build bustages. CLOSED TREE
--HG--
rename : dom/events/ShortcutKeyDefinitionsForBrowserCommon.h => dom/xbl/builtin/ShortcutKeyDefinitionsForBrowserCommon.h
rename : dom/events/ShortcutKeyDefinitionsForEditorCommon.h => dom/xbl/builtin/ShortcutKeyDefinitionsForEditorCommon.h
rename : dom/events/ShortcutKeyDefinitionsForTextAreaCommon.h => dom/xbl/builtin/ShortcutKeyDefinitionsForInputCommon.h
rename : dom/events/ShortcutKeys.cpp => dom/xbl/builtin/ShortcutKeys.cpp
rename : dom/events/ShortcutKeys.h => dom/xbl/builtin/ShortcutKeys.h
rename : dom/events/android/ShortcutKeyDefinitions.cpp => dom/xbl/builtin/android/ShortcutKeyDefinitions.cpp
rename : dom/events/win/moz.build => dom/xbl/builtin/android/moz.build
rename : dom/events/emacs/ShortcutKeyDefinitions.cpp => dom/xbl/builtin/emacs/ShortcutKeyDefinitions.cpp
rename : dom/events/mac/ShortcutKeyDefinitions.cpp => dom/xbl/builtin/mac/ShortcutKeyDefinitions.cpp
rename : dom/events/unix/ShortcutKeyDefinitions.cpp => dom/xbl/builtin/unix/ShortcutKeyDefinitions.cpp
rename : dom/events/win/ShortcutKeyDefinitions.cpp => dom/xbl/builtin/win/ShortcutKeyDefinitions.cpp
rename : dom/events/GlobalKeyListener.cpp => dom/xbl/nsXBLWindowKeyHandler.cpp
rename : dom/events/GlobalKeyListener.h => dom/xbl/nsXBLWindowKeyHandler.h
2019-09-05 20:31:59 +03:00
Dave Townsend
3a36964e63 Bug 1550058: Move most keyboard shortcut handling out of XBL. r=masayuki
Most of our keyboard shortcut handling is handled by nsXBLWindowKeyHandler along
with nsXBLPrototypeHandler. With the impending removal of XBL this needs to
change.

This patch moves nsXBLWindowKeyHandler to dom/events/GlobalKeyListener and copies
nsXBLPrototypeHandler to dom/events/KeyEventHandler. Windows, text elements and
XUL <keyset> are changed to use the new copies and anything unnecessary for
those is stripped out.

XBL handler elements still remain using the existing nsXBLPrototypeHandler path.
Some of the code is ripped out there to make it compile. There is probably a
lot more that can be removed but since the whole of XBL is likely gone soon I'm
not sure it is worth cleaning that up much.

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

--HG--
rename : dom/xbl/nsXBLWindowKeyHandler.cpp => dom/events/GlobalKeyListener.cpp
rename : dom/xbl/nsXBLWindowKeyHandler.h => dom/events/GlobalKeyListener.h
rename : dom/xbl/nsXBLPrototypeHandler.cpp => dom/events/KeyEventHandler.cpp
rename : dom/xbl/nsXBLPrototypeHandler.h => dom/events/KeyEventHandler.h
rename : dom/xbl/builtin/ShortcutKeyDefinitionsForBrowserCommon.h => dom/events/ShortcutKeyDefinitionsForBrowserCommon.h
rename : dom/xbl/builtin/ShortcutKeyDefinitionsForEditorCommon.h => dom/events/ShortcutKeyDefinitionsForEditorCommon.h
rename : dom/xbl/builtin/ShortcutKeyDefinitionsForInputCommon.h => dom/events/ShortcutKeyDefinitionsForInputCommon.h
rename : dom/xbl/builtin/ShortcutKeyDefinitionsForInputCommon.h => dom/events/ShortcutKeyDefinitionsForTextAreaCommon.h
rename : dom/xbl/builtin/ShortcutKeys.cpp => dom/events/ShortcutKeys.cpp
rename : dom/xbl/builtin/ShortcutKeys.h => dom/events/ShortcutKeys.h
rename : dom/xbl/builtin/android/ShortcutKeyDefinitions.cpp => dom/events/android/ShortcutKeyDefinitions.cpp
rename : dom/xbl/builtin/android/moz.build => dom/events/android/moz.build
rename : dom/xbl/builtin/emacs/ShortcutKeyDefinitions.cpp => dom/events/emacs/ShortcutKeyDefinitions.cpp
rename : dom/xbl/builtin/android/moz.build => dom/events/emacs/moz.build
rename : dom/xbl/builtin/mac/ShortcutKeyDefinitions.cpp => dom/events/mac/ShortcutKeyDefinitions.cpp
rename : dom/xbl/builtin/android/moz.build => dom/events/mac/moz.build
rename : dom/xbl/builtin/unix/ShortcutKeyDefinitions.cpp => dom/events/unix/ShortcutKeyDefinitions.cpp
rename : dom/xbl/builtin/android/moz.build => dom/events/unix/moz.build
rename : dom/xbl/builtin/win/ShortcutKeyDefinitions.cpp => dom/events/win/ShortcutKeyDefinitions.cpp
rename : dom/xbl/builtin/android/moz.build => dom/events/win/moz.build
extra : moz-landing-system : lando
2019-09-05 16:51:27 +00:00
Micah Tigley
4887367dee Bug 1322708 - Improve console warnings for unsupported media resource. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D44596

--HG--
extra : moz-landing-system : lando
2019-09-04 22:10:02 +00:00
Emilio Cobos Álvarez
7df79853f9 Bug 1578700 - Change use counter setup to propagate the page use counters together. r=smaug
This is so that SetUseCounter is as cheap as possible.

This is in preparation for hooking the CSS use counters to telemetry. We want
CSS use counters to be fast and be propagated at once to the parent page. This
will make sure to use the same setup as everywhere else.

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

--HG--
extra : moz-landing-system : lando
2019-09-04 23:36:21 +00:00
Gijs Kruitbosch
9f3a3e9669 Bug 1578709 - Only set flash only pref for those tests that need it, r=mconley,ahal
Differential Revision: https://phabricator.services.mozilla.com/D44648

--HG--
extra : moz-landing-system : lando
2019-09-04 22:12:39 +00:00
Gurzau Raul
f96e9cd73f Backed out changeset 887d125d7f59 (bug 1578709) for failing at test_bug427744.html on a CLOSED TREE. 2019-09-04 21:34:11 +03:00
Gijs Kruitbosch
bb899238e7 Bug 1578709 - Only set flash only pref for those tests that need it, r=mconley,ahal
Differential Revision: https://phabricator.services.mozilla.com/D44648

--HG--
extra : moz-landing-system : lando
2019-09-04 17:28:02 +00:00
Andreea Pavel
340bdf15cf Bug 1533759 - disabled test_window_open_close.html on linux64 qr r=intermittent-reviewers,gbrown
Differential Revision: https://phabricator.services.mozilla.com/D44305

--HG--
extra : moz-landing-system : lando
2019-09-03 15:34:45 +00:00
Andreas Pehrson
4c6d307f1c Bug 1576836 - Let audio elements end when a MediaStream becomes inaudible. r=jib
Differential Revision: https://phabricator.services.mozilla.com/D43629

--HG--
extra : moz-landing-system : lando
2019-09-02 13:53:50 +00:00
Csoregi Natalia
a829e6912f Backed out 2 changesets (bug 1576836) for media failures on DOMMediaStream.cpp. CLOSED TREE
Backed out changeset 6c0f218a2988 (bug 1576836)
Backed out changeset 481ab3a1f913 (bug 1576836)
2019-09-02 16:30:05 +03:00
Andreas Pehrson
df0968cae9 Bug 1576836 - Let audio elements end when a MediaStream becomes inaudible. r=jib
Depends on D43628

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

--HG--
extra : moz-landing-system : lando
2019-08-31 00:13:42 +00:00