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

4596 Коммитов

Автор SHA1 Сообщение Дата
Henri Sivonen e266e0f13a Bug 1741219 - Remove Expat usage from nsHtml5StreamParser. r=smaug
To be overwritten by the patch for https://bugzilla.mozilla.org/show_bug.cgi?id=1701828 .

Differential Revision: https://phabricator.services.mozilla.com/D131215
2021-11-16 16:02:04 +00:00
Andi-Bogdan Postelnicu c8e0f87391 Bug 1519636 - First reformat with clang-format 13.0.0. r=firefox-build-system-reviewers,sylvestre,mhentges
Updated with clang-format version 13.0.0 (taskcluster-OgjH5lasS5K_fvefdRcJVg)

Depends on D131114

Differential Revision: https://phabricator.services.mozilla.com/D129119
2021-11-16 08:07:30 +00:00
ssummar 0992acc367 Bug 1603127 - Replaced mozilla::Tuple with std::tuple and applied structured bindings in mozilla/Encoding.h. r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D129920
2021-11-08 08:14:00 +00:00
Cristian Tuns 71486b8924 Backed out changeset 7e8e3747c3f8 (bug 1603127) for causing toolchains build bustages (Bug 1739589). CLOSED TREE 2021-11-05 07:23:45 -04:00
ssummar 508562cc85 Bug 1603127 - Replaced mozilla::Tuple with std::tuple and applied structured bindings in mozilla/Encoding.h. r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D129920
2021-11-05 05:33:58 +00:00
Edgar Chen 3f791b5050 Bug 1556352 - Part 1: Do not set form owner from parser for form-associated custom element; r=smaug
See steps 14 of https://html.spec.whatwg.org/commit-snapshots/3ad5159be8f27e110a70cefadcb50fc45ec21b05/#create-an-element-for-the-token

From spec perspective, FACE needs this in order to enqueue the formAssociated callback
while FACE is inserted into document. Otherwise it would bail out in
https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#association-of-controls-and-forms:parser-inserted-flag,
and wouldn't run https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#reset-the-form-owner
steps nor https://html.spec.whatwg.org/multipage/custom-elements.html#custom-element-reactions:reset-the-form-owner

From implementation perspective, we don't implement parser inserted flag, but we do
update the form owner from parser. Not doing this would make the subsequent part
which implements formAssociated callback a bit simpler, where we don't need to consider
or handle the case that form owner is set from parser.

Differential Revision: https://phabricator.services.mozilla.com/D129646
2021-10-28 10:29:37 +00:00
ssummar 51c0ff21e5 Bug 1626517 - Replaced mozilla::Unused with mozilla::Ignore in mozilla::Decoder/mozilla::Encoder calls. r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D129022
2021-10-25 12:31:41 +00:00
Evgenia Kotovich 0d0980ee0d Bug 1576768 - Automatically format .sjs files using prettier. r=Standard8,agi,zombie,extension-reviewers
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D128482
2021-10-18 09:26:33 +00:00
Noemi Erli 2bba3cec69 Backed out changeset 2ab6bb03dcc1 (bug 1576768) for causing failures in test_double_submit.html CLOSED TREE 2021-10-18 02:05:57 +03:00
Evgenia Kotovich 3e3dff109c Bug 1576768 - Automatically format .sjs files using prettier. r=Standard8,agi,zombie,extension-reviewers
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D128482
2021-10-17 14:59:14 +00:00
Alexandru Michis dac6815201 Backed out changeset 7c08aa027893 (bug 1576768) for causing multiple failures.
CLOSED TREE
2021-10-15 16:52:43 +03:00
Evgenia Kotovich a8b32926fa Bug 1576768 - Automatically format .sjs files using prettier. r=Standard8,agi,zombie,extension-reviewers
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D128482
2021-10-15 12:58:11 +00:00
Henri Sivonen 8954e892c8 Bug 1735161 - Update MDN URL in speculation failure message. r=smaug DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D128095
2021-10-12 06:49:15 +00:00
Geoff Brown 7e36862b61 Bug 1724296 - Remove many skip-if(verify) test annotations (mochitest pt 2); r=jmaher
This completes the review of skip-if(verify) in mochitest.ini.

