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

1559 Коммитов

Автор SHA1 Сообщение Дата
Emilio Cobos Álvarez 198c331213 Bug 1910698 - Add a struct to represent JS caller location and more general warning source location. r=smaug,necko-reviewers,anti-tracking-reviewers,dom-storage-reviewers,pbz,kershaw,janv
Use it liberally across the tree. This could be cleaned up even more in the future.

Differential Revision: https://phabricator.services.mozilla.com/D218114
2024-08-01 17:12:48 +00:00
Vincent Hilla 155c81440b Bug 1837769 - Associate element with form only if intended parent in same tree. r=dom-core,avandolder
nsHTML5TreeOperation::SetFormElement should only associate an element
with the form, if "the intended parent is in the same tree as the
element pointed to by the form element pointer".

See https://html.spec.whatwg.org/#creating-and-inserting-nodes:parser-inserted-flag

Differential Revision: https://phabricator.services.mozilla.com/D216052
2024-07-23 13:27:05 +00:00
Sylvestre Ledru 45030f6970 Bug 1519636 - Reformat recent changes to the Google coding style r=emilio,necko-reviewers,geckoview-reviewers,application-update-reviewers,media-playback-reviewers,devtools-reviewers,anti-tracking-reviewers,profiler-reviewers,win-reviewers,migration-reviewers,padenot,mconley,nchevobbe,kershaw,gstoll,mstange,bytesized,m_kato
This new version of clang 17 also slightly changed the formatting.

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D215914
2024-07-17 11:15:31 +00:00
Masayuki Nakano 518f238fa3 Bug 1906015 - part 2: Make the most `do_QueryInterface` users for `nsIFormControl` use new getter methods r=smaug,credential-management-reviewers,sessionstore-reviewers,sclements
Unfortunately, the following QIs are still required.
https://searchfox.org/mozilla-central/rev/cbdfa503a87597b20719aae5f6a1efccd6cb3b7b/dom/html/nsIConstraintValidation.cpp#101,121

Depends on D215576

Differential Revision: https://phabricator.services.mozilla.com/D215577
2024-07-10 00:46:59 +00:00
Adam Vandolder b40c30b136 Bug 1890428 - Add serialization support for Declarative Shadow DOM. r=webidl,smaug
Differential Revision: https://phabricator.services.mozilla.com/D206955
2024-05-15 16:40:21 +00:00
Adam Vandolder 1c79b181e5 Bug 1890428 - Add shadowrootserializable attribute. r=dom-core,hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D206954
2024-05-15 16:40:20 +00:00
Tamas Szentpeteri 065fdfb46e Backed out 2 changesets (bug 1890428) for causing wpt failures on idlharness.https.html. CLOSED TREE
Backed out changeset 1954ce9669b8 (bug 1890428)
Backed out changeset 3e45e3d15eed (bug 1890428)
2024-05-15 11:19:46 +03:00
Adam Vandolder bc77f97e3d Bug 1890428 - Add serialization support for Declarative Shadow DOM. r=webidl,smaug
Differential Revision: https://phabricator.services.mozilla.com/D206955
2024-05-15 03:01:19 +00:00
Adam Vandolder be70f57b1c Bug 1890428 - Add shadowrootserializable attribute. r=dom-core,hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D206954
2024-05-15 03:01:18 +00:00
Cristian Tuns d52242a24f Backed out 2 changesets (bug 1890428) for causing failures in idlharness.window.html?exclude=Node CLOSED TREE
Backed out changeset f9cf0740eef2 (bug 1890428)
Backed out changeset 37e2a10a9022 (bug 1890428)
2024-05-14 19:42:37 -04:00
Adam Vandolder 92289875b1 Bug 1892882 - Carry over AllowDeclarativeShadowRoot state when parser created via document.write. r=dom-core,hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D208747
2024-05-14 16:56:20 +00:00
Cristian Tuns fb2ccec709 Backed out changeset 822a570ebc0a (bug 1892882) for causing wpt failures in idlharness.window.html?exclude=Node CLOSED TREE 2024-05-14 19:10:34 -04:00
Adam Vandolder 75385837ce Bug 1892882 - Carry over AllowDeclarativeShadowRoot state when parser created via document.write. r=dom-core,hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D208747
2024-05-14 16:56:20 +00:00
Adam Vandolder 133a24fad6 Bug 1890428 - Add serialization support for Declarative Shadow DOM. r=webidl,smaug
Differential Revision: https://phabricator.services.mozilla.com/D206955
2024-05-14 16:43:28 +00:00
Adam Vandolder c72e6da172 Bug 1890428 - Add shadowrootserializable attribute. r=dom-core,hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D206954
2024-05-14 16:43:27 +00:00
Emilio Cobos Álvarez d55796be17 Bug 1892257 - Move nsStringBuffer to mfbt. r=nika,xpcom-reviewers,glandium
Inline Create() and Realloc() so that we don't get negative leaks, since
were that code end up in mozglue, it wouldn't have access to the logging
machinery.

