Commit Graph

3797 Commits

Author SHA1 Message Date
Dorel Luca
7a91966c10 Merge mozilla-inbound to mozilla-central. a=merge 2018-09-15 12:46:59 +03:00
Xidorn Quan
8327aa1e34 Bug 1188256 part 7 - Have Element.requestFullscreen return a Promise. r=smaug
Depends on D5858

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

--HG--
extra : moz-landing-system : lando
2018-09-14 22:44:21 +00:00
Xidorn Quan
abdaa90858 Bug 1375319 part 3 - Try dispatching fullscreen events to element first rather than document. r=smaug
Some steps in file_fullscreen-api.html are adjusted in order to test
the behavior that the event is correctly dispatched to the document
when element is disconnected.

Depends on D5415

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

--HG--
extra : moz-landing-system : lando
2018-09-14 00:06:16 +00:00
Xidorn Quan
6239a69055 Bug 1375319 part 2 - Use a global const for element to fullscreen in file_fullscreen-api test. r=smaug
Depends on D5414

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

--HG--
extra : moz-landing-system : lando
2018-09-14 00:05:53 +00:00
Timothy Guan-tin Chien
052ca9c390 Bug 1487143 - Properly dispatch MozAutoplayMediaBlocked event to content, r=alwu
The MozAutoplayMediaBlocked event should have its target set to the video
element, not the document.

Also, MozNoControlsBlockedVideo event has to initialized from the CustomEvent
constructor of the right window for the XBL binding to access it. I don't know
when it stopped working.

Test is added to ensure the entire UI won't break.

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

--HG--
extra : moz-landing-system : lando
2018-09-13 21:21:11 +00:00
Timothy Guan-tin Chien
9455e67e2c Bug 1491066 - Allow TextTrackManager to pass cue without videocontrols r=alwu
With UA Widget, the videocontrols container is created lazily.
It won't be a problem for WebVTT.processCues() in vtt.jsm, so
TextTrackManager::UpdateCueDisplay() should not early return there, but pass
nullptr to it.

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

--HG--
extra : moz-landing-system : lando
2018-09-13 22:38:43 +00:00
Ehsan Akhgari
65f44ebf27 Bug 1489790 - Part 8: Remove the XPCOM component registration for @mozilla.org/editor/editorcontroller;1; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D5363
2018-09-11 09:58:33 -04:00
Ehsan Akhgari
c9bfa076d5 Bug 1489790 - Part 7: Remove the XPCOM component registration for @mozilla.org/editor/editingcontroller;1; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D5362
2018-09-11 09:58:33 -04:00
Ehsan Akhgari
34ac769d9e Bug 1491019 - Remove the XPCOM component registration for nsXULControllers; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D5774
2018-09-14 13:32:45 -04:00
Andreea Pavel
2b539c7b7e Merge autoland to mozilla-central. a=merge 2018-09-11 00:58:48 +03:00
Andrea Marchesini
f7d3352ce2 Bug 1489844 - Port DOMPrefs to StaticPrefs - part 18 - privacy.resistFingerprinting, r=ehsan 2018-09-10 20:36:17 +02:00
Andrea Marchesini
c47168b4b7 Bug 1489844 - Port DOMPrefs to StaticPrefs - part 15 - dom.webkitBlink.dirPicker.enabled, r=ehsan 2018-09-10 20:36:16 +02:00
Xidorn Quan
9d8716ba91 Bug 1489376 - Dispatch fullscreen events in tree order. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D5394

--HG--
extra : moz-landing-system : lando
2018-09-10 14:17:08 +00:00
Sylvestre Ledru
aa37bde79b Bug 1489454 - Remove all trailing whitespaces (again) r=Ehsan
This also includes moving some files to the regular format.

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

--HG--
extra : moz-landing-system : lando
2018-09-07 14:47:51 +00:00
Dorel Luca
6eaad9277b Merge mozilla-central to autoland 2018-09-07 19:37:17 +03:00
Brian Grinstead
150199f6f8 Bug 1488938 - Round two: migrate mochitest-browser tests to use element variations of firstChild, etc;r=Gijs
This is a follow up to Bug 1482667. The list of callers was gathered by instrumenting
the webidl calls to these methods and dumping JS stack when they are called in browser.xul.

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

