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

459 Коммитов

Автор SHA1 Сообщение Дата
Hiroyuki Ikezoe 4e7ae7b866 Bug 1660490 - Reset `IsTopLevelContentDocument` and `IsContentDocument` depending on the given docshell in Document::SetContainer. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D88244
2020-08-26 10:21:27 +00:00
Sean Feng 85bfe3d376 Bug 1200896 - Make the document blocked by the topmost element in the top layer r=emilio
Spec: https://html.spec.whatwg.org/multipage/#blocked-by-a-modal-dialog

Depends on D86392

Differential Revision: https://phabricator.services.mozilla.com/D86227
2020-08-17 15:41:19 +00:00
Sean Feng 3e76ddc640 Bug 1200896 - Make TopLayerPush to return void r=emilio
TopLayerPush has always been returning true, so returning it as a
boolean is incorrect.

Differential Revision: https://phabricator.services.mozilla.com/D86392
2020-08-17 15:41:12 +00:00
Mihai Alexandru Michis fc1c9759fc Backed out 3 changesets (Bug 1200896) for causing Bug 1659042.
CLOSED TREE

Backed out changeset 17df14f0b129 (bug 1200896)
Backed out changeset 5d9e9bd12cd2 (bug 1200896)
Backed out changeset 7f016de8d52f (bug 1200896)
2020-08-14 09:06:45 +03:00
Sean Feng 3f16476b10 Bug 1200896 - Make the document blocked by the topmost element in the top layer r=emilio
Spec: https://html.spec.whatwg.org/multipage/#blocked-by-a-modal-dialog

Differential Revision: https://phabricator.services.mozilla.com/D86227
2020-08-13 19:05:37 +00:00
Sean Feng 514d0b9647 Bug 1200896 - Make TopLayerPush to return void r=emilio
TopLayerPush has always been returning true, so returning it as a
boolean is incorrect.

Differential Revision: https://phabricator.services.mozilla.com/D86392
2020-08-10 20:11:11 +00:00
Emilio Cobos Álvarez 6c008dd4fd Bug 1639328 - Make sure BrowserChilds for OOP iframes start in a consistent state. r=smaug
Right now they start with a FullyHidden() effect info, but with a
"visible" widget, and thus active docshell and so on.

That's no good :)

Differential Revision: https://phabricator.services.mozilla.com/D86364
2020-08-11 16:42:46 +00:00
Razvan Maries eed7de660b Backed out 2 changesets (bug 1639328) for perma failures on test_bug1639328.html. CLOSED TREE
Backed out changeset 23130282a937 (bug 1639328)
Backed out changeset 8628c5cddd14 (bug 1639328)
2020-08-11 05:13:41 +03:00
Emilio Cobos Álvarez 36a4392364 Bug 1639328 - Make sure BrowserChilds for OOP iframes start in a consistent state. r=smaug
Right now they start with a FullyHidden() effect info, but with a
"visible" widget, and thus active docshell and so on.

That's no good :)

Differential Revision: https://phabricator.services.mozilla.com/D86364
2020-08-10 18:39:31 +00:00
Razvan Maries 0dc0ced176 Backed out 2 changesets (bug 1200896) for perma failures on browser_pioneer_ui.js. CLOSED TREE
Backed out changeset c7ae88fd1bd7 (bug 1200896)
Backed out changeset 8b57f059e63e (bug 1200896)
2020-08-10 23:08:04 +03:00
Sean Feng 17473c0717 Bug 1200896 - Make the document blocked by the topmost element in the top layer r=emilio
Spec: https://html.spec.whatwg.org/multipage/#blocked-by-a-modal-dialog

Differential Revision: https://phabricator.services.mozilla.com/D86227
2020-08-10 18:20:51 +00:00
Sean Feng 1f0a10a954 Bug 1200896 - Make TopLayerPush to return void r=emilio
TopLayerPush has always been returning true, so returning it as a
boolean is incorrect.

Differential Revision: https://phabricator.services.mozilla.com/D86392
2020-08-07 17:13:15 +00:00
Emilio Cobos Álvarez b800731028 Bug 1655751 - Invalidate for CSSOM changes in a more fine-grained way. r=heycam
Also, for changes in CSS declarations, like changing
cssRules[i].style.color or something, we end up avoiding a lot of the
work we were doing.

This page still trips us in the sense that they add a stylesheet, then
call getBoundingClientRect(), then insert more rules in the stylesheet,
which causes us to rebuild a lot of the cascade data.

We could try to detect appends to the last stylesheet on the list or
something I guess, and avoid rebuilding the cascade data in some cases.

Depends on D85615

