Same rg + sed shenanigans as the first patch.
There were two that could fail, both due to OOM:
* HTMLInputElement::AfterSetAttr: If we fail (only in the type=range
case) we end up with an old value without it being clamped by
min/max/step.
* HTMLBodyElement::AfterSetAttr: If we fail we won't peek up the
DocShell's frame margins and styling could be incorrect.
That seems better than having to deal with broken states after we've
already set the attribute.
Depends on D176069
Differential Revision: https://phabricator.services.mozilla.com/D176070
rg BeforeSetAttr -l | xargs sed -i 's/nsresult BeforeSetAttr/void BeforeSetAttr/g'
rg ::BeforeSetAttr -l | xargs sed -i 's/nsresult \(.*\)::BeforeSetAttr/void \1::BeforeSetAttr/g'
Plus trivial fixes, plus clang-format.
The only meaningful changes are in nsXULElement::BeforeSetAttr. Two
things could fail:
chromemargin: I removed it because we don't use the parsed attribute any
other place than here:
https://searchfox.org/mozilla-central/rev/31f5847a4494b3646edabbdd7ea39cb88509afe2/dom/xul/ChromeObserver.cpp#136
And that deals just fine with it not being parsed.
usercontextid: We have a debug assertion that we don't dynamically change it.
I kept it but I don't think it's worth failing to set the attribute on release for that
Differential Revision: https://phabricator.services.mozilla.com/D176069
Automatic update from web-platform-tests
[Permissions Policy] Switch to CSP Parser
This is mostly plug and play, and many of the restrictions can be lifted
in future if we expand the wildcard types supported here. The changes in
the CSP code are just to move the function into exportable namespace.
The test changes are mostly to evaluate new cases and to prevent domains
like *.example.com from being parsed as %2A.example.com because that's
not real or helpful anyway. The changes here have no impact on
permissions for valid targets that we were already parsing.
Bug: 1418009
Change-Id: I5031adecbe33decce720bb44f78e70d555e2e450
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4436090
Reviewed-by: Ian Clelland <iclelland@chromium.org>
Auto-Submit: Ari Chivukula <arichiv@chromium.org>
Reviewed-by: Daniel Murphy <dmurph@chromium.org>
Code-Coverage: Findit <findit-for-me@appspot.gserviceaccount.com>
Commit-Queue: Daniel Murphy <dmurph@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1132524}
--
wpt-commits: b8715c02c8eaa876f35c6673bc81f5f9f533b9cc
wpt-pr: 39597
Automatic update from web-platform-tests
CIS: Change the parsing test to test against computed value.
This patch changes the "reference" box to use the computed value of
width, instead of the used value.
From: https://drafts.csswg.org/cssom/#resolved-value-special-case-property-like-height
```
If the property applies to the element or pseudo-element and the resolved value
of the display property is not none or contents, then the resolved value is the
used value. Otherwise the resolved value is the computed value.
```
Since we're testing the computed value of contain-intrinsic-size, we
should compare it against a computed value of width in the reference.
R=futhark@chromium.org
Change-Id: I9dc3376ca6c3c41ab835251e29ec639a7c1336cd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4442948
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Commit-Queue: Vladimir Levin <vmpstr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1132453}
--
wpt-commits: 800b05fe733efac9631a3ac859720be525f2dfb6
wpt-pr: 39600
Automatic update from web-platform-tests
Update text in content-visibility animation test
In a patch yesterday I changed this test because I made
content-visibility animatable, but I neglected to change all of the text
from "not animatable" to "animatable"
Change-Id: I015b118b29cb8f6c58ee5bbab5b626d18c64543c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4443369
Commit-Queue: Vladimir Levin <vmpstr@chromium.org>
Auto-Submit: Joey Arhar <jarhar@chromium.org>
Reviewed-by: Vladimir Levin <vmpstr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1132452}
--
wpt-commits: 56e2cd66797995b846cff256c169eb80731190a6
wpt-pr: 39601
Automatic update from web-platform-tests
[webnn] Update comments for WebNN concat op and reshape op (#39538)
* [webnn] Update comment for WebNN concat op
* [webnn] Update comment for WebNN reshape op
--
wpt-commits: 4e37fa4d56f2bbf051a816142e5ab8595b3cd864
wpt-pr: 39538
Automatic update from web-platform-tests
Add checks for popovers moving between documents
Without these checks, we can get into very bad state that can crash the
renderer. This was raised here:
https://github.com/whatwg/html/issues/9177
Change-Id: I3cda0143c76f62709af8593182b4c3a4f8849fd7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4443007
Reviewed-by: Mason Freed <masonf@chromium.org>
Code-Coverage: Findit <findit-for-me@appspot.gserviceaccount.com>
Commit-Queue: Joey Arhar <jarhar@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1132191}
--
wpt-commits: 0a40de7a4db9e52cdb0fc436173640756740c9e3
wpt-pr: 39599
Practically speaking, this doesn't make a huge difference, because
libmozglue contains operator new/operator delete overrides. This will
enable inlining opportunities, though.
It is worth noting that there's equivalent code in
js/src/old-configure.in but it's left as is because it is actually no-op
at the moment. This will be fixed in bug 1829049.
The check for __EXCEPTIONS is replaced with __cpp_exceptions because the
former is defined for any type of exception, including ObjC exceptions,
while the latter is defined for C++ exceptions only.
Differential Revision: https://phabricator.services.mozilla.com/D175976
This patch introduces multiple thresholds, depending on platform and color, as
the colors rendered to screen are captured in the display rgb color profile on
Mac and therefore can be significantly off. See bug 1827606 for always capturing
in sRGB.
Differential Revision: https://phabricator.services.mozilla.com/D174754
White is less susceptible to false positives than grey with a high threshold,
given that all its components are at an extreme (255 vs 128).
Differential Revision: https://phabricator.services.mozilla.com/D174753
This adds a card to the about:welcome defaults that embeds the new Migration Wizard
if browser.migrate.content-modal.about-welcome-behavior is set to "embedded".
This requires adding a useEmbeddedMigrationWizard targeting attribute to
ASRouterTargeting.
Differential Revision: https://phabricator.services.mozilla.com/D175945
This is so that the contents of the Migration Wizard don't get automatically
centered if its embedding context is centering things.
This change also makes it so that embedders can customize some of the rules of how
buttons are laid out.
Differential Revision: https://phabricator.services.mozilla.com/D171771
@jimb expressed concern that a collapsed group of compilation messages for WebGPU shaders in the JS console isn't easy enough to discern from scanning a console log manually. We can't associate a log level with the group itself (which would let us paint the group with color for contrast), unfortunately. So, we decided to have a "sentinel" message right before groups that uses the highest "severity" of message in the entire set of compilation messages.
Differential Revision: https://phabricator.services.mozilla.com/D175404
Time to finally add some (barebones) diagnostics! When a user calls [`GPUDevice.createShaderModule`], if there are any messages returned:
1. Create a collapsed console group. Use a generic title for the console group (for now).
1. Inside the console group, print containing a log entry per message with a JS log level according to the message severity.
Differential Revision: https://phabricator.services.mozilla.com/D175303
After landing bug 1673068, `LoadURIDelegate.jsm` isn't used until error page
is shown. This should move to lazy and convert to ES system module.
Differential Revision: https://phabricator.services.mozilla.com/D175661
Due to design constraints, it is difficult for osclientcerts to properly
indicate whether or not each known key supports RSA-PSS. Ideally such a
determination would be made close to when a particular key is going to be used,
but due to the design of PKCS#11 and NSS' tight coupling to it, osclientcerts
would have to make this determination when searching for all known keys, which
has been shown to be prohibitively slow on Windows and results in unexpected
dialogs on macOS.
Thus, previously osclientcerts simply assumed all RSA keys supported RSA-PSS.
This has resulted in handshake failures when a server indicates that it accepts
RSA-PSS signatures.
This patch instead makes RSA-PSS support configurable via a pref
(security.osclientcerts.assume_rsa_pss_support). If the pref is true,
osclientcerts assumes all RSA keys support RSA-PSS. If it is false, it assumes
no RSA keys support RSA-PSS.
Differential Revision: https://phabricator.services.mozilla.com/D175966
ShouldAssert is always yes since I removed the native anonymous child
list thing, so we can just assert always.
The remaining customization is only about whether we should notify
the pres shell before or after the rest of the observer (we only need to
notify before for removals).
We only need one notifier thingie, since pres shell is an
nsIMutationObserver.
Differential Revision: https://phabricator.services.mozilla.com/D176077