diff --git a/crates/xfa/src/layout.rs b/crates/xfa/src/layout.rs
index 73c6bde90f..cce62f90cd 100644
--- a/crates/xfa/src/layout.rs
+++ b/crates/xfa/src/layout.rs
@@ -155,6 +155,11 @@ struct Layouter<'t> {
/// The flowed subforms being laid out, outermost first: a break between their children
/// closes their parts on one content area and opens new ones on the next.
frames: Vec,
+ /// What scripts set on page-master content, applied to each page's copy by its own SOM path.
+ overrides: Option<&'t crate::script::Overrides>,
+ /// The pages' copies of master content that overrides changed, kept for the whole layout so
+ /// their addresses stay unique (the measurement cache keys on them).
+ master_copies: Vec>>,
}
/// How many instances of a repeating subform to lay out: what the data holds once it holds
@@ -167,6 +172,17 @@ pub fn instance_count(occur: &Occur, from_data: usize) -> usize {
/// Lay a template out, with the values and repeat counts of `data` (the `xfa:data` element).
pub fn layout(tpl: &Template, data: Option<&DataNode>) -> Result