3561 Commits
Author SHA1 Message Date
Henri Sivonen 9ec57df41d Bug 2038800 - Check that the parser does not insert a node into its own descendant. r=dom-core,smaug
Differential Revision: https://phabricator.services.mozilla.com/D302716
2026-05-27 15:42:59 +00:00
Keith Cirkel 95d7a5a7b1 Bug 2028401 - Part 4 - Resync htmlparser to b09277d r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D299704
2026-05-22 19:34:29 +00:00
Keith Cirkel 6480e61671 Bug 2019979 - Clean up dom.lift_select_parser_restrictions.enabled r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D299703
2026-05-22 19:34:26 +00:00
rperta e9d08d36dd Revert "Bug 2028401, Bug 2019979 - Part 4 - Resync htmlparser to b09277d r=hsivonen" for causing wpt failures at html5lib_innerHTML_tests_innerHTML_1.html
This reverts commit 9c3f1a9500.

Revert "Bug 2019979 - Clean up dom.lift_select_parser_restrictions.enabled r=hsivonen"

This reverts commit 05ce1fb123.
2026-05-22 16:40:04 +00:00
Keith Cirkel 9c3f1a9500 Bug 2028401 - Part 4 - Resync htmlparser to b09277d r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D299704
2026-05-22 14:52:33 +00:00
Keith Cirkel 05ce1fb123 Bug 2019979 - Clean up dom.lift_select_parser_restrictions.enabled r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D299703
2026-05-22 14:52:30 +00:00
Alexandru Marc eef30b2ead Revert (Bug 2028401, Bug 2019979) for causing mochitest failures @ test_bug922681
This reverts commit 9cfeccd372.

Revert "Bug 2019979 - Clean up dom.lift_select_parser_restrictions.enabled r=hsivonen"

This reverts commit 7c2ee56e70.
2026-05-21 21:26:19 +00:00
Keith Cirkel 9cfeccd372 Bug 2028401 - Part 4 - Resync htmlparser to bd7f0f7 r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D299704
2026-05-21 20:15:23 +00:00
Keith Cirkel 7c2ee56e70 Bug 2019979 - Clean up dom.lift_select_parser_restrictions.enabled r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D299703
2026-05-21 20:15:20 +00:00
Alexandru Marc a74cb95f65 Revert (Bug 2028401, Bug 2019979) for causing mochitest failures @ test_html5_tree_construction_part2
This reverts commit 8cea467d1c.

Revert "Bug 2019979 - Clean up dom.lift_select_parser_restrictions.enabled r=hsivonen"

This reverts commit 03d82311a4.
2026-05-21 18:23:44 +00:00
Keith Cirkel 03d82311a4 Bug 2019979 - Clean up dom.lift_select_parser_restrictions.enabled r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D299703
2026-05-21 16:56:14 +00:00
Jan-Niklas Jaeschke 10781ef5fa Bug 1974276 - Customizable Select: Implement stub for the selectedcontent element. r=keithamus,emilio,dom-core,webidl,hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D290553
2026-05-11 12:31:16 +00:00
Keith Cirkel 2f20af343b Bug 2036041 - Ensure select mochitests enable lift_select_parser_restrictons pref r=dom-core,jjaschke
Differential Revision: https://phabricator.services.mozilla.com/D297709
2026-04-30 18:25:31 +00:00
serge-sans-paille f61ddf531d Bug 2034832 - Make parser/ headers compatible with current static analysis r=hsivonen
- use = default when relevant
- use = delete on public method instead of unimplemented private
- use range-based loop

This matches the clang-tidy rules:

- https://clang.llvm.org/extra/clang-tidy/checks/modernize/use-equals-default.html
- https://clang.llvm.org/extra/clang-tidy/checks/modernize/use-equals-delete.html
- https://clang.llvm.org/extra/clang-tidy/checks/modernize/loop-convert.html

Also had to do minor header tweaking to cope with std::size_t with
size_t in the process.

That we already use on source files

