Commit Graph

4489 Commits

Author SHA1 Message Date
Kartikaya Gupta
c08a0b6539 Bug 1525314 - Update reftest annotations for WebRender on GeckoView. r=gbrown
Depends on D36797

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

--HG--
extra : moz-landing-system : lando
2019-07-03 17:13:33 +00:00
Cosmin Sabou
15a1881070 Merge mozilla-inbound to mozilla-central. a=merge 2019-07-03 19:20:05 +03:00
Mirko Brodesser
63b4627d28 Bug 1562876: rename Selection::AddRange to Selection::AddRangeAndSelectFramesAndNotifyListeners. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D36602
2019-07-03 13:26:13 +02:00
Cameron McCormack
0a6fb940c5 Bug 1553705 - Use a cheaper to compute state key for parser inserted form controls. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D32259

--HG--
extra : moz-landing-system : lando
2019-07-01 10:06:16 +00:00
Cameron McCormack
336cad5a55 Bug 1553705 - Make GenerateStateKey() infallible. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D32258

--HG--
extra : moz-landing-system : lando
2019-07-01 07:20:04 +00:00
Boris Zbarsky
2ccccf1e48 Bug 1562690. Fix parsing of HTML dimension values to follow spec update and align better with other browsers. r=mccr8
See https://github.com/whatwg/html/pull/4747 for the spec changes

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

--HG--
extra : moz-landing-system : lando
2019-07-03 06:36:17 +00:00
Nicholas Nethercote
d839ef58db Bug 1562331 - Make media.* static prefs follow the naming convention. r=KrisWright
This also removes the following prefs, because they're unused:
- media.autoplay.allow-muted pref
- media.autoplay.blackList-override-default

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

--HG--
extra : rebase_source : 0570540496302b3efedadf4d5115ee5422d5c279
2019-06-28 14:09:05 +10:00
Boris Zbarsky
827dd3e9ce Bug 1562257 part 5. Fix style mapping of border attribues to more closely match the spec. r=mccr8
Per spec, "border" is parsed as a non-negative integer, only mapped if nonzero
(though this is not observably different from mapping even if 0, except if user
or UA stylesheets style the border), and supported on img, object,
<input type="image">, but NOT embed, iframe, or marquee.

This matches the Chrome and Safari behavior, as far as I can tell.  The
substantive change here is that we are removing mapping for the <embed border>
case.

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

--HG--
extra : moz-landing-system : lando
2019-06-28 23:55:38 +00:00
Boris Zbarsky
1725cec1ac Bug 1562257 part 4. Fix style mapping of hspace and vspace attributes to match the spec. r=mccr8
Per spec, "hspace" and "vspace" are parsed as dimension attributes and are
supported on the following elements: embed, iframe, img, object,
<input type="image">, marquee.  Except no one implements this for iframe.
https://github.com/whatwg/html/issues/4742 tracks the spec changing accordingly.

As far as hspace/vpace on <table> go, Safari supports them in both quirks and
standards mode, while Chrome doesn't support them in either mode.  The HTML spec
doesn't have them supported at all, and neither does the quirks mode spec, so
I'm removing the quirks-only support we had to align with the specs and Chrome.

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

--HG--
extra : moz-landing-system : lando
2019-06-28 23:51:43 +00:00
Boris Zbarsky
8443e97624 Bug 1562257 part 2. Fix parsing of margin attributes on <body> match the spec. r=mccr8
The various margin attributes on <body> are "pixel length attributes" in the
spec, which should get parsed as non-negative integers.  That said, Chrome and
Safari implement marginwidth, marginheight, marginleft, and margintop as
"dimension attributes" instead, and don't implement marginright and marginbottom
at all.

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

--HG--
extra : moz-landing-system : lando
2019-06-28 23:32:12 +00:00
Boris Zbarsky
ef616f8857 Bug 1562257 part 1. Remove pointless parsing of "charoff" attributes. r=mccr8
"charoff" isn't parsed specially in the spec, and nothing in our code uses the
parsed value.

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

--HG--
extra : moz-landing-system : lando
2019-06-28 23:31:57 +00:00
Boris Zbarsky
c955bfc0bc Bug 1561440 part 2. Add mapping and reflection support for dimension attributes stored as doubles. r=mccr8,emilio
Differential Revision: https://phabricator.services.mozilla.com/D36263

--HG--
extra : moz-landing-system : lando
2019-06-29 19:36:13 +00:00
Boris Zbarsky
762cb977ec Bug 1561440 part 1. Move MapSizeAttributeInto to earlier in the file, where we will need it, and rename to be clearer about what sort of things it maps. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D36262

