mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-09-16 07:48:35 -04:00
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:
1 parent
feb8d17863
commit
f37d96c285
4 files changed
+47
-8
No files matched your search
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user