Commit Graph

6707 Commits

Author SHA1 Message Date
Gregory Pappas
f6f0d40361 Bug 1849674 - Remove dom.shadowdom.slot.assign.enabled pref r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D186675
2023-08-23 02:16:48 +00:00
Masayuki Nakano
72629d2e0c Bug 1848196 - Make the default tab index of <embed> which loaded a document to 0 r=NeilDeakin,dom-core,farre
Like `<object>`, `<embed>` can load another document.  However,
`HTMLEmbedElement` does not override `Element::TabIndexDefault()` and that
causes `HTMLEmbedElement::IsHTMLFocusable()` set the tab index to `-1` so
it's skipped during the tab navigation.

Differential Revision: https://phabricator.services.mozilla.com/D186287
2023-08-22 00:58:33 +00:00
Ziran Sun
e4af459857 Bug 1841270 - refine focus handling in HidePopover. r=emilio
Only run focusing steps for previouslyFocusedElement if focus is within the
popover hierarchy.

Differential Revision: https://phabricator.services.mozilla.com/D186439
2023-08-21 07:06:13 +00:00
Olli Pettay
fe6ec03ab9 Bug 1843473 - Don't dispatch DOMActivate if there are no listeners for it, r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D186473
2023-08-18 06:01:16 +00:00
Emilio Cobos Álvarez
e7d269c437 Bug 1848455 - Don't re-enable updates prematurely in HTMLStyleElement::SetTextContentInternal. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D186110
2023-08-14 14:07:40 +00:00
renevietnam29@gmail.com
c0f7841e56 Bug 1842987 Remove dom.forms.enterkeyhint r=emilio,geckoview-reviewers,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D184620
2023-08-14 13:52:35 +00:00
Emilio Cobos Álvarez
ea11c5c0b4 Bug 1847811 - Remove network.preload pref. r=necko-reviewers,anti-tracking-reviewers,pbz,kershaw
Having it disabled is not web compatible, and there's no strong reason
to keep it, IMO.

If we want another pref to determine whether preloads are actually
triggered we can add it in the future.

Differential Revision: https://phabricator.services.mozilla.com/D186014
2023-08-14 10:46:03 +00:00
Logan Rosen
ee75c733c7 Bug 1091187 - remove unused arguments and check from UpdateCommands r=dom-core,webidl,masayuki,smaug
Differential Revision: https://phabricator.services.mozilla.com/D185385
2023-08-10 04:09:08 +00:00
Cosmin Sabou
c406bcf318 Backed out 5 changesets (bug 1839316) for causing bustages on ScriptLoader.cpp. CLOSED TREE
Backed out changeset 85f107e082ee (bug 1839316)
Backed out changeset 8c1e22518c3a (bug 1839316)
Backed out changeset a4c3dec0f34c (bug 1839316)
Backed out changeset 313ff15742dd (bug 1839316)
Backed out changeset fa200e26bbb1 (bug 1839316)
2023-08-09 20:16:06 +03:00
Mirko Brodesser
5cade38f47 Bug 1839316: part 4) Add RequestPriority to ScriptFetchOptions and ScriptLoadRequest. r=smaug
The request priority isn't propagated from `ScriptFetchOptions`, so
setting it has no effect for end-users. That will be implemented in a
following part.

Differential Revision: https://phabricator.services.mozilla.com/D183483
2023-08-09 13:50:28 +00:00
Mirko Brodesser
9671332492 Bug 1839316: part 2) Implement getting and setting "fetchpriority" content attribute of <script> element. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D181752
2023-08-09 13:50:28 +00:00
Mirko Brodesser
9ba14c0f7e Bug 1839316: part 1) Add fetchPriority idl attribute to HTMLScriptElement's interface. r=webidl,smaug
For context about the `CEReactions` extended attribute see
<https://bugzilla.mozilla.org/show_bug.cgi?id=1839316#c4>.

