Skip to content

Lightpanda: the headless browser designed for AI and automation

Merge pull request #3238 from lightpanda-io/fileapi-blob-spec

Karl Seguinbe101e188c6c
diff --cc src/browser/webapi/Element.zig
index 469390bd7,da4e3451c..cd3bd1593
--- a/src/browser/webapi/Element.zig
+++ b/src/browser/webapi/Element.zig
@@@ -1333,18 -1314,10 +1333,18 @@@ pub fn checkVisibilityCached(self: *Ele
return !self.ownerFrame(frame)._style_manager.isHidden(self, cache, .{});
}
+// The element's own display:none only, no ancestor walk. For a child or
+// sibling of an element already known to be visible, that is the whole
+// answer: they share the visible ancestor chain — and the owner frame, which
+// the caller resolves once rather than per element.
+fn isVisibleSelf(self: *Element, style_manager: *StyleManager) bool {
+ return !style_manager.hasDisplayNone(self);
+}
+
const CheckVisibilityOpts = struct {
checkOpacity: bool = false,
- opacityProperty: bool = false,
checkVisibilityCSS: bool = false,
+ opacityProperty: bool = false,
visibilityProperty: bool = false,
};
pub fn checkVisibility(self: *Element, opts_: ?CheckVisibilityOpts, frame: *Frame) bool {