Differential Revision: https://phabricator.services.mozilla.com/D127992
2021-10-09 16:07:32 +00:00
Emilio Cobos Álvarez a002eeaccb Bug 1733945 - Simplify reftest annotations to assume skiaContent == true. r=jrmuizel
Generated with:

  2180efaf7c

Differential Revision: https://phabricator.services.mozilla.com/D127428
2021-10-04 15:19:10 +00:00
Henri Sivonen 7588a257ed Bug 1724243 - Make text/plain and MediaDocuments use the Standards Mode. r=smaug,emilio
Differential Revision: https://phabricator.services.mozilla.com/D123318
2021-10-01 12:55:28 +00:00
Cosmin Sabou 0d612db0fb Backed out 4 changesets (bug 1688452) for assertion and bc failures on browser_translation_bing.js.
Backed out changeset 1a720cffc019 (bug 1688452)
Backed out changeset 797a7e243d43 (bug 1688452)
Backed out changeset 00fd325069fa (bug 1688452)
Backed out changeset 23ef68478e93 (bug 1688452)
2021-09-29 20:13:33 +03:00
Deian Stefan 20476da693 Bug 1688452 - Part 4: Add Wasm sandbox support for RLBoxed libexpat r=tjr
Depends on D126369

Differential Revision: https://phabricator.services.mozilla.com/D106254
2021-09-29 14:31:45 +00:00
Deian Stefan ac3df5e3ad Bug 1688452 - Part 3: Eliminate redundant callback implementation in RLBoxed libexpat r=tjr
The default handler and character-data handler callbacks are identical
and some Windows compilers just reconciled them into a single function.
This, unfortunately, resulted in a RLBox runtime error: the same
callback was registered twice. This patch removes the duplicate handler
implementation and just sets the character-data handler callback as the
default handler.

Depends on D104658

Differential Revision: https://phabricator.services.mozilla.com/D126369
2021-09-29 14:31:45 +00:00
Deian Stefan 7d9f1d992f Bug 1688452 - Part 2: Retrofit nsExpatDriver to use RLBoxed libexpat r=tjr,peterv
Depends on D117102

Differential Revision: https://phabricator.services.mozilla.com/D104658
2021-09-29 14:31:44 +00:00
Deian Stefan 4bb477c01b Bug 1688452 - Part 1: Retrofit nsHtml5StreamParser to use RLBoxed libexpat r=tjr,peterv
Differential Revision: https://phabricator.services.mozilla.com/D117102
2021-09-29 14:31:44 +00:00
Mike Hommey cf6298e15e Bug 1732208 - Silence the unused-but-set-variable warning in parser. r=hsivonen
parser/html/nsHtml5StreamParser.cpp:1046:10: error: variable 'totalRead' set but not used [-Werror,-Wunused-but-set-variable]
  size_t totalRead = 0;
         ^

Differential Revision: https://phabricator.services.mozilla.com/D126458
2021-09-28 00:02:47 +00:00
Edgar Chen eeb0629c16 Bug 1558793 - Remove invalid comment and assertion in nsHtml5TreeOperation::SetFormElement; r=hsivonen
Per https://html.spec.whatwg.org/#form-associated-element, img is a form-associated
element, and we do handle the img case well.

Differential Revision: https://phabricator.services.mozilla.com/D125754
2021-09-16 12:59:03 +00:00
Nicklas Boman e07e317034 Bug 1308103 - Replace PL_strcmp/PL_strncmp with strcmp/strncmp in xpcom/ and parser/htmlparser/ r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D123879
2021-09-09 19:36:10 +00:00
Henri Sivonen 2a9936f40a Bug 1153920 - Conform ampersand error reporting to HTML spec. r=smaug
Created by inlining the `AMBIGUOUS_AMPERSAND` state in
https://github.com/validator/htmlparser/pull/30 back into the states
that transitioned to `AMBIGUOUS_AMPERSAND` in that PR by
Michael(tm) Smith.