Differential Revision: https://phabricator.services.mozilla.com/D181751
2023-08-09 13:50:27 +00:00
Thomas Wisniewski
c2ef40afe0 Bug 1397646 - return empty statusText for HTTP2 fetches and XMLHttpRequests; r=kershaw,necko-reviewers,sunil
Differential Revision: https://phabricator.services.mozilla.com/D184527
2023-08-08 19:47:39 +00:00
Emilio Cobos Álvarez
94de7e9ddf Bug 1847546 - Don't do duplicate work on style elements from the innerHTML setter. r=smaug
Right now, when binding to the tree we queue a runnable to update the
stylesheet, even though mEnableUpdates is false.

Even though the redundant update is nowadays always cached, it's just
wasted work, and the code is simpler without it.

This will be tested by bug 1771113, which is what made me look at this.

We need to tweak a bit the dispatch of applicable state change events
for DevTools, because for a case like:

  div.attachShadow({ mode: "open" }).innerHTML = `<style>...</style>`;

Before we'd go through the stylesheet cache here due to the redundant
update:

  https://searchfox.org/mozilla-central/rev/fb43eb3bdf5b51000bc7dfe3474cbe56ca2ab63c/layout/style/SharedStyleSheetCache.cpp#161-165

But now we won't, and the code in StyleSheet.cpp wasn't quite correct /
didn't dispatch the event.

Nobody listens to style-sheet-applicable-state-changed, so remove that
code while at it.

Differential Revision: https://phabricator.services.mozilla.com/D185559
2023-08-07 20:21:34 +00:00
Cosmin Sabou
0058dbdd1c Backed out 5 changesets (bug 1839316) for causing leaks. CLOSED TREE
Backed out changeset 75edff380fee (bug 1839316)
Backed out changeset 6a622fd5cd91 (bug 1839316)
Backed out changeset 60908cc7c586 (bug 1839316)
Backed out changeset 7b9dd8875a9e (bug 1839316)
Backed out changeset b586915187c2 (bug 1839316)
2023-08-07 16:43:03 +03:00
Mirko Brodesser
5d091f10d0 Bug 1839316: part 4) Add RequestPriority to ScriptFetchOptions and ScriptLoadRequest. r=smaug
The request priority isn't propagated from `ScriptFetchOptions`, so
setting it has no effect for end-users. That will be implemented in a
following part.

Differential Revision: https://phabricator.services.mozilla.com/D183483
2023-08-07 11:46:19 +00:00
Mirko Brodesser
b02cbc9c37 Bug 1839316: part 2) Implement getting and setting "fetchpriority" content attribute of <script> element. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D181752
2023-08-07 11:46:18 +00:00
Mirko Brodesser
2e8b18a468 Bug 1839316: part 1) Add fetchPriority idl attribute to HTMLScriptElement's interface. r=webidl,smaug
For context about the `CEReactions` extended attribute see
<https://bugzilla.mozilla.org/show_bug.cgi?id=1839316#c4>.

Differential Revision: https://phabricator.services.mozilla.com/D181751
2023-08-07 11:46:17 +00:00
Iulian Moraru
3b2efb9273 Backed out changeset 675cf3cb3d33 (bug 1397646) for causing mochitest failures on test_fetch_basic_http.html. CLOSED TREE 2023-08-07 07:46:50 +03:00
Thomas Wisniewski
ae64997bee Bug 1397646 - return empty statusText for HTTP2 fetches and XMLHttpRequests; r=kershaw,necko-reviewers,sunil
Differential Revision: https://phabricator.services.mozilla.com/D184527
2023-08-07 04:00:31 +00:00
Masayuki Nakano
0f39d7eda7 Bug 1266437 - Drop "OS" modifier r=smaug,m_kato,karlt,Gijs
On Windows, Windows logo key was mapped to "OS" modifier, and on Linux,
it's same and the key is called "Super" and "Hyper".  That conformed to the
older UI Events spec.

However, UI Events declares that they should be mapped to "Meta" now and Chrome
handles it as the spec in Windows and Linux.  Therefore, we should align the
behavior to them.

