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

4957 Коммитов

Автор SHA1 Сообщение Дата
Olli Pettay 036d8eb082 Bug 1842792, disable speculative load of modulepreload if parser has seen importmap, r=jonco,allstarschh,peterv
Differential Revision: https://phabricator.services.mozilla.com/D183421
2023-07-13 16:27:23 +00:00
Tom Schuster 36bbfb0e0c Bug 1842199 - Add nonce attribute to HTML parser. r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D182777
2023-07-10 12:48:23 +00:00
Cristina Horotan f03ce34731 Backed out changeset 24e6bd152417 (bug 1627263) as requested because it landed with the wrong bug number 2023-07-10 14:31:32 +03:00
Tom Schuster 80b4c639e3 Bug 1627263 - Add nonce attribute to HTML parser. r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D182777
2023-07-10 10:39:45 +00:00
Noemi Erli 1f7e2c0e0f Backed out changeset dd6b4605ab60 (bug 1627263) for causing bustages in nsHtml5StackNode.h CLOSED TREE 2023-07-07 15:01:27 +03:00
Tom Schuster e9fda63e32 Bug 1627263 - Add nonce attribute to HTML parser. r=hsivonen
Depends on D182564

Differential Revision: https://phabricator.services.mozilla.com/D182777
2023-07-07 11:26:55 +00:00
Kershaw Chang 705e17a537 Bug 1838829 - Skip failed tests, r=necko-reviewers,extension-reviewers,credential-management-reviewers,devtools-reviewers,dimi,valentin,robwu
Differential Revision: https://phabricator.services.mozilla.com/D181251
2023-06-28 13:21:00 +00:00
Norisz Fay 07a91b8c6a Backed out 2 changesets (bug 1838829) for causing perma mochitest failure with dom/websocket/tests being skipped CLOSED TREE
Backed out changeset 19a5d4f1850a (bug 1838829)
Backed out changeset 97cd8a256954 (bug 1838829)
2023-06-27 02:52:52 +03:00
Kershaw Chang 75c68b6864 Bug 1838829 - Skip failed tests, r=necko-reviewers,extension-reviewers,credential-management-reviewers,devtools-reviewers,dimi,valentin,robwu
Differential Revision: https://phabricator.services.mozilla.com/D181251
2023-06-26 14:22:14 +00:00
Emilio Cobos Álvarez 4cc6758558 Bug 1839922 - Remove usage of {Has,Get}Attr(kNameSpaceID_None, ..). r=edgar
We have more readable and faster versions (that just omit the namespace
arg).

Mostly done via sed, with a couple helpers to use the faster lookups
where possible.

Differential Revision: https://phabricator.services.mozilla.com/D181795
2023-06-23 10:01:32 +00:00
Norisz Fay e86f1fa0e9 Backed out 5 changesets (bug 1838829) for causing mochitest failures CLOSED TREE
Backed out changeset 693d34c8447d (bug 1838829)
Backed out changeset 903d9ff4afaa (bug 1838829)
Backed out changeset 5e51feff7467 (bug 1838829)
Backed out changeset e125be49d2a6 (bug 1838829)
Backed out changeset 1a8cf3c83dc4 (bug 1838829)
2023-06-22 03:37:07 +03:00
Kershaw Chang 2cdb6b3a96 Bug 1838829 - Skip failed tests, r=necko-reviewers,extension-reviewers,credential-management-reviewers,devtools-reviewers,dimi,valentin,robwu
Differential Revision: https://phabricator.services.mozilla.com/D181251
2023-06-21 19:43:33 +00:00
Florian Quèze 449a69c5a8 Bug 1836191 - remove PerformanceCounter that was only used by ChromeUtils.requestPerformanceMetrics, r=smaug.
Differential Revision: https://phabricator.services.mozilla.com/D179697
2023-06-08 21:53:18 +00:00
Shravan Narayan 45b7084872 Bug 1831654 - Graceful failures for out of range column number in expat error handling r=glandium,peterv
Differential Revision: https://phabricator.services.mozilla.com/D177311
2023-06-02 20:45:17 +00:00
Mark Banner 130a655906 Bug 1826062 - Automatic fixes for upgrading Prettier to 2.8.8. r=mossop,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,denschub,devtools-reviewers,sparky,calu
Differential Revision: https://phabricator.services.mozilla.com/D177027
2023-05-20 12:26:53 +00:00
Mark Banner 8219a5c503 Bug 1826062 - Automatic fixes for Prettier 2.0.5 upgrade. r=mossop,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,denschub,devtools-reviewers,sparky,owlish
Differential Revision: https://phabricator.services.mozilla.com/D177025
2023-05-20 12:26:49 +00:00
Sean Feng bd1e35c1d2 Bug 1816287 - Always exit fullscreen when triggering on external protocol r=edgar
It's a security risk such that the maximized external program can obscure
the fullscreen notification and the malicious site can use this trick
to load a spoofed page in the background without user notices it.

This patch minimized the risk by always exit the fullscreen mode when
an external protocol is triggered.

Differential Revision: https://phabricator.services.mozilla.com/D177771
2023-05-17 18:00:18 +00:00
Norisz Fay 34b6c94a76 Backed out changeset 6fa00ccfe7e0 (bug 1816287) for causing bustages on LocationBase.cpp CLOSED TREE 2023-05-17 20:11:39 +03:00
Sean Feng 9740581cf7 Bug 1816287 - Always exit fullscreen when triggering on external protocol r=edgar
It's a security risk such that the maximized external program can obscure
the fullscreen notification and the malicious site can use this trick
to load a spoofed page in the background without user notices it.

This patch minimized the risk by always exit the fullscreen mode when
an external protocol is triggered.

Differential Revision: https://phabricator.services.mozilla.com/D177771
2023-05-17 16:34:57 +00:00
Em Zhan cf3f789fba Bug 1425310 - Implement modulepreload for link rel. r=yulia,smaug,jonco
Does perform the optional step of fetching descendants and linking:
https://html.spec.whatwg.org/multipage/webappapis.html#fetching-scripts:fetch-the-descendants-of-and-link-a-module-script-2

Partially implements some new destinations ("as" attribute values) for
modulepreload only (not for preload or link attribute reflection)

Differential Revision: https://phabricator.services.mozilla.com/D172368
2023-05-14 10:49:46 +00:00
Natalia Csoregi e0961833bd Backed out changeset 3bb8a8b46f3c (bug 1425310) for causing failures on /preload/modulepreload.html. CLOSED TREE 2023-05-13 21:02:02 +03:00
Em Zhan 23e08c0b13 Bug 1425310 - Implement modulepreload for link rel. r=yulia,smaug,jonco
Does perform the optional step of fetching descendants and linking:
https://html.spec.whatwg.org/multipage/webappapis.html#fetching-scripts:fetch-the-descendants-of-and-link-a-module-script-2

Partially implements some new destinations ("as" attribute values) for
modulepreload only (not for preload or link attribute reflection)

Differential Revision: https://phabricator.services.mozilla.com/D172368
2023-05-13 16:09:03 +00:00
Cristian Tuns e106133337 Backed out changeset 0054de12b39c (bug 1425310) while the issue is being investigated(Bug 1832361) CLOSED TREE 2023-05-10 14:49:41 -04:00
Em Zhan 1fb37f2836 Bug 1425310 - Implement modulepreload for link rel. r=yulia,smaug,jonco
Does perform the optional step of fetching descendants and linking:
https://html.spec.whatwg.org/multipage/webappapis.html#fetching-scripts:fetch-the-descendants-of-and-link-a-module-script-2

Partially implements some new destinations ("as" attribute values) for
modulepreload only (not for preload or link attribute reflection)

Differential Revision: https://phabricator.services.mozilla.com/D172368
2023-05-09 12:35:52 +00:00
Peter Van der Beken 47f2f04439 Bug 1828082 - Remove unused nsScannerString methods. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D175471
2023-05-09 08:01:36 +00:00
Noemi Erli cd34e6e230 Backed out changeset 1ef27d4a851e (bug 1425310) for causing build bustages in nsHtml5TreeBuilderCppSupplement.h 2023-05-08 18:08:45 +03:00
Em Zhan aa8c113862 Bug 1425310 - Implement modulepreload for link rel. r=yulia,smaug,jonco
Does perform the optional step of fetching descendants and linking:
https://html.spec.whatwg.org/multipage/webappapis.html#fetching-scripts:fetch-the-descendants-of-and-link-a-module-script-2