Differential Revision: https://phabricator.services.mozilla.com/D209663
2024-05-14 14:24:26 +00:00
Emilio Cobos Álvarez 8aaf44fea9 Bug 1893683 - Remove ns{A,C}String and other xpcom dependencies from nsStringBuffer. r=smaug,media-playback-reviewers,karlt
* nsStringBuffer::FromString -> nsTSubString::GetStringBuffer
 * nsStringBuffer::ToString -> nsTSubString::Assign(nsStringBuffer*, len)
 * Move refcounting inline but refcount-logging and other XPCOM-related
   things out-of-line.

Differential Revision: https://phabricator.services.mozilla.com/D208771
2024-05-09 08:34:35 +00:00
Tom Schuster e081721763 Bug 1850967 - Forbid data: and javascript: URLs in <base>. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D209357
2024-05-06 14:55:22 +00:00
sunil mayya e357aeaddb Bug 1884208 - Remove negative probes for measuring delta between OnDataFinished and OnStopRequest in HttpChannelChild and HTML5Parser. r=jesup,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D204057
2024-03-28 09:37:25 +00:00
Henri Sivonen 0d1e224dce Bug 1807017 - Consider to reuse the memory when nsHtml5Tokenizer::end() is called, r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D201982
2024-03-28 00:32:21 +00:00
Cristina Horotan 3fee1464da Backed out changeset a317563d8729 (bug 1807017) for causing mutiple failures at nsHtml5TreeBuilder.cpp CLOSED TREE 2024-03-28 01:50:18 +02:00
Henri Sivonen 6d652d37f5 Bug 1807017 - Consider to reuse the memory when nsHtml5Tokenizer::end() is called, r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D201982
2024-03-27 21:56:22 +00:00
Sandor Molnar 24246bd5c0 Backed out changeset 72d4f33ccc36 (bug 1884208) for causing assertion failures @ parser/html/nsHtml5StreamParser.cpp 2024-03-19 16:35:37 +02:00
sunil mayya 614fd58921 Bug 1884208 - Remove negative probes for measuring delta between OnDataFinished and OnStopRequest in HttpChannelChild and HTML5Parser. r=jesup,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D204057
2024-03-19 12:41:10 +00:00
Henri Sivonen 73b55ec2e1 Bug 1884108 - Add interned attribute "event" to the HTML parser. r=dom-core,peterv
Differential Revision: https://phabricator.services.mozilla.com/D203902
2024-03-08 11:51:56 +00:00
Olli Pettay f575c3bb9f Bug 1883138 - Ensure HasParserNotified returns true only when parser has actually notified, r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D203324
2024-03-07 12:52:30 +00:00
Emilio Cobos Álvarez d39e78a02e Bug 1883435 - Don't include GleanMetrics.h from Document.h. r=chutten,necko-reviewers,valentin
In bug 1883435 comment 2 chutten mentions that including
nsGlobalWindowInner.h from GleanMetrics.h causes a stylo build failure.

This is because nsGlobalWindowInner.h itself brings a bunch of DOM
bindings template soup that bindgen isn't great at dealing with.

That can be fixed in various ways. However, there is a simpler fix,
which is not including GleanMetrics at all.

It's trivial to do, and given it's a massive autogenerated file, and
Document.h is a very common header, it's worth doing this if only for
build times.

Fix a bunch of unused includes while at it.

Differential Revision: https://phabricator.services.mozilla.com/D203625
2024-03-05 17:54:14 +00:00
Gregory Pappas 3ea20569e6 Bug 1881845 - Remove nsContentCID.h r=smaug,media-playback-reviewers,karlt
All of these components have been converted to static registration, making this
file unneeded.

Differential Revision: https://phabricator.services.mozilla.com/D202633
2024-03-04 23:41:05 +00:00
Adam Vandolder 6d14b717be Bug 1880188 - Add shadowrootclonable attribute support. r=webidl,emilio
Differential Revision: https://phabricator.services.mozilla.com/D202357
2024-02-28 19:00:34 +00:00
Frédéric Wang acef313f3d Bug 1839313 - Add "fetchpriority" attribute to <img> element. r=smaug
This patch adds fetchpriority support for the `<img>` element, also
exposing the corresponding attribute in the WebIDL. As in D197493, we
try and minimize the change and rely on a mapping configurable under a
preference to ease future experiments. We use initial mapping
PRIORITY_LOW/PRIORITY_HIGH/PRIORITY_LOW for fetchpriority=low/high/auto
and allow further adjustments in the image code.