Differential Revision: https://phabricator.services.mozilla.com/D296635
2026-04-29 10:40:25 +00:00
Keith Cirkel 437c1a4055 Bug 2031668 - Enable dom.lift_select_parser_restrictions.enabled in nightly r=dom-core,jjaschke
Differential Revision: https://phabricator.services.mozilla.com/D295501
2026-04-29 08:57:28 +00:00
Alexandru Marc c8d15cb1b3 Revert "Bug 2031668 - Enable dom.lift_select_parser_restrictions.enabled in nightly r=dom-core,jjaschke" for causing mochitest failures @ test_option_index_attribute
This reverts commit be1af89fc5.
2026-04-29 05:22:32 +00:00
Keith Cirkel be1af89fc5 Bug 2031668 - Enable dom.lift_select_parser_restrictions.enabled in nightly r=dom-core,jjaschke
Differential Revision: https://phabricator.services.mozilla.com/D295501
2026-04-28 22:37:21 +00:00
Ryan VanderMeulen 768ac42006 Bug 2024039 - Use XML_SetHashSalt16Bytes for 128-bit libexpat hash salt entropy. r=mccr8,shravanrn
Upstream deprecated XML_SetHashSalt in libexpat 2.8.0 (CVE-2026-41080)
because it only carries 4-8 bytes of entropy into what is a 128-bit
SipHash salt. Switch to XML_SetHashSalt16Bytes, which takes a full
16 bytes, and feed it with GenerateRandomBytesFromOS. Also drop the
now-unused MOZ_XML_SetHashSalt wrapper and update the comments in
03_dont_generate_salt.patch to match.

The wrapper takes const char[16] rather than const uint8_t[16] so the
buffer can be transferred through RLBox's sandbox boundary, which only
permits memcpy of char/short/wchar_t/char16_t/float/double.

Differential Revision: https://phabricator.services.mozilla.com/D296437
2026-04-26 22:46:40 +00:00
Edgar Chen 0aba0c9dc8 Bug 2030641 - Add test for parser foster-parent handling; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D293071
2026-04-24 07:08:39 +00:00
Andrew McCreight 780af88752 Bug 2029813 - Add evenness checks for attribute counts. r=hsivonen,shravanrn
Differential Revision: https://phabricator.services.mozilla.com/D294025
2026-04-14 18:14:57 +00:00
serge-sans-paille 43f9567997 Bug 2028388 - Fix miscellaneous loop range conversion in DEBUG mode r=emilio,layout-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D291417
2026-04-02 08:51:38 +00:00
Sylvestre Ledru 49209e1b2f Bug 2023419 - Remove Emacs/Vim modelines from parser/ r=emilio
replaced by .editorconfig
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D287864
2026-03-18 14:35:02 +00:00
Alexandru Marc a0233d91a7 Revert "Bug 2023419 - Remove Emacs/Vim modelines from python/ r=emilio" for causing py failures @ test_configure
This reverts commit 4d755fe4de.

Revert "Bug 2023419 - Remove Emacs/Vim modelines from parser/ r=emilio"

This reverts commit e2035c4a10.

Revert "Bug 2023419 - Remove Emacs/Vim modelines from other-licenses/ r=emilio"

This reverts commit 1f7da58772.
2026-03-17 12:43:27 +00:00
Sylvestre Ledru e2035c4a10 Bug 2023419 - Remove Emacs/Vim modelines from parser/ r=emilio
replaced by .editorconfig
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D287864
2026-03-17 12:08:44 +00:00
Emilio Cobos Álvarez f0acf726a3 Bug 2017504 - Make XML fragment content sink stop claiming that elements are not parser created. r=hsivonen,dom-core
Right now it was doing something extremely weird where it notified as
parser created of some things (like DoneCreatingElement()) but not
others (like DoneAddingChildren()).

Differential Revision: https://phabricator.services.mozilla.com/D283950
2026-02-20 11:45:16 +00:00
serge-sans-paille 9db08d3f52 Bug 2009953 - Do not use reserved identifiers for macro guard in identifiers r=emilio,geckoview-reviewers,media-playback-reviewers,devtools-reviewers,win-reviewers,ochameau,gstoll,keeler,mccr8,padenot,alwu,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D278766
2026-01-22 17:49:59 +00:00
pstanciu bc297a68a0 Revert "Bug 2009953 - Do not use reserved identifiers for macro guard in identifiers r=emilio,geckoview-reviewers,media-playback-reviewers,devtools-reviewers,win-reviewers,ochameau,gstoll,keeler,mccr8,padenot,alwu,m_kato" for causing build bustages @ CParserContext.h
This reverts commit afd052662d.
2026-01-21 16:23:10 +00:00
serge-sans-paille afd052662d Bug 2009953 - Do not use reserved identifiers for macro guard in identifiers r=emilio,geckoview-reviewers,media-playback-reviewers,devtools-reviewers,win-reviewers,ochameau,gstoll,keeler,mccr8,padenot,alwu,m_kato
Also remove security/manager/ssl/nsVerificationJob.h per request of
@keeler instead of changing its guard.

