Commit Graph

4194 Commits

Author SHA1 Message Date
Emilio Cobos Álvarez
cc63c03558 Bug 1535438 - Remove Shadow DOM v0 APIs. r=smaug
Looks like these three APIs slipped through when shipping v1, but no other
vendor supports them, so no reason to be here.

I don't think there's any harm in letting the implementations keep living in
DocumentOrShadowRoot, but let me know if you think otherwise and I'll move them
to Document.

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

--HG--
extra : moz-landing-system : lando
2019-03-16 00:14:57 +00:00
Razvan Maries
3d59436341 Merge mozilla-central to autoland. a=merge on a CLOSED TREE 2019-03-15 05:48:49 +02:00
Alastor Wu
f8ebdadc67 Bug 1535223 - part3 : add log in TextTrack and TextTrackCue. r=jya
It would be helpful if we can also print the information in `TextTrack` and `TextTrackCue`.

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

--HG--
extra : moz-landing-system : lando
2019-03-14 23:25:10 +00:00
Alastor Wu
0b66618ffc Bug 1535223 - part2 : update TextTrackManager's logs. r=jya
Automatically print `TextTrackManager`'s address for the log marco, also update some exist logs.

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

--HG--
extra : moz-landing-system : lando
2019-03-14 23:24:32 +00:00
Alastor Wu
a0d0d81ceb Bug 1535223 - part1 : rename log module's name. r=jya
Use more general name `WebVTT` for this log module, which will include other debug logs in other files later.

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

--HG--
extra : moz-landing-system : lando
2019-03-14 23:21:28 +00:00
Dorel Luca
0e9ffb4c4f Merge mozilla-inbound to mozilla-central. a=merge 2019-03-14 18:25:40 +02:00
Emilio Cobos Álvarez
5aa8533517 Bug 1533963 - Use a single RestyleHint representation. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D22828

--HG--
extra : moz-landing-system : lando
2019-03-14 11:47:50 +00:00
Sylvestre Ledru
4aa92e3091 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D22514
2019-03-13 10:19:06 +01:00
Alastor Wu
b399b16f25 Bug 1533909 - part2 : add assertion to ensure we should always get a valid TextTrackCueList. r=jya
In this comparison, we only process `hidden` or `showing` track which should not return null TextTrackCueList.

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

--HG--
extra : moz-landing-system : lando
2019-03-13 05:28:44 +00:00
Alastor Wu
4c5f747109 Bug 1533909 - part1 : 'current cues' should not contain cues which are in the disable track. r=jya
According to the spec [1] step1, `current cues` should only contain cues which are in `hidden` or `showing` track.

[1] https://html.spec.whatwg.org/multipage/media.html#time-marches-on

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

--HG--
extra : moz-landing-system : lando
2019-03-13 05:33:30 +00:00
Boris Zbarsky
4ff91d4938 Bug 1506439 part 2. Stop creating a useless nsCOMPtr in DispatchInputEvent. r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D23068

--HG--
extra : moz-landing-system : lando
2019-03-13 02:34:48 +00:00
Mike Conley
a1f3599f4b Bug 1531101 - Fire UAWidget setup / change events when starting or stopping a visual clone of a <video> element. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D22161

--HG--
extra : moz-landing-system : lando
2019-03-13 01:43:24 +00:00
Mike Conley
fbb2da4355 Bug 1531101 - Add method for stopping visual cloning of a video, and a read-only property to check cloning state. r=jya,Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D22160

--HG--
extra : moz-landing-system : lando
2019-03-13 01:43:07 +00:00
Boris Zbarsky
6d1f77b386 Bug 1534370 part 2. Annotate doCommand as MOZ_CAN_RUN_SCRIPT. r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D23041

--HG--
extra : moz-landing-system : lando
2019-03-12 01:57:42 +00:00
Boris Zbarsky
ccfb4f16b1 Bug 1534370 part 1. Annotate doCommandWithParams as MOZ_CAN_RUN_SCRIPT. r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D23036