Internal fetchpriority mapping is covered by the following tests:
- `image-initial-load.h2.html` (typos fixed here)
- `image-dynamic-load.h2.html`

DOM tests are covered by the following tests (pref enabled to make them
pass):
- `idlharness.https.html`
- `attr-img-fetchpriority.html`

Differential Revision: https://phabricator.services.mozilla.com/D202222
2024-02-27 18:49:08 +00:00
Frédéric Wang b005b82248 Bug 1872657 - Add fetchpriority support for `<link rel=preload as=image>`. r=valentin,smaug,manuel
This patch adds fetchpriority support for `<link rel=preload as=image>`
and equivalent HTTP Link header. The fetchpriority value is passed from
where the link is parsed down to `NewImageChannel` where the priority
is initially set. Currently, the default equals PRIORITY_LOW, but is
decreased a bit if LOAD_BACKGROUND flag is set (this is always the case
for link preload images, see `imgLoader::LoadImage`). Later, the
priority can be increased again depending on the category (see
`imgRequest::BoostPriority`).

In order to minimize the changes, the new calculation is to keep the
initial setting to PRIORITY_LOW, adjust it using a new
`network.fetchpriority.adjustments.*` preference depending on the
fetchpriority attributes, and then preserve further adjustments for
LOAD_BACKGROUND and `BoostPriority`.

For the default value `fetchpriority=auto`, there is no adjustment
i.e. we continue to start with PRIORITY_LOW. `fetchpriority=low/high`
are respectively mapped to PRIORITY_LOW/PRIORITY_HIGH which is simple
and consistent with the "Image" cases from Google's web.dev article
https://web.dev/articles/fetch-priority. These values could of course
be revised in the future after more experiments.

This change is covered by the following tests below. The expectations
is modified to match what is described above (i.e. map to PRIORITY_LOW
or PRIORITY_HIGH with adjustment due to LOAD_BACKGROUND):
- `link-initial-preload-image.h2.html`
- `link-dynamic-preload-image.h2.html`
- `kPipeHeaderPreloadImageLinks`

Based on a patch by Mirko Brodesser (mbrodesser@igalia.com)

Differential Revision: https://phabricator.services.mozilla.com/D197493
2024-02-27 06:33:48 +00:00
Stanca Serban b54de79827 Backed out changeset 621c8480cd35 (bug 1872657) for causing FetchPriority related bp-nu bustages in IconLoader.cpp. CLOSED TREE 2024-02-26 18:15:18 +02:00
Frédéric Wang c7734232ca Bug 1872657 - Add fetchpriority support for `<link rel=preload as=image>`. r=valentin,smaug,manuel
This patch adds fetchpriority support for `<link rel=preload as=image>`
and equivalent HTTP Link header. The fetchpriority value is passed from
where the link is parsed down to `NewImageChannel` where the priority
is initially set. Currently, the default equals PRIORITY_LOW, but is
decreased a bit if LOAD_BACKGROUND flag is set (this is always the case
for link preload images, see `imgLoader::LoadImage`). Later, the
priority can be increased again depending on the category (see
`imgRequest::BoostPriority`).

In order to minimize the changes, the new calculation is to keep the
initial setting to PRIORITY_LOW, adjust it using a new
`network.fetchpriority.adjustments.*` preference depending on the
fetchpriority attributes, and then preserve further adjustments for
LOAD_BACKGROUND and `BoostPriority`.

For the default value `fetchpriority=auto`, there is no adjustment
i.e. we continue to start with PRIORITY_LOW. `fetchpriority=low/high`
are respectively mapped to PRIORITY_LOW/PRIORITY_HIGH which is simple
and consistent with the "Image" cases from Google's web.dev article
https://web.dev/articles/fetch-priority. These values could of course
be revised in the future after more experiments.

This change is covered by the following tests below. The expectations
is modified to match what is described above (i.e. map to PRIORITY_LOW
or PRIORITY_HIGH with adjustment due to LOAD_BACKGROUND):
- `link-initial-preload-image.h2.html`
- `link-dynamic-preload-image.h2.html`
- `kPipeHeaderPreloadImageLinks`

Based on a patch by Mirko Brodesser (mbrodesser@igalia.com)

