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

4572 Коммитов

Автор SHA1 Сообщение Дата
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
Henri Sivonen c037109d37 Bug 1724920 - Sort headers in the generated parts of the HTML parser. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D122225
2021-08-11 08:08:52 +00:00
Paul Bone 2ff6954e0f Bug 1718184 - pt 1. IdleTaskRunner now uses TimeDuration r=nika
Differential Revision: https://phabricator.services.mozilla.com/D118791
2021-07-13 01:42:32 +00:00
Henri Sivonen 7df7939f77 Bug 1713627 - Remove code obsoleted by the replacing the Text Encoding menu with one item. r=jaws,emk
Differential Revision: https://phabricator.services.mozilla.com/D116391
2021-06-21 12:09:01 +00:00
Dorel Luca 2118316ba4 Backed out changeset 4891a17c55e2 (bug 1713627) for Browser-chrome failures in docshell/test/browser/browser_bug673087-1.js. CLOSED TREE 2021-06-21 12:10:54 +03:00
Henri Sivonen abbbf94915 Bug 1713627 - Remove code obsoleted by the replacing the Text Encoding menu with one item. r=jaws,emk
Differential Revision: https://phabricator.services.mozilla.com/D116391
2021-06-21 08:09:43 +00:00
Jonathan Kew a74bd20f2b Bug 737785 - Un-prefix -moz-tab-size (keeping the prefixed version as an alias for now). r=layout-reviewers,dholbert
This results in lots of new WPT test passes.

There were also a couple of WPT tests that turned out to be broken;
tab-size-inline-001 and -002 had errors in their reference files such
that they'd never pass anywhere. So those are fixed here.

Depends on D117331

Differential Revision: https://phabricator.services.mozilla.com/D117332
2021-06-10 09:19:24 +00:00
Edgar Chen 1ebbd60592 Bug 1685421 - Part 2: Stop using NS_ERROR_DOM_HIERARCHY_REQUEST_ERR in nsINode; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D113344
2021-06-02 13:43:39 +00:00
Matt Woodrow c1f699cc3d Bug 1713489 - Record telemetry for how long we spend waiting on the main thread to process image preload network steps. r=bas,dragana,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D116318
2021-05-31 22:44:18 +00:00
Henri Sivonen 2cc5f863ce Bug 1712728 - Limit the encoding_detection_outcome_html and encoding_detection_outcome_text probes to HTTP status 200. r=emk
Differential Revision: https://phabricator.services.mozilla.com/D115897
2021-05-26 04:19:12 +00:00
Valentin Gosu 5b981d7705 Bug 1694662 - Remove appcache logic from content sink r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D106440
2021-04-30 07:20:18 +00:00
Henri Sivonen 217757f82d Bug 829543 - Rename hintCharset to reloadEncoding and remove unnecessary code. r=emk
Differential Revision: https://phabricator.services.mozilla.com/D113639
2021-04-28 12:15:47 +00:00
Henri Sivonen 29b3230825 Bug 1702248 - Limit encoding detection outcome telemetry to top level and to text/html and text/plain. r=emk
Differential Revision: https://phabricator.services.mozilla.com/D110902
2021-04-07 06:05:57 +00:00
Simon Giesecke 760cc7e936 Bug 1679522 - Fix include directives and forward declarations. r=andi,necko-reviewers,jgilbert
- Add missing include directives and forward declarations.
- Remove some extra include directives.
- Add missing namespace qualifications.
- Move include directives out of namespace in toolkit/xre/GlobalSemaphore.h

Differential Revision: https://phabricator.services.mozilla.com/D98894
2021-03-25 10:19:44 +00:00
Henri Sivonen 8fa2981796 Bug 1547895 - Make nsHtml5Parser::Terminate() mark the parser as document.close()d. r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D109068
2021-03-24 13:30:52 +00:00
Simon Giesecke 71619f5f54 Bug 708901 - Migrate to nsTHashSet in parser. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D109333
2021-03-24 12:18:18 +00:00
Kershaw Chang 66f9604c86 Bug 1698073 - Extend ysod event telemetry to record the status of document r=zbraniecki
Differential Revision: https://phabricator.services.mozilla.com/D109484
2021-03-24 08:09:11 +00:00
Henri Sivonen b98488aa92 Bug 673087 - Honor encoding declared via XML declaration in text/html. r=emk
Differential Revision: https://phabricator.services.mozilla.com/D107806
2021-03-23 09:52:04 +00:00
Nika Layzell c733984c4b Bug 1675820 - Part 6: Make DocGroup cycle-collected, r=farre,smaug
Previously, the DocGroup type was not cycle-collected, as it needed to have
references from other threads for Quantum DOM. Nowadays the only off-main-thread
use of DocGroup is for dispatching runnables to the main thread which should be
tracked using a performance counter for about:performance. This means we can
remove the DocGroup references from these dispatching callsites, only storing
the Performance Counter we're interested in, and simplify make DocGroup be
cycle-collected itself.

This fixes a leak caused by adding the WindowGlobalChild getter to
WindowContext, by allowing cycles between the document and its BrowsingContext
to be broken by the cycle-collector.

Differential Revision: https://phabricator.services.mozilla.com/D108865
2021-03-18 19:24:50 +00:00
Steve Fink 6e36aed705 Bug 1692308 - Add an initial delay to IdleTaskRunner r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D107504
2021-03-12 06:55:46 +00:00
Simon Giesecke ad01a10a3b Bug 1634281 - Use nsTHashMap instead of nsDataHashtable. r=xpcom-reviewers,necko-reviewers,jgilbert,nika,valentin
Note that this patch only transforms the use of the nsDataHashtable type alias
to a directly equivalent use of nsTHashMap. It does not change the specification
of the hash key type to make use of the key class deduction that nsTHashMap
allows for in some cases. That can be done in a separate step, but requires more
attention.

Differential Revision: https://phabricator.services.mozilla.com/D106008
2021-03-10 10:47:47 +00:00
Kagami Sascha Rosylight e9a7261412 Bug 1360715 - Part 3: Remove remaining cross-context instanceof from tests r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D106663
2021-03-04 22:03:58 +00:00
Brindusan Cristian b926d96be6 Backed out 3 changesets (bug 1360715) for mochitest failures at test_WebCrypto.html. CLOSED TREE
Backed out changeset b4a14c42313d (bug 1360715)
Backed out changeset 0e4b1b65fcbe (bug 1360715)
Backed out changeset fb8b9841d82b (bug 1360715)
2021-03-04 21:15:16 +02:00
Kagami Sascha Rosylight 7bec866ac5 Bug 1360715 - Part 3: Remove remaining cross-context instanceof from tests r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D106663
2021-03-04 15:05:27 +00:00
Simon Giesecke b5855b89fc Bug 1634281 - Remove unused nsDataHashtable.h includes. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D106007
2021-03-03 08:58:52 +00:00