Partially implements some new destinations ("as" attribute values) for
modulepreload only (not for preload or link attribute reflection)

Differential Revision: https://phabricator.services.mozilla.com/D172368
2023-05-08 13:12:30 +00:00
Emilio Cobos Álvarez 6d68b86f7c Bug 1830757 - Prevent node removal during iteration in conditional css sanitization. r=smaug
When the whole block is sanitized away, we remove the text node
altogether, triggering the assert. While it's not worrisome in this
case, the right thing to do is not mutating the DOM during iteration.

Differential Revision: https://phabricator.services.mozilla.com/D176917
2023-05-02 14:52:23 +00:00
Shravan Narayan b2267bb09e Bug 1824892: Fix tainting use in the nsExpatDriver r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D175433
2023-04-26 20:15:15 +00:00
Cristina Horotan 82a7ee4839 Backed out changeset b288a387f790 (bug 1425310) for causing Reflection related failures. CLOSED TREE 2023-04-21 18:37:11 +03:00
Em Zhan 3005df8d1d Bug 1425310 - Implement modulepreload for link rel. r=yulia,smaug,jonco
Does perform the optional step of fetching descendants and linking:
https://html.spec.whatwg.org/multipage/webappapis.html#fetching-scripts:fetch-the-descendants-of-and-link-a-module-script-2

Differential Revision: https://phabricator.services.mozilla.com/D172368
2023-04-21 14:32:30 +00:00
Shravan Narayan ed0bb19d78 Bug 1827704 - Migrate to the upstream wasm2c for RLBox sandboxing r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D175439
2023-04-21 01:31:35 +00:00
Narcis Beleuzu 00a30ad59d Backed out changeset 4b412f721080 (bug 1824892) for crashes on nsExpatDriver.cpp . CLOSED TREE 2023-04-20 05:12:27 +03:00
Shravan Narayan d39c9ba285 Bug 1824892: Fix tainting use in the nsExpatDriver r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D175433
2023-04-20 01:40:07 +00:00
Cosmin Sabou e95c76d3bf Backed out changeset be054669251a (bug 1425310) for causing browser-chrome leaks on nsStringBuffer. 2023-04-14 13:26:56 +03:00
Em Zhan 268390f013 Bug 1425310 - Implement modulepreload for link rel. r=yulia,smaug,jonco
Does perform the optional step of fetching descendants and linking:
https://html.spec.whatwg.org/multipage/webappapis.html#fetching-scripts:fetch-the-descendants-of-and-link-a-module-script-2

Differential Revision: https://phabricator.services.mozilla.com/D172368
2023-04-14 08:09:49 +00:00
Jan Varga bf5285ba85 Bug 1826067 - Fix non-unified-build bustage in parser/htmlparser/nsScanner.cpp; r=sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D174448
2023-04-03 12:59:14 +00:00
serge-sans-paille 3664d8774e Bug 1824516 - Make parser/htmlparser buildable outside of a unified build environment r=andi
Differential Revision: https://phabricator.services.mozilla.com/D173616
2023-03-30 13:48:34 +00:00
Andi-Bogdan Postelnicu 4efa1bd0ba Bug 1276351 - Move away from mozilla::tuple to std::tuple. r=necko-reviewers,sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D173256
2023-03-27 07:20:25 +00:00
Sandor Molnar 9db345d4c1 Backed out 2 changesets (bug 1276351) for causing build bustage in image/ClippedImage.cp CLOSED TREE
Backed out changeset e84598eb82c1 (bug 1276351)
Backed out changeset e940b0554484 (bug 1276351)
2023-03-25 14:16:43 +02:00
Andi-Bogdan Postelnicu 447f1e3358 Bug 1276351 - Move away from mozilla::tuple to std::tuple. r=necko-reviewers,sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D173256
2023-03-25 06:58:52 +00:00
Iulian Moraru 6d40eee997 Backed out 2 changesets (bug 1276351) for causing multiple failures.
Backed out changeset eeaf4f1e06af (bug 1276351)
Backed out changeset d44cb5704342 (bug 1276351)
2023-03-25 00:08:24 +02:00
Andi-Bogdan Postelnicu a1b827b503 Bug 1276351 - Move away from mozilla::tuple to std::tuple. r=necko-reviewers,sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D173256
2023-03-24 18:55:39 +00:00
Emilio Cobos Álvarez 91e6e4c5d4 Bug 1823686 - Share URLExtraData between SVG attribute mapping and style attribute. r=smaug
I don't think there's ever a way these should differ.

Got some include hell from removing ReferrerInfo.h from Document.h but
hopefully should be straight-forward to review.

Depends on D173154

Differential Revision: https://phabricator.services.mozilla.com/D173155
2023-03-22 14:54:43 +00:00
Nicolas Chevobbe a1645740cc Bug 1815937 - Set ScriptLoadContext column number for inline scripts. r=smaug,devtools-reviewers,ochameau.
Differential Revision: https://phabricator.services.mozilla.com/D170580
2023-03-21 17:27:48 +00:00
Kershaw Chang 5e58575e28 Bug 1809843 - Skip Failed tests, r=necko-reviewers,extension-reviewers,credential-management-reviewers,valentin,sgalich,robwu
Differential Revision: https://phabricator.services.mozilla.com/D171842
2023-03-21 09:09:58 +00:00
Marian-Vasile Laza 1c28d89a7e Backed out 3 changesets (bug 1823335, bug 1815937, bug 1823399) for devtools failures on browser_dbg-features-breakable-positions.js. CLOSED TREE
Backed out changeset f931921c97f2 (bug 1823399)
Backed out changeset 077d67ccc0d5 (bug 1823335)
Backed out changeset 103bf8d93883 (bug 1815937)
2023-03-21 00:01:11 +02:00
Nicolas Chevobbe 4aa1bc2655 Bug 1815937 - Set ScriptLoadContext column number for inline scripts. r=smaug,devtools-reviewers,ochameau.
Differential Revision: https://phabricator.services.mozilla.com/D170580
2023-03-20 19:25:19 +00:00
Cristina Horotan 588b393945 Backed out 2 changesets (bug 1815937) for causing wpt failures at blockeduri-inline.html CLOSED TREE
Backed out changeset 668971329051 (bug 1815937)
Backed out changeset a4a3430c9bab (bug 1815937)
2023-03-17 15:52:33 +02:00
Nicolas Chevobbe c0be3c7697 Bug 1815937 - Set ScriptLoadContext column number for inline scripts. r=smaug,devtools-reviewers,ochameau.
Differential Revision: https://phabricator.services.mozilla.com/D170580
2023-03-17 08:03:07 +00:00
Henri Sivonen 44b22460e5 Bug 1552008 - Track column number in the HTML. r=smaug,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D170579
2023-03-16 16:44:17 +00:00
serge-sans-paille 37a9268fca Bug 1820575 - Make parser/html buildable outside of a unified build environment r=andi
Differential Revision: https://phabricator.services.mozilla.com/D171733
2023-03-15 07:30:37 +00:00
Marian-Vasile Laza ee72efd1e9 Backed out 5 changesets (bug 1809843) for causing Cargo related build bustages. CLOSED TREE
Backed out changeset 5c494680f448 (bug 1809843)
Backed out changeset 02742b38edab (bug 1809843)
Backed out changeset 2b9b32ca8294 (bug 1809843)
Backed out changeset 56631cb02ae6 (bug 1809843)
Backed out changeset 37e35a60a71f (bug 1809843)
2023-03-13 13:53:26 +02:00
Kershaw Chang a60df34ad0 Bug 1809843 - Skip Failed tests, r=necko-reviewers,extension-reviewers,credential-management-reviewers,valentin,sgalich,robwu
Differential Revision: https://phabricator.services.mozilla.com/D171842
2023-03-13 11:12:33 +00:00
Marian-Vasile Laza 76bcfd7b55 Backed out changeset 1b5481ac73dc (bug 1552008) for mochitest failures on test_bug672453.html. CLOSED TREE 2023-03-08 19:25:26 +02:00
Henri Sivonen 8b7a8c4b9d Bug 1552008 - Track column number in the HTML. r=smaug,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D170579
2023-03-08 15:32:52 +00:00
Henri Sivonen 1bc8211238 Bug 1810896 - Adjust assertion to account for ISO-2022-JP at the start but UTF-8 at the end of HTML file. r=emk
Differential Revision: https://phabricator.services.mozilla.com/D170928
2023-02-27 07:51:13 +00:00
Sean Feng 5630ab554d Bug 1444491 - Check the number of script blocking style sheets in autofocus algorithm r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D165224
2023-02-15 20:08:38 +00:00
Csoregi Natalia fc752aa9f0 Backed out 7 changesets (bug 1444491, bug 1801761) for causing failures on autofocus-attribute.svg. CLOSED TREE
Backed out changeset 1cee414009cb (bug 1444491)
Backed out changeset 30f786b79191 (bug 1444491)
Backed out changeset ce06375518a7 (bug 1801761)
Backed out changeset 64c8bb293e5c (bug 1444491)
Backed out changeset 94aa0ce630f2 (bug 1444491)
Backed out changeset 80010eabc0c1 (bug 1444491)
Backed out changeset 7d8da1f44177 (bug 1444491)
2023-02-15 19:03:59 +02:00
Sean Feng bddde987c9 Bug 1444491 - Check the number of script blocking style sheets in autofocus algorithm r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D165224
2023-02-15 14:13:42 +00:00
Andi-Bogdan Postelnicu d7e8a09c21 Bug 1519636 - Reformat recent changes to the Google coding style. r=glandium
Updated with clang-format version 15.0.5 (taskcluster-MKK8dHUpQkGfPLA793lizg)
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D168658
2023-02-13 15:02:07 +00:00
Nika Layzell 59be033e1c Bug 1809753 - Part 1: Remove quantum-dom nsIThread::EventTarget methods, r=mccr8
We aren't likely to try to make these changes any time soon, so cleaning out
these unnecessary methods which just return `this` will simplify things.

