Граф коммитов

4148 Коммитов

Автор SHA1 Сообщение Дата
Masayuki Nakano 47ef72825f Bug 1466208 - part 29: Create PresShell::EventHandler::ComputeFocusedEventTargetElement() r=smaug
Most remaining code in `PresShell::EventHandler::HandleEvent()` is what computes
event target of the event which should be handled on focused content.  This
patch moves the part to the new method.

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

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

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

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

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

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

--HG--
extra : moz-landing-system : lando
2019-03-01 22:36:40 +00:00
Mike Conley 2272f57c08 Bug 1521964 - Add clone target and source members to HTMLMediaElement and setters on HTMLVideoElement. r=jya,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D20021

--HG--
extra : moz-landing-system : lando
2019-03-01 22:36:17 +00:00
Marcos Cáceres fb14c1d8fb Bug 1531605 - css animation events must fire even if an element is disabled. r=smaug
Same as transitions.

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

--HG--
extra : moz-landing-system : lando
2019-03-01 09:00:17 +00:00
Gurzau Raul 6b94d177d1 Merge mozilla-central to inbound. a=merge CLOSED TREE 2019-03-01 09:28:28 +02:00
Mike Conley ca728851ca Bug 1530862 - Add an Init() method to HTMLMediaElement to be called right after construction to do any AddRef / Release-ing. r=jya,mccr8,smaug
Differential Revision: https://phabricator.services.mozilla.com/D21400

--HG--
extra : moz-landing-system : lando
2019-02-28 19:02:55 +00:00
Ehsan Akhgari 5acea8e4bf Bug 1529616 - Add an assertion on mBoundFrame right before dereferencing it inside nsTextEditorState::SetSelectionRange in the hopes of convincing Coverity that there are no bugs here to be found; r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D21438

--HG--
extra : moz-landing-system : lando
2019-02-28 18:40:34 +00:00
Marcos Cáceres 7efbbb9563 Bug 1530239 - css transition events must fire even if an element is disabled. r=smaug
CSS Transitions were not firing when elements were disabled.

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

--HG--
extra : moz-landing-system : lando
2019-02-28 13:54:59 +00:00
Ciure Andrei 14dcb83669 Backed out changeset 28bc841f06fc (bug 1530862) for failing HTMLMediaElement CLOSED TREE 2019-02-28 07:52:37 +02:00
Mike Conley 55a5944b50 Bug 1530862 - Add an Init() method to HTMLMediaElement to be called right after construction to do any AddRef / Release-ing. r=jya,mccr8,smaug
Differential Revision: https://phabricator.services.mozilla.com/D21400

--HG--
extra : moz-landing-system : lando
2019-02-27 23:40:00 +00:00
Boris Zbarsky 9c5da5f234 Bug 1489308 part 9. Remove now-unused wyciwyg bits. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D17327

--HG--
rename : dom/html/test/browser_refresh_wyciwyg_url.js => dom/html/test/browser_refresh_after_document_write.js
rename : dom/html/test/file_refresh_wyciwyg_url.html => dom/html/test/file_refresh_after_document_write.html
extra : moz-landing-system : lando
2019-02-28 01:09:48 +00:00
Boris Zbarsky a76f119a04 Bug 1489308 part 8. Remove unneeded JSContext args on open/write/writeln. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D17326

--HG--
extra : moz-landing-system : lando
2019-02-27 05:12:13 +00:00
Boris Zbarsky 972f13c7f0 Bug 1489308 part 7. Remove now-unused mDidDocumentOpen member. r=mccr8
This was only used to check for cases when document.open changed the global and
hence elements being inserted into the document need a new reflector.  Since
document.open no longer changes the global (as of part 5 of the patches for
this bug), this code is no longer needed.

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

--HG--
extra : moz-landing-system : lando
2019-02-27 05:11:19 +00:00
Boris Zbarsky 2e5c884144 Bug 1489308 part 5. Align the work we do on document.open with the spec. r=mccr8,smaug
The main behavior changes are:

1) We no longer create a new Window when doing document.open().  We use the
same Window but remove all the event listeners on it and on the existing DOM
tree before removing the document's existing kids.

2) We no longer create a new session history entry.  The existing one always
gets replaced instead.

3) We now support document.open on documents that are not in a Window.

The reasons for the various test changes are as follows:

The change to browser_modifiedclick_inherit_principal.js is because we no
longer set the docshell to a wyciwyg URL when document.open() happens and the
test was depending on that to terminate.