--HG--
extra : moz-landing-system : lando
2018-09-07 15:31:38 +00:00
Zibi Braniecki
e78d123097 Bug 1455649 - DocumentL10n, part 3 - Plug DocumentL10n life cycle into DOM hooks. r=smaug
--HG--
extra : rebase_source : d071878d22b5fd204db8367780ee22be22196773
2018-09-06 18:28:40 -07:00
Nicholas Nethercote
13643f64e8 Bug 1488321 - Fix up nsISHEntry.{index,getEntryAtIndex()}. r=nika
nsISHEntry.index is readonly, but if you pass `true` as getEntryAtIndex()'s
second argument, nsISHEntry.index will be modified. This is pretty gross.

This patch changes `index` so it's not readonly (because it's not!) and removes
getEntryAtIndex()'s second argument.

--HG--
extra : rebase_source : c519d77fcc1c3bda2f260b5888ce9cd0f6cfdab5
2018-09-05 09:02:37 +10:00
alwu
490f94cf41 Bug 1453862 - Log to web console when autoplay blocked. r=flod,baku
Log to the web console when we block autoplay, in order to help web developers debug their sites.

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

--HG--
extra : moz-landing-system : lando
2018-08-29 16:51:24 +00:00
alwu
5f20aea27a Bug 1485189 - part1 : dispatch related events when play is not allowed. r=cpearce
"blocked" event is used for testing.

"MozAutoplayMediaBlocked" event is used for changing the control UI on Fennec.

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

--HG--
extra : moz-landing-system : lando
2018-08-28 22:03:15 +00:00
Rob Wu
88ec13510d Bug 1465388 - Resume about:blank parser upon unblocking the document r=hsivonen
When `document.blockParsing()` is called, the nsIParser is suspended
until the document is unblocked. For about:blank documents, this is a
nsParser.

When a document is unblocked, nsParser::ContinueInterruptedParsingAsync
is invoked, which delegates its implementation to nsIContentSink, which
is a nsHTMLContentSink for about:blank documents. Due to a missing
implementation of nsHTMLContentSink::ContinueInterruptedParsingAsync,
the parser was never resumed, causing bug 1465388 and bug 1407501.

This patch fixes the problem, by implementing the required method (and
using a load blocker to ensure that the (about:blank) document does not
finish before the parser finishes).

This patch is tested through extension tests: Currently document_start
stylesheets always activate the parser blocker, and document_start
scripts trigger the parser blocker when the script has not been
preloaded yet (e.g. at the first run).
Before this patch, the test failed due to the assertion failure as
reported in the linked bugs. After this patch, the tests pass.

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

--HG--
extra : moz-landing-system : lando
2018-08-29 11:52:49 +00:00
Andreea Pavel
65e947cc68 Backed out changeset 126368a5c3ec (bug 1465388) for causing topcrash bug 1487004 a=backout 2018-08-29 11:39:19 +03:00
Rob Wu
618a64cb28 Bug 1465388 - Resume about:blank parser upon unblocking the document r=hsivonen
When `document.blockParsing()` is called, the nsIParser is suspended
until the document is unblocked. For about:blank documents, this is a
nsParser.

When a document is unblocked, nsParser::ContinueInterruptedParsingAsync
is invoked, which delegates its implementation to nsIContentSink, which
is a nsHTMLContentSink for about:blank documents. Due to a missing
implementation of nsHTMLContentSink::ContinueInterruptedParsingAsync,
the parser was never resumed, causing bug 1465388 and bug 1407501.

This patch fixes the problem, by implementing the required method (and
using a load blocker to ensure that the (about:blank) document does not
finish before the parser finishes).

This patch is tested through extension tests: Currently document_start
stylesheets always activate the parser blocker, and document_start
scripts trigger the parser blocker when the script has not been
preloaded yet (e.g. at the first run).
Before this patch, the test failed due to the assertion failure as
reported in the linked bugs. After this patch, the tests pass.

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

--HG--
extra : moz-landing-system : lando
2018-08-28 05:28:21 +00:00
Brendan Dahl
f6923ccc24 Bug 1485426 - Use createXULElement instead of createElement in XUL docs. r=bgrins
Preparing for transitioning to XHTML.

