Commit Graph
5234 Commits
Author SHA1 Message Date
agoloman c75e2e420f Revert "Bug 2020707, Bug 2020704 - Part 6: Update test expectations now that speculationrules scripts are supported. r=dom-core-reviewers,jjaschke" for causing bc failures @browser_misused_characters_in_strings.js.
This reverts commit 524a1fc191.

Revert "Bug 2020707 - Part 5: Gate speculation rules script support behind a pref. r=dom-core-reviewers,jjaschke"

This reverts commit 11741d18ad.

Revert "Bug 2020707 - Part 4: Unregister speculation rules when their script element is removed. r=dom-core-reviewers,hsivonen"

This reverts commit 5202943dc9.

Revert "Bug 2020707 - Part 3: Report an exception if speculation rules parsing fails. r=dom-core-reviewers,jjaschke"

This reverts commit 70c5aa5425.

Revert "Bug 2020707 - Part 2: Add support for speculationrules script type. r=dom-core-reviewers,jjaschke"

This reverts commit 65b30a350b.

Revert "Bug 2020707 - Part 1: Allow speculation rules to be registered to the document from scripts. r=hsivonen,jjaschke"

This reverts commit 28c7050de9.

Revert "Bug 2020704 - Part 2: Add parser for speculation rule sets. r=hsivonen,jjaschke"

This reverts commit eabb8c6eb3.

Revert "Bug 2020704 - Part 1: Add speculation rules crate. r=dom-core-reviewers,jjaschke"

This reverts commit cd65bed005.
2026-06-12 06:28:05 +00:00
Adam Vandolder 65b30a350b Bug 2020707 - Part 2: Add support for speculationrules script type. r=dom-core-reviewers,jjaschke
Differential Revision: https://phabricator.services.mozilla.com/D286178
2026-06-12 04:48:27 +00:00
serge-sans-paille 53e5242f30 Bug 2041298 - Comply with clang-tidy's modernize-use-nullptr check for parser/ r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D301771
2026-06-10 07:08:36 +00:00
Daniel Holbert cb1c37d98e Bug 2044510: Pass already_AddRefed types by-value instead of by rvalue reference, in parser/. r=dom-core-reviewers,smaug
Differential Revision: https://phabricator.services.mozilla.com/D304375
2026-06-05 21:06:55 +00:00
Emilio Cobos Álvarez cc359d1aa9 Bug 2044618 - Remove SheetParsingMode. r=layout-reviewers,dholbert
It's a 1:1 mapping for the origin that we cache in the
StyleSheetContents, so use that.

PreloadHashKey only cares about author loads, within a document, so
doesn't really need to deal with user / user-agent ones.

Differential Revision: https://phabricator.services.mozilla.com/D304400
2026-06-05 01:03:23 +00:00
Tom Schuster dce5371c0a Bug 2029840 - Tests. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D292702
2026-06-02 12:12:38 +00:00
Henri Sivonen 0124daca51 Bug 2038124 addendum - Simplify the attribute holder in the HTML parser. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D302278
2026-06-02 09:12:41 +00:00
Henri Sivonen d13776d321 Bug 2038124 - Optimize setting attributes on non-custom HTML elements from parser. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D302276
2026-06-02 09:12:39 +00:00
Henri Sivonen ea04eba8aa Bug 2041856. r=smaug,edgar
Differential Revision: https://phabricator.services.mozilla.com/D303280
2026-06-02 08:51:28 +00:00
Alexandru Marc 16e384440d Revert "Bug 2038124 addendum - Simplify the attribute holder in the HTML parser. r=smaug" for causing build bustages @ Element.cpp
This reverts commit 82b2e13b45.

Revert "Bug 2038124 - Optimize setting attributes on non-custom HTML elements from parser. r=smaug"

This reverts commit 2d1ee1cd69.
2026-06-02 07:41:40 +00:00
Henri Sivonen 82b2e13b45 Bug 2038124 addendum - Simplify the attribute holder in the HTML parser. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D302278
2026-06-02 07:07:28 +00:00
Henri Sivonen 2d1ee1cd69 Bug 2038124 - Optimize setting attributes on non-custom HTML elements from parser. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D302276
2026-06-02 07:07:26 +00:00
Atila Butkovits d68e85e91d Revert "Bug 2038124 addendum - Simplify the attribute holder in the HTML parser. r=smaug" for causing bustages at Element.cpp.
This reverts commit 9dd3f6b595.

Revert "Bug 2038124 - Optimize setting attributes on non-custom HTML elements from parser. r=smaug"