browser_wyciwyg_urlbarCopying.js is being removed because it's trying to test
wyciwyg URIs, which no longer exist.

The changes in docshell/test/navigation are because document.open() no longer
affects session history.  One of the tests was testing the interactions there
and is being removed; another is being repurposed to just test that
document.open() does not affect history.length.

The change to test_x-frame-options.html is because document.open() now removes
event listeners on the window, which it didn't use to do (and in the specific
case in this test reused the existing inner too, so the listener was still
around in practice).  The new behavior matches other browsers.

The removal of test_bug172261.html is because document.open() no longer affects
session history, so you can't go back across it or forward to the "opened"
state, so the situation that test is trying to test no longer exists.

The changes to test_bug255820.html are because reloading a document after
document.open() will now just load the URL of the document that was the entry
document for the open() call, not reload the written content.  So there's not
much point testing reload behavior, and in this test it was just reloading the
toplevel test file inside the frames.

The change to test_bug346659.html is because now we no longer create a new
Window on document.open().

The change to test_bug1232829.html is because document.open() (implicit in this
test) no longer adds history entries, so the back() was just leaving the test
page instead of going back across the document.open().  The test is a
crashtest in practice, so might still be testing something useful about how
document.open() interacts with animations.

The change to test_bug715739.html is because the URL of the document after
document.open() is now the URL of the entry document, not a wyciwyg URL, so
reload() has different behavior than it used to.

The change to test_bug329869.html is because now when we go back we're
reloading the original document we had, not doing a wyciwyg load, and the
security info now doesn't include the untrusted script.

The changes to the wpt expectations are removing a bunch of expected failures
now that we pass those tests and disabling some tests that are fundamentally
racy and hence fail randomly.  The latter all have github issues filed for the
test problem.

The change to testing/web-platform/tests/common/object-association.js is fixing
tests that were not matching the spec (and were failing in other browsers).

The change to parser-uses-registry-of-owner-document.html is fixing tests that
were not matching the spec (and were failing in other browsers).

The change to document-write.tentative.html is because the test was buggy: it
was using the same iframe element for all its tests and racing loads from some
tests against API calls from other tests, etc.  It's a wonder it ever managed
to pass, independent of these patches (and in fact it doesn't pass according to
wpt.fyi data, even in Firefox).

The changes in html/browsers/history/the-history-interface are because
document.open() no longer adds history entries.  The test was failing in all
other browsers for the same reason.

The changes in html/browsers/history/the-location-interface are because
reloading a document.open()-created thing now loads the URL of the page that
was the entry document for the open() call.  The test was failing in all other
browsers.

The change to reload_document_open_write.html is because we now reload the url
of the document that entered the script that called open() when we reload, not
the written content.  Other browsers were failing this test too; Gecko with
the old document.open implementation was the only one that passed.

The change to http-refresh.py is to fix a test bug: it was not returning a
Content-Type header, so we were putting up helper app dialogs, etc.

The change to test_ext_contentscript.js is because we no create a new global
for document.open() calls.  Kris Maglione OKed this part.

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

--HG--
extra : moz-landing-system : lando
2019-02-27 23:24:48 +00:00
Jonathan Kingston f6680698bd Bug 1525319 - Removing context from OnDataAvailable r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D20881

--HG--
extra : moz-landing-system : lando
2019-02-27 23:42:27 +00:00
Jonathan Kingston c4853316e7 Bug 1525319 - Removing context from OnStopRequest r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D20770

--HG--
extra : moz-landing-system : lando
2019-02-27 23:41:31 +00:00
Jonathan Kingston f7e35ae39e Bug 1525319 - Removing context from OnStartRequest r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D20769

--HG--
extra : moz-landing-system : lando
2019-02-27 23:41:04 +00:00
John Lin 23e73b3f4c Bug 1510340 - p2: limit the concurrently created HLSDecoder instances. r=jya
Each instance has an instance of Java ExoPlayer that consumes memory in the
limited JVM heap. Too many concurrent players will cause OutOfMemoryError.

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

--HG--
extra : moz-landing-system : lando
2019-02-21 01:22:02 +00:00
James Willcox 61ca9441b1 Bug 1525959 - Skip some mochitests tests under GeckoView r=geckoview-reviewers,esawin
There are few things that are either Fennec-specific or don't work
currently under GeckoView w/ e10s under TestRunnerActivity. Disable
these so we can get some testing going in automation.

