Commit Graph

379 Commits

Author SHA1 Message Date
Emilio Cobos Álvarez
3ccc6c30ab Bug 1603313 - Subdocument enum callbacks should take a reference. r=bzbarsky
As they can never take null.

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

--HG--
extra : moz-landing-system : lando
2019-12-14 05:08:39 +00:00
Randell Jesup
b674328047 Bug 1596784: Support SetTimeout deferral during load under Fission r=smaug
Fission puts subdocuments (potentially) in separate processes, so we can't
just EnumerateSubDocuments and poke the TimeoutManagers for each one.

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

--HG--
extra : moz-landing-system : lando
2019-12-13 17:09:33 +00:00
Emilio Cobos Álvarez
b498defa90 Bug 1603455 - Remove full-screen-api.unprefix.enabled. r=xidorn,smaug
It's been enabled since Firefox 64.

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

--HG--
extra : moz-landing-system : lando
2019-12-13 13:27:27 +00:00
Emilio Cobos Álvarez
f2ae3383f9 Bug 1603534 - Merge ShadowRoot::StyleSheets and Document::StyleSheets(). r=nordzilla
They do the same so no reason to have it duplicated. EnsureDOMStyleSheets
doesn't have any other caller so just inline it there.

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

--HG--
extra : moz-landing-system : lando
2019-12-12 21:51:59 +00:00
Noemi Erli
2b5af87228 Backed out changeset d23f209ada8b (bug 1603455) for causing failures in test_fullscreen-api.html
--HG--
extra : rebase_source : 7b7990746d3884eeced2404ed9bc78590db4b77c
2019-12-12 23:49:35 +02:00
Emilio Cobos Álvarez
8d6730e227 Bug 1603455 - Remove full-screen-api.unprefix.enabled. r=xidorn,smaug
It's been enabled since Firefox 64.

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

--HG--
extra : moz-landing-system : lando
2019-12-12 19:56:10 +00:00
Kris Maglione
90e2898150 Bug 1602608: Reject DOM Fullscreen promises with reasonable messages. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D56599

--HG--
extra : moz-landing-system : lando
2019-12-10 22:26:23 +00:00
Emilio Cobos Álvarez
25987bb3e9 Bug 1602317 - Remove some useless includes. r=heycam
This intended to fix some windows builds, but that didn't end up working.

This removes some unused members and such, and fixes some missing includes
that they uncover (whoops).

This was needed because some windows headers used in the sandbox redefine STRICT
(which is used by `StyleContain`) and `TRANSPARENT`, which is used by some WR
stuff.

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

--HG--
extra : moz-landing-system : lando
2019-12-09 12:52:53 +00:00
Gabriele Svelto
ace6d1063f Bug 1600545 - Remove useless inclusions of header files generated from IDL files in dom/ r=Ehsan
The inclusions were removed with the following very crude script and the
resulting breakage was fixed up by hand. The manual fixups did either
revert the changes done by the script, replace a generic header with a more
specific one or replace a header with a forward declaration.

find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
    interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
    if [ -n "$interfaces" ]; then
        if [[ "$interfaces" == *$'\n'* ]]; then
          regexp="\("
          for i in $interfaces; do regexp="$regexp$i\|"; done
          regexp="${regexp%%\\\|}\)"
        else
          regexp="$interfaces"
        fi
        interface=$(basename "$path")
        rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
            hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
            if [ $hits -eq 0 ]; then
                echo "Removing ${interface} from ${path2}"
                grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
                mv -f "$path2".tmp "$path2"
            fi
        done
    fi
done

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

--HG--
extra : moz-landing-system : lando
2019-12-06 09:24:56 +00:00
Thomas Nguyen
1e82cdc161 Bug 1483631 - Prompt with both first party and third party origin if we are delegating permission with allows all feature policy. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D51839

--HG--
extra : moz-landing-system : lando
2019-12-04 15:39:26 +00:00
Dorel Luca
a381d5c96d Backed out changeset f6e53d1c6518 (bug 1600545) for Android build bustage. CLOSED TREE 2019-12-04 17:32:27 +02:00
Gabriele Svelto
bc9290f767 Bug 1600545 - Remove useless inclusions of header files generated from IDL files in dom/ r=Ehsan
The inclusions were removed with the following very crude script and the
resulting breakage was fixed up by hand. The manual fixups did either
revert the changes done by the script, replace a generic header with a more
specific one or replace a header with a forward declaration.