--HG--
extra : moz-landing-system : lando
2019-06-28 22:08:37 +00:00
Narcis Beleuzu
cc10ed7ce5 Backed out 2 changesets (bug 1553705) for causing Bug1562142 . CLOSED TREE
Backed out changeset fbb26a04ec1f (bug 1553705)
Backed out changeset dd6e7c0970d5 (bug 1553705)
2019-06-29 02:39:01 +03:00
Boris Zbarsky
9abd9bd6cd Bug 1560055 part 6. Add a test for reflection of percentage values and fix our one failure there. r=mccr8
Our new behavior should align with the Blink/WebKit behavior and the current
spec, though I also filed https://github.com/whatwg/html/issues/4737 on the spec
for the fact that dimension attributes reflecting as integers is a bit weird

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

--HG--
extra : moz-landing-system : lando
2019-06-28 21:01:35 +00:00
Boris Zbarsky
4530e9a97e Bug 1560055 part 5. Fix various reflection cases that should be using GetUnsignedIntAttr but are using GetIntAttr. r=mccr8
It mostly works out, because we return an int32_t then just cast it to uint32_t,
but it would be better to return the right thing to start with.

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

--HG--
extra : moz-landing-system : lando
2019-06-28 20:57:44 +00:00
Boris Zbarsky
7719c7c3c4 Bug 1560055 part 4. Remove remaining uses of ParseSpecialIntValue. r=mccr8
We don't need to parse 'width' on <tr> because we never use the parsed value for
anything and neither does the spec.

We don't need to parse 'charoff' on <col> because we never use that for anything
either, and neither does the spec.

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

--HG--
extra : moz-landing-system : lando
2019-06-28 21:00:15 +00:00
Boris Zbarsky
3dd95a2c8f Bug 1560055 part 3. Switch various "width" and "height" attributes on HTML elements to mostly follow the spec for parsing the attribute. r=mccr8
The spec allows non-integer values, but we don't have a good way to store them
in nsAttrValue yet.  See https://bugzilla.mozilla.org/show_bug.cgi?id=1561440

HTMLTableCellElement::MapAttributesIntoRule can now call
MapImageSizeAttributesInto instead of manually mapping width and height, because
0 values (which it was excluding before) are now excluded at attribute parse
time.

For 'width' on HTMLTableElement I kept our old behavior for 0, which matches the spec
but not Safari or Chrome.

For 'height' on HTMLTableElement I kept our old behavior for 0, which matches
Safari and Chrome but not the spec.  https://github.com/whatwg/html/issues/4715
tracks a possible spec change.

Same thing for 'height' on HTMLTableRowElement.

Same thing for 'width' on HTMLTableColElement.

The ParseImageAttribute call in HTMLMediaElement is not needed, because
HTMLAudioElement does not map any of those to style and HTMLVideoElement only
maps width/height, which it already parses.

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

--HG--
extra : moz-landing-system : lando
2019-06-28 20:56:55 +00:00
Boris Zbarsky
2e218ac638 Bug 1560055 part 2. Switch frame/iframe marginwidth/height parsing to follow the spec. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D36126

--HG--
extra : moz-landing-system : lando
2019-06-28 20:54:30 +00:00
Emilio Cobos Álvarez
7a3cadc37e Bug 1547231 - Map width and height on image-ish elements to aspect-ratio. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D29038

--HG--
extra : moz-landing-system : lando
2019-06-26 22:10:06 +00:00
Cameron McCormack
4d1517b69f Bug 1553705 - Use a cheaper to compute state key for parser inserted form controls. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D32259

--HG--
extra : moz-landing-system : lando
2019-06-26 21:44:11 +00:00
Cameron McCormack
98706be760 Bug 1553705 - Make GenerateStateKey() infallible. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D32258

--HG--
extra : moz-landing-system : lando
2019-06-26 21:44:03 +00:00
Andreas Pehrson
3799d0fe72 Bug 1547899 - Discard output streams also when playback is aborted. r=jib
This was done as a catch-all in PlaybackEnded(), but playback might not end if
the source changes in the middle of playback. This catches those cases too.

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

--HG--
extra : moz-landing-system : lando
2019-06-26 09:18:54 +00:00
Chris Pearce
348ddf9d3b Bug 1555946 - Remove HTMLMediaElement::mUnboundFromTree and use nsINode::IsInComposedDoc() instead. r=emilio
HTMLMediaElement::mUnboundFromTree was added in bug 1239899, and I'm pretty
sure its behaviour is intended to be the same as what IsInComposedDocument()
gives us, so we can just use that instead.

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

--HG--
extra : moz-landing-system : lando
2019-06-19 22:37:56 +00:00
Logan Smyth
a1de03c27b Bug 1529345 - Part 2: Add Gecko infrastructure for receiving notifications about debugger-related events. r=jimb,smaug
Differential Revision: https://phabricator.services.mozilla.com/D30565