Differential Revision: https://phabricator.services.mozilla.com/D278766
2026-01-21 15:46:08 +00:00
Tom Marble 3b3efde701 Bug 2009254 - Test manifest cleanup January 2026 r=ahal,necko-reviewers,webcompat-reviewers,credential-management-reviewers,devtools-reviewers,tabbrowser-reviewers,profiler-reviewers,dom-storage-reviewers,toolkit-telemetry-reviewers,layout-reviewers,dom-worker-reviewers,whimboo,hjones,sthompson,twisniewski,valentin,asuth,dholbert,dimi,ochameau
Updates Test Manifests to new conventions for the upcoming
linter patch in Bug 2004444. These conventions are documented in
   docs/code-quality/lint/linters/test-manifest-toml.rst
which will get published to
  https://firefox-source-docs.mozilla.org/code-quality/lint/linters/test-manifest-toml.html

Summary of changes:
- The order of comparisons/variables is now important in conditional
  expressions. Certain expressions have been edited to reflect this
  order (with no semantic changes).
- The variables which are tested for equality as well as all the flags
  are constrained to a known set (i.e. typos in variable/flag names
  will be caught by the linter)
- Older platforms which are no longer present in the CI infrastructure
  have been deprecated, for example:
   * ``"os == 'linux' && os_version == '18.04'
- Combinations of platforms and flags which are no longer present in
  the CI infrastructure will be removed, for example:
   * ``"os == 'linux' && os_version == '22.04' && asan"``
   * ``"os == 'linux' && os_version == '22.04' && tsan"``
   * ``"os == 'win' && tsan``
- Old platform combination flags and isLinux style flags have been
  deprecated in favor of explicitly checking os, os_version, etc.

NOTE: code changes in this patch are simply to maintain self tests
and do not reflect the updated linter changes.

Signed-off-by: Tom Marble <[email protected]>

Differential Revision: https://phabricator.services.mozilla.com/D278535
2026-01-21 13:53:31 +00:00
serge-sans-paille 33ae912378 Bug 2010520 - Use .inc extension for X macro files in parser/ r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D279138
2026-01-17 21:50:04 +00:00
Andrew McCreight 1d14786041 Bug 2010275 - Pass XML_Status and XML_Error across the RLBox barrier as int. r=hsivonen
For functions where we don't use the return value, return void instead.

Differential Revision: https://phabricator.services.mozilla.com/D279192
2026-01-16 17:24:50 +00:00
Andrew McCreight 54feb2c049 Bug 2010288 - Update the XML parser's error_verifier method. r=hsivonen
Three new enum values have been added since this was last updated.

Also, add the second test case from bug 1192544.

Differential Revision: https://phabricator.services.mozilla.com/D279091
2026-01-15 17:08:07 +00:00
Henri Sivonen 8cfad39176 Bug 2002189 - Remove nsIDTD. r=dom-core,edgar,smaug
Differential Revision: https://phabricator.services.mozilla.com/D273975
2025-11-25 15:49:23 +00:00
Henri Sivonen 326cf8e6a0 Bug 650775 - Remove CNavDTD and nsIHTMLContentSink from the tree. r=dom-core,farre
Differential Revision: https://phabricator.services.mozilla.com/D273949
2025-11-25 09:52:40 +00:00
Henri Sivonen bf8e6315c2 Bug 563890 - Rename nsHTMLContentSink.cpp to HTMLElementFactory.cpp for consistency with SVG and MathML. r=dom-core,farre
Differential Revision: https://phabricator.services.mozilla.com/D273944
2025-11-25 09:52:37 +00:00
Henri SivonenandVincent Hilla 39a8a4171b Bug 543435 - Make initial about:blank not get overwritten by an async about:blank load. r=sessionstore-reviewers,sfoster,timhuang,credential-management-reviewers,issammani,webidl,extension-reviewers,tabbrowser-reviewers,migration-reviewers,home-newtab-reviewers,hsivonen,cookie-reviewers,fxview-reviewers,firefox-desktop-core-reviewers ,dao,valentin,mossop,smaug,geckoview-reviewers,Jamie,mtigley,thecount,media-playback-reviewers,padenot,dom-worker-reviewers,jesup,jdescottes,asuth,robwu,karlt,profiler-reviewers,kpatenio,devtools-reviewers,tcampbell,nchevobbe
Co-authored-by: Vincent Hilla <[email protected]>
Signed-off-by: Vincent Hilla <[email protected]>