Differential Revision: https://phabricator.services.mozilla.com/D81992
2021-09-02 11:13:37 +00:00
Henri Sivonen 5397b4f0a9 Bug 1727491 - Remove support for BOMless unlabeled Latin1 Supplement-range UTF-16LE|BE. r=emk
Differential Revision: https://phabricator.services.mozilla.com/D123596
2021-09-01 09:13:29 +00:00
criss 02cf484af4 Backed out changeset dc6b9ca8f3fa (bug 1727491) for causing mochitest failures on test_bug631751be.html. CLOSED TREE 2021-08-30 11:14:38 +03:00
Henri Sivonen 4233abeb9e Bug 1727491 - Remove support for BOMless unlabeled Latin1 Supplement-range UTF-16LE|BE. r=emk
Differential Revision: https://phabricator.services.mozilla.com/D123596
2021-08-30 07:11:09 +00:00
Henri Sivonen 58e0b2946c Bug 1716290 - Remove protections against the document changing as part of kCharsetFromFinalUserForcedAutoDetection reload. r=emk,emilio
NOTE! In cases where there is no HTTP-layer encoding declaration, and CSS
parsing inherits the encoding from the HTML document, for preloads, this
changes the inherited encoding from windows-1252 to UTF-8 in order to
make the speculative encoding correct in the common `<meta charset=utf-8>`
case.

Differential Revision: https://phabricator.services.mozilla.com/D123593
2021-08-26 18:02:15 +00:00
criss 2be42eea15 Backed out changeset ab805f2926d5 (bug 1716290) for causing failures on link-header-preload.html. CLOSED TREE 2021-08-26 12:07:17 +03:00
Henri Sivonen ff85d45e69 Bug 1716290 - Remove protections against the document changing as part of kCharsetFromFinalUserForcedAutoDetection reload. r=emk
Differential Revision: https://phabricator.services.mozilla.com/D123593
2021-08-26 06:25:31 +00:00
Andi-Bogdan Postelnicu 2fc4f70e9b Bug 1725145 - Preparation for the hybrid build env. r=necko-reviewers,firefox-build-system-reviewers,valentin,glandium
Automatically generated path that adds flag `REQUIRES_UNIFIED_BUILD = True` to `moz.build`
when the module governed by the build config file is not buildable outside on the unified environment.

This needs to be done in order to have a hybrid build system that adds the possibility of combing
unified build components with ones that are built outside of the unified eco system.

Differential Revision: https://phabricator.services.mozilla.com/D122345
2021-08-25 10:46:17 +00:00
Andi-Bogdan Postelnicu 9945b94835 Bug 1519636 - Reformat recent changes to the Google coding style. r=emilio
Updated with clang-format version 12.0.1 (taskcluster-dNZqCRqWRTqa6cZxPKxh7Q)

Differential Revision: https://phabricator.services.mozilla.com/D122814
2021-08-23 09:30:23 +00:00
Henri Sivonen 50f9d31d19 Bug 1726374 - Correctly highlight <!-- a <!-->b in View Source. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D123061
2021-08-20 09:03:33 +00:00
Brindusan Cristian e80f2b4691 Backed out changeset 8370f995a458 (bug 1726374) for causing reftest failures in view-source:bug1319410-1.html
CLOSED TREE
2021-08-19 18:25:51 +03:00
Henri Sivonen 974eddfb01 Bug 1726374 - Correctly highlight <!-- a <!-->b in View Source. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D123061
2021-08-19 13:00:25 +00:00
Michael[tm] Smith f3bee8a712 Bug 1541822 - Ensure doctype name is set to null when missing r=smaug
This change ensures that the tokenizer sets the doctype name to null
when the doctype name is missing in the input source.

Otherwise, without this change, the doctype name is set to the empty
string — which doesn’t conform to the requirements in the HTML spec, and
which causes us to fail 9 tests in the html5lib-tests suite.

Relates to https://github.com/validator/htmlparser/issues/35

Differential Revision: https://phabricator.services.mozilla.com/D122936
2021-08-19 10:02:57 +00:00
Michael[tm] Smith d76dfd530f Bug 1541846 - Ensure namespace-aware “clear the stack” handling r=smaug
This change ensures that for all cases with spec requirements in the
form “clear the stack back to a foo context” — which involves checking
for elements with particular names — we only look for elements in the
HTML namespace, rather than additionally looking for elements which
aren’t in the HTML namespace but that also have those particular names.

Otherwise, without this change, we aren’t in conformance with the spec
requirements, and we fail several cases in the html5lib-tests suite.

Fixes https://github.com/validator/htmlparser/issues/33