Differential Revision: https://phabricator.services.mozilla.com/D85616
2020-08-10 18:00:44 +00:00
Razvan Maries b29c16e540 Backed out 2 changesets (bug 1639328) for perma failures on test_bug1639328.html and browser_hidden_iframe.js. CLOSED TREE
Backed out changeset be370bea0702 (bug 1639328)
Backed out changeset 954bf9f3dca5 (bug 1639328)
2020-08-10 21:02:42 +03:00
Emilio Cobos Álvarez 9d054b84e4 Bug 1639328 - Make sure BrowserChilds for OOP iframes start in a consistent state. r=smaug
Right now they start with a FullyHidden() effect info, but with a
"visible" widget, and thus active docshell and so on.

That's no good :)

Differential Revision: https://phabricator.services.mozilla.com/D86364
2020-08-10 14:50:27 +00:00
Emilio Cobos Álvarez ac5f577b39 Bug 1657989 - Expose Document::mComposedShadowRoots to front-end code. r=smaug
Seems it's going to be useful for autofill / password-manager.

Differential Revision: https://phabricator.services.mozilla.com/D86415
2020-08-07 21:03:16 +00:00
Sean Feng 75047f597c Bug 1653474 - Process META elements when it's inserted r=smaug
Unlike other engine vendors, we process meta elements
at parser, instead of when they are inserted. This
leads some web compact issues.

This patch aligns us with other vendors.

Differential Revision: https://phabricator.services.mozilla.com/D84545
2020-08-05 16:32:57 +00:00
Stephen A Pohl 09651af1bd Bug 1640195: Address UX feedback for non-native widget styling. r=geckoview-reviewers,emilio,agi
Differential Revision: https://phabricator.services.mozilla.com/D76509
2020-07-30 17:02:02 +00:00
Noemi Erli 4d01914553 Backed out changeset 4fbc6775e743 (bug 1640195) for causing multiple failures CLOSED TREE 2020-07-30 02:58:03 +03:00
Stephen A Pohl 597bb7d3e0 Bug 1640195: Address UX feedback for non-native widget styling. r=geckoview-reviewers,emilio,agi
Differential Revision: https://phabricator.services.mozilla.com/D76509
2020-07-29 22:16:06 +00:00
Brad Werth ab43f75521 Bug 1648344 Part 2: Cleanup Document to remove NoValidContent viewport type. r=hiro
The NoValidContent type was added to detect cases where we needed to apply
default width the viewport. That approach is no longer needed, and this
enum can be removed, as well as the code that sets and checks that enum.

Differential Revision: https://phabricator.services.mozilla.com/D84447
2020-07-22 23:11:42 +00:00
Emilio Cobos Álvarez ff61891772 Bug 1653011 - Simplify and make WeakPtr<Derived> usable and compact. r=froydnj,sg,geckoview-reviewers,jgilbert,kvark,snorp
Having two classes in the inheritance chain inherit from SupportsWeakPtr
now won't compile, but you can use WeakPtr<Derived> when any base class
inherits from SupportsWeakPtr.

Differential Revision: https://phabricator.services.mozilla.com/D83674
2020-07-23 14:51:46 +00:00
Emilio Cobos Álvarez ae92038d84 Bug 1648064 - Make service workers of the original document intercept the static document's requests. r=smaug,asuth
We need to set the original document ASAP so images triggered from the
clone use the right service worker.

It is a bit unfortunate to have the static document checks twice, but we
may get to Document::GetClientInfo before the cloned doc has a window,
so it's not 100% clear to me how we could avoid it.

Differential Revision: https://phabricator.services.mozilla.com/D82081
2020-07-22 20:29:41 +00:00
Emilio Cobos Álvarez 5f53233ca1 Bug 1648064 - Switch DOM images to work like CSS images for the purposes of printing. r=tnikkel,smaug
Make them perform the image load (if needed), instead of copying the
image requests from the original document.

This is needed for CSS for stuff like:

@media print {
  #foo::before {
    content: url(bar.png);
  }
}

And so on. For images, we should do this as well. Nothing prevents you
from doing:

  <picture>
    <source srcset="print.png" media="print">
    <source srcset="screen.png" media="not print">
    <img>
  </picture>

And that should in theory work. It works after this patch, and I added a
test for that.

This patch is a bit bigger than I'd like, but I didn't find a more
reasonable way to split it up.

Making static docs able to do image loads is most of the patch and is
mostly straight-forward. This allows to remove the hacky "change the
loading document" thing that CSS images do, which is just working around
the CSP of the print document.

I need to enable background colors in printpreview_helper so as to be
able to have a reference page for all the different image types.