Differential Revision: https://phabricator.services.mozilla.com/D155376
2025-11-24 05:34:22 +00:00
Tom Marble 5ce09d7446 Bug 1995583 - test manifest cleanup for idiomatic usage r=jmaher,necko-reviewers,webcompat-reviewers,geckoview-reviewers,application-update-reviewers,media-playback-reviewers,sessionstore-reviewers,tabbrowser-reviewers,translations-reviewers,omc-reviewers,browser-installer-reviewers,twisniewski,masayuki,dom-core,smaug,nalexander,emcminn,sthompson,alwu,ai-ondevice-reviewers,valentin
For TOML manifests:

1. Change processor -> arch
2. Use arch instead of bits bits == '64' =>
   aarch64 (default on mac 15.30) or x86_64 bits == '32' => x86
3. Replace android_version with corresponding os_version
4. Remove conditions with linux os_version=="18.04"
   (unless they contain verify or verify-standalone)
5. Remove conditions with mac os_version=='11.20',
   (unless they contain verify or verify-standalone)
6. Remove conditions with win os_version=='11.2009' or win11_2009,
   (unless they contain verify or verify-standalone)
7. Linux conditions should have os_version, arch and display
   (simple "os == 'linux'" will get expanded to these two)
   "os == 'linux' && os_version == '22.04' && arch == 'x86_64' && display == 'wayland'"
   "os == 'linux' && os_version == '24.04' && arch == 'x86_64' && display == 'x11'"
8. Mac conditions should have os_version and arch
   (simple "os == 'mac'" will get expanded to these three)
   "os == 'mac' && os_version == '10.15' && arch == 'x86_64'",
   "os == 'mac' && os_version == '14.70' && arch == 'x86_64'",
   "os == 'mac' && os_version == '15.30' && arch == 'aarch64'",
9. Replace apple_catalina with
   os == 'mac' && os_version == '10.15' && arch == 'x86_64'
10. Replace apple_silicon with
   os == 'mac' && os_version = '15.30' && arch == 'aarch64'
11. Replace win10_2009 with
   os == 'win' && os_version = '10.2009' && arch == 'x86_64'