Note that we've treated the legacy "Meta" modifier on Linux as DOM "Meta"
modifier state, and we'll keep this as-is because in Sun/Solaris keyboard
layout, they keys are mapped to the legacy "Meta".

Finally, the following check only `IsMeta()` but not `IsOS()`.  I think that
they should've checked `IsOS()` too.  Therefore, they will behave differently
in Windows and Linux.
* https://searchfox.org/mozilla-central/rev/9a4666e63199bd1bcfc9095f6efec3488c358458/dom/base/Element.cpp#3287-3288
* https://searchfox.org/mozilla-central/rev/9a4666e63199bd1bcfc9095f6efec3488c358458/dom/html/HTMLInputElement.cpp#3762-3764
* https://searchfox.org/mozilla-central/rev/9a4666e63199bd1bcfc9095f6efec3488c358458/dom/html/HTMLInputElement.cpp#3796-3806
* https://searchfox.org/mozilla-central/rev/9a4666e63199bd1bcfc9095f6efec3488c358458/dom/html/HTMLLabelElement.cpp#127-128
* https://searchfox.org/mozilla-central/rev/9a4666e63199bd1bcfc9095f6efec3488c358458/widget/gtk/nsGtkKeyUtils.cpp#1461-1462

Note that `KEY_NAME_INDEX_OS` will be removed in the patch for bug 1232918.

Differential Revision: https://phabricator.services.mozilla.com/D183480
2023-08-07 01:03:58 +00:00
Cristian Tuns
f5572b469f Backed out 2 changesets (bug 1266437, bug 1232918) for causing mochitest failures in test_autoplay_policy_key_blacklist.html CLOSED TREE
Backed out changeset 33e3c6593d4b (bug 1232918)
Backed out changeset 1b56e99dd221 (bug 1266437)
2023-08-03 23:29:52 -04:00
Masayuki Nakano
0664d98bce Bug 1266437 - Drop "OS" modifier r=smaug,m_kato,karlt,Gijs
On Windows, Windows logo key was mapped to "OS" modifier, and on Linux,
it's same and the key is called "Super" and "Hyper".  That conformed to the
older UI Events spec.

However, UI Events declares that they should be mapped to "Meta" now and Chrome
handles it as the spec in Windows and Linux.  Therefore, we should align the
behavior to them.

Note that we've treated the legacy "Meta" modifier on Linux as DOM "Meta"
modifier state, and we'll keep this as-is because in Sun/Solaris keyboard
layout, they keys are mapped to the legacy "Meta".

Finally, the following check only `IsMeta()` but not `IsOS()`.  I think that
they should've checked `IsOS()` too.  Therefore, they will behave differently
in Windows and Linux.
* https://searchfox.org/mozilla-central/rev/9a4666e63199bd1bcfc9095f6efec3488c358458/dom/base/Element.cpp#3287-3288
* https://searchfox.org/mozilla-central/rev/9a4666e63199bd1bcfc9095f6efec3488c358458/dom/html/HTMLInputElement.cpp#3762-3764
* https://searchfox.org/mozilla-central/rev/9a4666e63199bd1bcfc9095f6efec3488c358458/dom/html/HTMLInputElement.cpp#3796-3806
* https://searchfox.org/mozilla-central/rev/9a4666e63199bd1bcfc9095f6efec3488c358458/dom/html/HTMLLabelElement.cpp#127-128
* https://searchfox.org/mozilla-central/rev/9a4666e63199bd1bcfc9095f6efec3488c358458/widget/gtk/nsGtkKeyUtils.cpp#1461-1462

Note that `KEY_NAME_INDEX_OS` will be removed in the patch for bug 1232918.

