Commit Graph

339 Commits

Author SHA1 Message Date
Sean Feng
e6a1ddccf9 Bug 1377999 - Add the capability to do DOM node Arena allocation r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D57698

--HG--
extra : moz-landing-system : lando
2020-03-17 14:52:37 +00:00
Chris Fronk
d5b004443b Bug 1143478 - Rename mozilla::Pair to CompactPair. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D64511

--HG--
rename : mfbt/Pair.h => mfbt/CompactPair.h
extra : moz-landing-system : lando
2020-03-17 12:42:12 +00:00
Mihai Alexandru Michis
58bc354025 Backed out changeset 9eeee9ec66d9 (bug 253870) for causing failures in browser_bug1261299.js
CLOSED TREE
2020-03-16 22:32:41 +02:00
Emilio Cobos Álvarez
9f28f89085 Bug 253870 - Make disabled form controls selectable. r=masayuki,MarcoZ
This rejiggers a bit the way selection focus is handled so that focusing a
disabled form control with the mouse handles selection properly, and hides the
document selection and so on.

This matches the behavior of other browsers as far as I can tell.

Given now readonly and disabled editors behave the same, we can simplify a bit
the surrounding editor code.

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

--HG--
extra : moz-landing-system : lando
2020-03-16 17:41:07 +00:00
Jon Coppeard
782a91ebba Bug 1613095 - Unlink more Document fields r=mccr8
I removed traverse and unlink for mChannel and mLayoutHistoryState since the initial review said these were unnecessary.

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

--HG--
extra : moz-landing-system : lando
2020-03-12 15:06:36 +00:00
Christoph Walcher
f652209a3e Bug 1616964 - Remove support for "loadAsInteractiveData" in XMLDocument r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D63774

--HG--
extra : moz-landing-system : lando
2020-02-24 17:46:04 +00:00
shindli
b02b3a6e1a Backed out changeset a08637fb30c8 (bug 1143478) for causing bustages in /builds/worker/checkouts/gecko/ipc/mscom/Registration.cpp CLOSED TREE
--HG--
rename : mfbt/CompactPair.h => mfbt/Pair.h
2020-03-11 14:30:54 +02:00
Chris Fronk
a27e438c2d Bug 1143478 - Rename mozilla::Pair to CompactPair. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D64511

--HG--
rename : mfbt/Pair.h => mfbt/CompactPair.h
extra : moz-landing-system : lando
2020-03-11 12:18:13 +00:00
Ehsan Akhgari
cde7e014c2 Bug 1620322 - Part 9: Move ContentBlockingLog to antitracking to keep all related code together in the same place; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D65822

--HG--
rename : dom/base/ContentBlockingLog.cpp => toolkit/components/antitracking/ContentBlockingLog.cpp
rename : dom/base/ContentBlockingLog.h => toolkit/components/antitracking/ContentBlockingLog.h
extra : moz-landing-system : lando
2020-03-09 23:36:39 +00:00
Narcis Beleuzu
0186cbe565 Backed out 8 changesets (bug 1620322) for bustages on nsContentSink.cpp . CLOSED TREE
Backed out changeset f41739c64dff (bug 1620322)
Backed out changeset be942a7f329e (bug 1620322)
Backed out changeset a916987c7c71 (bug 1620322)
Backed out changeset ead3484ffb5f (bug 1620322)
Backed out changeset 4e1e8b9afa1a (bug 1620322)
Backed out changeset 473bba698e5a (bug 1620322)
Backed out changeset 0e5e5d41597d (bug 1620322)
Backed out changeset 31b24d79db3d (bug 1620322)

--HG--
rename : toolkit/components/antitracking/ContentBlockingLog.cpp => dom/base/ContentBlockingLog.cpp
rename : toolkit/components/antitracking/ContentBlockingLog.h => dom/base/ContentBlockingLog.h
rename : toolkit/components/antitracking/ContentBlocking.cpp => toolkit/components/antitracking/AntiTrackingCommon.cpp
rename : toolkit/components/antitracking/ContentBlocking.h => toolkit/components/antitracking/AntiTrackingCommon.h
2020-03-09 22:18:36 +02:00
Ehsan Akhgari
8530d61140 Bug 1620322 - Part 9: Move ContentBlockingLog to antitracking to keep all related code together in the same place; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D65822