find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
    interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
    if [ -n "$interfaces" ]; then
        if [[ "$interfaces" == *$'\n'* ]]; then
          regexp="\("
          for i in $interfaces; do regexp="$regexp$i\|"; done
          regexp="${regexp%%\\\|}\)"
        else
          regexp="$interfaces"
        fi
        interface=$(basename "$path")
        rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
            hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
            if [ $hits -eq 0 ]; then
                echo "Removing ${interface} from ${path2}"
                grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
                mv -f "$path2".tmp "$path2"
            fi
        done
    fi
done

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

--HG--
extra : moz-landing-system : lando
2019-12-04 15:01:19 +00:00
Micah Tigley
8c7e4877d3 Bug 1595800 - Part 3: Remove screen orientation attributes used for RDM from Document. r=smaug
Depends on D55001

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

--HG--
extra : moz-landing-system : lando
2019-12-04 00:44:23 +00:00
Gurzau Raul
9510cd391a Backed out 4 changesets (bug 1595800) for failing at browser_orientationchange_event.js on a CLOSED TREE.
Backed out changeset c78cb9bbddb9 (bug 1595800)
Backed out changeset 558449ce7d0a (bug 1595800)
Backed out changeset ef7f9e251137 (bug 1595800)
Backed out changeset 2167343f5bd3 (bug 1595800)
2019-12-04 02:27:04 +02:00
Micah Tigley
159c2fc60c Bug 1595800 - Part 3: Remove screen orientation attributes used for RDM from Document. r=smaug
Depends on D55001

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

--HG--
extra : moz-landing-system : lando
2019-12-03 17:49:03 +00:00
Gurzau Raul
4f21dcd081 Backed out 4 changesets (bug 1483631) for failing at browser_temporary_permissions.js on a CLOSED TREE.
Backed out changeset f5bb5f6a148f (bug 1483631)
Backed out changeset c5e562c1d590 (bug 1483631)
Backed out changeset 7ef09193a7ef (bug 1483631)
Backed out changeset a909dcbbea2b (bug 1483631)
2019-12-03 21:57:55 +02:00
Brindusan Cristian
4709de082d Backed out 4 changesets (bug 1595800) for devtools failures at browser_contextual_identity.js. CLOSED TREE
Backed out changeset 7d6f51331aed (bug 1595800)
Backed out changeset d44c8dde04be (bug 1595800)
Backed out changeset 2f607bbc19b9 (bug 1595800)
Backed out changeset 196ca9fefb06 (bug 1595800)
2019-12-03 19:44:37 +02:00
Thomas Nguyen
14991f5ba2 Bug 1483631 - Prompt with both first party and third party origin if we are delegating permission with allows all feature policy. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D51839

--HG--
extra : moz-landing-system : lando
2019-12-03 16:24:39 +00:00
Micah Tigley
6994c26198 Bug 1595800 - Part 3: Remove screen orientation attributes used for RDM from Document. r=smaug
Depends on D55001

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

--HG--
extra : moz-landing-system : lando
2019-11-27 21:20:24 +00:00
Christoph Walcher
3ffca1fa73 Bug 1596477 - Remove NS_NewXBLDocument r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D53259

--HG--
extra : moz-landing-system : lando
2019-12-02 18:52:42 +00:00
Emilio Cobos Álvarez
0ff42b5218 Bug 1600155 - Remove StyleSheet{Added,Removed} and StyleRule{Added,Removed,Changed} events. r=heycam,smaug
They're only used by tests, and are not exposed.

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

--HG--
extra : moz-landing-system : lando
2019-11-30 12:24:32 +00:00
Emilio Cobos Álvarez
a65fe39265 Bug 1600155 - Make @import rules less weird. r=heycam
Have their own notification for when the child sheet loads instead of
piggy-backing in the RuleAdded one, and make the callers check instead.

This prevents incorrectly marking as modified sheets which only have @import
rules.

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

--HG--
extra : moz-landing-system : lando
2019-11-30 12:24:24 +00:00
Brendan Dahl
97e8182bb2 Bug 1596709 - Move special chrome root element handling to an observer. r=smaug
Enables any type of document to use the special root element attributes
currently used by XUL <window>.

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

--HG--
extra : moz-landing-system : lando
2019-11-28 21:46:33 +00:00
Emilio Cobos Álvarez
3c12d374bc Bug 1600362 - Cleanup IntersectionObserver. r=smaug
Initially this was going to be a simple cleanup: Remove some useless namespaces
here and there and so on, remove `using` statements from the header and so on.