I was unable to find any calls to the `.eventTarget` getter in JS, which makes
sense, as the nsIThread type is only really used in JS as a wrapper around the
main thread in older code. Because of that, it has been removed as well.

Differential Revision: https://phabricator.services.mozilla.com/D166605
2023-01-16 23:14:10 +00:00
Sandor Molnar 41b78439d0 Backed out 6 changesets (bug 1809752, bug 1809753) for causing perma failures in browser/components/firefoxview/tests/browser/browser_feature_callout_position.js
Backed out changeset ea05784d74c4 (bug 1809753)
Backed out changeset 7c9b20eebcc8 (bug 1809753)
Backed out changeset d0267ac2256d (bug 1809753)
Backed out changeset aa9f2971bd6f (bug 1809753)
Backed out changeset f0d9fcfaa6f8 (bug 1809752)
Backed out changeset 6d58c799cffe (bug 1809752)
2023-01-17 03:19:24 +02:00
Nika Layzell f410f28a30 Bug 1809753 - Part 1: Remove quantum-dom nsIThread::EventTarget methods, r=mccr8
We aren't likely to try to make these changes any time soon, so cleaning out
these unnecessary methods which just return `this` will simplify things.

I was unable to find any calls to the `.eventTarget` getter in JS, which makes
sense, as the nsIThread type is only really used in JS as a wrapper around the
main thread in older code. Because of that, it has been removed as well.

Differential Revision: https://phabricator.services.mozilla.com/D166605
2023-01-16 23:14:10 +00:00
Olli Pettay 52c00827ce Bug 1808824 - decrease content.sink.perf_parse_time, r=peterv,perftest-reviewers,sparky
Disabling a test on debug build. It is already very very slow without the pref change, and the change just pushes it above the limit.

Differential Revision: https://phabricator.services.mozilla.com/D166481
2023-01-11 23:46:33 +00:00
Magnus Melin cde4cdb1b1 Bug 1744944 - Avoid error console flooding of "This page is in Quirks Mode. Page layout may be impacted..." for schemes where it's not going to help. r=hsivonen
There are many places this can't be avoided, like about:blank used for composition, even on the web. While in theory it may occasionally be applicable for internal pages, it doesn't seem worth warning about.

Console message: [JavaScript Warning: "This page is in Quirks Mode. Page layout may be impacted. For Standards Mode use “<!DOCTYPE html>”." {file: "moz-nullprincipal:{a8ab26eb-ab25-4182-a032-60c3077b4b2c}" line: 0}]
Console message: [JavaScript Warning: "This page is in Quirks Mode. Page layout may be impacted. For Standards Mode use “<!DOCTYPE html>”." {file: "about:blank" line: 0}]
Console message: [JavaScript Warning: "This page is in Quirks Mode. Page layout may be impacted. For Standards Mode use “<!DOCTYPE html>”." {file: "about:blank?" line: 0}]
Console message: [JavaScript Warning: "This page is in Quirks Mode. Page layout may be impacted. For Standards Mode use “<!DOCTYPE html>”." {file: "about:blank?compose" line: 0}]
Console message: [JavaScript Warning: "This page is in Quirks Mode. Page layout may be impacted. For Standards Mode use “<!DOCTYPE html>”." {file: "chrome://messenger/content/messengercompose/MsgComposeCommands.js" line: 10587}]

Differential Revision: https://phabricator.services.mozilla.com/D164405
2022-12-24 07:12:56 +00:00
Mark Banner 8730eec697 Bug 1806359 - Convert telemetry imports to direct ES imports. r=necko-reviewers,application-update-reviewers,pip-reviewers,credential-management-reviewers,janerik,mconley,sgalich,bytesized,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D165002
2022-12-23 12:37:07 +00:00
Tom Schuster f66c3665b0 Bug 1645745 - Suppress CSP parser errors/warnings in certain cases. r=freddyb
Differential Revision: https://phabricator.services.mozilla.com/D163815
2022-12-19 11:52:45 +00:00
Henri Sivonen d33b99a1f7 Bug 1801862 - Remove the pref to run the HTML parser on the main thread. r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D162723
2022-12-14 11:58:02 +00:00
Manuel Bucher 01bc307305 Bug 1771867 - Early Hints Phase 2 - Part 6: Pass early hint preload to style preloader r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D161176
2022-12-02 16:15:55 +00:00
Manuel Bucher 7681efff11 Bug 1771867 - Early Hints Phase 2 - Part 5: Pass early hint preload to script preloader r=necko-reviewers,valentin
Note that modules can't be specified in Link preloads with `rel=preload`,
only in `rel=modulepreload`.  We currently only support `rel=preload` in
early hints. See Bug 1798319 for updates on module preloads.

Differential Revision: https://phabricator.services.mozilla.com/D161175
2022-12-02 16:15:54 +00:00
Manuel Bucher 2a9cb26225 Bug 1771867 - Early Hints Phase 2 - Part 2: Pass early hint preloads to preloader from IPC r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D161173
2022-12-02 16:15:53 +00:00
Csoregi Natalia 5a260d61a4 Backed out 13 changesets (bug 1771867) for causing CanonicalBrowsingContext crashes. CLOSED TREE
Backed out changeset 120838b58449 (bug 1771867)
Backed out changeset aea7ca0bbd17 (bug 1771867)
Backed out changeset 2fe2afdee09d (bug 1771867)
Backed out changeset 8bdb1f682d22 (bug 1771867)
Backed out changeset a9f3158ed688 (bug 1771867)
Backed out changeset 1177913e1edf (bug 1771867)
Backed out changeset d33ccbbf407d (bug 1771867)
Backed out changeset 110ac12e16f5 (bug 1771867)
Backed out changeset 7f20525f5e94 (bug 1771867)
Backed out changeset b3d65b1aa872 (bug 1771867)
Backed out changeset 7cdf3cef2773 (bug 1771867)
Backed out changeset 5090eae24a5c (bug 1771867)
Backed out changeset f8a03d226c73 (bug 1771867)
2022-12-02 13:44:55 +02:00
Manuel Bucher f155e62e3b Bug 1771867 - Early Hints Phase 2 - Part 6: Pass early hint preload to style preloader r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D161176
2022-12-02 09:45:26 +00:00
Manuel Bucher 4ec279d231 Bug 1771867 - Early Hints Phase 2 - Part 5: Pass early hint preload to script preloader r=necko-reviewers,valentin
Note that modules can't be specified in Link preloads with `rel=preload`,
only in `rel=modulepreload`.  We currently only support `rel=preload` in
early hints. See Bug 1798319 for updates on module preloads.

