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

1273 Коммитов

Автор SHA1 Сообщение Дата
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
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
Emilio Cobos Álvarez e7806ac06c Bug 1694202 - Avoid link preload header and the parser creating two preload requests for the same script. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D106022
2021-02-23 00:43:37 +00:00
Gerald Squelart 2416d881e2 Bug 1691589 - Reduce reliance on GeckoProfiler.h when only labels (and maybe markers) are needed - r=necko-reviewers,geckoview-reviewers,sg,agi,florian
There are no code changes, only #include changes.
It was a fairly mechanical process: Search for all "AUTO_PROFILER_LABEL", and in each file, if only labels are used, convert "GeckoProfiler.h" into "ProfilerLabels.h" (or just add that last one where needed).
In some files, there were also some marker calls but no other profiler-related calls, in these cases "GeckoProfiler.h" was replaced with both "ProfilerLabels.h" and "ProfilerMarkers.h", which still helps in reducing the use of the all-encompassing "GeckoProfiler.h".

Differential Revision: https://phabricator.services.mozilla.com/D104588
2021-02-16 04:44:19 +00:00
Emilio Cobos Álvarez d575f4cd3d Bug 1637651 - Don't trigger duplicate style link preloads for the same preload key. r=smaug
This is equivalent to the check in Document::MaybePreLoadImage, since
otherwise this code won't check the preload service at all. Without
this, we can trigger the assertion in PreloaderBase::NotifyOpen when we
have identical Link header and speculative link element preloads.

It's not a correctness nor perf issue, because the CSS loader will
coalesce the stylesheet load anyways, but it seems better to do this
than to remove the assertion, specially given images already do that.

The test-case in the following patch triggers the issue.

Depends on D103568

Differential Revision: https://phabricator.services.mozilla.com/D103569
2021-02-01 15:06:12 +00:00
Emilio Cobos Álvarez fe36177806 Bug 1637651 - Assume non-quirks mode for style Link header preloads. r=smaug
This is an issue I found while going through this code and
writing/debugging a test for the bug at hand. Without this, the test in
the actual fix for this bug will fail to actually reuse the preloaded
stylesheet.

It seems reasonable to assume that the intersection of quirks mode
documents using link preload headers is small (and in that case we'd
parse the sheet twice, but oh well).

Differential Revision: https://phabricator.services.mozilla.com/D103567
2021-02-01 23:23:50 +00:00
Emilio Cobos Álvarez e417f09f06 Bug 1598613 - Account for <link media=""> for speculative loads of stylesheet and preload links. r=hsivonen
<link media> applies to both <link rel="stylesheet"> (see
HTMLLinkElement::GetStyleSheetInfo) and all link rel="preload" links,
regardless of as value (see HTMLLinkElement::CheckPreloadAttrs), so pass it
down and check them for all of those cases.

