Граф коммитов

3758 Коммитов

Автор SHA1 Сообщение Дата
Margareta Eliza Balazs 48299c8cd6 Merge inbound to mozilla-central. a=merge 2018-08-16 12:24:26 +03:00
Ehsan Akhgari 99d839224e Bug 1483604 - Part 2: Make all of the external consumers of nsContentUtils::StorageDisabledByAntiTracking() pass a channel if available; r=smaug 2018-08-15 19:00:52 -04:00
dvarga 87db76ae1a Merge mozilla-central to mozilla-inbound on a CLOSED TREE
--HG--
extra : rebase_source : c9e6b9edae9ecf064d1318fa15d5d57ea42c102a
2018-08-16 01:22:36 +03:00
Timothy Guan-tin Chien 29d12ef10f Bug 1483597 - Remove the unneeded GetRootElement() check in bug 1261536, r=bz
--HG--
extra : rebase_source : b47d872451af42c882dd9857070221170d0b3681
2018-08-15 09:28:32 -07:00
Gerald Squelart 6ac188399d Bug 1261536 - Create a synthetic document after the window is set - r=bz
--HG--
extra : source : eb91c87d4515550e5bef7e77f3402198daef9155
extra : amend_source : 11a9f8dabda14491b4db7faa675c556ff502ccb8
2018-08-14 14:53:17 -07:00
Dale Harvey 59e904f6cd Bug 1476555 - Show notification when autoplay blocked globally. r=cpearce,johannh
MozReview-Commit-ID: EI0GiaoBNqX

--HG--
extra : rebase_source : 0c6fb98047913fc50423532cc4c433c4627c5b06
2018-07-23 16:43:08 +01:00
Timothy Guan-tin Chien b541bf98b2 Bug 1431255 - Part VII, Trap mouse/touch/pointer events in audio/video element for UI Widgets r=smaug
This is akin to what's done in bug 1327097.

MozReview-Commit-ID: EERkjrxWZOu

--HG--
extra : rebase_source : 997a1737a2808ed177b4974d433d84878dc994ef
2018-07-12 12:32:44 +08:00
Margareta Eliza Balazs 9575863d77 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-08-14 12:35:25 +03:00
Xidorn Quan 33b8a6dacd Bug 1483090 - Rename StyleUserInterface to StyleUI. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D3276

--HG--
extra : moz-landing-system : lando
2018-08-14 08:37:37 +00:00
Andrea Marchesini d1e5833a37 Bug 1480780 - Merge the privacy.3rdpartystorage.enabled pref with the network.cookie.cookieBehavior pref; r=ehsan
This patch introduces a new cookie behavior policy called
BEHAVIOR_REJECT_TRACKER.  It also makes it possible to override that
behavior with cookie permissions similar to other cookie behaviors.
2018-08-13 16:01:16 -04:00
Timothy Guan-tin Chien dab48182aa Bug 1431255 - Part V, Set the reflectors of the UA Widget DOM to UA Widget Scope r=bholley
The DOM elements within the UA Widget Shadow DOM should have its reflectors in
the UA Widget Scope. This is done by calling nsINode::IsInUAWidget() which
would check its containing shadow and its UA Widget bit.

To prevent JS access of the DOM element before it is in the
UA Widget Shadom DOM tree, various DOM methods are set to inaccessible to
UA Widget script. It would need to use the two special methods in ShadowRoot
instead to insert the DOM directly into the shadow tree.

MozReview-Commit-ID: Jz9iCaVIoij

--HG--
extra : rebase_source : b7b17be68dcde00cfeb207cb39cf16b486f2ab02
2018-06-29 13:39:46 -07:00
Timothy Guan-tin Chien 8cc930296b Bug 1431255 - Part II, Create a Shadow Root in HTMLMediaElement when enabled, skipping <xul:videocontrols> r=dholbert,smaug
This prevents XBL binding from being attached, and create the Shadow Root to
host controls to be created by the script.

Shadow Root and the JS controls are lazily constructed when the controls
attribute is set.

Set nsVideoFrame as dynamic-leaf so it will ignore content child frames when
the controls are XBL anonymous content, and handles child frames from controls
in the Shadow DOM. The content nodes are still ignored since there is no
<slot>s in our Shadow DOM.