Differential Revision: https://phabricator.services.mozilla.com/D161175
2022-12-02 09:45:25 +00:00
Manuel Bucher 808529a4e4 Bug 1771867 - Early Hints Phase 2 - Part 2: Pass early hint preloads to preloader from IPC r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D161173
2022-12-02 09:45:24 +00:00
Henri Sivonen 8ea599da16 Bug 1803317 - Assert that mOpQueue is empty in ~nsHtml5TreeOpExecutor. r=edgar
The purpose is to be alerted of cases when ops were supposed to execute
but did not.

Differential Revision: https://phabricator.services.mozilla.com/D163425
2022-11-30 16:57:02 +00:00
Henri Sivonen 3e13c693ee Bug 1709012 - Remove NS_ASSERTION about executor queue being empty upon destruction. r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D162701
2022-11-22 12:30:04 +00:00
Tom Schuster b8387cd09a Bug 1770094 - Test. r=emilio,freddyb
Depends on D154518

Differential Revision: https://phabricator.services.mozilla.com/D154526
2022-11-16 10:28:24 +00:00
Olli Pettay 931fc85f24 Bug 1800381 - Consider to use higher priority tasks for parser's load flusher, r=hsivonen
Depends on D161955

Differential Revision: https://phabricator.services.mozilla.com/D161960
2022-11-16 09:23:28 +00:00
Peter Van der Beken 4d75a5523a Bug 1797336 - Apply expat CVE-2022-43680 fix. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D160676
2022-10-30 19:12:03 +00:00
Daniel Holbert 16170f25a6 Bug 1797840: Replace stray tab characters with spaces in IDL files throughout the tree. r=mccr8,necko-reviewers,credential-management-reviewers,smaug,sgalich,valentin
DONTBUILD because this is just whitespace cleanup.

I found the files to fix up here using this command:
    grep -r '   ' * 2>/dev/null | grep -v "other-licenses" | grep "idl:"

I replaced the tab characters with however many spaces seemed consistent with
the indentation in the surrounding code (and did some minor space-indentation
cleanup in contextual lines to preserve alignment, in a few cases).

Differential Revision: https://phabricator.services.mozilla.com/D160577
2022-10-28 18:08:17 +00:00
Mark Banner 2ffde1e92f Bug 1792341 - Migrate more toolkit/modules consumers to use direct ES module import. r=Gijs,webdriver-reviewers,perftest-reviewers,necko-reviewers,geckoview-reviewers,preferences-reviewers,application-update-reviewers,pip-reviewers,credential-management-reviewers,sgalich,owlish,bytesized,AlexandruIonescu,whimboo,mconley,mixedpuppy
Mainly automated changes. Some manual ESLint fixes and whitespace cleanup.

Differential Revision: https://phabricator.services.mozilla.com/D158452
2022-10-18 11:21:26 +00:00
Peter Van der Beken 08e889e6f8 Bug 1791598 - Ensure raw tagnames are safe exiting internalEntityParser. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D158770
2022-10-10 12:15:38 +00:00
Andrew McCreight 2da84b8ac4 Bug 1792574, part 3 - Don't include nsMemory where it isn't needed. r=xpcom-reviewers,necko-reviewers,valentin,nika
There are only 3 places where nsMemory.h is still needed (image/RasterImage.cpp,
gfx/thebes/gfxFT2FontList.cpp, and nsMemory.cpp). Remove the rest.

Differential Revision: https://phabricator.services.mozilla.com/D158213
2022-09-28 15:17:46 +00:00
Andreea Pavel df0df2fce9 Bug 1770888 - fix prettier lint failure on a CLOSED TREE 2022-09-20 11:56:52 +03:00
Frederik Braun 92f896ab7e Bug 1770888 - tests r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D156800
2022-09-20 08:29:55 +00:00
Michelle Goossens 7068f347aa Bug 1780219 - Migrate Android emulator tests from AWS to GCP r=ahal,jmaher,webdriver-reviewers,whimboo,gbrown
Differential Revision: https://phabricator.services.mozilla.com/D155959
2022-09-15 23:34:38 +00:00
Iulian Moraru 1c4dce02fc Backed out changeset 82fdc1bb7df9 (bug 1780219) for causing worker issues. 2022-09-16 00:50:10 +03:00
Michelle Goossens 661d12ee13 Bug 1780219 - Migrate Android emulator tests from AWS to GCP r=ahal,jmaher,webdriver-reviewers,whimboo,gbrown
Differential Revision: https://phabricator.services.mozilla.com/D155959
2022-09-15 13:55:25 +00:00
Emilio Cobos Álvarez f32093456d Bug 1786513 - Make SimpleResizeReflow not flush by default. r=jfkthame,layout-reviewers
Only GeckoMVMContext really needs the flush, to measure scrolled height
afterwards. Do that explicitly.

This shouldn't change behavior, for the most part; there was a preload
test that relied on the flush when changing DPI to start a run really
clean, but other than that this looks green on try.

Should at best be neutral (just code clean-up), or be a performance
improvement.

In a follow-up, we can possibly remove the DelayedResize code from the
view manager, though I need to think how to possibly coalesce the MVM
reflows, so let's not do that yet.

Differential Revision: https://phabricator.services.mozilla.com/D155385
2022-09-01 10:54:24 +00:00
Cristian Tuns 24652e5425 Backed out changeset e29b0fbf77f1 (bug 1786513) for causing mochitest failures on /browser_unified_extensions.js CLOSED TREE 2022-08-26 11:11:46 -04:00
Emilio Cobos Álvarez 7c34c8de9a Bug 1786513 - Make SimpleResizeReflow not flush by default. r=jfkthame,layout-reviewers
Only GeckoMVMContext really needs the flush, to measure scrolled height
afterwards. Do that explicitly.

This shouldn't change behavior, for the most part; there was a preload
test that relied on the flush when changing DPI to start a run really
clean, but other than that this looks green on try.

Should at best be neutral (just code clean-up), or be a performance
improvement.

In a follow-up, we can possibly remove the DelayedResize code from the
view manager, though I need to think how to possibly coalesce the MVM
reflows, so let's not do that yet.

