Commit Graph

379 Commits

Author SHA1 Message Date
Brendan Dahl
247b257cfa Bug 1470510 - Rename nsXULWindow and nsIXULWindow to AppWindow and nsIAppWindow. r=smaug
nsXULWindow is no longer XUL specific and is somewhat confusing name.

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

--HG--
rename : xpfe/appshell/nsXULWindow.cpp => xpfe/appshell/AppWindow.cpp
rename : xpfe/appshell/nsXULWindow.h => xpfe/appshell/AppWindow.h
rename : xpfe/appshell/nsIXULWindow.idl => xpfe/appshell/nsIAppWindow.idl
extra : moz-landing-system : lando
2019-11-04 16:52:35 +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
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
Nihanth Subramanya
2164478f1e Bug 1584479 - Part 1: Add flag for blocked social cookies in the content blocking log. r=Ehsan,droeh
Differential Revision: https://phabricator.services.mozilla.com/D47427

--HG--
extra : moz-landing-system : lando
2019-11-01 23:24:25 +00:00
Dorel Luca
b9074d53a1 Backed out 4 changesets (bug 1584479) for Browser-chrome failures in toolkit/components/antitracking/test/browser/browser_socialtracking.js
Backed out changeset b0d9877bd8b0 (bug 1584479)
Backed out changeset d2c56bd61b08 (bug 1584479)
Backed out changeset 0edb22786545 (bug 1584479)
Backed out changeset 7e03b392edb3 (bug 1584479)
2019-11-02 01:18:42 +02:00
Nihanth Subramanya
e7620d9a8c Bug 1584479 - Part 1: Add flag for blocked social cookies in the content blocking log. r=Ehsan,droeh
Differential Revision: https://phabricator.services.mozilla.com/D47427

--HG--
extra : moz-landing-system : lando
2019-11-01 21:02:09 +00:00
Brian Birtles
e50dce95ba Bug 1590971 - Move getAnimations from Document to DocumentOrShadowRoot; r=emilio,baku
This updates the Gecko implementation to match the following change to
the Web Animations spec:

  792453b952 (diff-4c9f5c055fb219a7fcad23a9a7a80b64)

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

--HG--
rename : testing/web-platform/tests/web-animations/interfaces/Document/getAnimations.html => testing/web-platform/tests/web-animations/interfaces/DocumentOrShadowRoot/getAnimations.html
extra : moz-landing-system : lando
2019-10-29 07:13:22 +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
Ehsan Akhgari
7a111612cb Bug 1588614 - Cache the document's effective storage principal to avoid running excessive anti-tracking checks; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D49791

--HG--
extra : moz-landing-system : lando
2019-10-21 12:53:38 +00:00
Abdoulaye Oumar Ly
c558bed276 Bug 1505916 - [Fission] Part 2: Make the fullscreen code work with oop iframes. r=NeilDeakin,smaug
e10s scenario:
1. An DOM element request fulscreen mode.
2. The request is redirected to the parent.
3. Parent enters fullscreen.
4. Parent notifies child that it has finished entering fullscreen.
5. Child goes fullscreen.
6. Then, child notifies parent that it has finished transitioning to fullscreen.
4. Finally, parent notify observers that fullscreen paint has finished.

Let's go into the details of how step 5 works in the above scenario.
5.a The element that made the request is set to fullscreen.
5.b Then, the document where that element lives is set to fullscreen as well as all of its ancestors until we reach the top level document. (see Document::ApplyFulscreen method)

Now in Fission world, we may have a request comming from an oop iframe. And it that case since we won't have  to ancestor documents living in different content process(es), we will first notiy those content processes (one after another from bottom to top) to go fullscreen. Once they all do, the content process where the request originated will be told to enter fullscreen.

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

--HG--
extra : moz-landing-system : lando
2019-10-11 14:30:28 +00:00
Ehsan Akhgari
8d1f83f075 Bug 1587806 - Remove Document.loadBindingDocument; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D48849

--HG--
extra : moz-landing-system : lando
2019-10-10 14:21:28 +00:00
Emilio Cobos Álvarez
3c4c6733b5 Bug 1587797 - Simplify FlushPendingLinkUpdates. r=smaug
It's only called from a runnable nowadays.

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

--HG--
extra : moz-landing-system : lando
2019-10-10 14:29:18 +00:00
Brendan Dahl
c68cd30ef2 Bug 1510785 - Only build XBL related code when MOZ_XBL is defined. r=bzbarsky
When XBL is disabled, no code in dom/xbl will be built. Also, adds ifdefs
to remove any of the XBL related code elsewhere. There's definitely more
that can be done here, but I think it's better to wait to do the rest of
the cleanup when we actually remove the code.

Depends on D45612

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

--HG--
extra : moz-landing-system : lando
2019-10-08 23:52:14 +00:00
Jonathan Kingston
e7760ef29c Bug 1585604 - Remove telemetry for mixed object subrequst counting. r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D47888

--HG--
extra : moz-landing-system : lando
2019-10-02 11:17:28 +00:00
Sebastian Streich
88670a47e9 Bug 1580782 - Change Callsites to use nsIPrincipal->SchemeIs r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D45654

--HG--
extra : moz-landing-system : lando
2019-09-26 10:47:16 +00:00
Botond Ballo
dcc1e04b0f Bug 1513090 - Follow up to remove non-unicode character from comment. r=tnguyen. DONTBUILD for comment-only change
Differential Revision: https://phabricator.services.mozilla.com/D47103

--HG--
extra : moz-landing-system : lando
2019-09-25 15:45:56 +00:00
Emilio Cobos Álvarez
2e05768081 Bug 1578379 - Make pageshow / pagehide during frame loader swaps not mess with document visibility. r=bzbarsky
Also while doing it:

 * Ensure activity observers get notified after visibility is computed already.
This is how we notify all other activity observers already, and we are
double-notifying in the case we actually get a page show _and_ a visibility
change, but this is a pre-existing problem.

 * Remove special-cases for InFrameSwap() from MediaRecorder. Now that pagehide
doesn't mess up with our visibility state the regular check just works. I
ensured I didn't regress bug 1444541.

 * Had to fix a UITour test that relied on the visibility changing back and
forth for the detached tab. It seems there's no real place in UITour that
listens to that event so we should be good.

 * Added tests, verifying that they both fail without the patch.

After this we can remove nsDocShell::InFrameSwap(), as the only caller is the
assertion, but I wanted to keep it regardless, at least for now, until this
patch has been in for a bit.

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

--HG--
extra : moz-landing-system : lando
2019-09-23 10:16:44 +00:00
Bogdan Tara
8675cadd18 Backed out changeset d984fd004e7e (bug 1578379) for ES lint failure on browser_tab_replace_while_loading.js CLOSED TREE 2019-09-23 13:00:56 +03:00
Emilio Cobos Álvarez
10fa3b178f Bug 1578379 - Make pageshow / pagehide during frame loader swaps not mess with document visibility. r=bzbarsky
Also while doing it:

 * Ensure activity observers get notified after visibility is computed already.
This is how we notify all other activity observers already, and we are
double-notifying in the case we actually get a page show _and_ a visibility
change, but this is a pre-existing problem.

 * Remove special-cases for InFrameSwap() from MediaRecorder. Now that pagehide
doesn't mess up with our visibility state the regular check just works. I
ensured I didn't regress bug 1444541.

 * Had to fix a UITour test that relied on the visibility changing back and
forth for the detached tab. It seems there's no real place in UITour that
listens to that event so we should be good.

 * Added tests, verifying that they both fail without the patch.

After this we can remove nsDocShell::InFrameSwap(), as the only caller is the
assertion, but I wanted to keep it regardless, at least for now, until this
patch has been in for a bit.

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

--HG--
extra : moz-landing-system : lando
2019-09-23 09:36:59 +00:00
Thomas Nguyen
cf867199bc Bug 1560570- FeaturePolicy should be considered when permissions.query() is called r=baku,johannh
Differential Revision: https://phabricator.services.mozilla.com/D44210

--HG--
extra : moz-landing-system : lando
2019-09-21 08:38:26 +00:00
Edgar Chen
a159f19187 Bug 1578355 - Part 3: Add the ability to consume transient user activation; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D45353

--HG--
extra : moz-landing-system : lando
2019-09-20 11:10:13 +00:00
Daniel Varga
bc19cdb06d Backed out 3 changesets (bug 1578355) for build bustage at build/src/dom/base/nsSyncLoadService.h:48:21. On a CLOSED TREE
Backed out changeset d50ad759f129 (bug 1578355)
Backed out changeset 339ab54ca471 (bug 1578355)
Backed out changeset 284299dac42c (bug 1578355)
2019-09-20 14:05:12 +03:00
Edgar Chen
288ff16a76 Bug 1578355 - Part 3: Add the ability to consume transient user activation; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D45353

--HG--
extra : moz-landing-system : lando
2019-09-20 10:31:59 +00:00
Jon Coppeard
3fd1d3324c Bug 1582124 - Break Document cycles when they are destroyed r=smaug
This patch nulls out a Document's promises when it is destroyed to break cycles going through them and ensure Documents are cleaned up sooner.

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

--HG--
extra : moz-landing-system : lando
2019-09-19 13:41:44 +00:00
Emilio Cobos Álvarez
6c211da0ae Bug 1582374 - Add a warning when we find usage of the CSS zoom property. r=smaug,flod
Now that we count them, I think we should do this.

This property is pretty painful for various reasons:

 * It's a pretty awkward non-standard property.
 * Has a pretty short name, so people use it instead of the standard
   alternatives.
 * We cannot really even implement it easily anyhow, without breaking a whole
   bunch of stuff, because pages do things like:

```
myelement {
  zoom: 0.5;
  -moz-transform: scale(0.5);
  transform-origin: 0 0;
}
```

For now this is only recorded when CSS use counters are enabled (Nightly for
now), but I want to change it once bug 1578661 is in central.

The hope is that this warning slightly raises awareness of this property not
being standard. You get a CSS parsing error in the console, but those are
usually too noisy and disabled by default.

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

--HG--
extra : moz-landing-system : lando
2019-09-20 01:31:35 +00:00
Emilio Cobos Álvarez
e0fd226116 Bug 1582373 - Cleanup Document::SetReadyStateInternal. r=smaug
Just use conventions properly. As much as I dislike it.

I wanted to do it because I wanted to add a console message on load for a few
situations (bug 1582374), but I found a better place to put it.

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