But unfortunately, DOMIntersectionObserver.h (which is included in Element.h,
unnecessarily) ended up exposing `Element` unnamespaced to a lot of code, so I
had to fix that.

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

--HG--
extra : moz-landing-system : lando
2019-11-29 20:39:36 +00:00
Honza Bambas
ce072f8e6a Bug 1594449 - <link rel="preload"> implemented as a speculative load initiated during the prescan phase in the HTML5 parser, disabled by default, only supports "script" and "styles" types, r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D52019

--HG--
extra : moz-landing-system : lando
2019-11-27 21:45:12 +00:00
Emilio Cobos Álvarez
389deb958b Bug 1599843 - Document::SetEditingState is infallible. r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D54995

--HG--
extra : moz-landing-system : lando
2019-11-28 12:21:23 +00:00
Emilio Cobos Álvarez
8f0845aadf Bug 1599843 - Document::ChangeContentEditableCount is infallible. r=masayuki
And should take Element, not nsIContent pointers.

Depends on D54993

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

--HG--
extra : moz-landing-system : lando
2019-11-28 12:20:30 +00:00
Emilio Cobos Álvarez
9b40370f24 Bug 1599843 - Document::RemoteFrameFullscreen* are infallible. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D54990

--HG--
extra : moz-landing-system : lando
2019-11-27 23:25:22 +00:00
Mihai Alexandru Michis
4c3e05fcaf Backed out changeset 40b67d5f6d17 (bug 1596709) for causing Nightlies to not respond to clicks. a=backout
--HG--
extra : histedit_source : 1caac4927e64d87617f91f8901ac22e59ee9eca3
2019-11-27 17:01:26 +02:00
Brendan Dahl
3eb48da3d2 Bug 1596709 - Move special chrome root element handling to an observer. r=smaug
Enables any type of document to use the special root element attributes
currently used by XUL <window>.

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

--HG--
extra : moz-landing-system : lando
2019-11-26 22:39:48 +00:00
Masayuki Nakano
20699e2189 Bug 1597679 - part 2: Make nsITextControlElement inherit nsGenericHTMLFormElementWithState r=smaug
Sub classes of `nsITextControlElement` are only `HTMLInputElement` and
`HTMLTextAreaElement`. And both base class is
`nsGenericHTMLFormElementWithState`.  Therefore, we can make
`nsITextControlElement` inherit `nsGenericHTMLFormElementWithState` and
make `HTMLInputElement` and `HTMLTextAreaElement` inherit
`nsITextControlElement`.  Then, we can get rid of a lot of QI between
`nsINode`/`nsIContent`/`Element` and `nsITextControlElement` (and note that
some of them in a hot path).

Additionally, this patch renames `nsITextControlElement` to
`mozilla::TextControlElement`.

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

--HG--
rename : dom/html/nsITextControlElement.h => dom/html/TextControlElement.h
extra : moz-landing-system : lando
2019-11-25 06:35:15 +00:00
Narcis Beleuzu
d216929bfc Backed out changeset 25246ff84740 (bug 1596709) as per Mossop req. a=backout 2019-11-23 17:06:44 +02:00
Brendan Dahl
e433d5cfce Bug 1596709 - Move special chrome root element handling to an observer. r=smaug
Enables any type of document to use the special root element attributes
currently used by XUL <window>.

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

--HG--
extra : moz-landing-system : lando
2019-11-21 21:25:55 +00:00
Emilio Cobos Álvarez
f81ed0918a Bug 1596992 - Avoid leaking ResizeObserver entries without active observations for the lifetime of the document. r=smaug
By adding / removing to the observer list on observe() / unobserve()
respectively, rather than only adding on construction per spec.

See https://github.com/w3c/csswg-drafts/issues/4518 for the relevant spec issue.

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

--HG--
extra : moz-landing-system : lando
2019-11-19 16:45:15 +00:00
Ehsan Akhgari
8909341af2 Bug 1589476 - Emit a separate notification when a tracker from the Level 2 Disconnect blocklist is observed on a page and use this code to avoid using the URL classifer service in the front-end; r=nhnt11,droeh
Differential Revision: https://phabricator.services.mozilla.com/D49660

--HG--
extra : moz-landing-system : lando
2019-11-18 20:56:36 +00:00
Emilio Cobos Álvarez
ddad5ae430 Bug 1596800 - Remove document.getAnonymousNodes as well. r=smaug
As it always returns null.

