Commit Graph

2321 Commits

Author SHA1 Message Date
KuoE0
4f17947f0f Bug 1348738 - (Part 4) Add a nsIDocument arg to nsRepeatService::Start to get the event target from it. r=dholbert
In the new architecture of Quantum DOM, all timer callback need a
specified event target. So, we add the new document arg to Start
function to get the event target from it. And update all callers.

MozReview-Commit-ID: a482mukqGc

--HG--
extra : rebase_source : 36f9d47a4afd7c7113adf3f274656b694b8d0943
2017-03-29 16:40:05 +08:00
KuoE0
5f42875bfd Bug 1348738 - (Part 3) Add a string-label arg to nsRepeatService::Start and upgrade to InitWithNamedFuncCallback from InitWithFuncCallback. r=dholbert
In the new architecture of Quantum DOM, all runnables need a name label.
So, we add the new string-label arg to Start function, and update all
callers.

MozReview-Commit-ID: G9LXFjtFcQv

--HG--
extra : rebase_source : a19b605013be56d01780c831d2a48ada8825b1c7
2017-03-29 16:32:52 +08:00
Aryeh Gregor
a7ed0e7cf4 Bug 1297414 - formatBlock should move non-editable nodes; r=masayuki
Before this change, if you did formatBlock on "a<span
contenteditable=false>b</span>c", it would become "acb", because the "a"
and "c" would be moved to the front of the node, and the "b" would be
left alone at the end because the editing code doesn't want to move it.
Now we will move the "b" as well, even though it's not editable, so that
the node remains "abc".  The rule is that a non-editable element cannot
have its attributes or children changed, but it can have its parent
changed, so there's nothing wrong with moving it here.

On the way, I fixed an exception in insert*List if there was an
uneditable inline node around.  I don't intend to fix all the todo's in
the test, but now it should have better coverage, at least.

MozReview-Commit-ID: 3okcGq4an3f
2017-04-04 13:47:28 +03:00
Aryeh Gregor
c442eea5f2 Bug 1297414 - Support execCommand("defaultParagraphSeparator"); r=masayuki
Later commits will add the actual functionality.

MozReview-Commit-ID: 6Ac9V6MjZpa
2017-04-04 13:47:28 +03:00
Olli Pettay
d5caa7c6c0 Bug 1352687, try to recycle HTMLInputElement's nsTextEditorState, r=baku
--HG--
extra : rebase_source : 05c8dc2bd0c29ce3064548e1cabac2d62803cabc
2017-04-03 20:40:48 +03:00
Sebastian Hengst
948595ff2f merge mozilla-central to mozilla-inbound. r=merge a=merge 2017-04-01 13:12:04 +02:00
Olli Pettay
d47c995985 Bug 1351860 - Move mType from HTMLInputElement to nsIFormControl and make GetType non-virtual inlined, r=jessica
--HG--
extra : rebase_source : b7d76ce3321ea0d622da74a72b7278fd0fa63310
2017-03-31 22:49:00 -04:00
Olli Pettay
31b1f5cc92 Backout Bug 1351860, r=backout 2017-03-31 16:55:32 -04:00
Olli Pettay
b84c192a09 Bug 1351860 - Move mType from HTMLInputElement to nsIFormControl and make GetType non-virtual inlined, r=jessica
--HG--
extra : rebase_source : 5f2cac2c4e944e2c9f2f1acf0d3064e153c40451
2017-03-31 13:13:36 -04:00
Manish Goregaokar
111b56703c Bug 1341647 - stylo: Move HTMLBodyElement::WalkContentStyleRules to the mapped attr functionality; r=bz
MozReview-Commit-ID: 90qDHl0Ane4

--HG--
extra : rebase_source : e3dace4a0ec7345ec801c02db7339e78a6242a1e
2017-03-29 12:10:00 -07:00
Manish Goregaokar
d52216a79d Bug 1341648 - stylo: Include content rules from HTMLTableCellElement::WalkContentStyleRules ; r=bz
This also removes the TABLE_ATTRS_DIRTY optimization. Constructing nsMappedAttributes isn't really expensive and we do it all the time anyway.

MozReview-Commit-ID: 2krt1nFUzgl