Differential Revision: https://phabricator.services.mozilla.com/D197493
2024-02-26 15:03:58 +00:00
Robert Longson bec18b6f3a Bug 1880046 - Process module, async and defer for SVG script elements in the parser r=fredw,smaug
Differential Revision: https://phabricator.services.mozilla.com/D201730
2024-02-21 14:16:39 +00:00
Tom Schuster 4b2ca116dd Bug 1871112 - Specialize AddAttributes for <html>/<body>. r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D201562
2024-02-14 12:55:42 +00:00
Tom Schuster e56053abff Bug 1397308 - Implement CSP 'Is element nonceable?' check. r=emilio,hsivonen,freddyb
Differential Revision: https://phabricator.services.mozilla.com/D198150
2024-01-26 14:56:32 +00:00
Adam Vandolder ce7651d03a Bug 1870055 - Log error in attaching declarative shadow DOM to console. r=dom-core,jjaschke
Differential Revision: https://phabricator.services.mozilla.com/D198598
2024-01-23 23:21:10 +00:00
Adam Vandolder 73d810dd2e Bug 1712140 - Part 3: Add support for parsing and building Declarative ShadowDOMs. r=dom-core,webidl,saschanaz,hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D193675
2023-12-07 21:27:10 +00:00
Adam Vandolder 23775aed9b Bug 1712140 - Part 1: Add Declarative ShadowDOM template attributes to parser. r=dom-core,emilio,hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D193673
2023-12-07 21:27:09 +00:00
Iulian Moraru ec88b58413 Backed out 6 changesets (bug 1712140) for causing sanitizer failures on nsHtml5TreeBuilder.cpp. CLOSED TREE
Backed out changeset b374469160e9 (bug 1712140)
Backed out changeset dfc44cccff32 (bug 1712140)
Backed out changeset 3a35e1401130 (bug 1712140)
Backed out changeset a93481858c38 (bug 1712140)
Backed out changeset a861fd445f56 (bug 1712140)
Backed out changeset dc1dc389f2dc (bug 1712140)
2023-12-07 08:16:23 +02:00
Adam Vandolder b1b5653ef5 Bug 1712140 - Part 3: Add support for parsing and building Declarative ShadowDOMs. r=dom-core,webidl,saschanaz,hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D193675
2023-12-06 22:50:49 +00:00
Adam Vandolder df73a82637 Bug 1712140 - Part 1: Add Declarative ShadowDOM template attributes to parser. r=dom-core,emilio,hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D193673
2023-12-06 22:50:48 +00:00
Stanca Serban 88e5c5662f Backed out 6 changesets (bug 1712140) for causing Linux related wpt failures in nsHtml5TreeBuilder.cpp. CLOSED TREE
Backed out changeset 3d799b386f3e (bug 1712140)
Backed out changeset 2ed53d545d6d (bug 1712140)
Backed out changeset 6f50077df42a (bug 1712140)
Backed out changeset e7c5449482f9 (bug 1712140)
Backed out changeset 5490dad148ef (bug 1712140)
Backed out changeset 50828058065e (bug 1712140)
2023-12-06 00:18:38 +02:00
Adam Vandolder 65c76f62c7 Bug 1712140 - Part 3: Add support for parsing and building Declarative ShadowDOMs. r=dom-core,webidl,saschanaz,hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D193675
2023-12-05 18:18:16 +00:00
Adam Vandolder 4d8797b909 Bug 1712140 - Part 1: Add Declarative ShadowDOM template attributes to parser. r=dom-core,emilio,hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D193673
2023-12-05 18:18:15 +00:00
Iulian Moraru 9dc5faecc0 Backed out 6 changesets (bug 1712140) for causing wpt failures on declarative-shadow-dom-opt-in.html.
Backed out changeset 78e3a33470ae (bug 1712140)
Backed out changeset 8601fce480ef (bug 1712140)
Backed out changeset 4d2749962c5f (bug 1712140)
Backed out changeset b65511d17150 (bug 1712140)
Backed out changeset 8ae1f766f1f9 (bug 1712140)
Backed out changeset 4ffe7a6ad366 (bug 1712140)
2023-12-04 22:30:04 +02:00
Adam Vandolder 63033795ab Bug 1712140 - Part 3: Add support for parsing and building Declarative ShadowDOMs. r=dom-core,webidl,saschanaz,hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D193675
2023-12-04 17:35:49 +00:00
Adam Vandolder a393b958d0 Bug 1712140 - Part 1: Add Declarative ShadowDOM template attributes to parser. r=dom-core,emilio,hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D193673
2023-12-04 17:35:48 +00:00
Stanca Serban c69cbb70a3 Backed out 6 changesets (bug 1712140) for causing wpt failures in declarative-shadow-dom-opt-in.html.
Backed out changeset 554a46ed8046 (bug 1712140)
Backed out changeset 14ebbfca2e84 (bug 1712140)
Backed out changeset 98dd5766dd46 (bug 1712140)
Backed out changeset 4241a7241a9b (bug 1712140)
Backed out changeset 59ee434d503e (bug 1712140)
Backed out changeset ff3bb42f91d1 (bug 1712140)
2023-12-01 03:26:27 +02:00
Adam Vandolder 8c1befaa95 Bug 1712140 - Part 3: Add support for parsing and building Declarative ShadowDOMs. r=dom-core,webidl,saschanaz,hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D193675
2023-11-30 23:17:15 +00:00