--HG--
extra : moz-landing-system : lando
2019-03-13 00:43:48 +00:00
Boris Zbarsky
5bf2e408e6 Bug 1534608. MOZ_CAN_RUN_SCRIPT should disallow non-stack refptr arguments. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D23217

--HG--
extra : moz-landing-system : lando
2019-03-13 00:30:11 +00:00
Alastor Wu
b78375bb8e Bug 1531863 - part3 : implement the 'show-poster-flag' for HTMLMediaElement. r=jya
According to the spec [1], implement the `show-poster-flag` which is used to decide whether we need to run `TimeMarchesOn` algorithm under certain situations.

[1] https://html.spec.whatwg.org/multipage/media.html#show-poster-flag

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

--HG--
extra : moz-landing-system : lando
2019-03-08 03:06:27 +00:00
Alastor Wu
5f410f2fce Bug 1531863 - part2 : handle text track mode changed in MediaElement. r=jya
In order to make the implementation more fitting with the spec, move the implementation of `pending-text-track-change-notification-flag` from text track list to media element.

In addition, it also help us not to expose the internal flag `show-poster` (which will be implemented in patch3) of media element when doing the related algorithm.

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

--HG--
extra : moz-landing-system : lando
2019-03-12 00:32:21 +00:00
Dorel Luca
8d4d6ee416 Backed out 6 changesets (bug 1531101) for Mochitest failure in toolkit/content/tests/widgets/test_videocontrols_error.html. CLOSED TREE
Backed out changeset 10e9bbf2d1df (bug 1531101)
Backed out changeset 44d96bcc51f7 (bug 1531101)
Backed out changeset 4a4b44c3481a (bug 1531101)
Backed out changeset 12bcda2d76db (bug 1531101)
Backed out changeset 5887b55233c2 (bug 1531101)
Backed out changeset 13a0c61ed4fc (bug 1531101)
2019-03-12 02:04:54 +02:00
Mike Conley
52dc713e19 Bug 1531101 - Fire UAWidget setup / change events when starting or stopping a visual clone of a <video> element. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D22161

--HG--
extra : moz-landing-system : lando
2019-03-08 15:48:38 +00:00
Mike Conley
9508ea09b9 Bug 1531101 - Add method for stopping visual cloning of a video, and a read-only property to check cloning state. r=jya,Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D22160

--HG--
extra : moz-landing-system : lando
2019-03-11 22:45:44 +00:00
Boris Zbarsky
68863e1004 Bug 1533617 part 4. Mark virtual methods with CAN_RUN_SCRIPT overrides as CAN_RUN_SCRIPT. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D22838

--HG--
extra : moz-landing-system : lando
2019-03-11 14:20:29 +00:00
Brendan Dahl
7ebaf1cd2b Bug 1527977 - Share XUL prototype cache with XUL and XHTML. r=smaug
Create a new parser (PrototypeDocumentParser) and content sink
(PrototypeDocumentContentSink) that can be used by both XUL and XHTML.

The new parser moves the code from XULDocument that handles creating and
loading a nsXULPrototypeDocument from either the cache or the source
file. Once the parser has finished loading the prototype it notifies the
content sink. The parser is largely a stub and would be better suited
for use as a nsBaseParser, but nsHTMLDocument unfortunately needs an
nsIParser.

The new content sink has the XULDocument code responsible for the
prototype traversal that creates the DOM (XULDocument::ResumeWalk and
friends) and fires off various events.

To unify XUL and XHTML, the XHTML readystate event sequence is used in
XUL. However, the layout path of XHTML loaded from the prototype cache
more closely follows XUL, where frame initializers and layout don't
start until the entire DOM is built.

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

--HG--
rename : dom/xul/XULDocument.cpp => dom/prototype/PrototypeDocumentContentSink.cpp
rename : parser/moz.build => dom/prototype/moz.build
rename : parser/moz.build => parser/prototype/moz.build
extra : moz-landing-system : lando
2019-03-09 01:00:23 +00:00
Mike Conley
6200b046ce Bug 1532692 - Clear poster attributes from videos that we're cloning to visually. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D22631

