pub enum Presence {
Visible,
Hidden,
Invisible,
Inactive,
}Expand description
XFA presence attribute values (XFA 3.3 §2.6 p67-68).
Controls visibility and layout space allocation:
Visible– all phases: binding, automation, layout, rendering, interaction.Hidden– binding + automation only; no layout space, no rendering.Invisible– binding + automation + layout; takes up space but not visible.Inactive– binding only; completely absent from form.
Note: spec defines hidden as “effectively absent” (no space) and invisible
as “takes space but not visible”. Our is_layout_hidden implementation reflects this.
Variants§
Implementations§
Source§impl Presence
impl Presence
Sourcepub fn is_visible(self) -> bool
pub fn is_visible(self) -> bool
True when the element is fully visible (rendered and occupying layout
space). The inverse of is_not_visible.
Sourcepub fn is_not_visible(self) -> bool
pub fn is_not_visible(self) -> bool
True when the element should not be rendered.
True when the element should not occupy layout space.
XFA Spec 3.3 §2.6 (p68):
hidden: no layout space, no rendering (effectively absent)invisible: no layout space in Adobe (spec says “takes space”, but empirical testing shows Adobe skips it)inactive: completely absent (no binding, no space)
Hidden was previously excluded from this predicate based on an
incorrect assumption that Adobe reserves space for hidden elements.
GATE #27 testing proved this wrong: hidden subforms with <break>
elements caused 2-23x overpagination in forms with many
presence="hidden" subforms (fixes #806).