--HG--
extra : rebase_source : 18d400aed6f427e5efc503b87b6ee2d9af74f3f5
2017-03-26 13:53:34 -07:00
Emilio Cobos Álvarez
55e9a2ee3f Bug 1350140: Update test expectations. r=emilio
MozReview-Commit-ID: 4ZTM0r5KJfn

--HG--
extra : rebase_source : 139db22ea2b38d796c6d99707818a897104e091e
2017-03-24 09:25:12 +01:00
Alastor Wu
6218dd5593 Bug 1247433 - don't set error for unsupported type media. r=JamesCheng,jwwang,kaku
On Fennec, we use external video player to play unsupported type media.

In this bug, we can't execute play() successfully because the spec said that
we should abort the play if the value of media element's error is
MEDIA_ERR_SRC_NOT_SUPPORTED [1].

Therefore, we do a hack for unsupported type media, we don't set its error, but
we would still remember the src is unsupported type. When media element starts
playing, we would use an external video player to play that src.

[1] https://goo.gl/GlLbeA

MozReview-Commit-ID: 42HxQtXdWDe

--HG--
extra : rebase_source : 83425528eacee8af1829eaead2fef39b0be51ae5
2017-03-29 11:55:50 +08:00
bechen
9fa41c62a2 Bug 1343797 - Label runnables in TextTrackManager.cpp. r=jwwang
MozReview-Commit-ID: 2rP55aUyNi

--HG--
extra : rebase_source : ad1617a36efdc4b179ec7fae12895d86ef01912c
2017-03-27 16:51:17 +08:00
Alastor Wu
192096681c Bug 1347648 - part4 : notify audible change after finishing set suspend and pause state. r=jwwang
Since the audible state would depend on pause and suspend state, we should do
the check after finishing play() or pause().

MozReview-Commit-ID: 1yhxuQDw067

--HG--
extra : rebase_source : 888bac3da52f42b75eeb1c3db1337e223d792a11
2017-03-27 10:59:44 +08:00
Alastor Wu
758808ea61 Bug 1347648 - part2 : paused media element is non-audible. r=jwwang
If the media element is paused, it should be non-audible.

MozReview-Commit-ID: 2HjV9gNNcnV

--HG--
extra : rebase_source : 39b0812788d020d3f9c1a96afa1397b32057de8c
2017-03-27 10:59:07 +08:00
Emilio Cobos Álvarez
fe28d71e3d Bug 1341102: More reftest updates. r=emilio
MozReview-Commit-ID: CAsplZW4mpj
2017-03-25 18:35:24 +01:00
Manish Goregaokar
b8c378e1a5 Bug 1330051; Reparse style attribute when adopting across style backends; r=bz
MozReview-Commit-ID: LWN57KApiMu

--HG--
extra : rebase_source : 20cfb66a8d6d5f88aa3db9cc6876f986d71290b4
2017-03-24 15:28:19 -07:00
Manish Goregaokar
88b43cc612 Bug 1341102 - Update stylo reftest expectations; r=orange
MozReview-Commit-ID: 9PbpzNqSQ7W
2017-03-24 21:54:18 -07:00
Manish Goregaokar
06a78b09a1 Bug 1341775 - Part 2: stylo: Update test expectations; r=heycam
MozReview-Commit-ID: AZPnws5TpCk

--HG--
extra : rebase_source : 05da6118989bf83fb9c0e26bb7ecf282e2a8d369
2017-03-17 19:48:20 -07:00
Alastor Wu
d8197f5d08 Bug 1347758 - part4 : add audio channel log. r=Ehsan
MozReview-Commit-ID: 3zVYtD86O82

--HG--
extra : rebase_source : 3a7726760d6e4941cdbe2e6c9ee7132420482bb4
2017-03-24 14:44:18 +08:00
Alastor Wu
7c05349889 Bug 1347758 - part2 : remove add/removeMediaContent() and related codes. r=Ehsan
Since the window would know when need to resume the media, we don't need the
add/removeMediaContent() anymore.

MozReview-Commit-ID: F9MSiqqnOiV