--HG--
extra : moz-landing-system : lando
2019-03-08 16:46:44 +00:00
Brindusan Cristian
4e6150486c Backed out changeset 9a94bd3da98f (bug 1532692) for mochitest failures at test_cloneElementVisually_poster.html. 2019-03-08 06:57:25 +02:00
Mike Conley
5adc1690d5 Bug 1532692 - Clear poster attributes from videos that we're cloning to visually. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D22631

--HG--
extra : moz-landing-system : lando
2019-03-08 03:06:29 +00:00
Alastor Wu
cfaf9c9586 Bug 1509446 - part6 : update cues display without checking whether cue is active or not. r=jya
We should update cue display everytime when the cues list changed.

In addition, we shouldn't check whether cue is active when we update display, because it's always inactive when the cue has been removed from `TextTrack::RemoveCue()`.

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

--HG--
extra : moz-landing-system : lando
2019-03-05 19:48:31 +00:00
Alastor Wu
b4902e9582 Bug 1509446 - part4 : remove set dirty. r=jya
As the `active cues list` would be automatically contruct when there are any active cues being added or inactive cues being removed, we have no need to use dirty to reset the `active cues list`.

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

--HG--
extra : moz-landing-system : lando
2019-03-07 19:24:02 +00:00
Alastor Wu
cb43f6e8f8 Bug 1509446 - part3 : run 'TimeMarchesOn' directly, instead of queuing a task. r=jya
According to the spec [1], we should run `TimeMarchesOn` algorithm directly when the specific situations happen, the spec doesn't say that we need to queue a task for it.

In addition, all the call sites for `TimeMarchesOn` are on the main thread, so we don't need to worry about race condition.

[1]
https://html.spec.whatwg.org/multipage/media.html#playing-the-media-resource:time-marches-on-2
https://html.spec.whatwg.org/multipage/media.html#playing-the-media-resource:time-marches-on-3
https://html.spec.whatwg.org/multipage/media.html#playing-the-media-resource:time-marches-on-4

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

--HG--
extra : moz-landing-system : lando
2019-03-08 03:12:42 +00:00
Alastor Wu
d7fead1380 Bug 1509446 - part2 : use current cue in 'TimeMarchesOn' algorithm. r=jya
According to the spec [1], the `current cue` is not equal with the `active cue`, because it might contain non active cues, which might be set to active later during the `TimeMarchesOn`.

The `current cue` should be a list of cues, initialized to contain all the cues of all the hidden or showing text tracks of the media element (not the disabled ones) whose start times are less than or equal to the current playback position and whose end times are greater than the current playback position.

[1] https://html.spec.whatwg.org/multipage/media.html#time-marches-on

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

--HG--
extra : moz-landing-system : lando
2019-03-07 19:21:22 +00:00
Alastor Wu
65679bbfa8 Bug 1509446 - part1 : update active cues list when cue's active state changed. r=jya
According to spec [1], `activeCues` should represent a subset of the text track cues whose active flag was set when the script started.

We should only depend on the `TimeMarchesOn` algorithm which will change cue's active state, and then add or remove cue to `activeCues`.

[1] https://html.spec.whatwg.org/multipage/media.html#dom-texttrack-activecues

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

--HG--
extra : moz-landing-system : lando
2019-03-08 03:10:45 +00:00
Mike Conley
8327974474 Bug 1532682 - Make HTMLVideoElement::EndCloningVisually completely sever references between source and target video elements. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D22109

--HG--
extra : moz-landing-system : lando
2019-03-07 22:42:42 +00:00
Brindusan Cristian
01e26ea3df Backed out 4 changesets (bug 1531863) for mochitest failures at test_videocontrols_vtt.html. CLOSED TREE
Backed out changeset e2e2b325344f (bug 1531863)
Backed out changeset 5be609c16665 (bug 1531863)
Backed out changeset 21bafd01b438 (bug 1531863)
Backed out changeset c9628b2b89b2 (bug 1531863)