Differential Revision: https://phabricator.services.mozilla.com/D122722
2021-08-17 12:02:13 +00:00
Michael[tm] Smith 2a15667bbd Bug 1725946 - Conform tokenizer-only U+0000 NUL handling to spec r=smaug
This change brings the tokenizer’s handling of U+0000 NUL characters in
the DATA state and the CDATA section state into conformance with the
requirements in the HTML spec — for the case where only tokenization is
being performed, without tree construction; that is, the case where the
tokenizer() method is called, rather than parse() or parseFragment().

Specifically, the tokenization steps defined in the spec require that
when a U+0000 NUL is consumed in the DATA state or in the CDATA section
state, the parser must then emit a U+0000 NUL. But when performing tree
construction, the spec requires that when a U+0000 NUL is consumed, the
parser must instead emit a U+FFFD REPLACEMENT CHARACTER.

Without this change, the parser always emits a U+FFFD REPLACEMENT
CHARACTER — even when only tokenization is being performed. That causes
us to fail a number of tests in html5lib-tests suite.

For more background on the relevant behavior, see the following:

* https://www.w3.org/Bugs/Public/show_bug.cgi?id=9659
* https://github.com/whatwg/html/commit/d98f83e
* https://github.com/validator/htmlparser/commit/9b9c263

Relates to https://github.com/validator/htmlparser/issues/35

Differential Revision: https://phabricator.services.mozilla.com/D122721
2021-08-17 10:09:10 +00:00
Henri Sivonen 5fd94ac23d Bug 1650087 test - Optional table part end tags before template close should not be flagged as errors. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D122712
2021-08-16 11:10:19 +00:00
Michael[tm] Smith 21de022eae Bug 1650087 - Support “generate all implied end tags thoroughly” r=smaug
When the parser encounters a `</template>` end tag and there are other
open elements, the HTML spec requires the parser to “generate all
implied end tags thoroughly”, which unlike “generate implied end tags”
also includes generating implied end tags for table-parts elements
(caption, colgroup, tbody, thead, tfoot, td, th, and tr).

Differential Revision: https://phabricator.services.mozilla.com/D82020
2021-08-16 11:10:19 +00:00
Michael[tm] Smith 9b06c493c5 Bug 1650066 - Correct error for EOF in “in template” state r=smaug
Doing `errUnclosedElements(eltPos, "template")` for EOF in the “in
template” state results in the error message “End tag `template` seen, but
there were open elements”, which is all wrong because the actual problem is
that though a `template` end tag was expected, EOF was reached without a
`template` end tag being seen.

So let’s instead when we reach this just report the list of open elements.

Differential Revision: https://phabricator.services.mozilla.com/D122598
2021-08-16 05:16:58 +00:00
Henri Sivonen de1b71fe15 Bug 1650066 preparation - Add errListUnclosedStartTags for HTML tree builder error reporting. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D122597
2021-08-16 05:16:58 +00:00
Henri Sivonen 54015a7af2 Bug 1319410 test - "--" in a comment is non-error but "<!--" in a comment is an error. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D122347
2021-08-16 05:01:10 +00:00
Michael[tm] Smith 3e0410518d Bug 1319410 fixup - Stay in the COMMENT_LESSTHAN state, annotate fall-throughs. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D82163
2021-08-16 05:01:10 +00:00
Michael[tm] Smith 7c2dd70690 Bug 1319410 - Make consecutive hyphens in comments a non-error r=smaug
Also allow `<!-->` at (IE conditional) comment end

See https://github.com/whatwg/html/pull/1356
See https://github.com/whatwg/html/pull/1456

Differential Revision: https://phabricator.services.mozilla.com/D82000
2021-08-16 05:01:09 +00:00
Henri Sivonen 10374eb129 Bug 1724101 - Protect nsHtml5StreamListener::mDelegate with a monitor. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D122471
2021-08-13 12:13:48 +00:00
Dorel Luca f69a64ff07 Backed out changeset f29e3aea6a16 (bug 1724101) for multiple failures in Mutex_posix.cpp. CLOSED TREE 2021-08-12 20:40:30 +03:00
Henri Sivonen ed53e6bf55 Bug 1724101 - Protect nsHtml5StreamListener::mDelegate with a mutex. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D122471
2021-08-12 16:23:11 +00:00
Peter Van der Beken 37ab0970ed Bug 1721153 - Remove unused aListener and aMode arguments of nsIParser::Parse. r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D120217
2021-08-12 14:11:38 +00:00