Commit Graph

3636 Commits

Author SHA1 Message Date
Emilio Cobos Álvarez
47ebd819b3 Bug 1449806: Merge {Servo,Generic}SpecifiedValues into MappedDeclarations. r=xidorn
The idea would be that this header is only included in cpp files, thus it's ok
to include ServoBindings, etc.

MozReview-Commit-ID: EgQEsR0cZd4
2018-06-25 11:14:39 +02:00
Bryce Van Dyk
926f765909 Bug 1450845 - MediaDecoderStateMachine now ignores SeekToNextFrame if already seeking. r=jya
SeekToNextFrame is handled differently than other seeks by the
MediaDecoderStateMachine, and should not take place while other seeks already
are. Bug 1410225 implemented some changes in HTMLMediaElement to prevent this,
but it's still possible to move to a seeking state in the MDSM and accept
SeekToNextFrame (as in this bug).

This changeset changes the MDSM to reject SeekToNextFrame if a seek is already
happening. Since the MDSM now does this the changes from bug 1410225 can be
removed.

This has the functional change of the promise from SeekToNextFrame being
rejected if the seek in not performed due to another seek. Previously the
promise would succeed when the other seek completed. This seems sensible as the
next frame seek does not actually take place.

MozReview-Commit-ID: HD9WRFq3LZV

--HG--
extra : rebase_source : fb276010119038db4319b3b81bcbf51ef2cab1d9
2018-06-06 15:17:30 -04:00
Emilio Cobos Álvarez
c228998b4f Bug 1410578: Make <link rel="stylesheet"> work in shadow trees. r=heycam
Summary: Somewhat straight-forward, mostly removing special-casing.

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

MozReview-Commit-ID: 6f8duD4pGrl
2018-06-22 04:15:56 +02:00
Cosmin Sabou
4c18cd4036 Merge inbound to central. a=merge
--HG--
rename : servo/components/style/properties/longhand/box.mako.rs => servo/components/style/properties/longhands/box.mako.rs
2018-06-21 04:16:40 +03:00
Andrea Marchesini
5b9437cad2 Bug 1461921 - Block storage access for third-parties on the tracking protection list - part 5 - Cookies, r=ehsan 2018-06-20 13:38:22 -04:00
Valentin Gosu
a8e3a8c349 Bug 1448330 - Make nsIURI.clone a private method r=mayhemer
MozReview-Commit-ID: 1efpeaEPaXP

--HG--
extra : rebase_source : e660f1e5bcae9b7119bc5b37713691069272b375
2018-06-14 13:05:43 +02:00
catalin.badea392@gmail.com
9c36800bd7 Bug 1469385 - Remove InsertChildAt_Deprecated and RemoveChildAt_Deprecated, r=bz,smaug 2018-06-19 12:21:18 +03:00
Emilio Cobos Álvarez
99895a902b Bug 1469112: Use HTMLSlotElement::FromNode more consistently. r=smaug
MozReview-Commit-ID: 1k8lVazP0lR

--HG--
extra : rebase_source : fb505610b745dc414c2f28a0ba3130eec6160666
2018-06-15 20:14:02 -07:00
Ehsan Akhgari
4fbe444307 Bug 1462432 - Part 2: Override the dummy channel's tracking status if the document is coming from a tracking resource; r=baku 2018-06-13 16:18:39 -04:00
sotaro
967ea144d0 Bug 1465224 - Add Video rotation handling r=nical 2018-06-13 10:40:23 -07:00
Christoph Kerschbaumer
c26de76230 Bug 1467093 - Update the content type of the channel used within nsHTMLDocument::Open(). r=smaug 2018-06-07 14:01:25 +02:00
Joel Maher
50b91c0a14 Bug 1405428 - skip-if = verify on mochitests which do not pass test-verify. r=gbrown 2018-06-10 05:01:47 -04:00
Kyle Machulis
a50b3fa9e5 Bug 1457689 - Fix documain.domain setting exception type; r=bz
Change exception type to comply with HTML spec, which uses security
error instead of bad document domain.

MozReview-Commit-ID: Iefkeskn9bM

--HG--
extra : rebase_source : 282507d687c8fe19a326df95632694bcc6c5dd29
2018-06-07 11:45:09 -07:00
Kyle Machulis
14d4b9546c Bug 819475 - Make document.domain non-nullable; r=bz
Make document.domain non-nullable, to conform to the HTML spec.

MozReview-Commit-ID: B1YuQekBgZD

--HG--
extra : rebase_source : 00999e16549e62c783f06f61c62000ab7677cf1d
2018-06-07 12:29:23 -07:00
Chris Pearce
2c5f707722 Bug 1467350 - Make HTMLMediaElement::mPaused Watchable and update Wakelock status via a watcher. r=jya
We currently observe changes to HTMLMediaElement::mPaused via a hand-rolled
wrapper class. We can use use mozilla::Watchable<> and avoid rolling our
own equivalent here.