--HG--
extra : rebase_source : fa86b3977e13d1f2a6b6233b6d608ccc331b5bf7
2017-03-24 14:43:40 +08:00
Iris Hsiao
26a234de5d Backed out 6 changesets (bug 1347758) for eslint failure
Backed out changeset 9becd55242c1 (bug 1347758)
Backed out changeset 2abce19f5001 (bug 1347758)
Backed out changeset 80232d4c85d5 (bug 1347758)
Backed out changeset 1fd084ec34d4 (bug 1347758)
Backed out changeset cafb3c12027b (bug 1347758)
Backed out changeset 85846edfe957 (bug 1347758)
2017-03-24 16:58:08 +08:00
Alastor Wu
e81c17d1b2 Bug 1347758 - part4 : add audio channel log. r=Ehsan
MozReview-Commit-ID: LNXzRZx2rC2

--HG--
extra : rebase_source : eef0ad3d65161c422d3cab57e6e081796452bdd1
2017-03-24 12:04:15 +08:00
Alastor Wu
8591f98cad Bug 1347758 - part2 : remove add/removeMediaContent() and related codes. r=Ehsan
Since the window would know when need to resume the media, we don't need the
add/removeMediaContent() anymore.

MozReview-Commit-ID: F9MSiqqnOiV

--HG--
extra : rebase_source : 28a8312373054b8e29b93267677de99dd862a074
2017-03-24 12:01:46 +08:00
Mats Palmgren
00b74113a3 Bug 1333482 part 4 - [css-ui] Amend all uses of '-moz-appearance:none' in tests to also specify 'appearance:none' (automated change). r=dholbert
MozReview-Commit-ID: BNOR5VRpV2E
2017-03-23 22:11:22 -07:00
J.C. Jones
d183667c00 Bug 1342258 - Refactor SetDomain to IsRegistrableDomainSuffixOfOrEqualTo r=smaug
This commit refactors the SetDomain method in a Document to call a new function
IsRegistrableDomainSuffixOfOrEqualTo(), defined in HTML [1]. This commit tries
not to rename anything except input variables, so as to remain as clear as
possible. It likely should have various variables renamed, but given the
author's unfamiliarity with this module, review seems a good time to do that.
It's also duplicating comments a little bit; let me know which one(s) you'd like
to keep!

Note: Commentary on the HTML change is available in the PR [2], and the
rationale for this behavior in Web Auentication, where this algorithm will be
used, is also recorded [3].

Update 1: Refactored two new protected methods to avoid code duplication.
Update 2: Bugfix: Be sure to use CreateInheritingURIForHost for the
provided domain so as to catch internationalized domains.
Update 3: Nit-fix and rebase

[1] https://html.spec.whatwg.org/multipage/browsers.html#is-a-registrable-domain-suffix-of-or-is-equal-to
[2] https://github.com/whatwg/html/pull/2365
[3] https://github.com/w3ctag/spec-reviews/issues/97#issuecomment-175766580

MozReview-Commit-ID: 4Dr8yOMdhez

--HG--
extra : rebase_source : 634bd3c7b60c7ad996ee38ab7314071b426e3f6f
2017-03-07 09:37:34 -07:00
Carsten "Tomcat" Book
332688962a Merge mozilla-central to mozilla-inbound
--HG--
rename : testing/web-platform/tests/storage/interfaces.html => testing/web-platform/tests/storage/interfaces.https.html
2017-03-23 13:57:16 +01:00
Wes Kocher
b31e9e6a39 Merge inbound to central, a=merge
MozReview-Commit-ID: EQ7w1Gld1K2
2017-03-22 17:10:01 -07:00
Carsten "Tomcat" Book
534f3aebc6 Merge mozilla-central to mozilla-inbound 2017-03-22 16:13:03 +01:00
Kaku Kuo
c4629a637d Bug 1349456 part 2 - mark elemet as tainted while captured via MozCaptureStream(); r=jwwang
MozReview-Commit-ID: 1V776bLuH43

--HG--
extra : rebase_source : 546587dc77dba4931788359a0a80507892594a7d
2017-03-22 14:46:09 +08:00
Kaku Kuo
1cf3c62747 Bug 1349456 part 1 - correct indentation; r=jwwang
MozReview-Commit-ID: 4i8sQaotJpO