--HG--
extra : histedit_source : 869452c42d3539867f34e64be52b7afba5463235
2019-03-08 02:34:45 +02:00
Alastor Wu
b441cd934c Bug 1531863 - part3 : implement the 'show-poster-flag' for HTMLMediaElement. r=jya
According to the spec [1], implement the `show-poster-flag` which is used to decide whether we need to run `TimeMarchesOn` algorithm under certain situations.

[1] https://html.spec.whatwg.org/multipage/media.html#show-poster-flag

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

--HG--
extra : moz-landing-system : lando
2019-03-07 21:47:58 +00:00
Alastor Wu
64ab84e0bc Bug 1531863 - part2 : handle text track mode changed in MediaElement. r=jya
In order to make the implementation more fitting with the spec, move the implementation of `pending-text-track-change-notification-flag` from text track list to media element.

In addition, it also help us not to expose the internal flag `show-poster` (which will be implemented in patch3) of media element when doing the related algorithm.

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

--HG--
extra : moz-landing-system : lando
2019-03-07 15:26:20 +00:00
Brindusan Cristian
bfb3e7d106 Backed out changeset 9b8ef8d81775 (bug 1532682) for breaking decision task. CLOSED TREE
--HG--
extra : histedit_source : 1ee464b10794713af3590b105395fe60e5712522
2019-03-08 00:05:52 +02:00
Mike Conley
6deb48195b Bug 1532682 - Make HTMLVideoElement::EndCloningVisually completely sever references between source and target video elements. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D22109

--HG--
extra : moz-landing-system : lando
2019-03-07 21:00:45 +00:00
Jan Henning
8dc7d1e54b Bug 1525662 - Part 4: Use "width=device-width" viewport for plain text documents. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D20954

--HG--
extra : rebase_source : 00753683860d33acf3296debd327365519cfe822
extra : amend_source : 486264ed201422586f8791b71d7b5a23705cb1f7
extra : source : 37816c34e7bdecaa553bb1d6f4fc76b5e1a10030
2019-02-24 17:32:08 +01:00
Jan Henning
7496ea6ed3 Bug 1525662 - Part 2: Remember plain-textness of HTML documents post loading. r=hsivonen
Based on the current implementation of nsContentUtils::IsPlainTextType(), we
could just call that function again if we need to know whether we're
dealing with plain text content or not later on, but doing it this way ensures
we're always consistent with the current code in StartDocumentLoad(), which
includes some additional sanity checks.

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

--HG--
extra : rebase_source : 5d4606c2c6bc11b2a7f91c221c17c8405fff44b8
extra : amend_source : 6856439650748cdb41e635044c17d6fbf387110b
extra : intermediate-source : 6a5a3077c438a5299fb0752fefb01a081e1f7d96
extra : source : cfb68d7c93bac96fdf979be90116c2de0df76d71
2019-02-23 17:06:52 +01:00
Olli Pettay
37d309e927 Bug 1412485, disable legacy touch APIs on desktop, r=masayuki
Hiding document.createEvent("TouchEvent"), document.createTouch, document.createTouchList and ontouch* event
handlers on desktop to follow what Chrome has done.
This patch explicitly does not remove createTouch or createTouchList everywhere, although those seem to have been
removing already on some other browsers.
Devtools use TOUCHEVENTS_OVERRIDE_ENABLED for touch event testing, and this patch keeps the old behavior per discussion
with devtools devs.

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

--HG--
extra : rebase_source : 562588a289632ba2f11db7f3ac8782c26c3b05f8
2019-03-04 13:35:53 +02:00
Ehsan Akhgari
53629e67b8 Bug 1532417 - Pass a document pointer to nsContentUtils::ShouldResistFingerprinting() callers in MediaError::GetMessage(); r=baku
Differential Revision: https://phabricator.services.mozilla.com/D22003

--HG--
extra : moz-landing-system : lando
2019-03-05 12:42:50 +00:00
Bryce Van Dyk
d693392c8d Bug 1522547 - Have MediaKeys observe if the owning document becomes inactive so it can shutdown. r=cpearce
MediaKeys objects are typically created and associated with an HTMLMediaElement,
however it is possible to create a MediaKeys object and not associate it with an
HTMLMediaElement.

