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

22905 Коммитов

Автор SHA1 Сообщение Дата
Kagami Sascha Rosylight 1100a05736 Bug 1669996 - Do not expose chromeonly nodes via Selection API r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D93258
2020-10-13 07:30:04 +00:00
Edgar Chen 6ea02af2f9 Bug 1666843 - Clear mFocusedWindow while burring; r=hsivonen
The expectation is that the blurring would eventually result in an IPC message
doing this anyway, but this doesn't happen if the focus is in OOP iframe which
won't try to bounce an IPC message to its parent frame.

Differential Revision: https://phabricator.services.mozilla.com/D93210
2020-10-12 11:58:50 +00:00
Peter Van der Beken 6e70d65e26 Bug 1668940 - Replace nsFrameLoader::mIsTopLevelContent with mPendingBrowsingContext->IsTopContent(). r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D93157
2020-10-12 18:07:36 +00:00
Mihai Alexandru Michis 6ad7b7e9dd Backed out 2 changesets (bug 1668940) for causing bc failures.
CLOSED TREE

Backed out changeset c025fad53568 (bug 1668940)
Backed out changeset 9d98bf7b930f (bug 1668940)
2020-10-12 17:00:52 +03:00
Peter Van der Beken 02addaa2d5 Bug 1668940 - Replace nsFrameLoader::mIsTopLevelContent with mPendingBrowsingContext->IsTopContent(). r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D93157
2020-10-12 12:37:52 +00:00
Emilio Cobos Álvarez 4936f05266 Bug 1670327 - Fix more IntersectionObserver issues. r=hiro
Two spec issues here.

https://github.com/w3c/IntersectionObserver/issues/457: I think this is
just a spec bug and I've made us match other browsers, but since the
tests don't match the spec for now I've added them as .tentative.html

https://github.com/w3c/IntersectionObserver/issues/456: I've aligned
with WebKit here. There was a (disabled) test for this which tests
chrome behavior and which after this patch shouldn't be flaky. This is
what was causing the assertion.

Differential Revision: https://phabricator.services.mozilla.com/D93166
2020-10-12 10:58:35 +00:00
Mihai Alexandru Michis b60d04ec78 Backed out changeset a083e04138aa (bug 1670327) for causing wpt failures in intersection-observer/root-margin.html
CLOSED TREE
2020-10-12 13:35:28 +03:00
Emilio Cobos Álvarez 6259946a20 Bug 1670327 - Fix more IntersectionObserver issues. r=hiro
Two spec issues here.

https://github.com/w3c/IntersectionObserver/issues/457: I think this is
just a spec bug and I've made us match other browsers, but since the
tests don't match the spec for now I've added them as .tentative.html

https://github.com/w3c/IntersectionObserver/issues/456: I've aligned
with WebKit here. There was a (disabled) test for this which tests
chrome behavior and which after this patch shouldn't be flaky. This is
what was causing the assertion.

Differential Revision: https://phabricator.services.mozilla.com/D93166
2020-10-12 09:52:22 +00:00
Razvan Maries d25eb00ab4 Backed out 2 changesets (bug 1668940) for perma failures on test_swapFrameLoaders.xhtml. CLOSED TREE
Backed out changeset 49b550ad8387 (bug 1668940)
Backed out changeset 786694e7b805 (bug 1668940)
2020-10-12 11:30:16 +03:00
Peter Van der Beken 7bb49866ea Bug 1668940 - Replace nsFrameLoader::mIsTopLevelContent with mPendingBrowsingContext->IsTopContent(). r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D93157
2020-10-11 18:18:28 +00:00
Cameron McCormack 623306a175 Bug 1656114 - Part 5: Report use counters in documents that come out of the bfcache. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D93046
2020-10-11 22:15:06 +00:00
Cameron McCormack 18ffe7c642 Bug 1656114 - Part 4: Accumulate page use counters in the parent process. r=emilio,nika
This changes the way we deal with page use counters so that we can
handle out of process iframes.

Currently, when a parent document is being destroyed, we poke into all
of the sub-documents to merge their use counters into the parent's page
use counters, which we then report via Telemetry.  With Fission enabled,
the sub-documents may be out of process.  We can't simply turn these
into async IPC calls, since the parent document will be destroyed
shortly, as might the content processes holding the sub-documents.