Differential Revision: https://phabricator.services.mozilla.com/D155385
2022-08-26 12:58:12 +00:00
Tom Schuster b7a20e09d8 Bug 1770094 r=freddyb,emilio
Differential Revision: https://phabricator.services.mozilla.com/D154518
2022-08-15 14:41:10 +00:00
Marian-Vasile Laza bab4a983d9 Backed out changeset 3849f10b5154 (bug 1770094) requested by the dev - patch is incomplete. CLOSED TREE 2022-08-15 12:34:02 +03:00
Tom Schuster 8b61fb65a2 Bug 1770094 r=freddyb,emilio
Differential Revision: https://phabricator.services.mozilla.com/D154518
2022-08-15 08:19:06 +00:00
Fabrice Desré c50cb528fc Bug 1761040 - Prefix thread safety macros with MOZ_ r=geckoview-reviewers,media-playback-reviewers,alwu,jesup,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D152575
2022-08-03 16:39:41 +00:00
Andreea Pavel 3ccd75af8d Backed out changeset b9d2965591b9 (bug 1761040) for landing with wrong author CLOSED TREE DONTBUILD 2022-08-03 18:55:00 +03:00
Andreea Pavel fdb7cb2ecd Bug 1761040 - Prefix thread safety macros with MOZ_ r=geckoview-reviewers,media-playback-reviewers,alwu,jesup,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D152575
2022-08-03 15:27:43 +00:00
Mark Banner 7428be4a86 Bug 1782008 - Remove now unnecessary .eslintrc.js files. r=webcompat-reviewers,extension-reviewers,media-playback-reviewers,pip-reviewers,denschub,rpl,alwu,mossop
Differential Revision: https://phabricator.services.mozilla.com/D152736
2022-08-03 11:16:20 +00:00
Andreea Pavel 89d63c91e6 Backed out changeset a907159a482f (bug 1761040) for causing build bustages on a CLOSED TREE 2022-08-02 04:59:08 +03:00
Fabrice Desré 0f4ac7ad97 Bug 1761040 - Prefix thread safety macros with MOZ_ r=geckoview-reviewers,media-playback-reviewers,alwu,jesup,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D152575
2022-08-02 00:49:41 +00:00
Emilio Cobos Álvarez 5c27e19d07 Bug 1780361 - Split conditional CSS sanitization into its own function. r=evilpie
Differential Revision: https://phabricator.services.mozilla.com/D152258
2022-07-21 08:18:46 +00:00
Mark Banner 4bfafd41fa Bug 1779982 - Migrate places consumers to use ESM imports directly. r=mak,preferences-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D152005
2022-07-20 22:34:21 +00:00
smolnar 102b779608 Backed out 8 changesets (bug 1779982, bug 1780017, bug 1780347) for causing doc generate failures. CLOSED TREE
Backed out changeset 3f22c0f99cf1 (bug 1780347)
Backed out changeset 6f20b7e4b21b (bug 1780017)
Backed out changeset ae6062c69aeb (bug 1780017)
Backed out changeset e668d7778d97 (bug 1780017)
Backed out changeset e158fc41594b (bug 1780017)
Backed out changeset d4c69c956271 (bug 1779982)
Backed out changeset 145212fd826d (bug 1779982)
Backed out changeset 54079aaa1857 (bug 1779982)
2022-07-20 22:43:53 +03:00
Mark Banner 23086da9b9 Bug 1779982 - Migrate places consumers to use ESM imports directly. r=mak,preferences-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D152005
2022-07-20 15:50:40 +00:00
Iulian Moraru 1108246986 Backed out 7 changesets (bug 1779982, bug 1780017) for causing multiple failures. CLOSED TREE
Backed out changeset f33a58aa2f3f (bug 1780017)
Backed out changeset e21c85d61b91 (bug 1780017)
Backed out changeset 213ee5578e7c (bug 1780017)
Backed out changeset ea9b3bf42ea1 (bug 1780017)
Backed out changeset d2d8530f3c4d (bug 1779982)
Backed out changeset 088e5148c307 (bug 1779982)
Backed out changeset 267e08f3868a (bug 1779982)
2022-07-20 15:44:53 +03:00
Mark Banner e84aaa1b85 Bug 1779982 - Migrate places consumers to use ESM imports directly. r=mak,preferences-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D152005
2022-07-20 10:36:49 +00:00
Emilio Cobos Álvarez f73da16631 Bug 1775477 - Fix interface for parser-created <keygen> elements. r=saschanaz
Differential Revision: https://phabricator.services.mozilla.com/D149999
2022-06-23 10:34:44 +00:00
Emilio Cobos Álvarez bd09497378 Bug 1372276 - Remove HTML menuitem. r=smaug,mconley,agi
This removes HTMLMenuItemElement and all the code and tests preffed off
by dom.menuitem.enabled.

The HTML parser changes are the result of applying the previous patch.

Differential Revision: https://phabricator.services.mozilla.com/D149979
2022-06-22 22:31:42 +00:00
Mark Banner eadf832cfb Bug 1770727 - Fix failures of ESLint rule mozilla/use-includes-instead-of-indexOf in sjs files. r=Gijs
Depends on D147081

Differential Revision: https://phabricator.services.mozilla.com/D147082
2022-06-07 19:14:08 +00:00
Molnar Sandor 05e3775a6c Backed out 4 changesets (bug 1770727) for causing mochitest failures in test_bug1180105/test_access_control. CLOSED TREE
Backed out changeset 6323b526b0ac (bug 1770727)
Backed out changeset fc7ea80aa2ff (bug 1770727)
Backed out changeset 2a358ba86652 (bug 1770727)
Backed out changeset 464d1af6523b (bug 1770727)
2022-05-24 17:24:40 +03:00
Mark Banner 18b014551e Bug 1770727 - Fix failures of ESLint rule mozilla/use-includes-instead-of-indexOf in sjs files. r=Gijs
Depends on D147081

Differential Revision: https://phabricator.services.mozilla.com/D147082
2022-05-24 12:59:09 +00:00
Joel Maher 4645118c87 Bug 1392106 - remove obsolete reftest win7 conditions. r=aryx
Differential Revision: https://phabricator.services.mozilla.com/D146633
2022-05-19 12:27:29 +00:00
Mark Banner 3924c8914b Bug 1769569 - Automatically replace Components.* with C* in sjs files. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D146451
2022-05-18 08:13:19 +00:00
Sebastian Hengst c552340e0c Backed out 5 changesets (bug 1769569) for causing devtools' browser/browser_page_redirection.js to fail. CLOSED TREE
Backed out changeset 66a42eb3a366 (bug 1769569)
Backed out changeset d3cc9629cd9a (bug 1769569)
Backed out changeset edcd3dade079 (bug 1769569)
Backed out changeset 29d8dd058b7a (bug 1769569)
Backed out changeset 1aed34fdf2d3 (bug 1769569)
2022-05-17 19:49:17 +02:00
Mark Banner 4acbb4ff59 Bug 1769569 - Automatically replace Components.* with C* in sjs files. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D146451
2022-05-17 16:50:33 +00:00
Kris Maglione a1fde10261 Bug 1729005: Recursively block parsing for parser blocking scripts. r=hsivonen
Bug 1333990 added the ability to have multiple parser blockers at the same
time, so we no longer need to guard against recursively blocking. What's more,
if we do, and skip calling `BlockParser` while it's blocked for another reason,
we still call `UnblockParser` when we receive script data, at which point we
crash.

This patch moves the XHTML parser's behavior closer in line with the HTML
parser's.

The only way I've seen this manifest as a bug is when we have an XHTML
document with a top-level <script> element, and an extension with content
scripts that cause us to block parsing when we see that top-level element and
need to wait for them to compile.

Differential Revision: https://phabricator.services.mozilla.com/D145513
2022-05-11 22:15:14 +00:00
Henri Sivonen 27e70e0745 Bug 1747388. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D145571
2022-05-10 07:05:09 +00:00
Marian-Vasile Laza 765a83f3f8 Backed out changeset ae4f4209538e (bug 1729005) for causing xpcshell failures on test_blockParsing.js. CLOSED TREE 2022-05-10 01:00:43 +03:00
Kris Maglione 2506454b92 Bug 1729005: Recursively block parsing for parser blocking scripts. r=hsivonen
Bug 1333990 added the ability to have multiple parser blockers at the same
time, so we no longer need to guard against recursively blocking. What's more,
if we do, and skip calling `BlockParser` while it's blocked for another reason,
we still call `UnblockParser` when we receive script data, at which point we
crash.

This patch moves the XHTML parser's behavior closer in line with the HTML
parser's.

The only way I've seen this manifest as a bug is when we have an XHTML
document with a top-level <script> element, and an extension with content
scripts that cause us to block parsing when we see that top-level element and
need to wait for them to compile.

Differential Revision: https://phabricator.services.mozilla.com/D145513
2022-05-09 20:08:08 +00:00
Henri Sivonen 69df6a7000 Bug 1763076 - Avoid OOM crashes when there's a massive number of tree operations. r=edgar
(No test case, because testing unsuited for CI both in terms of space and time.)

Differential Revision: https://phabricator.services.mozilla.com/D143591
2022-04-27 07:24:34 +00:00
Molnar Sandor 622b026960 Backed out changeset aa30bc1b369b (bug 1763076) for causing assertion failure in parser/html/nsHtml5TreeOpExecutor.cpp CLOSED TREE 2022-04-19 14:41:03 +03:00
Henri Sivonen e70200b735 Bug 1763076 - Avoid OOM crashes when there's a massive number of tree operations. r=edgar
(No test case, because testing unsuited for CI both in terms of space and time.)

Differential Revision: https://phabricator.services.mozilla.com/D143591
2022-04-19 10:19:35 +00:00
Peter Van der Beken 4641d9bef3 Bug 1751796 - XML parsererror eats two first letters. r=bholley
We were calling XML_GetCurrentColumnNumber after ParseBuffer caused Expat
to consume some data. XML_GetCurrentColumnNumber uses the buffer that was
last passed to Expat. Before Expat was put in an RLBox sandbox the caller
of ParseBuffer would keep the data in the scanner string until after the
call to XML_GetCurrentColumnNumber. Now that we copy the data into the
RLBox sandbox the data is freed when the TransferBuffer in ParseBuffer
goes out of scope, so in the caller of ParseBuffer the call to
XML_GetCurrentColumnNumber would cause us to read freed memory inside the
sandbox. Moving the call to XML_GetCurrentColumnNumber to inside
ParseBuffer, when TransferBuffer is still in scope, solves the issue.