MozReview-Commit-ID: JLlmUxsvhIB

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

--HG--
extra : moz-landing-system : lando
2018-08-25 00:16:27 +00:00
alwu
2614e81154 Bug 1479270 - part1 : remove external player support in media element. r=jya
Since we have native HLS support in 59 [1], we don't need those code anymore.

[1] https://bugzilla.mozilla.org/show_bug.cgi?id=1345752

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

--HG--
extra : moz-landing-system : lando
2018-08-25 00:03:38 +00:00
Ehsan Akhgari
35f7627ddb Bug 1485871 - Remove some unused XPCOM registrations for editor; r=masayuki 2018-08-24 09:33:18 -04:00
Kris Maglione
3a5c05e76f Bug 1484496: Part 5e - Convert remaining nsISimpleEnumerator users to use JS iteration. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D3733

--HG--
extra : rebase_source : c0fac176d7b3d840c4dbb14f8d95ccfc7f83a5a8
extra : histedit_source : a92c40117d0808a3ad68c972f622a7a42c9ae8ba
2018-08-18 18:13:14 -07:00
alwu
4239949481 Bug 1483703 - part4 : modify current telemtry scalar because we won't block media without audio track anymore. r=cpearce,francois
Since we don't block media without audio track anymore, the original telemetry scalar becomes useless.

We need to change its meaning in order to know the number of allowed autoplay without audio track.

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

--HG--
extra : moz-landing-system : lando
2018-08-22 22:54:05 +00:00
alwu
598c2d9bb1 Bug 1483703 - part2 : add telemetry for the media which was blocked before loading metadata and ended up being without audio track. r=cpearce,francois
Add two telemetry scarlar,

"MEDIA_BLOCKED_NO_METADATA" records how many media which was blocked because it hadn't loaded metadata yet.
"MEDIA_BLOCKED_NO_METADATA_ENDUP_NO_AUDIO_TRACK" records how many media which was blocked because it hadn't loaded metadata and ended up for being no audio track.

By collecting those data, we can know the proportion of media which should be autoplay but was blocked because of lacking metadata.

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

--HG--
extra : moz-landing-system : lando
2018-08-22 22:50:54 +00:00
Emilio Cobos Álvarez
19b0bfc00d Bug 1484855: Match the 'is rendered' definition from the spec in innerText. r=smaug
This matches other implementations and the spec for fallback content like:

  <canvas><div>abc

(calling div.innerText).

We're treating the <div> as 'rendered' because it's not in a display: none
subtree, but that's not ok, since it is in fact not rendered.

This was added in bug 1226293, and Boris suggested this change, but roc opposed
because it'd be hard to spec properly in comment 15. Looks like the HTML spec
ended up merging roc's innerText spec, and now it's spec'd in terms of 'being
rendered'.

I think IsOrHasAncestorWithDisplayNone just doesn't work in any reasonable way
for stuff out of the flat tree. Thus I think this change is the right thing.

The canvas test fails because of bug 1485076.

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

--HG--
extra : moz-landing-system : lando
2018-08-22 09:05:09 +00:00
Francois Marier
309a23afc3 Bug 1482950 - Use the correct 3rdparty check in tracking annotations. r=dimi,Ehsan,mayhemer!,ehsan!
The mIsTrackingResource flag on nsIHttpChannel was split into two separate
flags depending on whether or not the resource is third-party. The correct
flag will be set by the channel classifier. Similarly, a new function was
introduced, GetIsThirdPartyTrackingResource(), for those consumers (like TP)
who only care about third-party trackers.

The existing function, GetIsTracking(), will continue to look at both
first-party and third-party trackers (the behavior since first party
tracking was added to annotations in bug 1476324).

The OverrideTrackingResource() function now allows nsHTMLDocument to
override both mIsFirstPartyTrackingResource and
mIsThirdPartyTrackingResource, but since this function is a little dangerous
and only has a single user, I added an assert to make future callers think
twice about using it to opt out of tracking annotations.

Currently, only the default storage restrictions need to look at first-party
trackers so every other consumer has been moved to
mIsThirdPartyTrackingResource or GetIsThirdPartyTrackingResource().