So instead, each document during its initialization identifies which
ancestor document it will contribute its page use counters to, and
stores its WindowContext id to identify that ancestor.  A message is
sent to the parent process to notify it that page use counter data will
be sent at some later point.  That later point is when the document
loses its window.  It doesn't matter if the ancestor document has
already been destroyed at this point, since all we need is its
WindowContext id to uniquely identify it.  Once the parent process has
received all of the use counters it expects to accumulate to a given
WindowContext Id, it reports them via Telemetry.

Reporting of document use counters remains unchanged and is done by each
document in their content process.

While we're here, we also:

* Limit use counters to be reported for a pre-defined set of document
  URL schemes, rather than be based on the document principal.

* Add proper MOZ_LOG logging for use counters instead of printfs.

Differential Revision: https://phabricator.services.mozilla.com/D87188
2020-10-11 22:03:43 +00:00
Cameron McCormack c3051dc160 Bug 1656114 - Part 3: Switch use counter storage to mozilla::BitSet. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D87187
2020-10-11 22:03:41 +00:00
Cameron McCormack e21cf9c52a Bug 1656114 - Part 1: Don't null check Document::mStyleUseCounters. r=emilio
We always have one.

Differential Revision: https://phabricator.services.mozilla.com/D87185
2020-10-11 22:03:31 +00:00
Kartikaya Gupta 264e82488a Bug 1670003 - Add back the scroll input methods telemetry. r=botond
This is mostly a revert of the patch in bug 1425686 that removed the old
probe, but rebased to new code locations and clang-formatted. The histogram
entry is also updated with new bug numbers and fields.

The next patch will refine some of these telemetry recording points; the patch
is split into two for easier reviewing as this part is basically what landed
originally.

Differential Revision: https://phabricator.services.mozilla.com/D92995
2020-10-10 17:41:47 +00:00
Bas Schouten 25a1b0f61f Bug 1669256 - Part 1: Remove AbstractEventQueue and de-templatize ThreadEventQueue. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D92709
2020-10-09 17:56:34 +00:00
Masayuki Nakano 0f46ae6a8e Bug 1668134 - part 2: Make `nsPIDOMWindowInner` have an API to know whether a node is (was) in the window has been observed by web apps with a mutation observer r=smaug
There is similar API in `Document`, but they indicate whether a node has been
observed by any mutation receiver, not only by `MutationObserver` of JS.
However, I'd like to know the percentage of web apps which use
`MutationObserver`, but not use `beforeinput` events.  Therefore, this patch
adds similar API into `nsPIDOMWindowInner` as same as `beforeinput` and
ignores `MutationObserver`s which are created by chrome script and addons.

Differential Revision: https://phabricator.services.mozilla.com/D92547
2020-10-08 02:25:35 +00:00
Masayuki Nakano 8c5fa85517 Bug 1668134 - part 1: Make `nsPIDOMWindowInner` have an API to know whether the window or its descendants has had `beforeinput` event listeners r=smaug
When `HTMLEditor` instances are destroyed, I'd like to collect how much
instances are worked with `beforeinput` event listeners.  Before adding such
telemetry probe, this patch adds methods to set/get whether a `beforeinput`
event listener has had added or not to `nsPIDOMWindowInner`.

Differential Revision: https://phabricator.services.mozilla.com/D92546
2020-10-08 02:25:35 +00:00
Neil Deakin af842b5083 Bug 1670134, remove message manager reference from LightweightThemeChild.jsm, by getting chromeOuterWindowId from BrowserChild instead, r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D93043
2020-10-09 17:36:22 +00:00
Agi Sferro 6eabf70d45 Bug 1648157 - Add getter for windowUtils.desktopModeViewport. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D93006
2020-10-09 17:32:01 +00:00
Emilio Cobos Álvarez 4e68e78542 Bug 1669925 - Add a printing.trigger keyed scalar to record what triggers a particular print dialog. r=jwatt,marionette-reviewers,maja_zf
In order to avoid over/under-counting, we need to treat window.print()
specially. The new UI was using aOpenWindowInfo.isForPrintPreview for
that, but that doesn't quite work for the old UI (because it will
trigger a regular print, not a preview).

But since isForPrintPreview was only really needed to distinguish
window.print(), just rename it and set it to true when the old UI is
triggered by window.print() as well.

Differential Revision: https://phabricator.services.mozilla.com/D92925
2020-10-09 14:59:46 +00:00
Masayuki Nakano 2fde14a338 Bug 1623918 - part 2: Mark `nsINode::GetSelectionRootContent()` and its root callers as `MOZ_CAN_RUN_SCRIPT` as far as possible r=smaug
This patch tries to mark root callers of `nsINode::GetSelectionRootContent()`
which calls `nsINode::GetAnonymousRootElementOfTextEditor()` as far as possible
(and reasonable).