--HG--
extra : moz-landing-system : lando
2019-09-20 01:06:58 +00:00
Emilio Cobos Álvarez
2b159772ee Bug 1578661 - Merge the stylesheet use counters, report them, and add tests. r=boris
C'est fini. Now to do the same with the unimplemented ones remains, but it
should be straight-forward.

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

--HG--
extra : moz-landing-system : lando
2019-09-19 00:19:59 +00:00
Cosmin Sabou
2978a72248 Backed out 10 changesets (bug 1578661) for linting failures on layout/style/ServoCSSPropList.py. CLOSED TREE
Backed out changeset b1b5393b1099 (bug 1578661)
Backed out changeset b87eebb0cf6e (bug 1578661)
Backed out changeset 6ba2ee45f26e (bug 1578661)
Backed out changeset 4a1d45160d60 (bug 1578661)
Backed out changeset 7a5687bebc02 (bug 1578661)
Backed out changeset 33c306c9020a (bug 1578661)
Backed out changeset 89d7e6fb24b0 (bug 1578661)
Backed out changeset 42c4943e569b (bug 1578661)
Backed out changeset 88d988a80de1 (bug 1578661)
Backed out changeset 78c90f9e9eee (bug 1578661)
2019-09-19 01:50:03 +03:00
Emilio Cobos Álvarez
65b3948518 Bug 1578661 - Merge the stylesheet use counters, report them, and add tests. r=boris
C'est fini. Now to do the same with the unimplemented ones remains, but it
should be straight-forward.

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

--HG--
extra : moz-landing-system : lando
2019-09-18 15:15:24 +00:00
Andreea Pavel
7494b360c0 Backed out 10 changesets (bug 1578661) for lints failure at ServoCSSPropList.cpp on a CLOSED TREE
Backed out changeset ed3c619100e7 (bug 1578661)
Backed out changeset 027514a2eaf6 (bug 1578661)
Backed out changeset f2e228282b20 (bug 1578661)
Backed out changeset 67c36136dce7 (bug 1578661)
Backed out changeset 2280b27cc130 (bug 1578661)
Backed out changeset 445d13a2c452 (bug 1578661)
Backed out changeset 89caaa850049 (bug 1578661)
Backed out changeset 2f8be5db1786 (bug 1578661)
Backed out changeset 51a015a9a0f8 (bug 1578661)
Backed out changeset ad8e1f27a600 (bug 1578661)
2019-09-18 18:09:30 +03:00
Emilio Cobos Álvarez
6021f6b576 Bug 1578661 - Merge the stylesheet use counters, report them, and add tests. r=boris
C'est fini. Now to do the same with the unimplemented ones remains, but it
should be straight-forward.

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

--HG--
extra : moz-landing-system : lando
2019-09-18 12:04:44 +00:00
Andreea Pavel
31ca3fda59 Backed out 9 changesets (bug 1578661) for lints failure at ServoCSSPropList.py a=backout
Backed out changeset d16463e5698c (bug 1578661)
Backed out changeset c6d64ac858ba (bug 1578661)
Backed out changeset db306f1467f7 (bug 1578661)
Backed out changeset 273535aab82d (bug 1578661)
Backed out changeset f643262a8c25 (bug 1578661)
Backed out changeset b0db409ada96 (bug 1578661)
Backed out changeset dc96d13728e0 (bug 1578661)
Backed out changeset 11e1e8f0a1b7 (bug 1578661)
Backed out changeset 6dd7a0d914d9 (bug 1578661)
2019-09-18 13:53:34 +03:00
Emilio Cobos Álvarez
4a3f70732b Bug 1578661 - Merge the stylesheet use counters, report them, and add tests. r=boris
C'est fini. Now to do the same with the unimplemented ones remains, but it
should be straight-forward.

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

--HG--
extra : moz-landing-system : lando
2019-09-18 02:31:21 +00:00
prathiksha
3e3db51f40 Bug 1561443 - Expose error code string to about:neterror with webidl. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D45540

--HG--
extra : moz-landing-system : lando
2019-09-17 07:51:57 +00:00
Emilio Cobos Álvarez
b39ed7bca4 Bug 1578379 - Remove some silly ifdefs. r=bzbarsky
mDummy doesn't even exist anymore.

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

--HG--
extra : moz-landing-system : lando
2019-09-14 03:13:07 +00:00
Edgar Chen
493285c71b Bug 1577499 - Part 2: Add tests for transient user activation; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D44544

--HG--
extra : moz-landing-system : lando
2019-09-06 22:48:52 +00:00
Emilio Cobos Álvarez
7df79853f9 Bug 1578700 - Change use counter setup to propagate the page use counters together. r=smaug
This is so that SetUseCounter is as cheap as possible.

This is in preparation for hooking the CSS use counters to telemetry. We want
CSS use counters to be fast and be propagated at once to the parent page. This
will make sure to use the same setup as everywhere else.

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

--HG--
extra : moz-landing-system : lando
2019-09-04 23:36:21 +00:00
Emilio Cobos Álvarez
e326de9e60 Bug 1578700 - Simplify SetDocumentUseCounter. r=smaug
It's just a bit flag, should be no need of checking whether the bit is set
before.

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

--HG--
extra : moz-landing-system : lando
2019-09-04 22:10:40 +00:00
Ehsan Akhgari
86c74f0485 Bug 1576641 - Add two new content blocking event flags to indicate a tracking/social-tracking cookie has been loaded in a tab; r=baku,droeh
Differential Revision: https://phabricator.services.mozilla.com/D44216

--HG--
extra : moz-landing-system : lando
2019-09-03 17:37:43 +00:00
Edgar Chen
ff387f6937 Bug 1576627 - Move MaybeNotifyAutoplayBlocked from Document to HTMLMediaElement; r=alwu
Given that it is used only in HTMLMediaElement.

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

--HG--
extra : moz-landing-system : lando
2019-08-27 21:22:19 +00:00
Julian Descottes
541fe531d2 Bug 1575766 - Set mIsDevToolsDocument on DevTools documents r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D43639

--HG--
extra : moz-landing-system : lando
2019-08-28 19:08:17 +00:00
Logan Smyth
66e57fe122 Bug 1562708 - Allow disabling of the mutation event warning for system-group event listeners. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D43147

--HG--
extra : moz-landing-system : lando
2019-08-23 14:35:05 +00:00
Edgar Chen
a3adabe5a7 Bug 1568950 - Part 5: Remove nsIDOMWindowUtils::forceUseCounterFlush; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D42818

--HG--
extra : moz-landing-system : lando
2019-08-21 12:52:19 +00:00
Thomas Nguyen
cf20303f06 Bug 1528697 - Remove ReferrerPolicy.h and add utils to ReferrerInfo r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D41956

--HG--
extra : moz-landing-system : lando
2019-08-21 12:09:06 +00:00
Thomas Nguyen
32ab8293ff Bug 1528697 - Expose ReferrerPolicy.webidl and use referrerpolicy enum r=smaug
ReferrerPolicy gets tossed back and forth as a uint32_t and
ReferrerPolicy enum in header file. Expose ReferrerPolicyValues from
webidl file and use consistently in native code.

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

--HG--
extra : moz-landing-system : lando
2019-08-21 13:24:45 +00:00
Ehsan Akhgari
a9f1a2a5c2 Bug 1575335 - Avoid creating an extra copy of the file name URI when checking whether the currently running script is from a tracker; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D42706

--HG--
extra : moz-landing-system : lando
2019-08-20 20:58:57 +00:00
Ehsan Akhgari
575c480fc5 Bug 1572240 - Part 3: Introduce nsIHttpChannelInternal.contentBlockingAllowListPrincipal; r=michal
Differential Revision: https://phabricator.services.mozilla.com/D42204

--HG--
extra : moz-landing-system : lando
2019-08-19 19:38:50 +00:00
Ehsan Akhgari
7b2ff7275b Bug 1572240 - Part 1: Introduce Document.contentBlockingAllowListPrincipal; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D42202

--HG--
extra : moz-landing-system : lando
2019-08-19 14:38:32 +00:00
Kagami Sascha Rosylight
25862fe2eb Bug 1572349 - Add Document::ResolveWithBaseURI. r=bzbarsky
Summary: This adds a helper method that enables simpler code in D41047 and D36714.

Reviewers: bzbarsky, marcosc

Reviewed By: bzbarsky

Bug #: 1572349

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

--HG--
extra : histedit_source : 9a8904a71bfeda594a5e3900c39e096e90dc83e1
2019-08-16 03:38:31 +03:00
Ehsan Akhgari
56e165b9ce Bug 1573236 - Part 1: Move the Storage Access API heuristics and telemetry from the front-end to Gecko; r=johannh,baku
This will allow these heuristics to be used on mobile.
This depends on GeckoView supporting a JavaScript module
at resource:///modules/BrowserUsageTelemetry.jsm with the
interface described in nsIBrowserUsage.idl.  Bug 1573238 has
been filed in order to implement this module on GeckoView.

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

--HG--
extra : moz-landing-system : lando
2019-08-14 21:00:51 +00:00
Hiroyuki Ikezoe
10f4aacd62 Bug 1508177 - Reftests that check scrollbars are properly appeared by the difference between visual and layout viewports. r=botond,tnikkel
scrollbars-in-landscape-content.html doesn't fail on environments where we don't
use overlay scrollbars because scrollbars for the visual viewport are not
rendered there.

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

--HG--
extra : moz-landing-system : lando
2019-08-13 22:37:54 +00:00
Brendan Dahl
b474db77c6 Bug 1551344 - Part 1: Remove XULDocument code. r=smaug,Jamie
All .xul files have been loading as HTMLDocuments for a few weeks now, so
it should be safe to remove the XULDocument implementation.

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

--HG--
extra : moz-landing-system : lando
2019-08-09 19:57:50 +00:00
Zibi Braniecki
90adb39db2 Bug 1517880 - Accumulate l10n elements from prototype during document loading. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D38970

--HG--
extra : moz-landing-system : lando
2019-07-26 20:19:26 +00:00
Zibi Braniecki
ad66c0ca23 Bug 1517880 - Clean up the XUL Prototype a bit. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D34827

--HG--
extra : moz-landing-system : lando
2019-07-26 20:16:22 +00:00
Gurzau Raul
776258cda0 Backed out 5 changesets (bug 1517880) on request from gandalf on a CLOSED TREE.
Backed out changeset 39c3063994bf (bug 1517880)
Backed out changeset 45bf070f451b (bug 1517880)
Backed out changeset d2b9e6bbb4cb (bug 1517880)
Backed out changeset 3bd43f3e288a (bug 1517880)
Backed out changeset 3b54c85a747b (bug 1517880)
2019-07-26 23:09:57 +03:00
Zibi Braniecki
8c51af17fd Bug 1517880 - Accumulate l10n elements from prototype during document loading. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D38970