MozReview-Commit-ID: 3hk41iMa07n

--HG--
extra : rebase_source : f6f8a3facc9d83f5626cf5f3b4e3fa27438a8a8f
2018-06-27 11:12:38 -07:00
alwu 31ef9b1d53 Bug 1482259 - Add Telemetry to know the proportion of silent part in the whole audio track. r=cpearce,francois
Use new telemetry histogram ID 'AUDIO_TRACK_SILENCE_PROPORTION' to know the proportion of
silent part in the whole audio track.

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

--HG--
extra : moz-landing-system : lando
2018-08-15 16:35:51 +00:00
Margareta Eliza Balazs f617807241 Merge inbound to mozilla-central. a=merge 2018-08-10 12:17:09 +03:00
L. David Baron 1e88f0f003 Bug 1369941: Replace single integers N in fuzzy() and fuzzy-if() with 0-N ranges. r=dholbert
This patch was written entirely by the following script:

  #!/bin/bash

  if [ ! -d "./.hg" ]
  then
    echo "Not in a source tree." 1>&2
    exit 1
  fi

  find . -regex '.*\(ref\|crash\)test.*\.list' | while read FILENAME
  do
    echo "Processing ${FILENAME}."
    # The following has four substitutions:
    # * The first one replaces the *first* argument to fuzzy() when it doesn't
    #   have a - in it, by replacing it with an explicit 0-N range.
    # * The second one does the same for the *second* argument to fuzzy().
    # * The third does the same for the *second* argument to fuzzy-if().
    # * The fourth does the same for the *third* argument to fuzzy-if().
    #
    # Note that this is using perl rather than sed because perl doesn't
    # support non-greedy matching, which is needed for the first argument to
    # fuzzy-if.
    perl -pi -e 's/(fuzzy\()([^ ,()-]*)(,[^ ,()]*\))/${1}0-${2}${3}/g;s/(fuzzy\([^ ,()]*,)([^ ,()-]*)(\))/${1}0-${2}${3}/g;s/(fuzzy-if\([^ ]*?,)([^ ,()-]*)(,[^ ,()]*\))/${1}0-${2}${3}/g;s/(fuzzy-if\([^ ]*?,[^ ,()]*,)([^ ,()-]*)(\))/${1}0-${2}${3}/g' "${FILENAME}"
  done

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

--HG--
extra : moz-landing-system : lando
2018-08-09 20:10:21 +00:00
Tiberius Oros aff5d4ad5d Merge inbound to mozilla-central. a=merge 2018-08-09 13:02:05 +03:00
Emilio Cobos Álvarez 1fbd784d00 Bug 1481601 - Remove now-useless aPreallocateChildren from nsINode::Clone() and friends. r=bzbarsky
Since sed on multiple lines ended up being such a pain and I didn't end up
writing a script for this because I didn't think it'd end up being so boring, I
may have made a couple cleanups here and there as well...

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

--HG--
extra : moz-landing-system : lando
2018-08-08 23:58:44 +00:00
dvarga 12f19b94e9 Backed out 2 changesets (bug 1362034) for failure at browser/tools/mozscreenshots/primaryUI/browser_primaryUI.js on a CLOSED TREE
Backed out changeset 1c3329958b8a (bug 1362034)
Backed out changeset f68b1b76af36 (bug 1362034)

--HG--
extra : histedit_source : 6169c5ffe856266d3bc8b2ca32f4b67054c71bbe
2018-08-08 22:11:56 +03:00
Jonathan Kingston c15f69d427 Bug 1362034 - Tests for addTab() to provide the correct triggering principal. r=ckerschb,Gijs
Summary: Depends on D2046

Reviewers: ckerschb, Gijs

Reviewed By: ckerschb, Gijs

Bug #: 1362034

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

--HG--
extra : rebase_source : ccded0f06a0dc4567b827f42ee29f4b8954154fe
extra : amend_source : 94da8ecc053e56958fa4137d7e497362fa2c11f1
2018-08-08 20:05:30 +03:00
Andrew Osmond 51d273388c Bug 1416328 - Part 2. Expose decoding attribute for img elements. r=bz,tnikkel
This adds support for HTMLImageElement's decoding attribute, as
described by:

https://github.com/whatwg/html/pull/3221
https://whatpr.org/html/3221/images.html#decoding-images

It also exposes the same attribute on SVGImageElement, just as Blink has
chosen to do so.
2018-08-08 07:56:01 -04:00
Csoregi Natalia 0f4d50ff52 Merge inbound to mozilla-central. a=merge 2018-08-08 12:58:36 +03:00
alwu 07c3b57fa1 Bug 1480484 - add telemetry scalar to measure the count for blocked media element without audio track. r=cpearce,francois
This is used to count the potiential number of the blocked autoplay media element without audio track
even if user was enable autoplay.

It might happen on three cases,
1. play -> loadedmetadata
2. loadedmetadata -> play
3. loadedmetadata -> has 'autoplay' keyword

In first case we need to check whether the play invocation has been called, and check other other cases
before the media starts playing.

In addition, the scalar name isn't consist with other names is because of the 40 maximum limitation of
the ping name.

MozReview-Commit-ID: 6Qm6TD4ME8I

--HG--
extra : rebase_source : d6c0dab7a0a2deed0025a0d039ead1f6ad218300
2018-08-03 13:21:03 -07:00
Narcis Beleuzu 2626256ea6 Backed out changeset a7067dbdc7b5 (bug 1480484) for build bustages on HTMLMediaElement.cpp. CLOSED TREE 2018-08-08 00:44:07 +03:00
alwu deac67b7c2 Bug 1480484 - add telemetry scalar to measure the count for blocked media element without audio track. r=cpearce,francois
This is used to count the potiential number of the blocked autoplay media element without audio track
even if user was enable autoplay.

It might happen on three cases,
1. play -> loadedmetadata
2. loadedmetadata -> play
3. loadedmetadata -> has 'autoplay' keyword

In first case we need to check whether the play invocation has been called, and check other other cases
before the media starts playing.

In addition, the scalar name isn't consist with other names is because of the 40 maximum limitation of
the ping name.

MozReview-Commit-ID: 6Qm6TD4ME8I

--HG--
extra : rebase_source : 81c23390cb603d3fbd284f22b129540a73318d2c
2018-08-03 13:21:03 -07:00
Kris Maglione 25c94b46d8 Bug 1481021: Part 1 - Fix tests that rely on permissive COWs or SpecialPowers side-effects in frame script scopes. r=bz
Right now, a lot of test code relies on side-effects of SpecialPowers being
loaded into frame script globals. In particular:

- It forces permissive COWs from those scopes, which allows frame scripts to
  pass objects from those scopes to unprivileged content that they otherwise
  wouldn't.
- It imports a bunch of helper modules and WebIDL globals which would
  otherwise not be available.

Fortunately, this seems to only impact test code at this point. But there's a
real down-the-road risk of it impacting shipping code, which ends up working
in automation due to the side-effects of SpecialPowers, but failing in real
world use.

MozReview-Commit-ID: G27eSSOHymX

--HG--
extra : rebase_source : 1702e63fed719fc92def2bdbbb8a7c53572432db
extra : source : 41bedc526dd6ec6b7e8c7be1c832ac60c81d6263
2018-08-07 14:13:06 -07:00
Brindusan Cristian 16ec846afc Backed out 2 changesets (bug 1481021) for bc failures on security/sandbox/test/browser_bug1393259.js.
Backed out changeset c53c7b0249ad (bug 1481021)
Backed out changeset 41bedc526dd6 (bug 1481021)
2018-08-08 03:22:16 +03:00
Kyle Machulis d920d54421 Bug 1480628 - Remove nsIWebShellServices; r=nika
Summary:
nsIWebShellServices is only implemented by nsDocShell, and only used
in one place in C++. Move definitions to nsIDocShell, and rename
functions to show they are only used as part of Charset changes.

MozReview-Commit-ID: DOSeE3Doc51

Test Plan: Try run

Reviewers: nika

Tags: #secure-revision

Bug #: 1480628