Note that in the <link rel="stylesheet"> case we'd still have to load it, but
it doesn't block rendering and we defer its loading until more important
stylesheets are done (see SheetLoadData::ShouldDefer() which returns false if
the media attribute didn't match). So speculatively loading it seems
counter-productive.

Differential Revision: https://phabricator.services.mozilla.com/D103565
2021-02-01 08:03:57 +00:00
Emilio Cobos Álvarez db7e961185 Bug 1598613 - Fix non-unified build in nsHtml5TreeOpExecutor.cpp. r=edgar
Just drive-by cleanup, no behavior change.

There's an using namespace mozilla, so also remove some useless
namespace qualifications while at it.

Depends on D103562

Differential Revision: https://phabricator.services.mozilla.com/D103563
2021-01-31 21:19:23 +00:00
Henri Sivonen 0ddb192035 Bug 1688368 - Check mFeedChardet before feeding the detector. r=emk
Differential Revision: https://phabricator.services.mozilla.com/D102905
2021-01-27 10:36:39 +00:00
Henri Sivonen 9b210c311e Bug 1686463 - Gather telemetry about automatic encoding detection outcomes. r=chutten,emk
Differential Revision: https://phabricator.services.mozilla.com/D102397
2021-01-24 00:11:07 +00:00
Henri Sivonen 67b5ed77bf Bug 786797 - Check for integer overflow when computing new buffer sizes. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D102592
2021-01-21 17:02:58 +00:00
Henri Sivonen 058e02104c Bug 1648464 - Add an Autodetect item to the Text Encoding menu. r=emk,chutten,Gijs
Take a step towards replacing the encoding menu with a single menu item that
triggers the autodetection manually. However, don't remove anything for now.

* Add an autodetect item.
* Add telemetry for autodetect used in session.
* Add telemetry for non-autodetect used in session.
* Restore and revise telemetry for how the encoding that is being overridden
  was discovered.

Differential Revision: https://phabricator.services.mozilla.com/D81132
2021-01-14 07:06:53 +00:00
Edgar Chen 303a7297a3 Bug 1685161 - Use consistent namespace in nsHtml5TreeBuilderCppSupplement.h; r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D100818
2021-01-11 13:27:31 +00:00
Razvan Maries 6565293451 Backed out changeset 8f99f3809630 (bug 1683220) for performance regression (bug 1684434). CLOSED TREE 2021-01-07 14:55:07 +02:00
Edgar Chen 030aaf9626 Bug 1489437 - Part 2: HTML parser should invoke custom element's callbacks before appending child nodes if it is not created for fragment; r=smaug
See https://github.com/whatwg/html/issues/4025.

Depends on D10226

Differential Revision: https://phabricator.services.mozilla.com/D10228
2021-01-05 21:40:26 +00:00
Edgar Chen 3a7902f2c4 Bug 1489437 - Part 1: Make HTML parser distinguish network, document.write and fragments in append operation; r=smaug,hsivonen
For custom element reaction invocation in the parser, we need a way to distinguish the tree appending operation is from fragments or not,
since we don't want to execute reactions until innerHTML finishes running.
(See spec changes https://github.com/whatwg/html/issues/4025)

We don't need to do anything for opAppendText and opAppendCommand since the text and command won't have any chance to
be a custom element.

Differential Revision: https://phabricator.services.mozilla.com/D10226
2021-01-06 09:29:41 +00:00
Steve Fink fe76c7c194 Bug 1683220 - Remove nsJSContext::MaybeRunNextCollectorSlice entirely r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D96209
2020-12-21 17:23:26 +00:00
Simon Giesecke f8e7f4368b Bug 1680269 - Fix includes for nsHtml5StreamParser. r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D98576
2020-12-07 14:21:43 +00:00
Simon Giesecke 1c53236b70 Bug 1679272 - Include ScopeExit.h exactly where used. r=andi
Differential Revision: https://phabricator.services.mozilla.com/D98888
2020-12-07 14:25:59 +00:00
Simon Giesecke 5bfbb2a572 Bug 1673931 - Avoid including Document.h from header files. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D95046

Depends on D95045
2020-11-23 16:07:43 +00:00
Simon Giesecke 971b645fe3 Bug 1660470 - Add missing include directives/forward declarations. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D87865
2020-11-23 16:21:38 +00:00
Ricky Stewart 02a7b4ebdf Bug 1654103: Standardize on Black for Python code in `mozilla-central`.
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-26 18:34:53 +00:00
Bogdan Tara da1098d4aa Backed out 10 changesets (bug 1654103, bug 1672023, bug 1518999) for PanZoomControllerTest.touchEventForResult gv-junit failures CLOSED TREE
Backed out changeset ff3fb0b4a512 (bug 1672023)
Backed out changeset e7834b600201 (bug 1654103)
Backed out changeset 807893ca8069 (bug 1518999)
Backed out changeset 13e6b92440e9 (bug 1518999)
Backed out changeset 8b2ac5a6c98a (bug 1518999)
Backed out changeset 575748295752 (bug 1518999)
Backed out changeset 65f07ce7b39b (bug 1518999)
Backed out changeset 4bb80556158d (bug 1518999)
Backed out changeset 8ac8461d7bd7 (bug 1518999)
Backed out changeset e8ba13ee17f5 (bug 1518999)
2020-10-24 03:36:18 +03:00
Ricky Stewart c0cea3b0fa Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-23 20:40:42 +00:00
Henri Sivonen 4362f51641 Bug 1666300 part 2 - Parse into an inert document. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D93478
2020-10-23 12:48:52 +00:00
Razvan Maries b4044e05f9 Backed out 3 changesets (bug 1666300, bug 1667113) for perma failures on browser_parsable_css.js. CLOSED TREE
Backed out changeset 29c5257d0a06 (bug 1667113)
Backed out changeset 0f0fc78ad521 (bug 1666300)
Backed out changeset 9b0c50269ef7 (bug 1666300)
2020-10-22 14:04:15 +03:00
Henri Sivonen 8439bf4064 Bug 1666300 part 2 - Parse into an inert document. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D93478
2020-10-19 13:42:31 +00:00
Dorel Luca 1ff59cb7a3 Backed out changeset 7558c8821a07 (bug 1654103) for multiple failures. CLOSED TREE 2020-10-22 03:51:06 +03:00
Ricky Stewart 50762dacab Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-21 21:27:27 +00:00
Emilio Cobos Álvarez f813f5248d Bug 1669664 - Don't speculatively load scripts, etc inside a template element. r=hsivonen
I guess in order to make this 100% sound we should check the whole
template mode stack, but that seemed more expensive than what I'd really
like, and I think it's not likely to be an issue in practice (maybe we
can too-eagerly preload some images inside tables inside templates, or
something of that sort?).

Differential Revision: https://phabricator.services.mozilla.com/D92773
2020-10-14 21:58:50 +00:00
Ricky Stewart 362abcf949 Bug 1670357 - Remove `make` targets for cleaning: `clean`, `realclean`, `clobber`, `distclean`, `clobber_all`, `everything` r=firefox-build-system-reviewers,mhentges
The `clobber` targets are superseded by `mach clobber`, so we don't need them for any reason. The `clean` target is meant to get you to a post-`configure` state, but it doesn't really work, and if it's necessary for you to be in that state for some reason you can just clobber and re-`configure`, so it doesn't seem worth it to get it working again. Instead, delete all of them. Also delete `everything` which is not useful when `clobber` doesn't exist.

Differential Revision: https://phabricator.services.mozilla.com/D93514
2020-10-15 20:37:18 +00:00
Henri Sivonen aeee6b217b Bug 1607762 - Make the refcount of nsHtml5OwningUTF16Buffer atomic. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D92936
2020-10-14 15:29:44 +00:00
Bogdan Tara f07a7512b9 Backed out changeset 0191bd914f91 (bug 1669664) for test_login_item.html failures a=backout 2020-10-09 00:01:18 +03:00
Emilio Cobos Álvarez 35ada269d3 Bug 1669664 - Don't speculatively load scripts, etc inside a template element. r=hsivonen
I guess in order to make this 100% sound we should check the whole
template mode stack, but that seemed more expensive than what I'd really
like, and I think it's not likely to be an issue in practice (maybe we
can too-eagerly preload some images inside tables inside templates, or
something of that sort?).