This also replaces 'isFennec' with the more correct 'is_fennec'.

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

--HG--
extra : moz-landing-system : lando
2019-02-27 15:01:43 +00:00
Alastor Wu 1caaa8a882 Bug 1525156 - part2 : Add Telemetry to know how many autoplay media, which has been resumed from blocked, played exactly 7 secocnds or more, or less than 7 seconds. r=cpearce,janerik
By adding the Telemetry to measure the number of video/audio which played exactly 7 seconds or more, or less than 7 seconds, after those media has been resumed from blocked state, we can know how many media would meet the Chrome's MEI condition, which could help us to know more about the whole landscape of autoplay media.

In addition, it could help us know how many media are played 'by users intention' because we assume that users are more likely to stop the media if autoplay media is unblocked by accident.

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

--HG--
extra : moz-landing-system : lando
2019-02-26 04:44:19 +00:00
Alastor Wu 2607aaaa8d Bug 1525156 - part1 : not dispatch event when play is rejected by AudioChannelAgent. r=cpearce
"blocked" event is used for blocking autoplay. The `AudioChannelAgentBlockedPlay()` returns true when we lost audio focus on Android, so actually we don't need to dispatch "blocked" event.

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

--HG--
extra : moz-landing-system : lando
2019-02-21 22:52:57 +00:00
Ryan Hunt 00e98538aa Bug 1523969 part 6 - Move method definition inline comments to new line in 'dom/'. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D21106

--HG--
extra : rebase_source : ea3f51c2c11247114deccbc86e90fb02b8a97257
2019-02-25 16:05:29 -06:00
Masayuki Nakano e4a493a90c Bug 1529190 - Make `execCommand("createLink")` and `execCommand("insertImage")` aware of URL including non-ASCII characters r=m_kato
`InsertTagCommand::DoCommandParams()` inserts given URL to `href` of `<a>` or
`src` of `<img>`.  However, it treats the given URL includes only ASCII
characters.  Therefore, we cannot insert URL including non-ASCII characters
with `execCommand("createLink")` nor `execCommand("insertImage")`.

This patch makes `nsHTMLDocument::ExecCommand()` set the param as `nsString`
and makes `InsertTagCommand::DoCommandParams()` retrieve it with `GetString()`.

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

--HG--
extra : moz-landing-system : lando
2019-02-25 03:30:50 +00:00
Dorel Luca 4a4dcd57fa Backed out 4 changesets (bug 1525319) for Android failures in dom/base/test/test_progress_events_for_gzip_data.html
Backed out changeset b73f033efb41 (bug 1525319)
Backed out changeset 1d318d5c6b98 (bug 1525319)
Backed out changeset 6d73418988d4 (bug 1525319)
Backed out changeset 84ca79bd2dc3 (bug 1525319)
2019-02-25 04:06:11 +02:00
Jonathan Kingston 63ab2bd8aa Bug 1525319 - Removing context from OnDataAvailable r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D20881

--HG--
extra : moz-landing-system : lando
2019-02-24 20:27:55 +00:00
Jonathan Kingston 332531fa9c Bug 1525319 - Removing context from OnStopRequest r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D20770

--HG--
extra : moz-landing-system : lando
2019-02-24 20:26:59 +00:00
Jonathan Kingston 2441197975 Bug 1525319 - Removing context from OnStartRequest r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D20769

--HG--
extra : moz-landing-system : lando
2019-02-24 20:26:16 +00:00
Matthew Noorenberghe 2913059e69 Bug 1474143 - Replace form submission observer notifications with events. r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D16651

--HG--
extra : moz-landing-system : lando
2019-02-23 00:23:55 +00:00
Matthew Noorenberghe 0ad4c17e2f Bug 1474143 - Remove unused 'firstformsubmit' category and gFirstFormSubmitted. r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D16650

--HG--
extra : moz-landing-system : lando
2019-02-23 00:23:37 +00:00
Matthew Noorenberghe cc5d6f955d Bug 1474143 - Remove unused 'passwordmanager' category and gPasswordManagerInitialized. r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D16649

--HG--
extra : moz-landing-system : lando
2019-02-23 00:23:14 +00:00
Boris Zbarsky 709be5f5e2 Bug 1528146. Fix how web extensions are injected into about:blank. r=kmag
The basic idea is to make non-initial about:blank fire
document-element-inserted notifications just like every other document.  We
then ensure that there's a notification (initial-document-element-inserted)
that only gets fired once per window for documents that are in a window.  This
notification is what webextensions use to inject into the document.