It's used by `ContentEventHandler` so that a lot of methods of
`EventStateManager`, `ContentEventHandler`, `IMEContentObserver` which are main
users of it are also marked as `MOZ_CAN_RUN_SCRIPT`.  I think that this is
reasonable.

On the other hand, it might not be reasonable to mark `IMEStateManager` methods
as `MOZ_CAN_RUN_SCRIPT` for initializing `IMEContentObserver` because
`IMEStateManager` may be able to initialize `IMEContentObserver` asynchronously
and its root callers are in XUL layout code.  Therefore, this patch uses
`MOZ_CAN_RUN_SCRIPT_BOUNDARY` for `IMEStateManager` at least for now.

Differential Revision: https://phabricator.services.mozilla.com/D92730
2020-10-09 02:37:47 +00:00
Masayuki Nakano 235177bdeb Bug 1623918 - part 1: Make `nsINode::GetTextEditorRootContent()` handle `TextControlElement` after stopping climbing the DOM tree up r=smaug
It was designed for retrieving associated `TextEditor` and its root content
(anonymous `<div>` element) if the node is in native anonymous subtree in a
text editor or if the node itself is a `TextControlElement`.  Additionally,
`TextControlElement` cannot be nested.  Therefore, it can stop climbing up the
DOM tree when it meets a `TextControlElement`.

Then, we can rewrite this without a loop implemented by itself.  Instead,
it can use `GetClosestNativeAnonymousSubtreeRootParent()` when the node is
in native anonymous subtree.  Otherwise, it just needs to check whether it's
a `TextControlElement` or not.  Therefore, we can make it stop using
`InclusiveAncestorsOfType`.

Finally, it calls `TextControlElement::GetTextEditor()` which is marked as
`MOZ_CAN_RUN_SCRIPT`.  And I think that it may cause running selection
listeners (mutation event listeners won't run because changes occur only in
the native anonymous subtree).  Therefore, we should mark all callers of
it with `MOZ_CAN_RUN_SCRIPT` later.

Differential Revision: https://phabricator.services.mozilla.com/D92728
2020-10-09 02:36:30 +00:00
Matt Woodrow 2fe0c8c5cc Bug 1662336 - Use static clone from print preview when printing. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D90808
2020-10-07 22:38:22 +00:00
Christoph Kerschbaumer faf05f7d19 Bug 1552168: Remove pref security.data_uri.unique_opaque_origin. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D92087
2020-10-08 16:55:25 +00:00
Emilio Cobos Álvarez af03e40b26 Bug 1665792 - Null-check mTiming before clone. r=jwatt
There's no guarantee that mTiming is non-null. This can happen for a
variety of reasons.

Differential Revision: https://phabricator.services.mozilla.com/D92894
2020-10-08 14:26:26 +00:00
Denis Palmeiro 71434198b6 Bug 1664475: Add telemetry probes to collect data for script delazification, xdr encoding time, bytecode caching time, and baseline compilation time. r=nbp,Dexter,sefeng,smaug
Differential Revision: https://phabricator.services.mozilla.com/D90798
2020-10-08 13:46:29 +00:00
Mirko Brodesser 4e64982599 Bug 1662698: enable "test_bug622088.html" for xorigin iframes with Fission. r=smaug
Requires session history in parent (bug 1656208).

Differential Revision: https://phabricator.services.mozilla.com/D90377
2020-09-16 10:56:15 +00:00
Narcis Beleuzu b4021531e8 Backed out changeset 43d2e0a07c33 (bug 1665792) for crashtests failre on 1665792.html CLOSED TREE 2020-10-08 16:02:35 +03:00
Emilio Cobos Álvarez e1c71fbfcc Bug 1665792 - Null-check mTiming before clone. r=jwatt
There's no guarantee that mTiming is non-null. This can happen for a
variety of reasons.

Differential Revision: https://phabricator.services.mozilla.com/D92894
2020-10-08 11:05:28 +00:00
Narcis Beleuzu c163b394ef Backed out 2 changesets (bug 1623918) for crashtest failure on 1623918.html CLOSED TREE
Backed out changeset 519ca1b069e5 (bug 1623918)
Backed out changeset d8a09a5fea47 (bug 1623918)
2020-10-08 12:06:58 +03:00
Masayuki Nakano da386ef224 Bug 1623918 - part 2: Mark `nsINode::GetSelectionRootContent()` and its root callers as `MOZ_CAN_RUN_SCRIPT` as far as possible r=smaug
This patch tries to mark root callers of `nsINode::GetSelectionRootContent()`
which calls `nsINode::GetAnonymousRootElementOfTextEditor()` as far as possible
(and reasonable).