This reverts commit b1774ce65e.
2026-06-01 21:47:14 +00:00
Henri Sivonen 9dd3f6b595 Bug 2038124 addendum - Simplify the attribute holder in the HTML parser. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D302278
2026-06-01 20:50:19 +00:00
Henri Sivonen b1774ce65e Bug 2038124 - Optimize setting attributes on non-custom HTML elements from parser. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D302276
2026-06-01 20:50:16 +00:00
Valentin Gosu 524d0b5cd5 Bug 2036929 - Hold strong ref while calling nsIStreamListener methods r=necko-reviewers,geckoview-reviewers,extension-reviewers,media-playback-reviewers,firefox-style-system-reviewers,emilio,padenot,robwu,nalexander,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D302601
2026-05-30 20:41:08 +00:00
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
Henri Sivonen 9986518e26 Bug 2037935 - Special-case the most common element and attribute names in Speedometer3 innerHTML/DOMParser parsing. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D302275
2026-05-27 06:30:15 +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
Ryan VanderMeulen 6ccc6eeaf3 Bug 2038532 - Update libexpat to version 2.8.1. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D299605
2026-05-21 22:45:55 +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 8cea467d1c Bug 2028401 - Part 4 - Resync htmlparser to bd7f0f7 r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D299704
2026-05-21 16:56:17 +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 2e02b372fb Bug 2028401 - Part 3 - Add optionElementPopped code from upstream r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D298819
2026-05-08 15:23:10 +00:00
Keith Cirkel d4aa3e5004 Bug 2028401 - Part 2 - Resync htmlparser to 69af110 r=hsivonen
This sync htmlparser to the contents of its 69af110 commit (just before
changes to select parsing).

Differential Revision: https://phabricator.services.mozilla.com/D298818
2026-05-08 15:23:05 +00:00
Keith Cirkel 2ac86b61e1 Bug 2028401 - Part 1 - Remove errenous merge conflict characters from code r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D298817
2026-05-08 15:23:01 +00:00
agoloman 8c53ba442e Revert "Bug 2028401 - Part 3 - Add optionElementPopped code from upstream r=hsivonen" for causing build bustages @nsHtml5TreeBuilder.cpp.
This reverts commit 852a19fbda.

Revert "Bug 2028401 - Part 2 - Resync htmlparser to 69af110 r=hsivonen"

This reverts commit e52d12eb8c.

Revert "Bug 2028401 - Part 1 - Remove errenous merge conflict characters from code r=hsivonen"

This reverts commit 403fdc1292.
2026-05-08 12:37:17 +00:00
Keith Cirkel 852a19fbda Bug 2028401 - Part 3 - Add optionElementPopped code from upstream r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D298819
2026-05-08 12:21:25 +00:00
Keith Cirkel e52d12eb8c Bug 2028401 - Part 2 - Resync htmlparser to 69af110 r=hsivonen
This sync htmlparser to the contents of its 69af110 commit (just before
changes to select parsing).

Differential Revision: https://phabricator.services.mozilla.com/D298818
2026-05-08 12:21:21 +00:00
Keith Cirkel 403fdc1292 Bug 2028401 - Part 1 - Remove errenous merge conflict characters from code r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D298817
2026-05-08 12:21:17 +00:00
Daniel Holbert 10725540f6 Bug 2037754: Use 'MakeAndAddRef' instead of 'new' when allocating runnable for nsContentUtils::AddScriptRunner. r=dom-core,smaug
MakeAndAddRef ensures that the freshly-allocated object immediately gets a
refcount of 1 (before it's even passed to AddScriptRunner).  This avoids
several potential footguns that otherwise exist with a zero-refcount
freshly-allocated object.

It also makes the ownership-transfer semantics more clear
(via the already_AddRefed type that it produces) - AddScriptRunner is taking
ownership of the object, rather than using it temporarily while the caller
maintains ownership.

Differential Revision: https://phabricator.services.mozilla.com/D299039
2026-05-07 06:35:57 +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 40a3b0a386 Bug 2035137 - Skip libexpat's random_*.h includes since we provide our own salt. r=mccr8
Bug 2024039 excluded the random_*.{c,h} files from vendoring on the
basis that they're dead code (the .c files aren't compiled, and
generate_hash_secret_salt is stubbed by 03_dont_generate_salt.patch).
That broke the Windows ccov build because xmlparse.c's _WIN32-gated
#include of random_rand_s.h still fires at file scope.

Extend 03_dont_generate_salt.patch to wrap the random_*.h #include
block in #if 0 too. This keeps the random_*.{c,h} exclusion (no
misleading code-coverage data on dead source) while making the
exclusion safe on every platform: the #include never fires, so the
header doesn't have to exist.

Differential Revision: https://phabricator.services.mozilla.com/D296736
2026-04-27 17:34:36 +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
Ryan VanderMeulen ed8c505d18 Bug 2024039 - Update libexpat to version 2.8.0. r=mccr8
Also exclude the new upstream random_*.c/h entropy helper files, which
are unused in our build (we set our own hash salt via XML_SetHashSalt).

03_dont_generate_salt.patch was updated to account for upstream refactoring
generate_hash_secret_salt() to return struct sipkey and starting to call
ENTROPY_DEBUG() from outside it (in the XML_SetHashSalt paths). The patch
now stubs ENTROPY_DEBUG's body rather than #if-0ing the whole function,
and wraps the relocated entropy helpers accordingly. In both functions
the live code ((void)label; and abort() respectively) is placed above
the #if 0 block rather than inside a #else branch, so the actual behavior
is immediately visible.

Differential Revision: https://phabricator.services.mozilla.com/D296436
2026-04-26 22:46:36 +00:00
Ryan VanderMeulen a83fd31fc2 Bug 2024039 - Update libexpat to version 2.7.5. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D288308
2026-04-26 22:46:32 +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