Differential Revision: https://phabricator.services.mozilla.com/D92773
2020-10-08 10:58:27 +00:00
Simon Giesecke de7bab0f06 Bug 1650145 - Replace all value uses of Empty[C]String by 0-length _ns literals. r=froydnj,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D82325
2020-09-23 15:17:15 +00:00
Makoto Kato c48e63ea6f Bug 1425291 - Part 2. Add autocapitalize attribute to htmlparser. r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D86675
2020-09-15 14:26:14 +00:00
Henri Sivonen bb3eb9db34 Bug 1663921 - Make the speculative parser honor the non-xlink: versions of SVG href. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D89604
2020-09-10 11:37:07 +00:00
Gerald Squelart 5f9ff13253 Bug 1663543 - Convert PROFILER_ADD_MARKER and 2-arg profiler_add_marker to PROFILER_MARKER_UNTYPED - r=gregtatum
Mostly mechanical change, with some extra work where non-literal names are provided.
Also, when this is the only profiler call in a file, `#include "GeckoProfiler.h"` can be changed to `#include "mozilla/ProfilerMarkers.h"`.

Differential Revision: https://phabricator.services.mozilla.com/D89415
2020-09-10 03:02:36 +00:00
Kagami Sascha Rosylight 0f5ce0d9b6 Bug 1646140 - Fire SVG onload only when scripting is enabled r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D89218
2020-09-07 14:45:12 +00:00
Simon Giesecke 1e02318b49 Bug 1653335 - Replace MakeSpan uses by constructor calls. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D83817
2020-08-07 07:49:47 +00:00
Simon Giesecke dea5b543db Bug 1653335 - Remove uses of MakeSpan in return statements. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D83812
2020-08-07 07:42:50 +00:00
Sean Feng 75047f597c Bug 1653474 - Process META elements when it's inserted r=smaug
Unlike other engine vendors, we process meta elements
at parser, instead of when they are inserted. This
leads some web compact issues.

This patch aligns us with other vendors.

Differential Revision: https://phabricator.services.mozilla.com/D84545
2020-08-05 16:32:57 +00:00
Matt Brundage f8a95de9bc Bug 1650326 - Fix typo in error message about over-deep tree. DONTBUILD NPOTB r=alchen
Differential Revision: https://phabricator.services.mozilla.com/D82151
2020-08-03 11:09:33 +00:00
Mike Bremford f58ab49971 Bug 1650330 - Ensure every Locator is also a Locator2 (#10). DONTBUILD NPOTB r=alchen
* Replace org.xml.sax.helpers.LocatorImpl with nu.validator.htmlparser.impl.LocatorImpl

* instanceof before cast to Locator2

Differential Revision: https://phabricator.services.mozilla.com/D82153
2020-08-03 12:30:12 +00:00
Simon Pieters 8932345bb3 Bug 1650329 - Improve message: bad start tag in noscript in head. r=alchen
Differential Revision: https://phabricator.services.mozilla.com/D82152
2020-08-03 12:30:12 +00:00