--HG--
rename : dom/base/ContentBlockingLog.cpp => toolkit/components/antitracking/ContentBlockingLog.cpp
rename : dom/base/ContentBlockingLog.h => toolkit/components/antitracking/ContentBlockingLog.h
extra : moz-landing-system : lando
2020-03-09 18:12:42 +00:00
Noemi Erli
a48fac9e3b Backed out 8 changesets (bug 1620322) for causing bustages in ContentBlockingLog.cpp CLOSED TREE
Backed out changeset 3dcf513e36cb (bug 1620322)
Backed out changeset 46714855ce1d (bug 1620322)
Backed out changeset 0eb2b5f7322f (bug 1620322)
Backed out changeset 72d640fa0740 (bug 1620322)
Backed out changeset 4533bb4e5177 (bug 1620322)
Backed out changeset 659270edd419 (bug 1620322)
Backed out changeset 6802c18b1914 (bug 1620322)
Backed out changeset 60ff34db9f15 (bug 1620322)

--HG--
rename : toolkit/components/antitracking/ContentBlockingLog.cpp => dom/base/ContentBlockingLog.cpp
rename : toolkit/components/antitracking/ContentBlockingLog.h => dom/base/ContentBlockingLog.h
rename : toolkit/components/antitracking/ContentBlocking.cpp => toolkit/components/antitracking/AntiTrackingCommon.cpp
rename : toolkit/components/antitracking/ContentBlocking.h => toolkit/components/antitracking/AntiTrackingCommon.h
2020-03-09 19:19:41 +02:00
Ehsan Akhgari
271a1e1e51 Bug 1620322 - Part 9: Move ContentBlockingLog to antitracking to keep all related code together in the same place; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D65822

--HG--
rename : dom/base/ContentBlockingLog.cpp => toolkit/components/antitracking/ContentBlockingLog.cpp
rename : dom/base/ContentBlockingLog.h => toolkit/components/antitracking/ContentBlockingLog.h
extra : moz-landing-system : lando
2020-03-09 10:23:30 +00:00
Sean Feng
8511f106a4 Bug 1612128 - Add a new label to BFCACHE_COMBO telemetry probe r=smaug
Add a new label to collect the number of BFCached documents that are not
the only top level documents in their BrowsingContextGroup.

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

--HG--
extra : moz-landing-system : lando
2020-03-06 22:24:08 +00:00
Tim Huang
1e0e0346b8 Bug 1619602 - Part 2: Don't overwrite the existing ContentBlockingAllowListPrincipal when doing a recomputation in the Document. r=dimi,Ehsan
It is incorrect to overwrite the existing
ContentBlockingAllowListPrincipal when doing a recomputaion in the
Document. The ContentBlockingAllowListPrincipal in the document should
be updated in Document::SetPrincipals().

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

--HG--
extra : moz-landing-system : lando
2020-03-05 19:04:31 +00:00
Emilio Cobos Álvarez
6974cefbeb Bug 1619858 - Minimal cleanup of the image lazy loading code. r=hiro
We don't really need to wait till we have an inner window, really.

The mOwner is only used to create a reflector, and we don't even want to expose
this observer to script, so we could leave it null if we wanted.

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

--HG--
extra : moz-landing-system : lando
2020-03-04 21:34:20 +00:00
Tim Huang
04d44bae12 Bug 1616570 - Part 1: Rename CookieSettings to CookieJarSettings. r=Ehsan
Given that we are going to add ContentBlockingAllowList in
CookieSettings, so CookieSettings will be responsible for more stuff than the
cookie behavior and cookie permission. We should use a proper name to
reflect the purpose of it. The name 'CookieSettings' is misleading that
this is only for cookie related stuff. So, we decide to rename
'CookieSettins' to 'CookieJarSettings' which serves better meaning here.

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

--HG--
rename : netwerk/cookie/CookieSettings.cpp => netwerk/cookie/CookieJarSettings.cpp
rename : netwerk/cookie/nsICookieSettings.idl => netwerk/cookie/nsICookieJarSettings.idl
extra : moz-landing-system : lando
2020-03-04 08:59:08 +00:00
Henri Sivonen
2720611cef Bug 1618119 - Check activeness using BrowsingContext in CredentialsContainer. r=jcj
Differential Revision: https://phabricator.services.mozilla.com/D64304

--HG--
extra : moz-landing-system : lando
2020-03-03 15:46:41 +00:00
Christoph Kerschbaumer
de17388af5 Bug 1374612 - CSP: Hide nonce values from the DOM. r=smaug,annevk
Differential Revision: https://phabricator.services.mozilla.com/D62811