The old setup which injected into about:blank when its global is created gets
removed in favor of injecting the same way as into every other document.

The changes to Document.cpp are fixing a bug in the "block the parser" stuff
webextensions do.  For about:blank, the blocking happens at a point when the
parser really has nothing else to parse (since it's parsing the empty string).
So the blocking is a no-op.  But we do want to prevent DOMContentLoaded firing,
because otherwise the "end of document" scripts could run before we finish
doing the "beginning of document" work in webextensions.  So we want to make
sure we block DOMContentLoaded, not just the load event.

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

--HG--
extra : moz-landing-system : lando
2019-02-22 21:27:44 +00:00
Ciure Andrei f7412ac1f2 Backed out 10 changesets (bug 1474143) for perma failing browser_markup_events_01.js CLOSED TREE
Backed out changeset 1b5d04866585 (bug 1474143)
Backed out changeset 78bfb4dd1f6a (bug 1474143)
Backed out changeset 85ec4f1f5f60 (bug 1474143)
Backed out changeset 5c112b77e489 (bug 1474143)
Backed out changeset 5d35599598bb (bug 1474143)
Backed out changeset 9fd0d7a7946f (bug 1474143)
Backed out changeset 1a83be7a75ca (bug 1474143)
Backed out changeset 2fc9b13171d0 (bug 1474143)
Backed out changeset 3983d7b6d9ad (bug 1474143)
Backed out changeset 9fe55dd58cd8 (bug 1474143)

--HG--
rename : browser/actors/FormValidationChild.jsm => browser/actors/FormSubmitChild.jsm
rename : toolkit/components/satchel/FormSubmitChild.jsm => toolkit/components/satchel/formSubmitListener.js
2019-02-22 21:16:49 +02:00
Matthew Noorenberghe bc7d5bc37e Bug 1474143 - Replace form submission observer notifications with events. r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D16651

--HG--
extra : moz-landing-system : lando
2019-02-22 15:12:33 +00:00
Matthew Noorenberghe 702cf2d5ed Bug 1474143 - Remove unused 'firstformsubmit' category and gFirstFormSubmitted. r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D16650

--HG--
extra : moz-landing-system : lando
2019-02-22 15:12:11 +00:00
Matthew Noorenberghe 44ada4578b Bug 1474143 - Remove unused 'passwordmanager' category and gPasswordManagerInitialized. r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D16649

--HG--
extra : moz-landing-system : lando
2019-02-22 15:11:56 +00:00
Coroiu Cristina 80435b2557 Merge autoland to mozilla-central a=merge 2019-02-22 18:24:30 +02:00
Coroiu Cristina dc0adc07db Backed out changeset 367ca1e16853 (bug 1528146) on request by igoldan, assignee didn't replied back on time a=backout 2019-02-22 10:10:33 +02:00
Cosmin Sabou f3db52f4cf Merge mozilla-inbound to mozilla-central. a=merge 2019-02-21 05:42:03 +02:00
Emilio Cobos Álvarez f8ecce61ec Bug 1470926 - Null-check mBoundFrame after calling SetSelectionRange on it. r=TYLin
This code was already handling the world going away, but did not handle the case
of just getting unbound, which can happen if some selection listener (e.g.,
AccessibleCaret) flushes layout.

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

--HG--
extra : moz-landing-system : lando
2019-02-21 00:18:15 +00:00
Christoph Kerschbaumer 54df1cb98c Bug 1528677: Remove nullchecks for loadinfo since we have loadinfo on all channels. r=baku 2019-02-20 13:27:25 +01:00
Emilio Cobos Álvarez 39d3da7fd5 Bug 1528644 - Internal value changes shouldn't change validity state. r=masayuki
Even less so on reframe, where it's just unsound to do so. I had to give a value
to eSetValue_Internal, since otherwise I cannot check for its presence. I can
further special-case the reframe case if you prefer.

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

--HG--
extra : moz-landing-system : lando
2019-02-19 09:25:55 +00:00
Masayuki Nakano 474225038e Bug 998941 - part 2-2: Make HTMLEditor set InputEvent.dataTransfer when InputEvent.inputType is "insertFromPaste", "insertFromDrop" or "insertReplacementText" r=smaug,m_kato
InputEvent.dataTransfer should be set to non-null when InputEvent.inputType
is "insertFromPaste", "insertFromDrop" or "insertReplacementText" and
editor is an HTMLEditor instance:
https://rawgit.com/w3c/input-events/v1/index.html#dfn-data
https://w3c.github.io/input-events/#dfn-data

("insertTranspose" and "insertFromYank" are not currently supported on Gecko.)

This patch makes nsContentUtils::DispatchInputEvent() take dataTransfer value
and EditorBase set it via AutoEditActionDataSetter like data value.

However, we need to create other constructors of DataTransfer to create its
read-only instances initialized with nsITransferable or nsAString.  This will
be implemented by the following patch.

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

--HG--
extra : moz-landing-system : lando
2019-02-19 06:33:42 +00:00
Masayuki Nakano 2eaf64e594 Bug 998941 - part 1-3: Make TextEditor (only when not HTMLEditor instance) set InputEvent.data to inserting string when InputEvent.inputType is "insertFromPaste", "insertFromDrop" or "insertReplacementText" r=smaug,m_kato
https://rawgit.com/w3c/input-events/v1/index.html#dfn-data
https://w3c.github.io/input-events/#dfn-data

Both Input Events Level 1 and Level 2 declare that InputEvent.data should be
set to inserting string only on TextEditor when InputEvent.inputType is
"insertFromPaste", "insertFromPasteAsQuotation", "insertFromDrop",
"insertTranspose", "insertReplacementText" or "insertFromYank".

Currently, we support only "insertFromPaste", "insertFromDrop",
"insertReplacementText".  Therefore, this patch makes TextEditor set
EditorBase::mEditActionData::mData only for them (and the instance is not
HTMLEditor's).

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

--HG--
extra : moz-landing-system : lando
2019-02-19 06:28:57 +00:00
Masayuki Nakano a3484e40c0 Bug 998941 - part 1-2: Make editor set InputEvent.data to inserting text when it sets InputEvent.inputType to "insertText" or "insertCompositionText" r=smaug,m_kato
This patch makes nsContentUtils::DispatchInputEvent() support to set
InputEvent.data.  Whether the its value should be null or DOMString depends
on InputEvent.inputType value.

- https://rawgit.com/w3c/input-events/v1/index.html#overview
- https://rawgit.com/w3c/input-events/v1/index.html#dfn-data
- https://w3c.github.io/input-events/#overview
- https://w3c.github.io/input-events/#dfn-data

According to the draft specs, InputEvent.data should be always inserting text
when inputType is "insertText" or "insertCompositionText" (or
"insertFromCompoition" if Level 2 support is enabled).

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

--HG--
extra : moz-landing-system : lando
2019-02-19 06:28:19 +00:00
Csoregi Natalia 952908fda0 Merge mozilla-central to mozilla-inbound. CLOSED TREE 2019-02-17 00:14:07 +02:00
Sylvestre Ledru e0c61dafa5 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
Summary: # ignore-this-changeset

Reviewers: Ehsan

Reviewed By: Ehsan

Subscribers: emilio, jandem, bbouvier, jya

Bug #: 1519636

Differential Revision: https://phabricator.services.mozilla.com/D20062
2019-02-16 20:20:37 +01:00
Boris Zbarsky 84b4628394 Bug 1528146. Fix how web extensions are injected into about:blank. r=kmag
The basic idea is to make non-initial about:blank fire
document-element-inserted notifications just like every other document.  We
then ensure that there's a notification (initial-document-element-inserted)
that only gets fired once per window for documents that are in a window.  This
notification is what webextensions use to inject into the document.

The old setup which injected into about:blank when its global is created gets
removed in favor of injecting the same way as into every other document.

The changes to Document.cpp are fixing a bug in the "block the parser" stuff
webextensions do.  For about:blank, the blocking happens at a point when the
parser really has nothing else to parse (since it's parsing the empty string).
So the blocking is a no-op.  But we do want to prevent DOMContentLoaded firing,
because otherwise the "end of document" scripts could run before we finish
doing the "beginning of document" work in webextensions.  So we want to make
sure we block DOMContentLoaded, not just the load event.

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

--HG--
extra : moz-landing-system : lando
2019-02-15 23:29:34 +00:00
Kyle Machulis 2ecce7b6b7 Bug 1524683 - Remove nsIFrameLoaderOwner; r=nika
Depends on D19729

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

--HG--
extra : moz-landing-system : lando
2019-02-15 22:20:55 +00:00