Differential Revision: https://phabricator.services.mozilla.com/D183480
2023-08-04 00:10:11 +00:00
avandolder
43c242a1b6 Bug 1837540 - Make radio button group navigation follow tree-order. r=sefeng,smaug
Differential Revision: https://phabricator.services.mozilla.com/D183426
2023-08-03 01:52:19 +00:00
Narcis Beleuzu
53cd71602f Backed out changeset 013278adabc7 (bug 1837540) for build bustages on mochitest.ini . CLOSED TREE 2023-08-03 02:25:53 +03:00
avandolder
eff3063bb2 Bug 1837540 - Make radio button group navigation follow tree-order. r=sefeng,smaug
Differential Revision: https://phabricator.services.mozilla.com/D183426
2023-08-02 23:04:07 +00:00
Peter Van der Beken
3f4ffadbe1 Bug 1846277 - Untangle nsGlobalWindow*.h includes. r=dom-core,media-playback-reviewers,sessionstore-reviewers,padenot,farre
Differential Revision: https://phabricator.services.mozilla.com/D184978
2023-08-02 20:41:49 +00:00
Peter Van der Beken
9fba1d5220 Bug 1846277 - Remove nsGlobalWindow.h. r=dom-core,necko-reviewers,jesup,farre
Differential Revision: https://phabricator.services.mozilla.com/D184973
2023-08-02 20:41:48 +00:00
Sean Feng
0a3d5faf4b Bug 1811129 - Implement the new dialog initial focus algorithm r=emilio
The main changes of the new algorithm are

* Make the dialog focusing steps look at sequentially focusable elements instead of any focusable element.
* Make the dialog element itself get focus if it has the autofocus attribute set.
* Make the dialog element itself get focus as a fallback instead of focus being "reset" to the body element.

Spec PR (merged): https://github.com/whatwg/html/pull/8199

Differential Revision: https://phabricator.services.mozilla.com/D181263
2023-08-02 13:35:47 +00:00
Peter Van der Beken
dfce7f40b3 Bug 1843968 - Hold some strong references. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D184803
2023-08-01 12:09:36 +00:00
Emilio Cobos Álvarez
354ee3728d Bug 1846141 - Turn browser.zoom.siteSpecific into an static pref. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D184922
2023-08-01 00:14:36 +00:00
Olli Pettay
de706ffb77 Bug 1844752, initialize nsNodeInfoManager::mPrincipal with the correct principal when available, r=dom-core,emilio,peterv
Differential Revision: https://phabricator.services.mozilla.com/D184219
2023-07-31 23:44:15 +00:00
Noemi Erli
6e554b6268 Backed out changeset 3eba249fac11 (bug 1845441) for causing build bustages in Decimal.h 2023-07-27 18:08:11 +03:00
serge-sans-paille
f65ac86b62 Bug 1845441 - get rid of global constructors in dom/html/HTMLInputElement.cpp r=mstange,dom-core,mccr8
This requires to make Decimal constructor constexpr.

Differential Revision: https://phabricator.services.mozilla.com/D184552
2023-07-27 11:40:18 +00:00
Emilio Cobos Álvarez
7bf3b0e527 Bug 1844195 - Avoid duplicating rust and C++ display definitions. r=layout-reviewers,jfkthame
We need to inline Self::new() so cbindgen generates the constants, which
is kinda lame, but seems better than duplicating the values and type
definitions.

Differential Revision: https://phabricator.services.mozilla.com/D183921
2023-07-26 06:46:32 +00:00
Iulian Moraru
0c0945174b Backed out changeset f3394bd0f554 (bug 1844195) for causing conflicts with another backout. 2023-07-26 04:00:57 +03:00
Emilio Cobos Álvarez
e56bda6fd8 Bug 1844195 - Avoid duplicating rust and C++ display definitions. r=layout-reviewers,jfkthame
We need to inline Self::new() so cbindgen generates the constants, which
is kinda lame, but seems better than duplicating the values and type
definitions.

Differential Revision: https://phabricator.services.mozilla.com/D183921
2023-07-25 21:14:39 +00:00
Iulian Moraru
da43d00caa Backed out changeset 3a3f2d5937c4 (bug 1844195) for causing mass failures. CLOSED TREE 2023-07-25 23:07:30 +03:00
Emilio Cobos Álvarez
c70814ab25 Bug 1844195 - Avoid duplicating rust and C++ display definitions. r=layout-reviewers,jfkthame
We need to inline Self::new() so cbindgen generates the constants, which
is kinda lame, but seems better than duplicating the values and type
definitions.

