fix: reconcile native bindings and paint metadata after rebase

This commit is contained in:
ldm0
2026-11-21 20:03:33 +08:00
parent c0a67bd510
commit 5c4a2239d6
2 changed files with 1 additions and 44 deletions
@@ -14,7 +14,6 @@ enum RealmDependentFinalizer {
DocumentRealmBindings,
NodeMixinUnscopables,
GlobalEventHandlersSecureContextSurface,
NavigatorCredentialsSecureContextSurface,
CryptoSecureContextSurface,
BaseAudioContextSecureContextSurface,
NavigatorSecureContextSurface,
@@ -44,10 +43,6 @@ const REALM_DEPENDENT_FINALIZER_ALLOWLIST: &[(&str, RealmDependentFinalizer)] =
),
// These entries install private realm state, context-conditional surface,
// or constructor data whose JavaScript identity must be realm-local.
(
"Navigator",
RealmDependentFinalizer::NavigatorCredentialsSecureContextSurface,
),
(
"BaseAudioContext",
RealmDependentFinalizer::BaseAudioContextSecureContextSurface,
@@ -130,15 +125,13 @@ pub(super) fn finalize_materialized_interface<'s>(
RealmDependentFinalizer::BaseAudioContextSecureContextSurface => {
finalize_base_audio_context_realm_bindings(scope, prototype)
}
RealmDependentFinalizer::NavigatorCredentialsSecureContextSurface => {
finalize_navigator_credentials_realm_bindings(scope, prototype)
}
RealmDependentFinalizer::GlobalEventHandlersSecureContextSurface => {
crate::context_bootstrap::window_events::finalize_secure_global_event_handler_realm_bindings(
scope, prototype,
)
}
RealmDependentFinalizer::NavigatorSecureContextSurface => {
finalize_navigator_credentials_realm_bindings(scope, prototype)?;
crate::context_bootstrap::navigator_runtime::finalize_navigator_realm_bindings(
scope, prototype,
)
@@ -210,7 +203,6 @@ mod tests {
"Element",
"DocumentType",
"CharacterData",
"Navigator",
"BaseAudioContext",
"Navigator",
"HTMLMediaElement",
@@ -156,38 +156,3 @@ fn svg_distance_queries_use_webidl_float_conversion() {
"[]"
);
}
#[test]
fn svg_geometric_fill_uses_the_cascade_and_ignores_visual_paint() {
let mut vm = new_storage_page_task_executor_test_vm("https://svg-geometric-fill.test/");
assert_eq!(
vm.eval(
r#"(() => {
document.body.innerHTML = '<style>.rings {fill-rule: evenodd}</style>' +
'<svg xmlns="http://www.w3.org/2000/svg"><path class="rings" fill="none" ' +
'd="M0 0H10V10H0Z M2 2H8V8H2Z"/></svg>';
const path = document.querySelector('path');
const center = {x: 5, y: 5};
if (path.isPointInFill(center) || !path.isPointInFill({x: 2, y: 5})) throw Error('CSS evenodd');
path.style.fillRule = 'nonzero';
if (!path.isPointInFill(center)) throw Error('inline rule overrides stylesheet');
path.removeAttribute('class'); path.style.fillRule = '';
path.parentNode.setAttribute('fill-rule', 'evenodd');
if (path.isPointInFill(center)) throw Error('inherited rule');
path.setAttribute('fill-rule', 'nonzero');
for (const fill of ['none', 'transparent', 'red']) {
path.setAttribute('fill', fill);
if (!path.isPointInFill(center)) throw Error('paint affected geometry');
}
for (const value of [NaN, Infinity, -Infinity]) {
if (path.isPointInFill({x: value, y: 5}) || path.isPointInFill({x: 5, y: value})) {
throw Error('nonfinite coordinate');
}
}
return true;
})()"#,
)
.unwrap(),
"true"
);
}