Commit Graph

5143 Commits

Author SHA1 Message Date
Mirko Brodesser
ea1f257885 Bug 1614636: simplify arguments of nsFrameSelection::HandleClick. r=jfkthame
Simplifies understanding its dependent methods.

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

--HG--
extra : moz-landing-system : lando
2020-02-11 15:12:26 +00:00
Ehsan Akhgari
340e730db7 Bug 1614329 - Fix the handling of the type attribute of HTMLStyleElement; r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D62254

--HG--
extra : moz-landing-system : lando
2020-02-11 19:38:26 +00:00
John Dai
82370e0bad Bug 1588715 - Refactor matches the spec term 'submitter'; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D62035

--HG--
extra : moz-landing-system : lando
2020-02-11 12:46:57 +00:00
John Dai
5683fcf7c8 Bug 1588715 - Implement SubmitEvent; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D62030

--HG--
extra : moz-landing-system : lando
2020-02-11 12:46:54 +00:00
Emilio Cobos Álvarez
b997cfcaf4 Bug 1614208 - Stop including PresShell.h and nsPresContext.h from Element.h. r=smaug
nsPresContext.h is only used for unit conversion, which can be done by Units.h
in a similar fashion.

PresShell.h was needed for some capturing-content stuff which can be moved out
of line.

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

--HG--
extra : moz-landing-system : lando
2020-02-11 01:23:12 +00:00
Emilio Cobos Álvarez
6615ff9fad Bug 1614208 - Stop including AccessibleCaretEventHub and PresShell.h from Selection.h. r=TYLin
And fix a bunch of fallout as we now don't include nsDocShell.h everywhere.

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

--HG--
extra : moz-landing-system : lando
2020-02-11 01:22:29 +00:00
Ehsan Akhgari
74836fb7e5 Bug 1610821 - Part 2: Ensure most of event handling works on input elements which are disconnected from a document; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D60672

--HG--
extra : moz-landing-system : lando
2020-02-10 22:35:44 +00:00
Ehsan Akhgari
a848f5fbdd Bug 1610821 - Part 1: Remove the unused nsPresContext argument of FireEventForAccessibility(); r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D62252

--HG--
extra : moz-landing-system : lando
2020-02-10 14:06:09 +00:00
alwu
478a75705e Bug 1613329 - part1 : append text track to media element when binding track element to DOM tree. r=bzbarsky
This change ensures that we always remember to add a text track to media element's track list.

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

--HG--
extra : moz-landing-system : lando
2020-02-11 00:41:14 +00:00
Olli Pettay
f49348082e Bug 1612431, it is enough to update existing browsing context name when changing iframe.name, r=kmag
This brings back some of the behavior we had before bug 1578628.

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

--HG--
extra : moz-landing-system : lando
2020-02-06 18:44:05 +00:00
Emilio Cobos Álvarez
873a349556 Bug 1611701 - Tweak NODE_IS_EDITABLE flag handling for NAC so that it works consistently for <input type=number>. r=bzbarsky,masayuki,whimboo
I thought this would fix <input type=number style="user-select: none">, but
turns out it doesn't.

<input type=number> doesn't have the editor root as a root of the anonymous
subtree, so the current hack wouldn't work, as the anon root wouldn't have the
editable flag. So tweak the code a bit to handle stuff in a simpler way than
setting the flags after the fact, and set the NAC-root flag earlier to avoid
the mOuterWrapper->AppendChildTo(root) call forgetting about root's flags.

I had to tweak one AccessibleCaret test, but that's because it uses <textarea>
with user-select: none, and our behavior there is not particularly sane. It just
happened to work because that test-case also had a bunch of contenteditable
elements, and we stop matching this rule:

  https://searchfox.org/mozilla-central/rev/220a3bd6063fcbe5ca50e88dcabdc7dee0aca448/layout/style/contenteditable.css#22

Because the anonymous div now properly matches :-moz-read-write, which made the
rule apply and the test work. See comment 4 of this bug.

I'll fix this stuff up and add some tests for our behavior here in bug 1611699.

I refactored the dragdrop tests to cover more input types, but I ended up not
being able to use them because they're dependent on the content.

Instead I added an extra test and changed the refactor so that it applies to
<input type=search>, as there's layout work going on in bug 558594, and it'd be
unfortunate to regress this there too.

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

--HG--
extra : moz-landing-system : lando
2020-02-06 22:15:19 +00:00
Boris Zbarsky
1395be1f23 Bug 1613013 part 3. Annotate TypeErrors and RangeErrors from WebIDL implementations with the method they come from. r=peterv
Please review the changes to Errors.msg very carefully.  I caught a number of
mistakes there in self-review (e.g. not renumbering replacement markers
correctly when I added {0} to the beginnings of strings), and my confidence
that I caught them all is only middling.

A few lines (MSG_USELESS_SETTIMEOUT, MSG_TYPEDARRAY_IS_DETACHED,
MSG_NOT_SUBMIT_BUTTON) were removed from Errors.msg either because they were
already unused or because they either were single-user constant strings or
became such in the new setup and we could just use the string version of
ThrowTypeError.

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

--HG--
extra : moz-landing-system : lando
2020-02-06 21:22:32 +00:00
Emilio Cobos Álvarez
69c87f6cb2 Bug 1613349 - Rename nsINode::DeleteProperty to RemoveProperty. r=smaug
And the related methods as well.

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

--HG--
extra : moz-landing-system : lando
2020-02-06 16:06:49 +00:00
Boris Zbarsky
9b0b56bfc7 Bug 1612213 part 3. Switch Promise::RejectWithDOMException consumers to new convenience methods. r=smaug,jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D61269

--HG--
extra : moz-landing-system : lando
2020-02-03 20:37:32 +00:00
Boris Zbarsky
b88d5ac5a8 Bug 1612213 part 1. Switch most consumers of ThrowDOMException to the new methods. r=smaug,jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D61267

--HG--
extra : moz-landing-system : lando
2020-02-03 20:19:11 +00:00
Emilio Cobos Álvarez
6cbfa720de Bug 1612202 - Fix focus check for date / time inputs inside shadow DOM. r=smaug
The code was using activeElement which is not safe inside shadow DOM as it is
retargeted.

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

--HG--
extra : moz-landing-system : lando
2020-01-31 09:43:23 +00:00
Masayuki Nakano
083d7d9809 Bug 1612085 - part 3: Remove dirty hack of Selection::mCachedRange r=smaug
Previously, I added `Selection::mCachedRange` to save allocation cost of
`nsRange`.  However, with the previous patch, we don't need the hack anymore
since ranges removed by `Selection::RemoveAllRanges()` are always kept in
the global cache of `nsRange`.  Therefore, we can remove the ugly hack right
now.

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

--HG--
extra : moz-landing-system : lando
2020-01-30 12:44:33 +00:00
Kousuke Takaki
04bba6950f Bug 1602088 - Move nsIScrollableFrame::ScrollUnit to namespace scope. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D61140

--HG--
extra : source : 69fded25adc2ac25e302b49c1128f8926e1311a3
2020-01-30 09:13:19 +00:00
Cosmin Sabou
5a3d320cd0 Backed out changeset 69fded25adc2 (bug 1602088) for causing several box-shadow reftest failures.
CLOSED TREE
2020-01-30 13:23:10 +02:00
Kousuke Takaki
9681569b70 Bug 1602088 - Move nsIScrollableFrame::ScrollUnit to namespace scope. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D61140

--HG--
extra : moz-landing-system : lando
2020-01-30 09:13:19 +00:00
Boris Zbarsky
625f5e86ad Bug 1611509 part 1. Stop using Date in HTMLInputElement.webidl. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D61052

--HG--
extra : moz-landing-system : lando
2020-01-25 05:56:06 +00:00
Emilio Cobos Álvarez
cbd110d718 Bug 1611713 - Remove TextControlState::GetParentNumberControl. r=masayuki
Can't return anything useful anymore since bug 981248.

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

--HG--
extra : moz-landing-system : lando
2020-01-27 00:00:09 +00:00
Emilio Cobos Álvarez
4f2c2e33f2 No bug - Fix minor non-unified-build issue.
DONTBUILD

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

--HG--
extra : moz-landing-system : lando
2020-01-26 15:50:02 +00:00
alwu
7bfc3e2bf5 Bug 1611031 - always trigger corespending controller method when receving media control key events. r=chunmin
The check here was used to prevent calling play or pause during playing or pausing.

However, according to the spec [1], even if media session is playing, we would still want to trigger its play action handler when play action happens. So we should forward all media control key events to the content, not to block any of them.

[1] https://w3c.github.io/mediasession/#handle-media-session-action

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

--HG--
extra : moz-landing-system : lando
2020-01-24 21:31:34 +00:00
Kris Maglione
878d4b6711 Bug 1595936: Part 2 - Refresh feature policy when attaching browsing context. r=farre,baku
We go to great lengths to try to avoid initializing FrameLoaders during
document updates. That means that when `BindToTree` is called, the element's
FrameLoader is not initialized, and it has no BrowsingContext. Calling
`GetBrowsingContext()` (which happens as a side-effect of
`HTMLIFrameElement::RefreshFeaturePolicy`), however, forces eager
initialization, which can cause any number of problems.

This patch moves that logic from being triggered by `BindToTree` to being
triggered by `BrowsingContext::Embed`, which happens as soon as the
BrowsingContext is bound to the element, but does not force it to be created
early.

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