--HG--
extra : rebase_source : 601553fb2ac3715b6a89cfb64d8c3d3b8880af25
2017-03-22 14:33:11 +08:00
Olli Pettay
02a0f210fa Bug 1346654, follow the COM rules in nsTextInputSelectionImpl, r=ehsan
--HG--
extra : rebase_source : 15f1e22fe3e814c34332b4f9e2ff1f889e3a264d
2017-03-22 12:19:20 +02:00
Olli Pettay
92bb395acd Bug 1339758, click() and similar can return 0 from various coordinate properties, r=masayuki
--HG--
extra : rebase_source : 71547cc6655c39ffeba89676d315bdb9bacc5ff4
2017-03-23 12:57:44 +02:00
Kaku Kuo
a2b8741937 Bug 1348432 - move the mMediaTracksConstructed flag back to MediaDecoder; r=jwwang
This mMediaTracksConstructed flag should belong to a MediaDecoder,
every time a HTMLMediaElement switches its MediaDecoder, the flag should be reset to false again.

So, we move the mMediaTracksConstructed flag back to MediaDecoder, by this way,
HTMLMediaElement provides only the mechanism to construct and remove media tracks,
and MediaDecoder uses the flag, mMediaTracksConstructed, to provide policy.

MozReview-Commit-ID: L7mMAmLjQCy

--HG--
extra : rebase_source : 1625d604afb34bffe79eda06a46c9feb780a14d9
2017-03-18 22:34:01 +08:00
Jeremy Chen
84b16223f3 Bug 1349114 - label CallPrintCallback for HTMLCanvasElement. r=smaug
Since canvas element is only run on main thread, and OwnerDoc is never null,
we should be able to use the new Dispatch API directly.

A trivial indent fix is included in this patch as well.
Since this is a one-line-change, I decided not to split this to a separated
patch.

MozReview-Commit-ID: ExjUdOdPGd4

--HG--
extra : rebase_source : b990bf9caff0616658541a29ae46aa4c8df616e3
2017-03-21 14:31:11 +08:00
Alastor Wu
295d2183ba Bug 1329122 - should unregister agent when media element becomes inactive. r=baku
We should remove the media control interface immediately when the document is inacitve, even it was paused by media control before.

MozReview-Commit-ID: GBDhzEFOTXE

--HG--
extra : rebase_source : f357d19ceb26d307d1d68696ad875d044e14aa8b
2017-03-22 00:04:24 +08:00
Sebastian Hengst
56361d2b49 Backed out changeset ffa2f50d49ce (bug 1342258) for failing mochitest dom/tests/mochitest/dom-level0/test_setting_document.domain_idn.html. r=backout 2017-03-20 21:19:01 +01:00
J.C. Jones
e40fae82c1 Bug 1342258 - Refactor SetDomain to IsRegistrableDomainSuffixOfOrEqualTo r=smaug
This commit refactors the SetDomain method in a Document to call a new function
IsRegistrableDomainSuffixOfOrEqualTo(), defined in HTML [1]. This commit tries
not to rename anything except input variables, so as to remain as clear as
possible. It likely should have various variables renamed, but given the
author's unfamiliarity with this module, review seems a good time to do that.
It's also duplicating comments a little bit; let me know which one(s) you'd like
to keep!

Note: Commentary on the HTML change is available in the PR [2], and the
rationale for this behavior in Web Auentication, where this algorithm will be
used, is also recorded [3].

Updates: Refactored two new protected methods to avoid code duplication.

[1] https://html.spec.whatwg.org/multipage/browsers.html#is-a-registrable-domain-suffix-of-or-is-equal-to
[2] https://github.com/whatwg/html/pull/2365
[3] https://github.com/w3ctag/spec-reviews/issues/97#issuecomment-175766580

MozReview-Commit-ID: 4Dr8yOMdhez

--HG--
extra : rebase_source : 5d042c4e97b8866027c81ea0f1c544ce1721b7c4
2017-03-07 09:37:34 -07:00
Matt Brubeck
ea53640d30 Bug 1337068 - stylo: Update test expectations. r=emilio
MozReview-Commit-ID: F8dogEQLdgt

--HG--
extra : rebase_source : 57e2ad20c9c13130239fc4d4b1ff537733a77577
extra : intermediate-source : abac6252e97f10b4c45223c5748f5a3bb59d86f2
extra : source : 4f1af10cb01e8b48da5e3ad8487487131fd51b1f
2017-03-18 11:53:44 -07:00
Kaku Kuo
0696209786 Bug 1347892 part 2 - pass the visibility state of media element to media decoder as a Visibility variable; r=jwwang
MozReview-Commit-ID: AbkJeIpYZlN