--HG--
extra : moz-landing-system : lando
2020-02-29 12:35:46 +00:00
Tom Schuster
0b1dab0c5a Bug 1408122 - Apply prefers-color-scheme: dark to top-level about:blank. r=emilio,bzbarsky
I think during the All Hands in Berlin you might have suggested to do this in nsPresContext::DefaultBackgroundColor,
but this seems a bit more targeted and not a header.

I haven't try tested this yet, so this more of a feedback?

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

--HG--
extra : moz-landing-system : lando
2020-02-28 13:43:02 +00:00
shindli
f5511fecc8 Backed out changeset ec4c2b2a561b (bug 1374612) for causing wpt permafails in /html/dom/reflection-metadata.html CLOSED TREE 2020-02-27 22:46:44 +02:00
Christoph Kerschbaumer
00976af48c Bug 1374612 - CSP: Hide nonce values from the DOM. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D62811

--HG--
extra : moz-landing-system : lando
2020-02-27 18:08:54 +00:00
Dorel Luca
2e1e470d9e Backed out changeset 59fe98b41d80 (bug 1374612) for WPT failures in /html/dom/idlharness.https.html. CLOSED TREE
--HG--
extra : amend_source : a537237327643c365f02c0bfbed643b0d54cf1d5
2020-02-27 14:08:48 +02:00
Christoph Kerschbaumer
ec996a7e9d Bug 1374612 - CSP: Hide nonce values from the DOM. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D62811

--HG--
extra : moz-landing-system : lando
2020-02-27 09:32:04 +00:00
Emilio Cobos Álvarez
449d4bf816 Bug 1617746 - Deal with duplicate adopted stylesheets correctly. r=nordzilla
This also fixes some other bits, like mAdoptedStyleSheets.ElementAt(0) (which
really should be "the first applicable adopted stylesheet") and so on. Added a
test for that.

The new invariant also implies that a DocumentOrShadowRoot can't appear twice in
StyleSheet::mAdopters.

Also clears adopted stylesheets in Document::ResetStylesheetsToURI, as it's the
right thing to do (if you hit that code path with constructable sheets you'd end
up asserting, as we'd call FillStyleSetDocumentSheets after and find sheets in
there). I don't quite have a test-case for that though.

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

--HG--
extra : moz-landing-system : lando
2020-02-27 01:46:17 +00:00
Emilio Cobos Álvarez
0fd680394f Bug 1617746 - Minor cleanup of ServoStyleSet. r=nordzilla
Removing unused arguments and so on.

The origin can always be inferred from the stylesheet so it wasn't being used.

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

--HG--
extra : moz-landing-system : lando
2020-02-27 01:46:10 +00:00
Cosmin Sabou
3497aa8314 Backed out 2 changesets (bug 1617746) assertion failures on ShadowRoot.cpp.
CLOSED TREE
Backed out changeset 6cb30e866b95 (bug 1617746)
Backed out changeset 3543162b815b (bug 1617746)
2020-02-27 01:12:46 +02:00
Emilio Cobos Álvarez
1292de292e Bug 1617746 - Deal with duplicate adopted stylesheets correctly. r=nordzilla
This also fixes some other bits, like mAdoptedStyleSheets.ElementAt(0) (which
really should be "the first applicable adopted stylesheet") and so on. Added a
test for that.

The new invariant also implies that a DocumentOrShadowRoot can't appear twice in
StyleSheet::mAdopters.

Also clears adopted stylesheets in Document::ResetStylesheetsToURI, as it's the
right thing to do (if you hit that code path with constructable sheets you'd end
up asserting, as we'd call FillStyleSetDocumentSheets after and find sheets in
there). I don't quite have a test-case for that though.

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

--HG--
extra : moz-landing-system : lando
2020-02-26 21:20:05 +00:00
Emilio Cobos Álvarez
28effe5605 Bug 1617746 - Minor cleanup of ServoStyleSet. r=nordzilla
Removing unused arguments and so on.

The origin can always be inferred from the stylesheet so it wasn't being used.

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

--HG--
extra : moz-landing-system : lando
2020-02-26 21:20:38 +00:00
Simon Giesecke
d94419173b Bug 1613985 - Use default for equivalent-to-default constructors/destructors in dom/base. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D63102

--HG--
extra : moz-landing-system : lando
2020-02-21 10:41:47 +00:00
Simon Giesecke
9350e6b741 Bug 1613985 - Use MOZ_COUNTED_DEFAULT_CTOR_*/MOZ_COUNTED_DTOR_* macros. r=froydnj
This removes the need for explicit #ifdef NS_BUILD_REFCNT_LOGGING without
introducing user-defined destructors when it is not defined.