Differential Revision: https://phabricator.services.mozilla.com/D81779
2020-07-22 20:29:00 +00:00
Narcis Beleuzu 46367e2f7d Backed out 6 changesets (bug 1648064) for wp failures on test_printpreview.xhtml . CLOSED TREE
Backed out changeset 8ac892c60eda (bug 1648064)
Backed out changeset 189401f7b6e8 (bug 1648064)
Backed out changeset 2598e2706bd0 (bug 1648064)
Backed out changeset 4ec12eb9788c (bug 1648064)
Backed out changeset f735d4f6b21f (bug 1648064)
Backed out changeset 0fed6928b53d (bug 1648064)
2020-07-22 21:28:10 +03:00
Emilio Cobos Álvarez 91062db9ac Bug 1648064 - Make service workers of the original document intercept the static document's requests. r=smaug,asuth
We need to set the original document ASAP so images triggered from the
clone use the right service worker.

It is a bit unfortunate to have the static document checks twice, but we
may get to Document::GetClientInfo before the cloned doc has a window,
so it's not 100% clear to me how we could avoid it.

Differential Revision: https://phabricator.services.mozilla.com/D82081
2020-07-22 14:39:53 +00:00
Emilio Cobos Álvarez 08db8b4b15 Bug 1648064 - Switch DOM images to work like CSS images for the purposes of printing. r=tnikkel,smaug
Make them perform the image load (if needed), instead of copying the
image requests from the original document.

This is needed for CSS for stuff like:

@media print {
  #foo::before {
    content: url(bar.png);
  }
}

And so on. For images, we should do this as well. Nothing prevents you
from doing:

  <picture>
    <source srcset="print.png" media="print">
    <source srcset="screen.png" media="not print">
    <img>
  </picture>

And that should in theory work. It works after this patch, and I added a
test for that.

This patch is a bit bigger than I'd like, but I didn't find a more
reasonable way to split it up.

Making static docs able to do image loads is most of the patch and is
mostly straight-forward. This allows to remove the hacky "change the
loading document" thing that CSS images do, which is just working around
the CSP of the print document.

I need to enable background colors in printpreview_helper so as to be
able to have a reference page for all the different image types.

Differential Revision: https://phabricator.services.mozilla.com/D81779
2020-07-22 14:39:43 +00:00
alwu 6879e655b6 Bug 1647430 - part3 : remove `DocTreeHadPlayRevoked` related variable and method. r=nika
The telemetry probe, which is related with `mDocTreeHadPlayRevoked`, has already been removed, so we don't need these code anymore.

Differential Revision: https://phabricator.services.mozilla.com/D83163
2020-07-13 15:16:29 +00:00
alwu 37f08f36a0 Bug 1647430 - part2 : store `DocTreeHadAudibleMedia` in WindowContext. r=nika
After we enable Fissions, we can't always access the top level document because it might be in another process.

Therefore, we should move `mDocTreeHadAudibleMedia` from document to the top window context, which can ensure that we set the value correctly even if setting `mDocTreeHadAudibleMedia` happens in a different process which is different from the process where the top level document exists.

Differential Revision: https://phabricator.services.mozilla.com/D83162
2020-07-16 19:53:49 +00:00
alwu f88c326e31 Bug 1647430 - part1 : add a method to get top level window context. r=nika
Reuse same code and reduce the duplication.

Differential Revision: https://phabricator.services.mozilla.com/D83161
2020-07-14 02:18:22 +00:00
Simon Giesecke 202c188ca0 Bug 1652960 - Remove unnecessary includes from Document.h. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D83634
2020-07-15 15:48:53 +00:00
Daisuke Akatsuka 7ad61c2671 Bug 1625930: Fire StyleSheetApplicableStateChanged event explicitly if the stylesheet is getten from the cache. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D81305
2020-07-08 15:13:03 +00:00
James Willcox 43c90527a5 Bug 1641597 - Add `document.allowDeprecatedTls` for error pages r=geckoview-reviewers,NeilDeakin,smaug,esawin
Differential Revision: https://phabricator.services.mozilla.com/D78365
2020-07-08 15:37:18 +00:00
Bogdan Tara 75881e8400 Backed out 6 changesets (bug 1625930) for test_eventemitter_basic.js failures CLOSED TREE
Backed out changeset 30a3da9f613c (bug 1625930)
Backed out changeset d4e4c3ddcc43 (bug 1625930)
Backed out changeset 0133d9c58323 (bug 1625930)
Backed out changeset 1c9cf53f2a89 (bug 1625930)
Backed out changeset f63839eff636 (bug 1625930)
Backed out changeset a6bef105a2c2 (bug 1625930)
2020-07-08 18:08:27 +03:00
Daisuke Akatsuka 2e741db198 Bug 1625930: Fire StyleSheetApplicableStateChanged event explicitly if the stylesheet is getten from the cache. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D81305
2020-07-08 14:05:42 +00:00
Emilio Cobos Álvarez e916b18fa8 Bug 1643798 - Fix feature policy check for fullscreen so that it gets reflected properly in document.fullscreenEnabled. r=baku
See bug 1606660 comment 8 as to why checking it only in
Element.requestFullscreen is wrong.