--HG--
extra : moz-landing-system : lando
2020-01-24 19:03:10 +00:00
Masayuki Nakano
b1bf7e0db4 Bug 1540043 - part 1: Move all constants and methods of nsIPlaintextEditor to nsIEditor and make nsIPlaintextEditor inherit nsIEditor r=m_kato
For preparing to remove `nsIPlaintextEditor` interface, this patch moves
all of them to `nsIEditor`, but for avoiding bustage in comm-central, makes
`nsIPlaintextEditor` inherit `nsIEditor` for now (i.e., even with this patch,
script can access old `nsIPlaintextEditor` members with the interface.

In C++ code, this patch moves `SetWrapColumn()`, `InsertTextAsAction()`,
`InsertTextAsSubAction()` and `InsertLineBreakAsSubAction()` because
they do common things between `TextEditor` and `HTMLEditor`.  On the other
hand, this does not move `TextEditor::GetTextLength()` because it's designed
only for `TextEditor`.

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

--HG--
rename : editor/libeditor/tests/test_nsIPlaintextEditor_insertLineBreak.html => editor/libeditor/tests/test_nsIEditor_insertLineBreak.html
extra : moz-landing-system : lando
2020-01-24 08:33:42 +00:00
Masayuki Nakano
b9e6df1063 Bug 1606043 - Make TextControlState::SetValueWithoutTextEditor() notify the text control element of value changed before dispatching eEditorInput event r=smaug
I made `nsContentUtils::DispatchInputEvent()` update validity of event target
before dispatching `eEditorInput` event in bug 1584963.  However, this is not
enough because it updates validity only when the type of `<input>` element is
`mail`, but it's required for other types, for example, `<input required>`.

This patch reverts the hack added in bug 1584963, instead, makes
`TextControlState::SetValueWithoutTextEditor()` notifies `TextControlElement`
of value change before dispatching `eEditorInput` event because it may have made
damage to the performance if `nsContentUtils::DispatchInputEvent()` updated
**all** validity state of the event target.

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

--HG--
extra : moz-landing-system : lando
2020-01-23 17:50:37 +00:00
Savo
49746857e4 Bug 1341018 - Create enum class LegendAlignValue to replace NS_STYLE_TEXT_ALIGN_* and NS_STYLE_VERTICAL_ALIGN_* in legend code. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D48285

--HG--
extra : moz-landing-system : lando
2020-01-23 03:10:03 +00:00
Sylvestre Ledru
187e9bafaf Bug 1519636 - Automatically reformat recent changes using clang-format r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2020-01-21 09:51:27 +00:00
Sebastian Hengst
75c116e45a Backed out changeset dfc2cef99712 (bug 1588148) because the test still times out frequently. a=backout
Backout suggested by asuth in bug 1607076.
2020-01-20 23:48:16 +01:00
Ehsan Akhgari
0574a70b8a Bug 1588980 - Part 2: Remove the deprecation warning for HTMLCanvasElement.mozGetAsFile; r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D60284

--HG--
extra : moz-landing-system : lando
2020-01-20 22:02:59 +00:00
Emilio Cobos Álvarez
256c124f94 Bug 1609996 - Reorder some includes affected by the previous patches. r=froydnj
This was done by:

This was done by applying:

```
diff --git a/python/mozbuild/mozbuild/code-analysis/mach_commands.py b/python/mozbuild/mozbuild/code-analysis/mach_commands.py
index 789affde7bbf..fe33c4c7d4d1 100644
--- a/python/mozbuild/mozbuild/code-analysis/mach_commands.py
+++ b/python/mozbuild/mozbuild/code-analysis/mach_commands.py
@@ -2007,7 +2007,7 @@ class StaticAnalysis(MachCommandBase):
         from subprocess import Popen, PIPE, check_output, CalledProcessError

         diff_process = Popen(self._get_clang_format_diff_command(commit), stdout=PIPE)
-        args = [sys.executable, clang_format_diff, "-p1", "-binary=%s" % clang_format]
+        args = [sys.executable, clang_format_diff, "-p1", "-binary=%s" % clang_format, '-sort-includes']

         if not output_file:
             args.append("-i")
```

Then running `./mach clang-format -c <commit-hash>`

Then undoing that patch.

Then running check_spidermonkey_style.py --fixup

Then running `./mach clang-format`

I had to fix four things:

 * I needed to move <utility> back down in GuardObjects.h because I was hitting
   obscure problems with our system include wrappers like this:

0:03.94 /usr/include/stdlib.h:550:14: error: exception specification in declaration does not match previous declaration
0:03.94 extern void *realloc (void *__ptr, size_t __size)
0:03.94              ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/malloc_decls.h:53:1: note: previous declaration is here
0:03.94 MALLOC_DECL(realloc, void*, void*, size_t)
0:03.94 ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/mozilla/mozalloc.h:22:32: note: expanded from macro 'MALLOC_DECL'
0:03.94     MOZ_MEMORY_API return_type name##_impl(__VA_ARGS__);
0:03.94                                ^
0:03.94 <scratch space>:178:1: note: expanded from here
0:03.94 realloc_impl
0:03.94 ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/mozmemory_wrap.h:142:41: note: expanded from macro 'realloc_impl'
0:03.94 #define realloc_impl mozmem_malloc_impl(realloc)

   Which I really didn't feel like digging into.

 * I had to restore the order of TrustOverrideUtils.h and related files in nss
   because the .inc files depend on TrustOverrideUtils.h being included earlier.

 * I had to add a missing include to RollingNumber.h

 * Also had to partially restore include order in JsepSessionImpl.cpp to avoid
   some -WError issues due to some static inline functions being defined in a
   header but not used in the rest of the compilation unit.

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

--HG--
extra : moz-landing-system : lando
2020-01-20 16:19:48 +00:00
Emilio Cobos Álvarez
aa3a695712 Bug 1609996 - Remove mozilla/Move.h. r=froydnj
rg -l 'mozilla/Move.h' | xargs sed -i 's/#include "mozilla\/Move.h"/#include <utility>/g'

Further manual fixups and cleanups to the include order incoming.

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

--HG--
extra : moz-landing-system : lando
2020-01-20 16:18:20 +00:00
Cosmin Sabou
38f8a8661d Backed out 2 changesets (bug 1588980) for mochitest failures on dom/canvas/test/mochitest.ini.
Backed out changeset dc0733b283e7 (bug 1588980)
Backed out changeset aaff3fef7fd6 (bug 1588980)

--HG--
extra : rebase_source : 2ec145cfc7d648cf78b927cce22210070ef579a2
2020-01-20 18:06:11 +02:00
Ehsan Akhgari
131bc87db8 Bug 1588980 - Part 2: Remove the deprecation warning for HTMLCanvasElement.mozGetAsFile; r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D60284

--HG--
extra : moz-landing-system : lando
2020-01-18 05:06:27 +00:00
Sylvestre Ledru
cc2040bf21 Bug 1605934 - Use nested namespaces r=sg
Done with:
./mach static-analysis check --checks="-*, modernize-concat-nested-namespaces" --fix .
and then clang-format on the files

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

--HG--
extra : moz-landing-system : lando
2020-01-18 13:48:34 +00:00
Dorel Luca
506e65bcab Backed out changeset bbb39655cf71 (bug 1605934) for build bustage in widget/gtk/mozwayland/mozwayland.c 2020-01-18 15:39:55 +02:00
Sylvestre Ledru
6689a37527 Bug 1605934 - Use nested namespaces r=sg
Done with:
./mach static-analysis check --checks="-*, modernize-concat-nested-namespaces" --fix .
and then clang-format on the files

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

--HG--
extra : moz-landing-system : lando
2020-01-18 13:16:39 +00:00
pbz
cefd3facd5 Bug 1432856 - Disable fullscreen leave on raise and open for fullscreen-multiple test. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D57371

--HG--
extra : moz-landing-system : lando
2020-01-16 14:39:20 +00:00
pbz
70e1dba79e Bug 1432856 - Extended focus methods in Window.webidl, Client.webidl and Element.webidl to pass CallerType. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D55811

--HG--
extra : moz-landing-system : lando
2020-01-16 14:38:40 +00:00
Emilio Cobos Álvarez
fff6c9e1ac Bug 981248 - Rewrite <input type=number> to avoid an anonymous input. r=masayuki,surkov,jwatt,ntim,jfkthame,smaug
Instead, subclass nsTextControlFrame. This simplifies the code and avoids
correctness issues.

I kept the localization functionality though it is not spec compliant. But I
filed a bug to remove it in a followup.

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

--HG--
extra : moz-landing-system : lando
2020-01-14 19:01:05 +00:00
Alex Catarineu
bc96439261 Bug 461204 - Improve the random number generator for the boundaries in multipart/form-data r=smaug
Using a weak RNG for the form boundary allows a website operator to perform several
attacks on users (as outlined in https://trac.torproject.org/projects/tor/ticket/22919)

These include:
 - Identifying Windows users based on the unseeded RNG
 - Identify the number of form submissions that have occurred cross-origin between same-origin submissions

Additionally, a predictable boundary makes it possible to forge a boundary in the middle
of a file upload.

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

--HG--
extra : moz-landing-system : lando
2020-01-13 20:41:14 +00:00
Edwin Takahashi
fe2ede7cf6 Bug 1601460 - mark browser_fullscreen-newtab.js as expected failure on ubuntu1804 r=jmaher
Changes:

With lack of movement on the bug, mark this test as an expected failure for ubuntu1804 as this bug fails at permafail frequency.

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

--HG--
extra : moz-landing-system : lando
2020-01-13 23:47:17 +00:00
Mihai Alexandru Michis
0d01c60c37 Backed out 2 changesets (bug 981248) for causing multiple failures.
CLOSED TREE

Backed out changeset 7a96708cc8b7 (bug 981248)
Backed out changeset 1eace7bd28d9 (bug 981248)
2020-01-14 19:28:17 +02:00
Emilio Cobos Álvarez
da2e4ef888 Bug 981248 - Rewrite <input type=number> to avoid an anonymous input. r=masayuki,surkov,jwatt,ntim,jfkthame,smaug
Instead, subclass nsTextControlFrame. This simplifies the code and avoids
correctness issues.

I kept the localization functionality though it is not spec compliant. But I
filed a bug to remove it in a followup.

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

--HG--
extra : moz-landing-system : lando
2020-01-14 15:05:22 +00:00
Masayuki Nakano
90cd2122dd Bug 970802 - part 5: Make AutoEditActionDataSetter created method dispatch "beforeinput" event r=smaug,m_kato
`AutoEditActionDataSetter` is created in the stack when editor's public method
is called and that guarantees lifetime of global objects in editor such as
editor itself, selection controller, etc.

The dispatcher of `beforeinput` event returns `NS_ERROR_EDITOR_ACTION_CANCELED`
if an event is actually dispatched but canceled.  The reason why it's an error
is, editor code must stop handling anything when any methods return error.
So, returning an error code is reasonable in editor module.  But when it's
filtered by `EditorBase::ToGenericNSResult()` at return statement of public
methods, it's converted to `NS_SUCCESS_DOM_NO_OPERATION`.  This avoids throwing
new exception, but editor class users in C++ can distinguish whether each edit
action is canceled or handled.  The reason why we should not throw new
exception from XPCOM API is, without taking care of each caller may break some
our UI (especially for avoiding to break comm-central).  Therefore, this patch
does not make XPCOM methods return error code when `beforeinput` event is
canceled.

In most cases, immediately after creating `AutoEditActionDataSetter` is good
timing to dispatch `beforeinput` event since editor has not touched the DOM
yet.  If `beforeinput` requires `data` or `dataTransfer`, methods need to
dispatch `beforeinput` event after that.  Alhtough this is not a good thing
from point of view of consistency of the code.  However, I have no better
idea.

Note 1: Our implementation does NOT conform to the spec about event order
between `keypress` and `beforeinput` (dispatching `beforeinput` event after
`keypress` event).  However, we follow all other browsers' behavior so that it
must be safe and the spec should be updated for backward compatibility.
Spec issue: https://github.com/w3c/uievents/issues/220

Note 2: Our implementation does NOT conform to the spec about event order
between `compositionupdate` and `beforeinput`.  Our behavior is same as
Safari, but different from Chrome.  This might cause web-compat issues.
However, our behavior does make sense from point of view of consistency of
event spec.  Additionally, at both `compositionupdate` and `beforeinput`,
composition string in editor has not been modified yet.  Therefore, this
may not cause web-compat issues (and I hope so).
Spec issue: https://github.com/w3c/input-events/issues/49

Note that this patch makes editor detect bugs that `beforeinput` event hasn't
been handled yet when it dispatches `input` event or modifying `data` and
`dataTransfer` value are modified after dispatching `beforeinput` event with
`MOZ_ASSERT`s.

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

--HG--
extra : moz-landing-system : lando
2020-01-14 07:18:51 +00:00
Masayuki Nakano
18b65250c8 Bug 970802 - part 4: Make TextControlState dispatch "beforeinput" event if there is no TextEditor r=smaug
If `TextControlState` does not have `TextEditor` and its `SetValue()` is called
from `SetUserInput()`, `TextControlState` itself needs to dispatch `beforeinput`
event.

If the value is modified by `beforeinput` event listener, it's intended that
`preventDefault()` is called by the web apps.  However, the behavior in this
case is not mentioned by UI Events nor Input Events spec.  We should just file
a spec issue instead of emulating Chrome's behavior for now because it requires
more changes, but this case must be an edge case.
The spec issue is: https://github.com/w3c/input-events/issues/106

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

--HG--
extra : moz-landing-system : lando
2020-01-14 07:16:34 +00:00
Masayuki Nakano
4d302443ce Bug 970802 - part 3: Implement beforeinput event dispatcher and add onbeforeinput event handler attribute r=smaug
This patch makes `nsContentUtils::DispatchInputEvent()` dispatch `beforeinput`
event too.  And also adds `onbeforeinput` event handler which is really
important for feature detection (although Chrome has not implemented this
attribute yet: https://bugs.chromium.org/p/chromium/issues/detail?id=947408).

However, we don't implement `InputEvent.getTargetRanges()` in this bug and
implementing `beforeinput` event may hit bugs of some web apps.  Therefore,
this patch disables `beforeinput` event by default even in Nightly channel.

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

--HG--
extra : moz-landing-system : lando
2020-01-14 07:15:45 +00:00
Masayuki Nakano
0bf0eeeaa0 Bug 970802 - part 1: Add beforeinput event tests into existing mochitests r=smaug
This patch adds a lot of `beforeinput` event tests into existing mochitests
which test `input` events.  But this does not add tests of canceling
`beforeinput` event because it requires really complicated path until
implementing `beforeinput` actually.

Note that `beforeinput` event is not fired with `Document.execCommand()`.
Therefore, this patch does not add WPT for testing `beforeinput` event.
And unfortunately, WPT cannot test most cases of the new tests.

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

--HG--
extra : moz-landing-system : lando
2020-01-14 07:14:50 +00:00
Razvan Maries
0df75c8122 Backed out 5 changesets (bug 970802) for xpcshell perma fails. CLOSED TREE
Backed out changeset 5511edd700f7 (bug 970802)
Backed out changeset 1fb9cf2264b6 (bug 970802)
Backed out changeset 6b185296c742 (bug 970802)
Backed out changeset ce6853e64ed6 (bug 970802)
Backed out changeset aa9bd45c09b1 (bug 970802)
2020-01-14 04:41:15 +02:00
Masayuki Nakano
00f4c31bb7 Bug 970802 - part 5: Make AutoEditActionDataSetter created method dispatch "beforeinput" event r=smaug,m_kato
`AutoEditActionDataSetter` is created in the stack when editor's public method
is called and that guarantees lifetime of global objects in editor such as
editor itself, selection controller, etc.

The dispatcher of `beforeinput` event returns `NS_ERROR_EDITOR_ACTION_CANCELED`
if an event is actually dispatched but canceled.  The reason why it's an error
is, editor code must stop handling anything when any methods return error.
So, returning an error code is reasonable in editor module.  But when it's
filtered by `EditorBase::ToGenericNSResult()` at return statement of public
methods, it's converted to `NS_SUCCESS_DOM_NO_OPERATION`.  This avoids throwing
new exception, but editor class users in C++ can distinguish whether each edit
action is canceled or handled.  The reason why we should not throw new
exception from XPCOM API is, without taking care of each caller may break some
our UI (especially for avoiding to break comm-central).  Therefore, this patch
does not make XPCOM methods return error code when `beforeinput` event is
canceled.

In most cases, immediately after creating `AutoEditActionDataSetter` is good
timing to dispatch `beforeinput` event since editor has not touched the DOM
yet.  If `beforeinput` requires `data` or `dataTransfer`, methods need to
dispatch `beforeinput` event after that.  Alhtough this is not a good thing
from point of view of consistency of the code.  However, I have no better
idea.

Note 1: Our implementation does NOT conform to the spec about event order
between `keypress` and `beforeinput` (dispatching `beforeinput` event after
`keypress` event).  However, we follow all other browsers' behavior so that it
must be safe and the spec should be updated for backward compatibility.
Spec issue: https://github.com/w3c/uievents/issues/220

Note 2: Our implementation does NOT conform to the spec about event order
between `compositionupdate` and `beforeinput`.  Our behavior is same as
Safari, but different from Chrome.  This might cause web-compat issues.
However, our behavior does make sense from point of view of consistency of
event spec.  Additionally, at both `compositionupdate` and `beforeinput`,
composition string in editor has not been modified yet.  Therefore, this
may not cause web-compat issues (and I hope so).
Spec issue: https://github.com/w3c/input-events/issues/49

Note that this patch makes editor detect bugs that `beforeinput` event hasn't
been handled yet when it dispatches `input` event or modifying `data` and
`dataTransfer` value are modified after dispatching `beforeinput` event with
`MOZ_ASSERT`s.

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

--HG--
extra : moz-landing-system : lando
2020-01-14 01:09:45 +00:00
Masayuki Nakano
f52c17a188 Bug 970802 - part 4: Make TextControlState dispatch "beforeinput" event if there is no TextEditor r=smaug
If `TextControlState` does not have `TextEditor` and its `SetValue()` is called
from `SetUserInput()`, `TextControlState` itself needs to dispatch `beforeinput`
event.

If the value is modified by `beforeinput` event listener, it's intended that
`preventDefault()` is called by the web apps.  However, the behavior in this
case is not mentioned by UI Events nor Input Events spec.  We should just file
a spec issue instead of emulating Chrome's behavior for now because it requires
more changes, but this case must be an edge case.
The spec issue is: https://github.com/w3c/input-events/issues/106

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

--HG--
extra : moz-landing-system : lando
2020-01-08 09:24:33 +00:00
Masayuki Nakano
81d47ee6d5 Bug 970802 - part 3: Implement beforeinput event dispatcher and add onbeforeinput event handler attribute r=smaug
This patch makes `nsContentUtils::DispatchInputEvent()` dispatch `beforeinput`
event too.  And also adds `onbeforeinput` event handler which is really
important for feature detection (although Chrome has not implemented this
attribute yet: https://bugs.chromium.org/p/chromium/issues/detail?id=947408).

However, we don't implement `InputEvent.getTargetRanges()` in this bug and
implementing `beforeinput` event may hit bugs of some web apps.  Therefore,
this patch disables `beforeinput` event by default even in Nightly channel.

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

--HG--
extra : moz-landing-system : lando
2020-01-08 09:23:40 +00:00
Masayuki Nakano
583465bce4 Bug 970802 - part 1: Add beforeinput event tests into existing mochitests r=smaug
This patch adds a lot of `beforeinput` event tests into existing mochitests
which test `input` events.  But this does not add tests of canceling
`beforeinput` event because it requires really complicated path until
implementing `beforeinput` actually.

Note that `beforeinput` event is not fired with `Document.execCommand()`.
Therefore, this patch does not add WPT for testing `beforeinput` event.
And unfortunately, WPT cannot test most cases of the new tests.

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

--HG--
extra : moz-landing-system : lando
2020-01-08 09:22:50 +00:00
Emilio Cobos Álvarez
cdd999d4e9 Bug 1608905 - Parse the HTMLImageElement.loading attribute. r=smaug
Behind a pref of course. Toggle that pref on on the loading/lazyload test
subdirectory, though there are no tests for the IDL (I guess once the spec PR
lands the existing IDL tests will be updated from the spec).

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

--HG--
extra : moz-landing-system : lando
2020-01-13 21:10:43 +00:00
Boris Zbarsky
59239b7c5c Bug 1607918. Fix case handling for webkit-prefixed transition/animation event handlers. r=smaug.
The WPTs were cherrypicked from e05bdb8e0d

The issue in dom/events/test/test_bug1332699.html was discussed in
https://bugzilla.mozilla.org/show_bug.cgi?id=1332699#c8 and
https://bugzilla.mozilla.org/show_bug.cgi?id=1332699#c10 but Xidorn never quite
made it clear enough what the issue was, so it ended up making it into the tree.

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

--HG--
extra : moz-landing-system : lando
2020-01-13 20:04:59 +00:00
Jonathan Kingston
84c462a2d0 Bug 1605814 - Don't capture CSP nonce when loading a child sheet. r=emilio,ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D58686

--HG--
extra : moz-landing-system : lando
2020-01-13 11:47:25 +00:00
Emilio Cobos Álvarez
aaecc96d81 Bug 1588791 - Make fission iframes honor and deal with the scrolling attribute. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D59630

--HG--
extra : moz-landing-system : lando
2020-01-13 11:30:44 +00:00
Ciure Andrei
51c540de3d Backed out 2 changesets (bug 1588791) for causing test_bug369370.html and test_transformed_scrolling_repaints_3.html to permafail
Backed out changeset 52e661ff161d (bug 1588791)
Backed out changeset d59e691bda9e (bug 1588791)
2020-01-13 04:49:16 +02:00
Emilio Cobos Álvarez
6e69347f9f Bug 1588791 - Make fission iframes honor and deal with the scrolling attribute. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D59630

--HG--
extra : moz-landing-system : lando
2020-01-12 22:22:29 +00:00
alwu
c2d2ecbd96 Bug 1595603 - part2 : delay seeking task when media is inactive r=bryce
When media element is inactive, asking MDSM to seek is actually useless, because all the data we decode won't be showed to user. In addition, we have to store extra pending events for `seeking` and `seeked`, which might result in memory overflow if the inactive page is calling `seek()` all the time.

Therfore, we should delay all seeking tasks while media is inactive, and perform the latest seeking task when media becomes active.

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

--HG--
extra : moz-landing-system : lando
2020-01-09 17:10:08 +00:00
alwu
25786bc918 Bug 1595603 - part1 : remove duplicate parameter and rename variable r=bryce
Two parameters in `SuspendOrResumeElement()` are acutally the same, they are both related with `IsActive()`, so using one parameter is enough.
In addition, we only suspend or resume element by checking element's active state, so rename `mPausedForInactiveDocumentOrChannel` to `mSuspendedForInactiveDocument` which fits the actual situation more.

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

--HG--
extra : moz-landing-system : lando
2020-01-09 06:10:02 +00:00
Johann Hofmann
b61a4aacf6 Bug 1597029 - Set securityInfo for all document types. r=baku
In StartDocumentLoad we copy the securityInfo reference from the load channel into a document
member variable. This used to happen only for HTML documents, but other documents (e.g. media)
can be loaded via secure channels, too and thus should have securityInfos. We're using the
securityInfo object to display information in the UI, which would previously fail for images and videos.

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

--HG--
extra : moz-landing-system : lando
2020-01-09 14:55:02 +00:00
Jeff Gilbert
f26e4d546b Bug 1477756 - Fix non-webgl CI tests. r=handyman
* Revert some partial webgl+oop+vr code.
* More missing FuncScope.
* Fix compile errors.
* Refactor some ifdef'd code to branch and compile on all platforms.
* -Wno-error=unused-result for GCC to allow for (void)MustUse().

Depends on D55739

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

--HG--
extra : moz-landing-system : lando
2020-01-08 22:19:26 +00:00
Jeff Gilbert
e1d0fe64bb Bug 1477756 - Client-side bindings mirror for precise CC, and merge similar codepaths. r=handyman
* Context loss using RAII
* Move Program reflection Client-side

Depends on D54018

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

--HG--
extra : moz-landing-system : lando
2020-01-08 22:19:16 +00:00
David Parks
198fa063c2 Bug 1477756 - Initial out-of-process WebGL implementation. r=mccr8,handyman
Splits WebGLContext into ClientWebGLContext and HostWebGLContext.  The Client enables the JS-control of a WebGL context in a content procecss while the Host executes the WebGL graphics operations (via a WebGLContext that maintains much of the existing code) in the compositor process.  At this point, the cross-process behavior is disabled -- this series of patches is an incremental step toward that final goal.

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

--HG--
extra : moz-landing-system : lando
2020-01-08 22:19:14 +00:00
Valentin Gosu
16ae7bd480 Bug 1552176 - pass TRRMode into nsHTMLDNSPrefetch methods r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D49159

--HG--
extra : moz-landing-system : lando
2020-01-07 19:33:51 +00:00
sotaro
68439d9c26 Bug 1598998 - Fix CanvasContextType::ImageBitmap handling r=nical
Differential Revision: https://phabricator.services.mozilla.com/D56348

--HG--
extra : moz-landing-system : lando
2020-01-08 01:12:50 +00:00
Mihai Alexandru Michis
c8ca91e7db Backed out changeset 67142a370d4a (bug 1598998) for causing failures in ImageBitmapRenderingContext.cpp
CLOSED TREE

--HG--
extra : histedit_source : 1e4895b3c8773f7881b99f1ab0fca9c6b64b7644
2020-01-07 01:49:59 +02:00
sotaro
374fa2d1ea Bug 1598998 - Fix CanvasContextType::ImageBitmap handling r=nical
Differential Revision: https://phabricator.services.mozilla.com/D56348

--HG--
extra : moz-landing-system : lando
2020-01-06 10:14:15 +00:00
Emilio Cobos Álvarez
5e95f50f4f Bug 1606659 - Don't pass margin and scrollbar preferences to nsFrameLoader::Show. r=mattwoodrow
Instead, get them on the relevant code paths.

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

--HG--
extra : moz-landing-system : lando
2020-01-05 22:48:40 +00:00
Andrew Sutherland
eb447022c9 Bug 1588148 - extend test timeout for long-running test. r=perry
Differential Revision: https://phabricator.services.mozilla.com/D58385

--HG--
extra : moz-landing-system : lando
2020-01-04 21:44:51 +00:00
Narcis Beleuzu
c1482e434d Backed out changeset c5f2b5b4a45f (bug 1588148) for mochitest failures on test_formSubmission.html . CLOSED TREE 2020-01-04 22:08:40 +02:00
Andrew Sutherland
30b6e43a67 Bug 1588148 - extend test timeout for long-running test. r=perry
Differential Revision: https://phabricator.services.mozilla.com/D58385

--HG--
extra : moz-landing-system : lando
2020-01-03 22:18:36 +00:00
alwu
2d2b857325 Bug 1571493 - part3 : notify media state and audible state changes. r=chunmin
Modify IPC method to support notify `ControlledMediaState` to the media controller, and remove the previous implementation.

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

--HG--
extra : moz-landing-system : lando
2020-01-03 01:34:34 +00:00
alwu
f5053f5850 Bug 1571493 - part2 : use 'MediaControlAgent' in media element. r=chunmin
We create `MediaControlEventListener` to register itself to the `MediaControlAgent` that is an event source, so that we can receive the media control event from the evnet source and operate media according to different types of event.

 `MediaControlEventListener` is also used to notify controlled media state to the media controller. When media first starts playing, or leaves bfcache and  has created listener before, we would notify `eStarted`. Notify `eStopped` when media destroys, or enter bfcache and has created listener before. When media's playing state changes, we would notifty `ePlayed` or `ePaused` depeding on media's `mPaused`.

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

--HG--
extra : moz-landing-system : lando
2020-01-03 01:20:01 +00:00
Emma Malysz
be8bd71702 Bug 1601110, remove handling and references to vnd.mozilla.xul+xml r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D57567

--HG--
extra : moz-landing-system : lando
2019-12-23 23:02:05 +00:00
Emma Malysz
c028f5125c Bug 1605737, remove XUL cached type r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D58140

--HG--
extra : moz-landing-system : lando
2019-12-23 17:10:15 +00:00
Emilio Cobos Álvarez
ff130db72b Bug 981248 - Fix test_input_number_mouse_events.html to not dispatch mouse events from input events. r=masayuki
The test fails with my <input type=number> rewrite because editor fails to
dispatch one input event caused by these mouse events.

The reason for this is that we schedule them from an input event, which fires
from here:

  https://searchfox.org/mozilla-central/rev/6305f6935f496b3a302c7afcc579399a4217729c/editor/libeditor/EditorBase.cpp#965

Not how at that point we still haven't decremented mPlaceholderBatch. That means
that other stuff that triggers input events from there will not dispatch events.

I think that's a bit unexpected, but it is a preexisting problem, and can't
happen for users because mouse events go through the event loop.

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

--HG--
extra : moz-landing-system : lando
2019-12-20 13:54:48 +00:00
Chris Peterson
406763af7f Bug 1570499 - Part 1: Replace MOZ_FALLTHROUGH macro with C++17's [[fallthrough]] attribute. r=froydnj
This changeset is a simple find and replace of `MOZ_FALLTHROUGH` and `[[fallthrough]]`.

Unfortunately, the MOZ_FALLTHROUGH_ASSERT macro (to assert on case fallthrough in debug builds) is still necessary after switching from [[clang::fallthrough]] to [[fallthrough]] because:

* MOZ_ASSERT(false) followed by [[fallthrough]] triggers a -Wunreachable-code warning in DEBUG builds
* but MOZ_ASSERT(false) without [[fallthrough]] triggers a -Wimplicit-fallthrough warning in NDEBUG builds.

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

--HG--
extra : moz-landing-system : lando
2019-12-20 07:16:43 +00:00
Tyler
ea8b8dab8a Bug 1601475 - Remove ImageContentLoaded event and ImageDocumentLoaded message handling code across the tree r=Gijs,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D56051

--HG--
extra : moz-landing-system : lando
2019-12-18 21:46:51 +00:00
Alastor Wu
6305f6935f Bug 1588138 - reset blessed state when media aborting current load. r=bryce
This patch is used to change the blessed state for media element under `click-to-play` blocking autoplay policy, which only allows play invocation called from user input handler, eg. `onclick`.

When media aborts current load, we should regard it as a new media. One example is on Youtube they always reuse same media element but replace its url for different video. Therefore, we should reset media's blessed state so that the media with new url can be blocked again.

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

--HG--
extra : moz-landing-system : lando
2019-12-18 04:11:12 +00:00
Andrew McCreight
058daef5d2 Bug 1603879 - Add a memory reporter for HTMLMediaElement::mPendingEvents. r=erahm
Differential Revision: https://phabricator.services.mozilla.com/D57376

--HG--
extra : moz-landing-system : lando
2019-12-17 02:55:15 +00:00
Oana Pop Rus
661db3a39f Backed out 7 changesets (bug 1432856) for build bustages failures in nsWindow.h on a CLOSED TREE
Backed out changeset 3d08c3cce533 (bug 1432856)
Backed out changeset 49d03dd89b17 (bug 1432856)
Backed out changeset 62fc84c8ce99 (bug 1432856)
Backed out changeset a8a4fa63f5b2 (bug 1432856)
Backed out changeset c81f3d5b9bf3 (bug 1432856)
Backed out changeset 8351a8b1d96a (bug 1432856)
Backed out changeset a303b775a51b (bug 1432856)
2019-12-16 23:53:35 +02:00
pbz
2a543b67bb Bug 1432856 - Disable fullscreen leave on raise and open for fullscreen-multiple test. r=smaug
Depends on D56391

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

--HG--
extra : moz-landing-system : lando
2019-12-16 21:23:50 +00:00
pbz
e03ecc2171 Bug 1432856 - Extended focus methods in Window.webidl, Client.webidl and Element.webidl to pass CallerType. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D55811

--HG--
extra : moz-landing-system : lando
2019-12-16 21:06:11 +00:00
Emilio Cobos Álvarez
ac506d6f4b Bug 1603889 - Simplify the scrollbar preference setup. r=smaug
So much plumbing to pass an enum down.

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

--HG--
extra : moz-landing-system : lando
2019-12-15 22:56:23 +00:00
Kris Maglione
0b1a146519 Bug 1596918: Part 4c - Fix callers which depend on document lifecycle changes. r=mccr8
ContentTask tasks have a different lifetime than SpecialPowers tasks, with the
former being tied to the lifetime of a message manager and the latter tied to
the lifetime of a window global. That means that existing ContentTask callers
which expect to be able to register load listeners before the creation of a
window global, or which expect to persist after a page has navigated, won't
work as SpecialPowers tasks.

Since those sorts of tasks are not really resilient in the face of Fission,
they should really be written to work differently, but this patch mostly just
reverts them to using ContentTask for the time being.

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

--HG--
extra : moz-landing-system : lando
2019-12-13 20:36:36 +00:00
Kris Maglione
9853440599 Bug 1596918: Part 3b - Run code formatters on files changed by previous patch. r=mccr8,remote-protocol-reviewers,ato
Differential Revision: https://phabricator.services.mozilla.com/D53741

--HG--
extra : moz-landing-system : lando
2019-12-13 20:36:24 +00:00
Kris Maglione
94e3b0bd8d Bug 1596918: Part 3a - Scripted rewrite of most ContentTask.spawn calls to SpecialPowers.spawn calls. r=mccr8,remote-protocol-reviewers,ato
This is generally pretty straightforward, and rewrites nearly all calls. It
skips the ones that it can detect using frame script globals like
`sendAsyncMessage`, though.

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

--HG--
extra : moz-landing-system : lando
2019-12-13 20:36:16 +00:00
Boris Zbarsky
ee1cc488f2 Bug 1602483 part 2. Add a window id argument to CheckLoadURIWithPrincipal. r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D56428

--HG--
rename : devtools/client/webconsole/test/browser/browser_webconsole_same_origin_errors.js => devtools/client/webconsole/test/browser/browser_webconsole_checkloaduri_errors.js
rename : devtools/client/webconsole/test/browser/test-same-origin-required-load.html => devtools/client/webconsole/test/browser/test-checkloaduri-failure.html
extra : moz-landing-system : lando
2019-12-12 16:41:19 +00:00
Emilio Cobos Álvarez
b498defa90 Bug 1603455 - Remove full-screen-api.unprefix.enabled. r=xidorn,smaug
It's been enabled since Firefox 64.

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

--HG--
extra : moz-landing-system : lando
2019-12-13 13:27:27 +00:00
Noemi Erli
2b5af87228 Backed out changeset d23f209ada8b (bug 1603455) for causing failures in test_fullscreen-api.html
--HG--
extra : rebase_source : 7b7990746d3884eeced2404ed9bc78590db4b77c
2019-12-12 23:49:35 +02:00
Emilio Cobos Álvarez
8d6730e227 Bug 1603455 - Remove full-screen-api.unprefix.enabled. r=xidorn,smaug
It's been enabled since Firefox 64.

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

--HG--
extra : moz-landing-system : lando
2019-12-12 19:56:10 +00:00
Henri Sivonen
5c2bad25ab Bug 1551276 - Autodetect legacy encodings on unlabeled pages. r=emk
Differential Revision: https://phabricator.services.mozilla.com/D56362

--HG--
extra : moz-landing-system : lando
2019-12-12 17:50:19 +00:00
Ciure Andrei
6c95adafed Backed out 4 changesets (bug 1602483, bug 1602090) for causing perma leackchecks CLOSED TREE
Backed out changeset 6b057ba06b4a (bug 1602483)
Backed out changeset 9be3269d781d (bug 1602483)
Backed out changeset e3e2c1d7478e (bug 1602090)
Backed out changeset fdc4a588912e (bug 1602090)
2019-12-12 18:37:01 +02:00
Oana Pop Rus
df78d6011c Backed out changeset 0810ad586986 (bug 1551276) for wpt failures in ar-ISO-8859-6-late.tentative.html on a CLOSED TREE 2019-12-12 16:38:54 +02:00
Boris Zbarsky
4425adb1cc Bug 1602483 part 2. Add a window id argument to CheckLoadURIWithPrincipal. r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D56428

--HG--
rename : devtools/client/webconsole/test/browser/browser_webconsole_same_origin_errors.js => devtools/client/webconsole/test/browser/browser_webconsole_checkloaduri_errors.js
rename : devtools/client/webconsole/test/browser/test-same-origin-required-load.html => devtools/client/webconsole/test/browser/test-checkloaduri-failure.html
extra : moz-landing-system : lando
2019-12-12 13:05:12 +00:00
Henri Sivonen
07527a83c9 Bug 1551276 - Autodetect legacy encodings on unlabeled pages. r=emk
Differential Revision: https://phabricator.services.mozilla.com/D56362

--HG--
extra : moz-landing-system : lando
2019-12-12 12:59:47 +00:00
Mark Banner
2103c3b16a Bug 1601681 - Switch recently added files with Windows line endings to Unix. r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D55990

--HG--
extra : moz-landing-system : lando
2019-12-11 08:12:49 +00:00
Alastor Wu
47d2457f3e Bug 1602163 - part2 : remove 'corruptedFrames' from 'VideoPlaybackQuality' r=bzbarsky
According to [1], we're going to deprecate this attribute.

[1] https://github.com/w3c/media-playback-quality/pull/20

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

--HG--
extra : moz-landing-system : lando
2019-12-11 07:19:15 +00:00
Masayuki Nakano
a2a7b27d8d Bug 1599971 - part 5: Mark TextControlState::UnbindFromFrame() as MOZ_CAN_RUN_SCRIPT r=m_kato,emilio
Note that `TextControlState::BindToFrame()` may also run script if it's
called without script blocker.  However, it shouldn't occur.  Therefore,
we don't need to mark it `MOZ_CAN_RUN_SCRIPT`, but we should check
script blocker existence with `MOZ_ASSERT`.

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

--HG--
extra : moz-landing-system : lando
2019-12-11 03:04:20 +00:00
Masayuki Nakano
c13f925d16 Bug 1599971 - part 4: Mark TextControlState::GetTextEditor() as MOZ_CAN_RUN_SCRIPT r=m_kato
If `PreareEditor()` returns `NS_OK`, but if the instance is deleted at returning
from it, `GetTextEditor()` will access `mTextEditor`.  Therefore, this patch
makes `PrepareEditor()` return error if the instance is destroyed at its end.

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

--HG--
extra : moz-landing-system : lando
2019-12-11 03:03:31 +00:00
Masayuki Nakano
0b75352ba4 Bug 1599971 - part 3: Mark nsITextControlFrame::SetSelectionRange() as MOZ_CAN_RUN_SCRIPT r=m_kato
Similar to the previous patch, it may notify selection listeners of native
anonymous tree in `<input>` and `<textarea>` element.

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

--HG--
extra : moz-landing-system : lando
2019-12-11 03:02:53 +00:00
Masayuki Nakano
f9203c9b66 Bug 1599971 - part 2: Mark TextControlState::DeleteOrCacheForReuse() and TextControlState::Reuse() as MOZ_CAN_RUN_SCRIPT r=m_kato
They are really complicated and can run script while the instance is being
destroyed.  Therefore, they should have their own `AutoTextControlHandlingState`
as "kungFuDeathGrip".

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

--HG--
extra : moz-landing-system : lando
2019-12-11 03:02:46 +00:00
Masayuki Nakano
a26ed4b301 Bug 1599971 - part 1: Mark constructors of AutoTextControlHandlingState as MOZ_CAN_RUN_SCRIPT r=m_kato
The destructor of `AutoTextControlHandlingState`is marked as
`MOZ_CAN_RUN_SCRIPT`, but it's not checked at build time.  And this does not
need to be created when the method does not run script.  Therefore, we should
mark its constructor as `MOZ_CAN_RUN_SCRIPT` instead since it's stack only
class so that its constructor and destructor are always called from same
method.

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

--HG--
extra : moz-landing-system : lando
2019-12-11 03:01:37 +00:00
shindli
91924fedc7 Backed out 9 changesets (bug 1596918) for causing mochitest permafailures in toolkit/content/tests/chrome/test_findbar_events.xhtml CLOSED TREE
Backed out changeset 45a1c42118f2 (bug 1596918)
Backed out changeset db09910ffa56 (bug 1596918)
Backed out changeset 5c9d9f141c10 (bug 1596918)
Backed out changeset 6a135670d603 (bug 1596918)
Backed out changeset 3a0184e0df72 (bug 1596918)
Backed out changeset 2f0036486823 (bug 1596918)
Backed out changeset a770c6d08d52 (bug 1596918)
Backed out changeset ef062eb7a6ee (bug 1596918)
Backed out changeset a6ea596e98db (bug 1596918)
2019-12-11 03:09:26 +02:00
Kris Maglione
356e59c6bc Bug 1596918: Part 4c - Fix callers which depend on document lifecycle changes. r=mccr8
ContentTask tasks have a different lifetime than SpecialPowers tasks, with the
former being tied to the lifetime of a message manager and the latter tied to
the lifetime of a window global. That means that existing ContentTask callers
which expect to be able to register load listeners before the creation of a
window global, or which expect to persist after a page has navigated, won't
work as SpecialPowers tasks.

Since those sorts of tasks are not really resilient in the face of Fission,
they should really be written to work differently, but this patch mostly just
reverts them to using ContentTask for the time being.

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

--HG--
extra : moz-landing-system : lando
2019-12-10 23:07:22 +00:00
Kris Maglione
3ca78ce8e3 Bug 1596918: Part 3b - Run code formatters on files changed by previous patch. r=mccr8,remote-protocol-reviewers,ato
Differential Revision: https://phabricator.services.mozilla.com/D53741

--HG--
extra : moz-landing-system : lando
2019-12-10 23:07:21 +00:00
Kris Maglione
16a9b29848 Bug 1596918: Part 3a - Scripted rewrite of most ContentTask.spawn calls to SpecialPowers.spawn calls. r=mccr8,remote-protocol-reviewers,ato
This is generally pretty straightforward, and rewrites nearly all calls. It
skips the ones that it can detect using frame script globals like
`sendAsyncMessage`, though.

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

--HG--
extra : moz-landing-system : lando
2019-12-10 23:07:13 +00:00
Emilio Cobos Álvarez
707ed5c818 Bug 1602421 - Remove some useless includes. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D56350

--HG--
extra : moz-landing-system : lando
2019-12-09 14:53:50 +00:00
Boris Zbarsky
4aa649053b Bug 1601377 part 2. Make it clear that nsContentUtils::PrincipalHasPermission never takes a null nsIPrincipal. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D56217

--HG--
extra : moz-landing-system : lando
2019-12-08 21:10:15 +00:00
Daniel Varga
6e13799734 Backed out changeset e65c1bcb013f (bug 1601475) for causing build bustage. On a CLOSED TREE 2019-12-09 12:51:07 +02:00
Tyler
103588ae45 Bug 1601475 - Remove ImageContentLoaded event and ImageDocumentLoaded message handling code across the tree r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D56051

--HG--
extra : moz-landing-system : lando
2019-12-09 10:18:25 +00:00
Noemi Erli
82d41a33b2 Backed out 9 changesets (bug 1596918) for causing multiple browser-chrome failures
Backed out changeset 415007efd8c9 (bug 1596918)
Backed out changeset 011eb5ce927b (bug 1596918)
Backed out changeset e5fd3ee22ea1 (bug 1596918)
Backed out changeset 0bca4de31d40 (bug 1596918)
Backed out changeset 11ec4393f23d (bug 1596918)
Backed out changeset c5404a7c286d (bug 1596918)
Backed out changeset 7e9304405a46 (bug 1596918)
Backed out changeset fa0f0aeabf99 (bug 1596918)
Backed out changeset de196b077000 (bug 1596918)
2019-12-07 22:26:43 +02:00
Kris Maglione
bd497b1a21 Bug 1596918: Part 4c - Fix callers which depend on document lifecycle changes. r=mccr8
ContentTask tasks have a different lifetime than SpecialPowers tasks, with the
former being tied to the lifetime of a message manager and the latter tied to
the lifetime of a window global. That means that existing ContentTask callers
which expect to be able to register load listeners before the creation of a
window global, or which expect to persist after a page has navigated, won't
work as SpecialPowers tasks.

Since those sorts of tasks are not really resilient in the face of Fission,
they should really be written to work differently, but this patch mostly just
reverts them to using ContentTask for the time being.

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

--HG--
extra : moz-landing-system : lando
2019-12-07 18:44:34 +00:00
Kris Maglione
fa3556c3fc Bug 1596918: Part 3b - Run code formatters on files changed by previous patch. r=mccr8,remote-protocol-reviewers,ato
Differential Revision: https://phabricator.services.mozilla.com/D53741

--HG--
extra : moz-landing-system : lando
2019-12-07 18:44:34 +00:00
Kris Maglione
910eab35d2 Bug 1596918: Part 3a - Scripted rewrite of most ContentTask.spawn calls to SpecialPowers.spawn calls. r=mccr8,remote-protocol-reviewers,ato
This is generally pretty straightforward, and rewrites nearly all calls. It
skips the ones that it can detect using frame script globals like
`sendAsyncMessage`, though.

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

--HG--
extra : moz-landing-system : lando
2019-12-07 19:11:58 +00:00
Daniel Varga
84a601a6d4 Backed out 17 changesets (bug 1596918) for multiple browser-chrome and dev-tools failures. On a CLOSED TREE
Backed out changeset ab87d2c1afae (bug 1596918)
Backed out changeset 775f3b06a687 (bug 1596918)
Backed out changeset 67cc63ef5d7f (bug 1596918)
Backed out changeset 7d290bcd2067 (bug 1596918)
Backed out changeset 048db9f4db7c (bug 1596918)
Backed out changeset 96a79d2ba614 (bug 1596918)
Backed out changeset be770d112dd8 (bug 1596918)
Backed out changeset 302c8ab8391c (bug 1596918)
Backed out changeset 44ef8f20732e (bug 1596918)
Backed out changeset 38c11ebfb8ff (bug 1596918)
Backed out changeset b586fc081374 (bug 1596918)
Backed out changeset 12283166716f (bug 1596918)
Backed out changeset 99b0421015d8 (bug 1596918)
Backed out changeset 97ec49dbbbf3 (bug 1596918)
Backed out changeset ec79478f58f1 (bug 1596918)
Backed out changeset c6d356833bb8 (bug 1596918)
Backed out changeset 5ef6026806c8 (bug 1596918)
2019-12-07 03:12:07 +02:00
Kris Maglione
73e3d8bcf6 Bug 1596918: Part 4c - Fix callers which depend on document lifecycle changes. r=mccr8
ContentTask tasks have a different lifetime than SpecialPowers tasks, with the
former being tied to the lifetime of a message manager and the latter tied to
the lifetime of a window global. That means that existing ContentTask callers
which expect to be able to register load listeners before the creation of a
window global, or which expect to persist after a page has navigated, won't
work as SpecialPowers tasks.

Since those sorts of tasks are not really resilient in the face of Fission,
they should really be written to work differently, but this patch mostly just
reverts them to using ContentTask for the time being.

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

--HG--
extra : moz-landing-system : lando
2019-12-06 22:15:25 +00:00
Kris Maglione
b5238224ba Bug 1596918: Part 3b - Run code formatters on files changed by previous patch. r=mccr8,remote-protocol-reviewers,ato
Differential Revision: https://phabricator.services.mozilla.com/D53741

--HG--
extra : moz-landing-system : lando
2019-12-06 22:14:22 +00:00
Kris Maglione
20da940e14 Bug 1596918: Part 3a - Scripted rewrite of most ContentTask.spawn calls to SpecialPowers.spawn calls. r=mccr8,remote-protocol-reviewers,ato
This is generally pretty straightforward, and rewrites nearly all calls. It
skips the ones that it can detect using frame script globals like
`sendAsyncMessage`, though.

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

--HG--
extra : moz-landing-system : lando
2019-12-06 22:14:14 +00:00
Gabriele Svelto
ace6d1063f Bug 1600545 - Remove useless inclusions of header files generated from IDL files in dom/ r=Ehsan
The inclusions were removed with the following very crude script and the
resulting breakage was fixed up by hand. The manual fixups did either
revert the changes done by the script, replace a generic header with a more
specific one or replace a header with a forward declaration.

find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
    interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
    if [ -n "$interfaces" ]; then
        if [[ "$interfaces" == *$'\n'* ]]; then
          regexp="\("
          for i in $interfaces; do regexp="$regexp$i\|"; done
          regexp="${regexp%%\\\|}\)"
        else
          regexp="$interfaces"
        fi
        interface=$(basename "$path")
        rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
            hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
            if [ $hits -eq 0 ]; then
                echo "Removing ${interface} from ${path2}"
                grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
                mv -f "$path2".tmp "$path2"
            fi
        done
    fi
done

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

--HG--
extra : moz-landing-system : lando
2019-12-06 09:24:56 +00:00
Marcos Cáceres
78f831bf6c Bug 1596040 - Teach HTMLLinkElement's relList about 'manifest' r=bzbarsky
Fenix wants to ship Web Manifest support, while other Firefox products (e.g., Desktop) don't support it.

With the pref enabled, developers can check, via `link.relList.supports()`, if manifest processing is supported by a particular product.

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

--HG--
extra : moz-landing-system : lando
2019-12-06 04:17:04 +00:00
Boris Zbarsky
75124bdd98 Bug 1517588. Use nsIPrincipal::IsSystemPrincipal instead of nsContentUtils::IsSystemPrincipal r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D53067

--HG--
extra : moz-landing-system : lando
2019-12-05 04:44:32 +00:00
Dorel Luca
a381d5c96d Backed out changeset f6e53d1c6518 (bug 1600545) for Android build bustage. CLOSED TREE 2019-12-04 17:32:27 +02:00
Gabriele Svelto
bc9290f767 Bug 1600545 - Remove useless inclusions of header files generated from IDL files in dom/ r=Ehsan
The inclusions were removed with the following very crude script and the
resulting breakage was fixed up by hand. The manual fixups did either
revert the changes done by the script, replace a generic header with a more
specific one or replace a header with a forward declaration.

find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
    interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
    if [ -n "$interfaces" ]; then
        if [[ "$interfaces" == *$'\n'* ]]; then
          regexp="\("
          for i in $interfaces; do regexp="$regexp$i\|"; done
          regexp="${regexp%%\\\|}\)"
        else
          regexp="$interfaces"
        fi
        interface=$(basename "$path")
        rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
            hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
            if [ $hits -eq 0 ]; then
                echo "Removing ${interface} from ${path2}"
                grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
                mv -f "$path2".tmp "$path2"
            fi
        done
    fi
done

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

--HG--
extra : moz-landing-system : lando
2019-12-04 15:01:19 +00:00
Ehsan Akhgari
d94f27a8d6 Bug 1595934 - Make nsICookieManager cookie enumerators return Array<nsICookie> instead of nsISimpleEnumerator; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D52761

--HG--
extra : moz-landing-system : lando
2019-12-03 17:08:25 +00:00
John Dai
9186958d1f Bug 1552301 - Implement form.requestSubmit(); r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D54278

--HG--
extra : moz-landing-system : lando
2019-12-03 10:13:41 +00:00
Thomas Nguyen
18482671c9 Bug 1595720 - Disable fullscreen in third party by default r=baku
Differential Revision: https://phabricator.services.mozilla.com/D54194

--HG--
extra : moz-landing-system : lando
2019-12-02 16:01:09 +00:00
Emilio Cobos Álvarez
e1918d8385 Bug 1600353 - Make TextTrackSource and TextTrackReadyState enum classes. r=bzbarsky
To avoid defining `Loading`, `Loaded`, etc. in the mozilla::dom namespace. Also
it is a bit cleaner and saves some memory in the TextTrack objects by specifying
the size to be smaller.

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

--HG--
extra : moz-landing-system : lando
2019-12-02 19:13:11 +00:00
Ciure Andrei
1b5b6af7bd Backed out 2 changesets (bug 1598470, bug 1595720) for causing browser_fullscreen_cross_origin.js to permafail CLOSED TREE
Backed out changeset 02fbe3085e54 (bug 1598470)
Backed out changeset 40f6133b6b61 (bug 1595720)
2019-12-02 12:55:37 +02:00
Thomas Nguyen
8962c61512 Bug 1595720 - Disable fullscreen in third party by default r=baku
Differential Revision: https://phabricator.services.mozilla.com/D54194

--HG--
extra : moz-landing-system : lando
2019-12-02 09:39:33 +00:00
Emilio Cobos Álvarez
3c12d374bc Bug 1600362 - Cleanup IntersectionObserver. r=smaug
Initially this was going to be a simple cleanup: Remove some useless namespaces
here and there and so on, remove `using` statements from the header and so on.

But unfortunately, DOMIntersectionObserver.h (which is included in Element.h,
unnecessarily) ended up exposing `Element` unnamespaced to a lot of code, so I
had to fix that.

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

--HG--
extra : moz-landing-system : lando
2019-11-29 20:39:36 +00:00
Emilio Cobos Álvarez
ec4d0f06f5 No bug - Minor ImageLoadTask cleanup.
Just removing unneeded virtual, and marking the class as final.

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

--HG--
extra : moz-landing-system : lando
2019-11-29 20:04:18 +00:00
Honza Bambas
ce072f8e6a Bug 1594449 - <link rel="preload"> implemented as a speculative load initiated during the prescan phase in the HTML5 parser, disabled by default, only supports "script" and "styles" types, r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D52019

--HG--
extra : moz-landing-system : lando
2019-11-27 21:45:12 +00:00
Emilio Cobos Álvarez
a6a78ce682 Bug 1599843 - Element::SetEventHandler is infallible. r=bzbarsky
Depends on D54996

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

--HG--
extra : moz-landing-system : lando
2019-11-27 20:01:38 +00:00
Sylvestre Ledru
8d2f0d1b1f Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-11-26 14:35:02 +00:00
Emilio Cobos Álvarez
0eb000c3ae Bug 1599161 - Rename nsLayoutStylesheetCache to GlobalStyleSheetCache. r=boris
It's a better name, and will avoid confusion when I add other stylesheet caches
outside of the CSS loader.

Depends on D54556

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

--HG--
rename : layout/style/nsLayoutStylesheetCache.cpp => layout/style/GlobalStyleSheetCache.cpp
rename : layout/style/nsLayoutStylesheetCache.h => layout/style/GlobalStyleSheetCache.h
extra : moz-landing-system : lando
2019-11-25 22:08:43 +00:00
alwu
92b6033d47 Bug 1593843 - part10 : ask for the play permission when creating media element. r=bryce
For media element, as the spec requires that we should know the whether it can be allowed to play when we call `media.play()` [1], which means that we should get the result before the play invocation.

Therefore, we request for the play permission when we create media element.

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

--HG--
extra : moz-landing-system : lando
2019-11-25 11:00:14 +00:00
alwu
54b8cc7893 Bug 1593843 - part8 : move helper functions out from 'AutoplayPolicy'. r=bryce
Move helper functions out from `AutoplayPolicy`, makes us clearly know which one could really be used to determine the blocking autoplay result. It also give other classes an ability to use those helper functions if they have a need.

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

--HG--
extra : moz-landing-system : lando
2019-11-25 11:00:13 +00:00
Masayuki Nakano
3f7057ece8 Bug 1597679 - part 3: Create methods to compare given string with values of TextControlState, nsTextControlFrame, HTMLInputElement and HTMLTextAreaElement r=smaug
For avoiding unnecessary copy of string buffer only for comparing setting
value and current value, especially with `nsAutoString`, this patch
creates `*Equals()` methods for every class.

And also this avoids to call `nsContentUtils::PlatformToDOMLineBreaks()` in
most paths.

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

--HG--
extra : moz-landing-system : lando
2019-11-25 06:35:17 +00:00
Masayuki Nakano
20699e2189 Bug 1597679 - part 2: Make nsITextControlElement inherit nsGenericHTMLFormElementWithState r=smaug
Sub classes of `nsITextControlElement` are only `HTMLInputElement` and
`HTMLTextAreaElement`. And both base class is
`nsGenericHTMLFormElementWithState`.  Therefore, we can make
`nsITextControlElement` inherit `nsGenericHTMLFormElementWithState` and
make `HTMLInputElement` and `HTMLTextAreaElement` inherit
`nsITextControlElement`.  Then, we can get rid of a lot of QI between
`nsINode`/`nsIContent`/`Element` and `nsITextControlElement` (and note that
some of them in a hot path).

Additionally, this patch renames `nsITextControlElement` to
`mozilla::TextControlElement`.

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

--HG--
rename : dom/html/nsITextControlElement.h => dom/html/TextControlElement.h
extra : moz-landing-system : lando
2019-11-25 06:35:15 +00:00
Masayuki Nakano
384ee1a2e7 Bug 1597679 - part 1: Cache multiple TextControlState instances for reuse r=Ehsan
Previously, we cache only one `TextControlState` instance to reuse.  However,
`HTMLTextAreaElement` also started to allocate it in the heap rather than
a part of its instance.  Therefore, we should have more room to cache the
instances for saving the allocation cost.

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

--HG--
extra : moz-landing-system : lando
2019-11-25 06:33:53 +00:00
Coroiu Cristina
84bf2b6d25 Backed out 3 changesets (bug 1597679) for Android debug build bustage at build/src/dom/base/nsContentAreaDragDrop.cpp
Backed out changeset 6a73b58e0db4 (bug 1597679)
Backed out changeset 90a172eff2de (bug 1597679)
Backed out changeset d4a156cf28ff (bug 1597679)

--HG--
rename : dom/html/TextControlElement.h => dom/html/nsITextControlElement.h
2019-11-24 09:02:53 +02:00
Masayuki Nakano
12437404e1 Bug 1597679 - part 3: Create methods to compare given string with values of TextControlState, nsTextControlFrame, HTMLInputElement and HTMLTextAreaElement r=smaug
For avoiding unnecessary copy of string buffer only for comparing setting
value and current value, especially with `nsAutoString`, this patch
creates `*Equals()` methods for every class.

And also this avoids to call `nsContentUtils::PlatformToDOMLineBreaks()` in
most paths.

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

--HG--
extra : moz-landing-system : lando
2019-11-24 05:38:16 +00:00
Masayuki Nakano
eea1784f2d Bug 1597679 - part 2: Make nsITextControlElement inherit nsGenericHTMLFormElementWithState r=smaug
Sub classes of `nsITextControlElement` are only `HTMLInputElement` and
`HTMLTextAreaElement`. And both base class is
`nsGenericHTMLFormElementWithState`.  Therefore, we can make
`nsITextControlElement` inherit `nsGenericHTMLFormElementWithState` and
make `HTMLInputElement` and `HTMLTextAreaElement` inherit
`nsITextControlElement`.  Then, we can get rid of a lot of QI between
`nsINode`/`nsIContent`/`Element` and `nsITextControlElement` (and note that
some of them in a hot path).

Additionally, this patch renames `nsITextControlElement` to
`mozilla::TextControlElement`.

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

--HG--
rename : dom/html/nsITextControlElement.h => dom/html/TextControlElement.h
extra : moz-landing-system : lando
2019-11-24 05:38:02 +00:00
Masayuki Nakano
efafd8cb17 Bug 1597679 - part 1: Cache multiple TextControlState instances for reuse r=Ehsan
Previously, we cache only one `TextControlState` instance to reuse.  However,
`HTMLTextAreaElement` also started to allocate it in the heap rather than
a part of its instance.  Therefore, we should have more room to cache the
instances for saving the allocation cost.

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

--HG--
extra : moz-landing-system : lando
2019-11-24 05:37:26 +00:00
Noemi Erli
23395b20e2 Backed out 13 changesets (bug 1593843) for bustages in Logging.h CLOSED TREE
Backed out changeset b6e3fa6363bd (bug 1593843)
Backed out changeset 3db512256b0d (bug 1593843)
Backed out changeset f67081ea84ee (bug 1593843)
Backed out changeset ad02bb934459 (bug 1593843)
Backed out changeset 1a79176d3f7b (bug 1593843)
Backed out changeset 486c8562b816 (bug 1593843)
Backed out changeset 0d4313c436c5 (bug 1593843)
Backed out changeset 0c7e831d11bf (bug 1593843)
Backed out changeset 02ac8c39f46d (bug 1593843)
Backed out changeset 80895462dddf (bug 1593843)
Backed out changeset 4ab855869725 (bug 1593843)
Backed out changeset 5a24fc933cd6 (bug 1593843)
Backed out changeset f1c50ee60a78 (bug 1593843)
2019-11-23 05:18:17 +02:00
alwu
6d90addd24 Bug 1593843 - part10 : ask for the play permission when creating media element. r=bryce
For media element, as the spec requires that we should know the whether it can be allowed to play when we call `media.play()` [1], which means that we should get the result before the play invocation.

Therefore, we request for the play permission when we create media element.

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

--HG--
extra : moz-landing-system : lando
2019-11-22 21:27:09 +00:00
alwu
f789ab1d90 Bug 1593843 - part8 : move helper functions out from 'AutoplayPolicy'. r=bryce
Move helper functions out from `AutoplayPolicy`, makes us clearly know which one could really be used to determine the blocking autoplay result. It also give other classes an ability to use those helper functions if they have a need.

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

--HG--
extra : moz-landing-system : lando
2019-11-22 09:17:35 +00:00
John Dai
0d5706ade7 Bug 1598684 - Click button element with button type should do nothing; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D54367

--HG--
extra : moz-landing-system : lando
2019-11-22 21:11:39 +00:00
Andreas Pehrson
3c385b4b80 Bug 1536156 - Stop doing EndCloningVisually in Unlink. r=mconley
Unlink must not cause an AddRef on the unlinked object, or it is at risk of
leaking. See 1593739 for an example of where this happens.

EndCloningVisually is dangerous in that it tries to do more than just unlink the
video element. It does AddRef in NotifyUAWidgetSetupOrChange, so that must be
avoided.

Previous patches to this bug make sure that MediaDecoder shutdown takes care of
clearing the secondary video container in the MediaDecoder stack, so this is not
actually necessary anymore.

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

--HG--
extra : moz-landing-system : lando
2019-11-22 12:52:48 +00:00
Andreas Pehrson
626de4fb8d Bug 1536156 - Let cloneElementVisually() return a promise that resolves when frames have been rendered. r=alwu,mconley,bzbarsky
This patch does the following:
- Makes cloneElementVisually() return a promise
- Plumbs an event from the MediaDecoderStateMachine's VideoSink to
  HTMLVideoElement
- Hooks the event up to resolve the promise from cloneElementVisually()
- Updates tests and their expectations.

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

--HG--
extra : moz-landing-system : lando
2019-11-22 12:52:48 +00:00
Andreas Pehrson
3c62bb84d8 Bug 1596777 - Hook up the SecondaryVideoContainer with state mirroring. r=alwu
This better follows how MediaDecoder and MediaDecoderStateMachine was
architected.

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

--HG--
extra : moz-landing-system : lando
2019-11-22 00:07:04 +00:00
Daniel Varga
f12c40c242 Backed out changeset afe80b4ff889 (bug 1595934) Requested by ehsan to see if it fixex bug 1597915. On a CLOSED TREE 2019-11-22 02:01:51 +02:00
Daniel Varga
af05b317ec Backed out 7 changesets (bug 1597216, bug 1596777, bug 1536156) for reftest failures at reftest/bipbop_300_215kbps.mp4.lastframe.htm. On a CLOSED TREE
Backed out changeset a3fa99d936f3 (bug 1536156)
Backed out changeset 29dd64930421 (bug 1536156)
Backed out changeset 77c16444e714 (bug 1536156)
Backed out changeset d540f1802ff6 (bug 1536156)
Backed out changeset 8283eed414d2 (bug 1536156)
Backed out changeset 01d2c84810f0 (bug 1597216)
Backed out changeset e0184916cf37 (bug 1596777)
2019-11-22 01:58:42 +02:00
Andreas Pehrson
531a7211a9 Bug 1536156 - Stop doing EndCloningVisually in Unlink. r=mconley
Unlink must not cause an AddRef on the unlinked object, or it is at risk of
leaking. See 1593739 for an example of where this happens.

EndCloningVisually is dangerous in that it tries to do more than just unlink the
video element. It does AddRef in NotifyUAWidgetSetupOrChange, so that must be
avoided.

Previous patches to this bug make sure that MediaDecoder shutdown takes care of
clearing the secondary video container in the MediaDecoder stack, so this is not
actually necessary anymore.

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

--HG--
extra : moz-landing-system : lando
2019-11-21 12:40:11 +00:00
Andreas Pehrson
1052205963 Bug 1536156 - Let cloneElementVisually() return a promise that resolves when frames have been rendered. r=alwu,mconley,bzbarsky
This patch does the following:
- Makes cloneElementVisually() return a promise
- Plumbs an event from the MediaDecoderStateMachine's VideoSink to
  HTMLVideoElement
- Hooks the event up to resolve the promise from cloneElementVisually()
- Updates tests and their expectations.

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

--HG--
extra : moz-landing-system : lando
2019-11-20 21:51:48 +00:00
Andreas Pehrson
9d878d1ca7 Bug 1596777 - Hook up the SecondaryVideoContainer with state mirroring. r=alwu
This better follows how MediaDecoder and MediaDecoderStateMachine was
architected.

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

--HG--
extra : moz-landing-system : lando
2019-11-20 16:32:52 +00:00
John Dai
fd9869d4f3 Bug 1551758 - Form submission reentrancy protection for 'submit' and 'invalid' event; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D53696

--HG--
extra : moz-landing-system : lando
2019-11-20 19:39:38 +00:00
John Dai
3c293b08a8 Bug 1551758 - Update spec link and comments for CheckValidFormSubmission and CheckFormValidity; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D53166

--HG--
extra : moz-landing-system : lando
2019-11-20 16:14:37 +00:00
John Dai
a7f881e5fc Bug 1551758 - Centralize form submission; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D53165

--HG--
extra : moz-landing-system : lando
2019-11-20 16:14:39 +00:00
Arthur Iakab
29a9345cd6 Backed out 3 changesets (bug 1551758) for causing wpt failures on form-submission-algorithm.html. CLOSED TREE
Backed out changeset 7f73f8d6d3b1 (bug 1551758)
Backed out changeset 295015e6e79b (bug 1551758)
Backed out changeset 6ffaf0da08d9 (bug 1551758)

--HG--
extra : rebase_source : d86d64bed9c089190125efdd4f63d06ea9e30c97
2019-11-20 18:05:34 +02:00
Andreas Pehrson
df720f22d1 Bug 1592289 - Implement mute/unmute events for media element capture. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D52818

--HG--
extra : moz-landing-system : lando
2019-11-20 15:24:34 +00:00
Andreas Pehrson
67229e8a27 Bug 1592287 - Remove ended captureStream tracks and fire "removetrack" on MediaStream. r=jib
Differential Revision: https://phabricator.services.mozilla.com/D52816

--HG--
extra : moz-landing-system : lando
2019-11-20 15:24:10 +00:00
John Dai
b99ae738cd Bug 1551758 - Form submission reentrancy protection for 'submit' and 'invalid' event; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D53696

--HG--
extra : moz-landing-system : lando
2019-11-19 17:02:40 +00:00
John Dai
375a7b3faf Bug 1551758 - Update spec link and comments for CheckValidFormSubmission and CheckFormValidity; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D53166

--HG--
extra : moz-landing-system : lando
2019-11-19 17:02:38 +00:00
John Dai
a9103e960f Bug 1551758 - Centralize form submission; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D53165

--HG--
extra : moz-landing-system : lando
2019-11-20 13:09:19 +00:00
Andreas Pehrson
ef3f8a0e39 Bug 1593739 - Create a dedicated Unlink path for mSrcStream. r=bryce
Unlink of mSrcStream used to rely on EndSrcMediaStreamPlayback to unhook
everything. That method does more than necessary however, and if anything in it
creates a strong reference to the media element, we risk a leak.

This patch takes what's necessary to unhook from EndSrcMediaStreamPlayback and
runs it explicitly from Unlink, to avoid anything unnecessary being run as well.

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

--HG--
extra : moz-landing-system : lando
2019-11-19 16:29:41 +00:00
Bogdan Tara
26742ff1c1 Backed out changeset 100092ccffcd (bug 1593739) for RefPtr mda perma-failures CLOSED TREE 2019-11-19 00:56:40 +02:00
Andreas Pehrson
daeeabf1da Bug 1593739 - Create a dedicated Unlink path for mSrcStream. r=bryce
Unlink of mSrcStream used to rely on EndSrcMediaStreamPlayback to unhook
everything. That method does more than necessary however, and if anything in it
creates a strong reference to the media element, we risk a leak.

This patch takes what's necessary to unhook from EndSrcMediaStreamPlayback and
runs it explicitly from Unlink, to avoid anything unnecessary being run as well.

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

--HG--
extra : moz-landing-system : lando
2019-11-18 16:44:46 +00:00
Ehsan Akhgari
30cf316b38 Bug 1595934 - Make nsICookieManager cookie enumerators return Array<nsICookie> instead of nsISimpleEnumerator; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D52761

--HG--
extra : moz-landing-system : lando
2019-11-17 07:21:14 +00:00
Noemi Erli
513f38c497 Backed out changeset 0f20566c7b2f (bug 1593739) for causing assertion in StateWatching.h CLOSED TREE 2019-11-15 14:07:06 +02:00
Andreas Pehrson
a91244fa43 Bug 1593739 - Shut down the watch manager during Unlink to prevent future notify tasks. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D51906

--HG--
extra : moz-landing-system : lando
2019-11-15 09:39:15 +00:00
Emilio Cobos Álvarez
de8886fe4f Bug 1596474 - Remove GetBindingParent from nsGenericHTMLElement. r=smaug
The two loops where they're used can't walk across shadow boundaries, so we only
need to check for NAC.

We don't have forms in NAC, so avoid silly book-keeping and just return early
for those cases.

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

--HG--
extra : moz-landing-system : lando
2019-11-14 17:16:01 +00:00
Andreas Pehrson
3f1d369bbf Bug 1302379 - Remove FinishedOnInactive hack from DOMMediaStream. r=jib
It is no longer needed with captured tracks' lifetimes spanning across seek
operations.

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

--HG--
extra : moz-landing-system : lando
2019-11-13 22:40:16 +00:00
Andreas Pehrson
8d201eb310 Bug 1172394 - Hinge UpdateReadyStateInternal off watchables instead of direct updates. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D52047

--HG--
extra : moz-landing-system : lando
2019-11-13 22:39:55 +00:00
Andreas Pehrson
30c47c82ac Bug 1172394 - Use tail dispatching instead of mSrcStreamTracksAvailable. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D52046

--HG--
extra : moz-landing-system : lando
2019-11-13 22:39:58 +00:00
Andreas Pehrson
7fac8df54d Bug 1172394 - Merge MediaStream and MediaDecoder track sources. r=padenot
This reworks how media element captureStream works by removing the differences
between MediaStream and MediaDecoder capture. MediaDecoder capture will be
refactored so that ownership of MediaStreamTracks lies with the media element
instead of the OutputStreamManager. The internal MediaDecoder parts happen in a
later patch.

The new API for capturing a MediaDecoder involves a boolean on/off toggle, the
output tracks the decoder pipes data to, and the principal that data is tagged
with. If capturing is on but there are no output tracks, playback will not
happen, to ensure that no data gets accidentally skipped in the output tracks
while captured.

This also changes the logic for setting up MediaElementTrackSources in
HTMLMediaElement so it's triggered by the WatchManager and thus run in tail
dispatched runnables.

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

--HG--
extra : moz-landing-system : lando
2019-11-13 22:40:09 +00:00
Andreas Pehrson
e324229af5 Bug 1172394 - Make dom::MediaTrack lifetime spec compliant. r=bryce
This makes us forget tracks at the right times. The spec also says no
removetrack events should be fired because of this, yet it seems to be something
other user agents do:
https://wpt.fyi/results/media-source/mediasource-avtracks.html

This is of low importance however, since MediaTracks are prefed off by default.

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

--HG--
extra : moz-landing-system : lando
2019-11-13 22:40:12 +00:00
Csoregi Natalia
6ba30843e8 Backed out 15 changesets (bug 1500049, bug 1172394, bug 1546756, bug 1302379) for failures on browser_disabledForMediaStreamVideos.js. CLOSED TREE
Backed out changeset 355f090421a6 (bug 1500049)
Backed out changeset 306341d0b586 (bug 1302379)
Backed out changeset 3ff0d72d23a2 (bug 1546756)
Backed out changeset a4f256e68cef (bug 1172394)
Backed out changeset d0aa43657e8c (bug 1172394)
Backed out changeset edff95b6f724 (bug 1172394)
Backed out changeset 94bd21d9b396 (bug 1172394)
Backed out changeset 7e7baa73e1ef (bug 1172394)
Backed out changeset c3bd415507e8 (bug 1172394)
Backed out changeset 1c45b135318d (bug 1172394)
Backed out changeset c57c41e8c39e (bug 1172394)
Backed out changeset a796541fe5ef (bug 1172394)
Backed out changeset 89ad0b553b0f (bug 1172394)
Backed out changeset 744fb77a5833 (bug 1172394)
Backed out changeset afb4b226ff04 (bug 1172394)
2019-11-14 00:32:51 +02:00
Andreas Pehrson
b59f1080f0 Bug 1302379 - Remove FinishedOnInactive hack from DOMMediaStream. r=jib
It is no longer needed with captured tracks' lifetimes spanning across seek
operations.

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

--HG--
extra : moz-landing-system : lando
2019-11-13 08:58:32 +00:00
Andreas Pehrson
af96d72e5f Bug 1172394 - Hinge UpdateReadyStateInternal off watchables instead of direct updates. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D52047

--HG--
extra : moz-landing-system : lando
2019-11-13 08:56:44 +00:00
Andreas Pehrson
8343246e20 Bug 1172394 - Use tail dispatching instead of mSrcStreamTracksAvailable. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D52046

--HG--
extra : moz-landing-system : lando
2019-11-13 08:56:31 +00:00
Andreas Pehrson
5b1bea60b3 Bug 1172394 - Merge MediaStream and MediaDecoder track sources. r=padenot
This reworks how media element captureStream works by removing the differences
between MediaStream and MediaDecoder capture. MediaDecoder capture will be
refactored so that ownership of MediaStreamTracks lies with the media element
instead of the OutputStreamManager. The internal MediaDecoder parts happen in a
later patch.

The new API for capturing a MediaDecoder involves a boolean on/off toggle, the
output tracks the decoder pipes data to, and the principal that data is tagged
with. If capturing is on but there are no output tracks, playback will not
happen, to ensure that no data gets accidentally skipped in the output tracks
while captured.

This also changes the logic for setting up MediaElementTrackSources in
HTMLMediaElement so it's triggered by the WatchManager and thus run in tail
dispatched runnables.

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

--HG--
extra : moz-landing-system : lando
2019-11-13 08:55:29 +00:00
Andreas Pehrson
ed705988de Bug 1172394 - Make dom::MediaTrack lifetime spec compliant. r=bryce
This makes us forget tracks at the right times. The spec also says no
removetrack events should be fired because of this, yet it seems to be something
other user agents do:
https://wpt.fyi/results/media-source/mediasource-avtracks.html

This is of low importance however, since MediaTracks are prefed off by default.

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

--HG--
extra : moz-landing-system : lando
2019-11-13 08:48:16 +00:00
Emilio Cobos Álvarez
019f75cee4 Bug 1595285 - Do not track TRANSITION_EMBED visits for link-coloring purposes. r=mak
Other browsers don't, plus it blocks work I want to do to query multiple links
at the same time.

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

--HG--
extra : moz-landing-system : lando
2019-11-13 16:36:09 +00:00
Narcis Beleuzu
a30e00cd9c Backed out changeset b73d74bcafda (bug 1595285) for multiple bc failures. CLOSED TREE 2019-11-13 18:31:41 +02:00
Emilio Cobos Álvarez
eafae9973a Bug 1595285 - Do not track TRANSITION_EMBED visits for link-coloring purposes. r=mak
Other browsers don't, plus it blocks work I want to do to query multiple links
at the same time.

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

--HG--
extra : moz-landing-system : lando
2019-11-12 05:06:36 +00:00
John Dai
de2c2a249a Bug 1552313 - Implement element.attachInternals; r=smaug,edgar
ElementInternals class is empty-for-now.

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

--HG--
extra : moz-landing-system : lando
2019-11-12 11:27:55 +00:00
Dorel Luca
be7de717dd Backed out changeset e19c5df398de (bug 1595285) for causing leaks on browser-chrome in toolkit/components/places/tests/browser/browser_bug461710.js. CLOSED TREE 2019-11-11 20:58:06 +02:00
Dorel Luca
cbf2994b14 Backed out 3 changesets (bug 1552313) for WPT failures in custom-elements/CustomElementRegistry.html. CLOSED TREE
Backed out changeset 27a01989152a (bug 1552313)
Backed out changeset 5f8c6c9f2d36 (bug 1552313)
Backed out changeset f26d61e06a9d (bug 1552313)
2019-11-11 20:55:58 +02:00
John Dai
d9933f32ad Bug 1552313 - Implement element.attachInternals; r=smaug,edgar
ElementInternals class is empty-for-now.

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

--HG--
extra : moz-landing-system : lando
2019-11-11 15:43:03 +00:00
Emilio Cobos Álvarez
87b2a95c52 Bug 1595285 - Do not track TRANSITION_EMBED visits for link-coloring purposes. r=mak
Other browsers don't, plus it blocks work I want to do to query multiple links
at the same time.

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

--HG--
extra : moz-landing-system : lando
2019-11-11 13:28:52 +00:00
Bogdan Tara
80377e90ee Backed out 6 changesets (bug 1552176) for causing Hazard bustages CLOSED TREE
Backed out changeset c79b90bae420 (bug 1552176)
Backed out changeset 4b970cc771ca (bug 1552176)
Backed out changeset de7aa0eaf4c8 (bug 1552176)
Backed out changeset c8e692a40cd3 (bug 1552176)
Backed out changeset 68882d1eccac (bug 1552176)
Backed out changeset 692e5e51e19e (bug 1552176)
2019-11-11 12:11:36 +02:00
Valentin Gosu
60297f04a5 Bug 1552176 - pass TRRMode into nsHTMLDNSPrefetch methods r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D49159

--HG--
extra : moz-landing-system : lando
2019-11-10 17:12:19 +00:00
Bogdan Tara
8f38f4a3fb Backed out 6 changesets (bug 1552176) for bustages complaining about ServiceWorkerManager.cpp CLOSED TREE
Backed out changeset bff9110e434e (bug 1552176)
Backed out changeset ac8f8a6dbd98 (bug 1552176)
Backed out changeset 8dd630e7534a (bug 1552176)
Backed out changeset 7ce9e220cdb9 (bug 1552176)
Backed out changeset ee9911acfcd4 (bug 1552176)
Backed out changeset 652b3bd6848d (bug 1552176)
2019-11-08 22:18:05 +02:00
Valentin Gosu
4354a83c3d Bug 1552176 - pass TRRMode into nsHTMLDNSPrefetch methods r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D49159

--HG--
extra : moz-landing-system : lando
2019-11-08 17:13:47 +00:00
Matt Woodrow
2704b7ceff Bug 1593560 - Adjust tests to wait for data uri to load properly, since it now includes an extra IPDL roundtrip. r=kmag,ochameau
Differential Revision: https://phabricator.services.mozilla.com/D51548

--HG--
extra : moz-landing-system : lando
2019-11-06 22:37:07 +00:00
Brian Grinstead
d981495450 Bug 1593119 - Remove dom/xbl and the MOZ_XBL build option r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D51338

--HG--
extra : moz-landing-system : lando
2019-11-07 00:35:32 +00:00
Coroiu Cristina
cbdbc8bc4b Backed out 7 changesets (bug 1593560) for crashtest failures at tests/layout/base/crashtests/446328.html on a CLOSED TREE
Backed out changeset 7dfae085a4cb (bug 1593560)
Backed out changeset 9842c80c98d8 (bug 1593560)
Backed out changeset d67a10437af7 (bug 1593560)
Backed out changeset 3e3948e9531c (bug 1593560)
Backed out changeset a7d04e276b44 (bug 1593560)
Backed out changeset 9f52c9f6dc54 (bug 1593560)
Backed out changeset 90572c49d464 (bug 1593560)
2019-11-07 00:32:53 +02:00
Matt Woodrow
52d6e76c02 Bug 1593560 - Adjust tests to wait for data uri to load properly, since it now includes an extra IPDL roundtrip. r=kmag,ochameau
Differential Revision: https://phabricator.services.mozilla.com/D51548

--HG--
extra : moz-landing-system : lando
2019-11-06 18:22:17 +00:00
Andreas Pehrson
ac4828baba Bug 1588840 - Make ended return true after reaching the event loop's step 1 when playing a MediaStream. r=jib
This is especially important for media elements playing MediaStreams, since the
streams can be manipulated to end playback of the elements synchronously by
either stopping or removing their tracks.

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

--HG--
extra : moz-landing-system : lando
2019-11-06 13:06:44 +00:00
Mirko Brodesser
b2de103bf9 Bug 1593222: part 12) Rename "nsNodeUtils.*" to "MutationObservers.*". r=smaug
Depends on D51827

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

--HG--
rename : dom/base/nsNodeUtils.cpp => dom/base/MutationObservers.cpp
rename : dom/base/nsNodeUtils.h => dom/base/MutationObservers.h
extra : moz-landing-system : lando
2019-11-06 09:08:06 +00:00
Mirko Brodesser
ba0285f534 Bug 1593222: part 9) Move non-animation notification methods from nsNodeUtils to MutationObservers. r=smaug
The remaining notification methods are moved in a separate commit. The
files are renamed to `MutationObservers.*` in a follow-up commit.

Depends on D51824

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

--HG--
extra : moz-landing-system : lando
2019-11-05 21:32:53 +00:00
Alex Catarineu
08a431f34e Bug 1581537 - Avoid several browser language leaks r=smaug
Spoof dom/dom.properties, layout/xmlparser.properties,
layout/MediaDocument.properties to en-US if needed.

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

--HG--
extra : moz-landing-system : lando
2019-11-04 16:56:27 +00:00
Mihai Alexandru Michis
d19c1272ca Backed out changeset 1d87c269da8a (bug 1581537) for causing bc failures in browser_misused_characters_in_strings.js CLOSED TREE
--HG--
extra : rebase_source : b9f2da6650a4213a4a9284d6dbe7ecfd97761501
extra : amend_source : b7ca833a091419a2de5904eccb2d3ce9d0fcd337
2019-11-04 16:06:37 +02:00
Andreas Pehrson
9a95077157 Bug 1577505 - Progress currentTime for a MediaStream only while potentially playing. r=jib
It started progressing as soon as we set up the rendering of the tracks in the
stream, which is too early according to the HTMLMediaElement spec.

Now it starts progressing when we're potentially playing. The difference being
that we now wait for mReadyState to go beyond HAVE_CURRENT_DATA before hooking
up the time progression mechanism.

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

--HG--
extra : moz-landing-system : lando
2019-11-04 13:43:01 +00:00
Andreas Pehrson
0685c0e901 Bug 1577505 - Make mSrcStreamPlaybackEnded and mReadyState watchable. r=jib
This makes all inputs to IsPotentiallyPlayin() Watchable when we're playing a
MediaStream.

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

--HG--
extra : moz-landing-system : lando
2019-11-04 13:42:58 +00:00
Andreas Pehrson
aa162c3e88 Bug 1577505 - Rename UpdateSrcTrackTime back to UpdateSrcStreamTime. r=jib
It was incorrectly included in the renaming part of bug 1454998.

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

--HG--
extra : moz-landing-system : lando
2019-11-04 13:42:56 +00:00
Alex Catarineu
ea206b140d Bug 1581537 - Avoid several browser language leaks r=smaug
Spoof dom/dom.properties, layout/xmlparser.properties,
layout/MediaDocument.properties to en-US if needed.

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

--HG--
extra : moz-landing-system : lando
2019-11-04 11:27:59 +00:00
Masayuki Nakano
345f0e69ba Bug 1588745 - part 7: Remove AutoScriptBlocker from TextControlState::SetValue() r=Ehsan
For allowing `TextEditor` to dispatch DOM events synchronously, we should
remove `AutoScriptBlocker` in `TextControlState::SetValue()` right now.

According to the comment around the `AutoScriptBlocker`, `PrepareEditor()`
may be called while setting value.  Therefore, this patch makes
`AutoTextControlHandlingState` call it if `PrepareEditor()` is called
while handling `SetValue()` and when the top most `SetValue()` ends its job.

Depends on D51396

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

--HG--
extra : moz-landing-system : lando
2019-11-01 21:10:17 +00:00
Masayuki Nakano
129b58687c Bug 1588745 - part 6: Post processing of setting value with TextEditor should be done before dispatching "input" event r=Ehsan
Currently, "input" event is fired when the `AutoScriptBlocker` in `SetValue()`
is deleted.  So, for keeping same behavior, the post processing after calling
`TextEditor` methods should be done before editor dispatches "input" event.

Fortunately, `TextInputListener::OnEditActionHandled()` is a good chance to
do that.  Therefore, this patch makes it notify `TextControlState` and
`AutoTextControlHandlingState`.

Note that ideally, each method of `TextEditor` should return
`NS_ERROR_OUT_OF_MEMORY` coming from
`AutoTextControlHandlingState::OnEditActionHandled()`.  However, it requires
a lot of changes in editor classes, and the case is really rare since editor
does not use fallible allocation.  Therefore, it must be okay to crash in
editor if `OnEditActionHandled()` returns `NS_ERROR_OUT_OF_MEMORY`.

Depends on D51395

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

--HG--
extra : moz-landing-system : lando
2019-11-03 02:50:00 +00:00
Masayuki Nakano
4ea46b632e Bug 1588745 - part 5: Split TextControlState::SetValue() r=Ehsan
`TextControlState::SetValue()` does 4 things.
1. Committing composition if there is and if possible.
2. Setting value with `TextEditor` if text editor and frame are available.
3. Setting value without `TextEditor` otherwise.
4. Notifying value changed.

We can split #2 and #3 from it now because `AutoTextControlHandlingState`
manages nested actions.  Therefore, this patch creates
`SetValueWithTextEditor()` and `SetValueWithoutTextEditor()` which take
`AutoTextControlHandlingState`.

Depends on D51394

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

--HG--
extra : moz-landing-system : lando
2019-11-02 23:23:54 +00:00
Masayuki Nakano
3b61d80b0e Bug 1588745 - part 4: Make TextControlState reuse its instance by itself r=Ehsan
Currently, only `HTMLInputElement` reuses `TextControlState` instance since
`HTMLTextAreaElement` had the instance as a member rather than allocate it.

Now, all instances are allocated in the heap independently for guaranteeing
their lifetime.  So, the reuse mechanism should be managed by
`TextControlState` itself.

Depends on D51393

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

--HG--
extra : moz-landing-system : lando
2019-11-01 20:51:48 +00:00
Masayuki Nakano
f3bf8ed506 Bug 1588745 - part 3: Make TextControlState not deleted actually while it handles something r=Ehsan
Currently, nobody guarantees that `TextControlState` won't be deleted while
it handles something with `MOZ_CAN_RUN_SCRIPT` methods.

This patch hides its destructor (and constructor) for making only
`TextControlState` itself can delete its instances.  Then, if instance owner
wants to delete it while handling action(s), the oldest `AutoHandlingState`
will delete the `TextControlState`.

Depends on D51392

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

--HG--
extra : moz-landing-system : lando
2019-11-01 20:49:12 +00:00
Masayuki Nakano
e2c6cf597d Bug 1588745 - part 2: Move some TextControlState members to stack only class r=Ehsan
Some members of `TextControlState` are initialized and restored in same block
scopes.  Therefore, with creating new stack only class and storing latest one
with a new member variable, we can store all of them in the stack.

Depends on D51391

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

--HG--
extra : moz-landing-system : lando
2019-11-01 20:47:35 +00:00
Masayuki Nakano
91b4aa6851 Bug 1588745 - part 1: Rename nsTextEditorState to mozilla::TextControlState r=Ehsan
It should be in `mozilla` namespace and it manages not only `TextEditor`,
manages selection, selection controller and callback from editor. so that
I think it stores state of "text control widget". Therefore, I name it to
`TextControlState`.

And cleaning up the cpp file.

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

--HG--
rename : dom/html/nsTextEditorState.cpp => dom/html/TextControlState.cpp
rename : dom/html/nsTextEditorState.h => dom/html/TextControlState.h
extra : moz-landing-system : lando
2019-11-01 20:43:11 +00:00
Noemi Erli
853acdf360 Backed out 5 changesets (bug 1552176) for causing multiple build bustages CLOSED TREE
Backed out changeset 203060e4af95 (bug 1552176)
Backed out changeset b52f0ff800c8 (bug 1552176)
Backed out changeset 9f8d159fe252 (bug 1552176)
Backed out changeset 751b518e08fa (bug 1552176)
Backed out changeset a11ffd474c0c (bug 1552176)
2019-11-02 23:20:28 +02:00
Valentin Gosu
27377bc488 Bug 1552176 - pass TRRMode into nsHTMLDNSPrefetch methods r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D49159

--HG--
extra : moz-landing-system : lando
2019-11-02 20:43:30 +00:00
Edgar Chen
acd2114113 Bug 1580491 - Use Element::HasNonEmptyAttr in various places; r=bzbarsky
This was done by reviewing the results of
https://searchfox.org/mozilla-central/search?q=%2F*GetAttr%5C(.%2B(%26%26%7C%5C%7C%5C%7C)&case=true&regexp=true
one by one and replacing them with Element::HasNonEmptyAttr if possible.

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

--HG--
extra : moz-landing-system : lando
2019-11-01 15:24:25 +00:00
Edwin Takahashi
c0f93ea425 Bug 1591641 - annotate select-load.html with fuzzy-if condition for Android r=gbrown
Changes:
- annotate select-load.html test with `fuzzy-if(Android)`

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

--HG--
extra : moz-landing-system : lando
2019-10-30 21:25:22 +00:00
Daosheng Mu
21480b57c1 Bug 1565268 - Recovering VRDisplay status after VRService is shutdown. r=kip,jgilbert
When JS is paused, VRService will automatically shutdown because the timer is not updated,
we used to create a new VRDisplay to JS. However, the page is still using the older VRDisplay,
so it can't get the newest VRDisplayInfo status. We should exit presentation and
apply the VRDisplayInfo status to the original VRDisplay instead of creating new one.

Besides, we also need to release the VR screen buffer after exiting the immersive mode to avoid eglMakeCurrent error.

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

--HG--
extra : moz-landing-system : lando
2019-10-29 00:35:35 +00:00
John Dai
3a77b15ccb Bug 1589027 - Fix object.tabIndex should return 0 by default; r=smaug
The spec change HTMLObjectElement tabIndex default to 0, but `test_object_plugin_nav.html` will fail due to HTMLObjectElement’s sequence focus and .focus() rely on default tabIndex. In this patch I separate the logic to not rely on default tabIndex for HTMLObjectElement's plugin type and align the spec.

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

--HG--
extra : moz-landing-system : lando
2019-10-28 15:50:59 +00:00
Masayuki Nakano
a434f646f8 Bug 1577058 - part 2: Make nsFrameSelection::CommonPageMove() handle nsFrameSelection::ScrollSelectionIntoView() too r=smaug
Currently, `nsFrameSelection::CommonPageMove()` is called before every caller
calls `nsFrameSelection::ScrollSelectionIntoView()`.  However, when an editing
host has focus, the scroll target may be outside of it.  In such case, without
moving caret, user may want only to scroll the scrollable element.

Chrome behaves like so.  Chrome also can scroll outside scrollable element
of focused editing host.  However, it scrolls caret into view only when
caret is moved actually.  Therefore, it makes sense to follow this behavior.

This patch makes `nsFrameSelection::CommonPageMove()` also call
`nsFrameSelection::ScrollSelectionIntoView()`.  However, it newly takes
`SelectionIntoView` flag for making callers can choose the condition.  I.e.,
`ScrollSelectionIntoView()` should be called always, or only when selection
is actually changed, or shouldn't be called.

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

--HG--
extra : moz-landing-system : lando
2019-10-28 10:03:37 +00:00
Cosmin Sabou
3c54e28fc8 Backed out 2 changesets (bug 1577058) for causing bug 1541915 to nearly permafail.
Backed out changeset c556c5228132 (bug 1577058)
Backed out changeset d00a7e091efd (bug 1577058)
2019-10-27 17:38:58 +02:00
Masayuki Nakano
7a894386f2 Bug 1577058 - part 2: Make nsFrameSelection::CommonPageMove() handle nsFrameSelection::ScrollSelectionIntoView() too r=smaug
Currently, `nsFrameSelection::CommonPageMove()` is called before every caller
calls `nsFrameSelection::ScrollSelectionIntoView()`.  However, when an editing
host has focus, the scroll target may be outside of it.  In such case, without
moving caret, user may want only to scroll the scrollable element.

Chrome behaves like so.  Chrome also can scroll outside scrollable element
of focused editing host.  However, it scrolls caret into view only when
caret is moved actually.  Therefore, it makes sense to follow this behavior.

This patch makes `nsFrameSelection::CommonPageMove()` also call
`nsFrameSelection::ScrollSelectionIntoView()`.  However, it newly takes
`SelectionIntoView` flag for making callers can choose the condition.  I.e.,
`ScrollSelectionIntoView()` should be called always, or only when selection
is actually changed, or shouldn't be called.

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

--HG--
extra : moz-landing-system : lando
2019-10-27 01:44:55 +00:00
Jeff Walden
3e64c882fe Bug 1591655 - Remove the unnecessary |proto| argument from |JS::NewPromiseObject| and its callers, seeing as all callers pass |nullptr| (and therefore uniformly request the default prototype). r=jandem,bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D50695

--HG--
extra : moz-landing-system : lando
2019-10-26 08:14:05 +00:00
Brian Grinstead
ec30cc58df Bug 1587142 - Remove most XBL tests in dom/ r=bzbarsky
The following tests are not removed and need to be ported to Shadow DOM:
- test_bug330925.xhtml
- test_bug372086.html
- test_bug319374.xhtml

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

--HG--
extra : moz-landing-system : lando
2019-10-25 22:38:08 +00:00
Edwin Takahashi
a5bb04283f Bug 1591257 - remove skiaContent fuzzy condition from dom/html/reftests/autofocus/reftest.list r=gbrown
Changes:
- remove skiaContent from `dom/html/reftests/autofocus/reftest.list`

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

--HG--
extra : moz-landing-system : lando
2019-10-25 20:19:41 +00:00
alwu
11341ad999 Bug 1590579 - part2 : update controller's audible state when it starts. r=chunmin
Everytime when we start a controller, we should also update its audible state correctly, in order to request audio focus correctly.

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

--HG--
extra : moz-landing-system : lando
2019-10-24 20:18:47 +00:00
Matthew Noorenberghe
19fc89710d Bug 1583957 - Indicate support for autocomplete=(username|new-password|current-password). r=farre
Bug 917325 started using the `username` token.
Bug 1119063 started using the `new-password` token. This patch also adds support for `current-password` since it's the counterpart to `new-password` and we plan to use it as a signal eventually so want to encourage its use.

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

--HG--
extra : moz-landing-system : lando
2019-10-24 12:45:24 +00:00
Rob Wu
9502c5460b Bug 1590417 - Remove unused HTMLMediaElement::GetTopLevelPrincipal r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D50069

--HG--
extra : moz-landing-system : lando
2019-10-23 18:13:40 +00:00
Thomas Nguyen
cf2f2ec008 Bug 1580462 - Store iframe's FeaturePolicy in browsingContext to inherit cross origin document. r=baku,farre
Differential Revision: https://phabricator.services.mozilla.com/D48825

--HG--
extra : moz-landing-system : lando
2019-10-23 19:39:00 +00:00
Razvan Maries
7fb625f8cf Backed out changeset ae33b9c001e5 (bug 1580462) for build bustages on nsWindow.cpp. CLOSED TREE 2019-10-23 11:07:00 +03:00
Thomas Nguyen
a220530f6b Bug 1580462 - Store iframe's FeaturePolicy in browsingContext to inherit cross origin document. r=baku,farre
Differential Revision: https://phabricator.services.mozilla.com/D48825

--HG--
extra : moz-landing-system : lando
2019-10-22 14:36:00 +00:00
Emilio Cobos Álvarez
602ba56e1f Bug 1590366 - Remove accessibility.heading-element-level-changes.enabled. r=MarcoZ
Well that was short :D

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

--HG--
extra : moz-landing-system : lando
2019-10-22 13:51:41 +00:00
Andrea Marchesini
410cb724a7 Bug 1585284 - Force global in Blob CTOR, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D49629

--HG--
extra : moz-landing-system : lando
2019-10-21 05:33:19 +00:00
Andrea Marchesini
6797e45278 Bug 1585284 - Use nsIGlobalObject in any Blob/File CTOR, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D49392

--HG--
extra : moz-landing-system : lando
2019-10-21 05:33:33 +00:00
Geoff Brown
32490358c2 Bug 1585119 - Re-enable many more mochitests on Android; r=geckoview-reviewers,snorp
Most of these tests have been disabled for a long time; they run well
in the current test environment.
I intend to enable still more mochitests in a future patch.

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

--HG--
extra : moz-landing-system : lando
2019-10-18 14:35:20 +00:00
Masayuki Nakano
023906f104 Bug 1584963 - Make nsTextEditorState not manage TextInputListener by itself when chrome script emulates user input r=m_kato
When `nsTextEditorState::SetValue()` is called with `eSetValue_BySetUserInput`,
we emulate user input.  I.e., keep using transaction manager of the editor,
events fired while handling user input should be fired.

Currently, `nsTextEditorState::SetValue()` suppresses multiple state handling
while setting value with calling `mTextListener->SettingValue(true)`.  This
is why `"input"` event listeners cannot retrieve the latest state of validation
if `inputType` is `"insertReplacementText"`.

This patch makes it keep managing `mTextListener` when setting the value
programatically.   Otherwise, i.e., it emulates user input, editor should
manage it from `EditorBase::NotifyEditorObservers()` instead so that this
patch makes it not managing `mTextListener` in such case.

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

--HG--
extra : moz-landing-system : lando
2019-10-18 09:18:40 +00:00
Ryan VanderMeulen
1cb9560b83 Bug 1587622 - Use MOZ_ASSERT_UNREACHABLE() instead of double-conversion's UNREACHABLE() in DOM media code. r=karlt
Differential Revision: https://phabricator.services.mozilla.com/D48880

--HG--
extra : moz-landing-system : lando
2019-10-18 01:49:06 +00:00
Andreas Pehrson
ace14cf90c Bug 1587248 - Adequately guard mMediaStreamRenderer usage. r=bryce
It can be unset by NotifyShutdown, to release the VideoFrameContainer in time.
This is unexpected for all paths assuming it will be unset by
EndSrcMediaStreamPlayback().

Depends on D49573

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

--HG--
extra : moz-landing-system : lando
2019-10-17 18:31:22 +00:00
Andreas Pehrson
fe804f1c14 Bug 1587248 - Remove unnecessary legacy window guard. r=bryce
Depends on D49572

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

--HG--
extra : moz-landing-system : lando
2019-10-17 18:25:26 +00:00
Emilio Cobos Álvarez
441f9a401b Bug 998590 - Prototype accessibility level changes for headings behind a pref. r=MarcoZ
I don't think these need invalidation of any sort since they only depend on
ancestors, and we recreate accessibles when the element's ancestor chain changes.

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

--HG--
extra : moz-landing-system : lando
2019-10-16 12:31:21 +00:00
Emilio Cobos Álvarez
5ffa02e5a8 Bug 998590 - Factor out heading accessibility level into HTMLHeadingElement. r=MarcoZ
Differential Revision: https://phabricator.services.mozilla.com/D49407

--HG--
extra : moz-landing-system : lando
2019-10-16 12:32:10 +00:00
Emilio Cobos Álvarez
2ec3bb2b4f Bug 998590 - Cleanup HTMLHeadingElement, and add HTMLHeadingElement::FromNode. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D49406

--HG--
extra : moz-landing-system : lando
2019-10-16 14:25:05 +00:00
Geoff Brown
c906073cd5 Bug 1585119 - Re-enable many mochitests on android; r=geckoview-reviewers,snorp
Most of these tests have been disabled for a long time; they run well
in the current test environment.
With the additional tests running, task times increase; I have added one
more test chunk for android mochitest-plain.
These tests were identified from a random sampling of mochitest manifests;
I intend to enable more mochitests in future patches.

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

--HG--
extra : moz-landing-system : lando
2019-10-15 15:07:09 +00:00
Emilio Cobos Álvarez
9eb8be65f7 Bug 1576714 - Don't update scrollbar visibility for non-top-level remote browsers. r=nika
This flag is only meant for window.open() stuff, so not relevant to iframes at
all.

This preserves the current fission behavior (which is quite broken) of always
showing scrollbars.

The way to control scrollbars for iframes (the scrolling attribute) is not
handled at all for Fission, I filed a bug and left a few FIXMEs.

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

--HG--
extra : moz-landing-system : lando
2019-10-15 14:32:18 +00:00