This resulted in an issue where these MediaKeys would keep alive other
components that would assert during bowrser shutdown (see bug 1522547). We
anticipated that MediaKeys associated with an HTMLMediaElement would need to be
shutdown if their owning document became inactive, but were not handling the
case where the keys never became associated with an element.

This patch has the MediaKeys listen directly to their owning document for
activity change. The MediaKeys will shutdown if their document becomes inactive.
This avoids MediaKeys not associated with HTMLMediaElements keeping other
objects alive during browser shutdown.

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

--HG--
extra : moz-landing-system : lando
2019-03-05 16:21:40 +00:00
Brindusan Cristian
b1a6b274b6 Backed out 6 changesets (bug 1525662, bug 1501665) for geckoview failures at org.mozilla.geckoview.test.NavigationDelegateTest.loadData_noMimeType. CLOSED TREE
Backed out changeset 1fa7091b4b4e (bug 1525662)
Backed out changeset 32249c69fee9 (bug 1525662)
Backed out changeset aaa8fbdbbe48 (bug 1525662)
Backed out changeset f07e25fac5b2 (bug 1525662)
Backed out changeset a8ec11730706 (bug 1525662)
Backed out changeset 159753062cfa (bug 1501665)
2019-03-05 23:42:55 +02:00
Jan Henning
8b6b062f8e Bug 1525662 - Part 4: Use "width=device-width" viewport for plain text documents. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D20954

--HG--
extra : moz-landing-system : lando
2019-03-05 18:01:15 +00:00
Jan Henning
bd6905ded7 Bug 1525662 - Part 2: Remember plain-textness of HTML documents post loading. r=hsivonen
Based on the current implementation of nsContentUtils::IsPlainTextType(), we
could just call that function again if we need to know whether we're
dealing with plain text content or not later on, but doing it this way ensures
we're always consistent with the current code in StartDocumentLoad(), which
includes some additional sanity checks.

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

--HG--
extra : moz-landing-system : lando
2019-03-05 18:01:11 +00:00
Alastor Wu
e2599c5021 Bug 1526355 - part1 : notify the front end side to show the blocking icon if the site is still being blocked after it's back from the bfcache. r=cpearce
In order to display blocking icon when the document comes back from the bfcache, we have to notify front end what's the current blocking status.

As the front end side would clear blocking autoplay information when nagivation occurs, and the media might not invoke the play again when they comes back from the bfcache.

Therefore, we should notify front end side that the site is still being blocked, and we should show blocking icon for it.

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

--HG--
extra : moz-landing-system : lando
2019-03-04 17:25:52 +00:00
Masayuki Nakano
47ef72825f Bug 1466208 - part 29: Create PresShell::EventHandler::ComputeFocusedEventTargetElement() r=smaug
Most remaining code in `PresShell::EventHandler::HandleEvent()` is what computes
event target of the event which should be handled on focused content.  This
patch moves the part to the new method.

Additionally, moves `nsIPresShell::gKeyDownTarget` to
`EventHandler::sLastKeyDownEventTargetElement` and make it use `StaticRefPtr`.

Finally, for using `Element*` instead of `nsIContent*`, changes the result type
of `Document::GetUnfocusedKeyEventTarget()` to `Element*`.

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

--HG--
extra : moz-landing-system : lando
2019-03-04 06:11:41 +00:00
Mike Conley
442333ceaf Bug 1521964 - Invalidate visually cloned element when clone source is invalidated. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D21401

--HG--
extra : moz-landing-system : lando
2019-03-01 22:37:16 +00:00
Mike Conley
44acc929a5 Bug 1521964 - Don't suspend the video decoder when cloning a video visually. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D20674

--HG--
extra : moz-landing-system : lando
2019-03-01 22:36:53 +00:00
Mike Conley
59c1141de6 Bug 1521964 - Add privileged HTMLVideoElement.cloneElementVisually WebIDL method. r=jya,Ehsan,smaug
Differential Revision: https://phabricator.services.mozilla.com/D20023

--HG--
extra : moz-landing-system : lando
2019-03-01 22:36:40 +00:00