Depends on D53342

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

--HG--
extra : moz-landing-system : lando
2019-11-18 19:15:16 +00:00
Emilio Cobos Álvarez
06d4249d44 Bug 1596800 - Remove document.getBindingParent. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D53342

--HG--
extra : moz-landing-system : lando
2019-11-18 19:06:51 +00:00
Micah Tigley
7d2b424e84 Bug 1593708 - Part 3: Remove inRDMPane attribute from Document. r=bradwerth,smaug
Depends on D52216

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

--HG--
extra : moz-landing-system : lando
2019-11-07 22:17:25 +00:00
Micah Tigley
72a0d2c330 Bug 1593708 - Part 2: Get inRDMPane value from BrowsingContext instead of Document. r=smaug
Depends on D52214

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

--HG--
extra : moz-landing-system : lando
2019-11-14 20:32:02 +00:00
Brian Grinstead
115b8b4e27 Bug 1591145 - Remove Document.GetAnonymousElementByAttribute r=webidl,baku
Differential Revision: https://phabricator.services.mozilla.com/D52215

--HG--
extra : moz-landing-system : lando
2019-11-07 21:36:15 +00:00
Thomas Nguyen
7e65be9414 Bug 1583142 - Remove third-party "persistent-storage" prompting support r=baku
Differential Revision: https://phabricator.services.mozilla.com/D50908

--HG--
extra : moz-landing-system : lando
2019-11-07 14:29:02 +00:00
Ciure Andrei
c5a6643d39 Backed out changeset dde0354521ab (bug 1583142) for causing PermissionDelegateHandler.cpp bustages CLOSED TREE 2019-11-07 14:17:02 +02:00
Thomas Nguyen
f431604a62 Bug 1583142 - Remove third-party "persistent-storage" prompting support r=baku
Differential Revision: https://phabricator.services.mozilla.com/D50908

--HG--
extra : moz-landing-system : lando
2019-11-07 11:56:28 +00:00
Brian Grinstead
8e592888cb Bug 1593119 - clang-format the files affected by the MOZ_XBL unifdef r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D52057

--HG--
extra : moz-landing-system : lando
2019-11-07 00:35:25 +00:00
Brian Grinstead
f19f38776b Bug 1593119 - unifdef MOZ_XBL r=bzbarsky
This was generated with:

```
rg -l -g '*.{cpp,h}' MOZ_XBL . | while read FILE ; do
   echo $FILE
   unifdef -m -UMOZ_XBL $FILE
done
```

After this, I manually removed the directive in nsContentUtils.cpp due to:

  unifdef: ./dom/base/nsContentUtils.cpp: 4630: Unterminated string literal
  unifdef: Output may be truncated

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

--HG--
extra : moz-landing-system : lando
2019-11-07 00:35:13 +00:00
Brendan Dahl
eafc9e3293 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-05 17:56:28 +00:00
Mihai Alexandru Michis
b819bd25aa Backed out 2 changesets (bug 1470510) for causing bustages in widget/cocoa/nsChildView.mm CLOSED TREE
Backed out changeset a343f30c34a3 (bug 1470510)
Backed out changeset 4da64790094d (bug 1470510)

--HG--
rename : xpfe/appshell/nsIAppWindow.idl => xpfe/appshell/nsIXULWindow.idl
rename : xpfe/appshell/AppWindow.cpp => xpfe/appshell/nsXULWindow.cpp
rename : xpfe/appshell/AppWindow.h => xpfe/appshell/nsXULWindow.h
2019-11-05 09:24:26 +02:00
Brendan Dahl
0c0da7791e 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 23:37:31 +00:00
Dorel Luca
0207ce5451 Backed out 2 changesets (bug 1470510) for build bustage on /build/src/widget/cocoa/nsChildView.mm. CLOSED TREE
Backed out changeset 5967bf633574 (bug 1470510)
Backed out changeset 067a556bb614 (bug 1470510)

--HG--
rename : xpfe/appshell/nsIAppWindow.idl => xpfe/appshell/nsIXULWindow.idl
rename : xpfe/appshell/AppWindow.cpp => xpfe/appshell/nsXULWindow.cpp
rename : xpfe/appshell/AppWindow.h => xpfe/appshell/nsXULWindow.h
extra : amend_source : 752d828c6a0726c3f2df57a25741e38b36b75d6b
2019-11-04 19:18:56 +02:00
Alex Catarineu
08a431f34e 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 16:56:27 +00:00
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