css: compare visibility keyword values case-insensitively

CSS keywords are ASCII case-insensitive, but StyleManager matched
display:none / visibility:hidden|collapse / opacity:0 / pointer-events:none
with exact String.eql, so `style="DISPLAY: NONE"` or a `.x { Visibility:
Hidden }` rule left the element visible to checkVisibility,
getComputedStyle, the semantic tree and interactiveElements.

Compare at the check sites via a new String.eqlSliceIgnoreCase rather than
lowercasing declared values, which would corrupt content, url() and custom
property values that el.style must reflect verbatim.
This commit is contained in:
Adrià Arrufat committed 2026-08-25 14:53:35 +02:00
1 parent feb8d17863
commit f37d96c285
4 files changed
+47 -8

No files matched your search

+4
View File
@@ -224,6 +224,10 @@ pub const String = extern struct {
};
}
pub fn eqlSliceIgnoreCase(a: String, b: []const u8) bool {
return std.ascii.eqlIgnoreCase(a.str(), b);
}
const EqualOrDeleted = union(enum) {
deleted,
equal: bool,