This also paves the way for using state watching on other observable state
in HTMLMediaElement.

MozReview-Commit-ID: 4lBlJiV15iG

--HG--
extra : rebase_source : 22f9d811371f9d609dc96a9d958645e5c634eb17
extra : intermediate-source : bdb8280da440a711c6cd51b65ead7ba9e4bb3597
extra : source : fd8c4b8656a9996eea94d2092caaf3c10fe2a835
2018-05-21 14:19:47 +12:00
Chris Pearce
52d5517ef6 Bug 1464922 - Remove HTMLMediaElement::mAttemptPlayUponLoadedMetadata. r=bryce
We don't need to track this state anymore, as we don't need to delay calling
MediaDecoder::Play() or delay firing the "playing" event anymore.

MozReview-Commit-ID: E3B9l6ep7FP

--HG--
extra : rebase_source : 63df836bf0249ed40b0659cd42794e92966cefb9
2018-05-29 08:09:26 +12:00
Chris Pearce
e08b3c171c Bug 1464922 - Don't allow media without audio tracks to autoplay. r=bryce
I don't think we should allow media without audio tracks to autoplay because:
* It means play() before loaded metadata behaves differently than play()
called after loaded metadata.
* With the current impl we dispatch the "play" event and then the "pause"
event when we decide we should block, which may confuse some sites' controls.
* Delaying running the play() algorithm until we've loaded metadata would add
significant complexity, and may break sites.
* Chrome doesn't have this provision, meaning the complexity required to
support it will not result in much benefit to us.

MozReview-Commit-ID: FSVlDJAOisw

--HG--
extra : rebase_source : 93b1bcf8d8edbd6ca10ad918b40a87cd3cfbbf0b
2018-05-28 22:09:14 +12:00
Andreas Pehrson
6c6e70fcbc Bug 1453127 - Ensure TrackID uniqueness for captured MediaDecoder. r=jya 2018-05-29 10:21:51 +02:00
Andreas Pehrson
9fcd68ce86 Bug 1453127 - Make sure decoder-captured tracks end when changing src. r=jya 2018-05-29 10:13:14 +02:00
Andrea Marchesini
7ba8b77e07 Bug 1466023 - Separate FontTableURI and BlobURL, r=qdot
This patch splits FontTableURI and BlobURL in 2 classes:
FontTableURIProtocolHandler and BlobURLProtocolHandler
both under mozilla::dom.

It also removes a memory reporter because that report is already covered by the
BlobURL one.

--HG--
rename : dom/file/nsHostObjectProtocolHandler.cpp => dom/file/BlobURLProtocolHandler.cpp
rename : dom/file/nsHostObjectProtocolHandler.h => dom/file/BlobURLProtocolHandler.h
2018-06-02 15:51:42 +02:00
Emilio Cobos Álvarez
1e9c395548 Bug 1466168: Remove mozilla::Forward in favor of std::forward. r=froydnj
Same approach as the other bug, mostly replacing automatically by removing
'using mozilla::Forward;' and then:

  s/mozilla::Forward/std::forward/
  s/Forward</std::forward</

The only file that required manual fixup was TestTreeTraversal.cpp, which had
a class called TestNodeForward with template parameters :)