Differential Revision: https://phabricator.services.mozilla.com/D183921
2023-07-25 18:40:30 +00:00
Emilio Cobos Álvarez
a9651d992e Bug 1844432 - Cache parsed src attribute URI. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D184266
2023-07-24 10:07:49 +00:00
Vincent Hilla
6bb941a5ab Bug 1841801 - Make dirname apply to hidden, tel, url, email. r=dom-core,edgar
Differential Revision: https://phabricator.services.mozilla.com/D183114
2023-07-24 09:44:20 +00:00
Andrew Osmond
94fef446bd Bug 1837070 - Ensure we flush OffscreenCanvas when the display list is recreated. r=lsalzman
When we recreate the display list, e.g. after tabbing away, we need to
ensure we flush the OffscreenCanvas because our resource handles will be
invalidated. This requires the OffscreenCanvasDisplayHelper to know
which OffscreenCanvas it belongs to, and a worker reference if necessary
to do the dispatching for the flush. Otherwise we would require the
canvas to be updated manually by the web application to repaint.

Differential Revision: https://phabricator.services.mozilla.com/D184324
2023-07-23 20:42:41 +00:00
Emilio Cobos Álvarez
69189eb6cc Bug 1844432 - Cleanups to HTMLImageElement. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D184265
2023-07-21 22:27:41 +00:00
Gregory Pappas
1b2e2757ff Bug 1844493 - Remove dom.moduleScripts.enabled pref r=smaug,jonco
Differential Revision: https://phabricator.services.mozilla.com/D184072
2023-07-20 10:03:46 +00:00
avandolder
db8bc6b1c5 Bug 1839572 - Fix number input value sanitization. r=dom-core,edgar
Differential Revision: https://phabricator.services.mozilla.com/D183055
2023-07-19 14:57:11 +00:00
Tooru Fujisawa
7d51c0aead Bug 1843795 - Part 2: Rewrite netwerk/test/httpserver/httpd.sys.mjs consumers in html/xhtml to use ChromeUtils.importESModule. r=necko-reviewers,kershaw
Depends on D183691

Differential Revision: https://phabricator.services.mozilla.com/D183692
2023-07-19 12:06:17 +00:00
Tooru Fujisawa
58214f4c37 Bug 1843795 - Part 1: Rewrite netwerk/base/NetUtil.sys.mjs consumers in html/xhtml to use ChromeUtils.importESModule. r=necko-reviewers,credential-management-reviewers,devtools-reviewers,sgalich,kershaw
Depends on D183690

Differential Revision: https://phabricator.services.mozilla.com/D183691
2023-07-19 12:06:16 +00:00
Cassio Neri
59ec0f0bfa Bug 1828326 - Tenfold performance improvement of date calculations. r=anba,emilio,smaug
The original implementations contain unnecessary branches and operate on
double values. The new implementations, based on [1], are branch free on
x86_64 and mostly use integer arithmetic.

All tests pass and, in addition, [2] contains an exhaustive test that checks
all required dates, that is, in [-8.64e15 / msPerDay, 8.64e15 / msPerDay]
(as per ES5 15.9.1.1).

[1] Neri C, Schneider L., "Euclidean affine functions and their
application to calendar algorithms."
Softw Pract Exper. 2023;53(4):937-970. doi: 10.1002/spe.3172
https://onlinelibrary.wiley.com/doi/full/10.1002/spe.3172

[2] https://godbolt.org/z/oPvxzY6vx

Differential Revision: https://phabricator.services.mozilla.com/D175569
2023-07-19 09:45:16 +00:00
Natalia Csoregi
62728fe34c Backed out changeset b387df97a255 (bug 392994) for causing failures on test_interactive_content_in_label.html. CLOSED TREE 2023-07-19 09:19:56 +03:00
Jonathan Kingston
1018b9b1fe Bug 392994 - Remove support for usemap for Object and Input elements. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D182684
2023-07-19 05:22:06 +00:00