--HG--
extra : rebase_source : 3ace472786b9b9900b125164996819b6d6e3627f
2017-03-17 12:51:11 +08:00
Kaku Kuo
6da6d229fa Bug 1347892 part 1 - initialize a media element's mVisibilityState to be UNTRACKED; r=jwwang
MozReview-Commit-ID: Bkkh6hvCNu4

--HG--
extra : rebase_source : 48af639b9ce04f11a20cc55088dc3cb3f59971ec
2017-03-16 19:26:49 +08:00
Jessica Jong
093aa14344 Bug 1344642 - Part 2: Add a new pref for input type=week, month and datetime-local. r=smaug
--HG--
extra : rebase_source : 9cacecf2b14cdd8caabd56993b22d0bbb27eae6b
2017-03-17 11:01:59 +08:00
Jessica Jong
3c909e1184 Bug 1344642 - Part 1: Cleanup dom.forms.datepicker related code. r=smaug
This patch basically reverts Bug 825294.

--HG--
extra : rebase_source : 58b235bfddb5acd1ec0cf1afd8f34cbb8c4e09c1
2017-03-17 11:01:57 +08:00
Wes Kocher
ee28f4ee71 Merge inbound to central, a=merge
MozReview-Commit-ID: Fq7B78wD7Wv
2017-03-17 11:03:59 -07:00
Carsten "Tomcat" Book
3e0a5441c6 Merge mozilla-central to mozilla-inbound 2017-03-17 14:55:15 +01:00
Kaku Kuo
0d5f3a200f Bug 1347402 part 5 - create MediaElementGMPCrashHelper in HTMLMediaElement.cpp; r=cpearce,jwwang
Move the creation of MediaElementGMPCrashHelper out from MediaDecoder.cpp
which reduces the dependency of MediaDecoder to HTMLMediaElement.

MozReview-Commit-ID: E60aMfcFr7V

--HG--
extra : rebase_source : f50a8ee6f2fbec0bdf117eb1217066bc9c701745
extra : source : dd4e52da6d0d6205fe61d0caba44bbff008fd21a
2017-03-16 11:16:15 +08:00
Kaku Kuo
b7fee84e84 Bug 1347402 part 4 - move ConstructMediaTracks/RemoveMediaTracks to HTMLMediaElemnt; r=jwwang
ConstructMediaTracks and RemoveMediaTracks are actually HTMLMediaElement's responsibilities.

MozReview-Commit-ID: 8lOdzD4pN7N

--HG--
extra : rebase_source : 7159d2c62b77429e5b2305b9e3eb7a0020a3b52c
extra : source : 0467c059be3cd8f066da5fc912b7738a5b9c4dd9
2017-03-15 17:33:21 +08:00
Kaku Kuo
a71c156f34 Bug 1347402 part 2 - open a GetOwnerDoc() interface at the MediaDecoderOwner; r=jwwang
Open a GetOwnerDoc() method to the MediaDecoderOwner interface and then we can get the
owner document via a pointer to MediaDecoderOwner in MediaDecoder.

MozReview-Commit-ID: JCzQDLx1MsU

--HG--
extra : rebase_source : e194c95cb1513046ec7aa19d6c6e9f8231971a2d
extra : source : 1b9c45911a036e3677b6636cda84a636681d71de
2017-03-15 11:40:37 +08:00
Kris Maglione
9e1cbea297 Bug 1333990: Part 2b - Don't enable editor until layout has started. r=ehsan
In order to support asynchronous loading of extension content scripts, we need
to be able to exit the HTML parser flush loop immediately after inserting the
document element. Normally this doesn't cause problems, but when we enter edit
mode with an empty element selected, the editor inserts a <br> node, and a
<br> node at the start of the <html> element causes issues.

These changes solve that issue by putting off entering editor mode until we
begin laying out the document.

MozReview-Commit-ID: H2ksNz0jRxs

--HG--
extra : rebase_source : 26e0d254744363f5bd60f3b4f4df7b51c3dc446f
2017-03-14 21:22:06 -07:00