This effectively reverts the third-party checks added in bug 1476715 and
replaces them with the more complicated check that was added in bug 1108017.
It follows the approach that Ehsan initially suggested in bug 1476715. It
also reverts the changes in the expected values of the tracking annotation
test since these were, in hindsight, a warning about this regression.

Depends on D3722

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

--HG--
extra : moz-landing-system : lando
2018-08-20 23:53:45 +00:00
Emilio Cobos Álvarez
69f98d5c58 Bug 1484474 - Make the ua widget flag in ShadowRoot write-only. r=smaug
Letting people set it back to false would be bad.

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

--HG--
extra : moz-landing-system : lando
2018-08-18 21:32:38 +00:00
Masayuki Nakano
44ae690779 Bug 1449564 - part 2: Make absolute positioned element editor disabled in default and make it possible to enable it with new command r=m_kato
We have another built-in UI of editor which is not implemented by any other
browsers.  That is a draggable handler to move absolute positioned elements.
So, we should disable it in default for compatibility with the other browsers.

However, different from resizers and inline table editor, we don't have
command to enable/disable this feature but for backward compatibility, we
should have it.  Therefore, this patch adds new command
"enableAbsolutePositionEditor".

Note that whether resizing UI is available only with enableObjectResizing
state is different from enableInlineTableEditing command.  Resizers for
absolute positioned elements are NOT available both enableObjectResizing
and enableAbsolutePositionEditor are enabled.

Additionally, this adds automated tests to check basic functions of absolute
positioned editor.

MozReview-Commit-ID: 9ZSGB8tLpFw

--HG--
rename : editor/libeditor/tests/test_resizers_appearance.html => editor/libeditor/tests/test_abs_positioner_appearance.html
rename : editor/libeditor/tests/test_resizers_resizing_elements.html => editor/libeditor/tests/test_abs_positioner_positioning_elements.html
extra : rebase_source : d516f3f3ef36d4ad13938f214cb6e3868d7ff407
2018-04-04 22:27:49 +09:00
Csoregi Natalia
3e61ab4489 Merge inbound to mozilla-central. a=merge 2018-08-18 12:46:20 +03:00
Brad Werth
bac3e2671c Bug 1482968 Part 2: Add a test of modifier key clicks and drags on input elements. r=smaug!
Depends on D3450

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

--HG--
extra : moz-landing-system : lando
2018-08-17 18:59:36 +00:00
Brad Werth
50cab3e9c8 Bug 1482968 Part 1: Relax input event modifier filtering to allow most modifier keys to be pressed during mouse and key events. r=smaug!
Differential Revision: https://phabricator.services.mozilla.com/D3450

--HG--
extra : moz-landing-system : lando
2018-08-17 18:59:13 +00:00
Kris Maglione
942fa64b7c Bug 1483738: Part 2 - Add MozInvalidForm event, which can be handled in place of notifyInvalidSubmit observers. r=smaug,mconley
Differential Revision: https://phabricator.services.mozilla.com/D3467

--HG--
extra : rebase_source : 4d8c737a778fd1ecf733cc0906f3bd38eeea31d0
2018-08-15 19:22:30 -07:00
Kris Maglione
319fbff074 Bug 1483738: Part 1 - Change notifyInvalidSubmit to take a plain array. r=mconley
This makes things saner for all consumers, which makes it worth doing on its
own. But it also gives me an easy nsTArray to work with, which I can use to
dispatch DOM events with array properties.

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

--HG--
extra : rebase_source : e8bcc75e84845e42c932886502f99ca3154df48d
2018-08-16 12:20:54 -07:00
Kris Maglione
0c6cd02ae1 Bug 1483664: Part 0 - Dispatch pagehide/pageshow to all system group listeners on frameloader swap. r=smaug,mconley
Having to add pagehide/pageshow listeners to the chrome event target is a
serious inconvience for the use cases of this bug. Dispatching to system group
listeners has approximately the same effect as the old code, but is much
easier for window-bound code to handle.

--HG--
extra : rebase_source : d67c14e9ba91772d8a9dd82481120b34bdb551e0
2018-08-15 20:06:49 -07:00
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