Also, some uses of virtual for declaring destructors are replaced by the
appropriate override declaration through these changes.

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

--HG--
extra : moz-landing-system : lando
2020-02-20 11:40:14 +00:00
Dorel Luca
d5f9df8ee1 Backed out 2 changesets (bug 1613985) for Build bustage on Windows2012. CLOSED TREE
Backed out changeset fd177b40b561 (bug 1613985)
Backed out changeset fb6d62b7f28d (bug 1613985)
2020-02-19 22:22:41 +02:00
Simon Giesecke
59b23375c0 Bug 1613985 - Use MOZ_COUNTED_DEFAULT_CTOR_*/MOZ_COUNTED_DTOR_* macros. r=froydnj
This removes the need for explicit #ifdef NS_BUILD_REFCNT_LOGGING without
introducing user-defined destructors when it is not defined.

Also, some uses of virtual for declaring destructors are replaced by the
appropriate override declaration through these changes.

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

--HG--
extra : moz-landing-system : lando
2020-02-19 18:05:38 +00:00
Nika Layzell
3263c02cc5 Bug 1609324 - Disable BFCache when remote subframes are present, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D62831

--HG--
extra : moz-landing-system : lando
2020-02-16 13:40:12 +00:00
Masayuki Nakano
a5deb4a2c5 Bug 1611374 - Disallow nested Document.execCommand() calls in Nightly and early Beta r=smaug
Chrome does not allow nested `Document.execCommand()` calls:
https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/renderer/core/editing/commands/document_exec_command.cc;l=75;drc=301e5d079a1b4c29c5b17574d0470e6db7370acc

On the other hand, Safari (and Firefox) allows it.  However, it's worthwhile to
follow Chrome's behavior.

This patch makes `Document::ExecCommand()` return `false` when it's called
while running another `Document::ExecCommand()` call on Nightly and early Beta.
This is exactly same behavior, and we should watch broken web apps reports
for a while before riding this on the train.

And this patch sets the pref to `true` when all crash tests under
`editor/libeditor/crashtests` which depend on nested calls of `execCommand` run
since same things may be reproducible with other DOM APIs.

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

--HG--
extra : moz-landing-system : lando
2020-02-15 19:17:00 +00:00
Erik Nordin
14304c1fdf Bug 1609288 - Apply styles from adopted stylesheets r=emilio
- Ensure that adopted styles are applied correctly to ShadowRoot
- Ensure that adopted styles are applied correctly to Document
- Add new WPT test cases to ensure the ordering of the styles.

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

--HG--
extra : moz-landing-system : lando
2020-02-15 01:16:46 +00:00
Hiroyuki Ikezoe
8398acfafe Bug 1542784 - Implement lazy loading for images. r=emilio,hsivonen
Though with this initial implementation, we do create an IntersectionObserver
only for the root document in each processes, once we found issues on this
model, we can create an IntersectionObserver in each _document_.

Depends on D61437

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

--HG--
extra : moz-landing-system : lando
2020-02-12 21:31:48 +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
Emilio Cobos Álvarez
2727cf28b8 Bug 1612470 - Remove Document.hasScriptsBlockedBySandbox and Document.inlineScriptAllowedByCSP. r=bzbarsky
Seems they were only used for the old XBL marquee implementation and have no
remaining callers.

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

--HG--
extra : moz-landing-system : lando
2020-02-04 21:20:32 +00:00
Dimi Lee
f9ac16c330 Bug 1599046 - P1. Remove ContentBlockingLog from the child r=timhuang,Ehsan
At this point, there is no consumer that uses ContentBlockingLog stored
in the child. This patch removes the following code:
1. Removing nsGlobalWindowOuter::NotifyContentBlockingEvent
2. Removing nsDocLoader::OnContentBlockingEvent
3. Removing contentBlockingEvent in nsISecureBrowserUI.idl
4. Removing mContentBlockingLog from Document.cpp and APIs related to it.

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