--HG--
extra : moz-landing-system : lando
2019-07-26 17:12:08 +00:00
Zibi Braniecki
52c27c1da9 Bug 1517880 - Clean up the XUL Prototype a bit. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D34827

--HG--
extra : moz-landing-system : lando
2019-07-26 16:11:40 +00:00
Kannan Vijayan
3fb6190ec6 Bug 1559414 - Rename unaudited pre-fission methods with SameProcess for future audit burndown. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D39378

--HG--
extra : moz-landing-system : lando
2019-07-26 16:48:31 +00:00
Hiroyuki Ikezoe
2feab69a17 Bug 1498729 - Store each viewport meta data by the viewport meta tag and use the last one. r=smaug,botond
This is what Chrome and Safari do.
See https://webcompat.com/issues/20701#issuecomment-436054739


So for exmaple, if there are two viewport meta tags like this;

 <meta name="viewport" content="width=980">
 <meta name="viewport" content="initial-scale=1,maximum-scale=1">

We will use "initial-scale=1,maximum-scale=1".  Before this change we used to
use merged "width=980,initial-scale=1,maximum-scale=1".

Another example is to replace the content of a single viewport meta tag like this;

 <meta id="viewport" name="viewport" content="width=device-width, initial-scale=1">

what will happen when this tag is replaced by below;

 <meta id="viewport" name="viewport" content="width=1080">

We will use the replacing one (i.e. "width=1080"), before this change, we used
to use merged "width=1080,initial-scale=1".

As of this commit, we don't properly remove corresponding viewport meta data
when a) viewport meta tag is detached from document and b) `name` attribute is
changed from 'viewport'.  These cases will be handled in subsequent commits.

Note that we no longer store invididual viewport meta data in Document::mHeaderData
so that nsIDOMWindowUtils.getDocumentMetadata doesn't work any more for the
invididual viewport meta data, but there is no use cases for them other than
two test cases which are removed in this commit.

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

--HG--
extra : moz-landing-system : lando
2019-07-25 20:51:23 +00:00
Olli Pettay
9eeb5dab4f Bug 1541229, higher minimum idle period during page load, r=farre
Differential Revision: https://phabricator.services.mozilla.com/D37908

--HG--
extra : moz-landing-system : lando
2019-07-16 12:07:49 +00:00
Thomas Nguyen
fc05893051 Bug 1546334 - Use referrerInfo in style system. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D36478

--HG--
extra : moz-landing-system : lando
2019-07-16 11:43:56 +00:00
Boris Zbarsky
dfc54dca0e Bug 1565767 part 1. Stop returning addrefed URIs from GetBaseURI(). r=peterv
We only needed this for xml:base.

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

--HG--
extra : moz-landing-system : lando
2019-07-15 17:22:30 +00:00
Ehsan Akhgari
1000118805 Bug 1565373 - Use the intrinsic storage principal when inheriting directly; r=baku
We shouldn't perform an anti-tracking check here, since that may result
in us picking the node principal unintentionally.

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

--HG--
extra : moz-landing-system : lando
2019-07-12 09:08:38 +00:00
Boris Zbarsky
f471fc6507 Bug 1564663. Clean up the arguments to document.open to align better with the spec. r=mbrodesser
Differential Revision: https://phabricator.services.mozilla.com/D37642

--HG--
extra : moz-landing-system : lando
2019-07-11 16:30:27 +00:00
Emilio Cobos Álvarez
28801c9e84 Bug 1218456 - Allow navigating when there's no pres context. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D37404
2019-07-09 23:07:29 +02:00
Emilio Cobos Álvarez
54b3d5a085 Bug 1218456 - Document::GetContainer shouldn't be virtual. r=smaug
It's never overridden. Also chances are we should remove it and just use
GetDocShell().

Differential Revision: https://phabricator.services.mozilla.com/D37405
2019-07-09 23:07:01 +02:00
Dorel Luca
9925ca654c Backed out 5 changesets (bug 1218456) for Crashtest failures on dom/l10n/tests/mochitest/dom_localization/test_overlay.html. CLOSED TREE
Backed out changeset 31afe89c2d42 (bug 1218456)
Backed out changeset 8bd57ebc4528 (bug 1218456)
Backed out changeset e5d37afff36a (bug 1218456)
Backed out changeset e3da86278ecf (bug 1218456)
Backed out changeset 343046089f8e (bug 1218456)

--HG--
extra : rebase_source : f092d903c8c80581d187493e036b1875d8668b3d
2019-07-09 22:04:13 +03:00
Ehsan Akhgari
b4583cafa5 Bug 1558571 - Move HTMLDocument.all to Document; r=farre
Differential Revision: https://phabricator.services.mozilla.com/D34569

--HG--
extra : moz-landing-system : lando
2019-07-09 18:09:40 +00:00
Dorel Luca
f2dfa057a6 Backed out changeset 4bacb947e991 (bug 1558571) for WPT failures on /xhr/responsexml-document-properties.html 2019-07-09 20:45:41 +03:00
Emilio Cobos Álvarez
0dd64968c6 Bug 1218456 - Document::GetContainer shouldn't be virtual. r=smaug
It's never overridden. Also chances are we should remove it and just use
GetDocShell().

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

--HG--
extra : moz-landing-system : lando
2019-07-09 16:17:38 +00:00
Emilio Cobos Álvarez
d5db3842a0 Bug 1218456 - Allow navigating when there's no pres context. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D37404

--HG--
extra : moz-landing-system : lando
2019-07-09 16:17:27 +00:00
Ehsan Akhgari
9f6d9e9359 Bug 1558571 - Move HTMLDocument.all to Document; r=farre
Differential Revision: https://phabricator.services.mozilla.com/D34569

--HG--
extra : moz-landing-system : lando
2019-07-08 18:49:45 +00:00
Hiroyuki Ikezoe
e1744fe34b Bug 1564021 - Use the default desktop width (980px) in the case where we have any viewport meta element but no valid content there. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D37329

--HG--
extra : moz-landing-system : lando
2019-07-09 01:56:34 +00:00
Ehsan Akhgari
127357ac73 Bug 1558570 - Move HTMLDocument.clear/captureEvents/releaseEvents to Document; r=farre
Differential Revision: https://phabricator.services.mozilla.com/D34567

--HG--
extra : moz-landing-system : lando
2019-07-08 21:59:10 +00:00
Jonathan Kingston
31441f82ea Bug 1560455 - rename CodebasePrincipal to ContentPrincipal. r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D35504

--HG--
extra : moz-landing-system : lando
2019-07-08 16:37:45 +00:00
Alex Catarineu
a8b667f825 Bug 467035 - Avoid leaking browser language via DTD r=Gijs,bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D34187

--HG--
extra : moz-landing-system : lando
2019-07-08 10:47:05 +00:00
Andrea Marchesini
e87202df68 Bug 1514296 - Rename Document.policy to Document.featurePolicy, r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D35801

--HG--
extra : moz-landing-system : lando
2019-07-08 00:10:56 +00:00
Ciure Andrei
d94259f899 Backed out 2 changesets (bug 1514296) for causing beta simulation failures CLOSED TREE
Backed out changeset 88f4a687f039 (bug 1514296)
Backed out changeset fe343795c247 (bug 1514296)
2019-07-08 03:03:22 +03:00
Andrea Marchesini
e01cab332f Bug 1514296 - Rename Document.policy to Document.featurePolicy, r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D35801

--HG--
extra : moz-landing-system : lando
2019-07-06 15:10:59 +00:00
Cosmin Sabou
56754efbdb Backed out 3 changesets (bug 1514474, bug 1514296) for mochitest failures on test_featureList.html. CLOSED TREE
Backed out changeset 52ae606e4cfa (bug 1514296)
Backed out changeset e74168e44dd7 (bug 1514474)
Backed out changeset a43f3aa0ea77 (bug 1514296)
2019-07-03 17:29:15 +03:00
Andrea Marchesini
0bcffcfa72 Bug 1514296 - Rename Document.policy to Document.featurePolicy, r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D35801

--HG--
extra : moz-landing-system : lando
2019-07-03 13:02:05 +00:00
Cameron McCormack
0a6fb940c5 Bug 1553705 - Use a cheaper to compute state key for parser inserted form controls. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D32259

--HG--
extra : moz-landing-system : lando
2019-07-01 10:06:16 +00:00
Narcis Beleuzu
cc10ed7ce5 Backed out 2 changesets (bug 1553705) for causing Bug1562142 . CLOSED TREE
Backed out changeset fbb26a04ec1f (bug 1553705)
Backed out changeset dd6e7c0970d5 (bug 1553705)
2019-06-29 02:39:01 +03:00
Cameron McCormack
4d1517b69f Bug 1553705 - Use a cheaper to compute state key for parser inserted form controls. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D32259

--HG--
extra : moz-landing-system : lando
2019-06-26 21:44:11 +00:00
Andrea Marchesini
872502eaf3 Bug 1560040 - Introduce 2 new URL-Classifier features to annotate and block social trackers, r=dimi
Differential Revision: https://phabricator.services.mozilla.com/D35421

--HG--
extra : moz-landing-system : lando
2019-06-22 16:53:50 +00:00
Brian Hackett
90aa1dfe93 Bug 1124122 - Suppress postMessage events on a window's document when event handling is suppressed, r=smaug.
--HG--
extra : rebase_source : 7aa7eceb16238eebe414c67e06fcb0908138f3f6
2019-06-11 12:53:00 -10:00
Boris Zbarsky
d5a8a4a595 Bug 1557793 part 3. Change the signatures of various nsContentUtils localization methods to play nicer with the new stringbundle API. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D34201

--HG--
extra : moz-landing-system : lando
2019-06-08 21:26:12 +00:00
Emilio Cobos Álvarez
53fa6bd77e Bug 1558440 - Use SaturateUint32 for the visible content heuristic. r=bzbarsky
Turns out we do have saturated arithmetic in mfbt, I just missed it.

Also, use just an uint32 for the heuristic. Text length is a uint32 anyway, and
it's unlikely we want to decide anything when the value is over the max uint32
value.

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

--HG--
extra : moz-landing-system : lando
2019-06-11 15:02:17 +00:00
Emilio Cobos Álvarez
ac8c134eb5 Bug 1555133 - Add some heuristics about visible content in a document. r=bzbarsky
This is intended to give a reasonable number that scales with the amount of
content in a website during page load, for scheduling purposes.