Differential Revision: https://phabricator.services.mozilla.com/D2692
2018-08-07 15:12:55 -07:00
Kris Maglione c1969dbca2 Bug 1481021: Part 1 - Fix tests that rely on permissive COWs or SpecialPowers side-effects in frame script scopes. r=bz
Right now, a lot of test code relies on side-effects of SpecialPowers being
loaded into frame script globals. In particular:

- It forces permissive COWs from those scopes, which allows frame scripts to
  pass objects from those scopes to unprivileged content that they otherwise
  wouldn't.
- It imports a bunch of helper modules and WebIDL globals which would
  otherwise not be available.

Fortunately, this seems to only impact test code at this point. But there's a
real down-the-road risk of it impacting shipping code, which ends up working
in automation due to the side-effects of SpecialPowers, but failing in real
world use.

MozReview-Commit-ID: G27eSSOHymX

--HG--
extra : rebase_source : c528dffe3a54eec75ad6cb358980b783b00eb4a4
2018-08-07 14:13:06 -07:00
Olli Pettay 7315a671e1 Bug 1481399 - rename nsAttrAndChildArray to AttrArray, r=mrbkap
--HG--
rename : dom/base/nsAttrAndChildArray.cpp => dom/base/AttrArray.cpp
rename : dom/base/nsAttrAndChildArray.h => dom/base/AttrArray.h
extra : rebase_source : 488f4d9c87bf337686abfa98e79466343a9e6685
2018-08-07 22:07:26 +03:00
Jonathan Kingston 2f0987a202 Bug 1362034 - Tests for addTab() to provide the correct triggering principal. r=ckerschb r?=gijs
Summary: Depends on D2046

Reviewers: ckerschb!, Gijs!

Tags: #secure-revision

Bug #: 1362034

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

--HG--
extra : source : 33884d05cc94463950b31fab1fd2f37ada9becef
extra : intermediate-source : 72471adb75d5ec3dc2b0c8f972a6f1f26bfd3ae2
extra : histedit_source : f384cbab58401575afc3443c9a431b73cff806d4
2018-07-06 21:16:29 +01:00
Andreea Pavel f5c1119983 Backed out 2 changesets (bug 1362034) for failing damp | inspector/cold-open.js on a CLOSED TREE
Backed out changeset 8c8925b75aa2 (bug 1362034)
Backed out changeset ff6b05c96094 (bug 1362034)
2018-08-06 20:42:44 +03:00
Jonathan Kingston 4ca581ffed Bug 1362034 - Tests for addTab() to provide the correct triggering principal. r=ckerschb,Gijs
Summary: Depends on D2046

Reviewers: ckerschb, Gijs

Reviewed By: ckerschb, Gijs

Bug #: 1362034

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

--HG--
extra : rebase_source : 4bb9e7feb0704239756e6e38623c0fea81669f7b
extra : amend_source : 9417f96547735fbdc55ea23666327a5cb86ac92f
2018-08-06 19:56:37 +03:00
Dave Townsend 7ea0473c02 Bug 1478823: Add a chrome DOM event signalling that the head element's children have been parsed. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D2612

--HG--
extra : moz-landing-system : lando
2018-08-03 21:16:04 +00:00
Narcis Beleuzu 31527185b4 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-08-03 01:34:26 +03:00
alwu 1eb1b2a3d2 Bug 1480281 - part2 : move exist log to autoplay log module. r=cpearce
MozReview-Commit-ID: EtBRTjYG8k3

--HG--
extra : rebase_source : 65305ba7d151fcbb9b1a425dd319b5002afa0b5e
2018-08-01 17:50:19 -07:00
alwu 6d23d559af Bug 1480281 - part1 : add autoplay debug log module. r=cpearce
Add new log module which allow us to debug by using "MOZ_LOG=Autoplay:5".

MozReview-Commit-ID: 9CG5JyCw21G

--HG--
extra : rebase_source : c71c4bbed88b07a7803d93b661bfeac37cb94035
2018-08-01 17:30:59 -07:00
Cosmin Sabou 8e28811008 Merge mozilla-central to mozilla-inbound. a=merge 2018-08-02 16:15:22 +03:00
Noemi Erli 58e27f3dd9 Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-08-02 12:04:24 +03:00
Noemi Erli 8f66a71e70 Merge inbound to mozilla-central. a=merge 2018-08-02 11:54:46 +03:00
Jan de Mooij e0ef865217 Bug 1479363 part 5 - Use JSAutoRealm instead of JSAutoRealmAllowCCW in remaining dom/ directories. r=mccr8 2018-08-02 08:49:00 +02:00
Chris Pearce 2e3c4bd9af Bug 1478208 - Implement HTMLMediaElement.allowedToPlay. r=alwu,bz
Various web authors have expressed desire to know in advance whether autoplay
will work.

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

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

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

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

