@@ -70,69 +70,7 @@ struct SnapshotAcquisition {
7070 let viewport : CGRect
7171}
7272
73- /// The only snapshot node shape accepted by response payload assembly.
74- ///
75- /// It has no memberwise initializer, so response assembly has to choose one of the explicit
76- /// presentation constructors. The encoded shape intentionally remains byte-for-byte compatible
77- /// with the former `SnapshotNode` wire model.
78- struct PresentedNode : Codable {
79- let index : Int
80- let type : String
81- let label : String ?
82- let identifier : String ?
83- let value : String ?
84- let rect : SnapshotRect
85- let enabled : Bool
86- let focused : Bool ?
87- let selected : Bool ?
88- let hittable : Bool
89- let depth : Int
90- let parentIndex : Int ?
91- let hiddenContentAbove : Bool ?
92- let hiddenContentBelow : Bool ?
93- let actions : [ String ] ?
94-
95- init ( presenting raw : RawAXNode ) {
96- self . init (
97- presenting : raw ,
98- rect : raw . rect ,
99- index : raw . index ,
100- depth : raw . depth ,
101- parentIndex : raw . parentIndex
102- )
103- }
104-
105- init ( presenting node : SnapshotPresentationNode ) {
106- self . init (
107- presenting : node . raw ,
108- rect : node . effectiveRect ,
109- index : node . raw . index ,
110- depth : node . raw . depth ,
111- parentIndex : node . raw . parentIndex
112- )
113- }
114-
115- init (
116- presenting raw : RawAXNode ,
117- rect : SnapshotRect ,
118- index : Int ,
119- depth : Int ,
120- parentIndex : Int ?
121- ) {
122- self . index = index
123- type = raw . type
124- label = raw . label
125- identifier = raw . identifier
126- value = raw . value
127- self . rect = rect
128- enabled = raw . enabled
129- focused = raw . focused
130- selected = raw . selected
131- hittable = raw . hittable
132- self . depth = depth
133- self . parentIndex = parentIndex
134- hiddenContentAbove = raw . hiddenContentAbove
135- hiddenContentBelow = raw . hiddenContentBelow
136- actions = raw . actions
137- }
138- }
73+ /// Keep the wire payload's existing spelling while making the presented-node type owned by the
74+ /// presentation module. Its constructors live in `RunnerTests+SnapshotPresentation.swift` and are
75+ /// file-private there, so acquisition backends can carry a `PresentedNode` but cannot construct one.
76+ typealias PresentedNode = SnapshotPresentation . PresentedNode
0 commit comments