This effectively counts the amount of text connected to a document that isn't
likely to be inline style or script.

Potential improvements:

 * Maybe have some more heuristics for hidden elements, like presence of the
   `hidden` attribute?

 * Maybe skip whitespace-only text? This does a pretty good job anyways because
   whitespace nodes are usually pretty small (like a couple newlines and
   spaces), so they don't add too much to the number. This could be done cheaply if
   looking at sSpaceSharedString / sTabSharedString.

 * Add some weight to some elements? Maybe images should have a fixed weight,
   for example. Though you don't want 0x0 images and such to count... Maybe we
   should add to this heuristic out of band when processing image loads or some
   such.

 * Handle shadow DOM and such better? Right now Shadow DOM and XBL are always
   assumed visible as long as they're connected. You _can_ in theory do
   something like stash a `<div>` inside a `<style>` element, attach a
   ShadowRoot and such, and append a bunch of stuff inside. But I don't think
   it's something we should be particularly worried about.

 * Probably add some check to CharacterData::AppendText as well?  Otherwise this
   undercounts when loading big amount of text arrives via the network, for
   example, but also I'm not sure we're optimizing for log files and such so it
   might be ok.

In any case, this gives us a heuristic that we can iterate on later. This does a
pretty good job at representing the amount of content in the examples over here:

 * https://faraday.basschouten.com/mozilla/executionorder/

For example for:

 * https://faraday.basschouten.com/mozilla/executionorder/allinlinedual.html

You get an output like the following if you print the heuristic after each bind
operation (and de-duplicating them):

```
0
3 // Some whitespace in <head>
4 // Some whitespace in the <body>.
5
6
7
8
9
10
65547 // Actual content injected by the first script.
65548 // Some more whitespace.
131085 // Actual content injected by the second script.
131087 // Some more whitespace.
```

I'm not a fan of what clang-format has done to my code btw :)

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

--HG--
extra : moz-landing-system : lando
2019-06-11 10:00:46 +00:00
Boris Zbarsky
821f50ee07 Bug 1525935. Localization should delay the load event firing when it's delaying layout start. r=zbraniecki
Differential Revision: https://phabricator.services.mozilla.com/D24433

--HG--
extra : moz-landing-system : lando
2019-04-12 11:38:50 +00:00
Masayuki Nakano
3c761e83f5 Bug 1529884 - part 7: Make ExecCommand() and related methods use a prefix for every parameter r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D33628