Do you know how to test this? I'm not very familiar with feature-policy.

Differential Revision: https://phabricator.services.mozilla.com/D78567
2020-06-25 13:17:04 +00:00
Delan Azabani 5dc229e516 Bug 1630935 - Add use counter and deprecation warning for STIXGeneral fonts. r=emilio
This patch adds the boolean pref mathml.stixgeneral_operator_stretching.disabled, which defaults to true iff nightly.

When the pref is true, stretched operators won’t be rendered with STIXGeneral, because we only use OpenType MATH tables (in fonts that have them) or the generic Unicode table.

When the pref is false, we continue to support STIXGeneral for stretched operators, but warn the author in devtools and bump the use counter (up to once per page). This only happens when a stretched operator actually uses STIXGeneral: not when we successfully render the operator with some other font earlier in the font-family stack, and not when STIXGeneral isn’t installed.

Differential Revision: https://phabricator.services.mozilla.com/D73833
2020-06-25 04:20:57 +00:00
Eden Chuang a383fd6b63 Bug 1637035 - Do not inherit COEP from opener for non-http or non-initial-about:blank documents r=nika
Differential Revision: https://phabricator.services.mozilla.com/D80414
2020-06-25 02:14:29 +00:00
Andrea Marchesini 6aa5b38d30 Bug 1641905 - ThirdPartyUtil::IsThirdPartyWindow for fission, r=dimi,necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D79307
2020-06-17 20:18:23 +00:00
Emilio Cobos Álvarez abd87a6510 Bug 1646776 - Make sure to fire load rather than error events for preload links that hit the CSS cache. r=mayhemer
When we hit the stylesheet cache for an existing stylesheet in a
different document:

 * There's no existing preload in the PreloadService (because the sheet
   was loaded in another document).

 * We don't create a PreloaderBase (because we don't trigger a load at
   all).

 * And thus we believe the load has just errored, which is wrong...

Fix it by properly passing through the "already complete" status from
PreloadStyle.

Note that there's still another issue, which is that we'd still hit this
broken path if two stylesheets with the same URI are loading in
different documents and the CSS loader coalesces them.

For that, I think we'd have to make SheetLoadData the thing that
actually implements PreloaderBase. This is kind of an obscure case, and
SheetLoadData has a pretty complex lifetime already (keeps alive a whole
lot of stuff), so I'd prefer to do this in a separate bug.

Differential Revision: https://phabricator.services.mozilla.com/D80289
2020-06-22 14:18:19 +00:00
Razvan Maries d653f63b03 Backed out changeset 1c9058277ddd (bug 1641905) for perma failures on test_ext_cookies_firstParty.js. CLOSED TREE 2020-06-16 22:16:58 +03:00
Andrea Marchesini f7efe6a94c Bug 1641905 - ThirdPartyUtil::IsThirdPartyWindow for fission, r=dimi,necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D79307
2020-06-16 17:46:41 +00:00
Simon Giesecke 0735ecafd8 Bug 1645382 - Remove unnecessary arguments from NS_OBSERVER_ARRAY_NOTIFY_* macros. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D79485
2020-06-15 09:05:00 +00:00
Nika Layzell 35969e149c Bug 1644797 - Add a WindowContext getter to Document, r=farre
Differential Revision: https://phabricator.services.mozilla.com/D79160
2020-06-11 11:19:14 +00:00
Johann Hofmann 2121e27531 Bug 1515073 - Part 1 - Add nsISHEntry::hasUserInteraction. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D27585
2020-06-09 14:48:38 +00:00
Anny Gakhokidze b0c4a70ea0 Bug 1631859 - Part 3: Remove ancestor principals and outer windowIDs from Document and nsDocShell, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D78408
2020-06-08 19:58:23 +00:00
Emilio Cobos Álvarez 9635f65354 Bug 1634602 - Minor follow-up cleanups.
Differential Revision: https://phabricator.services.mozilla.com/D78020
2020-06-03 09:44:41 +00:00
Andrea Marchesini 69818a4d17 Bug 1639833 - IntrisincStoragePrincipal should always be partitioned - part 4 - Renaming storage access permission methods, r=dimi
Differential Revision: https://phabricator.services.mozilla.com/D76917
2020-06-03 06:12:06 +00:00
Andrea Marchesini f8f4d7b9c9 Bug 1639833 - IntrisincStoragePrincipal should always be partitioned - part 3 - Cleanup storage access methods, r=dimi
Differential Revision: https://phabricator.services.mozilla.com/D76916
2020-06-03 06:10:58 +00:00
Andrea Marchesini 22d905d24e Bug 1639833 - IntrisincStoragePrincipal should always be partitioned - part 2 - Expose PartitionedPrincipal, r=dimi
Differential Revision: https://phabricator.services.mozilla.com/D76915
2020-06-03 06:09:52 +00:00