--HG--
extra : moz-landing-system : lando
2019-06-17 04:36:29 +00:00
Mark Banner
201255ab84 Bug 1558485 - Turn on ESLint for all of dom/ disabling most of the failing rules. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D34761

--HG--
extra : moz-landing-system : lando
2019-06-13 20:21:46 +00:00
Alastor Wu
5b19389470 Bug 1464012 - part1 : directly check media element's crossorigin attribute. r=jya
As `GetCORSMode()` would only be valid after media element starts loading, so we would fail to get the CORS mode if media's preload is `none`.

Therefore, according to the spec [1], we should directly check parent media element's `crossorigin` attribute in order to decide the `corsAttributeState`.

[1] https://html.spec.whatwg.org/multipage/media.html#sourcing-out-of-band-text-tracks:attr-media-crossorigin

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

--HG--
extra : moz-landing-system : lando
2019-06-14 17:56:33 +00:00
Andreas Pehrson
960fd5a805 Bug 1553262 - Ignore removing video tracks for streams that only capture audio. r=jib
Video tracks are not added to output streams that capture only audio, so we
cannot assume that an output stream that captures only audio has been locked to
capture MediaStream sources when a video track is removed.

Depends on D34854

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

--HG--
extra : moz-landing-system : lando
2019-06-14 13:33:46 +00:00
Jonathan Kingston
a5ba216f93 Bug 1315460 - Removal of keygen element r=keeler,baku,jld,hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D22810

--HG--
extra : moz-landing-system : lando
2019-06-13 08:58:07 +00:00
Peter Van der Beken
8b00dd9ff2 Bug 1490044 - Move all prefs used in WebIDL to StaticPrefs. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D33507

--HG--
extra : moz-landing-system : lando
2019-06-13 09:00:59 +00:00
Olli Pettay
05d684ebd3 Bug 1558546, ensure range element has a frame before starting drag operation, r=hsivonen
This should be the minimal patch to fix the issue (should be safe for branches too).

Reusing an existing mouse/touch test for the crash testing.

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

--HG--
extra : moz-landing-system : lando
2019-06-12 15:53:48 +00:00
Andreas Pehrson
b6db26bf80 Bug 1554699 - The loop attribute should not have any effect on a media element playing a MediaStream. r=jib
Differential Revision: https://phabricator.services.mozilla.com/D33655

--HG--
extra : moz-landing-system : lando
2019-06-12 08:50:57 +00:00
Andreas Pehrson
6571c8612d Bug 1554699 - Don't fire "timeupdate" in PlayInternal as it's against spec, v2. r=jya
This FireTimeUpdate(false) dates back to bug 611994. Perhaps it was spec
compliant back in the day, but it surely isn't now.

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

--HG--
extra : moz-landing-system : lando
2019-06-11 11:49:35 +00:00
Andreas Pehrson
59ee4efe41 Bug 1554699 - Don't fire "timeupdate" in PlayInternal as it's against spec. r=jya,alwu
Bug 1279865 introduced this under the premise of
"Run TimeMarchesOn() at the beginning of play.", but it did a bit too much.

This makes us spec compliant for this particular case again.

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

--HG--
extra : moz-landing-system : lando
2019-06-11 11:49:26 +00:00
Andreas Pehrson
187fd1801a Bug 1554699 - Report real duration after playing a MediaStream ended. r=jib
Differential Revision: https://phabricator.services.mozilla.com/D33649

--HG--
extra : moz-landing-system : lando
2019-06-11 11:49:17 +00:00
Andreas Pehrson
8dcdeb0011 Bug 1554699 - Ignore setting currentTime synchronously with assigning a MediaStream. r=jib
Differential Revision: https://phabricator.services.mozilla.com/D33648

--HG--
extra : moz-landing-system : lando
2019-06-11 11:49:07 +00:00
Andreas Pehrson
0f0c5a8595 Bug 1554699 - HTMLMediaElement.preload: Ignore setting and always get "none" when playing a MediaStream. r=jib
Differential Revision: https://phabricator.services.mozilla.com/D33096

--HG--
extra : moz-landing-system : lando
2019-06-11 11:48:21 +00:00
Andreas Pehrson
81b4437bf9 Bug 1554699 - HTMLMediaElement.playbackRate/defaultPlaybackRate: Ignore setting and always get 1.0 when playing a MediaStream. r=jib
Differential Revision: https://phabricator.services.mozilla.com/D33095

--HG--
extra : moz-landing-system : lando
2019-06-11 11:48:14 +00:00
Mark Banner
ea1728721a Bug 1558527 - Fix various issues related to shadowing of variables in dom/ code. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D34588

--HG--
extra : moz-landing-system : lando
2019-06-12 08:29:58 +00:00
Kartikaya Gupta
97d708b2a2 Bug 1501582 - Mark geckoview failures. r=gbrown
There are a number of failures, for which I've filed separate bugs.
And then a lot of fuzziness. I manually inspected the reftest analyzer
results on try pushes to distinguish failures vs fuzziness.