It's used by `ContentEventHandler` so that a lot of methods of
`EventStateManager`, `ContentEventHandler`, `IMEContentObserver` which are main
users of it are also marked as `MOZ_CAN_RUN_SCRIPT`.  I think that this is
reasonable.

On the other hand, it might not be reasonable to mark `IMEStateManager` methods
as `MOZ_CAN_RUN_SCRIPT` for initializing `IMEContentObserver` because
`IMEStateManager` may be able to initialize `IMEContentObserver` asynchronously
and its root callers are in XUL layout code.  Therefore, this patch uses
`MOZ_CAN_RUN_SCRIPT_BOUNDARY` for `IMEStateManager` at least for now.

Differential Revision: https://phabricator.services.mozilla.com/D92730
2020-10-08 03:56:51 +00:00
Masayuki Nakano a28cbd4f31 Bug 1623918 - part 1: Make `nsINode::GetTextEditorRootContent()` handle `TextControlElement` after stopping climbing the DOM tree up r=smaug
It was designed for retrieving associated `TextEditor` and its root content
(anonymous `<div>` element) if the node is in native anonymous subtree in a
text editor or if the node itself is a `TextControlElement`.  Additionally,
`TextControlElement` cannot be nested.  Therefore, it can stop climbing up the
DOM tree when it meets a `TextControlElement`.

Then, we can rewrite this without a loop implemented by itself.  Instead,
it can use `GetClosestNativeAnonymousSubtreeRootParent()` when the node is
in native anonymous subtree.  Otherwise, it just needs to check whether it's
a `TextControlElement` or not.  Therefore, we can make it stop using
`InclusiveAncestorsOfType`.

Finally, it calls `TextControlElement::GetTextEditor()` which is marked as
`MOZ_CAN_RUN_SCRIPT`.  And I think that it may cause running selection
listeners (mutation event listeners won't run because changes occur only in
the native anonymous subtree).  Therefore, we should mark all callers of
it with `MOZ_CAN_RUN_SCRIPT` later.

Differential Revision: https://phabricator.services.mozilla.com/D92728
2020-10-08 03:55:29 +00:00
Botond Ballo 5fac61e3d1 Bug 1664101 - Store displayport margins in unadjusted form. r=kats
Where an adjustment (to reflect a delta between the APZ and layout
scroll offsets) is necessary, the inputs needed to compute the
adjustment are stored with the margins, and the adjustment is
applied at query time.

A couple of notes on this patch:

 * Storing DisplayPortMargins::mLayoutOffset is probably unnecessary,
   we should be able to just query the scroll frame's layout offset
   when applying the margins.

 * Some callers of DisplayPortMargins::WithNoAdjustment() may be
   incorrect, in that they pass in margins that are relative to the
   visual viewport but do not make a corresponding adjustment.
   This is a pre-existing issue that this patch just makes clearer.

As this is a regression-prone area, this patch is careful to avoid
making any functional changes, leaving the above issues to be
addressed in future bugs.

Differential Revision: https://phabricator.services.mozilla.com/D92506
2020-10-07 22:35:07 +00:00
Emilio Cobos Álvarez 6d9522e464 Bug 1669772 - Don't do a silly print preview from window.print() with the new tab modal UI. r=jwatt
The comment should be self-descriptive. We keep cloning the doc sync and
the UI will preview that doc, so it works out nicely and we do less
work.

Differential Revision: https://phabricator.services.mozilla.com/D92806
2020-10-07 22:23:43 +00:00
Emilio Cobos Álvarez cba105ff25 Bug 1669554 - Fix parsing of initialBrowsingContextGroupId attribute. r=nika
The browsing context group id needs to be an 64-bit integer. Otherwise
when having a browsing context created by a child process, if it goes
over INT32_MAX, parsing fails, and we end up creating a new BCG, which
can end up in the wrong process, etc.