MozReview-Commit-ID: AkBu0G7uCJ0

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

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

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

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

MozReview-Commit-ID: GKNksctGik

--HG--
rename : toolkit/content/tests/chrome/file_autocomplete_with_composition.js => toolkit/content/tests/chrome/file_editor_with_autocomplete.js
rename : toolkit/content/tests/chrome/test_autocomplete_with_composition_on_input.html => toolkit/content/tests/chrome/test_editor_for_input_with_autocomplete.html
rename : toolkit/content/tests/chrome/test_autocomplete_with_composition_on_textbox.xul => toolkit/content/tests/chrome/test_editor_for_textbox_with_autocomplete.xul
extra : rebase_source : b90419d9e5a01e86f6e6418f8df002c91416acae
2018-07-03 22:25:52 +09:00
Dorel Luca a6587cb874 Merge mozilla-cental to mozilla-inbound
--HG--
rename : browser/components/payments/test/mochitest/test_labelled_checkbox.html => browser/components/payments/test/mochitest/test_completion_error_page.html
extra : rebase_source : 8549ae557dceba753101a71840a5076783bd1d36
2018-08-01 12:54:59 +03:00
Emilio Cobos Álvarez 8fbd92cc4b Bug 1479860: Add a missing override keyword that got lost. r=me
on a CLOSED TREE of course, sigh.

MozReview-Commit-ID: 5nqGog4zg3Z
2018-08-01 11:31:24 +02:00
Emilio Cobos Álvarez 8f34c12e14 Bug 1479860: Remove unused aCompileEventHandlers argument from BindToTree. r=bz
Mostly automatic via sed. Only parts which I touched manually (apart from a
couple ones where I fixed indentation or which had mispelled arguments) are the
callers. I may have removed a couple redundant `virtual` keywords as well when
I started to do it manually, I can revert those if wanted.

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

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

MozReview-Commit-ID: 2oIgatty2HU
2018-08-01 10:42:54 +02:00
Bogdan Tara bd351673a5 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-08-01 01:05:56 +03:00
alwu 5116578704 Bug 1476701 - notify observer when audible autoplay occurred. r=cpearce,jaws
In our autoplay shield-study, we want to collect the information which could tell us how many website
contains audible autoplay media, but there is no way to get this information on current API desigin.

Therefore, I would like to send a new notification when autoplay occurred.

The extension code could get the information by following way,
```
Services.obs.addObserver((subject, topic, data) => {
    // DO SOMETHING
}, "AudibleAutoplayMediaOccurred");
```

MozReview-Commit-ID: 4bSYcxDZOGK

--HG--
extra : rebase_source : 2a4f060dbd582419bf0727408b04f2540155aa02
2018-07-25 09:08:44 -07:00
Edgar Chen 106676d84e Bug 1450989 - Capture the action and target as part of the form submission creation; r=bz 2018-07-22 11:11:27 +02:00
Boris Zbarsky 754087a992 Bug 1446940 part 5. Stop getting docshells from windows via getInterface in dom/editor/etc code. r=kmag 2018-08-01 13:07:11 -04:00
Kris Maglione 031076f2f3 Bug 1463291: Move docShell getter from Document to Window. r=bz
DocShells are associated with outer DOM Windows, rather than Documents, so
having the getter on the document is a bit odd to begin with. But it's also
considerably less convenient, since most of the times when we want a docShell
from JS, we're dealing most directly with a window, and have to detour through
the document to get it.

MozReview-Commit-ID: LUj1H9nG3QL

--HG--
extra : source : fcfb99baa0f0fb60a7c420a712c6ae7c72576871
extra : histedit_source : 5be9b7b29a52a4b8376ee0bdfc5c08b12e3c775a
2018-05-21 16:58:23 -07:00