Differential Revision: https://phabricator.services.mozilla.com/D141795
2022-04-05 14:10:11 +00:00
Henri Sivonen 8dca2aaa89 Bug 1712928 - Gather telemetry about encoding-unlabeled pages and about Repair Text Encoding usage situations. r=emk
In particular, gather telemetry to evaluate the impact of unlabeled UTF-8
and how detector-triggered reloads would change if ASCII-only at initial
guess was treated as UTF-8.

Differential Revision: https://phabricator.services.mozilla.com/D140818
2022-03-29 08:04:25 +00:00
Randell Jesup f5062f8f3b Bug 1760661 - Parser thread-safety annotations r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D130605
2022-03-22 14:06:03 +00:00
Randell Jesup fcaf70841e Bug 1207753 - Add MOZ_UNANNOTATED to all Mutexes/Monitors r=nika,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D140849
2022-03-16 18:47:08 +00:00
Noemi Erli 2390d257e6 Backed out changeset 12a59e5a50bf (bug 1207753) for causing build bustage CLOSED TREE 2022-03-16 18:32:51 +02:00
Randell Jesup 4b033a5256 Bug 1207753 - Add MOZ_UNANNOTATED to all Mutexes/Monitors r=nika,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D140849
2022-03-16 16:16:14 +00:00
Butkovits Atila 927ad62c6a Backed out changeset a68ee4b09f92 (bug 1207753) for causing Hazard bustages. CLOSED TREE 2022-03-16 14:38:14 +02:00
Randell Jesup 7d4b5fae04 Bug 1207753 - Add MOZ_UNANNOTATED to all Mutexes/Monitors r=nika,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D140849
2022-03-16 12:01:14 +00:00
Peter Van der Beken 317063aa1e Bug 1754724 - Clear up even more computations in expat code. r=farre, a=tritter
Depends on D140166

Differential Revision: https://phabricator.services.mozilla.com/D140167
2022-03-02 22:34:28 +00:00
Peter Van der Beken 6431af8019 Bug 1754724 - Clear up some more computations in expat code. r=farre, a=tritter
Depends on D140165

Differential Revision: https://phabricator.services.mozilla.com/D140166
2022-03-02 22:22:08 +00:00
Peter Van der Beken 5876a3de0f Bug 1754724 - Clear up some computations in expat code. r=farre, a=tritter
Differential Revision: https://phabricator.services.mozilla.com/D140165
2022-03-02 22:18:23 +00:00
Frederik Braun 30828a6a49 Bug 1754301 - remove pref security.csp.enable r=ckerschb,mccr8
This removes the pref `security.csp.enable` and amends various callers
in dom/, which no longer have to take this pref into consideration.

Furthermore, we can remove the test in dom/base/test/browser_bug593387.js
The test used the pref to test that external content can be embedded into
about:plugins, which is historic baggage from a previous architecture of
said page that we no longer require. It's also an anti-pattern that we
do not want to support any longer. In fact, the test had to jump through
additional hoops to make that work at all.

Differential Revision: https://phabricator.services.mozilla.com/D138661
2022-02-15 16:03:27 +00:00
Peter Van der Beken 77831c9ef1 Bug 1539759 - Improve DTD entity handling. Testcase. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D33778
2022-02-15 07:16:05 +00:00
Butkovits Atila ba154da74d Backed out changeset b5c1408b6ad4 (bug 1539759) for causing failures at browser_elementindtd.js. CLOSED TREE 2022-02-14 19:58:23 +02:00
Peter Van der Beken 4fc8956e2c Bug 1539759 - Improve DTD entity handling. Testcase. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D33778
2022-02-14 17:14:32 +00:00
Butkovits Atila 386bb5b47c Backed out changeset fcdfaa991183 (bug 1539759) for causing failures at browser_elementindtd.js. CLOSED TREE 2022-02-14 16:58:20 +02:00
Peter Van der Beken 844ac388df Bug 1539759 - Improve DTD entity handling. Testcase. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D33778
2022-02-14 14:04:33 +00:00
Peter Van der Beken ca753f9d3c Bug 1749935 - Simplify nsParser::Initialize. r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D135900
2022-02-14 13:03:52 +00:00
Peter Van der Beken d6a364bec1 Bug 1749935 - Remove GetDTD. r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D135899
2022-02-14 13:03:52 +00:00
Peter Van der Beken 470c69ad81 Bug 1749935 - Inline nsParser::CancelParsingEvents. r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D135898
2022-02-14 13:03:52 +00:00
Peter Van der Beken ec144630b6 Bug 1749935 - Remove nsIParser::ParseFragment/Reset. r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D135897
2022-02-14 13:03:51 +00:00
Peter Van der Beken 15b814ccd7 Bug 1749935 - Create nsParser directly instead of with a CID. r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D135896
2022-02-14 13:03:51 +00:00
Peter Van der Beken 6c6f7200a6 Bug 1749935 - Remove nsITokenizer. r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D135887
2022-02-14 13:03:50 +00:00
Peter Van der Beken d023f9c301 Bug 1749935 - Inline nsParser::Tokenize. r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D135886
2022-02-14 13:03:50 +00:00
Peter Van der Beken 787e892c74 Bug 1749935 - Inline nsParser::BuildModel. r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D135885
2022-02-14 13:03:50 +00:00
Peter Van der Beken cd418faeea Bug 1749935 - Inline nsParser::WillTokenize in the caller. r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D135884
2022-02-14 13:03:49 +00:00
Peter Van der Beken 2e0cd032d6 Bug 1749935 - Remove nsIDTD::WillBuildModel. r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D135883
2022-02-14 13:03:49 +00:00
Peter Van der Beken bbfc56b73d Bug 1749935 - Inline FindSuitableDTD in caller. r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D135882
2022-02-14 13:03:49 +00:00
Peter Van der Beken 00c7469638 Bug 1749935 - Make mSlidingBuffer a UniquePtr. r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D135881
2022-02-14 13:03:48 +00:00
Peter Van der Beken 15b9997eb0 Bug 1749935 - Always create scanner upfront. r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D135880
2022-02-14 13:03:48 +00:00
Peter Van der Beken c68cf34189 Bug 1749935 - Remove unused support for nested CParserContext. r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D135879
2022-02-14 13:03:47 +00:00
Peter Van der Beken bb4612daad Bug 1749935 - Remove nsIDTD::GetMode. r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D135848
2022-02-14 13:03:47 +00:00
Peter Van der Beken 2e5c4bc0ad Bug 1749935 - Remove unused argument from nsIDTD::DidBuildModel. r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D135847
2022-02-14 13:03:47 +00:00
Peter Van der Beken 028ef0b8d1 Bug 1749935 - Remove nsDTDMode::eDTDMode_unknown and unused nsDTDMode::eDTDMode_almost_standards/eDTDMode_fragment. r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D135846
2022-02-14 13:03:46 +00:00
Peter Van der Beken f7e0158768 Bug 1749935 - Remove unused nsIDTD::CanContain/IsContainer. r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D135844
2022-02-14 13:03:46 +00:00
Peter Van der Beken c3603b8d98 Bug 1749935 - Remove unused aTokenizer argument for nsIDTD::WillBuildModel/BuildModel. r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D135843
2022-02-14 13:03:45 +00:00
Peter Van der Beken 2021662efc Bug 1749935 - Remove unused NS_PARSER_FLAG_OBSERVERS_ENABLED and NS_PARSER_FLAG_FLUSH_TOKENS. r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D135842
2022-02-14 13:03:45 +00:00
Peter Van der Beken dbcebc9c00 Bug 1749935 - Remove unused nsParser::SetUnusedInput. r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D135841
2022-02-14 13:03:44 +00:00
Peter Van der Beken 0836295ae7 Bug 1749935 - Remove nsIParser::MarkAsNotScriptCreated. r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D135840
2022-02-14 13:03:44 +00:00
Peter Van der Beken 63a0a73d2c Bug 1749935 - Remove nsIParser::GetChannel. r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D135839
2022-02-14 13:03:44 +00:00
Peter Van der Beken 481d54202e Bug 1749935 - Remove unused eAutoDetectResult values. r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D135838
2022-02-14 13:03:43 +00:00
Peter Van der Beken 5549bd8b2c Bug 1749935 - Remove unused PREFER_LATTER_ERROR_CODE. r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D135837
2022-02-14 13:03:43 +00:00
Peter Van der Beken 8573e064a2 Bug 1749935 - Mark nsIParser::WillResume(Impl) as infallible. r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D135836
2022-02-14 13:03:43 +00:00
Randell Jesup 2f491bfc19 Bug 1749056: Parser cleanup r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D135409
2022-02-11 20:56:58 +00:00
Chris Peterson 2ae60bead7 Bug 1744425 - Replace nsContentUtils::GenerateUUID() to nsID::GenerateUUID(). r=nika
Bug 1723674 added a new nsID::GenerateUUID() static factory function to generate UUIDs without the overhead of querying and instantiating an nsIUUIDGenerator object. nsContentUtils::GenerateUUID() is a utility function that amortizes that overhead by holding an nsIUUIDGenerator singleton. That's no longer necessary because code that calls nsContentUtils::GenerateUUID() can now just call nsID::GenerateUUID(). No nsIUUDGenerator is needed.