MozReview-Commit-ID: A88qFG5AccP
2018-06-02 09:33:26 +02:00
Boris Zbarsky
bddc220e1b Bug 1466253. HTMLFieldSetElement::GetType should return void. r=qdot 2018-06-01 22:35:26 -04:00
Boris Zbarsky
640e7f7112 Bug 1465875 part 5. Eliminate nsIDOMNSEditableElement. r=qdot 2018-06-01 22:35:23 -04:00
Boris Zbarsky
15b087c696 Bug 1465875 part 4. Eliminate random mentions of nsIDOMNSEditableElement. r=qdot 2018-06-01 22:35:23 -04:00
Emilio Cobos Álvarez
fffb25b74f Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

  s/mozilla::Move/std::move/
  s/ Move(/ std::move(/
  s/(Move(/(std::move(/

Removing the 'using mozilla::Move;' lines.

And then with a few manual fixups, see the bug for the split series..

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
Noemi Erli
cb93f27a88 Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-06-01 00:59:09 +03:00
Noemi Erli
54db5253b6 Merge inbound to mozilla-central. a=merge 2018-06-01 00:51:37 +03:00
Olli Pettay
a6044a582c Bug 1462746, ensure SubtreeRoot always returns non-null value, r=mrbkap
--HG--
extra : rebase_source : 969acaa902db68eff48f6849da849522f2043b4a
2018-06-01 00:11:45 +03:00
Nazım Can Altınova
361380987c Bug 1464496 - Part 1: Merge ServoDeclarationBlock and DeclarationBlock r=emilio
MozReview-Commit-ID: By9fV70Oq0K

--HG--
extra : rebase_source : 837afe9c33b21d7db41ff19d3aaf6cf3e9eedbdf
2018-05-30 18:15:25 +02:00
Andreea Pavel
38bcf897f1 Merge mozilla-inbound to mozilla-central. a=merge 2018-05-31 13:04:21 +03:00
Emilio Cobos Álvarez
fe09ffd3af Bug 1465478: Introduce Element::FromNode. r=smaug
And use it in a couple places I noticed.

MozReview-Commit-ID: 8baSMrbdEbF
2018-05-31 02:46:10 +02:00
Masayuki Nakano
99341a9445 Bug 1463985 - part 1: Rename EditAction to EditSubAction and related stuff r=m_kato
When we implement InputEvent.inputType, we need to set a stack class to record
which edit action is currently handled.  However, currently, we call smaller
jobs as edit action.  For example, when user types a character at selecting
some characters, then, EditAction::deleteSelection is performed first, then,
EditAction::insertText is performed.  However, for the InputEvent.inputType,
we need inserText information.  So, for making new enum EditAction, we need
to rename current EditAction to EditSubAction.

And also this renames related stuff:

EditorBase::mIsInEditAction -> EditorBase::mIsInEditSubAction
EditorBase::IsInEditAction() -> EditorBase::IsInEditSubAction()
EditorBase::mAction -> EditorBase::mTopLevelEditSubAction
TextEditRules::mTheAction -> TextEditRules::mTopLevelEditSubAction
EditorBase::StartOperation() ->
  EditorBase::OnStartToHandleTopLevelEditSubAction()
EditorBase::EndOperation() ->
  EditorBase::OnEndHandlingTopLevelEditSubAction()
AutoRules -> AutoTopLevelEditSubActionNotifier
RulesInfo -> EditSubActionInfo

MozReview-Commit-ID: cvSkPUjFm1

--HG--
extra : rebase_source : baf527a3e353b7a8ebe9a46be2243b059c500234
2018-05-28 20:12:34 +09:00
Andreea Pavel
5a5a03c800 Merge mozilla-central to mozilla-inbound. a=merge on a CLOSED TREE 2018-05-31 13:07:31 +03:00
Jan de Mooij
ad9d1f408f Bug 1464374 part 8 - Use GetRealmPrincipals in nsHTMLDocument::Open assertion. r=bz 2018-05-31 11:28:49 +02:00
Olli Pettay
58495709d9 Bug 1459693, ensure the right anonymous element is focused when calling input.focus(), r=mccr8
--HG--
extra : rebase_source : ea1ebf59a730b27b42f23c34ad7bf81e345767f5
2018-05-30 17:04:18 +03:00
Csoregi Natalia
f3599e000e Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-05-30 12:28:56 +03:00
Csoregi Natalia
83a923ef7a Merge inbound to mozilla-central. a=merge 2018-05-30 12:25:03 +03:00
Emilio Cobos Álvarez
aa934dea20 Bug 1465107: Remove isStyledByServo. r=xidorn
MozReview-Commit-ID: 8HWBH9kWyxV
2018-05-30 10:04:18 +02:00
Boris Zbarsky
cb08b0de7d Bug 1455676 part 21. Remove nsIDOMNode. r=qdot 2018-05-29 22:58:51 -04:00
Boris Zbarsky
115f652b0b Bug 1455676 part 20. Remove now-unused AsDOMNode methods. r=qdot 2018-05-29 22:58:50 -04:00
Boris Zbarsky
bea3100e53 Bug 1455676 part 14. Remove most use of nsIDOMNode in dom/. r=qdot 2018-05-29 22:58:49 -04:00
Boris Zbarsky
9748db120d Bug 1455676 part 8. Remove nsIDOMNode usage from layout/. r=qdot 2018-05-29 22:58:48 -04:00
Kartikaya Gupta
4a353fa16b Bug 1465078 - Wait for MozAfterPaint on new windows before requesting fullscreen. r=xidorn
MozReview-Commit-ID: 7cgujvsCdfh

--HG--
extra : rebase_source : 1db42770fe0d155471492eb083dc5580021773a0
2018-05-29 11:33:25 -04:00
Kartikaya Gupta
967750873c Bug 1464908 - Wait for MozAfterPaint on new windows before requesting fullscreen. r=xidorn
New windows cannot execute fullscreen requests until after the first
MozAfterPaint event has been fired on the window, because some of the
machinery in browser-fullScreenAndPointerLock.js isn't initialized until
that point. This test exercises that behaviour, and therefore should also
wait until the first MozAfterPaint before requesting fullscreen.

MozReview-Commit-ID: Igy7WfjslWA

--HG--
extra : rebase_source : 4b16293a107468bd53b8d1f54560b8acf326631f
2018-05-28 17:53:44 -04:00
Emilio Cobos Álvarez
f09824aad6 Bug 1149357: Properly update responsive images for density changes. r=dholbert
Before that we were not notifying the image frame in any way if we ended up not
doing a load, and we were instead relying on the reflow the viewport resize
caused to get the new density in ComputeSize from the content node (but nowhere
else, since that's the bug part 1 fixes).

This was generally unsound, since you can stash random media in a sizes=
attribute, which don't necessarily needs to cause a reflow.

Now we need to notify necessarily because nsImageFrame stores the adjusted
intrinsic size.

mCurrentDensity could also get out of sync as well, when the selected image
density changed, but we ended up returning early because our source hadn't
change in the first early exit.

This patch moves us to a model where we don't re-trigger loads for density
changes if the source doesn't change (unless we pass aAlwaysLoad when we need
to, per spec).

This matches our previous behavior (without the bugginess of not updating the
intrinsic size), and also Chromium, at least.

This changes behavior in one case, which is when we don't load the same source
node, but we have the same source URL, and the density does change. This could
happen with <picture> and two <source>s with same source and different media and
sizes. This makes our behavior consistent with the behavior we have when both
the source and the density doesn't change.

Blink and WebKit do trigger a second image load both when the source changes
without changing density and when density changes. I'll file a spec issue, since
per:

  https://html.spec.whatwg.org/#reacting-to-environment-changes

We should be triggering the load when the density changes but the source
doesn't as well, but no UA does that.

I filed https://github.com/whatwg/html/issues/3709 with a little summary of the
situation and what I think the behavior should be (which is what this patch
implements). That being said, I'll update the impl if the spec people think
otherwise :).

MozReview-Commit-ID: Eqy16ygHRLo
2018-05-25 12:09:30 +02:00
Emilio Cobos Álvarez
5d4df42dc7 Bug 1149357: Make nsImageFrame::mIntrinsicSize account for density. r=dholbert
Only doing it in ComputeSize (via GetNaturalSize) is unsound, and the rest of
the users of mIntrinsicSize definitely do need scaling accounted for.

Move the adjustment to nsImageFrame for two reasons:

 * Prevents adding more dependencies from nsIImageLoadingContent, which
   otherwise would need to go away anyway in bug 215083.

 * Avoids having to duplicate the image orientation logic, since mImage is
   already an OrientedImage if needed.

MozReview-Commit-ID: EA0n0TctZhN
2018-05-25 12:09:23 +02:00
Brindusan Cristian
309ff0bd1f Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-05-25 03:08:34 +03:00
Jean-Yves Avenard
aa3feebecc Bug 1451149 - P2. Don't fire the "stalled" event when using MSE. r=bryce
When using a media element with a Media Source, the resource fetching algorithm is to be called in "local" mode:
https://www.w3.org/TR/media-source/#mediasource-attach
"Continue the resource fetch algorithm by running the remaining "Otherwise (mode is local)" steps, with these clarifications"

https://html.spec.whatwg.org/multipage/media.html#concept-media-load-resource
Under the local mode, the steps that would cause the element to fire suspend, stalled or progress can never occur.
We only prevent the stalled event to be fired, many websites rely on the progress event to be fired (such as when the init segment has been parsed). The HTML5 media spec will be amended to clearly indicate that progress is to be fired even with mediasource

MozReview-Commit-ID: DkoQzoV0JzO

--HG--
extra : rebase_source : 1e916eee50c9935f168797bb5a92052191cda59d
2018-05-14 11:32:09 +02:00
Jean-Yves Avenard
0f9cf930b6 Bug 1451149 - P1. Fix HTMLMediaElement style. r=bryce
Partially apply clang-format so that we limit the scope of changes while ensuring consistency in declarations.

MozReview-Commit-ID: Km9sKBbFhKx

--HG--
extra : rebase_source : 880e1fc1b46ab57d961e12eb7670260128d0faa1
2018-05-14 11:11:18 +02:00
Boris Zbarsky
98837ca245 Bug 1462789. Fix readystate assertions when document.open() is used on an image document. r=hsivonen
There are a few things going on here:

1)  Better tracking of whether we've done our synthetic document stuff so we
don't redo it when it's not needed.  We should only be doing it on initial
load.

2)  Better handling of our readystate transitions.  We're only responsible for
the transition to READYSTATE_INTERACTIVE if we're the ones setting up the DOM.
Otherwise whoever is doing that should do the readystate transition.

Both of these really use the same mechanism, which is why I ended up doing them
together.
2018-05-23 11:06:34 -04:00