12. Replace "!debug" with three conditions "asan", "opt", or "tsan"
13. Replace literal boolean comparison with variables
    (e.g. "debug == false" => "!debug)

Resolves 2000285

Signed-off-by: Tom Marble <[email protected]>

Differential Revision: https://phabricator.services.mozilla.com/D272815
2025-11-22 00:30:39 +00:00
Simon Pieters 6afa1531af Bug 1995971 - Add 2 WAPFORUM public ids that enable the XHTML entities (update test expectations). r=dom-core,smaug
Differential Revision: https://phabricator.services.mozilla.com/D271368
2025-11-05 10:04:52 +00:00
Serban Stanca 0834332cfd Revert "Bug 1995971 - Add 2 WAPFORUM public ids that enable the XHTML entities. r=dom-core,smaug" for causing wpt failures in xhtml-mathml-dtd-entity-11.htm.
This reverts commit a9112dba70.
2025-11-04 23:23:00 +00:00
Simon Pieters a9112dba70 Bug 1995971 - Add 2 WAPFORUM public ids that enable the XHTML entities. r=dom-core,smaug
Differential Revision: https://phabricator.services.mozilla.com/D269749
2025-11-04 19:08:26 +00:00
Mark Banner e73114dd2b Bug 1996350 - Automatic fixes for ESLint rule jsdoc/no-multi-asterisks (remainder). r=frontend-codestyle-reviewers,mtigley,mossop
Differential Revision: https://phabricator.services.mozilla.com/D270035
2025-10-29 11:35:08 +00:00
serge-sans-paille 26ad5eb1cb Bug 1996767 - Remove unused mfbt inclusion in parser/** r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D270301
2025-10-28 12:38:01 +00:00
serge-sans-paille 2680f1aa2a Bug 1995938 - Remove unused inclusion of DebugOnly.h r=emilio,necko-reviewers,application-update-reviewers,media-playback-reviewers,profiler-reviewers,win-reviewers,toolkit-telemetry-reviewers,firefox-svg-reviewers,layout-reviewers,dom-worker-reviewers,bytesized,gstoll,mstange,TYLin,chunmin,jesup,asuth
Differential Revision: https://phabricator.services.mozilla.com/D269780
2025-10-27 10:48:42 +00:00
Cristian Tuns 6f66cdf3c7 Revert "Bug 1995938 - Remove unused inclusion of DebugOnly.h r=emilio,necko-reviewers,application-update-reviewers,media-playback-reviewers,profiler-reviewers,win-reviewers,toolkit-telemetry-reviewers,firefox-svg-reviewers,layout-reviewers,dom-worker-reviewers,bytesized,gstoll,mstange,TYLin,chunmin,jesup,asuth" for causing build bustages in TargetFunction.h
This reverts commit 10e5184168.
2025-10-27 08:58:03 +00:00
serge-sans-paille 10e5184168 Bug 1995938 - Remove unused inclusion of DebugOnly.h r=emilio,necko-reviewers,application-update-reviewers,media-playback-reviewers,profiler-reviewers,win-reviewers,toolkit-telemetry-reviewers,firefox-svg-reviewers,layout-reviewers,dom-worker-reviewers,bytesized,gstoll,mstange,TYLin,chunmin,jesup,asuth
Differential Revision: https://phabricator.services.mozilla.com/D269780
2025-10-27 08:00:43 +00:00
serge-sans-paille 1e9b33083e Bug 1993127 - Remove unused inclusion of Attributes.h r=emilio,extension-reviewers,application-update-reviewers,profiler-reviewers,win-reviewers,gstoll,bytesized,robwu,canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D269718
2025-10-26 16:59:43 +00:00
serge-sans-paille 9b6eb9c7f9 Bug 1996048 - Remove unused inclusion of UniquePtr.h or UniquePtrExtensions.h r=emilio,media-playback-reviewers,profiler-reviewers,win-reviewers,firefox-style-system-reviewers,firefox-svg-reviewers,layout-reviewers,gstoll,mstange,TYLin,chunmin
Differential Revision: https://phabricator.services.mozilla.com/D269782
2025-10-24 06:50:27 +00:00
serge-sans-paille 1667ec582b Bug 1995723 - Remove unused inclusion of mozilla/ArrayUtils.h r=necko-reviewers,application-update-reviewers,media-playback-reviewers,profiler-reviewers,win-reviewers,firefox-svg-reviewers,layout-reviewers,gstoll,canaltinova,bytesized,alwu,dholbert
Differential Revision: https://phabricator.services.mozilla.com/D269573
2025-10-23 07:30:37 +00:00
serge-sans-paille 7662b3abdc Bug 1994397 - Remove obsolete Unused.h header r=emilio,tschuster,geckoview-reviewers,extension-reviewers,application-update-reviewers,media-playback-reviewers,webrtc-reviewers,cookie-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,permissions-reviewers,profiles-reviewers,toolkit-telemetry-reviewers,firefox-style-system-reviewers,firefox-svg-reviewers,layout-reviewers,timhuang,gstoll,TravisLong,bytesized,mstange,karlt,robwu,pehrsons,m_kato,jari,jhirsch
It is replaced by a standard-conforming cast to (void) which is
understood the same by the compiler.

In some cases this could be replaced by `[[maybe_unused]]` but for
expression whose value is ignored, this requires storing to a temporary
variable first, so not going that way.

One notable change is that marking an object of type already_AddRefed as
unused used to implicitly leak memory. This is now made explicit.

Most of the heavy lifting was done through:

    $ git grep -l '\<Unused\> <<' | xargs sed -i -e 's/Unused << /(void)/g'
    $ git grep -l mozilla/Unused.h | xargs sed -i -e '/mozilla\/Unused.h/ d'

Differential Revision: https://phabricator.services.mozilla.com/D268706
2025-10-21 19:36:01 +00:00
Cristina Horotan 8a1b1970b7 Revert "Bug 1994397 - Remove obsolete Unused.h header r=emilio,tschuster,geckoview-reviewers,extension-reviewers,application-update-reviewers,media-playback-reviewers,webrtc-reviewers,cookie-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,permissions-reviewers,profiles-reviewers,toolkit-telemetry-reviewers,firefox-style-system-reviewers,firefox-svg-reviewers,layout-reviewers,timhuang,gstoll,TravisLong,bytesized,mstange,karlt,robwu,pehrsons,m_kato,jari,jhirsch" for causing Gtest failures on AlreadyAddRefed.h
This reverts commit e98adca292.
2025-10-21 16:16:29 +00:00