Differential Revision: https://phabricator.services.mozilla.com/D132866
2022-02-03 04:39:34 +00:00
Peter Van der Beken dd05949994 Bug 1752498 - XML error shows garbage for location. r=bholley
Differential Revision: https://phabricator.services.mozilla.com/D137262
2022-02-02 09:28:33 +00:00
Henri Sivonen 2c95bf7be8 Bug 1749522 - When plain text encoding speculation fails, restart the plaintext mode of the tokenizer. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D135830
2022-01-17 09:16:10 +00:00
Peter Van der Beken 1105765fa9 Bug 1749462 - Don't convert URI to string for Expat. r=bholley
Differential Revision: https://phabricator.services.mozilla.com/D135835
2022-01-17 08:49:11 +00:00
Sandor Molnar 4d0c0a33eb Backed out changeset a2d8eae8d006 (bug 1749522) for causing reftest failures in tests/reftest/bug1749522-1. CLOSED TREE 2022-01-14 17:50:39 +02:00
Henri Sivonen d20ee45260 Bug 1749522 - When plain text encoding speculation fails, restart the plaintext mode of the tokenizer. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D135830
2022-01-14 13:36:24 +00:00
Henri Sivonen 09d38d1170 Bug 1748482 - Check XML parser for brokenness in various methods. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D135096
2022-01-05 13:43:35 +00:00
Henri Sivonen 4c4a0740a9 Bug 1748234 - Sync HTML parser Java source comments with validator repo. NPOTB r=edgar DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D134951
2022-01-04 10:40:18 +00:00
Bobby Holley 65ffce9728 Bug 1746996 - Ensure that storeRawNames is always called. r=peterv
To avoid copying in the common case, expat points directly into the
(internal) input buffer for strings referenced from the tag stack. When
expat unwinds back to the caller, it attempts to call storeRawNames() to
walk the tag stack and copy any such strings into persistent memory
before the caller potentially invokes XML_Parse() again and shuffles the
input buffer, thereby invalidating these references.

Unfortunately, it doesn't do it in all the right places. Because
different parsing states set |processor| to different callbacks (so that
parsing can resume in the right context), there are a number of
non-obvious entry points. In this case, the input stream was chunked so
that parsing paused in middle of processing an internal entity [1], so
|processor| was set to internalEntityProcessor(), which invokes
doContent() but does not call storeRawNames(). The doContent() call then
parsed some nested tags from the entity. Tags within an entity are
generally required to be balanced, but a host callback returned an error
code to interrupt parsing midway through. This caused Expat to return to
the caller with a tag stack still referencing the input buffer, which
got clobbered in the next call to XML_Parse, causing a tag mismatch on
the next close tag.