--HG--
extra : moz-landing-system : lando
2019-06-10 10:27:19 +00:00
Masayuki Nakano
5fcd205833 Bug 1529884 - part 3: Make Document::ConvertToInternalCommand() check the input value when the caller requires adjusted value r=smaug
`aAdjustedValue` of `Document::ConvertToInternalCommand()` is not `nullptr`
when it's called by `ExecCommand()` or `QueryCommandState()`.  However,
`QueryCommandState()` does not need the value actually.  Therefore, we can move
the input value check from `ExecCommand() to `ConvertToInsernalCommand()`.

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

--HG--
extra : moz-landing-system : lando
2019-06-10 10:24:59 +00:00
Masayuki Nakano
f84db02d01 Bug 1529884 - part 2: Implement ConvertToMidasInternalCommand() as returning InternalCommandData r=smaug
This patch creates `ConvertToInternalCommand()` as the replacement of
`ConvertToMidasInternalCommand()` and `ConvertToMidasInternalCommandInner()`.
It returns `InternalCommandData`.  Therefore, every caller can compare
`Command` instead of using `strcmp()`.

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

--HG--
extra : moz-landing-system : lando
2019-06-10 10:24:31 +00:00
Masayuki Nakano
94e3b7524c Bug 1529884 - part 1: Make Document use hashtable to map HTML command and internal command data r=smaug
Currently, `Document` converts HTML command (e.g., used by `execCommand()`) to
internal XUL command with array in the global space.  However, it requires scan
of the array for every command access.

This patch makes `Document` use hashtable to make the conversion faster.

New mapping info comes from:

- `mXULCommandName` is same as `internalCommandString`
- `mCommand` is mapped in CommandList.h from `mXULCommandName`
- `mGetEditorCommandFunc` is mapped from `mXULCommandName` in:
  - https://searchfox.org/mozilla-central/rev/d143f8ce30d1bcfee7a1227c27bf876a85f8cede/editor/libeditor/EditorController.cpp#31-32,34-38,40-41,43,45-51,54-57,67-112
  - https://searchfox.org/mozilla-central/rev/75294521381b331f821aad3d6b60636844080ee2/editor/libeditor/HTMLEditorController.cpp#26-28,31-39,48,51-52,55-58,60-63,65-73,76-80,83-88,90-91,93-94,97-100,102-104
- `mExecCommandParam` is converted from `useNewParam` and `convertToBoolean`:
  - If corresponding editor command class's `DoCommandParam()` just calls
    `DoCommand()`, `ExecCommandParam::Ignore`.
  - If `useNewParam` is `true` and `convertToBoolean` is `false`, given value
    should be ignored and may set constant instead.  In this case,
    `ExecCommandParam::Ignore`.
  - If `useNewParam` is `false` and `convertToBoolean` is `false`, given value
    should be treated as string.  In this case, `ExecCommandParam::String`.
  - If `useNewParam` is `false` and `convertToBoolean` is `true`, given value
    should be treated as bool.  In this case, if given command is not a legacy
    one, `ExecCommandParam::Boolean`.  Otherwise, i.e., if given command
    is a legacy one, `ExecCommandParam::InvertedBoolean`.
  - Otherwise, `ExecCommandParam::String`.

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

--HG--
extra : moz-landing-system : lando
2019-06-10 10:23:59 +00:00
Nika Layzell
0c0134526f Bug 1556483 - Expose isInitialDocument on WindowGlobalParent, r=bzbarsky
This should hopefully allow the parent process to tell whether a given document
is the initial about:blank document.

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

--HG--
extra : moz-landing-system : lando
2019-06-06 14:57:32 +00:00
Zibi Braniecki
307d0160a7 Bug 1552714 - Remove dom::l10n namespace and unify class naming. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D33739

--HG--
rename : dom/chrome-webidl/DOMOverlays.webidl => dom/chrome-webidl/L10nOverlays.webidl
rename : dom/l10n/Mutations.cpp => dom/l10n/L10nMutations.cpp
rename : dom/l10n/Mutations.h => dom/l10n/L10nMutations.h
rename : dom/l10n/DOMOverlays.cpp => dom/l10n/L10nOverlays.cpp
rename : dom/l10n/DOMOverlays.h => dom/l10n/L10nOverlays.h
rename : dom/l10n/tests/gtest/TestDOMOverlays.cpp => dom/l10n/tests/gtest/TestL10nOverlays.cpp
rename : dom/l10n/tests/mochitest/dom_localization/test_mutations.html => dom/l10n/tests/mochitest/dom_localization/test_l10n_mutations.html
rename : dom/l10n/tests/mochitest/mutations/test_append_content_post_dcl.html => dom/l10n/tests/mochitest/l10n_mutations/test_append_content_post_dcl.html
rename : dom/l10n/tests/mochitest/mutations/test_append_content_pre_dcl.html => dom/l10n/tests/mochitest/l10n_mutations/test_append_content_pre_dcl.html
rename : dom/l10n/tests/mochitest/mutations/test_append_fragment_post_dcl.html => dom/l10n/tests/mochitest/l10n_mutations/test_append_fragment_post_dcl.html
rename : dom/l10n/tests/mochitest/mutations/test_pause_observing.html => dom/l10n/tests/mochitest/l10n_mutations/test_pause_observing.html
rename : dom/l10n/tests/mochitest/mutations/test_set_attributes.html => dom/l10n/tests/mochitest/l10n_mutations/test_set_attributes.html
rename : dom/l10n/tests/mochitest/domoverlays/test_attributes.html => dom/l10n/tests/mochitest/l10n_overlays/test_attributes.html
rename : dom/l10n/tests/mochitest/domoverlays/test_extra_text_markup.html => dom/l10n/tests/mochitest/l10n_overlays/test_extra_text_markup.html
rename : dom/l10n/tests/mochitest/domoverlays/test_functional_children.html => dom/l10n/tests/mochitest/l10n_overlays/test_functional_children.html
rename : dom/l10n/tests/mochitest/domoverlays/test_domoverlays.xul => dom/l10n/tests/mochitest/l10n_overlays/test_l10n_overlays.xul
rename : dom/l10n/tests/mochitest/domoverlays/test_same_id.html => dom/l10n/tests/mochitest/l10n_overlays/test_same_id.html
rename : dom/l10n/tests/mochitest/domoverlays/test_same_id_args.html => dom/l10n/tests/mochitest/l10n_overlays/test_same_id_args.html
rename : dom/l10n/tests/mochitest/domoverlays/test_text_children.html => dom/l10n/tests/mochitest/l10n_overlays/test_text_children.html
extra : moz-landing-system : lando
2019-06-06 16:32:58 +00:00
Zibi Braniecki
fdd3cb9cbd Bug 1552714 - Move DocumentL10n to dom/l10n. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D32957

--HG--
rename : dom/webidl/DocumentL10n.webidl => dom/chrome-webidl/DocumentL10n.webidl
rename : intl/l10n/DocumentL10n.cpp => dom/l10n/DocumentL10n.cpp
rename : intl/l10n/DocumentL10n.h => dom/l10n/DocumentL10n.h
extra : moz-landing-system : lando
2019-06-06 16:31:44 +00:00
Thomas Nguyen
01ff0bf93f Bug 1534681 Use ReferrerInfo class in document r=ckerschb,baku,Gijs
Also, in many place, we use document uri as referrer. It is not right
for the case srdoc iframe. We should use the last non-srdoc parent
document's uri

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

--HG--
rename : testing/web-platform/tests/referrer-policy/generic/iframe-inheritance.html => testing/web-platform/tests/referrer-policy/generic/inheritance/iframe-inheritance-data.html
rename : testing/web-platform/tests/referrer-policy/generic/iframe-inheritance.html => testing/web-platform/tests/referrer-policy/generic/inheritance/iframe-inheritance-srcdoc.html
extra : moz-landing-system : lando
2019-06-06 07:23:37 +00:00
Mihai Alexandru Michis
153172de0c Merge inbound to mozilla-central. a=merge 2019-06-05 12:51:25 +03:00
Ehsan Akhgari
09c5ba934d Bug 1555980 - Move HTMLDocument colour properties to Document; r=farre
Differential Revision: https://phabricator.services.mozilla.com/D33286

--HG--
extra : moz-landing-system : lando
2019-06-04 07:30:59 +00:00
Neil Deakin
302fa305ad Bug 1519948, remove XUL box objects, r=bzbarsky
--HG--
extra : rebase_source : 4af617fecf06512aed5882831e64e38d4e7e5e94
2019-06-04 12:45:55 -04:00
Ehsan Akhgari
7a3585c49f Bug 1415270 - Part 3: Prevent the editing APIs from being called on non-HTML documents; r=masayuki
This is similar to this Chromium change:
https://codereview.chromium.org/1155353002

The editing spec doesn't mention editing non-HTML documents, and historically
this is only a feature that WebKit has supported.  Supporting this feature
increases the attack surface of the browser without a clear benefit, so it
seems like a good idea to converge on this behaviour.

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

--HG--
rename : testing/web-platform/tests/html/editing/editing-0/making-entire-documents-editable-the-designmode-idl-attribute/user-interaction-editing-designMode.html => testing/web-platform/tests/html/editing/editing-0/making-entire-documents-editable-the-designmode-idl-attribute/user-interaction-editing-designMode-xml.xml
extra : moz-landing-system : lando
2019-05-30 17:14:05 +00:00
Ehsan Akhgari
a9e9f5ccdb Bug 1415270 - Part 1: Move nsHTMLDocument editing APIs to Document; r=farre,masayuki
Differential Revision: https://phabricator.services.mozilla.com/D32911

--HG--
extra : moz-landing-system : lando
2019-05-31 01:37:26 +00:00
prathiksha
5752203326 Bug 1549561 - Expose attributes from nsITransportSecurityInfo to content for about certerror use. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D30851

--HG--
extra : moz-landing-system : lando
2019-05-30 06:42:56 +00:00
Ehsan Akhgari
ad6a833e39 Bug 1549560 - Move HTMLDocument.open/close/write/writeln to Document; r=farre
Differential Revision: https://phabricator.services.mozilla.com/D32388

--HG--
extra : moz-landing-system : lando
2019-05-27 23:03:03 +00:00
Bogdan Tara
2bcd3a4566 Backed out changeset c352b73db92b (bug 1549560) for dom/base/Document.cpp related build bustages CLOSED TREE 2019-05-27 23:57:00 +03:00
Ehsan Akhgari
6b308d9e98 Bug 1549560 - Move HTMLDocument.open/close/write/writeln to Document; r=farre
Differential Revision: https://phabricator.services.mozilla.com/D32388

--HG--
extra : moz-landing-system : lando
2019-05-27 18:42:23 +00:00
Ehsan Akhgari
ab20502fb9 Bug 1547813 - Part 7: Introduce a storage partitioning API; r=baku
This API abstracts away the details of the decision on what context should be
partitioned away from the consumers and centralizes the decision making into
the same location in the code base.

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

--HG--
extra : moz-landing-system : lando
2019-05-25 01:25:41 +00:00
Ehsan Akhgari
14dbf3d080 Bug 1467625 - Part 1: Move HTMLDocument.domain getter/setter to Document; r=farre
Differential Revision: https://phabricator.services.mozilla.com/D32386

--HG--
extra : moz-landing-system : lando
2019-05-24 13:51:09 +00:00
Hiroyuki Ikezoe
d243910c35 Bug 1550105 - Implement the parser for scale values in viewport meta tag as what the spec defines. r=botond
The relevant definition in the spec;
 https://drafts.csswg.org/css-device-adapt/#min-scale-max-scale

Before this change, if both of initial-scale and maximum-scale are negative,
both values are clamped to 0.25. Whereas with this change, negative scale
values are treated as if it's not specified so that initial-scale value is
automatically calculated based on the layout viewport size.
negative-initial-and-maximum-scale.html is a test case for the case.

Also with this change, initial-scale values are going to be clamped to the
range [0.25, 10] during parsing it so that initial-scale-0.html and
initial-scale-100.html need to be modified, now the former is scaled by 0.25x,
the latter is scaled by 10x.
(Before this change, initial-scale=0 and initial-scale=100 were treated as
 invalid scale values in nsViewportInfo::ConstrainViewportValues[1])

[1] https://searchfox.org/mozilla-central/rev/6c9f60f8cc064a1005cd8141ecd526578ae9da7a/dom/base/nsViewportInfo.cpp#15,19

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

--HG--
extra : moz-landing-system : lando
2019-05-23 06:35:52 +00:00
Christoph Kerschbaumer
b633427366 Bug 965637: Move CSP from Principal into Client, part 1: backend changes. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D27654

--HG--
extra : moz-landing-system : lando
2019-05-21 23:14:27 +00:00
Boris Zbarsky
f6c8cd1d10 Bug 1550524 part 3. Remove the now-unused aContentType argument to nsHtml5Parser::Parse. r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D30752

--HG--
extra : moz-landing-system : lando
2019-05-14 19:46:26 +00:00
Micah Tigley
f697388960 Bug 1357774 - Part 1: Add a 'SetCurrentRDMPaneOrientation' WebIDL extension on the Document r=bradwerth,smaug
Differential Revision: https://phabricator.services.mozilla.com/D29455

--HG--
extra : moz-landing-system : lando
2019-05-16 20:31:13 +00:00
Brindusan Cristian
3813765b9b Backed out changeset 90ff166702b5 (bug 1357774) for build bustages at AndroidHal.cpp. CLOSED TREE 2019-05-15 05:03:41 +03:00
Micah Tigley
b3e2863b78 Bug 1357774 - Part 1: Add a 'SetCurrentRDMPaneOrientation' WebIDL extension on the Document r=bradwerth,smaug
Differential Revision: https://phabricator.services.mozilla.com/D29455

--HG--
extra : moz-landing-system : lando
2019-05-14 23:42:30 +00:00
Sean Feng
04337d74c3 Bug 1531917 - Add Telemetry for how pages use bfcache r=jesup,bdekoz,smaug
Differential Revision: https://phabricator.services.mozilla.com/D30211

--HG--
extra : moz-landing-system : lando
2019-05-14 16:21:09 +00:00
Masayuki Nakano
1fb845d129 Bug 1543315 - part 17: Mark PresShell::HandleDOMEventWithTarget() as MOZ_CAN_RUN_SCRIPT r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D30494

--HG--
extra : moz-landing-system : lando
2019-05-09 20:21:28 +00:00
Noemi Erli
6430d23336 Backed out 12 changesets (bug 1547813) for failures in browser_partitionedIndexedDB.js CLOSED TREE
Backed out changeset 98989127264b (bug 1547813)
Backed out changeset f9d790139a26 (bug 1547813)
Backed out changeset a29f58cef022 (bug 1547813)
Backed out changeset c1288949de1c (bug 1547813)
Backed out changeset 8cad4fd197b1 (bug 1547813)
Backed out changeset 807ce59e7e6e (bug 1547813)
Backed out changeset 06943593738c (bug 1547813)
Backed out changeset 4ced8d49ddc3 (bug 1547813)
Backed out changeset 77a040f527e9 (bug 1547813)
Backed out changeset b4651cfaff30 (bug 1547813)
Backed out changeset 279c140a4d71 (bug 1547813)
Backed out changeset 0e0241f3d366 (bug 1547813)
2019-05-09 20:04:16 +03:00
Ehsan Akhgari
f33f21e80b Bug 1547813 - Part 7: Introduce a storage partitioning API; r=baku
This API abstracts away the details of the decision on what context should be
partitioned away from the consumers and centralizes the decision making into
the same location in the code base.

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

--HG--
extra : moz-landing-system : lando
2019-05-08 20:15:13 +00:00
Liang-Heng Chen
784cd8785e Bug 1544598 - Part 1: use hash to record origin telemetry; r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D29357

--HG--
extra : moz-landing-system : lando
2019-05-03 15:37:14 +00:00
Emilio Cobos Álvarez
ebc5efc1e9 Bug 1440537 - Don't propagate flushes across docgroup boundaries. r=bzbarsky
We don't need to flush layout in the parent document if the parent and child
documents can't observe each other.

This will also match our behavior in a Fission world.

I'm not attached to the name of the function, better ideas welcome.

Differential Revision: https://phabricator.services.mozilla.com/D28217
2019-04-29 20:47:44 +02:00
Sylvestre Ledru
96da5036ad Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-04-28 09:30:05 +00:00
Brindusan Cristian
1cd3709f4c Backed out changeset f7c391670061 (bug 1440537) for mochitest failures at test_swapFrameLoaders.xul. 2019-04-27 15:23:16 +03:00
Emilio Cobos Álvarez
7f4d653ea8 Bug 1440537 - Don't propagate flushes across docgroup boundaries. r=bzbarsky
We don't need to flush layout in the parent document if the parent and child
documents can't observe each other.

This will also match our behavior in a Fission world.

I'm not attached to the name of the function, better ideas welcome.

Differential Revision: https://phabricator.services.mozilla.com/D28217
2019-04-27 12:42:12 +02:00
Fariskhi Vidyan
6e5ad8de80 Bug 1272409 - Part 4: Integrate ResizeObserver with Document and reflow. r=dholbert,smaug
Depends on D27617

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

--HG--
extra : moz-landing-system : lando
2019-04-26 20:29:18 +00:00
Daniel Varga
46db25d004 Backed out 5 changesets (bug 1272409) for build bustage at /builds/worker/workspace/build/src/dom/base/nsGlobalWindowCommands. On a CLOSED TREE
Backed out changeset 2ad8260489d6 (bug 1272409)
Backed out changeset 224dad4cbdc3 (bug 1272409)
Backed out changeset 72775dbf35c8 (bug 1272409)
Backed out changeset c331a4a8b343 (bug 1272409)
Backed out changeset d817fbfc52b6 (bug 1272409)
2019-04-26 02:41:43 +03:00
Fariskhi Vidyan
55597e55fc Bug 1272409 - Part 4: Integrate ResizeObserver with Document and reflow. r=dholbert,smaug
Depends on D27617

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

--HG--
extra : moz-landing-system : lando
2019-04-25 18:30:16 +00:00
Emilio Cobos Álvarez
2b46634961 Bug 1546329 - Remove dead skins code. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com//D28459
2019-04-25 14:00:06 +02:00
Emilio Cobos Álvarez
1c3126eaaa Bug 1545699 - Track editor stylesheets better. r=masayuki
Replacing the whole set of user-agent stylesheets seems a bit overkill.

Differential Revision: https://phabricator.services.mozilla.com/D28212
2019-04-25 14:00:01 +02:00
Emilio Cobos Álvarez
074dccfbba Bug 1545699 - Don't sync-reload chrome:// user-agent stylesheets from nsChromeRegistry. r=bzbarsky
We assume in a bunch of other places that user agent stylesheets don't really
change dynamically. It's not clear to me what this code is trying to accomplish
or how is it supposed to work in a multi-process world, but I've left the author
stylesheets code for now...

Also, I'm pretty sure the styleset doesn't handle null sheets, so add a
null-check to the author stylesheets.

Differential Revision: https://phabricator.services.mozilla.com/D28211
2019-04-25 13:59:58 +02:00
Masayuki Nakano
65aa369673 Bug 1543315 - part 10: Mark nsIPresShell::GoToAnchor() and nsIPresShell::ScrollToAnchor() as MOZ_CAN_RUN_SCRIPT r=smaug
Next, we should mark `PresShell::ScrollContentIntoView()` as
`MOZ_CAN_RUN_SCRIPT` because it's used widely.

This patch marks its `PresShell` users, `GoToAnchor()` and `ScrollToAnchor()`,
as `MOZ_CAN_RUN_SCRIPT`.  Additionally, this patch moves them from
`nsIPresShell` to `PresShell` because all callers refers `PresShell` directly.

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

--HG--
extra : moz-landing-system : lando
2019-04-23 01:27:47 +00:00
Emilio Cobos Álvarez
d3f8a1f5a6 Bug 1544535 - Bug 1542263 - Don't keep two list of stylesheets in ServoStyleSet. r=firefox-style-system-reviewers,jwatt
Just one set of stylesheets is enough. While at it, unify SheetType and Origin.

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

--HG--
extra : moz-landing-system : lando
2019-04-19 04:20:31 +00:00
Ehsan Akhgari
da503ca590 Bug 144795 - Move HTMLDocument.cookie getter/setter to Document; r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D27931

--HG--
extra : moz-landing-system : lando
2019-04-18 08:55:00 +00:00
Emilio Cobos Álvarez
d2dc6882d2 Bug 1545107 - DocumentStatesChanged should not unconditionally notify if the state hasn't actually changed. r=smaug
It just does wasted work. The new setup is also much more similar to the one
used for element states.

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

--HG--
extra : moz-landing-system : lando
2019-04-17 19:25:50 +00:00
Botond Ballo
d6bd83e7ed Bug 1513090 - Remove the HIDDEN_VIEWPORT_OVERFLOW_TYPE telemetry probe. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D27635

--HG--
extra : moz-landing-system : lando
2019-04-16 17:39:57 +00:00
Brendan Dahl
68f5e2a804 Bug 1533883 - Add webidl definition for checking if document was loaded with prototype. r=smaug
Needed for testing to ensure the prototype was used.

Depends on D27744

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

--HG--
extra : moz-landing-system : lando
2019-04-16 18:15:04 +00:00
Brendan Dahl
51d9c2f820 Bug 1544144 - Fix custom HTML element creation when using prototype and XHTML. r=smaug
Use the correct global for custom HTML elements created from a prototype.
Also, add an error message to make it easier to spot when the
PrototypeDocumentSink fails.

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

--HG--
extra : moz-landing-system : lando
2019-04-15 10:56:03 +00:00
Masayuki Nakano
414509fe00 Bug 1543315 - part 9: Mark nsIPresShell::FlushPendingNotifications() as MOZ_CAN_RUN_SCRIPT r=smaug
So, this patch makes all caller of it safe including its arguments unless
they come from other methods.

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

--HG--
extra : moz-landing-system : lando
2019-04-13 12:43:57 +00:00
Andrea Marchesini
a438b12ebd Bug 1536411 - StoragePrincipal - part 1 - Implementation, r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D24025

--HG--
extra : moz-landing-system : lando
2019-04-12 05:31:32 +00:00
Liang-Heng Chen
2cb34bb8bf Bug 1539641 - Log and report storage access granted reason; r=Ehsan,chutten
Differential Revision: https://phabricator.services.mozilla.com/D26720

--HG--
extra : moz-landing-system : lando
2019-04-12 00:38:57 +00:00
Cosmin Sabou
af07021e88 Backed out 10 changesets (bug 1536411) for causing leaks in CondVar, MessagePortService, MessagePortServiceData.
Backed out changeset eda5854cd7e8 (bug 1536411)
Backed out changeset f94dfbf2476c (bug 1536411)
Backed out changeset c68dc3152faa (bug 1536411)
Backed out changeset f67d157e8baf (bug 1536411)
Backed out changeset 1107a9767f38 (bug 1536411)
Backed out changeset ccbe1af00fb9 (bug 1536411)
Backed out changeset 552c4b588524 (bug 1536411)
Backed out changeset 2eb20578159b (bug 1536411)
Backed out changeset 45708d22bb6d (bug 1536411)
Backed out changeset 87601ef1d4d4 (bug 1536411)
2019-04-11 22:48:49 +03:00
Andrea Marchesini
5cfeeda19e Bug 1536411 - StoragePrincipal - part 1 - Implementation, r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D24025

--HG--
extra : moz-landing-system : lando
2019-04-11 16:27:12 +00:00
Emilio Cobos Álvarez
d15876acb4 Bug 1541952 - Move ApplicableStylesChanged() to Document. r=heycam
It's the right place for it to be now that it owns the StyleSet.

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

--HG--
extra : moz-landing-system : lando
2019-04-06 19:25:25 +00:00
Brian Birtles
7ecb9753b5 Bug 1509466 - Make cancelAnimationFrame cancel a pending request frame callback scheduled in the same frame; r=farre
As per the following change to the HTML spec:

  86b05f8a07

when running a requestAnimationFrame callback it should be possible to cancel
another requestAnimationFrame callback scheduled to run in the same frame by
using cancelAnimationFrame.

See issue:

  https://github.com/whatwg/html/issues/4359

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

--HG--
extra : rebase_source : 696dde4f205f2d12a67a4e9649d629a0f4e7de27
2019-02-25 15:15:56 +09:00
Brian Birtles
80fb21495c Bug 1509466 - Pass frame request callbacks along with their handles to nsRefreshDriver; r=farre
In the next patch in this series we want to compare the handle of frame
callbacks we are about to run,  with a set of canceled handles stored on the
document. This patch makes us pass the handles along with the callbacks so we
can do that.

Incidentally doing this allows us to just swap array elements when building up
the refresh driver's set of callbacks to run. That is hopefully a little more
efficient than running the implicit conversion operator on each item and then
appending to an array.

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

--HG--
extra : rebase_source : f014605ece1c8e3495b2927621fb9f72ff8e57d7
2019-02-25 15:02:12 +09:00
Brendan Dahl
2f6cd63d92 Bug 1498287 - Support RTL pref in non-XUL documents too. r=smaug
Moves most of the RTL handling from XULDocument into Document. Creates
a new static class that listens to the direction pref change and notifies
all the documents when it changes.

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

--HG--
extra : moz-landing-system : lando
2019-04-03 09:26:31 +00:00
Emilio Cobos Álvarez
d8e2990d8a Bug 1535788 - Make the Document own the StyleSet. r=heycam
This is the last step to be able to call matchMedia on display: none iframes.

This is green, except for some startup preference query tests that I'm going to
address in a blocking bug (making LangGroupFontPrefs global, basically).

The setup is similar to the ShadowRoot one, except we don't eagerly keep the
StyleSet around up-to-date, we only fill it if it ever had a pres context.

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

--HG--
extra : moz-landing-system : lando
2019-04-03 07:02:00 +00:00
Sylvestre Ledru
ef0bfc3822 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-03-31 15:12:55 +00:00
Masayuki Nakano
de2d589e58 Bug 1540015 - part 3: Rename Document::GetShell() to Document::GetPresShell() and make it return PresShell* rather than nsIPresShell* r=smaug,emilio
This makes `Document::GetShell()` return `PresShell*` instead of `nsIPresShell`.

Additonally, "shell" is unclear ("docshell" vs. "presshell").  Therefore, this
also renames `Document::GetShell()` to `Document::GetPresShell()`.

Similarly, some other method names of `Document` are also renamed from
`*Shell*` to `*PresShell*`.

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

--HG--
extra : moz-landing-system : lando
2019-03-29 15:12:47 +00:00
Masayuki Nakano
e705b3211c Bug 1540015 - part 1: Make Document.h stop including nsIPresShell.h r=smaug
If `Document::GetShell()` returns `PresShell*` rather than `nsIPresShell`, it's
a good step to deCOMTaminate `PresShell`.

This patch makes `Document.h` stop including `nsIPresShell.h` since
`nsIPresShell.h` includes `Document.h` indirectly and that causes bustage
when we make `Document::GetShell()` return `PresShell*`.

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

--HG--
extra : moz-landing-system : lando
2019-03-29 15:11:04 +00:00
Dorel Luca
5a0fa68b78 Backed out 3 changesets (bug 1540015) for build bustage. CLOSED TREE
Backed out changeset 7b71c9da0214 (bug 1540015)
Backed out changeset 5723ddbc5c44 (bug 1540015)
Backed out changeset 9561d2c36fa5 (bug 1540015)
2019-03-29 16:14:26 +02:00
Masayuki Nakano
9273f25ce2 Bug 1540015 - part 3: Rename Document::GetShell() to Document::GetPresShell() and make it return PresShell* rather than nsIPresShell* r=smaug,emilio
This makes `Document::GetShell()` return `PresShell*` instead of `nsIPresShell`.

Additonally, "shell" is unclear ("docshell" vs. "presshell").  Therefore, this
also renames `Document::GetShell()` to `Document::GetPresShell()`.

Similarly, some other method names of `Document` are also renamed from
`*Shell*` to `*PresShell*`.

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

--HG--
extra : moz-landing-system : lando
2019-03-29 13:09:26 +00:00
Masayuki Nakano
854606257b Bug 1540015 - part 1: Make Document.h stop including nsIPresShell.h r=smaug
If `Document::GetShell()` returns `PresShell*` rather than `nsIPresShell`, it's
a good step to deCOMTaminate `PresShell`.

This patch makes `Document.h` stop including `nsIPresShell.h` since
`nsIPresShell.h` includes `Document.h` indirectly and that causes bustage
when we make `Document::GetShell()` return `PresShell*`.

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

--HG--
extra : moz-landing-system : lando
2019-03-29 12:12:20 +00:00
Brad Werth
8737bf03f3 Bug 1500314 Part 1: Only apply mobile viewport stretching for documents with no meta viewport tag. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D23531

--HG--
extra : moz-landing-system : lando
2019-03-27 23:43:44 +00:00
Peter Van der Beken
b7e5d13098 Bug 1527308 - History.state object is always null when client-side XSLT is done. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D24152

--HG--
extra : moz-landing-system : lando
2019-03-20 13:51:06 +00:00
Noemi Erli
a0a43e404d Backed out changeset a63de11853c4 (bug 1525935) foe failures in browser_bug406216.js CLOSED TREE 2019-03-28 02:35:16 +02:00
Boris Zbarsky
65a33c2061 Bug 1525935. Localization should delay the load event firing when it's delaying layout start. r=zbraniecki
Differential Revision: https://phabricator.services.mozilla.com/D24433

--HG--
extra : moz-landing-system : lando
2019-03-27 20:36:02 +00:00
Cosmin Sabou
a54e57d61a Backed out 2 changesets (bug 1500314) for android mochitest failures on gfx/layers/apz/test/mochitest/test_bug982141.html. CLOSED TREE
Backed out changeset 38349ca764d7 (bug 1500314)
Backed out changeset 77cafd05c85c (bug 1500314)
2019-03-23 01:18:49 +02:00
Brad Werth
8da8465a37 Bug 1500314 Part 1: Only apply mobile viewport stretching for documents with no meta viewport tag. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D23531

--HG--
extra : moz-landing-system : lando
2019-03-22 16:46:23 +00:00
Boris Zbarsky
1c3e10afc5 Bug 1535384 part 1. Eliminate some easy cases of MOZ_CAN_RUN_SCRIPT_BOUNDARY on webidl callbacks. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D23771

--HG--
extra : moz-landing-system : lando
2019-03-19 05:24:39 +00:00
Emilio Cobos Álvarez
12cbe02f9a Bug 1536176 - Share font preferences across documents. r=jfkthame
And also don't blow the preferences away unless they actually change. We were
blowing them away whenever the document language changed or what not, that's not
good.

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

--HG--
extra : moz-landing-system : lando
2019-03-19 16:40:01 +00:00
Brad Werth
642e907b47 Bug 1501665 Part 1: Add a webidl property to Document to track if it's in an RDM pane. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D19235

--HG--
extra : source : be1026de486b096cee639ca584b1e8108c4b73cb
2019-03-18 14:55:51 +00:00
shindli
b7de66af4f Backed out 13 changesets (bug 1501665) for failing a11y tests in accessible/tests/mochitest/relations/test_tabbrowser.xul CLOSED TREE
Backed out changeset 2fa518cb0dfc (bug 1501665)
Backed out changeset afaf26d7df42 (bug 1501665)
Backed out changeset 5bdf0ad9dc66 (bug 1501665)
Backed out changeset 520dd24a73fc (bug 1501665)
Backed out changeset 3542bf2b89dd (bug 1501665)
Backed out changeset 088dc24eabc7 (bug 1501665)
Backed out changeset 178210eb72ba (bug 1501665)
Backed out changeset 9eebe767ef20 (bug 1501665)
Backed out changeset 6a84e97d0e62 (bug 1501665)
Backed out changeset cf42ea4e8443 (bug 1501665)
Backed out changeset 731d7ee06d86 (bug 1501665)
Backed out changeset 8e0afe4a041a (bug 1501665)
Backed out changeset be1026de486b (bug 1501665)
2019-03-18 18:08:58 +02:00
Brad Werth
69aed38635 Bug 1501665 Part 1: Add a webidl property to Document to track if it's in an RDM pane. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D19235

--HG--
extra : moz-landing-system : lando
2019-03-18 14:55:51 +00:00
Razvan Maries
1cfbd79a4e Merge mozilla-central to mozilla-inbound. a=merge on a CLOSED TREE 2019-03-14 23:50:44 +02:00
Emilio Cobos Álvarez
d14196d9cd Bug 1535297 - Remove some unnecessary namespace qualification in Document.h r=smaug
Only kept the ones needed to not conflict with method names.

Differential Revision: https://phabricator.services.mozilla.com/D23486
2019-03-14 16:56:04 +01:00
shindli
c206699acc Backed out changeset 99cde26aca85 (bug 1535297) for build bustage failure in builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/dom/Document.h 2019-03-14 17:14:57 +02:00
Emilio Cobos Álvarez
a208fc32f8 Bug 1535297 - Remove some unnecessary namespace qualification in Document.h r=smaug
Only kept the ones needed to not conflict with method names.

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

--HG--
extra : moz-landing-system : lando
2019-03-14 14:44:52 +00:00
Brendan Dahl
7ebaf1cd2b Bug 1527977 - Share XUL prototype cache with XUL and XHTML. r=smaug
Create a new parser (PrototypeDocumentParser) and content sink
(PrototypeDocumentContentSink) that can be used by both XUL and XHTML.

The new parser moves the code from XULDocument that handles creating and
loading a nsXULPrototypeDocument from either the cache or the source
file. Once the parser has finished loading the prototype it notifies the
content sink. The parser is largely a stub and would be better suited
for use as a nsBaseParser, but nsHTMLDocument unfortunately needs an
nsIParser.

The new content sink has the XULDocument code responsible for the
prototype traversal that creates the DOM (XULDocument::ResumeWalk and
friends) and fires off various events.

To unify XUL and XHTML, the XHTML readystate event sequence is used in
XUL. However, the layout path of XHTML loaded from the prototype cache
more closely follows XUL, where frame initializers and layout don't
start until the entire DOM is built.

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

--HG--
rename : dom/xul/XULDocument.cpp => dom/prototype/PrototypeDocumentContentSink.cpp
rename : parser/moz.build => dom/prototype/moz.build
rename : parser/moz.build => parser/prototype/moz.build
extra : moz-landing-system : lando
2019-03-09 01:00:23 +00:00
Andrea Marchesini
43beb5b35b Bug 1525245 - Stabilize cookiePolicy/cookiePermission for live documents - part 1 - information stored into loadInfo, r=Ehsan,ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D18949

--HG--
extra : moz-landing-system : lando
2019-03-08 09:00:06 +00:00
Ciure Andrei
712dd2bb8c Backed out 16 changesets (bug 1525245) for perma failing test_document_cookie.html CLOSED TREE
Backed out changeset 3fd27215698f (bug 1525245)
Backed out changeset d9a9e8e77873 (bug 1525245)
Backed out changeset 0e6f7be92e3f (bug 1525245)
Backed out changeset 6790802e2fa5 (bug 1525245)
Backed out changeset a5a9e01116ed (bug 1525245)
Backed out changeset 66e19a0c38dd (bug 1525245)
Backed out changeset fb90d51ba853 (bug 1525245)
Backed out changeset 4772db3625b3 (bug 1525245)
Backed out changeset 9affaf0cb998 (bug 1525245)
Backed out changeset a91b7ebe8bdd (bug 1525245)
Backed out changeset c2a13a7480e1 (bug 1525245)
Backed out changeset abe4482fa137 (bug 1525245)
Backed out changeset b3920c0bcf84 (bug 1525245)
Backed out changeset 0821b81f2724 (bug 1525245)
Backed out changeset 70bed2ad7899 (bug 1525245)
Backed out changeset 5f72ba232cc8 (bug 1525245)
2019-03-07 17:54:18 +02:00
Andrea Marchesini
f44f894eb1 Bug 1525245 - Stabilize cookiePolicy/cookiePermission for live documents - part 1 - information stored into loadInfo, r=Ehsan,ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D18949

--HG--
extra : moz-landing-system : lando
2019-03-07 10:14:36 +00:00
Dorel Luca
ac34e1d973 Backed out 16 changesets (bug 1525245) for Android failures. CLOSED TREE
Backed out changeset 9f8a1b410320 (bug 1525245)
Backed out changeset 0ef284a9a1d5 (bug 1525245)
Backed out changeset 835e5f642a03 (bug 1525245)
Backed out changeset 362f5a8d033c (bug 1525245)
Backed out changeset 9da3ab33cf67 (bug 1525245)
Backed out changeset 6aacd2d6e835 (bug 1525245)
Backed out changeset 8ff9e8f45e02 (bug 1525245)
Backed out changeset 2020227181cc (bug 1525245)
Backed out changeset fc3c64c330b9 (bug 1525245)
Backed out changeset 2762bf88e050 (bug 1525245)
Backed out changeset ffc10fdc50a6 (bug 1525245)
Backed out changeset bb6ade1207d7 (bug 1525245)
Backed out changeset 1875eb5085e4 (bug 1525245)
Backed out changeset 7e4f67a6d6f1 (bug 1525245)
Backed out changeset e671fc9581eb (bug 1525245)
Backed out changeset b89f5def8d0d (bug 1525245)
2019-03-06 21:07:49 +02:00
Andrea Marchesini
2fb61cb48b Bug 1525245 - Stabilize cookiePolicy/cookiePermission for live documents - part 1 - information stored into loadInfo, r=Ehsan,ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D18949

--HG--
extra : moz-landing-system : lando
2019-03-06 17:00:39 +00:00
Brindusan Cristian
b1a6b274b6 Backed out 6 changesets (bug 1525662, bug 1501665) for geckoview failures at org.mozilla.geckoview.test.NavigationDelegateTest.loadData_noMimeType. CLOSED TREE
Backed out changeset 1fa7091b4b4e (bug 1525662)
Backed out changeset 32249c69fee9 (bug 1525662)
Backed out changeset aaa8fbdbbe48 (bug 1525662)
Backed out changeset f07e25fac5b2 (bug 1525662)
Backed out changeset a8ec11730706 (bug 1525662)
Backed out changeset 159753062cfa (bug 1501665)
2019-03-05 23:42:55 +02:00
Jan Henning
61f77676dd Bug 1525662 - Part 3: Provide a hook for treating missing viewport specification as an explicit "width=device-width". r=botond
Ordinarily, when a page doesn't explicitly specify its viewport dimensions using
a <meta> viewport tag, we treat is as a non-mobile-friendly desktop page and do
some special viewport handling.

For some document types however we might want to override that behaviour and
treat the page as if "<meta name="viewport" content="width=device-width>" had
explicitly been specified anyway.

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

--HG--
extra : moz-landing-system : lando
2019-03-05 18:01:13 +00:00
Jan Henning
8828d665ed Bug 1525662 - Part 3: Provide a hook for treating missing viewport specification as an explicit "width=device-width". r=botond
Ordinarily, when a page doesn't explicitly specify its viewport dimensions using
a <meta> viewport tag, we treat is as a non-mobile-friendly desktop page and do
some special viewport handling.

For some document types however we might want to override that behaviour and
treat the page as if "<meta name="viewport" content="width=device-width>" had
explicitly been specified anyway.

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

--HG--
extra : rebase_source : 5d18ebbd16d6599aa0fea68fc231f85b03aefff7
extra : amend_source : 644679487bc49cdda8b7cdf1134910215b89a8a8
extra : source : d8af32f0f0abf0c19f28e181ff1b038f7d5127bb
2019-02-24 14:55:02 +01:00
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
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
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
b44eb8de5e Bug 1489308 part 6. Remove now-unused mWillReparent member. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D17324

--HG--
extra : moz-landing-system : lando
2019-02-27 05:10:51 +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
Ciure Andrei
56434d5988 Backed out 2 changesets (bug 1509466) for rusttests build bustages CLOSED TREE
Backed out changeset 65c438efa01f (bug 1509466)
Backed out changeset e1cdaf345c39 (bug 1509466)
2019-02-28 01:29:15 +02:00
Brian Birtles
bcad38978b Bug 1509466 - Make cancelAnimationFrame cancel a pending request frame callback scheduled in the same frame; r=farre
As per the following change to the HTML spec:

  86b05f8a07

when running a requestAnimationFrame callback it should be possible to cancel
another requestAnimationFrame callback scheduled to run in the same frame by
using cancelAnimationFrame.

See issue:

  https://github.com/whatwg/html/issues/4359

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

--HG--
extra : moz-landing-system : lando
2019-02-27 10:18:48 +00:00
Brian Birtles
c2a7b658ea Bug 1509466 - Pass frame request callbacks along with their handles to nsRefreshDriver; r=farre
In the next patch in this series we want to compare the handle of frame
callbacks we are about to run,  with a set of canceled handles stored on the
document. This patch makes us pass the handles along with the callbacks so we
can do that.

Incidentally doing this allows us to just swap array elements when building up
the refresh driver's set of callbacks to run. That is hopefully a little more
efficient than running the implicit conversion operator on each item and then
appending to an array.

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

--HG--
extra : moz-landing-system : lando
2019-02-27 13:43:23 +00:00
Ciure Andrei
8d2894e70d Backed out 12 changesets (bug 1525245) for failing worker-interception.https.html CLOSED TREE
Backed out changeset 009e7457b990 (bug 1525245)
Backed out changeset efb2e8fca464 (bug 1525245)
Backed out changeset 6a8401de3237 (bug 1525245)
Backed out changeset 38e802661b14 (bug 1525245)
Backed out changeset d02e3f436390 (bug 1525245)
Backed out changeset 10afd61b7582 (bug 1525245)
Backed out changeset 6b92fb3666d1 (bug 1525245)
Backed out changeset 476af2d7efe5 (bug 1525245)
Backed out changeset 43ad14e323a1 (bug 1525245)
Backed out changeset 94295e3fb027 (bug 1525245)
Backed out changeset d01ead2270e9 (bug 1525245)
Backed out changeset 6bdda622a04a (bug 1525245)
2019-02-28 00:55:39 +02:00
Andrea Marchesini
dec5a16bcd Bug 1525245 - Stabilize cookiePolicy/cookiePermission for live documents - part 1 - information stored into loadInfo, r=Ehsan,ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D18949

--HG--
extra : moz-landing-system : lando
2019-02-27 19:55:11 +00:00
Gurzau Raul
a12ddd1865 Backed out 11 changesets (bug 1525245) for failing at test_cookies_thirdparty.js on a CLOSED TREE.
Backed out changeset 1dcb31a1d5be (bug 1525245)
Backed out changeset 4cde0e38ada8 (bug 1525245)
Backed out changeset d3e99dd3fc32 (bug 1525245)
Backed out changeset a565014fdd8d (bug 1525245)
Backed out changeset 20f336320ce1 (bug 1525245)
Backed out changeset d8ee13b6a17d (bug 1525245)
Backed out changeset b79ec111bf41 (bug 1525245)
Backed out changeset 858d08371107 (bug 1525245)
Backed out changeset 1c359cdcf69f (bug 1525245)
Backed out changeset d65fb2d2a243 (bug 1525245)
Backed out changeset 28147c8790d3 (bug 1525245)
2019-02-26 22:09:25 +02:00
Andrea Marchesini
309c007d8d Bug 1525245 - Stabilize cookiePolicy/cookiePermission for live documents - part 1 - information stored into loadInfo, r=Ehsan,ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D18949

--HG--
extra : moz-landing-system : lando
2019-02-26 17:34:36 +00:00
Tarek Ziadé
48840088a2 Bug 1519861 - Improve mozilla::GetTabSizes - r=smaug
Introduces a generation number in dom::base::Document as well
as a cached version of TabSizes we can Get and Set.
When the document is changed, the cache is invalidated.

This change improves about:performance speed by avoiding
a heavy recursive call on big DOM trees via GetTabSizes() calls.
If the page does not change, the cached values are returned.

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

--HG--
extra : moz-landing-system : lando
2019-02-25 16:39:46 +00:00
Emilio Cobos Álvarez
d073df2e6e Bug 1528675 - Rename NODE_CHROME_ONLY_ACCESS to NODE_HAS_BEEN_IN_UA_WIDGET, and use that to determine our wrapper scope. r=bzbarsky
It won't change then, even when removed from the UA Widget. It also gives us an
extra node bit.

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

--HG--
extra : moz-landing-system : lando
2019-02-21 18:39:28 +00:00
Emilio Cobos Álvarez
a59f4ed1fb Bug 1528914 - Tidy the relationship between the doc shell and the pres context. r=qdot
Make it always forward to the document's docshell. We rely on it being setup by
the time our stuff runs, and we cannot have multiple pres contexts per document
in different docshells anymore.

This allows me to also move some state to the document (about whether it's
currently loaded in a chrome docshell (nsPresContext::mIsChrome) and whether
it's a chrome origin image (nsPresContext::mIsChromeOriginImage), which will
help for bug 1490401 / bug 1418159.

The pres context already relies on having the docshell available on `Init` and
we don't properly handle dynamic changes to it.

The reason I store some state like whether the doc URI is chrome:// and whether
we're in a chrome docshell is not (only) to avoid recomputing it over and over,
but also to allow me to read them from Stylo (main-thread blocked, but poke at
that from multiple non-main-threads).

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

--HG--
extra : moz-landing-system : lando
2019-02-19 22:53:40 +00:00
Boris Zbarsky
bc348929b6 Bug 1515582. Remove the separate XBL scope setup. r=bholley
With these changes, XBL just runs in the window scope of whatever document it's
attached to.  Since (outside of tests and "remote XUL") we no longer attach XBL
to web documents, this is fine.  And "remote XUL" already ran without the XBL
scope.

Native anonymous content, which used to be placed in the XBL scope to hide it
from the page, is now placed in the unprivileged junk scope, so it stays hidden
from the page.

dom/xbl/test/test_bug944407.xul is being removed because we are changing the
behavior it's trying to test for.  Since we now always put the XBL in the same
scope as the page, script is enabled for the XBL if and only if it's enabled for
the page.

dom/base/test/test_bug419527.xhtml, dom/events/test/test_bug391568.xhtml,
dom/xbl/test/test_bug1086996.xhtml are being switched to a chrome test because
otherwise the XBL can't see the getAnonymousNodes method.

All the XBL bits are being removed from test_interfaces because we no longer
have a separate XBL scope to test the behavior of.

js/xpconnect/tests/mochitest/test_nac.xhtml is being removed because XBL no
longer has access to NAC unless the page it's attached to does too, so the test
doesn't really make sense.

layout/xul/test/test_bug1197913.xul is being switched to a chrome test because
its XUL elements use bindings that rely on APIs that are not exposed to normal
web content.

layout/reftests/bugs/495385-2f.xhtml is being removed because I can't think of
a sane way to test that in the new world, short of running the reftest as
chrome.  And it doesn't seem worthwhile to look for a way to do that.

dom/xbl/test/test_bug1098628_throw_from_construct.xhtml now needs to
expectUncaughtException(), because the exception is now being thrown in Window
scope.

dom/xbl/test/test_bug1359859.xhtml needs to expectUncaughtException() as needed
and not use XPCNativeWrapper (which it doesn't need to anyway now).

dom/xbl/test/test_bug389322.xhtml, dom/xbl/test/test_bug400705.xhtml,
dom/xbl/test/test_bug401907.xhtml, dom/xbl/test/test_bug403162.xhtml,
dom/xbl/test/test_bug526178.xhtml, dom/xbl/test/test_bug639338.xhtml don't need
to use XPCNativeWrapper anymore.

dom/xbl/test/test_bug821850.html is being removed because it exists only to test XBL scopes.

dom/xbl/test/file_bug950909.xml is being changed to work without a separate XBL
scope (though whether the test still makes sense at that point is a bit questionable).

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

--HG--
extra : moz-landing-system : lando
2019-02-11 21:51:47 +00:00
Brendan Dahl
ed6a76c718 Bug 1524640 - Fix font loading during mozPrintCallback. r=smaug
Copy fonts loaded during a mozPrintCallback into the cloned document,
so they are available during printing.

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

--HG--
extra : moz-landing-system : lando
2019-02-06 23:46:58 +00:00
Ehsan Akhgari
61cf348c77 Bug 1525356 - Cache the Document's base domain to avoid recomputing it over and over again inside ThirdPartyUtil::IsThirdPartyWindow(); r=baku
Differential Revision: https://phabricator.services.mozilla.com/D18726
2019-02-05 18:57:05 -05:00
Emilio Cobos Álvarez
0ebf739646 Bug 1523181 - Don't implicitly flush the user font set.
Summary:
Flushing it at a bad time can cancel loads whose timer / completion
handler is in progress, which makes no sense.

Reviewers: jfkthame, jwatt, heycam

Tags: #secure-revision

Bug #: 1523181

Differential Revision: https://phabricator.services.mozilla.com/D17856
2019-02-05 13:30:13 +01:00
Andrea Marchesini
506304e224 Bug 1522210 - Fingerprinting and cryptomining classifiers must have separate nsIWebProgressListener blocking state codes - part 7 - cryptomining, r=ehsan,johannh
Differential Revision: https://phabricator.services.mozilla.com/D17641
2019-01-30 14:01:51 +01:00
Andrea Marchesini
5a909353eb Bug 1522210 - Fingerprinting and cryptomining classifiers must have separate nsIWebProgressListener blocking state codes - part 6 - fingerprinting, r=ehsan,johannh
Differential Revision: https://phabricator.services.mozilla.com/D17640
2019-01-30 14:01:05 +01:00