Depends on D34537

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

--HG--
extra : moz-landing-system : lando
2019-06-11 16:12:03 +00:00
Boris Zbarsky
d5a8a4a595 Bug 1557793 part 3. Change the signatures of various nsContentUtils localization methods to play nicer with the new stringbundle API. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D34201

--HG--
extra : moz-landing-system : lando
2019-06-08 21:26:12 +00:00
Boris Zbarsky
9de72a3ac6 Bug 1557793 part 2. Stop using [array] in nsIStringBundle. r=Pike
Differential Revision: https://phabricator.services.mozilla.com/D34196

--HG--
extra : moz-landing-system : lando
2019-06-11 15:51:51 +00:00
Noemi Erli
9cc480e673 Merge inbound to mozilla-central. a=merge 2019-06-11 00:47:19 +03:00
Andreas Pehrson
b60c5ff12b Bug 1306999 - Make HTMLMediaElement::CanActivateAutoplay() spec compliant. r=jya,jib
HTMLMediaElement::CanActivateAutoplay() had an exception for MediaStreams in its
check for whether autoplay can be activated. This removes that exception and
requires us to be in HAVE_ENOUGH_DATA regardless of source, per spec.

Doing this broke autoplay of an ended media element that's playing a
MediaStream, since autoplay of this MediaStream could no longer be immediately
activated. The exact sequence algorithm for autoplaying the stream in this case
is not defined in mediacapture-main, but we know we must reach HAVE_ENOUGH_DATA
to play, and we must run the load algorithm to reach HAVE_ENOUGH_DATA, that's
what we do:
When the MediaStream we're autoplaying once again becomes active, we run the
media element load algorithm.

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

--HG--
extra : moz-landing-system : lando
2019-06-10 13:11:49 +00:00
Andreas Pehrson
4b7778caf2 Bug 1306999 - Reset mSrcStreamPlaybackEnded when unsetting srcObject. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D33296

--HG--
extra : moz-landing-system : lando
2019-06-10 13:11:28 +00:00
Andreas Pehrson
3ff58f083a Bug 1306999 - Invalidate HTMLVideoElement after resetting videoWidth and videoHeight. r=jya
Unsetting a playing video element's MediaStream-srcObject attribute will
otherwise leave the element displaying the latest frame of the video track.

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

--HG--
extra : moz-landing-system : lando
2019-06-10 13:11:14 +00:00
Andreas Pehrson
839752c9bc Bug 1306999 - Load the first frame of a MediaStream with video into a media element when not playing or autoplaying. r=jib
Differential Revision: https://phabricator.services.mozilla.com/D33293

--HG--
extra : moz-landing-system : lando
2019-06-10 13:10:56 +00:00
Andreas Pehrson
fbaf69d9d7 Bug 1306999 - Move HTMLMediaElement's VideoFrameListener to a VideoOutput. r=jib
This allows it to intercept frames in the rendering pipe, so that we don't have
to duplicate the logic for converting VideoChunks to NonOwningImages.

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

--HG--
extra : moz-landing-system : lando
2019-06-10 13:10:49 +00:00
Masayuki Nakano
84cbc7e792 Bug 1529884 - part 6: Through subject principal at Document::ExecCommand() to constructor of EditorBase::AutoEditActionDataSetter r=smaug
`Document::ExecCommand()` knows subject principal.  This patch makes it tell
`EditorCommand::DoCommand()` and `EditorCommand::DoCommandParam()`.  Then,
makes they tell each editor public methods which may cause dispatching
`beforeinput` event once we implement it.  Finally, each editor public
method sets it to the constructor of `EditorBase::AutoEditActionDataSetter`.
This means that when editor tries to dispatch `beforeinput` event, editor
can check whether it's called by JS or not from everywhere.

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

--HG--
extra : moz-landing-system : lando
2019-06-10 10:27:07 +00:00
Jonathan Watt
640faff91f Bug 1558067. Prevent mozPrintCallback being invoked with the wrong <canvas> element. r=bobowen
Since the Firefox print preview code creates a static clone from the existing
print preview static clone for any print preview settings changes, for enabling
of simplified mode, and for a print from a print preview document,
HTMLCanvasElement::CopyInnerTo may be invoked on an existing static clone.
In that case, the mozPrintCallback's printState.context.canvas would previously
have ended up using the canvas in the previous print preview static clone,
which is wrong, and allow the callback to modify the static clone document.

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

--HG--
extra : rebase_source : ef9b360bac674a22cbc3c505ce30089a9d25bb22
extra : amend_source : f449821674a4b4aa45df924f89eec015cae907a9
2019-05-31 11:01:33 +01:00