Conceptually, this optimization should be managed by doContent(), and I
believe the only reason that isn't the case is that doContent() has so
many return paths (and we don't have RAII in C). We can fix this by
wrapping doContent() in a helper.

[1] &certerror.expiredCert.whatCanYouDoAboutIt2;

Differential Revision: https://phabricator.services.mozilla.com/D134878
2022-01-01 05:00:45 +00:00
Henri Sivonen 2f2b2fb6fb Bug 1747264 - Avoid OOMing if the URL of an XML document is huge. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D134506
2021-12-27 07:31:34 +00:00
Bobby Holley 42c90d1426 Bug 1747514 - Ensure the expat sandbox is large enough to hold the base URI. r=shravanrn,deian
Differential Revision: https://phabricator.services.mozilla.com/D134653
2021-12-25 06:00:25 +00:00
Bobby Holley 84ba1b89f4 Bug 1747514 - Make RLBoxTransferBufferToSandbox properly fallible. r=shravanrn
Differential Revision: https://phabricator.services.mozilla.com/D134670
2021-12-25 06:00:25 +00:00
Kagami Sascha Rosylight dc3411ed8f Bug 1539884 - Part 32: Mark nsHtml5SVGLoadDispatcher::Run as CAN_RUN_SCRIPT_BOUNDARY r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D134415
2021-12-23 16:27:24 +00:00
Henri Sivonen 97da4f66b8 Bug 1745142 - Communicate encoding commitment via speculative load queue. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D133996
2021-12-22 15:54:49 +00:00
Peter Van der Beken 56d7e1b1a5 Bug 1745239 - Chunk XML parsing to 64k characters at a time. r=bholley
Differential Revision: https://phabricator.services.mozilla.com/D134320
2021-12-20 19:31:55 +00:00
Randell Jesup 18dd863826 Bug 1746412: Parser cleanup r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D134021
2021-12-19 16:51:41 +00:00
Henri Sivonen 2e97d5cb50 Bug 1746603 - Make mSpeculationFailureCount atomic. r=jesup
Differential Revision: https://phabricator.services.mozilla.com/D134142
2021-12-18 07:37:52 +00:00
Henri Sivonen fe10b6b5da Bug 1746593 - Turn mTerminated and mInterrupted into atomics. r=jesup
Differential Revision: https://phabricator.services.mozilla.com/D134135
2021-12-18 07:37:15 +00:00
Henri Sivonen 527882bab5 Bug 1736248 - Update the charset source if non-ASCII is seen after the first detector guess but the encoding does not change. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D133731
2021-12-14 15:01:21 +00:00
Nika Layzell 7b2e6d4996 Bug 1741665 - Align nsCString's public size_type better with other C++ APIs, r=mccr8,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D131422
2021-12-13 21:47:56 +00:00
Henri Sivonen cdcc0b21b5 Bug 1745139 - Check for termination even after the first flush loop in CommitToInternalEncoding. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D133342
2021-12-09 12:59:04 +00:00
shravanrn@gmail.com 7079358631 Bug 1744460 part 2 - Update woff2 RLBoxSandboxPool to track minimum sandbox size r=bholley
Depends on D133009

Differential Revision: https://phabricator.services.mozilla.com/D133158
2021-12-09 00:01:17 +00:00
Butkovits Atila 6ffe112d27 Backed out 2 changesets (bug 1744460) for causing build bustages at RLBoxSandboxPool.cpp. CLOSED TREE
Backed out changeset 582101d582a0 (bug 1744460)
Backed out changeset dba7b7c19b2f (bug 1744460)
2021-12-08 21:57:58 +02:00
shravanrn@gmail.com 8001ccc0fd Bug 1744460 part 2 - Update woff2 RLBoxSandboxPool to track minimum sandbox size r=bholley
Differential Revision: https://phabricator.services.mozilla.com/D133158
2021-12-08 17:55:16 +00:00
Henri Sivonen 649a5b63d8 Bug 1701828 - meta charset rewrite. r=smaug
Implements https://github.com/whatwg/html/issues/6962 . Improves performance
when <meta charset> occurs in head but after the first kilobyte and aligns
behavior better with WebKit and Blink.

The main change is to avoid reloads when meta appears within head but
after the first kilobyte. Prior to this change, Gecko reloaded in that
case (in compliance with the spec!) even though WebKit and Blink did not.

Differences from WebKit and Blink:

* WebKit and Blink honor <meta charset> in <noscript>. This implementation
  does not.
* WebKit and Blink look for meta as if the tree builder was unaware of
  foreign content. This implementation is foreign content-aware. This
  makes a difference for CDATA sections that contain a > before the meta
  as well as style and script elements within foreign content. This could
  happen if the CDATA section that has mysteriously been introduced around
  a what looks like a meta tag also contains another prior tag-looking
  run of text.
* This implementation processes rel=preload and speculative loads that are
  seen before <meta charset> has been seen. WebKit and Blink instead first
  look for the meta and rewind before starting speculative parsing.
* Unlike WebKit, if there is neither an honored meta nor syntax resembling
  an XML declaration, detection from content takes place (as in Blink).
* Unlike Blink, if there is neither an honored meta nor syntax resembling
  an XML declaration, the detection from content is not dependent of network
  buffer boundaries.
* Unlike Blink, detection from content can trigger a reload at the end of
  the stream if the guess made at that point differs from the first guess.
  (See below for the definition of the input to the first guess.)

Differences from the old spec and Gecko previously:

* Meta inside script and RCDATA elements is no longer honored.
* Late meta is now ignored and no longer triggers a reload.
* Later meta counts as early enough meta: In addition to the previous
  meta within the first 1024 bytes, now a meta that started within the first
  1024 bytes counts as early enough. Additionally, if by then there hasn't
  been a template start tag and head hasn't ended, meta occurring before the
  earlier of the end of the head or a template start tag counts as early
  enough.
* Meta now counts as not-late even if the encoding label has numeric
  character reference escapes.
* Syntax resembling an XML declaration longer than a kilobyte is honored if
  there is no honored meta.
* If there is neither an honored meta nor syntax resembling an XML declaration,
  the initial chardetng scan is potentially longer than before: the first 1024
  bytes, the token spanning the 1024-byte boundary if there is such a token,
  and, if by then head hasn't ended and there hasn't been a template start tag
  until the end of the template start tag or the end of the token that causes
  head to end, ever comes first. However, if the token implying the end of the
  head is a text token, bytes only to the end of the previous non-text token is
  considered. (This definition avoids depending on network buffer boundaries.)
* XML View Source now uses the code for syntax resembling an XML declaration
  instead of expat for extracting the internal encoding label.

Reftest are added as both WPT and Gecko reftests in order to test both http:
and file: URL scenarios. The Gecko tests retain the WPT <link> tags in order
to use the exact same bytes.

An encoding declaration has been added to a number of old tests that didn't
intend to test the new speculation behavior especially in the context of
https://bugzilla.mozilla.org/show_bug.cgi?id=1727750 .

Differential Revision: https://phabricator.services.mozilla.com/D125808
2021-12-08 11:34:20 +00:00
Cosmin Sabou fdf40d5a31 Backed out changeset 1778ca2ab291 (bug 1744425) for bc failures on browser_xpcom_graph_wait.js. CLOSED TREE 2021-12-08 07:20:54 +02:00
Chris Peterson aae95e46eb Bug 1744425 - Replace nsContentUtils::GenerateUUID() to nsID::GenerateUUID(). r=nika
Bug 1723674 added a new nsID::GenerateUUID() static factory function to generate UUIDs without the overhead of querying and instantiating an nsIUUIDGenerator object. nsContentUtils::GenerateUUID() is a utility function that amortizes that overhead by holding an nsIUUIDGenerator singleton. That's no longer necessary because code that calls nsContentUtils::GenerateUUID() can now just call nsID::GenerateUUID(). No nsIUUDGenerator is needed.

Differential Revision: https://phabricator.services.mozilla.com/D132866
2021-12-08 03:19:11 +00:00
Norisz Fay 1d6984bc21 Backed out changeset 3dfd3c94a105 (bug 1701828) for causing mochitest failures on browser_hsts_host.js CLOSED TREE 2021-12-07 12:05:44 +02:00
Henri Sivonen 58476d7f17 Bug 1701828 - meta charset rewrite. r=smaug
Implements https://github.com/whatwg/html/issues/6962 . Improves performance
when <meta charset> occurs in head but after the first kilobyte and aligns
behavior better with WebKit and Blink.

The main change is to avoid reloads when meta appears within head but
after the first kilobyte. Prior to this change, Gecko reloaded in that
case (in compliance with the spec!) even though WebKit and Blink did not.

Differences from WebKit and Blink:

* WebKit and Blink honor <meta charset> in <noscript>. This implementation
  does not.
* WebKit and Blink look for meta as if the tree builder was unaware of
  foreign content. This implementation is foreign content-aware. This
  makes a difference for CDATA sections that contain a > before the meta
  as well as style and script elements within foreign content. This could
  happen if the CDATA section that has mysteriously been introduced around
  a what looks like a meta tag also contains another prior tag-looking
  run of text.
* This implementation processes rel=preload and speculative loads that are
  seen before <meta charset> has been seen. WebKit and Blink instead first
  look for the meta and rewind before starting speculative parsing.
* Unlike WebKit, if there is neither an honored meta nor syntax resembling
  an XML declaration, detection from content takes place (as in Blink).
* Unlike Blink, if there is neither an honored meta nor syntax resembling
  an XML declaration, the detection from content is not dependent of network
  buffer boundaries.
* Unlike Blink, detection from content can trigger a reload at the end of
  the stream if the guess made at that point differs from the first guess.
  (See below for the definition of the input to the first guess.)

Differences from the old spec and Gecko previously:

* Meta inside script and RCDATA elements is no longer honored.
* Late meta is now ignored and no longer triggers a reload.
* Later meta counts as early enough meta: In addition to the previous
  meta within the first 1024 bytes, now a meta that started within the first
  1024 bytes counts as early enough. Additionally, if by then there hasn't
  been a template start tag and head hasn't ended, meta occurring before the
  earlier of the end of the head or a template start tag counts as early
  enough.
* Meta now counts as not-late even if the encoding label has numeric
  character reference escapes.
* Syntax resembling an XML declaration longer than a kilobyte is honored if
  there is no honored meta.
* If there is neither an honored meta nor syntax resembling an XML declaration,
  the initial chardetng scan is potentially longer than before: the first 1024
  bytes, the token spanning the 1024-byte boundary if there is such a token,
  and, if by then head hasn't ended and there hasn't been a template start tag
  until the end of the template start tag or the end of the token that causes
  head to end, ever comes first. However, if the token implying the end of the
  head is a text token, bytes only to the end of the previous non-text token is
  considered. (This definition avoids depending on network buffer boundaries.)
* XML View Source now uses the code for syntax resembling an XML declaration
  instead of expat for extracting the internal encoding label.

Reftest are added as both WPT and Gecko reftests in order to test both http:
and file: URL scenarios. The Gecko tests retain the WPT <link> tags in order
to use the exact same bytes.

An encoding declaration has been added to a number of old tests that didn't
intend to test the new speculation behavior especially in the context of
https://bugzilla.mozilla.org/show_bug.cgi?id=1727750 .

Differential Revision: https://phabricator.services.mozilla.com/D125808
2021-12-07 07:35:32 +00:00
nchevobbe b31e82ce90 Bug 1238861 - Display a warning message when doctype is not standard. r=hsivonen.
This patchs adds new error messages which are extending existing ones,
providing extra information to the user.
A webconsole mochitest is added in the following patch of this stack.

Differential Revision: https://phabricator.services.mozilla.com/D131889
2021-12-02 22:46:22 +00:00
Chris Peterson f6fdbf028a Bug 1738401 - Remove -Wno-shadow warning suppressions. r=firefox-build-system-reviewers,glandium
-Wshadow warnings are not enabled globally, so these -Wno-shadow suppressions have no effect. I had intended to enable -Wshadow globally along with these suppressions in some directories (in bug 1272513), but that was blocked by other issues.

There are too many -Wshadow warnings (now over 2000) to realistically fix them all. We should remove all these unnecessary -Wno-shadow flags cluttering many moz.build files.

Differential Revision: https://phabricator.services.mozilla.com/D132289
2021-12-01 06:40:04 +00:00
Deian Stefan 1ee9a841d8 Bug 1732201 - Sandbox woff2 in OTS using RLBox r=bholley
Differential Revision: https://phabricator.services.mozilla.com/D126435
2021-11-27 23:30:49 +00:00