Differential Revision: https://phabricator.services.mozilla.com/D92803
2020-10-07 19:23:39 +00:00
Tooru Fujisawa 6ab3eef906 Bug 1666683 - Part 6: Add ScriptPreloader::FillCompileOptionsForCachedScript. r=tcampbell,kmag
Differential Revision: https://phabricator.services.mozilla.com/D92408
2020-10-06 21:16:57 +00:00
Tooru Fujisawa f1c1132d55 Bug 1666683 - Part 3: Add options parameter to ScriptPreloader::GetCachedScript. r=tcampbell,kmag
Differential Revision: https://phabricator.services.mozilla.com/D92405
2020-10-06 21:16:35 +00:00
Tooru Fujisawa a9031ab2fe Bug 1666683 - Part 1: Reorder CompileOptions parameter. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D92403
2020-10-06 21:16:15 +00:00
Sylvestre Ledru d9cd198ba1 Bug 1519636 - Reformat recent changes to the Google coding style r=andi,necko-reviewers,dragana
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D92459
2020-10-06 16:12:00 +00:00
julianwels 341416588c Bug 1653026 - Added HTTPS-Only Mode upgrade info to browser UI state. r=mattwoodrow,necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D86566
2020-10-06 00:34:55 +00:00
Edgar Chen 53a7fb1fb0 Bug 1669197 - Use Element in PointerCaptureInfo; r=smaug
mPendingElement and mOverrideElement are always Element, we could just use
Element to make the code clear.

Differential Revision: https://phabricator.services.mozilla.com/D92433
2020-10-05 15:56:52 +00:00
Masayuki Nakano ec2e1c9705 Bug 1669133 - Get rid of pref to disable `text` event in the default group and telemetry for it r=smaug
The telemetry probe was added in bug 1506434, and it's not necessary anymore
because of the event in the default group was completely disabled in
bug 1288640 (Gecko 65).

Therefore, we can get rid of the pref, and we can take back a room for a
bool member in `nsPIDOMWindowInner` for new telemetry probes which need
to know whether a specific event listener has been added or not.

Depends on D92395

Differential Revision: https://phabricator.services.mozilla.com/D92397
2020-10-05 11:17:17 +00:00
Emilio Cobos Álvarez 0d0fd8f578 Bug 1668414 - Also handle <source srcset>. r=edgar
Thanks for asking me to add a test ;)

Using the image responsive selector works for scanning the srcset images, but
since we wouldn't rewrite the <source> uris the invalid urls would still have
preference.

Differential Revision: https://phabricator.services.mozilla.com/D92264
2020-10-05 13:44:48 +00:00
Emilio Cobos Álvarez fcb066e784 Bug 1668414 - Handle srcset in WebBrowserPersist. r=edgar
Rewrite the srcset URIs appropriately...

This code was completely untested (modulo one test for forms...) I added a
generic reftest framework to compare original vs. persisted document, so that
testing changes to this code is easier next time.

Differential Revision: https://phabricator.services.mozilla.com/D92133
2020-10-05 13:11:37 +00:00
Noemi Erli c5fb41cb91 Backed out 2 changesets (bug 1668414) for causing build bustages in WebBrowserPersistLocalDocument.cpp CLOSED TREE
Backed out changeset 94a576dd5f89 (bug 1668414)
Backed out changeset cef0f66ca3e7 (bug 1668414)
2020-10-05 15:51:57 +03:00
Emilio Cobos Álvarez abf16513fe Bug 1668414 - Also handle <source srcset>. r=edgar
Thanks for asking me to add a test ;)

Using the image responsive selector works for scanning the srcset images, but
since we wouldn't rewrite the <source> uris the invalid urls would still have
preference.

Differential Revision: https://phabricator.services.mozilla.com/D92264
2020-10-05 09:45:19 +00:00
Emilio Cobos Álvarez d52ce2e888 Bug 1668414 - Handle srcset in WebBrowserPersist. r=edgar
Rewrite the srcset URIs appropriately...

This code was completely untested (modulo one test for forms...) I added a
generic reftest framework to compare original vs. persisted document, so that
testing changes to this code is easier next time.

Differential Revision: https://phabricator.services.mozilla.com/D92133
2020-10-02 16:32:07 +00:00
Marcos Cáceres a9ea25e663 Bug 1665252 - remove allowpaymentrequest attribute from HTMLIFrameElement r=dom-workers-and-storage-reviewers,smaug,asuth
Differential Revision: https://phabricator.services.mozilla.com/D90505
2020-10-05 05:45:38 +00:00
Cameron McCormack 4352fb7b0d Bug 1662839 - Set author style disabled state correctly on newly created iframes. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D90953
2020-10-04 03:25:16 +00:00