--HG--
extra : moz-landing-system : lando
2020-01-27 10:39:41 +00:00
Brindusan Cristian
00b2950b8d Backed out 4 changesets (bug 1599046) for xpcshell failures at test_ext_cookieBehaviors. CLOSED TREE
Backed out changeset 721f54870498 (bug 1599046)
Backed out changeset 2e165c119a4f (bug 1599046)
Backed out changeset 2bc0fa3bbe0e (bug 1599046)
Backed out changeset 805fb67be8a3 (bug 1599046)
2020-01-27 12:36:11 +02:00
Dimi Lee
ffdfd5d51a Bug 1599046 - P1. Remove ContentBlockingLog from the child r=timhuang,Ehsan
At this point, there is no consumer that uses ContentBlockingLog stored
in the child. This patch removes the following code:
1. Removing nsGlobalWindowOuter::NotifyContentBlockingEvent
2. Removing nsDocLoader::OnContentBlockingEvent
3. Removing contentBlockingEvent in nsISecureBrowserUI.idl
4. Removing mContentBlockingLog from Document.cpp and APIs related to it.

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

--HG--
extra : moz-landing-system : lando
2020-01-27 09:13:12 +00:00
Dimi Lee
dc9c52a9d5 Bug 1601660 - Part 2: Remove getContentBlockingLog from nsIDocShell.idl r=Ehsan
This patch removes the unnecessary getContentBlockingLog function from
nsIDocShell.idl.

Depends on D57464

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

--HG--
extra : moz-landing-system : lando
2020-01-24 11:06:49 +00:00
Oana Pop Rus
1d2bce24ac Backed out 2 changesets (bug 1601660) for gv-junit failures in ContentBlockingControllerTest. on a CLOSED TREE
Backed out changeset ec5d3b078a88 (bug 1601660)
Backed out changeset 06001b30f6cd (bug 1601660)
2020-01-22 12:06:22 +02:00
Dimi Lee
da3402759d Bug 1601660 - Part 2: Remove getContentBlockingLog from nsIDocShell.idl r=Ehsan
This patch removes the unnecessary getContentBlockingLog function from
nsIDocShell.idl.

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

--HG--
extra : moz-landing-system : lando
2020-01-06 20:00:51 +00:00
Emilio Cobos Álvarez
cf6728cdd2 Bug 1610059 - Rename Document::SetStyleSheetApplicableState. r=nordzilla
It doesn't set anything, it is just a notification callback.

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

--HG--
extra : moz-landing-system : lando
2020-01-22 01:14:42 +00:00
Emilio Cobos Álvarez
8a7906f381 Bug 1610064 - Avoid including StyleSheet.h from Document.h. r=nordzilla,firefox-style-system-reviewers
This in turn requires fixing various other include hell / missing include
issues.

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

--HG--
extra : moz-landing-system : lando
2020-01-21 20:31:05 +00:00
Makoto Kato
163a589174 Bug 1574307 - Part 2. Add nsIDOMWindowUtils.getViewportFitInfo r=smaug
Per discussing with @hiro, we should add new method to get viewport-fit
instead of adding parameter of `nsIDOMWindowUtils.getViewportInfo`.

Depends on D55609

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

--HG--
extra : moz-landing-system : lando
2020-01-20 08:40:20 +00:00
Makoto Kato
a94e918a29 Bug 1574307 - Part 1. Parse viewport-fit in meta element. r=smaug
For safe area insets (cutout) support, CSS Round Display Level 1 (https://drafts.csswg.org/css-round-display/#viewport-fit-descriptor) has new viewport value as `viewport-fit`.

To support safe area insets that is notch on display, CSS Environment Variables Module Level 1 (https://drafts.csswg.org/css-env-1/#safe-area-insets) adds `safearea-insets-*` (left, top, right and bottom). Also, `meta` element has `viewport-fit` enum value. (ex `<meta name="viewport" content="viewport-fit=cover>`) whether web browser window cover notch area.

`viewport-fit` has 3 enum value, `auto`, `cover` and `contain`.  GeckoView wants to expose this value to browser application such Fenix. Because Android API (https://developer.android.com/guide/topics/display-cutout) uses window root layout (It is set by Application) to cover notch on display.

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

--HG--
extra : moz-landing-system : lando
2020-01-20 08:40:05 +00:00
Brad Werth
465b225500 Bug 1569626 Part 1: Save and restore the presshell resolution when creating and destroying an MVM. r=botond
We need the resolution to be restored when and if the presshell creates
a MobileViewportManager. That decision happens in
PresShell::UpdateViewportOverridden. In order for the resolution to be
saved somewhere it has to exist outside the presshell itself, since
the presshell will be destroyed and recreated during some of the
operations that also destroy the MVM -- such as closing the devtools'
Responsive Design Mode. So Document holds this resolution and gets
accessor methods to allow the presshell to get and set that resolution
as needed.

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

--HG--
extra : moz-landing-system : lando
2020-01-17 21:57:56 +00:00